/* Ezra Foy Realty. Modern with a heritage feel: Prata headings, fine double rules, framed plates.
   Colours sampled from his logo (ink #041826, brown #684329) on white; eXp Luxury's Rich Gold
   (#b19a55) is the one accent, kept to rules and dark bands because it fails contrast as text on
   white. No cream or beige backgrounds: the sepia hero is the warm moment. */
:root {
  --ink: #041826;
  --ink-2: #0c2a3f;
  --brown: #684329;
  --gold: #b19a55;
  --gold-soft: #d3c08a;
  --white: #ffffff;
  --tint: #f1f4f6;
  --text: #24323c;
  --muted: #55636d;
  --line: #d3d9de;
  --line-dark: rgba(255, 255, 255, 0.2);
  --ease: 0.3s ease;
  --gutter: clamp(16px, 5vw, 72px);
  --bar-h: 83px; /* the menu bar, at the top of the page */
  --top-h: var(--bar-h);
  --serif: "Prata", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-underline-offset: 3px; transition: color var(--ease); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
.dark :focus-visible, #footer :focus-visible, .hero :focus-visible, .page-hero :focus-visible { outline-color: var(--gold-soft); }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--serif); font-weight: 400; line-height: 1.18; margin: 0 0 0.55em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.5rem); }
p { margin: 0 0 1.15em; }
.eyebrow {
  display: block;
  color: var(--brown);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--gold-soft); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--text); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2000; left: 12px; top: 12px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--white); color: var(--ink); }

/* The ornament: a fine rule either side of a small lozenge, as on an engraved plate. */
.orn { display: flex; align-items: center; gap: 12px; width: 150px; margin: 18px 0 26px; color: var(--brown); }
.orn::before, .orn::after { content: ""; flex: 1; border-top: 1px solid currentColor; }
.orn i { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }
.center .orn, .orn.center { margin-left: auto; margin-right: auto; }
.dark .orn { color: var(--gold); }

