/* ==========================================================================
   The American Dream. South Georgia, North Florida.
   One ground, one ink, one accent, four type steps, no rules.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* ground, tone steps and ink */
  --paper: #f8f5ef;
  --surface: #efe9dd;      /* one step down from the ground: cards, chips */
  --surface-2: #e5dccb;    /* two steps: pressed, nested panels */
  --ink: #0e2033;
  --ink-soft: #2b3d52;
  --muted: #4f5c69;
  --red: #b5121b;
  --red-deep: #8f0f16;
  --line: rgba(14, 32, 51, .22);   /* form fields only */
  --paper-on-ink: rgba(248, 245, 239, .86);

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* The four type steps. Nothing else is allowed in this file. */
  --t-display: clamp(2.25rem, 5.2vw, 4.5rem);   /* hero h1 only */
  --t-head: clamp(1.6rem, 2.4vw, 2.125rem);     /* h2, section titles, big numbers */
  --t-body: 1.0625rem;                          /* 17px: paragraphs, cards, form text */
  --t-meta: 0.8125rem;                          /* 13px: labels, specs, captions, legal */

  --container: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --gap: clamp(16px, 1.8vw, 24px);        /* the 12-column grid gap */
  --row-gap: clamp(10px, 1.4vw, 20px);
  --section-y: clamp(26px, 3vw, 42px);    /* 42px at 1440: sections 60-110px apart */

  --ease: cubic-bezier(.2, .6, .2, 1);
  --header-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
svg { display: block; }

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1, h2 {
  font-size: var(--t-head);
  line-height: 1.15;
  font-variation-settings: "opsz" 60;
}

h3 {
  font-size: var(--t-body);
  line-height: 1.3;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 30;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

::selection { background: var(--red); color: #fff; }

[x-cloak] { display: none !important; }

.specs, .feature__specs, .listing-card__city, .feature__city,
.proof__label, .area-tile__state, .area-tile__count, .footer__tag,
.field__label, .chip-group__label, .search-card__note, .results-bar__meta,
.pagination__status, .cms-toolbar__count, .field__hint, .cms-metric span,
.footer__legal, .footer__meta, .footer__portal, .footer__link,
.calc-breakdown li, .calc-summary, .calc-note, .cms-tag, .cms-status,
.cms-saved, .cms-table, .cms-agent b, .cms-agent span,
.cms-featured__hint, .cms-featured__meta b, .cms-featured__meta span,
.cms-featured__price, .cms-featured__count, .cms-featured__empty,
.toast, .photo-field__help, .photo-field__preview span, .loading-note,
.cms-toolbar__count, .feature__type, .land-tile__unit, .link-arrow {
  font-size: var(--t-meta);
  line-height: 1.45;
}

/* ---------- helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The page's one grid: twelve columns, one gap, one set of margins. */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--row-gap);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 20px;
  text-decoration: none;
  font-size: var(--t-meta);
  line-height: 1.45;
}
.skip-link:focus { top: 8px; }

.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 500;
  letter-spacing: -.005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--ink-soft); color: var(--paper); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* The screen's one accent: the primary action. */
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); color: #fff; }

.btn--quiet {
  background: var(--surface);
  color: var(--ink);
}
.btn--quiet:hover { background: var(--surface-2); color: var(--ink); }


.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); color: var(--paper); }

/* Text links: ink, underlined, the rule thickens on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-thickness .18s var(--ease), color .18s var(--ease);
}
.link-arrow:hover { text-decoration-thickness: 2px; color: var(--ink); }
.link-arrow svg {
  width: 14px; height: 14px;
  flex: none;
  transition: transform .25s var(--ease);
}
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- utility bar ---------- */
.utilbar {
  background: var(--ink);
  color: var(--paper-on-ink);
}
.utilbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
}
.utilbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-block: -3px;
  color: inherit;
  text-decoration: none;
  font-size: var(--t-meta);
  line-height: 1.45;
}
.utilbar a:hover { color: var(--paper); }
.utilbar svg { width: 13px; height: 13px; }
.utilbar__phone { font-weight: 500; }
.utilbar__region { font-size: var(--t-meta); line-height: 1.45; }
.utilbar__logo {
  gap: 9px !important;
  font-family: var(--serif);
  font-size: var(--t-meta) !important;
  color: var(--paper) !important;
}
.utilbar__logo img { height: 18px; width: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  transition: background .25s var(--ease);
}
.site-header.is-compact { background: var(--surface); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: var(--header-h);
  transition: min-height .25s var(--ease);
}
.is-compact .header__inner { min-height: 62px; }

.lockup {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  text-decoration: none;
  border: 0;
  background: none;
  padding: 0;
  flex: none;
}
.lockup__mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  background: var(--ink);
  flex: none;
  transition: width .25s var(--ease), height .25s var(--ease);
}
.lockup__mark img { width: 32px; height: auto; }
.is-compact .lockup__mark { width: 40px; height: 40px; }
.is-compact .lockup__mark img { width: 26px; }

.lockup__text { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.lockup__name {
  font-family: var(--serif);
  font-size: var(--t-body);
  font-weight: 500;
  font-variation-settings: "opsz" 30;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: var(--ink);
}
.lockup__sub {
  font-size: var(--t-meta);
  line-height: 1.45;
  color: var(--muted);
}
.is-compact .lockup__sub { display: none; }

.nav { display: flex; align-items: center; gap: 2px; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--t-meta);
  line-height: 1.45;
  font-weight: 400;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); font-weight: 500; }

.nav__cta {
  min-height: 44px;
  margin-left: 14px;
  padding: 0 18px;
  font-size: var(--t-meta);
  line-height: 1.45;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
}
.menu-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  background: var(--surface);
  padding: 10px var(--gutter) 26px;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-head);
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
}
.mobile-nav__link svg { width: 15px; height: 15px; color: var(--muted); }
.mobile-nav .btn { width: 100%; margin-top: 18px; }

