/* index — page-local rules (★#59 M7). Moved verbatim from index.html's inline <style>. Shared components live in chrome.css. */









/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }



/* ── Layout shell ──────────────────────────────────────────────── */
/* Search bar / autocomplete / filter-row now live in chrome.css (Data-page shared components) */

/* ── Results section ───────────────────────────────────────────── */
.results-section { padding: 0 20px 24px; }

@media (max-width: 640px) { .results-section { padding: 0 12px 24px; } }
.results-meta {
  max-width: var(--page-max); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}

/* row-cta hover handled via color transition below */

.td { display: flex; flex-direction: column; justify-content: center; }
.td.right { align-items: flex-end; }

.td-date {
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-2);
  color: var(--text-muted);
}
.td-area {
  font-size: var(--fs-2);
  font-weight: 600;
  color: var(--text);
}
.td-project {
  font-size: var(--fs-2);
  color: var(--text-muted);
  margin-top: 2px;
}
.td-size {
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-2);
  color: var(--text);
}
.td-price {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: var(--fs-4);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  cursor: copy;
  position: relative;
}
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-dark);
  color: white;
  font-size: var(--fs-2);
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 20px;
  z-index: 500;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  white-space: nowrap;
}
.td-ppsf {
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-1);
  color: var(--text-muted);
  margin-top: 2px;
}
.badge-type {
  display: inline-block;
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-1);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-top: 3px;
  width: fit-content;
}

.td-col-price {
  align-items: flex-end;
}
.row-cta {
  /* Spans all 5 columns at the bottom of the row */
  grid-column: 1 / -1;
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-1);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: transparent;
  transition: color .15s;
  padding-top: 8px;
  text-align: right;
  line-height: 1;
}
.tx-row:hover .row-cta {
  color: var(--accent);
}

/* ── Mobile card layout ───────────────────────────────────────── */
@media (max-width: 640px) {
  .tx-table-header { display: none; }

  .tx-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "location  price"
      "project   ppsf"
      "date      size"
      "cta       cta";
    padding: 14px 12px;
    gap: 3px 16px;
  }
  .td-col-location { grid-area: location; }
  .td-col-project  { grid-area: project; }
  .td-col-size     { grid-area: size; align-items: flex-end; justify-content: center; }
  .td-col-price    { grid-area: price; align-items: flex-end; }
  .td-col-beds     { display: none; }

  /* Split ppsf into its own area on mobile */
  .td-col-size::after {
    content: attr(data-ppsf);
    display: block;
    font-size: var(--fs-1);
    color: var(--text-muted);
    text-align: right;
  }

  .td-col-price .td-price { font-size: var(--fs-3); font-weight: 700; }
  .td-col-size .td-size   { font-size: var(--fs-2); color: var(--text-muted); }
  .td-col-date .td-date   { font-size: var(--fs-1); }

  .row-cta {
    grid-area: cta;
    grid-column: 1 / -1;
    color: var(--accent) !important;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    font-size: var(--fs-1);
    text-align: right;
  }
}

/* ── Saved transactions ────────────────────────────────────────── */

/* ── Skeleton loader ───────────────────────────────────────────── */

/* ── Newsletter capture ────────────────────────────────────────── */
.nl-area-wrap { position: relative; flex: 1; min-width: 200px; }
.nl-area-wrap .nl-input { width: 100%; }
.nl-area-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 300;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.nl-area-dropdown.open { display: block; }
.nl-area-type {
  display: inline-block;
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-right: 6px;
  min-width: 44px;
}    .nl-success {
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-2);
  color: var(--text-on-dark);   /* white on the dark newsletter card — --accent (purple) was too low-contrast */
  margin-top: 12px;
  display: none;
}
.nl-error {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-2);
  color: var(--danger);
  margin-top: 12px;
  display: none;
}

