/* ============================================================
   NAVESTA — Client account (My Home · Discover · Saved)
   Built on tokens.css. Mobile-first; the primary nav becomes a
   bottom tab bar on phones.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; }
/* Component display rules (e.g. .row { display: grid }) must not resurrect hidden elements. */
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: var(--space-3); top: -48px; z-index: var(--z-toast);
  background: var(--cta-primary); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ── Header + navigation ───────────────────────────────────── */
.acct-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg-glass);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.acct-header__inner {
  max-width: 1040px; margin: 0 auto; padding: var(--space-3) var(--space-5);
  display: flex; align-items: center; gap: var(--space-6);
}
.acct-brand { display: inline-flex; padding: var(--space-1) 0; }
.acct-nav { display: flex; gap: var(--space-1); flex: 1; }
.acct-nav__link {
  text-decoration: none; font-weight: var(--weight-semibold); font-size: var(--text-base);
  color: var(--text-secondary); padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill);
}
.acct-nav__link:hover { color: var(--text); background: var(--bg-elevated); }
.acct-nav__link[aria-current="page"] { color: var(--text); background: var(--bg-surface); }
.acct-nav__icon { display: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-signout {
  background: none; border: 0; cursor: pointer; color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: var(--space-2);
}
.acct-signout:hover { color: var(--text); }

@media (max-width: 640px) {
  /* backdrop-filter would make the header the containing block for the fixed
     bottom nav, pinning it to the header instead of the viewport. */
  .acct-header { backdrop-filter: none; background: var(--bg-card); }
  .acct-header__inner { padding: var(--space-3) var(--space-4); justify-content: space-between; }
  .acct-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
    background: var(--bg-card); border-top: 1px solid var(--border-hover);
    padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));
    gap: 0;
  }
  .acct-nav__link {
    flex: 1; display: grid; justify-items: center; gap: 2px; text-align: center; min-height: 56px;
    padding: var(--space-2) var(--space-1); border-radius: var(--radius); font-size: var(--text-sm);
  }
  .acct-nav__link[aria-current="page"] { background: none; }
  .acct-nav__icon { display: block; box-sizing: content-box; padding: 3px 16px; border-radius: var(--radius-pill); }
  .acct-nav__link[aria-current="page"] .acct-nav__icon { background: var(--bg-surface); }
  .acct-main { padding-bottom: 96px !important; }
}

/* ── Page frame ────────────────────────────────────────────── */
.acct-main { max-width: 1040px; margin: 0 auto; padding: var(--space-8) var(--space-5) var(--space-16); outline: none; }
@media (max-width: 640px) { .acct-main { padding: var(--space-5) var(--space-4) var(--space-12); } }

.acct-view > * + * { margin-top: var(--space-8); }
.page-head h1, .home-address h1, .detail-title {
  font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
}
.page-head p { color: var(--text-secondary); margin-top: var(--space-1); }
@media (max-width: 640px) { .page-head h1, .home-address h1, .detail-title { font-size: var(--text-2xl); } }

.eyebrow {
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-secondary);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.section-head h2 { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.section-head p { color: var(--text-secondary); font-size: var(--text-sm); }
.muted { color: var(--text-secondary); }
.small { font-size: var(--text-sm); }

.panel { background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius-lg); padding: var(--space-6); }
@media (max-width: 640px) { .panel { padding: var(--space-5); } }

/* ── States ────────────────────────────────────────────────── */
.acct-loading { color: var(--text-secondary); padding: var(--space-8) 0; }
.state { text-align: left; }
.state h2 { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); margin-bottom: var(--space-2); }
.state p { color: var(--text-secondary); max-width: 52ch; }
.state .actions { margin-top: var(--space-4); }
.state--error { border-color: rgba(192,69,58,0.25); }
.state__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); line-height: var(--leading-tight); margin-bottom: var(--space-3); outline: none; }
.state .muted + .muted { margin-top: var(--space-2); }
.acct-main--narrow { max-width: 560px; }
.acct-noscript { padding: var(--space-6); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold); font-size: var(--text-base); cursor: pointer;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
}
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn--primary { background: var(--cta-primary); color: #fff; }
.btn--primary:hover { background: var(--cta-primary-hover); }
.btn--secondary { background: var(--bg-card); border-color: var(--border-active); }
.btn--secondary:hover { background: var(--bg-elevated); }
.btn--quiet { background: none; border: 0; padding: 0 var(--space-2); color: var(--text-secondary); min-height: 32px; }
.btn--quiet:hover { color: var(--text); }
@media (max-width: 640px) { .btn { min-height: 44px; } }

.save-btn { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.save-btn[aria-pressed="true"] { background: var(--gold-subtle); border-color: var(--gold-dim); color: var(--gold-deep); }
.save-btn__icon { font-size: 15px; line-height: 1; }
@media (max-width: 640px) { .save-btn { min-height: 44px; } }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: var(--text-xs); font-weight: var(--weight-bold);
  letter-spacing: 0.04em; text-transform: uppercase; padding: 2px var(--space-2);
  border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text);
}
.badge--for-sale { background: var(--green-bg); color: var(--green); }
.badge--coming-soon { background: var(--blue-bg); color: var(--blue); }
.badge--under-contract { background: var(--orange-bg); color: var(--orange); }
.badge--sold, .badge--off-market { background: var(--bg-surface); color: var(--text); }

/* ── Search ────────────────────────────────────────────────── */
/* "Find a home": the filters and the person's saved searches — never homes
   (those are in Discover). Side by side on wide screens, stacked on phones. */
.search-layout {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); column-gap: var(--space-8);
  grid-template-areas: "form saved"; align-items: start;
}
.search-layout__form { grid-area: form; }
.search-layout__saved { grid-area: saved; min-width: 0; }
.search-layout__saved .saved-searches { margin-top: 0; }
.search-save { margin-top: var(--space-4); }
@media (max-width: 860px) {
  .search-layout { grid-template-columns: 1fr; grid-template-areas: "form" "saved"; row-gap: var(--space-6); }
}
.search-form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); }
.field label, .field legend { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.field input, .field select {
  min-height: 40px; width: 100%; padding: 0 var(--space-3);
  border: 1px solid var(--border-active); border-radius: var(--radius-sm); background: var(--bg-card);
}
@media (max-width: 640px) { .field input, .field select { min-height: 44px; font-size: 16px; } }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.field-pair input { min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.form-error { color: var(--red); font-size: var(--text-sm); }


/* Property cards (Search, Saved, Passed) live with the consumer primitives below. */
.saved-searches { margin-top: var(--space-6); }
.saved-searches h2 { margin-bottom: var(--space-1); }
.saved-searches li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.saved-searches li a { font-weight: var(--weight-semibold); font-size: var(--text-sm); text-decoration: none; }
.saved-searches li a:hover { text-decoration: underline; }
.save-search-form { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: flex-end; margin-top: var(--space-3); }
.save-search-form .field { flex: 1 1 220px; }

/* ── Toast ─────────────────────────────────────────────────── */
.acct-toast {
  position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%);
  background: var(--cta-primary); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--weight-semibold);
  z-index: var(--z-toast); opacity: 0; pointer-events: none;
}
.acct-toast.is-visible { opacity: 1; }
@media (max-width: 640px) { .acct-toast { bottom: 88px; } }

/* ════════════════════════════════════════════════════════════
   Consumer primitives — one calm visual language for My Home,
   Discover and Saved: generous space, one big thing at a time,
   serif for the figures that matter, few borders.
   ════════════════════════════════════════════════════════════ */
:root {
  --story-max: 720px;
  --sheet-radius: 26px;
  --lift: 0 1px 2px rgba(0,0,0,0.04), 0 14px 36px rgba(26,26,26,0.08);
  --lift-strong: 0 1px 2px rgba(0,0,0,0.05), 0 20px 44px rgba(26,26,26,0.13);
}

/* Headings receive focus programmatically on navigation (for screen readers); no ring. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
.home-section { scroll-margin-top: 80px; }

/* A story section: quiet label (h2) → headline → content. */
.story-page { max-width: var(--story-max); margin: 0 auto; display: grid; gap: var(--space-12); }
.story { display: grid; gap: var(--space-3); min-width: 0; }
.story__label {
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-secondary);
}
.story__headline {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(22px, 5.4vw, 30px);
  line-height: 1.22; letter-spacing: -0.01em; max-width: 32ch; text-wrap: balance;
}
.story__sub { color: var(--text-secondary); max-width: 62ch; }
@media (max-width: 640px) { .story-page { gap: var(--space-10); } }

/* Disclosure: a tappable row that opens more detail in place. */
.disclosure > summary { list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure__summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 48px; padding: 0 var(--space-5); cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-active); border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold); font-size: var(--text-sm);
}
.disclosure__summary::after { content: '▾'; font-size: 16px; line-height: 1; color: var(--text); transition: transform var(--duration-normal); }
.disclosure[open] > .disclosure__summary::after { transform: rotate(180deg); }
.disclosure__summary:hover { background: var(--bg-elevated); }
.disclosure__body { margin-top: var(--space-3); }
.explain .disclosure__body p { color: var(--text-secondary); font-size: var(--text-sm); max-width: 70ch; }

.more-btn { margin-top: var(--space-2); min-height: 44px; }
.btn--small { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-sm); }
@media (max-width: 640px) { .btn--small { min-height: 44px; } }

/* ── YOUR HOME: the estimate is the hero ───────────────────── */
.hero {
  background: var(--bg-card); border-radius: var(--sheet-radius); box-shadow: var(--lift);
  padding: var(--space-8); display: grid; gap: var(--space-1);
}
.hero .hero__title {
  font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
}
.facts-line { color: var(--text-secondary); }
.property-switch { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.property-switch select { min-height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-active); background: var(--bg-card); padding: 0 var(--space-2); }

.estimate { display: grid; gap: var(--space-2); margin-top: var(--space-6); }
.estimate__range {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 8.2vw, 50px);
  line-height: 1.05; letter-spacing: -0.02em;
}
.estimate__range--none { font-size: clamp(24px, 6vw, 32px); }
.estimate__label { color: var(--text-secondary); font-weight: var(--weight-semibold); }
.estimate__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--space-1); }
.estimate__actions { margin-top: var(--space-3); }
.see-why { min-height: 44px; }
.hero .disclaimer { margin-top: var(--space-4); }
.confidence { font-weight: var(--weight-bold); font-size: var(--text-sm); padding: 2px var(--space-3); border-radius: var(--radius-pill); }
.confidence--high { background: var(--green-bg); color: var(--green); }
.confidence--medium { background: var(--blue-bg); color: var(--blue); }
.confidence--low { background: var(--orange-bg); color: var(--orange); }
.confidence--none { background: var(--bg-surface); color: var(--text); }
/* The divider spans the whole card; the text keeps a readable ~70ch measure
   (the right padding absorbs whatever width is left over). */
.disclaimer { font-size: var(--text-sm); color: var(--text-secondary); border-top: 1px solid var(--border); padding-top: var(--space-3); padding-right: max(0px, calc(100% - 70ch)); }
@media (max-width: 640px) { .hero { padding: var(--space-6) var(--space-5); border-radius: 22px; } }

/* Value history lives in the hero, folded: a quiet row, not a second card. */
.value-history { margin-top: var(--space-2); }
.value-history > .disclosure__summary { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 0; }
.value-history > .disclosure__summary:hover { background: none; color: var(--text); }
.value-history__list { display: grid; gap: var(--space-2); margin-bottom: var(--space-2); }
.value-history__row { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--space-3); align-items: center; font-size: var(--text-sm); }
.value-history__date { color: var(--text-secondary); }
.value-history__track { height: 8px; background: var(--bg-elevated); border-radius: var(--radius-pill); overflow: hidden; }
.value-history__bar { display: block; height: 100%; background: var(--gold-dim); border-radius: var(--radius-pill); }
.value-history__range { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .value-history__row { grid-template-columns: 1fr auto; } .value-history__track { grid-column: 1 / -1; order: 3; } }

/* ── YOUR MARKET: three counts in one calm row ─────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border-hover); border-bottom: 1px solid var(--border-hover); margin: var(--space-2) 0 var(--space-3); }
.stat { padding: var(--space-4) var(--space-3) var(--space-4) 0; min-width: 0; }
.stat + .stat { padding-left: var(--space-4); border-left: 1px solid var(--border); }
.stat__value { font-family: var(--font-serif); font-size: 44px; line-height: 1; }
.stat__label { font-weight: var(--weight-bold); margin-top: var(--space-2); }
.stat__sub { font-size: var(--text-sm); color: var(--text-secondary); }
@media (max-width: 640px) {
  .stat { padding: var(--space-3) var(--space-2) var(--space-3) 0; }
  .stat + .stat { padding-left: var(--space-3); }
  .stat__value { font-size: 34px; }
  .stat__label { font-size: var(--text-sm); }
  .stat__sub { font-size: var(--text-xs); }
}

/* ── Rows (competition, activity, comps, history) ─────────── */
.rows { border: 1px solid var(--border-hover); border-radius: 18px; background: var(--bg-card); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); align-items: center;
  padding: var(--space-4) var(--space-5);
}
.row + .row { border-top: 1px solid var(--border); }
.row__main { min-width: 0; }
.row__title { font-weight: var(--weight-semibold); text-decoration: none; }
a.row__title:hover { text-decoration: underline; }
.row__sub { color: var(--text-secondary); font-size: var(--text-sm); }
.row__aside { text-align: right; display: grid; justify-items: end; gap: var(--space-1); }
.row__price { font-weight: var(--weight-bold); }
.row__aside--action { display: flex; align-items: center; gap: var(--space-3); }
.row__figures { display: grid; justify-items: end; }
.row__note { font-size: var(--text-sm); color: var(--text-secondary); }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; padding: var(--space-4); }
  .row__aside { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .row__aside--action { justify-content: space-between; }
  .row__figures { justify-items: start; }
}
.group-label { padding: var(--space-3) var(--space-5) 0; }
.activity__what { color: var(--text); }
.activity--price_reduced .activity__what, .activity--sold .activity__what { font-weight: var(--weight-semibold); }
/* A real nearby sale the current estimate did not use — quiet, not alarming. */
.activity__note { margin-top: 2px; font-size: var(--text-sm); font-style: italic; color: var(--text-secondary); }

/* ── YOUR POSITION: equity first, the form on request ──────── */
.position-hero { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-6); display: grid; gap: var(--space-1); }
.position-hero__label { font-weight: var(--weight-semibold); color: var(--text-secondary); }
.position-hero__value { font-family: var(--font-serif); font-weight: 500; font-size: clamp(30px, 8vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.position-hero__value.is-negative { color: var(--red); }
/* If you ever sold: secondary, and only from the homeowner's own assumption. */
.position-hero__sold { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); display: grid; gap: 2px; }
.position-hero__sold-label, .position-group {
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-secondary);
}
.position-hero__sold-value { color: var(--text-secondary); }
.position-hero__sold-value strong { color: var(--text); font-weight: var(--weight-semibold); }
.position-hero__sold-value.is-negative strong { color: var(--red); }
.position-group { margin-top: var(--space-3); }
.position__toggle { display: flex; }
.position__form { background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 22px; padding: var(--space-6); }
@media (max-width: 640px) { .position-hero, .position__form { padding: var(--space-5); } }
.position-form { display: grid; gap: var(--space-5); }
.field__hint { font-size: var(--text-sm); color: var(--text-secondary); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-left: 28px; }
.input-affix { position: absolute; color: var(--text-secondary); font-weight: var(--weight-semibold); pointer-events: none; }
.input-affix--prefix { left: 12px; }
.input-affix--suffix { right: 12px; }
.input-wrap:has(.input-affix--suffix) input { padding-left: var(--space-3); padding-right: 32px; }
.segmented { justify-self: start; display: inline-flex; background: var(--bg-elevated); border: 1px solid var(--border-active); border-radius: var(--radius-pill); padding: 3px; gap: 2px; margin-bottom: var(--space-2); }
.segmented__option { border: 0; background: none; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); cursor: pointer; min-height: 32px; }
.segmented__option:hover { background: var(--bg-surface); }
/* The chosen mode is unmistakable: filled like the primary button, not a faint lift. */
.segmented__option[aria-checked="true"], .segmented__option[aria-current="page"] { background: var(--cta-primary); color: #FFFFFF; }
.segmented__option:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.position-form__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.form-status { color: var(--text-secondary); }

.position-results dl { display: grid; gap: 0; border: 1px solid var(--border-hover); border-radius: 18px; overflow: hidden; }
.position-line { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-4); padding: var(--space-3) var(--space-4); background: var(--bg-card); }
.position-line + .position-line { border-top: 1px solid var(--border); }
.position-line dt { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.position-line dd { display: grid; justify-items: end; text-align: right; }
.position-line__value { font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.position-line__value.is-missing { font-weight: var(--weight-medium); color: var(--text-secondary); font-size: var(--text-sm); }
.position-line__value.is-negative { color: var(--red); }
.position-line__note { font-size: var(--text-xs); color: var(--text-secondary); max-width: 34ch; }
.position-line--total { background: var(--bg-warm); }
.position-line--total .position-line__value { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 500; }
.position-line--total .position-line__value.is-missing { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.position-warning { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--orange-bg); color: var(--text); font-size: var(--text-sm); }
@media (max-width: 640px) {
  .position-line { grid-template-columns: 1fr; }
  .position-line dd { justify-items: start; text-align: left; }
}

/* ── YOUR NEXT MOVE ────────────────────────────────────────── */
.next-move__links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.next-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 64px; padding: var(--space-4) var(--space-5); border-radius: 18px;
  background: var(--bg-card); border: 1px solid var(--border-hover); text-decoration: none;
  font-family: var(--font-serif); font-size: var(--text-xl);
}
.next-link::after { content: '→'; font-family: var(--font-sans); color: var(--text-secondary); }
.next-link:hover { border-color: var(--border-active); box-shadow: var(--shadow-hover); }
@media (max-width: 640px) { .next-move__links { grid-template-columns: 1fr; } .next-link { font-size: var(--text-lg); } }

/* ── Listing media: a designed placeholder until photos exist ── */
.listing-media {
  position: relative; display: grid; place-items: center; align-content: center; gap: var(--space-2);
  aspect-ratio: 16 / 11; color: rgba(26,26,26,0.36);
  background: linear-gradient(160deg, #EEEEEE 0%, #EEEEEE 55%, #EEEEEE 100%);
}
.listing-media__glyph { width: 60px; height: 60px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.listing-media__note { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.08em; text-transform: uppercase; }
.listing-media--hero { border-radius: var(--sheet-radius); aspect-ratio: 21 / 9; }
.listing-media--card { aspect-ratio: 16 / 10; gap: var(--space-1); }
.listing-media--card .listing-media__glyph { width: 42px; height: 42px; }
.listing-media--card .listing-media__note { font-size: 11px; }
@media (max-width: 640px) {
  .listing-media--hero { aspect-ratio: 16 / 10; border-radius: 22px; }
  .listing-media--card { aspect-ratio: 2 / 1; }
}

/* A status pill laid on a photo slot: on white, so it reads on any photo. */
.property-card__status, .detail-media__status {
  position: absolute; left: var(--space-3); top: var(--space-3);
  display: inline-flex; background: #FFFFFF; border-radius: var(--radius-pill); box-shadow: 0 1px 3px rgba(26,26,26,0.12);
}
.detail-media__status { left: var(--space-4); top: var(--space-4); }

/* ── Property card: one home, the same way in Search, Saved and Passed ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-5); }
.property-card {
  position: relative; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg-card); border-radius: 22px; overflow: hidden; box-shadow: var(--lift);
  transition: box-shadow var(--duration-normal);
}
.property-card:hover, .property-card:focus-within { box-shadow: var(--lift-strong); }
.property-card__media { position: relative; }
.property-card__body { display: grid; gap: 2px; padding: var(--space-4) var(--space-5) 0; align-content: start; min-width: 0; }
.property-card__price { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; }
.property-card__facts { font-weight: var(--weight-semibold); }
.property-card__title { justify-self: start; font-weight: var(--weight-semibold); text-decoration: none; margin-top: var(--space-1); }
/* The whole card opens the home; Save and the other controls sit above this layer. */
.property-card__title::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 22px; }
.property-card__title:hover { text-decoration: underline; }
.property-card__title:focus-visible { outline: none; }
.property-card__title:focus-visible::after { outline: 3px solid var(--gold); outline-offset: -3px; }
.property-card__place, .property-card__note { color: var(--text-secondary); font-size: var(--text-sm); }
.property-card__extra { position: relative; z-index: 2; margin-top: var(--space-3); }
.property-card__actions {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
}
@media (max-width: 640px) { .property-card__price { font-size: 26px; } }

/* Why it was kept (a saved card) — and what changed since a pass (a passed card). */
.card-reasons { display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.card-reasons__label { color: var(--text-secondary); }
.card-reasons__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.link-btn {
  justify-self: start; background: none; border: 0; padding: 0; min-height: 32px; cursor: pointer;
  font: inherit; font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--gold-deep); }
@media (max-width: 640px) { .link-btn { min-height: 40px; } }
.pass-context { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); font-size: var(--text-sm); }
.pass-context__then { color: var(--text-secondary); }
.pass-context__now { font-weight: var(--weight-semibold); }
.pass-context__first { color: var(--text-secondary); font-size: var(--text-xs); }
.pass-context__look { justify-self: start; margin-top: var(--space-1); font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--text); }

/* ── "What caught your eye?" — eight fixed, optional choices ── */
.reason-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.reason-chip {
  min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--border-active); background: var(--bg-card); color: var(--text);
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
}
.reason-chip:hover { background: var(--bg-elevated); }
.reason-chip[aria-pressed="true"] { background: var(--cta-primary); border-color: var(--cta-primary); color: #FFFFFF; }
.reason-chip[aria-pressed="true"]::before { content: '✓ '; }
.reason-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) { .reason-chip { min-height: 40px; } }

.reasons-tray {
  display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5);
  background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift-strong);
  animation: tray-in 0.22s ease-out;
}
.reasons-tray__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.reasons-tray__title { font-family: var(--font-serif); font-size: var(--text-xl); line-height: 1.2; }
.reasons-tray__sub { color: var(--text-secondary); font-size: var(--text-sm); }
.reasons-tray__action { flex: none; }
@keyframes tray-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── DISCOVER: one home at a time ──────────────────────────── */
.discover { max-width: 460px; margin: 0 auto; display: grid; gap: var(--space-4); }
.discover__head { display: grid; gap: var(--space-2); }
.browse-switch, .page-switch { justify-self: start; margin: 0; }
.browse-switch .segmented__option, .page-switch .segmented__option {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-5); text-decoration: none;
}
.discover__bar { display: flex; align-items: center; gap: var(--space-3); }
/* The feed in words, "Why these homes?", and Filters — one row under the switch. */
.discover__context { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 40px; }
.discover__context .discover__label { min-width: 0; }
.filters-btn { flex: none; }
@media (max-width: 640px) {
  /* Three ways through homes still fit one phone-width row. */
  .browse-switch { width: 100%; }
  .browse-switch .segmented__option { flex: 1 1 auto; justify-content: center; padding: 0 var(--space-2); gap: 6px; white-space: nowrap; }
}
.discover__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); margin-top: var(--space-2); }
@media (max-width: 640px) {
  /* Every pixel goes to the home and its buttons; the switch names the page. */
  .discover__title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .discover { gap: var(--space-3); }
}
.discover__label { color: var(--text-secondary); font-size: var(--text-sm); }
.discover__label .link-btn { min-height: 0; font-weight: var(--weight-semibold); color: var(--text); }
.discover__why { color: var(--text-secondary); font-size: var(--text-sm); max-width: 60ch; padding: var(--space-3) var(--space-4); background: var(--bg-elevated); border-radius: 14px; }

.filters-btn { min-height: 40px; padding: 0 var(--space-4); }
.filters-btn__icon { display: inline-flex; }
.filters-btn__glyph { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filters-btn__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--radius-pill); background: var(--cta-primary); color: #FFFFFF; font-size: var(--text-xs); font-weight: var(--weight-bold);
}

/* Up to three cards share one grid cell: the home to decide, and two waiting behind it. */
.discover__stack { display: grid; --drag: 0; }
.discover__stack > * { grid-area: 1 / 1; }
.home-card {
  position: relative; background: var(--bg-card); border-radius: var(--sheet-radius); overflow: hidden;
  box-shadow: var(--lift-strong); touch-action: pan-y; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.home-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.home-card.is-dragging { transition: none; cursor: grabbing; }
.home-card.is-leaving { transition: transform 0.32s ease-in; }
/* The next home leans in as the top one is dragged (--drag, 0…1), then steps forward. */
.home-card--behind { pointer-events: none; box-shadow: var(--lift); transition: transform 0.16s ease-out, opacity 0.16s ease-out; }
.home-card--behind-1 { transform: translateY(calc(12px - 12px * var(--drag))) scale(calc(0.96 + 0.04 * var(--drag))); opacity: calc(0.7 + 0.3 * var(--drag)); }
.home-card--behind-2 { transform: translateY(24px) scale(0.92); opacity: 0.35; }
.home-card--behind-1.is-entering { transform: translateY(24px) scale(0.92); opacity: 0.35; transition: none; }
.home-card--behind-2.is-entering { opacity: 0; transition: none; }
.home-card__body { padding: var(--space-5) var(--space-6) var(--space-6); display: grid; gap: var(--space-1); }
.home-card__status { margin-bottom: var(--space-1); }
.home-card__price { font-family: var(--font-serif); font-weight: 500; font-size: clamp(30px, 8.6vw, 38px); line-height: 1.08; letter-spacing: -0.01em; }
.home-card__facts { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.home-card__place { color: var(--text); }
.home-card__more { color: var(--text-secondary); font-size: var(--text-sm); }
.home-card__estimate-terms-short { display: none; } /* 12-05: shown on short phones only */
.home-card__details-short { display: none; } /* 12-05: the short form, shown on short phones only (navesta-discover-mobile.css) */
.home-card__details { justify-self: start; margin-top: var(--space-3); font-weight: var(--weight-semibold); font-size: var(--text-sm); min-height: 32px; display: inline-flex; align-items: center; }
/* SECOND LOOK: why a passed home is back — over the photo slot, calm and factual. */
.home-card__media { position: relative; }
.home-card--second-look .listing-media { align-content: start; padding-top: var(--space-5); }
.home-card--second-look .listing-media__glyph { width: 44px; height: 44px; }
.second-look-note {
  position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-3);
  display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: 14px;
  background: rgba(255,255,255,0.94); box-shadow: 0 2px 10px rgba(26,26,26,0.10); color: var(--text);
}
.second-look-note__eyebrow { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--gold-deep); }
.second-look-note__title { font-family: var(--font-serif); font-size: var(--text-xl); line-height: 1.2; }
.second-look-note__line { font-size: var(--text-sm); color: var(--text-secondary); }
@media (max-width: 640px) {
  .second-look-note { left: var(--space-2); right: var(--space-2); bottom: var(--space-2); padding: var(--space-2) var(--space-3); }
  .second-look-note__title { font-size: var(--text-lg); }
  .second-look-note__line { font-size: var(--text-xs); }
  .home-card--second-look .listing-media { padding-top: var(--space-3); gap: 2px; }
  .home-card--second-look .listing-media__glyph { width: 32px; height: 32px; }
}