/* ---------- dev strip ---------- */
.devbar {
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--t-meta);
  line-height: 1.45;
}
.devbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding-block: 6px;
  flex-wrap: wrap;
}
.devbar a, .devbar__link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-size: var(--t-meta);
  line-height: 1.45;
  font-weight: 500;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- hero ----------
   The photograph runs full-bleed behind the first screen: the headline sits
   in columns 1-7 near the top, the supporting line and the one primary action
   underneath it, and the search sheet is pulled up over the photograph's lower
   third so it starts ~45px under the primary action.
   The photograph is pinned (MLS 153606): the house sits at ~51% x / ~51% y of
   the source frame, so 51% 51% keeps the building centred at every width.

   The scrim is one bottom-up wash under the search sheet plus a left falloff and
   an ink wash behind the type. The typography is set for AAA (7:1), not the 3:1
   large-text floor: on this photograph the white siding and cloud are blown to
   255, and 7:1 against #f8f5ef means the pixels behind the glyphs must sit below
   .09 relative luminance, which no falloff that leaves the house alone can
   reach. So the wash carries the depth: it holds .55 under the headline's
   measure, to 50% x, and feathers out over 120px, so nothing of it reaches the
   frame right of 60%. It sits over the unchanged left falloff. The right 40%
   of the frame is therefore pixel-identical to before.

   Measured on the rendered glyph pixels at 1440 / 768 / 390: h1 min 7.74 /
   8.49 / 7.86:1 (was 3.33 / 3.80 / 3.54), supporting line 9.20 / 9.52 /
   8.57:1 (was 4.65 / 4.89 / 5.52), button label 6.85:1 unchanged. Composite
   alpha behind the glyphs .808 / .822 / .811. On a phone the headline runs to
   ~75% of the width, so there 7:1 and an untouched right 40% cannot both hold;
   the band keeps every pixel below the text block identical instead. */
/* The hero frame lives on the view, because the search sheet that follows the
   hero is pulled up as a fraction of the same frame. The floor keeps the
   proportions on short windows, where the vh ceiling would otherwise leave the
   text block taller than the frame. */
#home { --hero-h: max(600px, min(70svh, 620px)); }

.hero {
  position: relative;
  display: block;
  overflow: hidden;
  --hero-h1: var(--t-display);
  min-height: var(--hero-h);
  padding-bottom: clamp(48px, 5vw, 72px);
  background: var(--ink);
  color: var(--paper);
}
.hero__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 51% 51%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* The scrim layers, top to bottom: the bottom-up wash that carries the search
     sheet's edge; the ink wash confined to the headline's measure (deep to 50%,
     then a 120px feather, spent before the right 40%); and the left
     falloff that gives the type its base depth. None is a flat fill: the right
     third keeps the photograph at full strength and the bottom wash thins to
     .10 above 30%. */
  background:
    linear-gradient(/* taste-skill-ignore: neutral scrim under type on a photo */
      to top,
      rgba(14, 32, 51, .86) 0%,
      rgba(14, 32, 51, .10) 70%),
    linear-gradient(/* taste-skill-ignore: neutral ink wash confined to the headline measure */
      to right,
      rgba(14, 32, 51, .55) 0%,
      rgba(14, 32, 51, .55) 50%,
      rgba(14, 32, 51, 0) calc(50% + 120px)),
    linear-gradient(/* taste-skill-ignore: neutral scrim, left falloff behind the headline */
      to right,
      rgba(14, 32, 51, .55) 0%,
      rgba(14, 32, 51, .52) 40%,
      rgba(14, 32, 51, .34) 66%,
      rgba(14, 32, 51, 0) 92%);
}
.hero__grid {
  position: relative;
  z-index: 2;
  grid-template-rows: auto auto;
  align-content: start;
  /* The headline's box ends at 28% of the frame and the supporting line starts
     at 37%: both sit inside the ink wash, which holds to 50% x and feathers
     over 120px. Both stay fractions of the frame, so the shorter frame keeps
     the contrast. */
  row-gap: calc(var(--hero-h) * .09);
  padding-top: clamp(16px, calc(var(--hero-h) * .28 - var(--hero-h1) * 2.04), 140px);
}
.hero h1 {
  grid-column: 1 / span 7;
  grid-row: 1;
  margin: 0;
  color: var(--paper);
  font-size: var(--t-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.hero__lead {
  grid-column: 1 / span 6;
  grid-row: 2;
  align-self: start;
  max-width: 40ch;
}
.hero__sub {
  max-width: 34ch;
  color: var(--paper);
  font-size: var(--t-body);
  line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(16px, 1.6vw, 21px); }

/* ---------- search sheet ----------
   The sheet is pulled up over the lower third of the photograph (34% of the
   hero frame at desktop, 29% on a phone) so it sits ~45px under the primary
   action instead of leaving 280px of empty photograph between them. Only the
   last ~110px of the sheet falls below the hero's bottom edge. */
.search-wrap {
  position: relative;
  z-index: 10;
  margin-top: calc(var(--hero-h) * -.35);
  padding-bottom: clamp(22px, 1.8vw, 26px);
}
.search-card {
  grid-column: 1 / 6;
  margin-right: calc(-1 * (var(--gap) + 24px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  align-items: end;
  padding: clamp(16px, 1.5vw, 20px);
  background: #fff;
  color: var(--ink);
}
.search-card__note { grid-column: 1 / -1; min-height: 0; color: var(--muted); display: flex; align-items: center; }
.search-card .btn { min-height: 50px; }
.search-card .btn--search { grid-column: 2; }
.search-card .field--state { grid-column: 1 / -1; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
  font-weight: 500;
  color: var(--muted);
}
.input, .select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  font-size: var(--t-body);
  line-height: 1.4;
  font-family: var(--sans);
  transition: border-color .18s var(--ease);
}
.input:hover, .select:hover { border-color: var(--ink-soft); }
.input:focus, .select:focus { border-color: var(--ink); outline: none; }
.input:focus-visible, .select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.input::placeholder { color: #5b6874; opacity: 1; }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l4.5-5' fill='none' stroke='%234f5c69' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.unit-input { position: relative; display: flex; }
.unit-input .input { padding-right: 58px; }
.unit-input__suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--t-meta);
  line-height: 1.45;
  color: var(--muted);
  pointer-events: none;
}

/* segmented control: a filled surface, the active segment takes the ink */
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface);
}
.segmented button {
  flex: 1;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--t-meta);
  line-height: 1.45;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- proof ---------- */
