/* ============================================================
   Benitez Royal Realty — site styles (navy and gold, from the brokerage mark)
   Palette: navy ink, gold signal — taken from the brokerage logo
   Type: Newsreader (display) / IBM Plex Sans (UI) / IBM Plex Mono (data)
   ============================================================ */

:root {
  /* Palette taken from the brokerage mark: deep navy ground, gold crown.
     Neutrals are biased toward the navy rather than left a flat grey. */
  --paper:      #F1F3F8;
  --surface:    #FFFFFF;
  --surface-2:  #F7F9FC;
  --ink:        #121B33;
  --ink-2:      #3A4560;
  --muted:      #6B7794;
  --line:       #D6DDEA;
  --line-soft:  #E7ECF4;
  --accent:     #1B2E6B;
  --accent-ink: #13214F;
  --accent-wash:#E6EAF6;
  /* Gold, darkened enough to hold contrast as text on a light ground. */
  --gold:       #8A6620;
  --gold-wash:  #FAF2E0;
  /* The mark is navy, so it sits on nothing in light and on white in dark. */
  --logo-ground: transparent;
  --good:       #1C6B4A;
  --shadow:     0 1px 2px rgba(18,27,51,.06), 0 10px 24px -18px rgba(18,27,51,.45);
  --shadow-lift:0 2px 4px rgba(18,27,51,.07), 0 18px 40px -22px rgba(18,27,51,.55);

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: 24px;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0B1120;
    --surface:    #131C30;
    --surface-2:  #18223A;
    --ink:        #E7EBF4;
    --ink-2:      #C3CBDD;
    --muted:      #8B97B2;
    --line:       #27324B;
    --line-soft:  #1E2739;
    --accent:     #8FA6E0;
    --accent-ink: #B4C4EE;
    --accent-wash:#1B2647;
    --gold:       #D9AE6B;
    --gold-wash:  #2B2317;
    --logo-ground: #FFFFFF;
    --good:       #5CBE8E;
    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 24px -18px rgba(0,0,0,.9);
    --shadow-lift:0 2px 6px rgba(0,0,0,.45), 0 18px 40px -20px rgba(0,0,0,.95);
  }
}