/* Buttons: square-cornered, set in small capitals. */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn.solid { background: var(--ink); color: var(--white); }
.btn.solid:hover { background: var(--brown); border-color: var(--brown); color: var(--white); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dark .btn, .hero .btn, .page-hero .btn { border-color: var(--gold-soft); color: var(--white); }
.dark .btn:hover, .hero .btn:hover, .page-hero .btn:hover { background: var(--gold-soft); color: var(--ink); }
.dark .btn.solid, .hero .btn.solid { background: var(--white); border-color: var(--white); color: var(--ink); }
.dark .btn.solid:hover, .hero .btn.solid:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
/* Over a hero the whole top sits on the photo, fixed and transparent, with white logos (one-colour, as the
   eXp guidelines ask on photographs) over a dark scrim in the hero itself. Once scrolled, the menu turns
   solid white with the dark logos. Without a hero (body.no-hero) it's solid from the start and sticky in
   the page's flow, so nothing reflows. */
.site-top { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
body.no-hero .site-top { position: sticky; top: 0; }
.on-photo { display: block; }
.on-solid { display: none; }
body.no-hero .on-photo, .site-top.scrolled .on-photo, body.menu-open .on-photo { display: none; }
body.no-hero .on-solid, .site-top.scrolled .on-solid, body.menu-open .on-solid { display: block; }
#header {
  position: relative;
  z-index: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: background var(--ease), border-color var(--ease);
}
body.no-hero #header, .site-top.scrolled #header { background: var(--white); border-bottom: 4px double var(--ink); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--bar-h); padding: 0 var(--gutter); transition: height var(--ease); }
.site-top.scrolled .header-inner { height: 68px; }
body.no-hero .header-inner { height: var(--bar-h); }
.header-logo { flex: none; line-height: 0; }
.header-logo img { width: auto; height: 72px; transition: height var(--ease); }
.site-top.scrolled .header-logo img { height: 52px; }
body.no-hero .header-logo img { height: 72px; }
.header-brokerage { flex: none; line-height: 0; padding: 6px 0 6px 20px; border-left: 1px solid rgba(255, 255, 255, 0.4); }
body.no-hero .header-brokerage, .site-top.scrolled .header-brokerage { border-left-color: var(--line); }
.header-brokerage img { width: auto; height: 34px; }
.nav { margin-left: auto; }
.nav > ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav > ul > li > a {
  display: block;
  padding: 10px 11px;
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-shadow: 0 1px 6px rgba(20, 12, 6, 0.55);
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav > ul > li > a:hover, .nav > ul > li:hover > a, .nav > ul > li.active > a { color: var(--gold-soft); }
.nav > ul > li.active > a { box-shadow: inset 0 -1px 0 var(--gold-soft); }
body.no-hero .nav > ul > li > a, .site-top.scrolled .nav > ul > li > a { color: var(--ink); text-shadow: none; }
body.no-hero .nav > ul > li > a:hover, body.no-hero .nav > ul > li:hover > a, body.no-hero .nav > ul > li.active > a,
.site-top.scrolled .nav > ul > li > a:hover, .site-top.scrolled .nav > ul > li:hover > a, .site-top.scrolled .nav > ul > li.active > a { color: var(--brown); }
body.no-hero .nav > ul > li.active > a, .site-top.scrolled .nav > ul > li.active > a { box-shadow: inset 0 -1px 0 var(--brown); }
.nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  box-shadow: 0 10px 28px rgba(4, 24, 38, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { display: block; padding: 11px 16px; color: var(--ink); font-size: 0.88rem; line-height: 1.35; text-decoration: none; border-bottom: 1px solid var(--tint); }
.nav .sub-menu li:last-child a { border-bottom: 0; }
.nav .sub-menu a:hover, .nav .sub-menu a[aria-current="page"] { background: var(--tint); color: var(--brown); }
.burger { display: none; flex: none; width: 44px; height: 44px; padding: 11px; margin-left: 4px; border: 0; background: transparent; color: var(--white); cursor: pointer; }
body.no-hero .burger, .site-top.scrolled .burger, body.menu-open .burger { color: var(--ink); }
.burger span { box-shadow: 0 0 3px rgba(20, 12, 6, 0.35); }
body.no-hero .burger span, .site-top.scrolled .burger span, body.menu-open .burger span { box-shadow: none; }
.burger span { display: block; height: 1px; background: currentColor; margin: 6px 0; transition: transform var(--ease), opacity var(--ease); }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1240px) {
  :root { --bar-h: 69px; }
  .header-inner { gap: 12px; }
  .site-top.scrolled .header-inner { height: 60px; }
  body.no-hero .header-inner { height: var(--bar-h); }
  .header-logo img, body.no-hero .header-logo img { height: 58px; }
  .site-top.scrolled .header-logo img { height: 46px; }
  body.menu-open .header-brokerage { border-left-color: var(--line); }
  /* Open over a photo, the phone menu is on white, so the top matches it. */
  body.menu-open #header { background: transparent; border-bottom-color: transparent; }
  .header-brokerage { margin-left: auto; padding-left: 12px; }
  .header-brokerage img { height: 28px; }
  .burger { display: block; }
  /* visibility: inherit on the sub-menus, not visible: a visible child of the hidden menu still
     takes taps, and the closed menu's invisible links would cover the page. */
  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    margin: 0;
    padding: 90px var(--gutter) 40px;
    background: var(--white);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
  }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  .nav > ul { display: block; }
  .nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav > ul > li > a, body .site-top .nav > ul > li > a { padding: 16px 0; font-size: 0.86rem; color: var(--ink); text-shadow: none; }
  .nav > ul > li.active > a, body .site-top .nav > ul > li.active > a { box-shadow: none; color: var(--brown); }
  .nav .sub-menu { position: static; min-width: 0; padding: 0 0 12px; background: none; border: 0; box-shadow: none; opacity: 1; visibility: inherit; transform: none; transition: none; }
  .nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { transform: none; visibility: inherit; }
  .nav .sub-menu a { padding: 8px 0 8px 14px; border: 0; color: var(--muted); }
}

/* ---------- Hero: slow pan and zoom, as on eXp Luxury ----------
   The photo is 1688 x 998 and is a soft scan, so the frame stops at 1920px: past that the page's ink
   shows either side rather than the photo being stretched further. --ar is width / height, --fx and --fy
   how far across and down the photo the camera centres. The keyframes' +/-140px must stay inside --mx. Motion
   stops for visitors who've asked for reduced motion. */
.hero-wrap { background: var(--ink); }
.hero, .page-hero { position: relative; isolation: isolate; color: var(--white); overflow: hidden; background: var(--ink); }
.hero { max-width: 1920px; margin: 0 auto; min-height: clamp(471px, 66.8vh, 698px); display: flex; align-items: flex-end; padding: calc(var(--top-h) + 40px) var(--gutter) clamp(44px, 7vh, 78px); }
.hero::before, .page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* The dark at the top is what the white menu reads against: the sepia sky is pale. */
  background: linear-gradient(180deg, rgba(30, 20, 14, 0.74) 0, rgba(30, 20, 14, 0.62) var(--top-h), rgba(40, 24, 12, 0.06) calc(var(--top-h) + 170px), rgba(40, 24, 12, 0.08) 48%, rgba(30, 20, 14, 0.82) 100%);
}
/* The fine double frame of an engraved plate. */
.hero::after, .page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(var(--top-h) + clamp(8px, 1.4vw, 20px)) clamp(8px, 1.4vw, 20px) clamp(8px, 1.4vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: -5px;
  pointer-events: none;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; container-type: size; }
.hero-slide {
  --ar: 1.691;
  --fx: 0.5;
  --fy: 0.5;
  position: absolute;
  inset: -48px -170px;
  transform-origin: calc(var(--fx) * 100%) calc(var(--fy) * 100%);
  animation: hero-pan 23s cubic-bezier(0.3, 0.1, 0.7, 0.9) infinite alternate;
  will-change: transform;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: calc(var(--fx) * 100%) calc(var(--fy) * 100%); }