/* Stamps fade in with the drag: SAVE as it moves right, PASS as it moves left. */
.home-card__stamp {
  position: absolute; top: var(--space-5); z-index: 2; pointer-events: none;
  padding: 4px var(--space-3); border: 3px solid currentColor; border-radius: 10px;
  background: rgba(255,255,255,0.9); font-size: 22px; font-weight: var(--weight-extrabold);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.home-card__stamp--save { left: var(--space-5); color: var(--green); transform: rotate(-12deg); opacity: var(--save-o, 0); }
.home-card__stamp--pass { right: var(--space-5); color: var(--text); transform: rotate(12deg); opacity: var(--pass-o, 0); }

/* The deck: card above Pass · Undo · Save on phones; Pass and Save flank the card on wide screens. */
.discover__deck {
  display: grid; grid-template-columns: 1fr 64px 1fr; grid-template-areas: "stack stack stack" "pass undo save";
  gap: var(--space-4) var(--space-5); align-items: center;
}
.discover__deck > .discover__stack { grid-area: stack; }
/* Wrappers that only matter on phones (see "Phones: one screen" below). */
.discover__screen, .discover__actions { display: contents; }
.discover__actions > .round-btn--pass { grid-area: pass; justify-self: end; }
.discover__actions > .round-btn--undo { grid-area: undo; justify-self: center; }
.discover__actions > .round-btn--save { grid-area: save; justify-self: start; }
@media (min-width: 900px) {
  .discover { max-width: 760px; }
  .discover__head, .discover__count, .discover__tray, .discover__keys { max-width: 460px; width: 100%; justify-self: center; }
  .discover__deck { grid-template-columns: 1fr minmax(0, 460px) 1fr; grid-template-areas: "pass stack save" ". undo ."; }
}
@media (max-width: 640px) { .discover__deck { row-gap: var(--space-3); } }
/* The whole card fits on screen: the photo slot gives way first. */
.home-card .listing-media { aspect-ratio: auto; height: clamp(160px, 32vh, 290px); }
@media (max-width: 640px) { .home-card .listing-media { height: auto; aspect-ratio: 16 / 9; } }
.round-btn { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; }
.round-btn__icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; line-height: 1; box-shadow: 0 6px 18px rgba(26,26,26,0.12);
  transition: transform var(--duration-fast);
}
.round-btn--pass .round-btn__icon { background: var(--bg-card); border: 1px solid var(--border-active); }
.round-btn--save .round-btn__icon { background: var(--cta-primary); color: #FFFFFF; }
.round-btn--undo .round-btn__icon { width: 48px; height: 48px; font-size: 20px; background: var(--bg-elevated); box-shadow: none; }
.round-btn--undo .round-btn__label { font-size: var(--text-xs); }
.round-btn:hover .round-btn__icon { transform: translateY(-1px); }
.round-btn:active .round-btn__icon { transform: scale(0.94); }
.round-btn__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.round-btn:focus-visible { outline: none; }
.round-btn:focus-visible .round-btn__icon { outline: 3px solid var(--gold); outline-offset: 3px; }
.discover__count { text-align: center; color: var(--text-secondary); font-size: var(--text-sm); }
/* A keyboard hint for keyboards (and only there). */
.discover__keys { display: none; text-align: center; color: var(--text-secondary); font-size: var(--text-xs); }
.discover__keys kbd { font: inherit; font-weight: var(--weight-bold); padding: 1px 6px; border: 1px solid var(--border-active); border-radius: 6px; background: var(--bg-card); }
.discover__keys-gap { display: inline-block; width: var(--space-4); }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { .discover__keys { display: block; } }

@media (min-width: 1200px) {
  /* Wide screens: a small panel in the free space at the bottom right — beside
     the deck, never over the card or its buttons. (641–1199px: it sits in the
     page under the deck and is scrolled just into view when it opens.) */
  .discover__tray:not(:empty) { position: fixed; right: var(--space-6); bottom: var(--space-6); width: 320px; z-index: var(--z-sticky); }
}
@media (max-width: 640px) {
  /* On phones the prompt rests just above Pass · Undo · Save — never over them:
     the home above stays swipeable, the buttons stay one tap, and so does Skip.
     With no home left to decide it rests on the tab bar. */
  .discover__tray:not(:empty) { position: fixed; left: var(--space-3); right: var(--space-3); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: var(--z-sticky); }
  .discover--deciding .discover__tray:not(:empty) { bottom: calc(var(--actions-bottom) + var(--actions-h) + var(--space-2)); }
  .reasons-tray { padding: var(--space-3) var(--space-4); box-shadow: 0 -2px 6px rgba(26,26,26,0.06), 0 18px 48px rgba(26,26,26,0.22); }
  .reasons-tray__title { font-size: var(--text-lg); }
}

/* ── Phones: one screen — the switch, the home, and its buttons ──
   The deck is sized from the viewport (100dvh, less the header, the page's top
   padding, the tab bar and the safe area). The photo slot takes the slack: it
   shrinks on short phones and grows on tall ones, so the buttons end just above
   the tab bar. When a home still cannot fit (the smallest phones, enlarged
   text, "Why these homes?" open) the buttons stay pinned above the tab bar and
   the rest of the card scrolls into view above them. */
@media (max-width: 640px) {
  .discover {
    --phone-header-h: 74px;          /* allows prominent employing broker in 320px header (measured 72.4px) */
    --phone-top: var(--space-5);     /* .acct-main's top padding on phones */
    --tabbar-h: 77px;                /* .acct-nav above the safe area (76.2px) */
    --actions-h: 90px;               /* a 64px button and its label */
    --actions-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-2));
    --media-min: 100px;              /* the photo slot at its smallest */
    --note-top: 68px;                /* room for "Photos not available" above a Second Look note */
  }
  .discover__tray:empty { display: none; }
  .discover--deciding .discover__screen {
    display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--space-3);
    min-height: calc(100vh - var(--phone-header-h) - var(--phone-top) - var(--actions-bottom));
    min-height: calc(100dvh - var(--phone-header-h) - var(--phone-top) - var(--actions-bottom));
  }
  .discover--deciding .discover__deck {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "stack" "actions"; align-items: stretch;
  }
  .discover--deciding .discover__stack > * { align-self: start; }
  .discover--deciding .discover__stack > .home-card { align-self: stretch; display: flex; flex-direction: column; }
  .discover--deciding .home-card__media { flex: 1 0 auto; display: grid; }
  .discover--deciding .home-card__media > * { grid-area: 1 / 1; }
  .discover--deciding .home-card .listing-media { height: auto; aspect-ratio: auto; min-height: var(--media-min); }
  .discover--deciding .second-look-note { position: relative; z-index: 1; align-self: end; margin: var(--note-top) var(--space-2) var(--space-2); inset: auto; }
  .discover--deciding .discover__actions {
    grid-area: actions; position: sticky; bottom: var(--actions-bottom); z-index: 2;
    display: grid; grid-template-columns: 1fr 64px 1fr; grid-template-areas: "pass undo save";
    column-gap: var(--space-5); align-items: center; min-height: var(--actions-h);
  }
  /* A shelf in the page colour, edge to edge: invisible under a card that fits;
     when the row is pinned over a long card, what is beneath reads as
     underneath (and is not tapped by accident) until it is scrolled into view. */
  .discover--deciding .discover__actions::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    /* 12px spill retains the soft shelf without a pseudo-element extending
       3px past the viewport at 320px (regular DOM rectangles cannot detect it). */
    inset: 0 calc(-1 * var(--space-3)); background: linear-gradient(to bottom, transparent, var(--bg) 18px);
  }
}
/* Short phones (most of them under 780px tall): the same screen with less air.
   Controls keep their size; the buttons stay 56px. */
@media (max-width: 640px) and (max-height: 780px) {
  .discover { margin-top: calc(var(--space-2) - var(--space-5)); --phone-top: var(--space-2); --actions-h: 80px; --media-min: 36px; --note-top: 30px; }
  .discover__head { gap: var(--space-1); }
  .discover__label { line-height: 1.35; }
  .discover--deciding .discover__screen, .discover--deciding .discover__deck { gap: var(--space-2); }
  .home-card__body { padding: var(--space-3) var(--space-5) var(--space-4); gap: 2px; }
  .home-card__status { margin-bottom: 0; }
  .home-card__facts { line-height: 1.35; }
  .home-card__place, .home-card__more { line-height: 1.4; }
  .home-card__details { margin-top: var(--space-1); }
  /* "Photos not available" on one line. */
  .home-card .listing-media { grid-auto-flow: column; justify-content: center; gap: var(--space-2); }
  .home-card .listing-media__glyph, .home-card--second-look .listing-media__glyph { width: 20px; height: 20px; }
  .home-card--second-look .listing-media { padding-top: var(--space-2); }
  .second-look-note { padding: 6px var(--space-3); }
  .second-look-note__eyebrow, .second-look-note__line { line-height: 1.4; }
  .round-btn { gap: 4px; }
  .round-btn__icon { width: 56px; height: 56px; font-size: 22px; }
  .round-btn--undo .round-btn__icon { width: 44px; height: 44px; font-size: 18px; }
  /* The prompt: one row of reasons that scrolls sideways on its own. */
  .discover__tray .reasons-tray { gap: var(--space-2); }
  .discover__tray .reason-chips { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); }
  .discover__tray .reason-chip { flex: none; }
}

.discover__empty { background: var(--bg-card); border-radius: var(--sheet-radius); box-shadow: var(--lift); padding: var(--space-10) var(--space-6); text-align: center; display: grid; gap: var(--space-2); justify-items: center; }
.discover__empty-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); text-wrap: balance; outline: none; }
.discover__empty .muted { max-width: 40ch; }
.discover__empty .actions { margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
@media (max-width: 640px) { .discover__empty { padding: var(--space-8) var(--space-5); } }

/* ── Quick filters: a sheet over Discover (bottom sheet on phones) ── */
.sheet {
  border: 0; padding: 0; width: min(560px, calc(100% - 32px)); max-height: min(86vh, 760px);
  border-radius: var(--sheet-radius); background: var(--bg-card); color: var(--text);
  box-shadow: 0 24px 64px rgba(26,26,26,0.24);
}
.sheet[open] { display: grid; }
.sheet::backdrop { background: rgba(26,26,26,0.38); }
.sheet__form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; max-height: inherit; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-3); }
.sheet__head h2 { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); }
.sheet__close { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--bg-elevated); cursor: pointer; font-size: 16px; }
.sheet__close:hover { background: var(--bg-surface); }
.sheet__body { overflow-y: auto; display: grid; gap: var(--space-5); align-content: start; padding: var(--space-2) var(--space-6) var(--space-5); }
.sheet__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); }
.sheet__full { margin-right: auto; font-weight: var(--weight-semibold); font-size: var(--text-sm); }
@media (max-width: 640px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 90vh; }
  .sheet__head, .sheet__body, .sheet__foot { padding-left: var(--space-5); padding-right: var(--space-5); }
  .sheet__foot { padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom)); }
}
.chip-field { border: 0; padding: 0; margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.chip-radio { position: relative; display: inline-flex; }
.chip-radio > input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; border: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); cursor: pointer; user-select: none;
  border-radius: var(--radius-pill); border: 1px solid var(--border-active); background: var(--bg-card);
}
.chip:hover { background: var(--bg-elevated); }
.chip-radio > input:checked + .chip { background: var(--cta-primary); border-color: var(--cta-primary); color: #FFFFFF; }
.chip-radio > input:focus-visible + .chip { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Search ─────────────────────────────────────────────────── */
.search-page { display: grid; gap: var(--space-6); }

/* ── Listing detail ────────────────────────────────────────── */
.back-link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); text-decoration: none; justify-self: start; }
.back-link:hover { color: var(--text); }
.detail-page { max-width: 820px; margin: 0 auto; display: grid; gap: var(--space-4); }
.detail { display: grid; gap: var(--space-6); }
.detail-media { position: relative; }
.detail-head { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; align-items: flex-start; }
.detail-head__main { display: grid; gap: var(--space-1); min-width: 0; }
.detail-price { font-family: var(--font-serif); font-weight: 500; font-size: clamp(32px, 9vw, 46px); line-height: 1.05; letter-spacing: -0.01em; }
.detail-price__note { color: var(--text-secondary); font-size: var(--text-sm); }
.detail-facts { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.detail .detail-title { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-xl); letter-spacing: 0; margin-top: var(--space-2); }
.detail-note { display: grid; gap: var(--space-3); justify-items: start; padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--blue-bg); font-size: var(--text-sm); }
.detail-section { display: grid; gap: var(--space-3); }
.detail-reasons { padding: var(--space-5); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift); gap: var(--space-2); }
.detail-reasons .reason-chips { margin-top: var(--space-2); }
.reasons-status { min-height: 1.5em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 18px; overflow: hidden; }
/* Right and bottom hairlines per cell; the container clips the outer edges. */
.facts > div { padding: var(--space-4); box-shadow: 1px 1px 0 var(--border); }
.facts dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-secondary); font-weight: var(--weight-bold); }
.facts dd { font-size: var(--text-md); font-weight: var(--weight-semibold); margin-top: var(--space-1); }

/* ── Saved · Passed ────────────────────────────────────────── */
.saved-page { display: grid; gap: var(--space-8); }
.saved-page__head { display: grid; gap: var(--space-2); }
.saved-page__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); margin-top: var(--space-2); }
.saved-section { display: grid; gap: var(--space-3); }
.saved-changes > p { margin: 0; }
/* What's changed: compact rows — where, what changed (before → now), when. No wide history table. */
.saved-changes__list { list-style: none; margin: 0; padding: 0; }
.saved-change { display: block; }
.saved-change .row__main { display: grid; gap: 2px; }
.saved-change p { margin: 0; }
.saved-change .row__title { overflow-wrap: anywhere; }
.saved-change__what { color: var(--text); }
.saved-change__what strong { font-weight: var(--weight-semibold); }
.saved-change__date { color: var(--text-muted); font-size: var(--text-sm); }
.saved-change__detail { color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* Navesta Changes: the overview page and Home's one module — compact rows, one column. */
.changes-page { display: grid; gap: var(--space-6); max-width: 720px; }
.changes-page > .page-head { margin-bottom: 0; }
.changes-section > p { margin: 0; }
.changes-section__action { justify-self: start; color: var(--text); font-weight: var(--weight-semibold); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.changes-section__action:hover { text-decoration: underline; }
.changes-nothing { display: grid; gap: var(--space-2); }
.changes-nothing p { margin: 0; }
.changes-nothing__title { font-weight: var(--weight-semibold); }
.hub-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.hub-changes__line { font-weight: var(--weight-semibold); color: var(--text); }
/* Together Shortlist: compact shared cards; reactions are three small toggles — never a button grid. */
.ts > p { margin: 0; }
.ts__cards .property-card__extra { display: grid; gap: var(--space-2); }
.ts-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ts-reactions__who { font-size: var(--text-sm); color: var(--text-secondary); margin-right: 2px; }
.ts-reaction { font: inherit; font-size: var(--text-sm); line-height: 1.2; padding: 6px 12px; min-height: 32px; border: 1px solid var(--border-hover); border-radius: 999px; background: var(--bg-card); color: var(--text); cursor: pointer; }
.ts-reaction[aria-pressed="true"] { background: var(--text); color: var(--bg-card); border-color: var(--text); }
.ts-reaction:disabled { opacity: 0.6; cursor: default; }
.ts-partner { margin: 0; font-size: var(--text-sm); color: var(--text); }
.ts-added { margin: 0; }
.ts-unavailable { list-style: none; border: 1px dashed var(--border-hover); border-radius: 18px; padding: var(--space-4); display: grid; gap: var(--space-2); background: var(--bg-card); }
.ts-unavailable > p { margin: 0; }
.ts-unavailable__text { color: var(--text-secondary); }
.ts-unavailable .property-card__actions { padding: 0; }
.ts-decide { flex-basis: 100%; display: grid; gap: var(--space-1); }
.segmented__count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text); font-size: var(--text-xs); font-weight: var(--weight-bold);
}
.segmented__option[aria-current="page"] .segmented__count { background: rgba(255,255,255,0.24); color: #FFFFFF; }
@media (max-width: 640px) { .saved-page { gap: var(--space-6); } .saved-page__title { font-size: var(--text-2xl); } }

/* ── HOME: the client's home base ──────────────────────────── */
/* A greeting, then two strong modules — Your home and Your home search —
   each a real way into the app, never a copy of it. */
.hub { max-width: var(--story-max); margin: 0 auto; display: grid; gap: var(--space-5); }
.hub__head { display: grid; gap: var(--space-1); }
.hub__title {
  font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
}
.hub-card { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-6); display: grid; gap: var(--space-2); min-width: 0; }
.hub-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.hub-card__head-link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); text-decoration: none; white-space: nowrap; position: relative; }
.hub-card__head-link::after { content: ''; position: absolute; inset: -12px -8px; }
.hub-card__head-link:hover { text-decoration: underline; }
.hub-card__label {
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-secondary);
}
.hub-card__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); line-height: 1.2; overflow-wrap: anywhere; }
.hub-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--text-secondary); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.hub-figure { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 7.5vw, 40px); line-height: 1.05; letter-spacing: -0.02em; margin-top: var(--space-2); }
.hub-stat { display: grid; gap: 2px; margin-top: var(--space-2); }
.hub-stat__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.hub-stat__value { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1.1; }
.hub-stat__value.is-negative { color: var(--red); }
.hub-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); margin-top: var(--space-3); }
.hub-card .disclaimer { margin-top: var(--space-1); }
/* Your home: equity on one line, then the ways into My Home. */
.home-value { display: grid; gap: var(--space-1); }
.home-equity { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border); margin-top: var(--space-1); }
.home-equity__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.home-equity strong { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); }
.home-equity strong.is-negative { color: var(--red); }
.home-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.home-tile {
  display: grid; align-content: start; gap: 2px; min-height: 56px; min-width: 0; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-hover); border-radius: 14px; background: var(--bg-elevated); color: var(--text); text-decoration: none;
}
.home-tile:hover { border-color: var(--border-active); box-shadow: var(--shadow-hover); }
.home-tile__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.25; }
.home-tile__desc { font-size: var(--text-xs); color: var(--text-secondary); line-height: 1.3; }
/* Your home search: one journey on a rail — each row opens the real place.
   Later stages continue the same list. */
.journey { list-style: none; display: grid; margin-top: var(--space-1); }
.journey__step { position: relative; padding: var(--space-1) 0 var(--space-2) var(--space-8); min-width: 0; }
.journey__step::before {
  content: ''; position: absolute; left: 6px; top: 14px; width: 12px; height: 12px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--border-active); background: var(--bg-card);
}
.journey__step--active::before { background: var(--text); border-color: var(--text); }
.journey__step:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 30px; bottom: -6px; width: 2px; background: var(--border); }
.journey__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-content: center; min-height: 44px; color: var(--text); text-decoration: none; }
.journey__link::after { content: '→'; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--text-secondary); }
.journey__link:hover .journey__name { text-decoration: underline; }
.journey__name { grid-column: 1; font-weight: var(--weight-semibold); }
.journey__fact { grid-column: 1; font-size: var(--text-sm); color: var(--text-secondary); overflow-wrap: anywhere; }
.journey__step:not(.journey__step--active) .journey__name { color: var(--text-secondary); }
.journey__sub, .journey__note a { display: inline-block; position: relative; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); text-decoration: none; }
.journey__sub { margin-top: 2px; }
.journey__sub::after, .journey__note a::after { content: ''; position: absolute; inset: -10px -6px; }
.journey__sub:hover, .journey__note a:hover { text-decoration: underline; }
.journey__note { font-size: var(--text-sm); color: var(--text-secondary); }
.journey-with {
  display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: 14px;
  background: var(--bg-elevated); color: var(--text); text-decoration: none; margin-top: var(--space-1);
}
.journey-with__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.journey-with__text { font-weight: var(--weight-semibold); }
.journey-with:hover .journey-with__text { text-decoration: underline; }
.journey__quiet { font-size: var(--text-sm); color: var(--text-secondary); }
.journey__quiet a { color: var(--text); font-weight: var(--weight-semibold); text-decoration: none; position: relative; white-space: nowrap; }
.journey__quiet a::after { content: ''; position: absolute; inset: -12px -8px; }
.journey__quiet a:hover { text-decoration: underline; }
/* Your next move: what you have beside what you're looking at — never joined. */
.hub-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-1); }
.hub-pair__side { display: grid; gap: var(--space-1); align-content: start; min-width: 0; }
.hub-pair__text { font-family: var(--font-serif); font-size: var(--text-xl); line-height: 1.2; margin-top: var(--space-2); }
/* Your plans: compact rows inside the card — one way back into each. */
.hub-plans { list-style: none; margin: 0; padding: 0; }
.hub-plans .row { padding: var(--space-3) 0; }
.hub-plans .row + .row { border-top: 1px solid var(--border); }
.hub-plan__kind { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.hub-plans__note { color: var(--text-secondary); font-size: var(--text-sm); }
.hub-plans__more { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: var(--text-sm); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.hub-plans__more-link { color: var(--text); font-weight: var(--weight-semibold); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.hub-plans__more-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .hub-plans .row { padding: var(--space-3) 0; } .hub-plans .row__aside--action { justify-content: flex-start; } }
/* Your markets / Saved markets: the same compact rows. */
.hub-market__figures { display: flex; flex-wrap: wrap; column-gap: var(--space-1); }
.hub-market__figure strong { color: var(--text); font-weight: var(--weight-semibold); }
.hub-market .row__title { color: var(--text); text-decoration: none; }
.hub-market a.row__title:hover { text-decoration: underline; }
.saved-markets { max-width: var(--story-max, 760px); margin: 0 auto; display: grid; gap: var(--space-4); }
.saved-markets__list .row { padding: var(--space-4) var(--space-5); }
@media (max-width: 640px) { .saved-markets__list .row { padding: var(--space-4); } }
/* Phones: one figure per line — no separator left hanging at the start of a line. */
@media (max-width: 480px) { .hub-market__figures { flex-direction: column; } .hub-market__sep { display: none; } }
/* Market Changes — compact "then → now" rows inside a saved market; never a wide table.
   Each figure: its name on one line, then → now and its direction word on the next. */
.hub-market__changes a { color: var(--text-secondary); }
.market-changes__toggle { justify-self: start; margin-top: var(--space-2); padding-left: 0; }
.market-changes__toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.market-changes__toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.market-changes { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-warm); display: grid; gap: var(--space-2); }
.market-changes p { margin: 0; }
.market-changes__title { font-weight: var(--weight-semibold); color: var(--text); }
.market-changes__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.market-changes__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: 2px; align-items: baseline; }
.market-changes__label { grid-column: 1 / -1; color: var(--text-muted); }
.market-changes__values { color: var(--text); font-variant-numeric: tabular-nums; }
.market-changes__values strong { font-weight: var(--weight-semibold); }
.market-changes__direction { color: var(--text-muted); font-size: var(--text-sm); text-align: right; }
.market-changes__note { grid-column: 1 / -1; }
.market-changes__method { border-top: 1px solid var(--border); padding-top: var(--space-2); }
@media (prefers-reduced-motion: reduce) { .market-changes__toggle::after { transition: none; } }
@media (max-width: 480px) { .market-changes { padding: var(--space-3); } }
/* One quiet line — never a card, never a push. */
.hub-quiet { color: var(--text-secondary); font-size: var(--text-sm); padding: 0 var(--space-2); }
.hub-quiet a { color: var(--text); font-weight: var(--weight-semibold); text-decoration: none; position: relative; white-space: nowrap; }
.hub-quiet a::after { content: ''; position: absolute; inset: -12px -8px; }
.hub-quiet a:hover { text-decoration: underline; }
.hub-doors { display: grid; gap: var(--space-4); }
.hub-door__q { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); }
.hub__foot { padding: var(--space-1) var(--space-2) 0; }
@media (max-width: 640px) {
  .hub { gap: var(--space-4); }
  .hub__title { font-size: var(--text-2xl); }
  .hub-card { padding: var(--space-5); }
}
@media (max-width: 640px) {
  .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-tile:last-child { grid-column: span 2; } /* five tiles fill two rows */
}
@media (max-width: 480px) { .hub-pair { grid-template-columns: 1fr; gap: var(--space-3); } }
/* Narrow phones: the tiles keep their names; the short descriptions go. */
@media (max-width: 360px) {
  .home-tile { min-height: 44px; align-content: center; padding: var(--space-2); }
  .home-tile__desc { display: none; }
}
/* The shortest phones (568px tall): the lead card's figure and its action
   stay above the tab bar without scrolling. */
@media (max-width: 640px) and (max-height: 700px) {
  .hub { gap: var(--space-3); }
  .hub__title { font-size: var(--text-xl); }
  .hub-card { padding: var(--space-4) var(--space-5); gap: 6px; }
  .hub-figure { font-size: 28px; margin-top: var(--space-1); }
  .hub-stat { margin-top: var(--space-1); }
  .hub-stat__value { font-size: var(--text-xl); }
  .hub-card__actions { margin-top: var(--space-2); }
  .journey__step { padding-bottom: var(--space-1); }
}
/* My Home: the owned home, one step inside Home. */
.my-home { max-width: var(--story-max); margin: 0 auto; display: grid; gap: var(--space-4); }

/* ── Loading: calm skeletons, only when a wait is noticeable ── */
.skeleton { animation: fade-in 0.2s ease-out; }
.skeleton__bone, .skeleton__media {
  display: block; border-radius: 10px;
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-surface) 50%, var(--bg-elevated) 100%);
  background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton__bone { height: 14px; width: 60%; }
.skeleton__bone--price { height: 28px; width: 45%; }
.skeleton__bone--title { height: 30px; width: 70%; }
.skeleton__bone--wide { width: 85%; }
.skeleton__bone--short { width: 25%; }
.skeleton__media { aspect-ratio: 16 / 10; border-radius: 0; }
.skeleton__media--hero { aspect-ratio: 21 / 9; border-radius: var(--sheet-radius); }
.skeleton-card { background: var(--bg-card); border-radius: 22px; overflow: hidden; box-shadow: var(--lift); }
.skeleton-card__body { display: grid; gap: var(--space-3); padding: var(--space-5); }
.skeleton--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-5); }
.skeleton--discover { max-width: 460px; margin: 0 auto; }
.skeleton--discover .skeleton-card { border-radius: var(--sheet-radius); }
.skeleton--discover .skeleton__media { aspect-ratio: 16 / 9; }
.skeleton--detail { display: grid; gap: var(--space-4); max-width: 820px; margin: 0 auto; }
.skeleton--hub { display: grid; gap: var(--space-4); max-width: var(--story-max); margin: 0 auto; }
.skeleton-hub-card { display: grid; gap: var(--space-3); padding: var(--space-6); background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); }
.skeleton-hero { display: grid; gap: var(--space-4); max-width: var(--story-max); margin: 0 auto; padding: var(--space-8); background: var(--bg-card); border-radius: var(--sheet-radius); box-shadow: var(--lift); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Motion: honour the system setting ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home-card, .home-card.is-leaving, .home-card--behind, .round-btn__icon, .disclosure__summary::after, .property-card { transition: none !important; }
  .home-card--behind-1, .home-card--behind-1.is-entering { transform: translateY(12px) scale(0.96); opacity: 0.7; }
  .home-card--behind-2, .home-card--behind-2.is-entering { transform: translateY(24px) scale(0.92); opacity: 0.35; }
  .reasons-tray, .skeleton, .skeleton__bone, .skeleton__media { animation: none; }
}