:root[data-theme="dark"] {
  --paper:      #0B1120;
  --surface:    #131C30;
  --surface-2:  #18223A;
  --ink:        #E7EBF4;
  --ink-2:      #C3CBDD;
  --muted:      #8B97B2;
  --line:       #27324B;
  --line-soft:  #1E2739;
  --accent:     #8FA6E0;
  --accent-ink: #B4C4EE;
  --accent-wash:#1B2647;
  --gold:       #D9AE6B;
  --gold-wash:  #2B2317;
  --logo-ground: #FFFFFF;
  --good:       #5CBE8E;
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 24px -18px rgba(0,0,0,.9);
  --shadow-lift:0 2px 6px rgba(0,0,0,.45), 0 18px 40px -20px rgba(0,0,0,.95);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: .688rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- notice bar ---------- */
.notice {
  background: var(--gold-wash);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
}
.notice .wrap { display: flex; gap: 10px; align-items: baseline; padding-block: 7px; flex-wrap: wrap; }
.notice strong { font-family: var(--mono); font-size: .688rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap { display: flex; align-items: center; gap: 20px; padding-block: 12px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-logo {
  height: 40px; width: auto; display: block; flex: none;
  background: var(--logo-ground); padding: 3px 5px; border-radius: 4px;
}
.foot-logo {
  height: 84px; width: auto; max-width: 100%; display: block;
  background: var(--logo-ground); padding: 6px 10px; border-radius: 5px;
  margin-bottom: 4px;
}
.brand-logo[hidden] { display: none; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--accent); border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent); background: var(--accent-wash);
}
.brand-name { font-family: var(--display); font-size: 1.22rem; line-height: 1; letter-spacing: -.01em; }
.brand-sub { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 3px; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; padding: 7px 11px; border-radius: var(--radius);
  font-size: .875rem; color: var(--ink-2);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }

.icon-btn {
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.fav-count {
  font-family: var(--mono); font-size: .625rem; background: var(--accent); color: var(--surface);
  border-radius: 99px; padding: 0 5px; margin-left: 5px; min-width: 16px; display: inline-block; text-align: center;
}
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  padding: 10px 18px; font-size: .875rem; font-weight: 500; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { color: #07211B; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn-primary { color: #fff; } }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet { background: none; border-color: transparent; color: var(--accent); padding-inline: 6px; }
.btn-quiet:hover { text-decoration: underline; }
.btn:active { transform: translateY(1px); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 76px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.hero h1 { margin-top: 14px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-lede { margin-top: 18px; max-width: 46ch; color: var(--ink-2); font-size: 1.03rem; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { border-left: 2px solid var(--accent); padding-left: 12px; }
.hero-stats .n { font-family: var(--display); font-size: 1.5rem; display: block; line-height: 1.1; }
.hero-stats .l { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- search card (styled like a listing record sheet) ---------- */
.record {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.record-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
}
.record-body { padding: 18px 16px; display: grid; gap: 14px; }

.field { display: grid; gap: 5px; min-width: 0; }
.field > label { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.control, select.control, input.control {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; font-size: .9rem;
  appearance: none;
}
select.control {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 51%, calc(100% - 11px) 51%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px;
}
.control:hover { border-color: var(--muted); }
.control::placeholder { color: var(--muted); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .04em;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 99px; padding: 5px 11px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- sections ---------- */
.section { padding-block: clamp(46px, 7vw, 82px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head p { color: var(--muted); max-width: 58ch; margin-top: 8px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- listing cards ---------- */
.grid-listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.card:hover { box-shadow: var(--shadow-lift); border-color: var(--muted); transform: translateY(-2px); }
.card-art { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.card-art img { width: 100%; height: 100%; max-width: 100%; object-fit: cover; display: block; }
.card-open { position: absolute; inset: 0; z-index: 1; border: 0; background: none; cursor: pointer; text-indent: -9999px; overflow: hidden; }
.card-open:focus-visible { outline-offset: -3px; }

.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; pointer-events: none; }
.badge {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 2px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
}
.badge-new { background: var(--accent); color: #fff; border-color: var(--accent); }
:root[data-theme="dark"] .badge-new { color: #07211B; }
.badge-pending { background: var(--gold-wash); color: var(--gold); border-color: var(--gold); }
.badge-sold { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line); color: var(--muted);
}
.fav:hover { color: var(--gold); border-color: var(--gold); }
.fav[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: var(--gold-wash); }
.fav svg { width: 15px; height: 15px; }

.card-body { padding: 14px; display: grid; gap: 8px; }
.price { font-family: var(--display); font-size: 1.34rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.addr { font-size: .875rem; color: var(--ink); }
.addr span { display: block; color: var(--muted); font-size: .81rem; }
.specs {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: .72rem; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.specs b { font-weight: 600; }
/* Rule 22's required items live here. The rule sets a floor on type size —
   no smaller than the median used for the listing data — and forbids faint
   text. .875rem in a real text colour clears both. Do not shrink this. */
.card-foot {
  display: grid; gap: 3px;
  padding: 10px 14px; border-top: 1px solid var(--line-soft); background: var(--surface-2);
  font-family: var(--mono); font-size: .875rem; letter-spacing: .01em; color: var(--ink-2);
}
.card-foot .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
/* The listing brokerage is a required disclosure, so it is set in a real text
   colour at readable size — never tiny grey type. */
.card-foot .office { text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- search view ---------- */
.search-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 28px 70px; }
.filters { position: sticky; top: 74px; display: grid; gap: 0; }
.filters .record-body { gap: 16px; }
.filter-group { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.filter-group:last-child { border-bottom: 0; padding-bottom: 0; }
.results-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.results-count { font-family: var(--display); font-size: 1.3rem; }
.results-count span { font-family: var(--mono); font-size: .7rem; color: var(--muted); display: block; letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-wrap label { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sort-wrap select { width: auto; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: .69rem;
  background: var(--accent-wash); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 99px; padding: 4px 6px 4px 11px;
}
.pill button { background: none; border: 0; cursor: pointer; color: inherit; line-height: 1; font-size: .9rem; padding: 0 3px; }

.empty { text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 44ch; margin-inline: auto; }

.more-wrap { display: flex; justify-content: center; margin-top: 32px; }

/* ---------- detail dialog ---------- */
.sheet {
  border: 0; padding: 0; width: min(920px, 100%); max-width: 100%; max-height: 92vh;
  background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.sheet::backdrop { background: rgba(9, 14, 32, .62); backdrop-filter: blur(2px); }
.sheet-inner { max-height: 92vh; overflow-y: auto; }
.sheet-top {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.sheet-art { aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sheet-art img { width: 100%; height: 100%; max-width: 100%; object-fit: cover; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); border-bottom: 1px solid var(--line); }
.thumbs button { border: 0; padding: 0; cursor: pointer; background: var(--surface-2); aspect-ratio: 16/9; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .72; }
.thumbs button[aria-current="true"] img, .thumbs button:hover img { opacity: 1; }
.sheet-body { padding: 22px 18px 30px; display: grid; gap: 26px; }
.sheet-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.sheet-head .price { font-size: 2rem; }

.datasheet { width: 100%; border-collapse: collapse; font-size: .84rem; }
.datasheet th, .datasheet td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.datasheet th { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; width: 46%; }
.datasheet td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px 16px; font-size: .85rem; }
.feature-list li { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); }
.feature-list li::before { content: "—"; color: var(--accent); font-family: var(--mono); }

.calc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.calc-out { font-family: var(--display); font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-break { display: grid; gap: 4px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.calc-break div { display: flex; justify-content: space-between; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- areas / process / about ---------- */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.area {
  background: var(--surface); padding: 16px; border: 0; text-align: left; cursor: pointer;
  display: grid; gap: 3px; transition: background .14s ease;
}
.area:hover { background: var(--accent-wash); }
.area b { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.area span { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--surface); padding: 22px 18px; display: grid; gap: 8px; align-content: start; }
.step .num { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--accent); }
.step p { color: var(--ink-2); font-size: .89rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.portrait { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4/5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quote { font-family: var(--display); font-size: 1.32rem; line-height: 1.4; font-style: italic; color: var(--ink); border-left: 2px solid var(--accent); padding-left: 18px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(28px, 5vw, 52px); align-items: start; }
.contact-lines { display: grid; gap: 14px; margin-top: 24px; }
.contact-lines a { text-decoration: none; display: grid; gap: 2px; }
.contact-lines a:hover .v { color: var(--accent); }
.contact-lines .k { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-lines .v { font-size: 1rem; }
.form-status {
  font-size: .875rem; color: var(--accent-ink); background: var(--accent-wash);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 12px;
}
.form-status-bad { color: var(--gold); background: var(--gold-wash); border-color: var(--gold); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: auto; }
.foot .wrap { display: grid; gap: 26px; padding-block: 36px 28px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
.foot h4 { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 400; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .85rem; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--accent); }
.legal { border-top: 1px solid var(--line-soft); padding-top: 18px; font-size: .73rem; color: var(--muted); display: grid; gap: 10px; }
.legal p { max-width: 88ch; }
.legal .marks { display: flex; gap: 12px; align-items: center; }
.legal .marks span { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 2px; padding: 3px 7px; }

/* ---------- views ---------- */
.view[hidden] { display: none !important; }
.page-head { padding-block: 36px 0; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-grid, .split, .contact-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch;
    padding: 8px var(--gutter) 14px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 10px; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: 18px; }
}
@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .card:hover { transform: none; }
}

/* ---------- photo slots (swap for real images) ---------- */
.contact-lines > div { display: grid; gap: 2px; }
.photo-slot {
  width: 100%; height: 100%; display: grid; place-content: center; gap: 8px; text-align: center;
  padding: 24px; background:
    repeating-linear-gradient(45deg, var(--surface-2) 0 12px, var(--surface) 12px 24px);
  color: var(--muted);
}
.photo-slot svg { justify-self: center; opacity: .5; }
.photo-slot b { font-family: var(--display); font-weight: 500; font-size: 1rem; color: var(--ink-2); }
.photo-slot span { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; line-height: 1.6; max-width: 26ch; }

/* ---------- loading state ---------- */
.grid-listings[aria-busy="true"] { opacity: .45; transition: opacity .18s ease; }


/* ---------- required IDX disclosures ----------
   MLS Grid's IDX Rules require the source and the prescribed disclaimer to be
   shown in a readily visible colour and a typeface no smaller than the median
   used for the listing data itself — they explicitly call out tiny text and
   grey-on-grey. These are set at .9rem in a real text colour on the page
   surface; do not shrink or fade them. */
.disclosure {
  margin-top: 32px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; gap: 10px;
  font-size: .9rem; line-height: 1.55; color: var(--ink-2);
}
.disclosure p { max-width: 92ch; }

.listing-source {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 20px;
  padding: 16px 18px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.listing-source > div { display: grid; gap: 3px; min-width: 0; }
.listing-source .k {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.listing-source .v { font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }


/* ---------- source badge (IDX Rules rule 23) ---------- */
.source-badge {
  margin-top: 22px; padding: 14px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .9rem; color: var(--ink-2);
}
.source-badge .mlsgrid-logo { height: 30px; width: auto; max-width: 160px; display: block; }
.source-badge .src-text { flex: 1 1 260px; min-width: 0; }
.source-badge .logo-todo {
  flex: 1 1 100%;
  background: var(--gold-wash); color: var(--gold);
  border: 1px dashed var(--gold); border-radius: var(--radius);
  padding: 8px 11px; font-size: .82rem;
}
.source-badge .logo-todo code {
  font-family: var(--mono); font-size: .95em; background: none; color: inherit;
}


/* Honeypot. Off-screen rather than display:none, which some bots detect. */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}


/* Links that leave the site carry a small outward arrow, so a visitor knows
   before they click rather than after. */
.nav-external::after {
  content: "";
  display: inline-block; width: .5em; height: .5em; margin-left: .45em;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
  opacity: .55;
}