.page-hero .hero-slide { animation-duration: 77s; }
@supports (width: 1cqh) {
  .hero-slide {
    --mx: calc(140px + 1cqh + 8px);
    --my: calc(1cqw + 8px);
    --w: max(100cqw + 2 * var(--mx), (100cqh + 2 * var(--my)) * var(--ar));
    --h: calc(var(--w) / var(--ar));
    inset: auto;
    left: clamp(100cqw + var(--mx) - var(--w), 50cqw - var(--fx) * var(--w), -1 * var(--mx));
    top: clamp(100cqh + var(--my) - var(--h), 50cqh - var(--fy) * var(--h), -1 * var(--my));
    width: var(--w);
    height: var(--h);
  }
}
@keyframes hero-pan {
  from { transform: translateX(140px) scale(1); }
  to { transform: translateX(-140px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .hero-slide { animation: none; } }
/* On phones the words sit further up the photo, so the dark starts sooner. */
@media (max-width: 720px) {
  .hero::before { background: linear-gradient(180deg, rgba(30, 20, 14, 0.74) 0, rgba(30, 20, 14, 0.62) var(--top-h), rgba(40, 24, 12, 0.08) calc(var(--top-h) + 120px), rgba(30, 20, 14, 0.52) 58%, rgba(30, 20, 14, 0.86) 100%); }
}
.hero-content { max-width: 800px; }
.hero h1 { color: var(--white); margin-bottom: 14px; text-shadow: 0 1px 24px rgba(4, 24, 38, 0.55); }
.hero .lead { color: var(--white); max-width: 620px; text-shadow: 0 1px 14px rgba(4, 24, 38, 0.6); }
.hero .eyebrow { color: var(--white); text-shadow: 0 1px 10px rgba(4, 24, 38, 0.7); }
.hero-caption { position: absolute; right: calc(clamp(8px, 1.4vw, 20px) + 16px); bottom: calc(clamp(8px, 1.4vw, 20px) + 12px); margin: 0; font-size: 0.7rem; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.85); }
@media (max-width: 720px) { .hero-caption { display: none; } }
.page-hero { min-height: clamp(400px, 56vh, 600px); display: flex; align-items: flex-end; padding: calc(var(--top-h) + 40px) var(--gutter) clamp(34px, 5vh, 56px); }
.page-hero h1 { color: var(--white); margin: 0; text-shadow: 0 1px 24px rgba(4, 24, 38, 0.55); max-width: 900px; }
.page-hero .lead { color: var(--white); margin: 12px 0 0; max-width: 680px; }
.page-hero::before { background: linear-gradient(180deg, rgba(4, 24, 38, 0.74) 0, rgba(4, 24, 38, 0.62) var(--top-h), rgba(4, 24, 38, 0.12) calc(var(--top-h) + 130px), rgba(4, 24, 38, 0.15) 50%, rgba(4, 24, 38, 0.82) 100%); }
.page-hero .eyebrow { margin-bottom: 8px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section.tight { padding-top: clamp(36px, 5vw, 56px); }
.section.tint { background: var(--tint); }
.section.dark, .dark { background: var(--ink); color: rgba(255, 255, 255, 0.86); }
.dark h2, .dark h3 { color: var(--white); }
.dark .lead { color: var(--white); }
.dark a:not(.btn) { color: var(--gold-soft); }
.dark a:not(.btn):hover { color: var(--white); }
.container { max-width: 1200px; margin: 0 auto; }
.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.split.top { align-items: start; }
.split.wide-text { grid-template-columns: 0.8fr 1.2fr; }
@media (max-width: 860px) { .split, .split.wide-text { grid-template-columns: 1fr; } }
.section-head { max-width: 760px; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-foot { margin-top: clamp(30px, 4vw, 48px); }

/* A framed plate: a thin rule, white mount, and a second rule set outside it. */
.plate { margin: 0; padding: 8px; background: var(--white); border: 1px solid var(--ink); outline: 1px solid var(--line); outline-offset: 6px; }
.plate img { width: 100%; }
.plate-wrap { padding: 7px; }
figure { margin: 0; }
figcaption, .caption { color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.plate figcaption { padding: 10px 2px 2px; }
.dark figcaption, .dark .caption { color: rgba(255, 255, 255, 0.72); }

/* About, on the home page */
.about-photo { position: relative; max-width: 480px; }
.award { position: absolute; right: -8px; bottom: -26px; width: 118px; filter: drop-shadow(0 6px 14px rgba(4, 24, 38, 0.22)); }
@media (max-width: 860px) { .about-photo { margin: 0 auto 18px; max-width: 420px; } }
.pledge { display: grid; grid-template-columns: 1.15fr 0.85fr; }
.pledge-text { padding: clamp(44px, 6vw, 88px) clamp(24px, 6vw, 88px); align-self: center; }
.pledge blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 2.5vw, 2.05rem); line-height: 1.34; color: var(--white); }
.pledge-photo { position: relative; min-height: 300px; overflow: hidden; }
.pledge-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.pledge-photo:hover img { transform: scale(1.04); }
.pledge-photo figcaption { position: absolute; left: 12px; bottom: 10px; padding: 3px 8px; background: rgba(4, 24, 38, 0.72); color: var(--white); font-size: 0.68rem; }
@media (max-width: 860px) { .pledge { grid-template-columns: 1fr; } .pledge-photo { min-height: 260px; } }

/* The doorway photo beside Nelson's history */
.datestone { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.datestone h2 { font-size: clamp(2rem, 3.8vw, 3.05rem); }
.datestone .plate { max-width: 400px; margin: 0 auto; background: var(--white); border-color: var(--gold); outline-color: rgba(177, 154, 85, 0.45); }
@media (max-width: 860px) { .datestone { grid-template-columns: 1fr; } .datestone-photo { order: 2; } .datestone .plate { max-width: 340px; } }
/* Doorway photo swaps instantly while the mouse is over it (client request #87, follow-up). */
.door-swap { position: relative; }
.door-swap .door-swap-alt { position: absolute; top: 8px; left: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: cover; object-position: 58% 50%; opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .door-swap:hover .door-swap-alt { opacity: 1; } }

.ledger { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--line); }
.ledger li { padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.ledger strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; margin-bottom: 3px; }
.dark .ledger, .dark .ledger li { border-color: var(--line-dark); }
.dark .ledger strong { color: var(--gold-soft); }

/* Three doors */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }
.tile { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(240px, 30vw, 380px); padding: 26px; overflow: hidden; color: var(--white); text-decoration: none; background: var(--ink); }
.tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 24, 38, 0.05) 30%, rgba(4, 24, 38, 0.86) 100%); }
.tile::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(255, 255, 255, 0.45); pointer-events: none; transition: border-color var(--ease); }
.tile:hover { color: var(--white); }
.tile:hover img { transform: scale(1.04); }
.tile:hover::after { border-color: var(--gold-soft); }
.tile h3 { color: var(--white); margin: 0 0 4px; font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
.tile span { font-size: 0.92rem; line-height: 1.4; }

/* Property report band and stand-in */
.report-stand { border: 1px solid var(--ink); outline: 1px solid var(--line); outline-offset: 6px; padding: clamp(22px, 4vw, 40px); background: var(--white); margin: 7px; }
.report-stand label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.report-row { display: flex; gap: 10px; flex-wrap: wrap; }
.report-row input { flex: 1 1 240px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); background: var(--tint); font: inherit; color: var(--muted); }
.report-note { margin: 22px 0 0; padding: 14px 16px; background: var(--tint); border-left: 2px solid var(--gold); font-size: 0.9rem; color: var(--text); }
.report-note strong { color: var(--ink); }
.report-sources { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.report-sources li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
/* Every slide sits in one grid cell, so the box is as tall as the longest quote and nothing jumps. */
.tm { max-width: 860px; margin: 0 auto; text-align: center; }
.tm-track { display: grid; }
.tm-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s; }
.tm-slide.is-active { opacity: 1; visibility: visible; }
.tm blockquote, .quote-card blockquote { margin: 0; }
.tm blockquote::before, .quote-card blockquote::before { content: "\201C"; display: block; color: var(--gold); font-family: var(--serif); line-height: 0.8; height: 0.5em; }
.tm blockquote::before { font-size: 4.2rem; margin-bottom: 18px; }
.tm blockquote p { margin: 0; color: var(--ink); font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.7; }
.tm figcaption { margin-top: 22px; }
.tm figcaption strong, .quote-card figcaption strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.tm-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.tm-controls[hidden] { display: none; }
.tm-nav { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); background: transparent; cursor: pointer; transition: background var(--ease); }
.tm-nav::before { content: ""; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 0 1.5px 1.5px; transition: border-color var(--ease); }
.tm-prev::before { transform: translateX(2px) rotate(45deg); }
.tm-next::before { transform: translateX(-2px) rotate(-135deg); }
.tm-nav:hover { background: var(--ink); }
.tm-nav:hover::before { border-color: var(--white); }
.tm-dots { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.tm-dots button { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.tm-dots button::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--brown); transform: rotate(45deg); transition: background var(--ease); }
.tm-dots button[aria-current="true"]::before { background: var(--brown); }
.quote-grid { columns: 2; column-gap: 26px; }
@media (max-width: 860px) { .quote-grid { columns: 1; } }
.quote-card { margin: 0 0 26px; padding: 30px 28px; border: 1px solid var(--line); border-top: 2px solid var(--gold); background: var(--white); break-inside: avoid; }
/* With JavaScript the cards are stacked into two independent columns of natural height, so a swap only moves the cards in its own column. */
.quote-grid.is-stacked { columns: auto; display: flex; align-items: flex-start; gap: 26px; }
.quote-col { display: flex; flex: 1 1 0; flex-direction: column; gap: 26px; min-width: 0; }
.quote-grid.is-stacked .quote-card { margin: 0; }
@media (max-width: 860px) { .quote-grid.is-stacked { flex-direction: column; align-items: stretch; } .quote-col { flex: none; } }
.quote-grid .quote-card { transition: opacity 1.2s ease, transform 0.7s ease; }
.quote-grid .quote-card.is-out { opacity: 0; }
.quote-grid .quote-card.is-resizing { overflow: hidden; transition: opacity 1.2s ease, transform 0.7s ease, height 1.4s ease; }
.quote-card blockquote::before { font-size: 3rem; margin-bottom: 12px; }
.quote-card blockquote p { margin: 0; color: var(--text); font-size: 0.98rem; }
.quote-card figcaption { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .tm-slide { transition: none; } .quote-grid .quote-card, .quote-grid .quote-card.is-resizing { transition: none; } }