.proof { background: var(--paper); }
.proof__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding-top: clamp(18px, 2vw, 28px);
}
.proof__item { padding-right: 12px; }
.proof__num {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.proof__num--word { font-style: italic; }
.proof__label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

/* ---------- sections ---------- */
.section { padding-block: var(--section-y); background: var(--paper); }
.section--sand { background: var(--surface); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  /* 60% of the old head gap: the head sits on its content, not above it. */
  margin-bottom: clamp(17px, 2vw, 29px);
}
.section-head > div:first-child { grid-column: 1 / span 4; }
.section-head__aside {
  grid-column: 5 / span 5;
  max-width: 40ch;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink-soft);
}
.section--sand .section-head__aside { color: var(--ink-soft); }
.section-head__aside p + p { margin-top: 10px; }
.section-head__aside .btn,
.section-head__aside .link-arrow { margin-top: 6px; }

/* ---------- media boxes ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-2);
  text-decoration: none;
}
.media--4x5 { aspect-ratio: 4 / 5; }
.listing-card .media,
.agent-card .media {
  width: 100%;
  aspect-ratio: 4 / 5;
}
/* The featured row is three cards of a listing each, not three posters: a 4:3
   crop of the same 368px column that a 4:5 portrait took 460px of height for.
   The listing and agent grids keep their portrait frames. */
.feature .media { width: 100%; aspect-ratio: 4 / 3; }
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.media--missing img { opacity: 0; }
.media--missing::after {
  content: "Photo unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--t-meta);
  line-height: 1.45;
  text-align: center;
}
a.media:hover img,
.feature__link:hover .media img,
.listing-card__link:hover .media img,
.agent-card__link:hover .media img { transform: scale(1.02); }

.flag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-meta);
  line-height: 1.45;
  font-weight: 500;
}

/* ---------- featured ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(24px, 3vw, 36px);
}
.feature { grid-column: span 4; min-width: 0; display: flex; }
.feature__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 18px;
}
.feature__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.feature__type { color: var(--muted); white-space: nowrap; }
.feature__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.feature h3 {
  margin-top: 6px;
  font-weight: 500;
  transition: text-decoration-color .18s var(--ease);
}
.feature__link:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.feature__city { margin-top: 3px; color: var(--muted); }
.feature__specs {
  margin-top: 8px;
  color: var(--ink-soft);
}
/* The link row sits on one baseline across the three cards even when a street
   name wraps. */
.feature .link-arrow { margin-top: auto; padding-top: 6px; }

/* Owner-curated counts: three keeps the three-up row, two gets wider columns,
   one becomes a landscape print with its copy beside it. */
.feature-grid[data-count="2"] .feature { grid-column: span 6; }
.feature-grid[data-count="2"] .feature h3 { margin-top: 12px; }
.feature-grid[data-count="1"] .feature { grid-column: 1 / span 12; }
.feature-grid[data-count="1"] .feature__link {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  column-gap: clamp(20px, 6vw, 96px);
}
.feature-grid[data-count="1"] .feature .media { aspect-ratio: 16 / 10; }
.feature-grid[data-count="1"] .feature__body {
  padding-top: 0;
  max-width: 34ch;
}
.feature-grid[data-count="1"] .feature h3 { margin-top: 10px; }

.price {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 500;
  font-variation-settings: "opsz" 40;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
}

/* ---------- land band ----------
   The photograph takes the left 62% of the band, the facts sit on ink beside
   it in the right 38%, and both columns are the same height (the grid row is
   as tall as the facts panel), so neither side leaves an empty column. */
.land { background: var(--paper); }
.land__band {
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  column-gap: var(--gap);
  align-items: stretch;
}
.land__print {
  grid-column: 1;
  grid-row: 1;
  min-height: 240px;
  background-color: var(--ink);
  background-position: 51% 42%;
  background-size: cover;
  background-repeat: no-repeat;
}
/* JPEG derivative of the land photo (MLS 153616) as the last-resort layer.
   app.js sets the WebP via image-set() inline; that declaration wins wherever
   it parses, so this file is only fetched by engines without image-set(). With
   no Land record on the feed the attribute is absent and the print stays ink.
   Regenerate both files together, see the note in assets/js/app.js. */
.land[data-land-photo] .land__print {
  background-image: url("img/land-band-1024-a8e82427.jpg");
}
.land__panel {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 1.5vw, 22px);
  /* Opaque ink under the facts: a 100% scrim. A translucent one could not hold
     text contrast over the bright parts of this photograph. */
  background: var(--ink);
  color: var(--paper);
}
.land__panel h2 { color: var(--paper); }
.land__panel p {
  margin-top: 6px;
  max-width: 40ch;
  color: var(--paper-on-ink);
  font-size: var(--t-body);
  line-height: 1.6;
}
.land__tiles {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.land__panel .btn { margin-top: 12px; align-self: flex-start; }
/* Two rows per tract inside the 38% column: acres and price on the first,
   place and link on the second. */
.land-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 1px 12px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--paper);
  text-decoration: none;
  transition: background .22s var(--ease);
}
.land-tile:hover { background: rgba(248, 245, 239, .1); }
.land-tile__acres {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.land-tile__unit { color: var(--paper-on-ink); }
.land-tile__price {
  grid-column: 2;
  justify-self: end;
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.3;
  color: var(--paper);
}
.land-tile__place { grid-column: 1; color: var(--paper-on-ink); line-height: 1.35; }
.land-tile .link-arrow {
  grid-column: 2;
  justify-self: end;
  color: var(--paper);
  min-height: 0;
  white-space: nowrap;
}
.land-tile .link-arrow svg { width: 12px; height: 12px; }

/* ---------- areas: names in columns, no boxes ---------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.area-tile {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 0;
  padding: 6px 12px 8px;
  margin-left: -12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background .18s var(--ease);
}
.area-tile:hover,
.area-tile:focus-visible { background: var(--surface); }
.area-tile__town {
  font-family: var(--serif);
  font-size: var(--t-body);
  font-weight: 500;
  font-variation-settings: "opsz" 30;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.area-tile__state { color: var(--muted); }
.area-tile__count { margin-top: 1px; color: var(--muted); }

/* ---------- three paths ---------- */
.paths {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
}
.path { grid-column: span 4; }
.path h3 {
  font-size: var(--t-head);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 60;
}
.path p {
  margin-top: 10px;
  max-width: 34ch;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink-soft);
}
.path .link-arrow { margin-top: 8px; }

/* ---------- agent cards ---------- */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(32px, 4vw, 56px);
}
.agent-card { grid-column: span 4; min-width: 0; }
.agent-card__body { padding-top: 14px; }
.agent-card__name {
  font-family: var(--serif);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  transition: text-decoration-color .18s var(--ease);
}
.agent-card__link { display: block; color: inherit; text-decoration: none; }
.agent-card__link:hover .agent-card__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.agent-card__state { margin-top: 5px; color: var(--muted); }
.agent-card .link-arrow { margin-top: 4px; }