/* ── TOGETHER — a Shared Search for two people buying together ── */
/* A partner's shared save, on a Discover card: in the status row, no extra height. */
.home-card__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.partner-note, .shared-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--space-2); border-radius: var(--radius-pill);
  background: var(--bg-elevated); background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold-deep); font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: 1.6;
}
.shared-chip { justify-self: start; margin: 0; }
.shared-when { font-size: var(--text-xs); color: var(--text-secondary); }

.together-page { max-width: 640px; margin: 0 auto; display: grid; gap: var(--space-6); }
.together-hero {
  background: var(--bg-card); border-radius: var(--sheet-radius); box-shadow: var(--lift);
  padding: var(--space-8) var(--space-6); display: grid; gap: var(--space-3); justify-items: start;
}
.together__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); outline: none; }
.together__lede { color: var(--text-secondary); max-width: 46ch; }
.together__promises { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-secondary); }
.together__promises li::before { content: '✓'; color: var(--gold-deep); font-weight: var(--weight-bold); margin-right: var(--space-2); }
.together-hero__mark { position: relative; width: 60px; height: 38px; }
.together-hero__heart { position: absolute; top: 0; left: 0; width: 38px; height: 38px; fill: none; stroke: var(--gold-deep); stroke-width: 1.7; }
.together-hero__heart--b { left: 22px; }
.together-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); width: 100%; margin-top: var(--space-2); }
.together-count {
  display: grid; gap: 2px; align-content: start; padding: var(--space-3) var(--space-4); border-radius: 16px;
  background: var(--bg-elevated); color: var(--text); text-decoration: none; min-height: 44px;
}
.together-count:first-child { background: color-mix(in srgb, var(--gold) 14%, var(--bg-card)); }
.together-count__n { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1.1; }
.together-count__label { font-size: var(--text-sm); color: var(--text-secondary); }
.together-criteria {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift);
}
.together-criteria__main { display: grid; gap: 2px; min-width: 0; }
.together-criteria__summary { font-weight: var(--weight-semibold); }
.together__aside { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.together__leave { color: var(--text-secondary); font-size: var(--text-sm); }
.invite-link { display: flex; gap: var(--space-2); width: 100%; margin-top: var(--space-2); }
.invite-link__input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 var(--space-3); font: inherit; font-size: var(--text-sm);
  color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border-active); border-radius: 12px;
}
.together-section__n {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px;
  border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text); font-size: var(--text-xs);
}
.together-section__empty { font-size: var(--text-sm); }
.together-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated);
}
.together-note--both { background: color-mix(in srgb, var(--gold) 14%, var(--bg-card)); }
.together-note__line { font-weight: var(--weight-semibold); }
.together-note__heart { color: var(--gold-deep); }
@media (max-width: 640px) {
  .together-hero { padding: var(--space-6) var(--space-5); }
  .together__title { font-size: var(--text-2xl); }
  .invite-link { flex-direction: column; }
  .together-counts { gap: var(--space-2); }
  .together-count { padding: var(--space-3); }
  .together-count__label { font-size: var(--text-xs); }
  .together-criteria { padding: var(--space-4) var(--space-5); }
}

/* BOTH SAVED — two outline hearts become one (~400ms), then the home. */
.both-saved { width: min(420px, calc(100% - 32px)); }
.both-saved__body { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; }
.both-saved__hearts { position: relative; width: 100px; height: 64px; margin-bottom: var(--space-2); }
.both-saved__heart { position: absolute; top: 2px; width: 60px; height: 60px; }
.both-saved__heart--a, .both-saved__heart--b { fill: none; stroke: var(--gold-deep); stroke-width: 1.5; }
.both-saved__heart--a { left: 0; animation: both-saved-a 0.4s ease-in forwards; }
.both-saved__heart--b { right: 0; animation: both-saved-b 0.4s ease-in forwards; }
.both-saved__heart--one { left: 20px; fill: var(--gold-deep); opacity: 0; animation: both-saved-one 0.18s ease-out 0.3s forwards; }
@keyframes both-saved-a { to { transform: translateX(20px); opacity: 0; } }
@keyframes both-saved-b { to { transform: translateX(-20px); opacity: 0; } }
@keyframes both-saved-one { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
.both-saved__eyebrow { text-transform: uppercase; letter-spacing: var(--tracking-wider); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--gold-deep); }
.both-saved__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); line-height: 1.2; text-wrap: balance; }
.both-saved__home { color: var(--text-secondary); }
.both-saved__actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.confirm-sheet__body { display: grid; gap: var(--space-3); padding: var(--space-6); }
.confirm-sheet__body h2 { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); }
@media (max-width: 640px) {
  .both-saved { width: 100%; }
  .both-saved__body, .confirm-sheet__body { padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); }
  .both-saved__actions { width: 100%; }
  .both-saved__actions > * { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .both-saved__heart--a, .both-saved__heart--b { animation: none; opacity: 0; }
  .both-saved__heart--one { animation: none; opacity: 1; }
}
/* Shared on purpose, outside the shared filters: an explanation, not a warning. */
.outside-note { display: inline-flex; align-items: center; justify-self: start; margin: 0; color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.6; }

/* ── REQUEST A TOUR — a request, never a booking ─────────────── */
.field textarea {
  width: 100%; min-height: 88px; padding: var(--space-2) var(--space-3); font: inherit; resize: vertical;
  border: 1px solid var(--border-active); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text);
}
@media (max-width: 640px) { .field textarea { font-size: 16px; } }
.tour-panel {
  display: grid; gap: var(--space-2); justify-items: start;
  padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift);
}
.tour-panel__status { outline: none; }
.tour-panel__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.tour-panel__contract { font-size: var(--text-sm); color: var(--text-secondary); max-width: 52ch; }
.tour-sheet__titles { display: grid; gap: 2px; min-width: 0; }
.tour-sheet__titles h2 { overflow-wrap: anywhere; }
.tour-sheet__eyebrow {
  display: block; text-transform: uppercase; letter-spacing: var(--tracking-wider);
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text-secondary);
}
.tour-sheet__when { display: grid; gap: var(--space-1); }
.tour-sheet .sheet__foot { justify-content: flex-end; }
.tour-panel__lede { font-size: var(--text-sm); color: var(--text-secondary); }
.tour-sheet__help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }
.tour-sheet__count { font-variant-numeric: tabular-nums; }
.tour-confirm { display: grid; gap: var(--space-3); padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; justify-items: center; }
.tour-confirm__title { display: grid; gap: var(--space-2); outline: none; }
.tour-confirm__line { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); line-height: 1.2; text-wrap: balance; }
.tour-confirm__preferred { font-weight: var(--weight-semibold); }
.tour-confirm__actions { margin-top: var(--space-2); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.both-saved__tour { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.tour-chip { font-size: var(--text-xs); color: var(--text-secondary); }
@media (max-width: 640px) {
  .tour-panel { padding: var(--space-4); }
  .tour-confirm { padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); }
  .tour-confirm__actions { width: 100%; }
  .tour-confirm__actions > * { flex: 1; }
  /* Three choices on the Both Saved panel: Request a tour on its own row. */
  .both-saved__actions--tour > :first-child { flex-basis: 100%; }
}
/* The agent's view of a tour request (local /dev/agent page). The note is literal text. */
.tour-detail { display: grid; gap: var(--space-2); margin: var(--space-2) 0; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--gold); background: var(--bg-elevated); border-radius: 0 12px 12px 0; }
.tour-detail__headline { font-weight: var(--weight-semibold); }
.tour-detail__facts { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tour-detail__facts dd { font-size: var(--text-base); overflow-wrap: anywhere; }
.tour-detail__facts > .tour-detail__wide { grid-column: 1 / -1; }
.tour-detail__note { white-space: pre-wrap; font-weight: var(--weight-regular, 400); }

/* ── Buyer Journey 1.0 polish ─────────────────────────────── */
/* "What your agent sees": one small disclosure, reused where it belongs. */
.agent-sees { font-size: var(--text-sm); color: var(--text-secondary); }
.agent-sees__summary {
  display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; list-style: none;
  font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 3px;
}
.agent-sees__summary::-webkit-details-marker { display: none; }
.agent-sees__body { display: grid; gap: var(--space-2); margin-top: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); max-width: 62ch; }
/* Standalone text actions: a comfortable hit area, same text, same layout. */
.back-link, .pass-context__look, .discover__label .link-btn { position: relative; }
.back-link::after, .pass-context__look::after, .discover__label .link-btn::after { content: ''; position: absolute; inset: -8px -6px; }
/* A home's page on short or narrow phones: Request a tour within easy reach —
   a shorter photo slot, and Save beside the price rather than below it. */
@media (max-width: 640px) {
  .detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: var(--space-1); align-items: start; }
  .detail-head__main { display: contents; }
  .detail-head__main > * { grid-column: 1 / -1; }
  .detail-head__main > .detail-price { grid-column: 1; grid-row: 1; }
  .detail-head__action { grid-column: 2; grid-row: 1; align-self: center; }
}
@media (max-width: 640px) and (max-height: 700px), (max-width: 360px) {
  .listing-media--hero { aspect-ratio: 5 / 2; }
  .detail { gap: var(--space-4); }
  .detail-home { gap: var(--space-3); }
  .detail-home .detail-head__main { row-gap: 2px; }
}
/* Second Look on the shortest phones (568px tall): the reason sits over the
   photo slot instead of under its label, so the whole card fits above
   Pass again / Save — nothing is hidden behind the buttons. */
@media (max-width: 640px) and (max-height: 600px) {
  .discover--second-look { --note-top: 0px; }
  .discover--second-look .home-card .listing-media > * { visibility: hidden; } /* the reason covers the placeholder's label */
  .discover--second-look .second-look-note__eyebrow { display: none; }
  .discover--second-look .second-look-note__title { font-size: var(--text-base); }
  .discover--second-look .home-card__body { padding-bottom: var(--space-2); }
  .discover--second-look .home-card__details { margin-top: 0; }
}

/* ── Buying Power 1.0: Your plan, Your fit ────────────────── */
/* Neutral throughout: a figure and where it comes from, never a verdict —
   no green "can afford" or red "too expensive". */
.hub-door__link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
/* Where a figure comes from: a small badge beside it. */
.prov {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.02em; line-height: 1.6; white-space: normal;
  vertical-align: middle; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border);
}
.prov--user_entered { background: var(--bg-card); border-color: var(--border-active); color: var(--text); }
.prov--navesta_estimate, .prov--estimate { background: var(--gold-subtle); border-color: var(--gold-dim); color: var(--gold-deep); }
.prov--expired { background: var(--bg-surface); color: var(--text); }
/* One explainer, opened in place. */
.learn { font-size: var(--text-sm); }
.learn > summary { list-style: none; }
.learn > summary::-webkit-details-marker { display: none; }
.learn__summary {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; cursor: pointer;
  font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 3px;
}
.learn__summary::before { content: 'i'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-active); font-size: 11px; font-weight: var(--weight-bold); font-style: italic; text-decoration: none; }
.learn__body { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); max-width: 62ch; color: var(--text); }
.learn__title { font-weight: var(--weight-bold); }
.learn__foot { color: var(--text-secondary); font-size: var(--text-xs); }

.plan { max-width: var(--story-max); margin: 0 auto; display: grid; gap: var(--space-5); }
.plan__head { display: grid; gap: var(--space-1); }
.plan__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); outline: none; }
.plan-card { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-6); display: grid; gap: var(--space-3); min-width: 0; }
.plan-card__label { outline: none; font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.plan-card .field { max-width: 360px; }
.plan-card .input-wrap input { padding-left: var(--space-3); }
.plan-card .input-wrap:has(.input-affix--prefix:not([hidden])) input { padding-left: 28px; }
.plan-card .input-wrap:has(.input-affix--suffix:not([hidden])) input { padding-right: 52px; }
.plan-card .field select { width: 100%; }
.plan-preapproval { display: grid; gap: var(--space-1); }
.plan-figure { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 7.5vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.plan-figure--sm { font-size: clamp(24px, 6vw, 32px); }
.plan-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.plan-form { display: grid; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.plan-form[hidden] { display: none; }
.plan-history__list { display: grid; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-secondary); padding-left: var(--space-4); }
.plan-at-target { display: grid; gap: 2px; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.plan-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.plan-chips .chip { font: inherit; font-weight: var(--weight-semibold); color: var(--text); min-height: 44px; }
.plan-chips .chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.plan-result:empty { display: none; }
.plan-assumptions { display: block; }
.plan-assumptions > summary { list-style: none; }
.plan-assumptions > summary::-webkit-details-marker { display: none; }
.plan-assumptions__summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer;
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary);
}
.plan-assumptions__summary::after { content: '▾'; font-size: 16px; color: var(--text); transition: transform var(--duration-normal); }
.plan-assumptions[open] > .plan-assumptions__summary::after { transform: rotate(180deg); }
.plan-assumptions__body { display: grid; gap: var(--space-4); margin-top: var(--space-3); }
.plan__private { text-align: center; }

/* One price's answer. */
.fit { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); min-width: 0; }
.fit__price { font-weight: var(--weight-bold); }
.fit__preapproval { font-weight: var(--weight-semibold); }
.fit__expired { font-weight: var(--weight-regular); color: var(--text-secondary); }
.fit__needs { color: var(--text); background: var(--bg-elevated); border-radius: 12px; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.fit__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.fit__figure { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 7.5vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.fit__per { font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-secondary); margin-left: 2px; letter-spacing: 0; }
.fit__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.fit-compare { display: grid; gap: 2px; font-size: var(--text-sm); }
.fit-compare__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fit-compare dt { color: var(--text-secondary); min-width: 7.5em; }
.fit-compare__note { color: var(--text-secondary); }
.fit__missing { font-size: var(--text-sm); color: var(--text-secondary); }
.fit-breakdown, .fit-cash, .fit-scenarios { display: grid; gap: var(--space-2); margin-top: var(--space-2); min-width: 0; }
.fit-rows { list-style: none; border: 1px solid var(--border-hover); border-radius: 16px; overflow: hidden; }
.fit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); background: var(--bg-card); }
.fit-row + .fit-row { border-top: 1px solid var(--border); }
.fit-row--planned { background: var(--bg-elevated); }
.fit-row__label { display: grid; gap: 2px; font-weight: var(--weight-semibold); min-width: 0; overflow-wrap: anywhere; }
.fit-row__note { font-size: var(--text-xs); font-weight: var(--weight-regular); color: var(--text-secondary); }
.fit-row__value { display: grid; justify-items: end; gap: 2px; font-weight: var(--weight-semibold); text-align: right; }
.fit-loan { font-size: var(--text-sm); color: var(--text-secondary); overflow-wrap: anywhere; }
.fit-cash__figure { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1.15; overflow-wrap: anywhere; }
.fit-scenarios__title { font-size: var(--text-base); font-weight: var(--weight-bold); }
.fit-panel {
  display: grid; gap: var(--space-2); justify-items: start; min-width: 0;
  padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift);
}
.fit-panel > * { max-width: 100%; }
.fit-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); width: 100%; }
.fit-panel__link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.fit-panel__more { width: 100%; }
@media (max-width: 640px) {
  .plan-card { padding: var(--space-5) var(--space-4); }
  .plan-card .field { max-width: none; }
  .plan__title { font-size: var(--text-2xl); }
  .fit-row { padding: var(--space-3); }
  /* A focused field or button, or a result brought into view, clears the tab bar. */
  html:has(.plan) { scroll-padding-bottom: calc(77px + env(safe-area-inset-bottom) + var(--space-4)); }
}
/* Preapproval: what the letter states (purchase price and/or loan amount). */
.plan-basis { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.plan-card fieldset.plan-form__amounts { display: grid; gap: var(--space-3); max-width: 360px; }
@media (max-width: 640px) { .plan-card fieldset.plan-form__amounts { max-width: none; } }
/* Loan program assumptions (Navesta's versioned method): rate, assumes, limits. */
.fit-assume { min-width: 0; }
.assume-list { list-style: none; display: grid; gap: var(--space-3); }
.assume { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.assume__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.assume__rate { font-size: var(--text-sm); }
.assume__note { font-size: var(--text-sm); color: var(--text-secondary); }
.fit-compare--cash { margin-top: var(--space-1); }
.assume__source { font-size: var(--text-xs); color: var(--text-secondary); }
.prov--program_assumption { background: var(--bg-card); border-color: var(--border-active); color: var(--text); }
.fit-panel__basis { font-size: var(--text-sm); }

/* ── Home decision page 1.0 ───────────────────────────────── */
/* HOME → YOUR FIT → COST → YOUR DECISION → details and history. */
.detail-home { display: grid; gap: var(--space-4); min-width: 0; }
.cost-panel {
  display: grid; gap: var(--space-2); min-width: 0;
  padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift);
}
.cost-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-4) 0; font-weight: var(--weight-semibold); }
.cost-total strong { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 500; }
.fit-cash-summary { margin-top: var(--space-1); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.fit-cash-summary dt { min-width: 11em; }
.fit-cash-summary dd { overflow-wrap: anywhere; }
.fit-assumptions__body { display: grid; gap: var(--space-2); }
.decision { display: grid; gap: var(--space-3); min-width: 0; }
.decision__state { font-weight: var(--weight-semibold); }
.decision__tour { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); font-size: var(--text-sm); }
.decision__tour[hidden] { display: none; }
@media (max-width: 640px) {
  /* A control brought into view (keyboard focus, a jump link) clears the tab bar. */
  html:has(.detail-page) { scroll-padding-bottom: calc(77px + env(safe-area-inset-bottom) + var(--space-4)); }
  .cost-panel { padding: var(--space-4); }
  .fit-cash-summary dt { min-width: 0; flex-basis: 100%; }
}

/* ── IDX Presentation 1.0 ─────────────────────────────────── */
/* Listing photos fill the same slot the placeholder used — same size at every
   breakpoint, so nothing below moves (Request a tour, Pass / Save). */
.listing-media--photo { padding: 0; background: #EEEEEE; overflow: hidden; }
.listing-media__img, .gallery__slide img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none;
}
.listing-media--hero.listing-media--photo { border-radius: var(--sheet-radius); }
.home-card .listing-media__img { pointer-events: none; }

/* A home's photos: a swipeable strip with Previous / Next and "2 / 8". One
   photo shows none of this. */
.gallery { position: relative; aspect-ratio: 21 / 9; border-radius: var(--sheet-radius); overflow: hidden; background: #EEEEEE; }
.gallery__track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.gallery__slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: start; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,0.94); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 4px rgba(26,26,26,0.18);
}
.gallery__nav--prev { left: var(--space-3); }
.gallery__nav--next { right: var(--space-3); }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }
.gallery__nav:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery__count {
  position: absolute; right: var(--space-3); bottom: var(--space-3); z-index: 1;
  padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(26,26,26,0.72); color: #FFFFFF;
  font-size: var(--text-sm); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .gallery { aspect-ratio: 16 / 10; border-radius: 22px; }
  .gallery__nav { width: 36px; height: 36px; font-size: 22px; }
}
@media (max-width: 640px) and (max-height: 700px), (max-width: 360px) {
  .gallery { aspect-ratio: 5 / 2; }
}

/* The Realcomp approved logo and icon: the configured image, or a labelled
   placeholder slot until Realcomp supplies it — never a stand-in drawing. */
.idx-slot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px dashed rgba(26,26,26,0.38); border-radius: 6px; color: var(--text-secondary);
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(26,26,26,0.035) 6px 12px);
}
.idx-slot--logo { min-width: 150px; height: 36px; padding: 0 var(--space-3); }
.idx-slot--icon { height: 20px; padding: 0 6px; }
.idx-mark--logo { height: 36px; width: auto; }
.idx-mark--icon { height: 20px; width: auto; flex: none; }
/* The IDX mark, as the listing data says it. */
.idx-text {
  display: inline-block; padding: 0 5px; border: 1.5px solid var(--text); border-radius: 4px;
  font-size: var(--text-sm); font-weight: var(--weight-extrabold); letter-spacing: 0.08em; line-height: 18px; color: var(--text);
}

/* A card's listing source: one quiet, readable line — never truncated. */
.listing-source {
  margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border);
  font-size: var(--text-sm); line-height: 1.45; color: var(--text-secondary); overflow-wrap: anywhere;
}
/* One flowing line: the approved icon leads, the words wrap beneath it. */
.listing-source > .idx-slot, .listing-source > .idx-mark { vertical-align: -4px; margin-right: var(--space-2); }
.listing-source__firm { color: var(--text); font-weight: var(--weight-semibold); }
.home-card .listing-source { margin-top: var(--space-1); padding-top: var(--space-1); }
.home-card .listing-source + .home-card__more { margin-top: 2px; }
.row__main .listing-source { border-top: 0; padding-top: 0; margin-top: var(--space-1); }
.journey__step .listing-source { border-top: 0; padding-top: 0; margin-top: 2px; }

/* A home's page: the listing status in full, and who listed it, under the address. */
.detail-status-name, .detail-source { font-size: var(--text-sm); color: var(--text-secondary); }
.detail-source span { color: var(--text); font-weight: var(--weight-semibold); }

/* Where a section comes from: one quiet tag per section, never per number. */
.label-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.source-tag {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-pill); border: 1px solid;
  font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.6;
}
.source-tag--listing { color: var(--text-secondary); border-color: var(--border-active); background: var(--bg-card); }
.source-tag--navesta, .source-tag--calculation { color: #141414; border-color: var(--gold-dim); background: var(--gold-subtle); }
.source-tag--compare { color: var(--text); border-color: var(--border-active); background: var(--bg-elevated); }

/* The listing's own information: one block, ending with its attribution. */
.listing-block { padding: var(--space-5); border-radius: 22px; background: var(--bg-warm); border: 1px solid var(--border-hover); gap: var(--space-4); }
.listing-block > .detail-section { gap: var(--space-3); }
.listing-attribution {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3) var(--space-4); align-items: start;
  padding-top: var(--space-4); border-top: 1px solid var(--border-hover); font-size: var(--text-base);
}
.listing-attribution__who { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.listing-attribution__contact a { color: var(--text); font-weight: var(--weight-semibold); text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 32px; }
.listing-attribution__mls { font-size: var(--text-sm); color: var(--text-secondary); }
.listing-attribution__marks { display: flex; align-items: center; gap: var(--space-2); }
@media (max-width: 640px) {
  .listing-block { padding: var(--space-4); }
  .listing-attribution { grid-template-columns: minmax(0, 1fr); }
}

/* About this listing information: the page's IDX statements, once, at its foot. */
.idx-region {
  display: grid; gap: var(--space-2); max-width: 820px; margin: var(--space-8) auto 0; padding-top: var(--space-5);
  border-top: 1px solid var(--border-hover); font-size: var(--text-sm); line-height: 1.55; color: var(--text-secondary);
}
.detail-page > .idx-region, .hub__foot .idx-region { width: 100%; }
.idx-region__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.idx-region__title {
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text);
}
.idx-region__marks { display: flex; align-items: center; gap: var(--space-2); }
.idx-region__notice { max-width: 76ch; }
/* The professional, neutrally: name, then "Licensed real estate professional · brokerage". */
.idx-region__site { display: grid; gap: 0; margin-top: var(--space-1); }
.idx-region__role { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; }
.idx-region__name { color: var(--text); font-weight: var(--weight-semibold); }
.idx-region__affiliation span { color: var(--text); }
/* The draft no-agency statement: said once, plainly, in "What … sees". */
.agent-sees__notice { padding-top: var(--space-2); border-top: 1px solid var(--border); }
.idx-region__report a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: 3px; }
.discover > .idx-region { max-width: 460px; width: 100%; justify-self: center; }

/* Listing information paused (not current, shut down, or not available yet): calm, never an error. */
.paused-note { padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); font-size: var(--text-base); }
.state--paused { display: grid; gap: var(--space-2); }

/* After a tour request: "working with a real estate agent?" — in the same sheet,
   three full-width answers on phones, then one short next step. */
.agent-status { display: grid; gap: var(--space-2); margin-top: var(--space-2); padding: var(--space-4); border-radius: 16px; background: var(--bg-elevated); text-align: left; }
.agent-status__q { font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); line-height: 1.35; }
.agent-status__choices { display: grid; gap: var(--space-2); margin-top: var(--space-1); }
.agent-status__choice { justify-content: flex-start; text-align: left; width: 100%; }
.agent-status__reply { line-height: 1.5; outline: none; }
.agent-status__name { display: grid; gap: var(--space-1); margin-top: var(--space-1); }
.agent-status__name-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.agent-status__name-row input { flex: 1 1 12em; min-width: 0; }
.tour-confirm .agent-status { justify-self: stretch; width: 100%; }

/* Realcomp's listing credit follows the listing, before Navesta's own analysis. */
.detail-credit { font-size: var(--text-sm); line-height: 1.5; color: var(--text-secondary); max-width: 76ch; padding-top: var(--space-2); border-top: 1px solid var(--border); }

/* ── Purchase Plan 1.0 ────────────────────────────────────── */
/* The home first, then the plan as a few calm decision cards. Neutral
   throughout — figures and differences, never a verdict colour. */
.pp-page { display: grid; gap: var(--space-5); }
.pp-head { display: grid; gap: var(--space-1); }
.pp-head h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 7vw, 36px); line-height: 1.15; letter-spacing: -0.01em; outline: none; }
.pp-head__lede { color: var(--text-secondary); max-width: 52ch; }
.pp-layout { display: grid; gap: var(--space-5); align-items: start; }
.pp-main { display: grid; gap: var(--space-4); min-width: 0; }
@media (min-width: 900px) {
  .pp-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-6); }
  .pp-aside { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
}