/* ---------- Long reading, /nelson-bc ---------- */
.prose h2 { margin-top: 1.5em; font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.dropcap::first-letter { float: left; font-family: var(--serif); font-size: 4.1em; line-height: 0.86; padding: 0.07em 0.1em 0 0; color: var(--brown); }
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 34px 30px; }
.plates a { display: block; color: inherit; text-decoration: none; }
.plates .plate { height: 100%; }
.plates img { aspect-ratio: 4 / 3; object-fit: cover; }
.plates figcaption { color: var(--ink); font-size: 0.86rem; }
.credit-line { margin-top: 26px; color: var(--muted); font-size: 0.85rem; }

/* Things to do */
.activity { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 48px) 0; border-bottom: 1px solid var(--line); }
.activity:last-child { border-bottom: 0; }
.activity:nth-child(even) .activity-photo { order: 2; }
.activity-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.activity h2 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
@media (max-width: 860px) { .activity { grid-template-columns: 1fr; } .activity:nth-child(even) .activity-photo { order: 0; } }

/* Buying steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(30px, 5vw, 64px); counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { position: relative; padding: 24px 0 18px 66px; border-top: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step) "."; position: absolute; left: 0; top: 16px; font-family: var(--serif); font-size: 2.5rem; line-height: 1.2; color: var(--brown); }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; font-size: 0.98rem; }
.service-list { columns: 2; padding-left: 1.1em; margin: 0 0 1.2em; }
.service-list li { margin-bottom: 0.45em; break-inside: avoid; }
@media (max-width: 560px) { .service-list { columns: 1; } }

/* Accordion, international buyers */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 2px; font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink); line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border: solid var(--brown); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > div { padding: 0 2px 14px; }
.market-reports { margin-top: 28px; border-top: 0; }
/* Two columns of small buttons; the one opened widens across both to the full size */
.market-pair { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; }
.market-reports details { grid-column: 1; border-top: 1px solid var(--line); }
.market-reports details.col-2 { grid-column: 2; }
.market-reports details[open] { grid-column: 1 / -1; }
.market-reports summary { padding: 13px 2px; font-size: 0.9rem; gap: 10px; }
.market-reports details[open] summary { font-size: clamp(1.15rem, 1.8vw, 1.35rem); padding: 18px 2px; }
.market-pair:last-child details { border-bottom: 1px solid var(--line); }
/* On phones one column: 2022 and 2023 first, then 2024 and 2025 */
@media (max-width: 560px) { .market-reports { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); } .market-pair { display: contents; } .market-reports details.col-2 { order: 1; } .market-pair:last-child details { border-bottom: 0; } .market-reports summary { font-size: clamp(1.15rem, 1.8vw, 1.35rem); padding: 18px 2px; } }
.report-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; border: 1px solid var(--line); background: var(--white); }
.report-pages img { flex: 0 0 100%; width: 100%; height: auto; scroll-snap-align: start; }
.report-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.report-controls[hidden] { display: none; }
.report-count { min-width: 8em; text-align: center; font-size: 0.9rem; color: var(--muted); }
.tm-nav:disabled { opacity: 0.35; cursor: default; background: transparent; }
.tm-nav:disabled::before { border-color: var(--ink); }
.exemptions { padding-left: 1.3em; }
.exemptions > li { margin-bottom: 1em; }
.exemptions ul { margin: 0.5em 0 0; padding-left: 1.1em; }
.exemptions li li { margin-bottom: 0.25em; }