/* ---------- mortgage teaser ---------- */
.mortgage-teaser__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: end;
  column-gap: clamp(24px, 6vw, 96px);
}
.mortgage-teaser h2 { max-width: 22ch; }
.mortgage-teaser p {
  margin-top: 10px;
  max-width: 44ch;
  font-size: var(--t-body);
  line-height: 1.6;
}
.mortgage-teaser .btn { justify-self: end; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding-top: clamp(44px, 4.6vw, 66px);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--paper); }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: end;
  column-gap: clamp(24px, 6vw, 96px);
  padding-bottom: clamp(28px, 3.4vw, 44px);
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer__mark {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  background: rgba(248, 245, 239, .08);
  flex: none;
}
.footer__mark img { width: 32px; height: auto; }
.footer__name {
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 400;
  color: var(--paper);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 60;
}
.footer__tag {
  margin-top: 8px;
  color: var(--paper-on-ink);
}
.footer__phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: var(--t-head);
  line-height: 1.15;
  color: var(--paper) !important;
}
.footer__contact { justify-self: end; text-align: right; }
.footer__contact .footer__phone { margin-top: 0; }
.footer__address { color: var(--paper-on-ink); font-size: var(--t-body); line-height: 1.5; }
.footer__address a { text-decoration: underline; text-underline-offset: 4px; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  padding-block: clamp(20px, 2.4vw, 32px);
}
.footer__label { color: rgba(248, 245, 239, .55); font-size: var(--t-meta); line-height: 1.45; }
.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper-on-ink);
  font-family: var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-thickness .18s var(--ease), color .18s var(--ease);
}
.footer__link:hover { color: var(--paper); text-decoration-thickness: 2px; }

.footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 22px 34px;
}
.footer__legal {
  max-width: 72ch;
  color: rgba(248, 245, 239, .62);
}
.footer__legal + .footer__legal { margin-top: 6px; }
.footer__meta-group { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.footer__meta { color: rgba(248, 245, 239, .62); white-space: nowrap; }
.footer__portal {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(248, 245, 239, .72);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer__portal:hover { color: var(--paper); }

/* ---------- page head (inner views) ---------- */
.view { display: block; }
.page-head { padding-block: clamp(36px, 5vw, 72px) clamp(22px, 3vw, 40px); }
.page-head__row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 18px;
  align-items: end;
}
.page-head h1 { grid-column: 1 / span 5; }
.page-head__aside {
  grid-column: 5 / span 6;
  max-width: 42ch;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink-soft);
}
.page-head__aside p + p { margin-top: 8px; }

/* ---------- filters ---------- */
.filter-panel {
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  flex-wrap: wrap;
}
.filter-panel__chips { display: flex; flex-direction: column; gap: 14px; }
.filter-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--t-meta);
  line-height: 1.45;
}
.filter-toggle svg { width: 15px; height: 15px; color: var(--muted); }
.filter-toggle__count { color: var(--muted); }
.filter-toggle__chevron { margin-left: auto; transition: transform .2s var(--ease); transform: rotate(90deg); }

.filter-row--inputs {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 16px;
  align-items: end;
}
.chip-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.chip-group__label { color: var(--muted); margin-right: 2px; min-width: 42px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--t-meta);
  line-height: 1.45;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip__count { color: var(--muted); }
.chip[aria-pressed="true"] .chip__count { color: rgba(248, 245, 239, .78); }

.results-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 22px 26px;
}
.results-bar__count {
  font-family: var(--serif);
  font-size: var(--t-head);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -.02em;
}
.results-bar__count b { font-weight: 500; }
.results-bar__meta { color: var(--muted); }
.results-bar__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-left: auto;
}
.results-bar__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--t-meta);
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness .18s var(--ease);
}
.results-bar__action:hover { text-decoration-thickness: 2px; }
.results-bar__action svg { width: 13px; height: 13px; }
.results-bar__action[disabled] { opacity: .45; text-decoration: none; cursor: default; }

/* ---------- listing grid ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(32px, 4vw, 56px);
}
.listing-card { grid-column: span 4; min-width: 0; }
.listing-card__body { padding-top: 14px; }
.listing-card__street {
  margin-top: 8px;
  font-weight: 500;
  transition: text-decoration-color .18s var(--ease);
}
.listing-card__link { display: block; color: inherit; text-decoration: none; }
.listing-card__link:hover .listing-card__street { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.listing-card__city { margin-top: 4px; color: var(--muted); }
.listing-card .specs { margin-top: 10px; color: var(--ink-soft); }

.empty-state {
  padding: clamp(40px, 6vw, 72px) 24px;
  background: var(--surface);
  text-align: center;
}
.empty-state h2 { max-width: 24ch; margin-inline: auto; }
.empty-state p {
  margin: 12px auto 24px;
  max-width: 46ch;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 52px);
}
.pagination__pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--t-meta);
  line-height: 1.45;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.pagination__btn:hover:not([disabled]) { background: var(--surface-2); color: var(--ink); }
.pagination__btn[aria-current="page"] { background: var(--ink); color: var(--paper); }
.pagination__btn[disabled] { opacity: .4; cursor: not-allowed; }
.pagination__btn svg { width: 13px; height: 13px; }
.pagination__status { color: var(--muted); }

/* ---------- agents view ---------- */
.agent-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding-bottom: 20px;
}
.agent-toolbar .chip-group { padding-bottom: 2px; }
.agent-toolbar__count {
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.3;
  color: var(--ink);
  text-align: right;
  padding-bottom: 12px;
  white-space: nowrap;
}