/* The home: compact, the listing's own information. */
.pp-home {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: var(--space-4); align-items: start;
  padding: var(--space-3); border-radius: 22px; background: var(--bg-warm); border: 1px solid var(--border-hover);
}
.pp-home__media { position: relative; border-radius: 16px; overflow: hidden; }
.pp-home__media .listing-media { aspect-ratio: 4 / 3; }
.pp-home__body { display: grid; gap: 2px; min-width: 0; align-content: start; padding-top: var(--space-1); }
.pp-home__price { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.1; }
.pp-home__facts { font-weight: var(--weight-semibold); }
.pp-home__title { font-weight: var(--weight-semibold); color: var(--text); text-decoration: none; justify-self: start; }
.pp-home__title:hover { text-decoration: underline; }
/* The thumbnail is a glyph without words when there is no photo — never crowded. */
.pp-home__media .listing-media__note { display: none; }
@media (max-width: 480px) {
  .pp-home { grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-2); border-radius: 18px; }
  .pp-home__media { border-radius: 12px; }
  .pp-home__media .listing-media { aspect-ratio: 1 / 1; }
  .pp-home__media .property-card__status { left: 4px; top: 4px; transform: scale(0.85); transform-origin: top left; }
  .pp-home__price { font-size: 20px; }
  .pp-head h1 { font-size: 26px; }
  .pp-head__lede { font-size: var(--text-sm); }
  .pp-summary, .pp-compare, .pp-whatif { padding: var(--space-4); }
}

/* The plan: the monthly figure leads; cash to close and what is left beside it. */
.pp-summary, .pp-compare, .pp-whatif, .pp-editor {
  display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-5); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift);
}
.pp-whatif[hidden] { display: none; }
.pp-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); }
.pp-figure { display: grid; gap: 2px; align-content: start; min-width: 0; }
.pp-figure--lead { grid-column: 1 / -1; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.pp-figure__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); }
.pp-figure__value { font-family: var(--font-serif); font-weight: 500; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.pp-figure--lead .pp-figure__value { font-size: clamp(34px, 9vw, 44px); line-height: 1.05; }
.pp-figure--incomplete .pp-figure__value, .pp-figure--needs_inputs .pp-figure__value { font-family: var(--font-sans); font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.pp-figure__sub { font-size: var(--text-sm); color: var(--text-secondary); }
.pp-figure--lead .pp-figure__sub { font-size: var(--text-base); color: var(--text); font-weight: var(--weight-semibold); }
@media (max-width: 400px) { .pp-figures { grid-template-columns: minmax(0, 1fr); } }
.pp-missing { display: grid; gap: var(--space-2); }
.pp-missing__item { padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); font-size: var(--text-sm); }
.pp-missing__item .link-btn { font-weight: var(--weight-semibold); }
.pp-edit { justify-self: start; }

/* Plan vs your target: the strongest visual — two bars, then the difference. */
.pp-compare__row { display: grid; gap: var(--space-2); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.pp-compare__row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.pp-compare__row--empty { color: var(--text-secondary); font-size: var(--text-sm); justify-items: start; }
.pp-bar { display: grid; gap: 4px; }
.pp-bar__label { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.pp-bar__label strong { font-variant-numeric: tabular-nums; }
.pp-bar__track { height: 10px; border-radius: var(--radius-pill); background: var(--bg-surface); overflow: hidden; }
.pp-bar__fill { display: block; height: 100%; border-radius: inherit; background: rgba(26,26,26,0.72); }
.pp-bar--plan .pp-bar__fill { background: var(--gold); }
.pp-compare__diff { font-weight: var(--weight-semibold); }
.pp-compare__none { font-size: var(--text-sm); color: var(--text-secondary); }
.pp-compare__none a { color: var(--text); font-weight: var(--weight-semibold); }

/* What changes the plan: priced what-ifs, plainly. */
.pp-whatif__list { display: grid; gap: var(--space-2); }
.pp-whatif__item { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); }
.pp-whatif__change { font-weight: var(--weight-semibold); }
.pp-whatif__effect { font-size: var(--text-sm); color: var(--text-secondary); }

.pp-breakdown .disclosure__body, .pp-explain .disclosure__body { padding-top: var(--space-2); }
.pp-lines { display: grid; gap: var(--space-2); }
.pp-line { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.pp-line dd { font-weight: var(--weight-semibold); text-align: right; }
.pp-line--sub { color: var(--text-secondary); }
.pp-explain .disclosure__body p + p { margin-top: var(--space-2); }

/* The assumptions: short groups, one field per row, sources said quietly. */
.pp-editor__body { display: grid; gap: var(--space-4); }
.pp-group { display: grid; gap: var(--space-3); border: 0; padding: 0; margin: 0; min-width: 0; }
.pp-group > legend { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); margin-bottom: var(--space-2); }
.pp-field { display: grid; gap: 4px; min-width: 0; }
.pp-field input, .pp-field select { width: 100%; min-width: 0; min-height: 44px; }
.pp-field__unit { color: var(--text-secondary); font-weight: var(--weight-regular); }
.pp-field__hint { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.4; }
.pp-down { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); align-items: center; }
.pp-modes { display: inline-flex; border: 1px solid var(--border-active); border-radius: var(--radius-pill); overflow: hidden; }
.pp-mode { min-width: 40px; min-height: 40px; border: 0; background: var(--bg-card); color: var(--text-secondary); font: inherit; font-weight: var(--weight-semibold); cursor: pointer; }
.pp-mode[aria-pressed="true"] { background: var(--cta-primary); color: #FFFFFF; }
.pp-mode:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.pp-editor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.pp-status { font-size: var(--text-sm); color: var(--text-secondary); }
.pp-editor [data-testid="plan-reset"][hidden] { display: none; }

/* Phones: the assumptions in a sheet, the headline figures pinned on top. */
.pp-sheet .sheet__form { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pp-sheet .pp-editor { padding: 0; box-shadow: none; background: none; }
.pp-sheet .pp-editor > .label-row, .pp-sheet .pp-editor > .label-row + .small { display: none; }
.pp-sheet__foot .pp-status { margin-right: auto; }
.pp-mini { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); padding: var(--space-3) var(--space-6); background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.pp-mini strong { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-lg); }
.pp-mini__label { color: var(--text-secondary); }
@media (max-width: 640px) { .pp-mini { padding: var(--space-2) var(--space-4); } .pp-sheet .sheet__body { padding: var(--space-3) var(--space-4) var(--space-5); } }

.pp-private { max-width: 62ch; }
.pp-help { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-4) var(--space-5); border-radius: 18px; border: 1px solid var(--border-hover); }
.pp-help__title { font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-semibold); }
.pp-help__sent { outline: none; }

/* The ways in: one quiet link on a home's page; a chip on a Saved card with a plan. */
.plan-entry { margin-top: var(--space-1); }
.plan-entry__link, .plan-chip a { font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 32px; }
.plan-chip { font-size: var(--text-sm); }
/* Short phones: the home, the headline and the monthly figure on the first screen. */
@media (max-width: 480px) and (max-height: 700px) {
  .pp-page { gap: var(--space-3); }
  .pp-head .eyebrow, .pp-head__lede { display: none; }
  .pp-summary { gap: var(--space-2); }
}

/* ── Seller Plan 1.0 ──────────────────────────────────────── */
/* The answer first, read the way the question is asked: the sale price the
   person chose → what they could walk away with. Then how it adds up, in two
   groups (at closing / after closing) so the two figures never blur. Calm
   cards like Purchase Plan — never a settlement worksheet, never a verdict
   colour. */
.source-tag--property { color: var(--text-secondary); border-color: var(--border-active); background: var(--bg-card); }
.sp-home { display: grid; gap: 2px; padding: var(--space-4) var(--space-5); border-radius: 22px; background: var(--bg-warm); border: 1px solid var(--border-hover); }
.sp-home__kind { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); }
.sp-home__title { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }

.sp-answer { display: grid; gap: 2px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.sp-answer__price { font-size: var(--text-base); color: var(--text-secondary); margin-bottom: var(--space-2); }
.sp-answer__price strong { color: var(--text); font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.sp-answer__value { font-family: var(--font-serif); font-weight: 500; font-size: clamp(36px, 10vw, 48px); line-height: 1.05; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sp-answer--incomplete .sp-answer__value { font-family: var(--font-sans); font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.sp-answer__target { font-weight: var(--weight-semibold); }
.sp-summary .pp-figures .pp-figure--incomplete .pp-figure__value { font-size: var(--text-base); color: var(--text-secondary); }
.sp-missing { display: grid; gap: var(--space-2); }
.sp-missing > .small { color: var(--text-secondary); }

.sp-ledger { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-2) var(--space-5); }
.sp-ledger > .disclosure__summary { border: 0; background: none; padding: var(--space-3) 0; font-weight: var(--weight-bold); }
.sp-ledger > .disclosure__summary:hover { background: none; }
.sp-ledger__body { display: grid; gap: var(--space-4); padding-bottom: var(--space-4); }
.sp-group { display: grid; gap: var(--space-2); }
.sp-group--after { padding-top: var(--space-4); border-top: 1px dashed var(--border-active); }
.sp-group__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); }
.sp-group__note { font-size: var(--text-sm); color: var(--text-secondary); max-width: 60ch; }
.sp-rows { display: grid; gap: 0; margin: 0; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-4); align-items: baseline; padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.sp-row:first-child { border-top: 0; }
.sp-row dt { display: flex; gap: var(--space-2); min-width: 0; font-size: var(--text-sm); }
.sp-row__sign { flex: none; width: 1ch; color: var(--text-secondary); font-weight: var(--weight-semibold); }
.sp-row dd { margin: 0; display: grid; justify-items: end; text-align: right; }
.sp-row__value { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.sp-row__value.is-quiet { font-weight: var(--weight-regular); color: var(--text-secondary); font-size: var(--text-sm); }
.sp-row__note { font-size: var(--text-xs); color: var(--text-secondary); }
.sp-row--total { border-top: 1px solid var(--border-active); }
.sp-row--total dt { font-weight: var(--weight-semibold); }
.sp-row--grand dt, .sp-row--grand .sp-row__value { font-size: var(--text-base); }
.sp-row--grand .sp-row__value { font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.sp-row .sp-row__value.is-pending { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }

.sp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sp-table th, .sp-table td { padding: var(--space-2) var(--space-3); text-align: right; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.sp-table th:first-child { text-align: left; }
.sp-table thead th { border-top: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); }
.sp-table tbody th { font-weight: var(--weight-regular); }
.sp-table tr.is-yours th, .sp-table tr.is-yours td { background: var(--bg-elevated); font-weight: var(--weight-semibold); }
.sp-yours { display: inline-block; margin-left: var(--space-2); padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--text); color: #FFFFFF; font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.04em; vertical-align: 1px; }
.sp-scenarios[hidden] { display: none; }

/* The payoff: unknown, an amount, or paid off — three plain choices. */
.sp-payoff { border: 0; padding: 0; margin: 0; }
.sp-payoff > legend { font-weight: var(--weight-semibold); margin-bottom: var(--space-1); padding: 0; }
.sp-choices { display: grid; gap: 2px; }
.sp-choice { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; font-weight: var(--weight-regular); cursor: pointer; }
.sp-choice input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--cta-primary); }
.sp-payoff__amount[hidden] { display: none; }
.sp-offer { font-size: var(--text-sm); color: var(--text-secondary); padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); }
.sp-offer[hidden] { display: none; }
.sp-offer .link-btn { font-weight: var(--weight-semibold); }
.sp-page .pp-down .input-wrap { min-width: 0; }
.sp-page .pp-down .input-wrap input { width: 100%; }