/* Perks */
.perks { display: grid; gap: clamp(24px, 3vw, 36px); scroll-margin-top: 120px; }
.perk { display: grid; grid-template-columns: 220px 1fr; gap: clamp(20px, 3vw, 40px); padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-top: 2px solid var(--gold); scroll-margin-top: 110px; }
.perk-logo { display: flex; align-items: flex-start; justify-content: center; }
.perk-logo img { max-height: 170px; width: auto; max-width: 100%; }
.perk h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.perk-redeem { padding: 10px 14px; background: var(--tint); border-left: 2px solid var(--brown); color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.perk details { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.perk summary { cursor: pointer; color: var(--brown); font-weight: 500; }
.perk details p { margin-top: 10px; }
.perk-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
@media (max-width: 720px) { .perk { grid-template-columns: 1fr; } .perk-logo { justify-content: flex-start; } .perk-logo img { max-height: 110px; } }
/* Nelson Perks login (api/perks.js): the box logged-out visitors see, the pop-up, the member bar */
.perks-gate { max-width: 760px; margin: 0 auto; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-top: 2px solid var(--gold); text-align: center; }
.perks-gate h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.perks-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.perks-dialog { width: calc(100% - 32px); max-width: 560px; max-height: calc(100% - 32px); padding: clamp(24px, 4vw, 40px); border: 0; border-top: 3px solid var(--gold); background: var(--white); color: var(--ink); overflow: auto; }
.perks-dialog::backdrop { background: rgba(4, 24, 38, 0.6); }
.perks-dialog h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-right: 32px; }
.perks-dialog h2:focus { outline: none; }
.perks-dialog h3 { font-size: 1.25rem; margin: 0; }
.perks-dialog p { margin: 0; }
.perks-dialog .form { margin-top: 16px; }
.perks-dialog .form[hidden] { display: none; }
.perks-dialog .form-status { margin-top: 14px; }
.perks-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.perks-close:hover { color: var(--brown); }
.perks-switch { font-size: 0.92rem; color: var(--muted); }
.perks-switch button, .member-bar button { padding: 0; border: 0; background: none; color: var(--brown); font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.member-bar { margin: 0 0 clamp(20px, 3vw, 32px); padding: 10px 14px; background: var(--tint); font-size: 0.92rem; text-align: center; }
.perks-decide-page { max-width: 760px; }
.perks-decide-page h1 { margin-top: 8px; }

/* Sold */
.sold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.sold-viewport { overflow: hidden; container-type: inline-size; }
.sold-track { display: flex; gap: 28px; transition: transform 1.2s ease-in-out; }
.sold-track .sold-card { flex: 0 0 calc((100% - 56px) / 3); }
@container (max-width: 955px) { .sold-track .sold-card { flex-basis: calc((100% - 28px) / 2); } }
@container (max-width: 627px) { .sold-track .sold-card { flex-basis: 100%; } }
.sold-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.sold-controls { display: flex; gap: 12px; }
.sold-controls[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .sold-track { transition: none; } }
.sold-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); }
.sold-body { padding: 18px 20px 20px; }
.sold-body .eyebrow { margin-bottom: 6px; }
.sold-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.sold-body dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 0.86rem; line-height: 1.4; }
.sold-body dt { color: var(--muted); }
.sold-body dd { margin: 0; color: var(--ink); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #8b98a3; border-radius: 0; background: var(--white); color: var(--ink); font: inherit; font-size: 1rem; font-weight: 400; }
.form textarea { min-height: 150px; resize: vertical; }
.form input.sr-only { width: 1px; min-height: 0; padding: 0; border: 0; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brown); outline-offset: 0; border-color: var(--brown); }
.form .hint { margin: 0; font-size: 0.82rem; font-weight: 400; color: var(--muted); }
.form-status { margin: 0; min-height: 1.4em; font-size: 0.92rem; color: var(--brown); font-weight: 500; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.contact-list span { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 3px; }
.contact-map { position: relative; aspect-ratio: 16 / 7; min-height: 280px; width: 100%; background: var(--tint); }
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.brand-band { background: var(--white); padding: 30px var(--gutter); border-top: 4px double var(--ink); }
.brand-lockup { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 40px); }
.brand-lockup img { width: auto; height: clamp(64px, 11vw, 88px); }
.brand-divider { width: 1px; align-self: stretch; background: var(--line); }
#footer { background: var(--ink); color: rgba(255, 255, 255, 0.82); padding: clamp(44px, 6vw, 72px) var(--gutter) 30px; font-size: 0.95rem; }
#footer a { color: var(--white); text-decoration: none; }
#footer a:hover { color: var(--gold-soft); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h2 { color: var(--gold-soft); font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; line-height: 1.45; }
.footer-social { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }
.footer-bottom { max-width: 1200px; margin: 38px auto 0; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 0.74rem; line-height: 1.55; color: rgba(255, 255, 255, 0.66); }
.footer-bottom p { margin-bottom: 0.8em; }
.preview-note { color: var(--gold-soft); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Listings viewer (port of FrontDesk all-listings) ---------- */
.lx-toolbar { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 1fr)); gap: 12px; align-items: end; margin-bottom: 20px; }
@media (max-width: 960px) { .lx-toolbar { grid-template-columns: 1fr 1fr; } .lx-search { grid-column: 1 / -1; } }
.lx-field { display: grid; gap: 6px; }
.lx-field span { color: var(--brown); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.lx-field input, .lx-field select { appearance: none; width: 100%; min-height: 46px; padding: 10px 13px; background: var(--white); border: 1px solid #8b98a3; border-radius: 0; color: var(--ink); font: inherit; font-size: 0.95rem; }
.lx-field select { background-image: linear-gradient(45deg, transparent 50%, var(--brown) 50%), linear-gradient(135deg, var(--brown) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.lx-field input:focus, .lx-field select:focus { outline: 2px solid var(--brown); outline-offset: 0; }
.lx-count { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 26px; }
.lx-card { display: block; background: var(--white); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color var(--ease), box-shadow var(--ease); }
.lx-card:hover { color: var(--text); }
.lx-card:hover, .lx-card:focus-visible { border-color: var(--ink); box-shadow: 0 8px 26px rgba(4, 24, 38, 0.1); }
.lx-photo { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tint); }
.lx-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.lx-card:hover .lx-photo img { transform: scale(1.03); }
.lx-photo-empty { display: grid; place-items: center; height: 100%; color: var(--muted); }
.lx-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.lx-badge { padding: 4px 9px; background: rgba(4, 24, 38, 0.86); color: var(--white); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.lx-badge.gold { background: var(--gold); color: var(--ink); }
.lx-media { top: auto; bottom: 10px; left: 10px; }
.lx-photo-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; background: rgba(4, 24, 38, 0.76); color: var(--white); font-size: 0.72rem; }
.lx-body { padding: 18px 20px 16px; }
.lx-price { color: var(--ink); font-family: var(--serif); font-size: 1.5rem; }
.lx-addr { color: var(--ink); font-weight: 600; margin-top: 4px; line-height: 1.35; }
.lx-city { color: var(--muted); font-size: 0.86rem; }
.lx-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.lx-meta strong { color: var(--ink); font-weight: 600; }
/* DDF Rule 6(a)(ii): the listing brokerage as plain text beside each listing. */
.lx-card-credit { margin-top: 10px; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.lx-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lx-empty { grid-column: 1 / -1; padding: 50px 26px; text-align: center; border: 1px solid var(--line); }
.lx-card[hidden] { display: none; }
.lx-more { display: flex; justify-content: center; margin-top: 40px; }
.lx-more[hidden] { display: none; }
.lx-skeleton { background: var(--white); border: 1px solid var(--line); }
.lx-skeleton .lx-body { min-height: 200px; }
.lx-skeleton .lx-body span { display: block; width: 70%; height: 12px; margin-top: 14px; background: var(--tint); }
.lx-skeleton .lx-body span:first-child { width: 45%; height: 26px; margin-top: 6px; }
.lx-skeleton .lx-body span:last-child { width: 40%; }
.lx-skeleton > * { animation: lx-pulse 1.6s ease-in-out infinite; }
@keyframes lx-pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .lx-skeleton > * { animation: none; } }
/* One listing on the home page lies on its side, so it doesn't sit alone in a narrow column. */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 26px; }
@media (min-width: 761px) {
  .featured-grid .lx-card:only-child { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; }
  .featured-grid .lx-card:only-child .lx-photo { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .featured-grid .lx-card:only-child .lx-body { padding: 30px 34px; }
  .featured-grid .lx-card:only-child .lx-price { font-size: 2rem; }
}

/* Map search */
.map-box { height: min(72vh, 680px); min-height: 420px; border: 1px solid var(--ink); background: var(--tint); }
.map-pop { width: 210px; font-family: var(--sans); font-size: 0.85rem; line-height: 1.35; }
.map-pop img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 8px; }
.map-pop strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.map-pop a { color: var(--brown); }
.leaflet-container { font-family: var(--sans) !important; }

/* ---------- Listing page (/listings/<MLS#>/<address>, lib/listing-page.js) ---------- */
.lx-page { scroll-margin-top: 90px; padding: 26px var(--gutter) clamp(60px, 8vw, 100px); max-width: 1320px; margin: 0 auto; }
.lx-back { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 20px 0 18px; border: 1px solid var(--ink); color: var(--ink); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-decoration: none; text-transform: uppercase; white-space: nowrap; transition: background var(--ease), color var(--ease); }
.lx-back::before { content: ""; width: 8px; height: 8px; margin-left: 4px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(45deg); }
.lx-back:hover { background: var(--ink); color: var(--white); }
.lx-back-row { margin-top: clamp(40px, 6vw, 64px); padding-top: 30px; border-top: 1px solid var(--line); }
.lx-detail-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 30px; align-items: flex-end; padding: 24px 0; }
.lx-detail-top h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 0; }
.lx-detail-top .eyebrow { margin-bottom: 8px; }
.lx-share { display: flex; align-items: center; gap: 12px; }
.lx-share-label { color: var(--brown); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.lx-share button { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background var(--ease), color var(--ease); }
.lx-share button:hover { background: var(--ink); color: var(--white); }
.lx-share svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lx-share .icon-share, .lx-share.is-sheet .icon-copy { display: none; }
.lx-share.is-sheet .icon-share { display: block; }
.lx-missing { min-height: 60vh; display: flex; align-items: center; }
.lx-missing .container { width: 100%; }
.narrow.center { text-align: center; }
.bio-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lx-missing .bio-actions { justify-content: center; }
/* The gallery keeps one shape whatever each photo's shape (full width, 3:2 but at most 66% of the
   window's height; width: 100% stops the height limit narrowing it), so nothing jumps between photos.
   While a photo loads, its thumbnail (--preview) stands in, blurred (site/js/listing.js). pan-y leaves
   vertical drags to the page and horizontal ones to the swipe. */
.lx-hero { position: relative; width: 100%; aspect-ratio: 3 / 2; max-height: 66vh; overflow: hidden; background: var(--ink); touch-action: pan-y pinch-zoom; }
.lx-hero::before { content: ""; position: absolute; inset: 0; background: var(--preview, none) center / contain no-repeat; filter: blur(8px); opacity: 0; }
.lx-hero.is-loading::before { opacity: 1; }
.lx-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.2s ease; }
.lx-hero.is-loading img { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) { .lx-hero img { transition: none; } }
.lx-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; background: rgba(4, 24, 38, 0.66); color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer; }
.lx-nav:hover { background: var(--gold); color: var(--ink); }
.lx-nav.prev { left: 12px; }
.lx-nav.next { right: 12px; }
.lx-counter { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; background: rgba(4, 24, 38, 0.76); color: var(--white); font-size: 0.78rem; }
.lx-thumbs { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0; }
.lx-thumbs img { flex: none; width: 104px; height: 70px; object-fit: cover; opacity: 0.6; cursor: pointer; transition: opacity var(--ease); }
.lx-thumbs img.active, .lx-thumbs img:hover { opacity: 1; }
.lx-thumbs img.active { outline: 2px solid var(--brown); outline-offset: -2px; }
.lx-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; padding: 36px 0 0; }
.lx-detail-grid > * { min-width: 0; }
@media (max-width: 860px) { .lx-detail-grid { grid-template-columns: 1fr; padding-top: 26px; } }
.lx-detail-grid h2 { color: var(--brown); font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; margin: 32px 0 12px; }
.lx-detail-grid aside h2 { margin-top: 0; }
.lx-detail-price { color: var(--ink); font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.2; }
.lx-summary { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 16px 0 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lx-summary span { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.lx-summary strong { color: var(--ink); font-weight: 500; font-size: 1.08rem; }
.lx-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lx-actions .btn { padding: 12px 18px; font-size: 0.7rem; }
.lx-remarks { white-space: pre-line; }
.lx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lx-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lx-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lx-specs td:first-child { color: var(--muted); width: 42%; }
.lx-specs td:last-child { color: var(--ink); }
.lx-specs .lx-line { display: block; white-space: nowrap; }
.lx-disclaimer { color: var(--muted); font-size: 0.76rem; margin-top: 16px; }
.lx-agent { display: flex; gap: 14px; align-items: center; margin-top: 24px; padding: 14px; border: 1px solid var(--line); border-top: 2px solid var(--gold); }
.lx-agent img { width: 84px; height: 105px; object-fit: cover; }
.lx-agent strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.lx-agent span { display: block; font-size: 0.86rem; color: var(--muted); }
/* CREA DDF display rules: the listing brokerage as plain text (6(a)(ii)) and CREA's Powered by
   REALTOR.ca badge, 90px wide at its own proportions, linking to the listing (6(a)(i)). */
.lx-credit { color: var(--text); font-size: 0.85rem; margin: 16px 0 0; }
.lx-realtor { display: inline-block; margin-top: 18px; line-height: 0; }
.lx-realtor img { width: 90px; height: 43px; }
.lx-map { position: relative; aspect-ratio: 16 / 10; background: var(--tint); border: 1px solid var(--line); }
.lx-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) { .lx-map { aspect-ratio: 4 / 3; } }
.lx-rooms { margin-top: 30px; }
.lx-rooms summary { display: flex; align-items: center; gap: 12px; width: max-content; max-width: 100%; margin-bottom: 12px; color: var(--brown); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; list-style: none; cursor: pointer; }
.lx-rooms summary::-webkit-details-marker { display: none; }
.lx-rooms summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); transition: transform var(--ease); }
.lx-rooms[open] summary::after { transform: translateY(2px) rotate(-135deg); }
/* 16:9 tour and video windows, ported from FrontDesk's .tour-frame/.tour-tile. A cover tile with a
   play button is swapped for the player on click. */