/* ---------- mortgage ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
  padding-bottom: clamp(56px, 7vw, 100px);
}
.calc-form {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.calc-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.calc-form__row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-form legend {
  font-family: var(--serif);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}
.calc-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.field__hint { color: var(--muted); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--surface-2);
}
input[type="range"]::-moz-range-track { height: 2px; background: var(--surface-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--paper);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--paper);
}

.calc-result {
  position: sticky;
  top: 100px;
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: clamp(24px, 3vw, 38px);
}
.calc-result__label { color: var(--paper-on-ink); }
.calc-result__payment {
  display: block;
  margin-top: 12px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  line-height: 1.15;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.calc-result__payment small {
  font-family: var(--sans);
  font-size: var(--t-meta);
  line-height: 1.45;
  color: var(--paper-on-ink);
}
.calc-breakdown {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.calc-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  color: var(--paper-on-ink);
}
.calc-breakdown li span:last-child {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.calc-breakdown li.is-total { font-weight: 500; }
.calc-breakdown li.is-total span { color: var(--paper); }
.calc-summary {
  margin-top: 22px;
  display: grid;
  gap: 8px;
  color: var(--paper-on-ink);
}
.calc-summary div { display: flex; justify-content: space-between; gap: 16px; }
.calc-summary b { font-weight: 500; color: var(--paper); font-variant-numeric: tabular-nums; }
.calc-note {
  margin-top: 24px;
  padding-top: 18px;
  color: rgba(248, 245, 239, .64);
}

/* ---------- portal ---------- */
.cms-view { padding-bottom: clamp(56px, 7vw, 100px); }

.cms-gate {
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 40px);
  background: var(--surface);
  text-align: center;
}
.cms-gate h2 { font-size: var(--t-head); }
.cms-gate p {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink-soft);
}
.cms-gate .field { text-align: left; margin-bottom: 14px; }

.cms-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.cms-head h2 { font-size: var(--t-head); }
.cms-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cms-actions .btn { min-height: 44px; font-size: var(--t-meta); }

.cms-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.cms-metric { background: var(--surface); padding: 16px 18px; }
.cms-metric span { display: block; color: var(--muted); }
.cms-metric b {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}

/* real tables: tone steps instead of rules */
.table-wrap { background: #fff; overflow-x: auto; }
.cms-table { width: 100%; min-width: 960px; border-collapse: collapse; }
.cms-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  white-space: nowrap;
}
.cms-table td {
  padding: 12px 14px;
  color: var(--ink-soft);
  vertical-align: middle;
}
.cms-table tbody tr:nth-child(even) { background: var(--surface); }
.cms-table__street { display: flex; align-items: center; gap: 12px; }
.cms-table__street img { width: 54px; height: 42px; object-fit: cover; background: var(--surface-2); flex: none; }
.cms-table__street b { display: block; color: var(--ink); font-weight: 500; }
.cms-table__price { font-family: var(--serif); font-size: var(--t-body); color: var(--ink); white-space: nowrap; }
.cms-table__mls { font-variant-numeric: tabular-nums; color: var(--muted); }
.cms-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--surface-2);
  color: var(--ink-soft);
  white-space: nowrap;
}
.cms-row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-soft);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.icon-btn--danger:hover { background: var(--red); color: #fff; }
.icon-btn svg { width: 15px; height: 15px; }
.cms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  background: var(--surface);
}
.cms-toolbar .input { min-height: 44px; max-width: 320px; }

.cms-agents { margin-top: 36px; }
.cms-agents h2 { font-size: var(--t-head); }
.cms-agents__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.cms-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 12px 14px;
  min-width: 0;
}
.cms-agent img { width: 40px; height: 40px; object-fit: cover; flex: none; }
.cms-agent div { min-width: 0; }
.cms-agent b { display: block; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-agent span { display: block; color: var(--muted); }

.cms-head__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.cms-status,
.cms-saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.cms-status { color: var(--ink); }
.cms-status svg { width: 13px; height: 13px; flex: none; }
.cms-saved { color: var(--muted); }

.cms-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--ink);
}
.cms-error::before {
  content: "!";
  display: inline-block;
  margin-right: 8px;
  font-weight: 600;
  color: var(--red);
}

.cms-gate__submit { width: 100%; }

.field__error {
  margin-top: 2px;
  color: var(--red);
}
.cms-gate .field__error { text-align: left; margin-bottom: 12px; }

.spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: portal-spin .7s linear infinite;
}
@keyframes portal-spin { to { transform: rotate(360deg); } }

.cms-toolbar__count { color: var(--muted); white-space: nowrap; }

.cms-table__thumb-empty {
  width: 54px;
  height: 42px;
  flex: none;
  background: var(--surface-2);
}

/* featured-on-home panel: owner-ordered, max three */
.cms-featured {
  margin-bottom: 24px;
  background: var(--surface);
}
.cms-featured__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px 6px;
}
.cms-featured h3 { font-family: var(--serif); font-size: var(--t-body); font-weight: 500; }
.cms-featured__hint {
  margin-top: 5px;
  max-width: 62ch;
  color: var(--muted);
}
.cms-featured__count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding-top: 3px;
  color: var(--muted);
  white-space: nowrap;
}
.cms-featured__count b {
  font-family: var(--serif);
  font-size: var(--t-head);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}
.cms-featured__empty { padding: 0 20px 18px; color: var(--muted); }
.cms-featured__list { margin: 0; padding: 0; list-style: none; }
.cms-featured__row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
}
.cms-featured__row:nth-child(odd) { background: rgba(255, 255, 255, .5); }
.cms-featured__rank {
  width: 18px;
  flex: none;
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.3;
  color: var(--muted);
}
.cms-featured__row img {
  width: 64px;
  height: 48px;
  flex: none;
  object-fit: cover;
  background: var(--surface-2);
}
.cms-featured__meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  min-width: 0;
}
.cms-featured__meta b {
  overflow: hidden;
  color: var(--ink);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-featured__meta span { color: var(--muted); }
.cms-featured__price {
  font-family: var(--serif);
  color: var(--ink);
  white-space: nowrap;
}
.cms-featured__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cms-feature__btn {
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: var(--t-meta);
  line-height: 1.45;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.cms-feature__btn:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.cms-feature__btn[disabled] { opacity: .4; cursor: not-allowed; }
.cms-feature__btn--remove:hover:not([disabled]) { background: var(--red); color: #fff; }
.cms-featured-alert {
  margin: 12px 0 24px;
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--ink);
}

.cms-feature-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--t-meta);
  line-height: 1.45;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.cms-feature-toggle:hover { background: #dbd1bd; color: var(--ink); }
.cms-feature-toggle.is-on { background: var(--ink); color: var(--paper); }

.feature-check { gap: 6px; }
.feature-check__row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: var(--t-body);
  line-height: 1.6;
}
.feature-check__row input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--red);
}

@media (max-width: 560px) {
  .cms-featured__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.photo-field__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.photo-field__preview {
  width: 164px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-2);
  flex: none;
}
.photo-field__preview.is-empty { background: var(--surface); }
.photo-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-field__preview span { padding: 14px; color: var(--muted); text-align: center; }
.photo-field__controls { flex: 1 1 220px; min-width: 0; }
.photo-field__help { margin-top: 8px; color: var(--muted); }
.photo-field__url { margin-top: 12px; }