/* My Home: one compact line under "Your position". */
.sp-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-top: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: 18px; border: 1px solid var(--border-hover); background: var(--bg-card); }
.sp-entry__text { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.sp-entry__title { font-weight: var(--weight-semibold); }
.sp-entry__line { font-size: var(--text-sm); color: var(--text-secondary); }
.sp-entry[data-status="complete"] .sp-entry__line { color: var(--text); font-weight: var(--weight-semibold); }

@media (max-width: 480px) {
  .sp-home { padding: var(--space-3) var(--space-4); border-radius: 18px; }
  .sp-home__title { font-size: 19px; }
  .sp-ledger { padding: var(--space-1) var(--space-4); }
  .sp-table th, .sp-table td { padding: var(--space-2); }
  .sp-entry { padding: var(--space-4); }
  .sp-entry__go { width: 100%; justify-content: center; }
}
/* The narrowest phones: the sheet's buttons on one row (the saved state shows on the page). */
@media (max-width: 360px) { .sp-sheet .sheet__foot .pp-status { display: none; } }
/* Short phones: the sale price and the answer on the first screen. */
@media (max-width: 480px) and (max-height: 700px) {
  .sp-home { display: none; }
  .sp-answer__value { font-size: 34px; }
}

/* ── Move Plan 1.0 ────────────────────────────────────────── */
/* Three steps, read left to right: sell → buy = after the move. Each side's
   figure is its own plan's; the result is the one strong figure. Calm cards,
   never a ledger first; on phones the three rows fit the first screen. */
.mv-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-3); align-items: stretch; }
.mv-op { align-self: center; font-family: var(--font-serif); font-size: 28px; color: var(--text-secondary); }
.mv-step { display: grid; gap: 2px; align-content: start; min-width: 0; padding: var(--space-4) var(--space-5); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift); }
.mv-step__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); }
.mv-step__home { font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: var(--space-2); }
.mv-step__value { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mv-step.is-incomplete .mv-step__value, .mv-step--incomplete .mv-step__value { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.mv-step__sub { font-size: var(--text-sm); color: var(--text-secondary); }
.mv-step__link { justify-self: start; font-size: var(--text-sm); margin-top: var(--space-1); }
.mv-step--after { background: var(--bg-warm); border: 1px solid var(--border-hover); box-shadow: none; }
.mv-step--after .mv-step__value { font-size: 34px; }
.mv-step--gap .mv-step__value { font-size: 26px; }
/* Across break-even: a range, said neutrally — no surplus or gap emphasis. */
.mv-step--crosses_break_even .mv-step__value { font-size: 24px; }
.mv-step--after.mv-step--incomplete .mv-step__value { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.mv-step--after .mv-step__sub { color: var(--text); font-weight: var(--weight-semibold); }
.mv-card { display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-5); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift); min-width: 0; }
.mv-monthly__value { font-family: var(--font-serif); font-weight: 500; font-size: 24px; }
.mv-monthly__value.is-incomplete { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.mv-timing { font-size: var(--text-sm); color: var(--text-secondary); padding: 0 var(--space-1); max-width: 64ch; }
.mv-needs { gap: var(--space-3); }
.mv-needs__side { display: grid; gap: var(--space-2); justify-items: start; }
.mv-needs__title { font-weight: var(--weight-semibold); }
.mv-needs ul { margin: 0; padding-left: var(--space-5); font-size: var(--text-sm); list-style: disc; }
.mv-reserve__text { font-weight: var(--weight-semibold); }
.mv-details { display: grid; gap: var(--space-4); }
.mv-whatif[hidden], .mv-page .pp-whatif[hidden] { display: none; }
.mv-home { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3); border-radius: 18px; background: var(--bg-warm); border: 1px solid var(--border-hover); }
.mv-home__media { position: relative; border-radius: 12px; overflow: hidden; }
.mv-home__media .listing-media { aspect-ratio: 4 / 3; }
.mv-home__media .listing-media__note { display: none; }
.mv-home__body { display: grid; gap: 2px; min-width: 0; }
.mv-home__price { font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.mv-home__title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.mv-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.mv-tag { font-size: var(--text-xs); font-weight: var(--weight-bold); padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-elevated); }
.mv-tag--reference { background: var(--text); color: #FFFFFF; }
.mv-reference { padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--bg-elevated); font-size: var(--text-sm); }
.mv-choose { display: grid; gap: var(--space-3); }
.mv-choose__selling { display: grid; gap: 2px; justify-items: start; padding: var(--space-4) var(--space-5); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift); }
.mv-choose__figure strong { font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.mv-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.mv-choice { display: grid; gap: var(--space-2); }
.mv-choice > .btn { justify-self: start; }
.mv-empty { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-4) var(--space-5); border-radius: 18px; border: 1px dashed var(--border-active); }
.mv-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); padding: var(--space-4) var(--space-5); border-radius: 18px; border: 1px solid var(--border-hover); background: var(--bg-card); }
.mv-pp-entry { font-size: var(--text-sm); }
.mv-pp-entry a { color: var(--text); font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) {
  .mv-strip { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .mv-op { display: none; }
  .mv-step { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: baseline; padding: var(--space-3) var(--space-4); border-radius: 18px; }
  .mv-step__label { grid-column: 1; }
  .mv-step .mv-step__home, .mv-step > .pp-figure__label, .mv-step .mv-step__link { display: none; }
  .mv-step__value { grid-column: 2; grid-row: 1; font-size: 22px; text-align: right; }
  .mv-step--after .mv-step__value { font-size: 26px; }
  .mv-step--after.mv-step--incomplete .mv-step__value { font-size: var(--text-base); }
  .mv-step__sub { grid-column: 1 / -1; font-size: var(--text-xs); }
  .mv-step.is-incomplete .mv-step__value, .mv-step--incomplete .mv-step__value { font-size: var(--text-base); }
  .mv-page > .pp-edit { justify-self: start; }
}
@media (max-width: 480px) {
  .mv-home { grid-template-columns: 88px minmax(0, 1fr); }
  .mv-home__price { font-size: 19px; }
  .mv-card, .mv-choose__selling { padding: var(--space-4); }
}

/* ── Move Compare 1.0 ─────────────────────────────────────── */
/* One sale (a shared band, said once), then one column per next home — the
   Compare grid and its phone pattern (one move per line, named by letter).
   The answer per move: cash after the move and the monthly cost, first. */
.mvc-selling { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-radius: 22px; background: var(--bg-warm); border: 1px solid var(--border-hover); }
.mvc-selling__main { display: grid; gap: 2px; justify-items: start; }
.mvc-selling__home { font-weight: var(--weight-semibold); }
.mvc-selling__value { font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 1.1; }
.mvc-selling__needs { display: grid; gap: var(--space-1); max-width: 64ch; }
.mvc-selling__timing { font-size: var(--text-sm); color: var(--text-secondary); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.mvc-scenarios { list-style: none; margin: 0; padding: 0; align-items: stretch; }
.mvc-scenario { display: grid; gap: var(--space-3); align-content: start; min-width: 0; padding: var(--space-4); border-radius: 22px; background: var(--bg-card); box-shadow: var(--lift); }
.mvc-scenario--reference { background: var(--bg-elevated); box-shadow: none; border: 1px dashed var(--border-active); }
.mvc-scenario__home { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.mvc-scenario__media { position: relative; border-radius: 12px; overflow: hidden; }
.mvc-scenario__media .listing-media { aspect-ratio: 1 / 1; }
.mvc-scenario__media .listing-media__note { display: none; }
/* The thumbnail stays a picture: status is said in words where it matters (a reference scenario). */
.mvc-scenario__media .property-card__status { display: none; }
.mvc-scenario__price { font-family: var(--font-serif); font-weight: 500; font-size: 20px; }
.mvc-scenario__name { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.mvc-scenario__figure { display: grid; gap: 2px; }
.mvc-scenario__value { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.mvc-scenario__figure--gap .mvc-scenario__value, .mvc-scenario__figure--crosses_break_even .mvc-scenario__value { font-size: 20px; }
.mvc-scenario__figure--incomplete .mvc-scenario__value { font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.mvc-scenario__monthly { font-weight: var(--weight-semibold); font-size: var(--text-lg); }
.mvc-scenario__monthly.is-incomplete { color: var(--text-secondary); font-size: var(--text-base); }
.mvc-scenario__actions { font-size: var(--text-sm); }
.mvc-scenario__actions a { color: var(--text); font-weight: var(--weight-semibold); }
.mvc-scenario__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.mv-choice__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.mv-compare-link { font-size: var(--text-sm); }
.mv-compare-link a { color: var(--text); font-weight: var(--weight-semibold); }
/* Three or four moves side by side: a smaller picture, so each column keeps its words. */
.cmp--3 .mvc-scenario__home, .cmp--4 .mvc-scenario__home { grid-template-columns: 64px minmax(0, 1fr); }
@media (max-width: 1100px) and (min-width: 641px) {
  .cmp--3 .mvc-scenario__media, .cmp--4 .mvc-scenario__media { display: none; }
  .cmp--3 .mvc-scenario__home, .cmp--4 .mvc-scenario__home { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mvc-scenario { padding: var(--space-3) var(--space-4); gap: var(--space-2); }
  .mvc-scenario__home { grid-template-columns: 72px minmax(0, 1fr); }
  .mvc-scenario__value { font-size: 22px; }
  .mvc-selling { padding: var(--space-4); }
  .mvc-selling__value { font-size: 26px; }
}

/* ── Home preferences (Buyer Profile 2.0): a summary first, then compact
   groups that open one at a time — never one long form. ── */
.prefs { display: grid; gap: var(--space-4); max-width: var(--story-max); }
.prefs-sum { display: grid; gap: var(--space-4); }
.prefs-card { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-5) var(--space-6); display: grid; gap: var(--space-3); min-width: 0; }
.prefs-sum__group { display: grid; gap: var(--space-1); }
.prefs-sum__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); margin: 0; }
.prefs-sum__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.prefs-sum__list li { background: var(--bg-elevated); border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.prefs-sum__group[data-testid="preferences-must"] li { background: var(--text); color: #FFFFFF; }
.prefs-sum__matters { font-size: var(--text-sm); margin: 0; }
.prefs-sum .actions { margin-top: var(--space-1); }
.prefs-note { font-size: var(--text-sm); background: var(--gold-subtle); border-radius: 14px; padding: var(--space-3) var(--space-4); margin: 0; }
.prefs-privacy { margin: 0; }
.prefs-editor { display: grid; gap: var(--space-3); }
.prefs-editor__help { margin: 0; }
.prefs-group { background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: 0 var(--space-4); }
.prefs-group > .prefs-group__summary { border: 0; border-radius: 0; background: none; padding: var(--space-3) 0; display: flex; gap: var(--space-3); align-items: baseline; }
.prefs-group > .prefs-group__summary:hover { background: none; }
.prefs-group__label { font-weight: var(--weight-bold); flex: none; }
.prefs-group__value { color: var(--text-secondary); font-size: var(--text-sm); flex: 1; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.prefs-group > .disclosure__body { margin-top: 0; padding-bottom: var(--space-3); }
.prefs-row { border: 0; border-top: 1px solid var(--border); padding: var(--space-3) 0 0; margin: 0; display: grid; gap: var(--space-2); min-width: 0; }
.prefs-row:first-child { border-top: 0; padding-top: 0; }
.prefs-row__label { font-weight: var(--weight-semibold); padding: 0; }
.prefs-row__foot { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.prefs-strength { margin-bottom: 0; }
.prefs-row__hint { font-size: var(--text-xs); color: var(--text-secondary); margin: 0; }
.prefs-row__clear { font-size: var(--text-sm); }
.prefs-chips .reason-chip { min-height: 36px; }
.prefs-money { display: flex; align-items: center; gap: var(--space-2); max-width: 280px; }
.prefs-money input { flex: 1; min-width: 0; }
.prefs-money input, .prefs-areas__search {
  min-height: 40px; width: 100%; padding: 0 var(--space-3); font: inherit;
  border: 1px solid var(--border-active); border-radius: var(--radius-sm); background: var(--bg-card);
}
.prefs-money__sign { font-weight: var(--weight-semibold); color: var(--text-secondary); }
.prefs-area-picker { display: grid; gap: var(--space-2); }
.prefs-areas { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.prefs-areas:empty { display: none; }
.prefs-area { border: 1px solid var(--border-active); background: var(--bg-elevated); border-radius: var(--radius-pill); padding: 4px 12px; font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; min-height: 36px; }
.prefs-areas__options { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.prefs-areas__options:empty { display: none; }
.prefs-areas__option { width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: var(--space-2); border-radius: 10px; cursor: pointer; min-height: 40px; }
.prefs-areas__option:hover, .prefs-areas__option:focus-visible { background: var(--bg-elevated); }
.prefs-bar { position: sticky; bottom: var(--space-3); z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift-strong); padding: var(--space-3) var(--space-4); }
.prefs-bar__status { margin: 0 auto 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
@media (max-width: 640px) {
  .prefs-card { padding: var(--space-4); }
  .prefs-money input, .prefs-areas__search { min-height: 44px; font-size: 16px; }
  /* Above the tab bar, on every phone — one row: the state is announced, the buttons stay. */
  .prefs-bar { bottom: calc(77px + env(safe-area-inset-bottom) + var(--space-2)); padding: var(--space-2) var(--space-3); flex-wrap: nowrap; }
  .prefs-bar .btn { min-height: 40px; padding-left: var(--space-4); padding-right: var(--space-4); white-space: nowrap; }
  .prefs-bar__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Your fit 2.0 — what the person said they want, against this home. */
.pref-fit__group { display: grid; gap: 4px; }
.pref-fit__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); margin: var(--space-1) 0 0; }
.pref-fit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pref-fit__list li { position: relative; padding-left: 1.5em; }
.pref-fit__list li::before { position: absolute; left: 0; top: 0; font-weight: var(--weight-bold); }
.pref-fit__group--meets li::before { content: '✓'; color: var(--green); }
.pref-fit__group--tradeoff li::before { content: '≈'; color: var(--gold-deep); }
.pref-fit__group--misses li::before { content: '✕'; color: var(--red); }
.pref-fit__group--unknown li::before { content: '?'; color: var(--text-secondary); }
.pref-fit__group--unknown li { color: var(--text-secondary); }
.saved-fit { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }
.journey-with--prefs { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: baseline; }
.journey-with--prefs .journey-with__label { grid-column: 1 / -1; }
.journey-with__edit { font-size: var(--text-sm); color: var(--text-secondary); text-decoration: underline; }
.pp-every { justify-self: start; font-size: var(--text-sm); }

/* ── Match Watch: a switch on the profile, a line on Home, light context on cards ── */
.prefs-watch__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.prefs-watch__title { font-size: var(--text-base); font-weight: var(--weight-bold); margin: 0; }
.prefs-watch .small { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: var(--space-2); border: 0; background: none; padding: 0; font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); cursor: pointer; min-height: 44px; flex: none; }
.switch:disabled { cursor: not-allowed; opacity: 0.5; }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--border-active); transition: background var(--duration-normal); }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform var(--duration-normal); }
.switch[aria-checked="true"] .switch__track { background: var(--green); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .switch__track, .switch__thumb { transition: none; } }
.matches { display: grid; gap: var(--space-4); }
.match-state { gap: var(--space-2); }
.match-state__line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.match-tag { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.match-tag--match { color: var(--green); }
.match-tag--possible_match { color: var(--gold-deep); }
.match-tag__new { background: var(--text); color: #FFFFFF; border-radius: var(--radius-pill); padding: 0 8px; font-size: var(--text-xs); line-height: 1.7; letter-spacing: 0.04em; text-transform: uppercase; }
.match-line { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.match-hide { font-size: var(--text-sm); }
.match-state__updating { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.match-state__updating strong { color: var(--text); }
/* Match Updates — "What's new": the two latest complete updates compared; compact, never a table. */
.updates { gap: var(--space-2); }
.updates__title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.updates p { margin: 0; }
.updates__summary { font-weight: var(--weight-semibold); color: var(--text); }
.updates__cards { margin-top: var(--space-2); }
.match-tag--gone { color: var(--text-secondary); }
/* Phones: the same property card, compact — a thumbnail beside the facts — so a few changes stay one short list. */
@media (max-width: 640px) {
  .updates__cards, .ts__cards { gap: var(--space-3); }
  .updates__cards .property-card, .ts__cards .property-card { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto; border-radius: 16px; }
  .updates__cards .property-card__media, .ts__cards .property-card__media { grid-row: 1 / span 2; overflow: hidden; }
  .updates__cards .property-card__media .listing-media--card, .ts__cards .property-card__media .listing-media--card { aspect-ratio: auto; height: 100%; min-height: 104px; }
  .updates__cards .listing-media__note, .ts__cards .listing-media__note { display: none; }
  .updates__cards .property-card__status, .ts__cards .property-card__status { left: 6px; top: 6px; transform: scale(0.82); transform-origin: left top; }
  .updates__cards .property-card__body, .ts__cards .property-card__body { padding: var(--space-3) var(--space-3) 0; }
  .updates__cards .property-card__price, .ts__cards .property-card__price { font-size: 20px; }
  .updates__cards .property-card__extra, .ts__cards .property-card__extra { margin-top: var(--space-2); }
  .updates__cards .property-card__actions, .ts__cards .property-card__actions { padding: var(--space-2) var(--space-3) var(--space-3); }
  .updates__cards .property-card__title::after,
  .ts__cards .property-card__title::after { border-radius: 16px; }
}
/* Phones (and narrow panes): one shared home per row — the compact card, with the reactions on a full-width row
   under the photo and facts (as Compare's compact cards place their actions), so the three stay on one line. */
@media (max-width: 640px) {
  .ts__cards { grid-template-columns: minmax(0, 1fr); }
  .ts__cards .property-card__media { grid-row: 1; }
  .ts__cards .property-card__actions { grid-row: 2; grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .ts-reactions { gap: 4px; }
  .ts-reaction { padding: 5px 9px; font-size: 13px; }
}

/* ── Compare: 2–4 homes, by decision ─────────────────────────
   Desktop: one column per home, aligned from the cards down; a slim strip
   keeps the homes' letters, prices and names in view. Phones: never 3–4
   squeezed columns — each section stacks its homes, every cell named by its
   letter (and, in the big cells, its name); facts pair up two to a line. */
.compare-page { display: grid; gap: var(--space-8); --cmp-n: 2; --cmp-top: 65px; }
.compare-page.cmp--3 { --cmp-n: 3; }
.compare-page.cmp--4 { --cmp-n: 4; }
.cmp-grid { display: grid; grid-template-columns: repeat(var(--cmp-n), minmax(0, 1fr)); gap: var(--space-4); }
.cmp-note { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); background: var(--bg-surface); border-radius: 14px; padding: var(--space-3) var(--space-4); }
.cmp-key {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--radius-pill);
  background: var(--text); color: #FFFFFF; font-size: 13px; font-weight: var(--weight-bold); line-height: 1;
}
.cmp-strip {
  position: sticky; top: var(--cmp-top); z-index: 3; margin: 0 calc(-1 * var(--space-2)); padding: var(--space-2);
  background: var(--bg-glass); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--border);
}
.cmp-strip__home { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.cmp-strip__text { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.cmp-strip__price { font-weight: var(--weight-semibold); white-space: nowrap; }
.cmp-strip__short { display: none; font-weight: var(--weight-semibold); white-space: nowrap; }
.cmp-strip__name { font-size: var(--text-sm); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cmp-homes { align-items: stretch; }
.cmp-card__key { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-bottom: var(--space-1); }
.cmp-card__note { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.cmp-card .property-card__extra { display: grid; gap: var(--space-1); }
.cmp-section { display: grid; gap: var(--space-3); min-width: 0; }
.cmp-section__head { justify-content: flex-start; }
.cmp-priority { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--gold-deep); border: 1px solid var(--gold-dim); background: var(--gold-subtle); border-radius: var(--radius-pill); padding: 0 8px; line-height: 1.8; }
.cmp-summary { display: grid; gap: var(--space-2); background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-4) var(--space-5); }
.cmp-summary li { position: relative; padding-left: 1.25em; }
.cmp-summary li::before { content: '•'; position: absolute; left: 0; color: var(--text-secondary); }
.cmp-cell { display: grid; gap: var(--space-2); align-content: start; min-width: 0; background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-4) var(--space-5); }
.cmp-tag { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); min-width: 0; }
.cmp-tag__name { display: none; overflow-wrap: anywhere; }
.cmp-req { margin: 0; font-weight: var(--weight-semibold); }
.cmp-req--met::before { content: '✓ '; color: var(--green); }
.cmp-req--missed::before { content: '✕ '; color: var(--red); }
.cmp-req--unknown::before { content: '? '; color: var(--text-secondary); }
.cmp-figure { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.cmp-figure__value { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.cmp-figure__value--range { font-size: 21px; }
.cmp-figure__unit { font-size: var(--text-sm); color: var(--text-secondary); }
.cmp-figure--pending { font-weight: var(--weight-semibold); }
.cmp-diff { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.cmp-diff--lowest::before { content: '↓ '; }
.cmp-label { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.cmp-cash-left { margin: 0; font-weight: var(--weight-semibold); }
.cmp-table { display: grid; background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-2) var(--space-5); }
.cmp-fact { display: grid; gap: var(--space-1); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.cmp-fact:nth-child(2) { border-top: 0; }
.cmp-fact__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.cmp-fact__hint { text-transform: none; letter-spacing: 0; font-weight: var(--weight-regular, 400); }
.cmp-fact__value { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; font-weight: var(--weight-semibold); }
.cmp-fact__value .cmp-key { display: none; }
.cmp-fact__text { min-width: 0; overflow-wrap: anywhere; }
.cmp-fact__value--unknown { color: var(--text-secondary); font-weight: var(--weight-regular, 400); font-style: italic; }
.cmp-sub { display: block; font-size: var(--text-xs); font-weight: var(--weight-regular, 400); color: var(--text-secondary); }
.cmp-privacy { margin: 0; }
.decision__compare { margin: 0; }

/* Saved → Compare: a checkbox on each card, and the bar that opens Compare. */
.saved-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.cmp-pick { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; }
.cmp-pick__box { width: 20px; height: 20px; accent-color: var(--text); }
.cmp-bar {
  position: sticky; bottom: var(--space-3); z-index: var(--z-sticky);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4);
  background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift-strong); padding: var(--space-3) var(--space-4);
}
.cmp-bar__count { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.cmp-bar__actions { display: flex; gap: var(--space-2); margin-left: auto; }

@media (max-width: 860px) {
  .compare-page.cmp--4 .cmp-homes .property-card__price { font-size: 22px; }
}
@media (max-width: 640px) {
  .compare-page { --cmp-top: 61px; gap: var(--space-6); }
  /* Phones: one home per line in each section — never squeezed columns. */
  .compare-page .cmp-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .compare-page .cmp-strip { grid-template-columns: repeat(var(--cmp-n), minmax(0, 1fr)); gap: var(--space-2); margin: 0 calc(-1 * var(--space-4)); padding: var(--space-2) var(--space-4); }
  .cmp-strip__price, .cmp-strip__name { display: none; }
  .cmp-strip__short { display: inline; }
  .cmp-strip__home { justify-content: center; }
  /* The homes: compact cards — photo beside the facts — so every home is in view without swiping. */
  .cmp-homes .property-card { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto; }
  .cmp-homes .property-card__media { grid-row: 1; grid-column: 1; }
  .cmp-homes .property-card__media .listing-media { height: 100%; min-height: 112px; aspect-ratio: auto; }
  .cmp-homes .property-card__media .property-card__status { left: var(--space-2); top: var(--space-2); transform: scale(0.85); transform-origin: left top; }
  .cmp-homes .property-card__body { grid-row: 1; grid-column: 2; padding: var(--space-3) var(--space-3) 0; }
  .cmp-homes .property-card__price { font-size: 22px; }
  .cmp-homes .property-card__actions { grid-row: 2; grid-column: 1 / -1; padding: var(--space-2) var(--space-3) var(--space-3); }
  .cmp-tag__name { display: inline; }
  .cmp-cell { padding: var(--space-3) var(--space-4); }
  /* Facts: each home's value by its letter, two to a line. */
  .cmp-fact__values.cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); }
  .compare-page.cmp--2 .cmp-fact__values.cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-fact__value .cmp-key { display: inline-grid; width: 20px; height: 20px; font-size: 12px; }
  .cmp-table { padding: var(--space-1) var(--space-4); }
  .saved-page--picking { padding-bottom: 72px; }
  .cmp-bar { position: fixed; left: var(--space-3); right: var(--space-3); bottom: calc(77px + env(safe-area-inset-bottom) + var(--space-2)); }
  .cmp-bar__actions { width: 100%; }
  .cmp-bar__actions .btn { flex: 1; }
}
.cmp-priority--row { margin-left: var(--space-2); text-transform: none; letter-spacing: 0; }

/* ── Guides: a calm vertical timeline, never a checklist wall ─────
   Desktop: a slim stage rail beside the stages; phones: the stages stacked,
   the current one open, a slim rail of dots above. No score, no confetti. */
.guide-cards { display: grid; gap: var(--space-2); }
.guide-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4); border-radius: 16px; background: var(--bg-elevated); color: var(--text); text-decoration: none;
}
.guide-card:hover { background: var(--bg-surface); }
.guide-card__title { grid-column: 1; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.guide-card__stage { grid-column: 1; font-size: var(--text-sm); color: var(--text); }
.guide-card__stage--quiet { color: var(--text-secondary); }
.guide-card__meta { grid-column: 1; font-size: var(--text-xs); color: var(--text-secondary); }
.guide-card__go { grid-column: 2; grid-row: 1 / span 3; font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; }
.guide-card--offer { background: transparent; border: 1px dashed var(--border-hover); }
.guide-cards__more { margin: 0; font-size: var(--text-sm); }
.guide-cards__more a { color: var(--text); font-weight: var(--weight-semibold); }
.guides-page, .guide-page { display: grid; gap: var(--space-5); max-width: 980px; }
.guides-page .page-head, .guide-head { display: grid; gap: var(--space-2); }
.guides-page .page-head h1, .guide-head h1, .guide-head p { margin: 0; }
.guides-section { display: grid; gap: var(--space-2); }
.guide-head__meta { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.guide-head__start { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.guide-done { margin: 0; padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--green-bg); }
.guide-next { display: grid; gap: var(--space-2); }
.guide-next__item { display: grid; gap: var(--space-2); justify-items: start; }
.guide-next__text { margin: 0; }
.guide-next--chapter { padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); border-left: 3px solid var(--gold); }
.guide-next--chapter .guide-next__title { margin: 0; font-size: var(--text-lg); }
.guide-next--stage, .guide-next--coordination { padding-top: var(--space-2); border-top: 1px solid var(--border); }
.guide-card__next { color: var(--text); font-weight: var(--weight-semibold); }
@media (max-width: 640px) { .guide-next--chapter { padding: var(--space-4); } }
.guide-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.guide-foot p { margin: 0; }
.guide-body { display: grid; gap: var(--space-4); }
.guide-body--rail { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
.guide-rail { position: sticky; top: calc(var(--space-6) + 56px); }
.guide-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--border-hover); }
.guide-rail__item { font: inherit; display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: 6px var(--space-2); margin-left: -13px; border: 0; background: none; color: var(--text-secondary); cursor: pointer; text-align: left; border-radius: 10px; }
.guide-rail__item:hover { color: var(--text); }
.guide-rail__item[aria-current="step"] { color: var(--text); font-weight: var(--weight-semibold); }
.guide-rail__dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--border-hover); font-size: 12px; flex: none; }
.guide-rail__item[data-state="complete"] .guide-rail__dot { background: var(--green-soft); border-color: transparent; color: var(--green); }
.guide-rail__item[aria-current="step"] .guide-rail__dot { background: var(--text); border-color: var(--text); color: var(--bg-card); }
.guide-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.guide-stage { border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.guide-stage[data-state="upcoming"] { box-shadow: none; background: var(--bg-elevated); }
.guide-stage__head { margin: 0; font-size: inherit; font-weight: inherit; }
.guide-stage__toggle { font: inherit; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; border-radius: 18px; }
.guide-stages--areas .guide-stage__toggle { grid-template-columns: minmax(0, 1fr) auto; }
.guide-stage__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-surface); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.guide-stage[data-state="current"] .guide-stage__n { background: var(--text); color: var(--bg-card); }
.guide-stage[data-state="complete"] .guide-stage__n { background: var(--green-soft); color: var(--green); }
.guide-stage__titles { display: grid; gap: 1px; min-width: 0; }
.guide-stage__title { font-weight: var(--weight-semibold); font-size: var(--text-lg); }
.guide-stage__short { font-size: var(--text-sm); color: var(--text-secondary); }
.guide-stage__state { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-secondary); white-space: nowrap; }
.guide-stage__state[data-state="current"] { color: var(--text); }
.guide-stage__state[data-state="complete"] { color: var(--green); }
.guide-stage__body { display: grid; gap: var(--space-4); padding: 0 var(--space-4) var(--space-4); }
.guide-stage__body > p, .guide-stage__body h3 { margin: 0; }
.guide-stage__means { font-size: var(--text-base); }
.guide-stage__untracked { font-size: var(--text-sm); color: var(--text-secondary); padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); }
.guide-sub { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 var(--space-2); }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.guide-step { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: var(--space-2) var(--space-3); align-items: start; padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); }
.guide-step p { margin: 0; }
.guide-step__mark { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--border-active); }
.guide-step__mark[data-state="complete"] { background: var(--green); border-color: var(--green); }
.guide-step__mark[data-state="in_progress"] { background: linear-gradient(90deg, var(--text) 50%, transparent 50%); border-color: var(--text); }
.guide-step__mark[data-state="not_tracked"], .guide-step__mark[data-state="unavailable"], .guide-step__mark[data-state="not_applicable"] { border-style: dashed; }
.guide-step__label { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.guide-step__label a { font-weight: var(--weight-regular, 400); color: var(--text); }
.guide-step__state { font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; padding-top: 3px; }
.guide-step--ack { grid-template-columns: minmax(0, 1fr); }
.guide-ack { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; cursor: pointer; }
.guide-ack__box { width: 20px; height: 20px; accent-color: var(--text); flex: none; }
/* Seller Journey: a milestone the person reports — what they said, who said it, and small calm controls. */
.guide-step--report .guide-step__main { display: grid; gap: var(--space-2); min-width: 0; }
/* Buyer Timeline — the purchase's own milestones: a simple vertical list. */
.pt { display: grid; gap: var(--space-3); margin: var(--space-4) 0; padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.pt > p, .pt h2 { margin: 0; }
.pt-list { list-style: none; margin: 0; padding: 0 0 0 var(--space-3); border-left: 2px solid var(--border); display: grid; gap: var(--space-3); }
.pt-item p { margin: 0; }
.pt-when { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.pt-text { font-weight: var(--weight-semibold); }
@media (max-width: 640px) { .pt { padding: var(--space-4); } }
/* Homeowner Timeline — Now · Coming up · Home history: a calm list, never a calendar or a score. */
.ht { display: grid; gap: var(--space-4); margin: var(--space-4) 0; padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.ht > p { margin: 0; }
.ht__title { margin: 0; font-size: var(--text-lg); }
.ht-layer { display: grid; gap: var(--space-2); }
.ht-layer > p, .ht-layer h3 { margin: 0; }
.ht-season { display: grid; gap: var(--space-2); }
.ht-season > p { margin: 0; }
.ht-season__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); }
.ht-season__head p, .ht-season__name { margin: 0; }
.ht-season__name { font-weight: var(--weight-semibold); }
.ht-season__count { font-size: var(--text-sm); color: var(--text-secondary); }
.ht-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.ht-task { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); }
.ht-task:focus { outline: none; }
.ht-task:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ht-task p { margin: 0; }
.ht-task__mark { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--border-active); }
.ht-task__mark[data-state="complete"] { background: var(--green); border-color: var(--green); }
.ht-task__mark[data-state="not_applicable"] { border-color: var(--text-secondary); background: linear-gradient(var(--text-secondary), var(--text-secondary)) center / 7px 2px no-repeat; }
.ht-task__main { display: grid; gap: var(--space-1); min-width: 0; }
.ht-task__label { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.ht-task__state { color: var(--text-secondary); }
.ht-task__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-1); }
.ht-task__controls .btn { min-height: 40px; }
.ht-recent ul, .ht-upcoming__preview, .ht-upcoming__all { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-1); }
.ht-sub { margin: 0; font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.ht .link-button { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--text); font-weight: var(--weight-semibold); text-decoration: underline; cursor: pointer; justify-self: start; min-height: 32px; }
.ht-also { margin: 0; }
.ht-history { list-style: none; margin: 0; padding: 0 0 0 var(--space-3); border-left: 2px solid var(--border); display: grid; gap: var(--space-3); }
.ht-history__group { display: grid; gap: var(--space-1); }
.ht-history__when { margin: 0; font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.ht-history__items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.ht-history__item p { margin: 0; }
.ht-history__text { font-weight: var(--weight-semibold); }
.mh-timeline-entry { display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.mh-timeline-entry p, .mh-timeline-entry h2 { margin: 0; }
.mh-timeline-entry__link { color: var(--text); font-weight: var(--weight-semibold); justify-self: start; }
@media (max-width: 640px) {
  .ht { padding: var(--space-4); }
  .mh-timeline-entry { padding: var(--space-4); }
}
/* Resolved without happening (waived, not applicable): a solid ring with a dash — settled, never a check, never "not tracked". */
.guide-step--report .guide-step__mark[data-state="not_applicable"], .guide-step[data-resolved="true"] .guide-step__mark[data-state="not_applicable"] { border-style: solid; border-color: var(--text-secondary); background: linear-gradient(var(--text-secondary), var(--text-secondary)) center / 6px 2px no-repeat; }
.guide-stage__resolved { margin: 0; font-weight: var(--weight-semibold); color: var(--text-secondary); }
.guide-past { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--text-secondary); padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); }
.guide-step--report:focus { outline: none; }
.guide-step--report:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.guide-fact__source { font-weight: var(--weight-regular, 400); color: var(--text-secondary); }
.guide-report { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.guide-report__form, .guide-report__confirm { display: grid; gap: var(--space-2); width: 100%; }
.guide-report__confirm { padding: var(--space-3); border-radius: 12px; background: var(--bg-card); }
.guide-report__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.guide-report__label { font-size: var(--text-sm); color: var(--text-secondary); }
.guide-report__date { box-sizing: border-box; width: 100%; max-width: 220px; min-height: 40px; padding: 0 var(--space-2); border: 1px solid var(--border-active); border-radius: 10px; background: var(--bg-card); color: var(--text); font: inherit; }
.guide-know dl { margin: 0; display: grid; gap: var(--space-2); }
.guide-know dt { font-weight: var(--weight-semibold); }
.guide-know dd { margin: 0 0 var(--space-1); color: var(--text-secondary); }
.guide-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.guide-actions a { color: var(--text); font-weight: var(--weight-semibold); }
.guide-stage__next { font-size: var(--text-sm); color: var(--text-secondary); }
.guide-body--tracks { gap: var(--space-5); }
.guide-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.guide-track { display: grid; gap: var(--space-2); }
.guide-track__title { margin: 0; font-size: var(--text-lg); }
.guide-tracks .guide-stage__title { font-size: var(--text-base); }
.guide-coord { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.guide-coord h2 { margin: 0; }
.guide-coord__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }
.guide-coord__lines { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-1); color: var(--text-secondary); }
.guide-coord .btn { justify-self: start; }
@media (max-width: 860px) {
  .guide-body--rail { grid-template-columns: minmax(0, 1fr); }
  /* Phones: a slim rail of dots above the stages — never a tiny unreadable bar. */
  .guide-rail { position: static; }
  .guide-rail ol { display: flex; border-left: 0; gap: 4px; }
  .guide-rail li { flex: 1; }
  .guide-rail__item { margin-left: 0; padding: 0; justify-content: center; }
  .guide-rail__name { display: none; }
  .guide-rail__dot { width: 22px; height: 22px; font-size: 11px; }
  .guide-tracks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .guide-stage__toggle { padding: var(--space-3); gap: var(--space-2); }
  .guide-stage__body { padding: 0 var(--space-3) var(--space-3); }
  .guide-stage__title { font-size: var(--text-base); }
  .guide-coord { padding: var(--space-4); }
}
@media (max-width: 360px) {
  .guide-stage__toggle { grid-template-columns: auto minmax(0, 1fr); }
  .guide-stage__state { grid-column: 2; }
  .guide-step { grid-template-columns: 14px minmax(0, 1fr); }
  .guide-step__state { grid-column: 2; padding-top: 0; }
}

/* ── Tour Plan: a compact itinerary, never a calendar ───────────
   Numbered stops with small earlier / later / remove controls; the
   preferred day as one line; the help request as one quiet section. */