/* Tour invite chip (UIUX #19) — replaces the first-click hijack */
.tour-chip {
  position: fixed; bottom: 20px; left: 20px; right: auto;   /* corner, clear of the map's Esri credit + the bottom-right FAB (mobile kink) */
  z-index: 290;                       /* under the onboarding overlay (298+) */
  display: flex; align-items: center;
  background: var(--surface-dark); color: var(--text-on-dark);
  border: 1px solid rgba(255,255,255,.14); border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 4px 6px 4px 8px;
}
.tour-chip[hidden] { display: none; }
.tour-chip-go {
  font-family: 'Inter', sans-serif; font-size: var(--fs-2); font-weight: 600;
  color: var(--text-on-dark); background: none; border: none; cursor: pointer;
  padding: 8px 6px 8px 10px; white-space: nowrap;
}
.tour-chip-go:hover { color: var(--accent-2-soft); }
.tour-chip-x {
  font-family: 'Inter', sans-serif; font-size: var(--fs-4); line-height: 1;
  color: color-mix(in srgb, var(--text-on-dark) 65%, transparent);
  background: none; border: none; cursor: pointer;
  padding: 8px 10px;
}
.tour-chip-x:hover { color: var(--text-on-dark); }
/* Mobile FAB sits bottom-LEFT (chrome.css:648), so flip the chip bottom-RIGHT there — opposite corners, no collision. */
@media (max-width: 640px) { .tour-chip { left: auto; right: 20px; max-width: calc(100vw - 40px); } }

/* UIUX #20 — one email capture per viewport: the homepage keeps the richer,
   area-aware alerts card; hide the footer's generic subscribe block here only
   (this stylesheet is homepage-scoped; the shared partial stays intact site-wide). */
footer .ftr-news { display: none; }

/* ── Mortgage planner ──────────────────────────────────────────── */
.section-label {
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-1);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.toggle-group {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}
.toggle-opt {
  flex: 1;
  padding: 9px 6px;
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-1);
  letter-spacing: .04em;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: all .18s;
  user-select: none;
}
.toggle-opt:last-child { border-right: none; }
.toggle-opt.active {
  background: var(--accent);
  color: var(--on-accent);
}

.bool-group {
  display: flex; gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bool-opt {
  flex: 1;
  padding: 9px;
  font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  font-size: var(--fs-1);
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: all .18s;
  user-select: none;
}
.bool-opt:last-child { border-right: none; }
.bool-opt.active {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

/* ── Yield calculator ──────────────────────────────────────────── */
.calc-tab {
  flex: 1;
  padding: 9px;
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-2);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: all .18s;
  user-select: none;
}

/* ── Modal (About) ─────────────────────────────────────────────── */
/* ── Comparison overlay ────────────────────────────────────────── */
.compare-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 900px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
  margin: auto;
}
/* ── Onboarding walkthrough ─────────────────────────────────────── */
.onboard-backdrop {
  position: fixed; inset: 0; z-index: 298;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: all;
  display: none;
}
.onboard-backdrop.active { display: block; }
.onboard-tooltip {
  position: fixed; z-index: 300;
  background: var(--surface-dark);
  color: white;
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  pointer-events: auto;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.onboard-body { font-size: var(--fs-2); color: color-mix(in srgb, var(--text-on-dark) 72%, transparent); line-height: 1.5; margin-bottom: 14px; }
.onboard-next {
  background: var(--accent); color: var(--on-accent);
  border: none; border-radius: 6px;
  padding: 7px 16px; font-family: 'Inter', sans-serif;
  font-size: var(--fs-2); font-weight: 600; cursor: pointer;
  transition: opacity .2s; white-space: nowrap;
}
.onboard-dot { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--text-on-dark) 18%, transparent); transition: background .2s; }  @media (max-width: 640px) {
/* ── Onboarding walkthrough ─────────────────────────────────────── */
.onboard-backdrop {
  position: fixed; inset: 0; z-index: 300;
  pointer-events: none;
}
.onboard-tooltip {
  position: fixed; z-index: 301;
  background: var(--surface-dark);
  color: white;
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  pointer-events: auto;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
}
/* ── Divider ───────────────────────────────────────────────────── */

/* ── Utility ───────────────────────────────────────────────────── */

/* ── Mobile layout tweaks ──────────────────────────────────────── */
@media (max-width: 640px) {
  .results-section { padding: 0 10px 24px; }
  .tx-table-wrap { border-radius: 6px; }  }

/* ── Buyer-first homepage ──────────────────────────────────────────────── */
.home-hero { max-width: var(--page-max); margin: 0 auto; padding: 28px 20px 8px; }
.home-hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: stretch; }
.home-hero-left { min-width: 0; display: flex; flex-direction: column; }
.home-hero-left .eyebrow { margin-bottom: 10px; }
.home-hero-left h1 { margin: 0 0 12px; }
.home-hero-left > p:not(.hero-trust) { color: var(--text-muted); margin: 0 0 18px; max-width: 48ch; }
.home-hero-left .search-wrap { margin: 0 0 10px; padding: 0; max-width: none; }
.home-hero-left .hero-trust { font-size: var(--fs-1); font-weight: 600; color: var(--accent); margin: 0 0 16px; max-width: none; display: flex; align-items: center; gap: 8px; }
.home-hero-left .hero-trust svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hero-chip { font: inherit; font-size: var(--fs-2); cursor: pointer; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .15s, color .15s, background .15s; }
.hero-chip:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.hero-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.home-hero-right { min-width: 0; }
.hero-map-panel { position: relative; z-index: 0; isolation: isolate; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-alt); display: flex; flex-direction: column; height: 100%; min-height: 340px; }
.hero-map { width: 100%; flex: 1 1 auto; min-height: 300px; }
.hero-map-cap { font-size: var(--fs-1); color: var(--text-muted); padding: 7px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.leaflet-container { background: var(--surface-alt); font: inherit; }

.price-section { max-width: var(--page-max); margin: 10px auto 0; padding: 18px 20px 4px; }
.price-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.price-title { font-family: 'Inter Tight', Inter, sans-serif; font-weight: 700; font-size: var(--fs-5); margin: 0; color: var(--text); }
.price-browse { font-size: var(--fs-2); color: var(--accent); text-decoration: none; white-space: nowrap; }
.price-browse:hover { text-decoration: underline; }
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.price-card { border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 16px 16px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow), var(--highlight); }
.pc-type { font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
.pc-comm { font-size: var(--fs-2); color: var(--text-muted); }
.pc-price { font-family: 'Inter Tight', Inter, sans-serif; font-weight: 700; font-size: var(--fs-6); color: var(--text); line-height: 1.1; margin-top: 3px; }
.pc-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: var(--fs-1); color: var(--text-subtle); }
.pc-trend { font-weight: 600; }
.pc-trend.up   { color: var(--pos); }
.pc-trend.down { color: var(--danger); }  /* red-for-down, site-wide convention (UIUX #22, operator call) */
.price-skel { height: 134px; border-radius: var(--radius-lg); }