.btn--file {
  position: relative;
  min-height: 44px;
  overflow: hidden;
}
.btn--file input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.btn--file:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 32, 51, .6);
}
.modal {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--paper);
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal__head h2 { font-size: var(--t-head); }
.modal__body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.modal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal__grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
}
.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
}
.modal__close:hover { background: var(--ink); color: var(--paper); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--paper);
  pointer-events: auto;
}
.toast svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--paper); }

/* anchor offset below the sticky header */
#hero, #search, #featured, #land, #areas, #buy-sell,
#listing-results, section[id] { scroll-margin-top: 96px; }

/* ---------- loading ---------- */
.loading-note {
  padding: 40px 0;
  color: var(--muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .nav__link { padding-inline: 8px; }
  .nav { gap: 0; }
  .nav__cta { margin-left: 8px; }
  .footer__top { grid-template-columns: 1fr; row-gap: 32px; }
  .footer__contact { justify-self: start; text-align: left; }
}

@media (max-width: 980px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav { display: block; }

  .section-head > div:first-child { grid-column: 1 / span 7; }
  .section-head__aside { grid-column: 1 / span 7; }
  .section-head { row-gap: 14px; }

  .feature-grid[data-count="3"] .feature { grid-column: span 6; }
  .feature-grid[data-count="2"] .feature { grid-column: span 6; }
  .feature-grid[data-count="1"] .feature__link { grid-template-columns: 1fr; row-gap: 16px; }
  .feature-grid[data-count="1"] .feature__body { max-width: none; }

  .land__band { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .land__print { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 9; min-height: 0; }
  .land__panel { grid-column: 1; grid-row: 2; }

  .area-tile { grid-column: span 4; }
  .path { grid-column: span 6; }
  .paths { column-gap: var(--gap); }
  .agent-card { grid-column: span 6; }
  .listing-card { grid-column: span 6; }

  .agent-toolbar { grid-template-columns: 1fr; align-items: start; }
  .agent-toolbar__count { text-align: left; padding-bottom: 0; }

  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }

  .cms-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mortgage-teaser__inner { grid-template-columns: 1fr; row-gap: 24px; }
  .mortgage-teaser .btn { justify-self: start; }
}

/* Below 820px the headline takes the full width and the hero keeps the
   photograph as its background, just shorter. The left scrim reaches wider,
   because the headline and its supporting line run to ~75% of a phone's
   width rather than a desktop's 50%, and between 561 and 820px the ink wash
   stops at 48% instead of 50% so its last 100px of feather stay clear of the
   house at this width. */
@media (max-width: 820px) {
  #home { --hero-h: max(480px, min(62svh, 560px)); }
  .hero { min-height: var(--hero-h); padding-bottom: clamp(44px, 8vw, 64px); }
  /* the shorter frame keeps the same text-block proportions; the ink wash
     carries the contrast in both */
  .hero__grid { row-gap: calc(var(--hero-h) * .105); }
  .hero h1 { grid-column: 1 / -1; }
  .hero__lead { grid-column: 1 / -1; grid-row: 2; }
  .hero__scrim {
    background:
      linear-gradient(/* taste-skill-ignore: neutral scrim under type on a photo */
        to top,
        rgba(14, 32, 51, .86) 0%,
        rgba(14, 32, 51, .10) 70%),
      linear-gradient(/* taste-skill-ignore: neutral ink wash confined to the headline measure */
        to right,
        rgba(14, 32, 51, .57) 0%,
        rgba(14, 32, 51, .57) 48%,
        rgba(14, 32, 51, 0) calc(48% + 100px)),
      linear-gradient(/* taste-skill-ignore: neutral scrim, left falloff behind the headline */
        to right,
        rgba(14, 32, 51, .55) 0%,
        rgba(14, 32, 51, .53) 60%,
        rgba(14, 32, 51, .44) 80%,
        rgba(14, 32, 51, 0) 100%);
  }

  .search-card { grid-column: 1 / -1; margin-right: 0; }
  .search-wrap { margin-top: calc(var(--hero-h) * -.28); }
  .search-card .field--state { grid-column: 1 / -1; }
  .search-card .btn--search { grid-column: auto; }

  .page-head__row h1 { grid-column: 1 / -1; }
  .page-head__aside { grid-column: 1 / -1; }

  .proof__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .proof__item { padding-right: 0; }

  .filter-row--inputs { grid-template-columns: 1fr; }
}
/* On a phone the headline runs to ~75% of the width, so a left falloff wide
   enough to carry it would reach the house. The wash is turned vertical
   instead: it covers the headline and supporting line edge to edge, feathers
   out over 120px below them, and leaves everything under ~63% of the frame
   (the lawn and pines, and the whole right 40% below the text) untouched. */
@media (max-width: 560px) {
  .hero__scrim {
    background:
      linear-gradient(/* taste-skill-ignore: neutral scrim under type on a photo */
        to top,
        rgba(14, 32, 51, .86) 0%,
        rgba(14, 32, 51, .10) 70%),
      linear-gradient(/* taste-skill-ignore: neutral ink wash confined to the headline band */
        to bottom,
        rgba(14, 32, 51, .55) 0%,
        rgba(14, 32, 51, .55) 40%,
        rgba(14, 32, 51, 0) calc(40% + 120px)),
      linear-gradient(/* taste-skill-ignore: neutral scrim, left falloff behind the headline */
        to right,
        rgba(14, 32, 51, .55) 0%,
        rgba(14, 32, 51, .53) 60%,
        rgba(14, 32, 51, .44) 80%,
        rgba(14, 32, 51, 0) 100%);
  }
}
/* Below 768px the headline leaves the photograph.
   On a 390px frame the headline spans ~5-95% of the width, so holding 7:1 over
   it needed an ink wash up to .76 across that band, and the picture read as a
   flat navy field. Type at 15:1 and a photograph at full brightness cannot both
   live in one 390px frame, so the hero is stacked instead of overlaid:
     1. the photograph, full-bleed, no scrim at all, 44svh of the screen;
     2. an opaque --ink panel below it carrying the headline, the supporting
        line and the primary action, unchanged in size and spacing.
   Nothing of the picture sits under any type, so the panel needs no wash.
   768 keeps the desktop treatment deliberately (its wash measures 8.49:1 and
   the frame is wide enough to hold it), hence 767px, not 820px. */
@media (max-width: 767px) {
  .hero { min-height: 0; padding-bottom: 0; }
  .hero > picture { display: block; }
  .hero__img {
    position: static;
    display: block;
    width: 100%;
    height: clamp(280px, 44svh, 420px);
    object-fit: cover;
    object-position: 51% 51%;
  }
  .hero__scrim { display: none; }
  /* The ink panel is solid, so the type sits at ~15:1 with no wash over it.
     64px of ink under the action is where the sheet laps the panel. */
  .hero__grid {
    position: static;
    background: var(--ink);
    padding-top: 20px;
    padding-bottom: 64px;
    row-gap: 14px;
  }
  .hero__actions { margin-top: 16px; }
  /* The sheet rides 40px under the action and laps the ink panel by 24px, so it
     stays the next thing the eye reaches, as it does over the photograph. */
  .search-wrap { margin-top: -24px; }
}
@media (max-width: 700px) {
  .listing-card { grid-column: span 12; }
  .feature-grid .feature,
  .feature-grid[data-count="2"] .feature,
  .feature-grid[data-count="3"] .feature { grid-column: span 12; }
  .agent-card { grid-column: span 12; }
  /* A 4:5 portrait frame eats most of a phone viewport per card. Square keeps
     every card frame identical with far less vertical air. The featured card
     keeps the same 4:3 crop it has on a desktop. */
  .listing-card .media,
  .agent-card .media,
  .feature-grid[data-count="1"] .feature .media { aspect-ratio: 1 / 1; }

  /* three town columns: a narrower gutter so the longest town name
     ("Crawfordville", 108px at 17px) still fits inside its own column */
  .areas-grid { column-gap: 8px; }
  .area-tile { grid-column: span 4; margin-left: -4px; padding-inline: 4px; }
  .path { grid-column: span 12; }

  .land__panel { padding: 18px; }
  .land__print { aspect-ratio: 4 / 3; }

  .utilbar__region { display: none; }
  .utilbar__logo span { display: none; }
  .utilbar__logo { min-width: 44px; padding-inline: 4px; margin-left: -4px; }
  .utilbar__logo img { height: 20px; }

  :root { --header-h: 68px; }
  .lockup__mark { width: 44px; height: 44px; }
  .lockup__mark img { width: 28px; }

  .filter-panel { padding-block: 4px 8px; }
  .filter-toggle { display: flex; }
  .filter-panel__chips { display: none; padding-top: 4px; }
  .filter-panel__chips.is-open { display: flex; }
  .filter-row--inputs .btn { width: 100%; }
  .results-bar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .results-bar__actions { margin-left: 0; }

  .pagination { justify-content: center; }
  .pagination__status { width: 100%; text-align: center; }

  .search-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-card .field--state { grid-column: 1 / -1; }
  .search-card .btn--search { grid-column: 2; grid-row: 3; }
  .search-card__note { grid-column: 1 / -1; min-height: 0; }
  .modal__grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cms-metrics { grid-template-columns: 1fr; }
  .footer__nav { gap: 4px 20px; }
}

/* Stacked, labelled listing cards on phones */
@media (max-width: 720px) {
  .table-wrap { background: transparent; overflow: visible; }
  .cms-table { display: block; min-width: 0; }
  .cms-table thead { display: none; }
  .cms-table tbody { display: block; }
  .cms-table tr {
    display: block;
    margin-bottom: 12px;
    background: var(--surface);
  }
  .cms-table tbody tr:nth-child(even) { background: var(--surface); }
  .cms-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 14px;
    text-align: right;
  }
  .cms-table td::before {
    content: attr(data-label);
    flex: none;
    font-weight: 500;
    color: var(--muted);
    text-align: left;
  }
  .cms-table td[data-label="Street"] {
    display: block;
    padding-block: 14px;
    text-align: left;
  }
  .cms-table td[data-label="Street"]::before { display: block; margin-bottom: 10px; }
  .cms-head__title { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cms-actions { width: 100%; }
  .cms-actions .btn { flex: 1 1 140px; }
  .cms-toolbar .input { max-width: none; }

  .overlay {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
  }
  .modal { max-height: none; margin-block: auto; }
  .modal__body { padding: 18px; }
}

@media (max-width: 520px) {
  .land__tiles { margin-top: 10px; }
  .land-tile { gap: 1px 10px; }
  .land-tile .link-arrow span { display: none; }
  .footer__top { row-gap: 26px; }
  .footer__bottom { flex-direction: column; }
  .calc-form__row { grid-template-columns: 1fr; }
  .calc-form__row--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal__grid { grid-template-columns: 1fr; }
}

/* At the smallest phones the headline drops to the section step so it still
   sets in two lines. */
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  /* the three-column town list no longer fits a 17px serif town name here */
  .area-tile { grid-column: span 6; margin-left: -4px; }
  .hero { --hero-h1: var(--t-head); }
  .hero h1 { font-size: var(--t-head); letter-spacing: -.02em; }
  .header__inner { gap: 12px; }
  .lockup { gap: 10px; }
  .lockup__mark { width: 40px; height: 40px; }
  .lockup__mark img { width: 25px; }
  .menu-toggle { flex: none; width: 44px; height: 44px; }
}