.saved-section__starts { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.tour-pick--in { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-sm); color: var(--text-secondary); }
.tp-page { display: grid; gap: var(--space-5); max-width: 720px; }
.tp-page .page-head { display: grid; gap: var(--space-2); }
.tp-page .page-head h1, .tp-page .page-head p { margin: 0; }
.tp-note { margin: 0; }
.tp-when, .tp-help { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--bg-card); box-shadow: var(--lift); }
.tp-when__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.tp-when__head h2 { margin: 0 0 var(--space-1); }
.tp-when__summary { margin: 0; font-weight: var(--weight-semibold); outline: none; }
.tp-when__form { display: grid; gap: var(--space-3); }
.tp-when__form .actions { display: flex; gap: var(--space-2); }
.tp-help h2, .tp-help p { margin: 0; }
.tp-help .btn { justify-self: start; }
.tp-stops-section { display: grid; gap: var(--space-2); }
.tp-stops-section > p { margin: 0; }
.tp-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tp-stop {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: 16px; background: var(--bg-card); box-shadow: var(--lift);
}
.tp-stop--unavailable { box-shadow: none; border: 1px dashed var(--border-hover); }
.tp-stop__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg-card); font-weight: var(--weight-bold); font-size: var(--text-sm); }
.tp-stop__main { display: grid; gap: 2px; min-width: 0; }
.tp-stop__main p { margin: 0; }
.tp-stop__title { font-weight: var(--weight-semibold); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.tp-stop__title:hover { text-decoration: underline; }
.tp-stop__facts { font-size: var(--text-sm); color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tp-stop__tour { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.tp-stop__unavailable { color: var(--text-secondary); padding-top: 4px; }
.tp-stop__controls { display: flex; align-items: center; gap: 4px; }
.tp-move { font: inherit; width: 36px; height: 36px; border: 1px solid var(--border-hover); border-radius: 10px; background: var(--bg-card); color: var(--text); cursor: pointer; }
.tp-move:disabled { opacity: 0.35; cursor: default; }
.tp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
@media (max-width: 640px) {
  .tp-when, .tp-help { padding: var(--space-4); }
  /* Phones: the controls take their own row under the home — the address never squeezed. */
  .tp-stop { grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2) var(--space-3); padding: var(--space-3); }
  .tp-stop__controls { grid-column: 2; }
  .tp-stop__n { width: 26px; height: 26px; }
}

/* ── Journey: a roadmap, not a checklist ─────────────────────
   Desktop: the roadmap rail on the left, the current phase and its next
   1–3 things on the right. Phones: the current phase first; the roadmap
   folds into a progress bar you can open. */
.journey-with--journey { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: baseline; }
.journey-with--journey .journey-with__label { grid-column: 1 / -1; }
.journey-with__phase, .journey-with__next { display: block; }
.journey-with__next { font-weight: var(--weight-regular, 400); color: var(--text-secondary); font-size: var(--text-sm); }
.journey-with--active { background: var(--gold-subtle); border-radius: 14px; padding: var(--space-3) var(--space-4); }
.journey-page { display: grid; gap: var(--space-6); }
.jr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.jr-rail { position: sticky; top: 84px; display: grid; gap: var(--space-3); }
.jr-rail__list { display: grid; gap: 0; position: relative; }
.jr-rail__item { position: relative; display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; color: var(--text-secondary); font-size: var(--text-sm); }
.jr-rail__item:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 30px; height: calc(100% - 24px); width: 2px; background: var(--border); }
.jr-rail__dot { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-pill); border: 2px solid var(--border-active); background: var(--bg-card); font-size: 12px; font-weight: var(--weight-bold); }
.jr-rail__item--done { color: var(--text); }
.jr-rail__item--done .jr-rail__dot { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.jr-rail__item--current { color: var(--text); font-weight: var(--weight-bold); }
.jr-rail__item--current .jr-rail__dot { background: var(--text); border-color: var(--text); color: #FFFFFF; }
.jr-rail__item--earlier .jr-rail__dot { border-style: dashed; }
.jr-main { display: grid; gap: var(--space-6); min-width: 0; }
.jr-now { background: var(--bg-card); border-radius: 22px; box-shadow: var(--lift); padding: var(--space-6); display: grid; gap: var(--space-2); }
.jr-now--deal { border-left: 4px solid var(--gold); }
.jr-now__eyebrow { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.jr-now__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); }
.jr-now__line { margin: 0; color: var(--text-secondary); }
.jr-key { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); background: var(--gold-subtle); border-radius: 14px; padding: var(--space-3) var(--space-4); }
.jr-key__day { font-family: var(--font-serif); font-size: 28px; line-height: 1.1; }
.jr-key__label { font-weight: var(--weight-semibold); }
.jr-key__source { font-size: var(--text-xs); color: var(--text-secondary); flex-basis: 100%; }
.jr-section { display: grid; gap: var(--space-3); }
.jr-steps { display: grid; gap: var(--space-3); }
.jr-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-4) var(--space-5); }
.jr-step__date { margin: 0; display: grid; place-items: center; min-width: 64px; height: 56px; padding: 0 var(--space-2); border-radius: 12px; background: var(--bg-surface); font-weight: var(--weight-bold); }
.jr-step--deadline .jr-step__date { background: var(--gold-subtle); color: var(--gold-deep); }
.jr-step__body { grid-column: 2; display: grid; gap: var(--space-1); align-content: start; min-width: 0; }
.jr-step:not(:has(.jr-step__date)) .jr-step__body { grid-column: 1 / -1; }
.jr-step__title { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); }
.jr-step__detail { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.jr-step__explain { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); }
.jr-record__details > summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-semibold); min-height: 36px; display: flex; align-items: center; }
.jr-record { display: grid; gap: var(--space-2); }
.jr-record__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.jr-record__row input { min-height: 40px; border: 1px solid var(--border-active); border-radius: 10px; padding: 0 var(--space-2); background: var(--bg-card); }
.jr-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.jr-chip { background: var(--bg-surface); border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.jr-history, .jr-dates { display: grid; gap: 0; background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-1) var(--space-5); }
.jr-history__item, .jr-dates__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.jr-history__item:first-child, .jr-dates__item:first-child { border-top: 0; }
.jr-history__what, .jr-dates__label { font-weight: var(--weight-semibold); }
.jr-history__when, .jr-dates__day { text-align: right; }
.jr-history__source, .jr-dates__source { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--text-secondary); }
.jr-dates__item--past { color: var(--text-secondary); }
.jr-unknown { display: grid; gap: 4px; }
.jr-unknown li { color: var(--text-secondary); }
.jr-unknown li::before { content: '? '; font-weight: var(--weight-bold); }
.jr-roadmap-fold { display: none; }
@media (max-width: 860px) {
  .jr-layout { grid-template-columns: minmax(0, 1fr); }
  .jr-rail { display: none; }
  .jr-roadmap-fold { display: block; background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-3) var(--space-4); }
  .jr-roadmap-fold__summary { cursor: pointer; display: grid; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); list-style: none; }
  .jr-roadmap-fold__summary::-webkit-details-marker { display: none; }
  .jr-roadmap-fold[open] .jr-rail__list { margin-top: var(--space-3); }
  .jr-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
  .jr-progress__seg { height: 6px; border-radius: 3px; background: var(--border); }
  .jr-progress__seg--done { background: var(--green); }
  .jr-progress__seg--current { background: var(--text); }
  .journey-page { gap: var(--space-4); }
  .journey-page .page-head p { display: none; }
}
@media (max-width: 640px) {
  .jr-now { padding: var(--space-5); }
  .jr-now__title { font-size: var(--text-2xl); }
  .jr-step { padding: var(--space-3) var(--space-4); }
  .jr-step__date { min-width: 52px; height: 48px; font-size: var(--text-sm); }
}
/* Journey: the person's own purchase — start, update, correct. */
.hub-purchase { display: grid; gap: var(--space-1); background: var(--gold-subtle); border-radius: 14px; padding: var(--space-4); }
.hub-purchase__phase { margin: 0; font-family: var(--font-serif); font-size: var(--text-2xl); line-height: var(--leading-tight); }
.hub-purchase__next { margin: 0; color: var(--text-secondary); }
.hub-purchase__label { font-weight: var(--weight-semibold); color: var(--text); }
.jr-track { background: var(--bg-card); border-radius: 18px; box-shadow: var(--lift); padding: var(--space-4) var(--space-5); }
.jr-track__form { display: grid; gap: var(--space-3); }
.jr-track__homes { display: grid; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.jr-track__homes legend { font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
.jr-track__home { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: 12px; }
.jr-track__home input { margin-top: 4px; accent-color: var(--text); }
.jr-track__home label { display: grid; gap: 2px; cursor: pointer; }
.jr-track__name { font-weight: var(--weight-semibold); }
.jr-track__place { font-size: var(--text-sm); color: var(--text-secondary); }
.jr-track .field input[type="date"] { min-height: 44px; border: 1px solid var(--border-active); border-radius: 10px; padding: 0 var(--space-2); background: var(--bg-card); }
.jr-track__home input[type="radio"] { flex: none; width: 20px; height: 20px; min-height: 0; }
.jr-track__home:has(input:checked) { border-color: var(--text); }
.jr-history__item--retraction .jr-history__what { color: var(--text-secondary); font-style: italic; }
.jr-history__item--retracted .jr-history__what { text-decoration: line-through; text-decoration-color: var(--text-secondary); }
.jr-history__undo { font-size: var(--text-xs); }
.jr-dates__edit { grid-column: 1 / -1; }
.jr-update .jr-record__row label { min-width: 170px; font-weight: var(--weight-semibold); }

/* ── My Home 2.0 ──────────────────────────────────────────── */
/* The homeowner's own page: identity, position, plans, history, details.
   Calm figures, each with where it came from; nothing styled like a listing. */
.mh2 .mh-hero { gap: var(--space-2); }
.mh-position { display: grid; gap: var(--space-4); min-width: 0; }
.mh-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 18px; overflow: hidden; }
.mh-figure { padding: var(--space-5); min-width: 0; display: grid; gap: 4px; align-content: start; }
.mh-figure + .mh-figure { border-left: 1px solid var(--border); }
.mh-figure__label { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); font-weight: var(--weight-semibold); }
.mh-figure__value { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1.15; overflow-wrap: anywhere; }
.mh-figure.is-unknown .mh-figure__value { font-family: inherit; font-size: var(--text-lg); color: var(--text-secondary); font-weight: var(--weight-semibold); }
.mh-figure__sub { font-size: var(--text-sm); color: var(--text-secondary); }
.mh-ask { display: grid; gap: var(--space-2); }
.mh-ask__title { font-weight: var(--weight-semibold); }
.mh-form { display: grid; gap: var(--space-4); max-width: 520px; }
.mh-mortgage { display: grid; gap: var(--space-2); }
.mh-choice { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; cursor: pointer; }
.mh-choice input { width: 20px; height: 20px; flex: none; }
.mh-sources { display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.mh-sources div { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.mh-sources dt { color: var(--text-secondary); }
.mh-sources dd { margin: 0; font-weight: var(--weight-semibold); }
.mh-plans { display: grid; gap: var(--space-3); }
.mh-plans .sp-entry { margin-top: 0; }
.mh-quiet-link { color: var(--text); font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: 3px; }
.mh-time { display: grid; gap: var(--space-4); min-width: 0; }
.mh-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.mh-year { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.mh-year__label { font-family: var(--font-serif); font-size: var(--text-xl); line-height: 1.2; }
.mh-year__items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); border-left: 1px solid var(--border-hover); padding-left: var(--space-4); }
.mh-item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.mh-item__main { min-width: 0; flex: 1 1 200px; }
.mh-item__line { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.mh-item__actions { display: flex; gap: var(--space-1); }
.mh2 .facts dd.muted { color: var(--text-secondary); font-weight: 400; }
.mh-listing { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-4); align-items: start; background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 18px; padding: var(--space-4); }
.mh-listing__media { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.mh-listing__body { display: grid; gap: var(--space-1); min-width: 0; }
.mh-listing__price { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.mh-market { display: grid; gap: var(--space-10); min-width: 0; }
.mh-divider { display: grid; gap: 2px; padding-top: var(--space-6); border-top: 1px solid var(--border-hover); }
.mh-unavailable { padding-top: var(--space-4); border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  /* Phones: the three figures as rows — label left, figure right — so your
     home, your position and the next step all sit on the first screen. */
  .mh-figures { grid-template-columns: 1fr; }
  .mh-figure { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: baseline; padding: 10px var(--space-4); gap: 2px var(--space-3); }
  .mh-figure + .mh-figure { border-left: 0; border-top: 1px solid var(--border); }
  .mh-figure__value { font-size: var(--text-lg); text-align: right; }
  .mh-figure.is-unknown .mh-figure__value { font-size: var(--text-base); }
  .mh-figure__sub { grid-column: 1 / -1; font-size: var(--text-xs); }
  /* The identity is a heading here, not a card — it leaves the room to the position. */
  .mh2 .mh-hero { padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .mh2 .mh-hero .hero__title { font-size: var(--text-xl); }
  .mh2 .mh-hero .facts-line { font-size: var(--text-sm); }
  .mh2 .story-page { gap: var(--space-6); }
  /* "A home you own" is the page itself; only a home being sold says so here. */
  .mh2 .mh-rel--owner { display: none; }
  /* The figures first; the sentence about them follows. */
  .mh2 #position .mh-position { order: 1; }
  .mh2 #position .story__sub { order: 2; font-size: var(--text-sm); }
  .mh-year { grid-template-columns: 48px minmax(0, 1fr); gap: var(--space-3); }
  .mh-listing { grid-template-columns: 1fr; }
  .mh-form .actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 380px) { .mh-facts-more { display: none; } }

/* ════════════════════════════════════════════════════════════
   Local market — Market Intelligence 1.0
   Area statistics: calm figures in the sans (they are the area's, never the
   person's own), one series hue for the trend (validated: lightness, chroma,
   contrast on the card), hairline solid grid, quiet states.
   ════════════════════════════════════════════════════════════ */
.mi-page, .mi-card, .discover__market { --mi-series: #141414; }
.mi-page { gap: var(--space-8); }
.mi-head { display: grid; gap: var(--space-2); }
.mi-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-3xl); line-height: var(--leading-tight); outline: none; }
.mi-head .segmented { margin: var(--space-2) 0 0; flex-wrap: wrap; }
.mi-updating { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md, 12px); background: var(--gold-subtle); border: 1px solid var(--gold-dim); font-size: var(--text-sm); }
.mi-section { gap: var(--space-2); }
.mi-stats { margin: var(--space-1) 0 0; }
.mi-stats--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mi-stat { display: grid; align-content: start; gap: 2px; }
.mi-stat .stat__label { margin-top: 0; font-size: var(--text-sm); color: var(--text-secondary); font-weight: var(--weight-semibold); }
.mi-stat__value { font-family: inherit; font-size: 28px; font-weight: var(--weight-semibold); line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mi-stat__value.is-quiet { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.35; padding: 6px 0; }
.mi-stat .stat__note { line-height: 1.35; }
.mi-window { display: grid; gap: var(--space-1); justify-items: start; }
.mi-window .segmented { margin: 0; flex-wrap: wrap; }
.mi-chart-wrap { position: relative; min-width: 0; max-width: 100%; overflow: hidden; }
.mi-chart { width: 100%; min-width: 0; min-height: 220px; }
.mi-trend-title { font-weight: var(--weight-semibold); }
.mi-chart__svg { display: block; overflow: visible; }
.mi-chart__grid { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; shape-rendering: crispEdges; }
.mi-chart__tick { font-size: 11px; fill: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mi-chart__line { stroke: var(--mi-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mi-chart__dot { fill: var(--mi-series); stroke: var(--bg-card); stroke-width: 2; }
.mi-chart__hit { fill: transparent; outline: none; }
.mi-chart__hit:focus-visible { fill: rgba(0, 0, 0, 0.05); }
.mi-chart__label { font-size: 12px; font-weight: 600; fill: var(--text); }
.mi-tip { position: absolute; pointer-events: none; min-width: 170px; background: var(--bg-card); border: 1px solid var(--border-active); border-radius: 10px; padding: 6px 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); font-size: var(--text-sm); }
.mi-tip strong { font-weight: var(--weight-semibold); }
.mi-table__grid { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.mi-table__grid th, .mi-table__grid td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mi-table__grid thead th { color: var(--text-secondary); font-weight: var(--weight-semibold); }
.mi-not-a-value { border-top: 1px solid var(--border); padding-top: var(--space-3); }
.mi-card { gap: var(--space-2); }
.mi-card__foot { margin-top: var(--space-1); }
.mi-card__go { justify-self: start; }
.discover__market { text-align: center; line-height: 1.5; }
.discover__market a { font-weight: var(--weight-semibold); color: var(--text); }
.discover__updates { text-align: center; line-height: 1.5; margin: var(--space-2) 0 0; }
.discover__updates a { font-weight: var(--weight-semibold); color: var(--text); }
@media (max-width: 640px) {
  .mi-title { font-size: var(--text-2xl); }
  .mi-page { gap: var(--space-6); }
}
/* Phones: figures one under another, each label beside its figure; the
   switchers become separate chips that wrap (never a page that scrolls sideways). */
@media (max-width: 520px) {
  .mi-segmented { display: flex; flex-wrap: wrap; background: none; border: 0; padding: 0; gap: 6px; }
  .mi-segmented .segmented__option { border: 1px solid var(--border-active); background: var(--bg-elevated); min-height: 36px; display: inline-flex; align-items: center; }
  .mi-segmented .segmented__option[aria-current="page"] { background: var(--cta-primary); border-color: var(--cta-primary); color: #FFFFFF; }
  .mi-stats, .mi-stats--two { grid-template-columns: 1fr; }
  .mi-stats .stat { padding: var(--space-3) 0; }
  .mi-stats .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  .mi-stat { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: baseline; }
  .mi-stat .stat__label { grid-column: 1; }
  .mi-stat__value { grid-column: 2; grid-row: 1; font-size: var(--text-xl); text-align: right; }
  .mi-stat__value.is-quiet { font-size: var(--text-sm); padding: 0; }
  .mi-stat .stat__note { grid-column: 1 / -1; }
}


/* Compact buyer-plan inputs: desktop values should not stretch across a full card. */
@media (min-width: 641px) {
  .plan-card .field:has(#plan-target),
  .plan-card .field:has(#plan-price),
  .plan-card .field:has(#plan-cash),
  .plan-card .field:has(#plan-hoa),
  .plan-card .field:has(#plan-rate),
  .plan-card .field:has(#plan-down) {
    width: 100%;
    max-width: 260px;
  }
  .plan-card .field:has(#plan-down) { max-width: 200px; }
  .plan-card .field:has(#plan-hoa),
  .plan-card .field:has(#plan-rate) { max-width: 200px; }
  .plan-card .field:has(#plan-target) .input-wrap,
  .plan-card .field:has(#plan-down) .input-wrap,
  .plan-card .field:has(#plan-price) .input-wrap,
  .plan-card .field:has(#plan-cash) .input-wrap,
  .plan-card .field:has(#plan-hoa) .input-wrap,
  .plan-card .field:has(#plan-rate) .input-wrap { width: 100%; }
}
@media (max-width: 640px) {
  .plan-card .field { width: 100%; max-width: 100%; }
}


/* Match guided budget values to the bold min/max price-range inputs. */
[data-testid="guided-buying"] #plan-target,
[data-testid="guided-buying"] #plan-down {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
[data-testid="guided-buying"] .field:has(#plan-target) .input-affix,
[data-testid="guided-buying"] .field:has(#plan-down) .input-affix {
  font-size: 16px;
  font-weight: 700;
}


/* Search-area onboarding while listing data is unavailable. */
.location-starter { max-width: 720px; display: grid; gap: 14px; }
.location-starter h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.18; letter-spacing: -.025em; }
.location-starter .field { max-width: 440px; }
.location-starter .field input { font-size: 16px; font-weight: 600; }
.location-starter__suggestions { max-width: 440px; padding: 0; margin: 6px 0 0; list-style: none; display: grid; gap: 5px; }
.location-starter__option { width: 100%; text-align: left; font: inherit; font-weight: 600; cursor: pointer; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.location-starter__option:hover, .location-starter__option:focus-visible { background: var(--bg-elevated); border-color: var(--border-active); }
.location-starter__radius { display: grid; justify-items: stretch; max-width: 440px; gap: 16px; padding-top: 10px; }
.location-starter__circle { width: 270px; height: 270px; justify-self: center; position: relative; display: grid; place-items: center; }
.location-starter__circle:before { content: ''; width: 210px; height: 210px; position: absolute; border: 2px solid #141414; border-radius: 50%; background: rgba(20,20,20,.06); transform: scale(var(--radius-scale, .7)); transition: transform .2s ease; }
.location-starter__circle-center { z-index: 1; font-weight: 700; max-width: 130px; text-align: center; }
.location-starter__circle-distance { position: absolute; bottom: 12px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.location-starter__miles { font-size: 23px; text-align: center; }
.location-starter__radius input[type=range] { width: 100%; accent-color: #141414; cursor: pointer; }
.location-starter__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }
.location-starter__saved { display: grid; gap: 14px; padding: 16px 0; }
@media(max-width: 480px) { .location-starter__circle { width: 220px; height: 220px; } .location-starter__circle:before { width: 180px; height: 180px; } }

/* Geographic reference for adjustable buyer search radius. */
.location-starter__radius { max-width: 680px; }
.location-starter__map { position: relative; height: 380px; width: 100%; overflow: hidden; border: 1px solid #e6e6e6; border-radius: 20px; display: grid; place-items: center; background: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -18px rgba(0,0,0,.18); }
.location-starter__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.location-starter__map-circle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 2px solid #141414; border-radius: 50%; background: rgba(142,142,142,.12); pointer-events: none; }
@media (max-width: 480px) { .location-starter__map { height: 340px; border-radius: 16px; } }

.location-starter__map .leaflet-container { height: 100%; width: 100%; }
.location-starter__map .leaflet-control-attribution { font-size: 10px; }

/* Self-contained Michigan SVG map: fills its frame without third-party scripts or tiles. */
.location-starter__map svg { display: block; width: 100%; height: 100%; font-family: inherit; }


/* Next step in buyer onboarding: compact property preferences. */
.location-starter__search-summary { font-size: 14px; font-weight: 700; color: var(--text); padding: 8px 0 2px; }
.location-starter__criteria { display: grid; gap: 18px; max-width: 660px; }
.location-starter__criteria-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.location-starter__criteria-field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.location-starter__criteria-field select { width: 100%; padding: 12px; background: white; color: #222; border: 1px solid #d7d7d7; border-radius: 10px; font-size: 15px; }
.location-starter__criteria-label { font-weight: 700; margin-bottom: -7px; }
.location-starter__feature-list { display: flex; gap: 9px; flex-wrap: wrap; }
.location-starter__feature { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid #dedede; border-radius: 999px; font-size: 13px; cursor: pointer; }
.location-starter__feature:has(input:checked) { border-color: #141414; background: rgba(20,20,20,.06); }
.location-starter__feature input { accent-color: #141414; }
@media(max-width: 540px) { .location-starter__criteria-grid { grid-template-columns: 1fr; } }

.location-starter__feature-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.location-starter__feature-priority { display:grid; gap:6px; border:1px solid #e3e0da; border-radius:12px; padding:12px; font-size:13px; font-weight:650; }
.location-starter__feature-priority select { width:100%; padding:9px; border-radius:9px; border:1px solid #ddd9d2; background:white; color:#222; font:inherit; font-weight:500; }
@media(max-width:540px) { .location-starter__feature-list { grid-template-columns:1fr; } }

/* Align main home-criteria dropdown values with the lighter priority dropdowns. */
.location-starter__criteria-field select { font-weight: 400; }

/* Match normal-weight values across all home-preference native dropdowns, including Safari. */
.location-starter form.location-starter__criteria .location-starter__criteria-grid .location-starter__criteria-field select,
.location-starter form.location-starter__criteria .location-starter__criteria-grid .location-starter__criteria-field select option {
  font-family: inherit !important;
  font-weight: 400 !important;
  -webkit-text-stroke: 0 !important;
}

/* Discover landing after buyer onboarding, pending live MLS feed. */
.location-starter__discover-intro { display:grid; gap:19px; max-width:660px; }
.location-starter__discovery-chips { display:flex; flex-wrap:wrap; gap:8px; }
.location-starter__discovery-chip { padding:8px 11px; border:1px solid #e3dfd7; background:#faf9f6; border-radius:999px; font-size:12px; font-weight:600; }
.location-starter__swipe-guide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.location-starter__swipe-guide > div { border:1px solid #e4e1dd; padding:18px; border-radius:13px; }
.location-starter__swipe-guide strong { font-size:17px; }
.location-starter__swipe-guide p { font-size:13px; margin-top:7px; color:#666; }
@media(max-width:520px){.location-starter__swipe-guide{grid-template-columns:1fr;}}

/* Discover workspace: an honest empty deck, not an onboarding confirmation. */
.location-starter:has(.location-starter__discover-workspace) { max-width: 840px; }
.location-starter__discover-workspace { display:grid; gap:24px; }

/* A glanceable search summary: compact, neutral and easy to edit. */
.location-starter__search-surface{
  background:#fff;border:1px solid #e6e6e6;border-radius:13px;
  box-shadow:0 2px 12px rgba(0,0,0,.02);
}
.location-starter__search-bar{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:10px 16px;padding:12px 15px;
}
.location-starter__search-details{
  min-width:0;flex:1 1 430px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;
}
.location-starter__search-place{
  display:inline-flex;align-items:center;gap:8px;flex:none;min-width:0;
}
.location-starter__search-mark{
  position:relative;display:inline-block;flex:none;width:29px;height:29px;
  border-radius:9px;background:#f3f3f3;color:#464646;
}
.location-starter__search-mark::before{
  content:'';position:absolute;top:7px;left:10px;width:10px;height:10px;
  border:1.6px solid currentColor;border-radius:55% 55% 55% 0;transform:rotate(-45deg);
}
.location-starter__search-mark::after{
  content:'';position:absolute;top:11px;left:14px;width:3px;height:3px;
  background:currentColor;border-radius:50%;
}
.location-starter__search-location-line{
  display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;min-width:0;
}
.location-starter__search-city{
  color:#252525;font:750 14px/1.35 Manrope,system-ui,sans-serif;
  letter-spacing:-.02em;overflow-wrap:anywhere;
}
.location-starter__search-distance{
  color:#686868;font:550 11px/1.35 Manrope,system-ui,sans-serif;
  white-space:nowrap;
}
.location-starter__search-place + .location-starter__discovery-chips{
  padding-left:13px;border-left:1px solid #e7e7e7;
}
.location-starter__search-details .location-starter__discovery-chips{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;
}
.location-starter__search-details .location-starter__discovery-chip{
  display:inline-flex;align-items:center;padding:5px 8px;
  border:0;background:#f5f5f5;border-radius:7px;white-space:nowrap;
  font:600 11px/1.4 Manrope,system-ui,sans-serif;color:#4b4b4b;
}
.location-starter__search-more{
  cursor:pointer;padding:5px 6px;border:0;border-radius:7px;
  background:transparent;color:#626262;
  font:650 11px/1.4 Manrope,system-ui,sans-serif;white-space:nowrap;
}
.location-starter__search-actions{display:flex;align-items:center;gap:5px;flex:none}
.location-starter__search-change,.location-starter__search-edit{
  cursor:pointer;min-height:39px;padding:8px 10px;border:1px solid transparent;
  background:transparent;border-radius:8px;color:#3b3b3b;
  font:700 11px/1.35 Manrope,system-ui,sans-serif;
  transition:background-color .15s;
}
.location-starter__search-change:hover,.location-starter__search-edit:hover,
.location-starter__search-more:hover{
  background:#f4f4f4;color:#202020;
}
.location-starter__search-edit{border-color:#e4e4e4;background:#fafafa}
.location-starter__search-empty{
  font:550 11px/1.45 Manrope,system-ui,sans-serif;color:#888;
}
.location-starter__search-change:focus-visible,
.location-starter__search-edit:focus-visible,
.location-starter__search-more:focus-visible{
  outline:2px solid #333;outline-offset:2px;
}

.location-starter__discover-toolbar {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-size:15px;font-weight:700;color:#141414;
}
@media (max-width:570px) {
  .location-starter__discover-workspace{gap:15px}
  .location-starter__search-surface{border-radius:12px}
  .location-starter__search-bar{padding:10px 11px;gap:5px 12px}
  .location-starter__search-details{flex:1 1 100%;gap:8px 11px}
  .location-starter__search-place{flex:0 0 auto}
  .location-starter__search-mark{width:27px;height:27px}
  .location-starter__search-mark::before{top:6px;left:9px}
  .location-starter__search-mark::after{top:10px;left:13px}
  .location-starter__search-city{font-size:13px}
  .location-starter__search-place + .location-starter__discovery-chips{
    padding-left:0;border-left:0;flex:1 1 100%;
  }
  .location-starter__search-actions{flex:1 1 100%;justify-content:flex-end}
  .location-starter__search-change,.location-starter__search-edit{min-height:39px;padding:8px 12px}
}
.location-starter__empty-listings { text-align:center; display:grid; justify-items:center; gap:12px; border:1px solid #e7e5e1; border-radius:18px; padding:36px 24px; background:linear-gradient(180deg,#faf9f6,#fff); }
.location-starter__empty-listings h3 { font-size:23px; margin:0; }
.location-starter__empty-listings > p { max-width:430px; line-height:1.6; }
.location-starter__empty-art { display:grid; place-items:center; width:88px; height:88px; border-radius:24px; background:#EEEEEE; color:#141414; font-size:64px; line-height:1; }
.location-starter__swipe-legend { display:flex; gap:18px; margin-top:10px; font-weight:700; color:#555; }
@media(max-width:520px){.location-starter__empty-listings{padding:24px 16px}}

/* A neutral status for preference account sync (not a form validation error). */
.location-starter__sync-status { margin:12px 0 0; color:#5f5f5f; font:500 12px/1.5 Manrope,system-ui,sans-serif; }
.location-starter__sync-status:empty { display:none; }

/* Real geographic-radius filter status; above the deck, below its controls. */
.discover__radius-note {
  margin:7px 0 12px;
  color:#5f5f5f;
  background:#EEEEEE;
  border:1px solid #EEEEEE;
  border-radius:11px;
  padding:11px 14px;
  font:600 12px/1.55 Manrope,system-ui,sans-serif;
}
@media(max-width:700px) {
  .discover__radius-note {margin:2px 0 9px;font-size:11px;padding:9px 11px}
}

/* An agency answer comes before submitting a new showing request. */
.tour-sheet__agency {margin:var(--space-3) 0;padding:var(--space-4);
  background:#EEEEEE;border:1px solid #EEEEEE;border-radius:14px}
.tour-sheet__agency .chip-row {display:grid;grid-template-columns:1fr;gap:8px}
.tour-sheet__agency .chip-radio {width:100%}
.tour-sheet__agency .chip {display:flex;width:100%;justify-content:flex-start;
  padding:11px 14px;border-radius:11px;text-align:left}
.tour-sheet__agency-note {margin:10px 0 0;font-size:12px;color:#5f5f5f}
.tour-sheet__other-agent[hidden] {display:none}

/* Tour Plan bulk-showing request uses the same pre-request agency check. */
.tp-help__agency {display:grid;gap:12px;margin:12px 0;padding:16px;
  border-radius:14px;border:1px solid #EEEEEE;background:#EEEEEE}
.tp-help__agency legend {font:700 14px/1.45 Manrope,system-ui,sans-serif;color:#141414;padding:0 2px}
.tp-help__agency-options {display:grid;gap:9px}
.tp-help__agency-choice {display:flex;align-items:center;gap:10px;cursor:pointer;
  background:#fff;border:1px solid #EEEEEE;border-radius:11px;
  padding:11px 13px;font-size:13px;font-weight:650;color:#141414}
.tp-help__agency-choice input {width:17px;height:17px;flex:none;accent-color:#141414}
.tp-help__other-agent {display:grid;gap:7px;margin:0 0 12px}
.tp-help__other-agent[hidden] {display:none}
.tp-help__other-agent input {border:1px solid #EEEEEE;border-radius:9px;
  padding:11px 13px;font:inherit;background:#fff}

/* Tour inquiry: welcome first, then a low-pressure agent coordination question. */
.tour-sheet__welcome {margin:9px 0 2px;color:#5f5f5f;font:500 13px/1.65 Manrope,system-ui,sans-serif}
.tour-sheet__agency {background:#EEEEEE;border-color:#EEEEEE;padding:14px 16px}
.tour-sheet__agency-intro {font:500 12px/1.5 Manrope,system-ui,sans-serif;
  color:#5f5f5f;margin:1px 0 12px}
.tour-sheet__agency-note {font-weight:500;color:#5f5f5f;margin-top:10px}
.tour-sheet__agency legend,.tp-help__agency legend {font-weight:750;color:#141414}

/* Newly registered clients can enter the verified self-service plan flows. */
.state .new-account-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;margin-top:18px}
.state .new-account-actions .btn{flex:1 1 175px;min-height:46px;text-align:center;justify-content:center;white-space:normal}
@media(max-width:480px){.state .new-account-actions{flex-direction:column}.state .new-account-actions .btn{flex:0 0 auto;width:100%}}


/* First listing-result view carries the visible "IDX" mark without a second
   full-width row or any mock MLS logo. Required notices remain in IDX region. */
.discover__idx-tag {display:inline-flex;align-items:center;margin-left:8px;padding:0 6px;border:1px solid currentColor;border-radius:5px;font-weight:800;font-size:11px;line-height:19px;letter-spacing:.07em;color:var(--text);}
.idx-region__notice[data-notice="search_use_notice"] {color:var(--text);font-weight:700;}
.idx-region__notice[data-notice="accuracy_disclaimer"] {color:var(--text);}

/* Tiny phones: keep the first-view IDX mark and contextual search label inside
   the available width without adding a new hero row or clipping the page. */
@media(max-width:355px){
  .discover__context{gap:4px}
  .discover__context .discover__label{overflow-wrap:anywhere}
  .discover__idx-tag{margin-left:2px;padding:0 4px}
}




/* Compact brokerage identification in the upper-right utility space.
   No banner, logo, background block or interference with Navesta navigation. */
.acct-brand img { width: 100px; height: auto; }
.acct-professional {
  box-sizing: border-box;
  max-width: 1040px;
  width: 100%;
  min-height: 28px;
  margin: 0 auto;
  padding: 3px 20px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  background: transparent;
  border: 0;
}
.acct-professional__name { 
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  border: 0;
  font-size: 11px;
}
.acct-professional__broker {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
  white-space: nowrap;
}
.acct-professional__office {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text-secondary);
}
.acct-professional__office:hover { text-decoration: underline; }
@media (min-width: 641px) and (max-width: 950px) {
  .acct-header__inner { gap: 10px; padding-inline: 14px; }
  .acct-brand img { width: 94px; }
  .acct-nav { gap: 2px; min-width: 0; }
  .acct-nav__link { padding: 8px 7px; font-size: 12px; }
}
@media (max-width: 640px) {
  .acct-brand img { width: 90px; }
  .acct-professional {
    min-height: 27px;
    padding: 2px 12px 0;
    gap: 8px;
  }
  .acct-professional__broker { font-size: 17px; }
  .acct-professional__office { font-size: 10px; }
}
@media (max-width: 355px) {
  .acct-brand img { width: 84px; }
  .acct-professional { padding-inline: 10px; gap: 7px; }
  .acct-professional__broker { font-size: 16px; }
}

/* Signed-in Buying Power summary: actual saved account figures, not a
   fictitious completion counter or unsaved price-range estimate. */
.hub-buying-power{margin:16px 0 18px}
.hub-buying-power>.hub-door__q{margin:0 0 12px}
.hub-bp-saved{display:flex;flex-direction:column;gap:12px}
.hub-bp-head{font-weight:700;font-size:14px;margin:0}
.hub-bp-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hub-bp-metric{display:flex;flex-direction:column;gap:3px;min-width:0}
.hub-bp-value{font-weight:700;font-size:clamp(17px,2.8vw,23px);line-height:1.2;word-break:normal}
.hub-bp-label{font-size:12px;color:var(--text-secondary,#6a6865);line-height:1.4}
.hub-bp-note{font-size:12px;margin:0;color:var(--text-secondary,#6a6865)}
@media(max-width:380px){.hub-bp-metrics{grid-template-columns:1fr 1fr;gap:9px}}


/* Official licensed employing broker on every authenticated page. */
.acct-professional__logo{display:block;flex:none;width:132px;height:30px;object-fit:contain;object-position:center}
@media(max-width:640px){.acct-professional__logo{width:118px;height:28px}}
@media(max-width:355px){.acct-professional__logo{width:110px;height:26px}}

/* Realcomp reviewer legibility: keep the full brokerage phone inside the
   viewport even at narrow widths. The broker logo remains more prominent
   than the Navesta account wordmark; never clip the office contact. */
.acct-professional{
  flex-wrap:wrap;
  column-gap:11px;
  row-gap:3px;
  padding-left:max(20px,env(safe-area-inset-left));
  padding-right:max(20px,env(safe-area-inset-right));
}
.acct-professional__office{
  font-size:12px;
  line-height:1.4;
  overflow-wrap:normal;
}
@media(max-width:640px){
  .acct-professional{
    flex-direction:column;
    align-items:flex-end;
    justify-content:center;
    padding:5px max(14px,env(safe-area-inset-right)) 5px max(14px,env(safe-area-inset-left));
    gap:1px;
  }
  .acct-professional__office{font-size:12px;white-space:nowrap;}
}
@media(max-width:355px){
  .acct-professional__office{font-size:11.5px;}
}


/* Fail gracefully when a signed photo has expired and the one safe refresh
   cannot restore it. The listing and attribution remain visible. */
.listing-photo__unavailable {
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:16px;text-align:center;background:#EEEEEE;color:#343332;
  font-size:14px;font-weight:600;
}

/* ── Discover: Pass and Save on the photo (master spec §5, 2026-11-21) ──
   The buttons stay outside the card (so they keep focus and never fly off
   with it) and are pinned over the top home's photo: Pass at the left edge,
   Save at the right, Undo small at the foot of the photo. navesta-
   account.js measures the photo into --media-top / --media-h. Only the home
   being decided shows: the next one appears only while this one is dragged. */
.discover__deck { position: relative; }
.discover.discover--deciding .discover__deck { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stack"; }
.discover.discover--deciding .discover__actions {
  display: block; position: absolute; z-index: 3; left: 0; right: 0;
  top: var(--media-top, 0px); height: var(--media-h, 0px); min-height: 0; pointer-events: none;
}
.discover.discover--deciding .discover__actions::before { content: none; }
.discover.discover--deciding .discover__actions > .round-btn { position: absolute; pointer-events: auto; }
.discover.discover--deciding .discover__actions > .round-btn--pass { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.discover.discover--deciding .discover__actions > .round-btn--save { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.discover.discover--deciding .discover__actions > .round-btn--undo { left: 50%; bottom: var(--space-3); transform: translateX(-50%); }
/* Second Look: the reason sits at the foot of the photo, so the buttons move to its top. */
.discover--second-look.discover--deciding .discover__actions > .round-btn--pass,
.discover--second-look.discover--deciding .discover__actions > .round-btn--save { top: var(--space-3); transform: none; }
.discover--second-look.discover--deciding .discover__actions > .round-btn--undo { top: var(--space-3); bottom: auto; }
.discover.discover--deciding .discover__actions .round-btn__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.discover.discover--deciding .discover__actions .round-btn__icon { width: 56px; height: 56px; font-size: 22px; box-shadow: 0 6px 20px rgba(26,26,26,0.26); }
.discover.discover--deciding .discover__actions .round-btn--pass .round-btn__icon { background: rgba(255,255,255,0.96); border-color: rgba(255,255,255,0.96); color: var(--text); }
.discover.discover--deciding .discover__actions .round-btn--undo .round-btn__icon { width: 40px; height: 40px; font-size: 17px; background: rgba(255,255,255,0.92); box-shadow: 0 3px 12px rgba(26,26,26,0.22); }
.home-card--behind-1 { transform: scale(calc(0.97 + 0.03 * var(--drag))); opacity: var(--drag); }
.home-card--behind-2, .home-card--behind-1.is-entering, .home-card--behind-2.is-entering { transform: none; opacity: 0; }
/* The card: readable facts and one clear way into the full listing. */
.discover .home-card__price-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.discover .home-card__price-row .nms-badge { flex: none; }
.discover .match-pending-link { text-decoration: none; }
.discover .home-card__details { justify-self: stretch; margin-top: var(--space-3); min-height: 46px; font-size: var(--text-base); }
@media (min-width: 900px) {
  .discover__head, .discover__count, .discover__tray, .discover__keys { max-width: 540px; }
  .discover.discover--deciding .discover__deck { max-width: 540px; width: 100%; justify-self: center; }
  /* The Discover switch already names the page (as on phones); the heading stays for screen readers. */
  .discover__title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* The photo takes the room the page has: the whole card stays in view. */
  .discover.discover--deciding .home-card .listing-media { height: clamp(220px, calc(100vh - 520px), 560px); }
}
@media (max-width: 640px) {
  /* Phones: the card runs to just above the tab bar; the photo takes the slack. */
  .discover { --media-min: 210px; }
  .discover.discover--deciding .discover__deck { grid-template-rows: minmax(0, 1fr); }
  .discover--deciding .discover__tray:not(:empty) { bottom: var(--actions-bottom); }
  .discover.discover--deciding .discover__actions .round-btn__icon { width: 52px; height: 52px; }
  .discover.discover--deciding .home-card__body { padding: 12px 16px 14px; gap: 3px; }
  .discover.discover--deciding .home-card__price { font-size: 28px; }
  .discover.discover--deciding .home-card__facts { font-size: 15px; }
  .discover.discover--deciding .home-card__place { font-size: 14px; }
  .discover.discover--deciding .home-card__more { font-size: 13px; }
  .discover.discover--deciding .home-card__details { margin-top: var(--space-2); min-height: 44px; }
}
@media (max-width: 640px) and (max-height: 780px) {
  .discover { --media-min: 150px; }
  /* The extra facts give way first on short phones; they are on the details page. */
  .discover.discover--deciding .home-card__more { display: none; }
}
@media (max-width: 640px) and (max-height: 600px) {
  .discover { --media-min: 136px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-card--behind-1, .home-card--behind-1.is-entering { transform: none; opacity: var(--drag); }
  .home-card--behind-2, .home-card--behind-2.is-entering { transform: none; opacity: 0; }
}

/* Property Details from the MLS: description (expandable) and features. */
.detail-description, .detail-features { margin-top: var(--space-5); display: grid; gap: var(--space-2); }
.detail-description__more { justify-self: start; font-weight: var(--weight-semibold); }
.facts--features dd { overflow-wrap: anywhere; }

/* ── Property Details v2, 2026-11-22 ──────────────────────────
   Whole photos; price → address → icon tiles → chips; a tour card in
   Trevor's name; About this home; an inviting Your fit; grouped features. */
.detail-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Photos: the entire picture, centered over a blurred copy of itself. */
.detail-media .gallery { aspect-ratio: 3 / 2; max-height: min(74vh, 660px); width: 100%; background: #1d1b18; }
.gallery__slide { overflow: hidden; background: #1d1b18; }
.gallery__slide .gallery__backdrop {
  position: absolute; inset: -32px; width: calc(100% + 64px); height: calc(100% + 64px);
  object-fit: cover; filter: blur(28px) saturate(1.15) brightness(.82); transform: scale(1.04); pointer-events: none;
}
.gallery__slide .gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.detail-media .listing-media--hero { aspect-ratio: 3 / 2; max-height: min(74vh, 660px); }
.detail-media .listing-media--hero .listing-media__img { object-fit: contain; background: #1d1b18; }

/* Header */
.detail-home .detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-4); row-gap: 0; align-items: start; }
.detail-home .detail-head__main { display: contents; }
.detail-home .detail-head__main > * { grid-column: 1 / -1; min-width: 0; }
.detail-home .detail-head__main > .detail-price-row { grid-column: 1; grid-row: 1; }
.detail-home .detail-head__main > .detail-price__note { grid-column: 1; grid-row: 2; }
.detail-home .detail-head__action { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.detail-home .detail-price { font-size: clamp(36px, 8vw, 48px); letter-spacing: -0.02em; line-height: 1; }
.detail-home .detail-price__note { margin-top: 6px; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.detail-home .detail-title { margin-top: var(--space-4); font-size: clamp(20px, 4.6vw, 24px); line-height: 1.25; letter-spacing: -0.01em; }
.detail-place { margin-top: 2px; color: var(--text-secondary); font-size: var(--text-base); }
.detail-home .detail-head__action .save-btn {
  min-height: 44px; padding: 0 var(--space-4); border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-active, rgba(0,0,0,.12)); box-shadow: 0 1px 2px rgba(0,0,0,.05); font-weight: var(--weight-semibold);
}

/* Icon tiles: beds, baths, sq ft, acres */
.detail-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.detail-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4); border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border);
}
.detail-tile__icon { grid-row: 1 / span 2; width: 26px; height: 26px; color: var(--text); }
.detail-tile__value { grid-column: 2; grid-row: 1; margin: 0; font-size: var(--text-xl); font-weight: var(--weight-bold); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.detail-tile__label { grid-column: 2; grid-row: 2; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.2; }
.detail-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.detail-chip { padding: 6px 12px; border-radius: 999px; background: var(--bg-elevated); font-size: var(--text-sm); font-weight: var(--weight-medium, 500); color: var(--text); }
.detail-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.detail-quick > *, .detail-quick .decision__item { margin: 0; }
.detail-quick .link-btn, .detail-quick .btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: 999px;
  border: 1px solid var(--border-active, rgba(0,0,0,.12)); background: var(--bg-card); color: var(--text);
  font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration: none;
}

/* Tour card — black and white, with Trevor's photo */
.tour-panel.tour-panel--ask {
  grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-4); row-gap: var(--space-3);
  padding: var(--space-5); border-radius: 22px; border: 1px solid var(--border); background: var(--bg-card); box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.tour-panel--ask .tour-panel__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg-elevated); }
.tour-panel--ask .tour-panel__copy { display: grid; gap: 4px; min-width: 0; }
.tour-panel--ask .tour-panel__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); line-height: 1.2; color: var(--text); }
.tour-panel--ask .tour-panel__lede { max-width: 48ch; color: var(--text-secondary); }
.tour-panel--ask .tour-panel__ask {
  grid-column: 3; grid-row: 1; min-height: 48px; padding: 0 var(--space-6); border-radius: 999px; white-space: nowrap;
  background: #1a1a1a; color: #fff; border: 0; font-weight: var(--weight-bold);
}
.tour-panel--ask .tour-panel__contract { grid-column: 1 / -1; }

/* Cards that follow the header */
.detail--v2 .detail-card { padding: var(--space-6); border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border); }
.detail-card__title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-xl); line-height: 1.2; margin-bottom: var(--space-3); }
.detail-description__text { display: grid; gap: var(--space-3); font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.detail-description__text.is-clamped { display: grid; -webkit-line-clamp: unset; max-height: calc(1.6em * 6); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.detail-description__more {
  margin-top: var(--space-3); padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: var(--weight-semibold); color: var(--text); text-decoration: underline; text-underline-offset: 4px;
}

/* Your fit — the invitation */
.fit-panel.fit-invite {
  position: relative; overflow: hidden; display: grid; gap: var(--space-3);
  padding: var(--space-6); border-radius: 22px; border: 1px solid var(--border); background: var(--bg-card); box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.fit-invite__eyebrow { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.fit-invite__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(24px, 5vw, 32px); line-height: 1.15; letter-spacing: -0.01em; max-width: 22ch; }
.fit-invite__lede { color: var(--text-secondary); max-width: 52ch; }
.fit-invite__list { display: grid; gap: var(--space-2); margin: var(--space-1) 0 0; padding: 0; list-style: none; }
.fit-invite__list li { display: flex; align-items: center; gap: var(--space-3); font-weight: var(--weight-semibold); }
.fit-invite__check { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #1a1a1a; color: #fff; stroke-width: 2.4; }
.fit-invite__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-2); }
.fit-invite__cta {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 50px; padding: 0 var(--space-6); border-radius: 999px;
  background: #1d1b18; color: #fff; font-weight: var(--weight-bold); text-decoration: none;
}
.fit-invite__cta:hover { background: #000; }
.fit-invite__arrow { transition: transform .15s ease; }
.fit-invite__cta:hover .fit-invite__arrow { transform: translateX(3px); }
.fit-invite__note { font-size: var(--text-sm); color: var(--text-secondary); }
.fit-invite__plan .plan-entry { margin: 0; }
.fit-invite__plan .plan-entry__link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-secondary); }

/* Features & details: themed groups */
.detail--v2 .listing-block { padding: 0; background: none; border: 0; box-shadow: none; }
.detail--v2 .listing-block > .label-row { margin-bottom: 0; }
.detail--v2 .listing-block > .label-row .story__label { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); letter-spacing: 0; text-transform: none; color: var(--text); }
.detail--v2 .listing-block > * + * { margin-top: var(--space-4); }
.feature-groups { columns: 2; column-gap: var(--space-3); }
.feature-group { break-inside: avoid; margin: 0 0 var(--space-3); padding: var(--space-5); border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.feature-group__title { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); font-size: var(--text-base); font-weight: var(--weight-bold); }
.feature-group__icon { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--bg-elevated); color: var(--text); }
.feature-group__rows { display: grid; gap: var(--space-3); margin: 0; }
.feature-row { display: grid; gap: 4px; }
.feature-row dt { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-secondary); }
.feature-row dd { margin: 0; font-weight: var(--weight-semibold); }
.feature-row__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-chip { padding: 4px 10px; border-radius: 999px; background: var(--bg-elevated); font-size: var(--text-sm); font-weight: var(--weight-medium, 500); }
.detail-history .rows { margin: 0; }

@media (max-width: 640px) {
  .detail-media .gallery, .detail-media .listing-media--hero { aspect-ratio: 4 / 3; max-height: none; }
  .detail-home .detail-price { font-size: 38px; }
  .detail-home .detail-title { margin-top: var(--space-3); }
  .detail-tiles { gap: 6px; }
  .detail-tile { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: center; text-align: center; row-gap: 2px; padding: var(--space-3) 4px; border-radius: 14px; }
  .detail-tile__icon { grid-row: 1; width: 22px; height: 22px; margin-bottom: 2px; }
  .detail-tile__value { grid-column: 1; grid-row: 2; font-size: var(--text-lg); }
  .detail-tile__label { grid-column: 1; grid-row: 3; font-size: var(--text-xs); }
  .detail-description__text { font-size: 14px; line-height: 1.6; }
  .tour-panel.tour-panel--ask { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-4); }
  .tour-panel--ask .tour-panel__photo { width: 56px; height: 56px; }
  .tour-panel--ask .tour-panel__ask { grid-column: 1 / -1; grid-row: auto; width: 100%; }
  .detail--v2 .detail-card, .fit-panel.fit-invite { padding: var(--space-5); }
  .detail-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .detail-quick::-webkit-scrollbar { display: none; }
  .detail-quick .link-btn, .detail-quick .btn { white-space: nowrap; }
  .feature-groups { columns: 1; }
  .fit-invite__cta { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
  .detail-tile__value { font-size: 15px; }
  .detail-tile__label { font-size: 11px; letter-spacing: 0; }
}
/* Discover: the buyer's own plan applied to this home */
.home-card__estimate { margin: 2px 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
.home-card__estimate strong { color: var(--text); font-weight: var(--weight-bold); }
/* Filters sheet: Save this search, under the sheet's buttons */
.sheet__save { padding: 0 var(--space-5) var(--space-4); }
.sheet__save .search-save { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sheet__save .save-search-form { display: grid; gap: var(--space-2); width: 100%; }

/* ── Home v2, 2026-11-22 (polished: calm type, one big number) ──
   Greeting → one hero → three tiles → one main action → quiet links.
   Black and white; every card does one job; never overwhelming. */
.hub--v2 { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.home2-head { display: grid; gap: 2px; margin: 4px 0 2px; }
.home2-greeting { font-family: var(--font-serif); font-weight: 500; font-size: clamp(24px, 5vw, 28px); line-height: 1.15; letter-spacing: -0.01em; }
.home2-summary { color: var(--text-secondary); font-size: 14px; }
.home2-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 4px; }
.home2-hero {
  display: grid; gap: 6px; padding: 20px 22px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.home2-hero__title { font-family: var(--font-serif); font-weight: 500; font-size: 20px; line-height: 1.25; }
.home2-hero__facts { color: var(--text-secondary); font-size: 14px; }
.home2-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.home2-hero__actions .btn { min-height: 44px; border-radius: 999px; padding: 0 22px; font-size: 15px; background: #1a1a1a; border-color: #1a1a1a; }
.home2-value { display: grid; gap: 2px; margin-top: 8px; }
.home2-value__range { font-family: var(--font-serif); font-size: clamp(28px, 6vw, 32px); line-height: 1.1; letter-spacing: -0.015em; }
.home2-value__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.home2-value__meta .confidence { font-size: 12px; }
.home2-value__note, .home2-value__none { color: var(--text-secondary); font-size: 13px; }
.home2-equity { margin-top: 2px; font-size: 14px; }
/* Hero with a photo (pick up where you left off) */
.home2-hero--home { padding: 0; overflow: hidden; gap: 0; grid-template-columns: minmax(0, 1fr); }
.home2-hero--home .home2-hero__media { display: block; }
.home2-hero--home .listing-media { aspect-ratio: 16 / 9; height: auto; border-radius: 0; min-height: 0; }
.home2-hero--home .listing-media--whole { position: relative; overflow: hidden; background: #1d1b18; }
.home2-hero--home .listing-media--whole .listing-media__backdrop { position: absolute; inset: -32px; width: calc(100% + 64px); height: calc(100% + 64px); object-fit: cover; filter: blur(26px) brightness(.8); }
.home2-hero--home .listing-media--whole .listing-media__img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.home2-hero__body { display: grid; gap: 6px; padding: 16px 22px 20px; }
.home2-hero__body .listing-source { font-size: 12px; }
.home2-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #1a1a1a; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
@media (min-width: 760px) {
  .home2-hero--home { grid-template-columns: 44% minmax(0, 1fr); align-items: stretch; }
  .home2-hero--home .listing-media { aspect-ratio: auto; height: 100%; min-height: 220px; }
  .home2-hero__body { align-content: center; }
}
/* Three tiles */
.home2-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home2-tile {
  display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 16px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0;
}
.home2-tile:hover { border-color: #1a1a1a; }
.home2-tile__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.home2-tile__value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home2-tile__value--small { font-size: 15px; white-space: normal; }
.home2-tile__note { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Cards */
.home2-card { display: grid; gap: 10px; padding: 18px 22px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border); }
.home2-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home2-card__title { font-family: var(--font-serif); font-weight: 500; font-size: 18px; line-height: 1.25; }
.home2-card__lede { color: var(--text-secondary); font-size: 13px; margin-top: 1px; }
.home2-card__link { font-size: 13px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.home2-card__foot { font-size: 12px; color: var(--text-secondary); }
.home2-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.home2-strip__ph { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg-elevated); }
.home2-strip__ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home2-swipe__go { justify-self: start; min-height: 44px; border-radius: 999px; padding: 0 22px; font-size: 15px; }
.home2-swipe .btn--primary { background: #1a1a1a; border-color: #1a1a1a; }
.home2-lines { display: grid; gap: 6px; }
.home2-lines > * { margin: 0; }
.home2-search .journey-with { padding: 10px 12px; border-radius: 12px; }
.home2-search .journey-with__label { font-size: 10px; }
.home2-search .journey-with__text { font-size: 14px; }
.home2-search .journey-with__edit { font-size: 12px; }
.home2-invite.fit-panel.fit-invite { padding: 18px 22px; gap: 8px; border-radius: 20px; }
.home2-invite .fit-invite__title { font-size: 20px; }
.home2-invite .fit-invite__lede { font-size: 14px; }
.home2-invite .fit-invite__cta { min-height: 44px; padding: 0 20px; font-size: 15px; }
/* What's happening near you */
.home2-activity { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.home2-activity__item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.home2-activity__item:first-child { border-top: 0; padding-top: 2px; }
.home2-activity__dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #1a1a1a; }
.home2-activity__dot--price_reduced { background: #FFFFFF; box-shadow: inset 0 0 0 2px #141414; }
.home2-activity__dot--sold { background: #141414; }
.home2-activity__dot--went_under_contract, .home2-activity__dot--went_pending { background: #727272; }
.home2-activity__main { display: grid; gap: 1px; min-width: 0; }
.home2-activity__what { font-size: 14px; font-weight: 600; }
.home2-activity__where { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home2-activity__empty { font-size: 14px; color: var(--text-secondary); }
/* Quiet links */
.home2-quiet { display: grid; gap: 8px; padding: 4px 2px; }
.home2-quiet a { color: var(--text); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Brand-new: two doors */
.home2-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home2-door { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: 20px; background: #1a1a1a; color: #fff; text-decoration: none; }
.home2-door--quiet { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.home2-door__icon { font-size: 22px; line-height: 1; }
.home2-door__title { font-family: var(--font-serif); font-size: 20px; font-weight: 500; }
.home2-door__text { opacity: .82; font-size: 14px; }
.home2-door__go { margin-top: 4px; font-weight: 700; font-size: 14px; }
.home2-door__link { grid-column: 1 / -1; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hub--v2 .hub__foot { font-size: 13px; }
@media (max-width: 640px) {
  .hub--v2 { gap: 12px; }
  .home2-hero { padding: 18px; }
  .home2-hero__body { padding: 14px 18px 18px; }
  .home2-hero__actions .btn { width: 100%; }
  .home2-tiles { gap: 6px; }
  .home2-tile { padding: 10px 12px; border-radius: 14px; }
  .home2-tile__value { font-size: 17px; }
  .home2-card { padding: 16px 18px; }
  .home2-swipe__go { justify-self: stretch; }
  .home2-doors { grid-template-columns: 1fr; }
  .home2-invite.fit-panel.fit-invite { padding: 16px 18px; }
}

/* Home v2 — homeowner card, 2026-11-22 (black, quiet, one number) */
.home2-own {
  display: grid; gap: 0; border-radius: 22px; overflow: hidden;
  background: #141414; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.home2-own__top { display: grid; gap: 3px; padding: 20px 22px 0; }
.home2-own__eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.home2-own__address { margin: 0; font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.home2-own__facts { margin: 0; font-size: 13px; color: rgba(255,255,255,.6); }
.home2-own__value { display: grid; gap: 6px; padding: 22px 22px 18px; }
.home2-own__label { margin: 0; font-size: 12px; color: rgba(255,255,255,.6); }
.home2-own__range { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 9vw, 40px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.home2-own__dash { color: rgba(255,255,255,.35); font-size: .7em; }
.home2-own__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.65); }
.home2-own__conf { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; }
.home2-own__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.home2-own__bars i { display: block; width: 3px; border-radius: 1px; background: rgba(255,255,255,.25); }
.home2-own__bars i:nth-child(1) { height: 5px; }
.home2-own__bars i:nth-child(2) { height: 8px; }
.home2-own__bars i:nth-child(3) { height: 11px; }
.home2-own__conf[data-level="1"] .home2-own__bars i:nth-child(-n+1),
.home2-own__conf[data-level="2"] .home2-own__bars i:nth-child(-n+2),
.home2-own__conf[data-level="3"] .home2-own__bars i { background: #fff; }
.home2-own__note { margin: 2px 0 0; font-size: 12px; color: rgba(255,255,255,.45); }
.home2-own__none { margin: 0; padding: 20px 22px; font-size: 14px; color: rgba(255,255,255,.75); }
.home2-own__equity { display: flex; justify-content: space-between; gap: 12px; margin: 0 22px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; color: rgba(255,255,255,.75); }
.home2-own__equity strong { color: #fff; }
.home2-own__go {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-top: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600;
}
.home2-own__go:hover { background: rgba(255,255,255,.05); }
.home2-own__go:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.home2-own__more { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.55); }
.home2-own__chev { margin-left: auto; font-size: 22px; line-height: 1; color: rgba(255,255,255,.6); }
@media (min-width: 760px) {
  .home2-own__top { padding: 24px 28px 0; }
  .home2-own__value { padding: 26px 28px 22px; }
  .home2-own__equity { margin: 0 28px; }
  .home2-own__go { padding: 0 28px; }
  .home2-own__range { font-size: 44px; }
}

/* Home v2 — line-drawn house + nearby radar, 2026-11-22 */
.home2-own__body { position: relative; }
.home2-own__main { position: relative; z-index: 1; }
.home2-art { position: absolute; top: 16px; right: 16px; width: 84px; color: rgba(255,255,255,.85); pointer-events: none; }
.home2-art svg { display: block; width: 100%; height: auto; }
.home2-own__eyebrow, .home2-own__address { padding-right: 92px; }
.home2-art [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: home2-draw 1.6s cubic-bezier(.55,.1,.25,1) forwards; }
.home2-art .home2-art__win { animation-delay: .9s; }
.home2-art .home2-art__mull { animation-delay: 1.1s; stroke-width: 1; opacity: .7; }
.home2-art .home2-art__sky [pathLength] { animation-delay: 1.2s; opacity: .7; }
.home2-art__knob, .home2-art__star { opacity: 0; animation: home2-fade .6s 1.5s forwards; }
.home2-art__star { fill: currentColor; stroke: none; }
.home2-art--night .home2-art__win { fill: rgba(217,217,217,0); animation: home2-draw 1.6s .9s cubic-bezier(.55,.1,.25,1) forwards, home2-glow 1.2s 2s ease forwards; }
@keyframes home2-draw { to { stroke-dashoffset: 0; } }
@keyframes home2-fade { to { opacity: 1; } }
@keyframes home2-glow { to { fill: rgba(217,217,217,.85); stroke: rgba(227,227,227,1); filter: drop-shadow(0 0 6px rgba(206,206,206,.6)); } }
@media (min-width: 760px) {
  .home2-own__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; }
  .home2-art { position: relative; top: auto; right: auto; width: 100%; padding: 22px 32px 10px 0; order: 2; }
  .home2-own__top { padding-right: 28px; }
  .home2-own__eyebrow, .home2-own__address { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home2-art [pathLength] { animation: none; stroke-dashoffset: 0; }
  .home2-art__knob, .home2-art__star { animation: none; opacity: 1; }
  .home2-art--night .home2-art__win { animation: none; fill: rgba(217,217,217,.85); }
}

.home2-radar { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: center; padding: 4px 0 6px; }
.home2-radar[hidden] { display: none; }
.home2-radar__fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.home2-radar__ring { fill: none; stroke: #c9c9c9; stroke-width: 1; stroke-dasharray: 2 3; }
.home2-radar__halo { fill: #fff; stroke: #141414; stroke-width: 1.4; }
.home2-radar__mi { font-size: 9px; fill: var(--text-secondary); text-anchor: middle; font-family: inherit; }
.home2-radar__you { fill: #141414; }
.home2-radar__sweep { fill: none; stroke: #141414; stroke-width: 1; opacity: 0; transform-origin: 110px 110px; animation: home2-ping 2.8s 1s ease-out infinite; }
.home2-radar__dot { opacity: 0; transform-box: fill-box; transform-origin: center; animation: home2-pop .45s cubic-bezier(.3,1.6,.5,1) forwards; }
.home2-radar__dot--sold { fill: #141414; }
.home2-radar__dot--active { fill: #fff; stroke: #141414; stroke-width: 1.6; }
.home2-radar__dot--under_contract { fill: #9a9a9a; }
@keyframes home2-pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes home2-ping { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(11); } }
.home2-radar__side { display: grid; gap: 10px; }
.home2-radar__legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.home2-radar__legend li { display: flex; align-items: center; gap: 8px; }
.home2-radar__key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.home2-radar__key--you { background: #141414; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #141414; }
.home2-radar__key--sold { background: #141414; }
.home2-radar__key--active { background: #fff; border: 1.6px solid #141414; }
.home2-radar__key--under_contract { background: #9a9a9a; }
.home2-radar__cap { margin: 0; font-size: 12px; color: var(--text-secondary); }
.home2-activity__dot--active { background: #fff; border: 1.6px solid #141414; }
.home2-activity__dot--under_contract { background: #9a9a9a; }
a.home2-activity__main { color: inherit; text-decoration: none; }
.home2-activity .listing-source { font-size: 11px; margin: 2px 0 0; color: var(--text-secondary); }
@media (max-width: 640px) {
  .home2-radar { grid-template-columns: 1fr; gap: 10px; }
  .home2-radar__fig { width: min(200px, 64%); margin: 0 auto; }
  .home2-radar__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .home2-radar__dot { animation: none; opacity: 1; }
  .home2-radar__sweep { animation: none; }
}

/* Equity in one step (Home), 2026-11-22 */
.eq-sheet__body { display: grid; gap: 8px; }
.eq-sheet__label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.eq-sheet__input { font-family: var(--font-serif); font-size: 32px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); color: var(--text); width: 100%; box-sizing: border-box; }
.eq-sheet__input:focus { outline: none; border-color: #141414; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.eq-sheet__hint { font-size: 13px; color: var(--text-secondary); margin: 0; }
.eq-sheet__paid { justify-self: start; background: none; border: 0; padding: 6px 0; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--text); cursor: pointer; }
.eq-sheet__status { font-size: 13px; color: var(--text-secondary); min-height: 1em; margin: 0; }
.eq-sheet__save { width: 100%; min-height: 48px; border-radius: 999px; background: #141414; border-color: #141414; }

/* Value over time on the home card — range band, soft area, smooth line, the latest reading marked */
.home2-trend { display: grid; gap: 6px; margin-top: 18px; padding: 14px 14px 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); max-width: 560px; }
.home2-trend__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home2-trend__label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.home2-trend__chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-variant-numeric: tabular-nums; }
.home2-trend__chip.is-up { background: #fff; color: #141414; }
.home2-trend__fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.home2-trend__grid { stroke: rgba(255,255,255,.07); stroke-width: 1; stroke-dasharray: 2 4; }
.home2-trend__band { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.14); stroke-width: .8; opacity: 0; animation: home2-fade .8s .2s ease forwards; }
.home2-trend__area { opacity: 0; animation: home2-fade .9s .9s ease forwards; }
.home2-trend__line { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: home2-draw 1.3s .35s cubic-bezier(.55,.1,.25,1) forwards; }
.home2-trend__pt { fill: #141414; stroke: rgba(255,255,255,.75); stroke-width: 1.4; opacity: 0; animation: home2-fade .4s 1.2s forwards; }
.home2-trend__now { fill: #fff; opacity: 0; animation: home2-fade .3s 1.5s forwards; }
.home2-trend__halo { fill: rgba(255,255,255,.18); opacity: 0; transform-box: fill-box; transform-origin: center; animation: home2-fade .3s 1.5s forwards, home2-breathe 2.6s 1.8s ease-in-out infinite; }
@keyframes home2-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.35); opacity: .35; } }
.home2-trend__axis { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }
.home2-trend__text { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.65); }
@media (prefers-reduced-motion: reduce) {
  .home2-trend__line { animation: none; stroke-dashoffset: 0; }
  .home2-trend__band, .home2-trend__area, .home2-trend__pt, .home2-trend__now, .home2-trend__halo { animation: none; opacity: 1; }
}

/* Email opt-ins on Home (switch) */
.home2-switch-row { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.home2-switch-row[hidden] { display: none; }
.home2-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 4px 0; background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.home2-switch__text { font-size: 14px; font-weight: 600; }
.home2-switch__track { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #d4d4d4; transition: background .2s; }
.home2-switch__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.home2-switch[aria-checked="true"] .home2-switch__track { background: #141414; }
.home2-switch[aria-checked="true"] .home2-switch__knob { transform: translateX(18px); }
.home2-switch:focus-visible { outline: 2px solid #141414; outline-offset: 3px; border-radius: 8px; }
.home2-switch__note { margin: 0; font-size: 12px; color: var(--text-secondary); min-height: 0; }
.home2-switch__note:empty { display: none; }

/* Compare (homes and moves) at 320px: the sticky strip bleeds 16px into a
   13px gutter. Clip the 3px without creating a scroll container (sticky keeps working). */
.compare-page { overflow-x: clip; }

/* Home: the owner's plans (selling plan, the move) */
.home2-plans-slot { display: none; }
.home2-plans__rows { display: grid; }
.home2-plan-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.home2-plan-row:first-child { border-top: 0; padding-top: 2px; }
.home2-plan-row__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.home2-plan-row__title { font-size: 15px; font-weight: 600; }
.home2-plan-row__line { font-size: 13px; color: var(--text-secondary); }
.home2-plan-row__go { flex: none; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Client app is black and white (2026-11-22): every gold accent becomes ink or a soft gray. */
:root {
  --gold: #1a1a1a; --gold-bright: #1a1a1a; --gold-deep: #1a1a1a;
  --gold-dim: rgba(0, 0, 0, .35); --gold-subtle: #f1f1ef; --gold-glow: rgba(0, 0, 0, .06);
}

/* Guest mode note (working with another agent) */
.home2-guest { display: grid; gap: 4px; padding: 14px 18px; border-radius: 16px; border: 1px dashed var(--border); }
.home2-guest__title { margin: 0; font-size: 14px; font-weight: 600; }
.home2-guest__text { margin: 0; font-size: 13px; color: var(--text-secondary); }

/* Referral card on Home */
.home2-refer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border); }
.home2-refer[hidden] { display: none; }
.home2-refer__title { margin: 0; font-size: 15px; font-weight: 600; }
.home2-refer__line { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.home2-refer__go { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #141414; background: #fff; color: #141414; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.home2-refer__note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-secondary); }
.home2-refer__note:empty { display: none; }
@media (max-width: 480px) { .home2-refer { grid-template-columns: 1fr; } .home2-refer__go { justify-self: start; } }

/* Homeowner moments */
.home2-own__since { margin: 2px 0 0; font-size: 12px; color: rgba(255,255,255,.55); }
.home2-moment { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 18px; background: #fff; border: 1px solid #141414; }
.home2-moment__icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #141414; color: #fff; font-size: 15px; }
.home2-moment__title { margin: 0; font-size: 15px; font-weight: 700; }
.home2-moment__line { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.home2-justsold { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #f4f4f2; color: var(--text); text-decoration: none; }
.home2-justsold__badge { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #141414; color: #fff; }
.home2-justsold__what { font-size: 14px; font-weight: 600; margin-top: 4px; }
.home2-justsold__where { font-size: 13px; color: var(--text-secondary); }
.home2-justsold .listing-source { font-size: 11px; margin: 2px 0 0; color: var(--text-secondary); }

/* Tour times from Trevor's calendar */
.tour-slots__day { margin: 8px 0 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.tour-slots__row { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-slot { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.tour-slot[aria-pressed="true"] { background: #141414; border-color: #141414; color: #fff; }

/* Homes Trevor sent (portal → client Home) */
.home2-from { display: grid; gap: 12px; }
.home2-from__head { display: flex; align-items: center; gap: 10px; }
.home2-from__title { font-family: var(--font-serif); font-weight: 500; font-size: 20px; margin: 0; }
.home2-from__new { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #141414; color: #fff; padding: 3px 8px; border-radius: 999px; }
.home2-from__when { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.home2-from__note { font-size: 14px; margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid #141414; background: #f6f6f4; border-radius: 0 8px 8px 0; }

/* Michigan taxes after you buy (listing) and the homestead reminder (Home) */
.mi-tax__figure { font-size: 22px; margin: 4px 0; }
.mi-tax__figure span { font-size: 14px; color: var(--text-muted); }
.mi-tax__line { color: var(--text-secondary); margin: 0 0 8px; }
.home2-pre { background: #141414; color: #fff; border-radius: 20px; padding: 18px; display: grid; gap: 6px; }
.home2-pre__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 0; }
.home2-pre__title { font-family: var(--font-serif); font-weight: 500; font-size: 21px; margin: 0; }
.home2-pre__line { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.8); margin: 0; }
.home2-pre__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.home2-pre .btn--primary { background: #fff; color: #141414; }
.home2-pre__done { font: inherit; font-weight: 600; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 999px; padding: 9px 16px; cursor: pointer; }

/* Refinance watch (Home, homeowners) */
.refi { border-radius: 20px; padding: 18px; display: grid; gap: 6px; }
.refi--ask { background: var(--bg-card); border: 1px solid #141414; }
.refi--hit { background: var(--bg-card, #fff); border: 1.5px solid #141414; }
.refi__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.refi__title { font-family: var(--font-serif); font-size: 20px; margin: 0; }
.refi__line { font-size: 14px; line-height: 1.5; margin: 0; color: var(--text-secondary); }
.refi__src { font-size: 12px; color: var(--text-muted); margin: 0; }
.refi--hit .btn--primary { background: #141414; color: #fff; justify-self: start; margin-top: 6px; }
.refi__row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.refi__field { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.refi__input { font: inherit; font-size: 16px; width: 90px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 10px; }
.refi__save { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px; border: 0; background: #141414; color: #fff; cursor: pointer; }
.refi__note { font-size: 13px; margin: 0; }
.refi__quiet { font-size: 13px; color: var(--text-muted); margin: 0; }

/* View on map (Discover card, listing page) */
.map-link { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 10px; border: 1px solid #141414; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #141414; text-decoration: none; white-space: nowrap; vertical-align: middle; }
.map-link:hover, .map-link:focus-visible { background: #141414; color: #fff; }
.map-link__pin { font-size: 13px; line-height: 1; }
.detail-head__main > .map-link { margin: 8px 0 0; }
/* The shortest phones keep Pass / Save above the tab bar; the map stays one tap away on the home's page. */
.home-card__status .map-link { margin-left: auto; padding: 1px 9px; line-height: 1.35; }
/* The shortest phones keep Pass / Save above the tab bar; the map stays on the home's page. */
@media (max-height: 600px) { .home-card__status .map-link { display: none; } }

/* ── Black and white only (Trevor, 2026-11-23) ─────────────────────────────
   The shared tokens still carry green / blue / orange / gold accents. The client
   app speaks in black, white and greys; status is told by words and weight, not
   hue. Errors keep their red so a problem is never missed. */
:root {
  --green: #141414; --green-bg: #EFEFEF; --green-soft: #E4E4E4;
  --blue: #141414;  --blue-bg: #F3F3F3;
  --orange: #141414; --orange-bg: #E9E9E9;
  --gold: #141414; --gold-bright: #141414; --gold-deep: #141414;
  --gold-dim: rgba(20,20,20,0.35); --gold-subtle: rgba(20,20,20,0.04); --gold-glow: rgba(20,20,20,0.08);
}
.badge--for-sale { background: #FFFFFF; color: #141414; box-shadow: inset 0 0 0 1px #141414; }
.badge--coming-soon { background: #F3F3F3; color: #141414; box-shadow: inset 0 0 0 1px #9A9A9A; }
.badge--under-contract { background: #141414; color: #FFFFFF; }

/* Your mortgage, set once */
.loan-sheet__body { display: grid; gap: 12px; }
.loan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loan-field { display: grid; gap: 4px; }
.loan-field select.eq-sheet__input, .loan-field input[type=month].eq-sheet__input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 10px; background: #fff; }
.loan-panel { margin-top: 16px; padding: 16px; border: 1px solid #e3e3e3; border-radius: 16px; display: grid; gap: 8px; justify-items: start; }
.loan-panel[hidden] { display: none; }
.loan-panel__title { font-weight: 700; margin: 0; }
.loan-panel__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; width: 100%; }
.loan-panel__facts dt { font-size: 12px; color: var(--text-muted); }
.loan-panel__facts dd { margin: 0; font-weight: 700; }
.loan-panel__pmi { border-left: 3px solid #141414; padding-left: 10px; }
.loan-panel__pmi-title { font-weight: 700; margin: 0 0 2px; }
a.refi__src { text-decoration: underline; color: inherit; }
@media (max-width: 420px) { .loan-grid { grid-template-columns: 1fr; } .loan-panel__facts { grid-template-columns: 1fr 1fr; } }

/* Around <city> — community events on Home */
.cev-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.cev { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; }
.cev__date { display: grid; justify-items: center; padding: 6px 0; border: 1px solid #141414; border-radius: 12px; line-height: 1.1; }
.cev__dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cev__day { font-family: var(--font-serif); font-size: 20px; }
.cev__body { display: grid; gap: 2px; min-width: 0; }
.cev__title { font-weight: 700; color: #141414; text-decoration: none; }
a.cev__title { text-decoration: underline; text-underline-offset: 3px; }
.cev__meta { font-size: 13px; color: var(--text-secondary); }
.cev__from { font-size: 12px; font-weight: 600; }

/* Listing dock — Request a tour, the purchase plan and Together stay pinned
   to the bottom of the screen the whole way down a home's page. */
.detail-dock {
  position: sticky; bottom: var(--space-3); z-index: var(--z-sticky);
  display: grid; gap: var(--space-2); margin-top: var(--space-6); padding: var(--space-3);
  border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
.detail-dock:has(> .tour-panel[hidden]:only-child) { display: none; }
.detail-dock .tour-panel, .detail-dock .tour-panel.tour-panel--ask { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.detail-dock .tour-panel.tour-panel--ask { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: var(--space-1); }
.detail-dock .tour-panel--ask .tour-panel__photo { width: 40px; height: 40px; }
.detail-dock .tour-panel--ask .tour-panel__title { font-size: var(--text-base); }
.detail-dock .tour-panel--ask .tour-panel__lede,
.detail-dock .tour-panel > .muted.small { display: none; }
.detail-dock .tour-panel--ask .tour-panel__ask { grid-column: 3; grid-row: 1; width: auto; min-height: 44px; padding: 0 var(--space-5); }
.detail-dock .tour-panel__contract { font-size: var(--text-xs); }
.detail-dock .tour-panel__actions { margin-top: 0; }
.detail-dock__more { display: flex; gap: var(--space-2); }
.detail-dock__more > * { flex: 1 1 0; justify-content: center; text-align: center; min-height: 40px; }
@media (max-width: 640px) {
  .detail-dock { bottom: calc(77px + env(safe-area-inset-bottom) + var(--space-2)); margin-left: calc(var(--space-2) * -1); margin-right: calc(var(--space-2) * -1); }
  .detail-dock .tour-panel.tour-panel--ask { grid-template-columns: auto minmax(0, 1fr) auto; }
  .detail-dock .tour-panel--ask .tour-panel__photo { width: 36px; height: 36px; }
  .detail-dock .tour-panel--ask .tour-panel__ask { grid-column: 3; grid-row: 1; width: auto; padding: 0 var(--space-4); }
  html:has(.detail-dock) { scroll-padding-bottom: calc(77px + env(safe-area-inset-bottom) + 160px); }
}

/* Required notices, once, quietly, at the end of every signed-in page. */
.acct-legal { margin: var(--space-10) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--border); display: grid; gap: 4px; font-size: var(--text-xs); line-height: 1.5; color: var(--text-secondary); }
.acct-legal a { color: inherit; text-decoration: underline; }
.acct-legal__eho { font-weight: 700; }
.discover--deciding ~ .acct-legal, html:has(.discover--deciding) .acct-legal { display: none; } /* the swipe deck is one screen */

/* Mortgage rates this week — homeowner Home. */
.rates__list { margin: var(--space-2) 0 0; display: grid; gap: var(--space-2); }
.rates__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.rates__label { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.rates__value { margin: 0; text-align: right; }
.rates__value strong { font-size: var(--text-lg); }
.rates__move { display: block; font-size: var(--text-xs); color: var(--text-secondary); }

/* Welcome tour (first Home visit; replay from Account & privacy). */
.tour { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--space-4); background: rgba(0,0,0,.55); }
.tour__card { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 2 * var(--space-4)); overflow: auto; padding: var(--space-6) var(--space-5) var(--space-5); border-radius: 22px; background: var(--bg-card); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.tour__skip { position: absolute; top: var(--space-3); right: var(--space-3); min-height: 44px; padding: 0 var(--space-3); border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.tour__dots { display: flex; gap: 6px; margin-bottom: var(--space-4); }
.tour__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.tour__dot--on { width: 18px; border-radius: 3px; background: var(--text); }
.tour__title { margin: 0 0 var(--space-2); font-size: var(--text-xl); outline: none; }
.tour__text { margin: 0 0 var(--space-3); color: var(--text-secondary); line-height: 1.5; }
.tour__link { display: inline-block; margin-bottom: var(--space-3); color: var(--text); font-weight: 600; }
.tour__note { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
.tour__actions { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-4); }
.tour__actions .btn--primary { margin-left: auto; }
.tour-fin__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.tour-fin__chip { min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.tour-fin__chip[aria-pressed="true"] { background: var(--text); color: var(--bg-card); border-color: var(--text); }
.tour-fin__form { display: grid; gap: var(--space-3); }
.lender-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: var(--space-4); border: 1px solid var(--border); border-radius: 16px; }
.lender-card__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.lender-card__name { margin: 0; font-weight: 700; }
.lender-card__title { margin: 2px 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
.lender-card > .lender-card__pitch, .lender-card > .btn, .lender-card > .tour__note, .lender-card > .lender-card__fine { grid-column: 1 / -1; }
.lender-card__pitch { margin: 0; }
.lender-card__fine { margin: 0; font-size: var(--text-xs); color: var(--text-secondary); }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }

/* 2026-11-25 welcome screen: three doors, nothing else; header shows only Navesta. */
.home2-start { display: grid; gap: var(--space-4); }
.home2-doors--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home2-start__tour { justify-self: start; font-size: var(--text-sm); color: var(--text-secondary); min-height: 40px; }
@media (max-width: 860px) { .home2-doors--three { grid-template-columns: 1fr; } }
body.acct--welcome .acct-nav { visibility: hidden; }

/* Spotlight tour: the item it talks about is lit; everything else dims. */
.tour--spot { display: block; padding: 0; background: transparent; }
.tour__spot { position: fixed; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0,0,0,.58); pointer-events: none; transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
.tour--spot .tour__card { position: fixed; width: min(380px, calc(100vw - 24px)); }
.tour--spot .tour__card--sheet { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; max-height: 55dvh; }
@media (prefers-reduced-motion: reduce) { .tour__spot { transition: none; } }
/* What the client's agent prepared in Client Watch (prepared search + picked homes). */
.home2-agentsearch { display: grid; gap: 18px; }
.home2-prep { display: grid; gap: 10px; padding: 18px; border: 1px solid #141414; border-radius: 14px; background: #fff; }
.home2-prep--done { border-color: var(--border, #e4e4e0); }
.home2-prep__lead { margin: 0; font-size: 15px; }
.home2-prep__list { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.home2-prep__share { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.home2-prep__share input { margin-top: 3px; }
.home2-prep__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home2-prep__status { margin: 0; font-size: 13px; min-height: 1em; }
.home2-prep__fine { margin: 0; font-size: 12px; color: var(--text-muted, #6b6b66); }
.home2-prep__link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.home2-pick__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.home2-pick { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--border, #e4e4e0); border-radius: 14px; background: #fff; }
.home2-pick__title { margin: 0; font-size: 17px; font-weight: 600; }
.home2-pick__why { margin: 0; font-size: 14px; }
.home2-pick__link { font-weight: 600; }
.home2-pick__say { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--border, #d8d8d2); border-radius: 10px; }
/* Client Watch on Home: search activity, week in review, Picked for you (text picks + their conversations). */
.home2-act { display: grid; gap: 4px; }
.home2-act__status { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 20px; }
.home2-act__dot { width: 9px; height: 9px; border-radius: 50%; background: #2f7d4f; flex: none; }
.home2-act[data-state="starting"] .home2-act__dot { background: #b08a2e; }
.home2-act[data-state="paused"] .home2-act__dot { background: #9a9a94; }
.home2-act__label { margin: 0; font-size: 15px; font-weight: 600; }
.home2-act__line { margin: 0; font-size: 14px; color: var(--text-secondary, #555); }
.home2-act__warn { color: #8a4b00; }
.home2-prep__what summary { cursor: pointer; font-size: 14px; font-weight: 600; margin: 6px 0; }
.home2-week { display: grid; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border, #e4e4e0); }
.home2-week__title { margin: 0; font-size: 15px; font-weight: 700; }
.home2-week__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.home2-week__stats li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f6f6f4; }
.home2-week__stats strong { font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.home2-week__stats span { font-size: 12px; color: var(--text-secondary, #555); }
.home2-picked { display: grid; gap: 12px; }
.home2-picked[hidden] { display: none; }
.home2-picked__eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted, #6b6b66); }
.pick2__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pick2 { display: grid; gap: 10px; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid #141414; box-shadow: 0 1px 0 rgba(20,20,20,.04), 0 10px 30px rgba(20,20,20,.06); }
.pick2__flags { display: flex; gap: 8px; flex-wrap: wrap; }
.pick2__reply { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid #141414; }
.pick2__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.2; }
.pick2__city { margin: -6px 0 0; font-size: 14px; color: var(--text-secondary, #555); }
.pick2__avail { margin: 0; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: #fbf3e4; color: #6b4a00; }
.pick2__label { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #6b6b66); }
.pick2__why ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 15px; }
.pick2__note { padding: 12px 14px; border-radius: 14px; background: #f6f6f4; border-left: 3px solid #141414; }
.pick2__notetext { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.pick2__explore { justify-self: start; }
.pick2__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pick2__btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border, #d8d8d2); background: #fff; color: #141414; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pick2__btn[aria-pressed="true"] { background: #141414; border-color: #141414; color: #fff; }
.pick2__btn:disabled { opacity: .6; }
.pick2__panel[hidden] { display: none; }
.pick2__panel, .pick2__write { display: grid; gap: 8px; }
.pick2__thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pick2__msg { display: grid; gap: 2px; max-width: 88%; padding: 8px 12px; border-radius: 14px; background: #f6f6f4; }
.pick2__msg--me { justify-self: end; background: #141414; color: #fff; }
.pick2__who { font-size: 11px; opacity: .7; }
.pick2__body { font-size: 14px; white-space: pre-wrap; }
.pick2__sent-talk summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-top: 6px; }
.pick2__sent-talk[open] { display: grid; gap: 8px; }
/* Saved: agent picks you saved, homes you shared with your agent */
.saved-ext[hidden] { display: none; }
.ext-card { display: grid; gap: 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--border, #e4e4e0); background: #fff; list-style: none; }
.ext-card__eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #6b6b66); }
.ext-card__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 19px; }
.ext-card__city { margin: 0; font-size: 14px; color: var(--text-secondary, #555); }
.ext-card__link { font-weight: 600; }
.ext-card__you { margin: 0; font-size: 14px; }
.ext-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ext-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.share-home { display: grid; gap: 10px; padding: 18px; border-radius: 16px; border: 1px dashed #141414; background: #fff; }
.share-home__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 19px; }
.share-home label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.share-home input, .share-home textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--border, #d8d8d2); border-radius: 10px; width: 100%; box-sizing: border-box; }