.lx-tours { display: grid; gap: 14px; margin-top: 24px; }
.tour-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); isolation: isolate; }
.tour-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour-tile { position: absolute; inset: 0; color: var(--white); text-decoration: none; }
.tour-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.tour-tile:hover img { transform: scale(1.03); }
.tour-tile:hover { color: var(--white); }
.tour-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 24, 38, 0.15) 0%, rgba(4, 24, 38, 0.05) 40%, rgba(4, 24, 38, 0.82) 100%); }
.tour-play { position: absolute; top: 50%; left: 50%; z-index: 1; width: 70px; height: 70px; margin: -35px 0 0 -35px; border: 1px solid var(--gold-soft); border-radius: 50%; background: rgba(4, 24, 38, 0.6); transition: background var(--ease), transform var(--ease); }
.tour-play::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -10px 0 0 -6px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--gold-soft); transition: border-color var(--ease); }
.tour-tile:hover .tour-play, .tour-tile:focus-visible .tour-play { background: var(--gold-soft); transform: scale(1.06); }
.tour-tile:hover .tour-play::before, .tour-tile:focus-visible .tour-play::before { border-left-color: var(--ink); }
.tour-label { position: absolute; left: 22px; right: 22px; bottom: 16px; z-index: 1; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4; }
.tour-label span { display: block; margin-bottom: 3px; color: var(--gold-soft); font-size: 0.66rem; }
@media (max-width: 600px) { .tour-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; } .tour-label { left: 14px; bottom: 10px; font-size: 0.72rem; } }