/* ==========================================================================
   Plain-English search (home page). Jev filters arrive from api.php; the grid
   re-renders against the preloaded index in the same frame.
   ========================================================================== */
.ai-search__head { max-width: 62ch; margin-bottom: 18px; }
.ai-search__head p { margin: 6px 0 0; color: var(--muted); }

.ai-search__box { margin-top: 4px; }
.ai-search__field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.ai-search__field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(14, 32, 51, .1);
}
.ai-search__icon { width: 20px; height: 20px; flex: none; color: var(--muted); }
.ai-search__input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
}
.ai-search__input:focus { outline: none; }
.ai-search__input::placeholder { color: #5b6874; opacity: 1; }

.ai-search__help { min-height: 1.4em; margin: 8px 0 0; font-size: var(--t-meta); }
.ai-search__warn { color: var(--red-deep); font-weight: 600; }

/* The visitor's region + "Near me". Two columns on a wide screen, stacked on
   a phone; both controls keep a 44px tap target. */
.ai-search__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  max-width: 560px;
  margin-top: 16px;
}
.field--region .segmented { width: 100%; }
.near-me { min-height: 44px; width: 100%; justify-content: center; gap: 8px; }
.near-me svg { width: 17px; height: 17px; }
.ai-search__geo {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--t-meta);
}
.ai-count__note { margin: 4px 0 0; color: var(--muted); font-size: var(--t-meta); }
@media (max-width: 560px) {
  .ai-search__controls { grid-template-columns: 1fr; max-width: none; }
}