.trend-line { max-width: var(--page-max); margin: 16px auto 4px; padding: 0 20px; }
.trend-sentence { font-size: var(--fs-4); color: var(--text-muted); margin: 0; }
.trend-sentence strong { color: var(--text); font-weight: 600; }

.newsletter-wrap.nl-champagne { background: var(--surface-dark); border: none; }
.nl-champagne .nl-eyebrow { color: var(--accent-2-soft); }
.nl-champagne .nl-headline { color: var(--text-on-dark); }
.nl-champagne .nl-sub { color: color-mix(in srgb, var(--text-on-dark) 76%, transparent); }
.nl-champagne .nl-sub strong { color: var(--text-on-dark); }
.nl-champagne .nl-btn { background: var(--accent-2-soft); color: var(--surface-dark); border: none; font-weight: 700; }
.nl-champagne .nl-btn:hover { background: var(--lime-hover); }

@media (max-width: 820px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .home-hero-right { order: 2; }
  .hero-map-panel { min-height: 0; }
  .hero-map { min-height: 240px; }
  .hero-chips { margin-top: 14px; }
  .price-cards { grid-template-columns: 1fr; }
}

/* ★#59 M7 — classes that replace this page's static style="" (template + index.js; values unchanged).
   .is-off only sets the initial state: index.js shows the onboarding layers with an inline display:block. */
.sold-line.is-hero { margin: -2px 0 16px; }
.home-nl-wrap { max-width: var(--page-max); margin: 0 auto 40px; padding: 0 20px; }
.nl-input-name { max-width: 140px; }
.onboard-highlight.is-off, .onboard-tooltip.is-off { display: none; }
.onboard-btns { display: flex; gap: 8px; align-items: center; }
.price-note { color: var(--text-muted); font-size: .9rem; grid-column: 1 / -1; }
.map-fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-family: Inter, sans-serif; font-size: .85rem; color: var(--text-muted); text-align: center; padding: 20px; }