/* The chips row keeps its height whether or not chips are present, so the
   count and grid never jump as a facet appears or is dropped. */
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 12px;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .18s var(--ease);
}
.ai-chip:hover { background: var(--ink-soft); }
.ai-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ai-chip svg { width: 14px; height: 14px; flex: none; }

.ai-count { margin: 14px 0 0; color: var(--ink-soft); font-size: var(--t-body); }
.ai-count b { color: var(--ink); font-family: var(--serif); font-size: 1.45em; }
.ai-count__muted { color: var(--muted); }

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
  margin-top: 20px;
}
.ai-card { background: var(--surface); border-radius: 6px; overflow: hidden; min-width: 0; }
a.ai-card { display: block; color: inherit; text-decoration: none; }
a.ai-card:hover .ai-card__street { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.ai-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ai-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.ai-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ai-card__noimg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--t-meta);
}
.ai-card__body { padding: 14px 16px 18px; }
.ai-card__price { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 1.3rem; }
.ai-card__street {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: var(--t-body);
  overflow-wrap: anywhere;
}
.ai-card__city { margin: 2px 0 0; color: var(--muted); font-size: var(--t-meta); }
.ai-card__specs { margin: 8px 0 0; color: var(--ink-soft); font-size: var(--t-meta); }
/* Quiet in-body markers: no corner badge. "New" = first seen in our feed in
   the last seven days; the distance only exists while a location is held. */
.ai-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: var(--t-meta);
}
.ai-card__new { font-weight: 600; color: var(--red-deep); }
.ai-card__distance { color: var(--muted); }
.ai-card__status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--t-meta);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ai-more { margin: 22px 0 0; }

.ai-empty { margin-top: 24px; padding: 30px 22px; background: var(--surface); border-radius: 6px; text-align: center; }
.ai-empty h3 { font-family: var(--serif); font-size: var(--t-head); line-height: 1.2; }
.ai-empty p { margin: 8px 0 18px; color: var(--muted); }

/* ---------- listing detail ---------- */
.listing-detail { padding-block: var(--section-y); }
.detail-back { margin: 0 0 18px; }
.detail-back__btn { border: 0; background: none; color: var(--ink); }
.detail-back__btn:hover { color: var(--red); }

.listing-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--gap);
  row-gap: var(--row-gap);
  align-items: start;
}
/* ---------- listing gallery ---------- */
/* The detail media block: a 3/2 main image, a scroll-snapped strip of every
   mirrored photograph, the position count, and — only when the MLS record holds
   more than the mirror does — the honest shortfall with the MLS link. */
.listing-detail__media { min-width: 0; }
.gallery { display: grid; gap: 10px; }
.gallery__main {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface-2);
}
.gallery__main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery__main:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.gallery__noimg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: var(--t-meta);
  text-align: center;
}
.gallery__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gallery__strip {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* legacy Edge */
}
.gallery__strip::-webkit-scrollbar { width: 0; height: 0; }
.gallery__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  background: var(--surface-2);
  cursor: pointer;
  scroll-snap-align: start;
  overflow: hidden;
}
.gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* Selected: a border and a marker dot, never colour alone. */
.gallery__thumb.is-active { border-color: var(--ink); }
.gallery__thumb-marker {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--ink);
}
.gallery__thumb-fallback { position: absolute; inset: 0; background: var(--surface-2); }
.gallery__count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--t-meta);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gallery__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  color: var(--muted);
  font-size: var(--t-meta);
  line-height: 1.5;
}
.gallery__note-link { color: var(--red); }
.gallery__note-link:hover { color: var(--red-deep); }
.gallery__note-link svg { width: 12px; height: 12px; }

.listing-detail__price {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-head);
  line-height: 1.15;
}
.listing-detail__address { margin-top: 4px; }
.listing-detail__address:focus-visible { outline-offset: 6px; }
.listing-detail__city { margin-top: 4px; color: var(--muted); }
.listing-detail__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 12px 20px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.listing-detail__specs li { display: flex; flex-direction: column; min-width: 0; }
.listing-detail__specs b { color: var(--ink); font-size: var(--t-body); font-weight: 600; }
.listing-detail__specs span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--t-meta);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.listing-detail__body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  margin-top: 8px;
}
.listing-detail__section + .listing-detail__section { margin-top: 24px; }
.listing-detail__section h2 {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.listing-detail__description { color: var(--ink-soft); white-space: pre-line; }
.listing-detail__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 20px;
  margin: 0;
}
.listing-detail__feature { border-top: 1px solid var(--line); padding-top: 8px; }
.listing-detail__feature dt {
  color: var(--muted);
  font-size: var(--t-meta);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.listing-detail__feature dd { margin: 2px 0 0; color: var(--ink); }
.listing-detail__history { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.listing-detail__history li { position: relative; padding-left: 16px; color: var(--ink-soft); }
.listing-detail__history li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}
.listing-detail__mls { margin-top: 26px; }
.listing-detail__attribution {
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--t-meta);
  line-height: 1.5;
}

.detail-state { max-width: 620px; padding: 26px 0 10px; }
.detail-state h1 { margin-bottom: 10px; }
.detail-state p { margin-bottom: 20px; color: var(--muted); }
.detail-state .btn + .btn { margin-left: 10px; }

.detail-skeleton {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--gap);
  align-items: start;
}
.detail-skeleton__media {
  aspect-ratio: 3 / 2;
  background: var(--surface);
  animation: sk-pulse 1.4s ease-in-out infinite;
}
.detail-skeleton__body { display: grid; gap: 12px; align-content: start; }
.sk {
  display: block;
  height: 16px;
  background: var(--surface);
  animation: sk-pulse 1.4s ease-in-out infinite;
}
.sk--price { height: 34px; width: 42%; }
.sk--title { height: 26px; width: 72%; }
.sk--short { width: 55%; }
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@media (max-width: 820px) {
  .listing-detail__grid,
  .detail-skeleton { grid-template-columns: 1fr; }
  .listing-detail__body { grid-template-columns: 1fr; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
