/* ═══════════════════════════════════════════════════════════════════════════
   dwello — public site stylesheet
   Brand: approachable tech with modern precision.
   Design principle: satisfying to use. Motion has weight. Space has purpose.
═══════════════════════════════════════════════════════════════════════════ */

/* ───────────── DESIGN TOKENS (LIGHT MODE) ───────────── */
:root {
  /* Brand */
  --dw-sky: #6EB5E9;
  --dw-sky-hover: #5AA3D9;
  --dw-sky-pressed: #4A93C9;
  --dw-sky-soft: #E3F0FA;
  --dw-slate: #445B69;
  --dw-slate-deep: #35475C;
  --dw-slate-soft: #E5EAF0;
  --dw-gold: #F5A623;
  --dw-gold-soft: #FEF3E0;

  /* Neutrals */
  --dw-paper: #FFFFFF;
  --dw-mist: #F7F9FC;
  --dw-stone: #E5EAF0;
  --dw-outline: rgba(68, 91, 105, 0.14);
  --dw-outline-strong: rgba(68, 91, 105, 0.24);
  --dw-graphite: #2A3442;
  --dw-text: #1C2530;
  --dw-text-2: #4A5669;
  --dw-text-3: #7A8698;

  /* Semantic (real estate) */
  --dw-active: #3FB876;
  --dw-active-soft: #E8F7EF;
  --dw-pending: #F59E0B;
  --dw-pending-soft: #FEF3E0;
  --dw-closed: #64748B;
  --dw-closed-soft: #E8ECF2;
  --dw-coming-soon: #0EA5A5;
  --dw-coming-soon-soft: #E0F7F7;
  --dw-alert: #E24B4A;
  --dw-alert-soft: #FCEAE9;

  /* Surfaces */
  --dw-bg: var(--dw-paper);
  --dw-surface: var(--dw-paper);
  --dw-surface-raised: var(--dw-paper);
  --dw-surface-subtle: var(--dw-mist);
  --dw-overlay: rgba(28, 37, 48, 0.50);

  /* Shadows — layered, never harsh */
  --dw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --dw-shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.04), 0 6px 12px rgba(16, 24, 40, 0.08);
  --dw-shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, 0.10), 0 20px 40px -4px rgba(16, 24, 40, 0.12);
  --dw-shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);
  --dw-shadow-focus: 0 0 0 4px rgba(110, 181, 233, 0.20);

  /* Corners */
  --dw-radius-sm: 6px;
  --dw-radius: 12px;
  --dw-radius-lg: 20px;
  --dw-radius-pill: 999px;

  /* Motion */
  --dw-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dw-ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dw-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dw-dur-snap: 120ms;
  --dw-dur: 180ms;
  --dw-dur-smooth: 280ms;
  --dw-dur-long: 480ms;

  /* Type */
  --dw-font-display: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --dw-font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --dw-font-serif: 'Fraunces', Georgia, serif;
  --dw-font-mono: 'SF Mono', ui-monospace, Menlo, monospace;

  /* ═══════════ dwello V2 token layer ═══════════
     The burgundy + cream foundation (Decision 1.1) and the V2 type stack (Decision 4.1),
     ported from /admin/design-system. ADDITIVE — these are new names nothing in V1 consumes,
     so adding them changes nothing visible. A surface opts in to V2 with body.dw-v2 (below),
     which is where the actual remap of --dw-font-* + foundation happens. Built block-by-block;
     see private/dwellohomes.net_v2/03_implementation_plan.md §1 (Foundation). */
  --dw-burgundy: #64293C;
  --dw-burgundy-deep: #481B28;
  --dw-cta: #582332;
  --dw-burgundy-wash: #F0E4E7;
  --dw-cream: #F4EDE7;
  --dw-surface-warm: #FBF6F1;
  --dw-ink: #241319;
  --dw-ink-2: #6A5358;
  --dw-muted-warm: #BBA6AC;
  --dw-sand: #EBE2D6;
  --dw-taupe: #D8CABB;
  --dw-warmgrey: #A89A8C;
  --dw-brass: #B08A3C;
  --dw-state-active: #4F7A52;
  --dw-state-pending: #CB7A24;
  --dw-state-sold: #7A6E68;
  --dw-font-wordmark: 'Montserrat', -apple-system, system-ui, sans-serif;
  --dw-font-v2-display: 'Bricolage Grotesque', -apple-system, system-ui, sans-serif;
  --dw-font-v2-body: 'Be Vietnam Pro', -apple-system, system-ui, sans-serif;
  --dw-font-accent: 'Licorice', cursive;

  /* Spacing scale */
  --dw-sp-1: 4px;
  --dw-sp-2: 8px;
  --dw-sp-3: 12px;
  --dw-sp-4: 16px;
  --dw-sp-5: 20px;
  --dw-sp-6: 24px;
  --dw-sp-8: 32px;
  --dw-sp-10: 40px;
  --dw-sp-12: 48px;
  --dw-sp-16: 64px;
  --dw-sp-20: 80px;
  --dw-sp-24: 96px;

  /* Layout */
  --dw-header-h: 96px;
  --dw-container: 1360px;
  --dw-container-narrow: 960px;
}

/* ═══════════ dwello V2 opt-in ═══════════
   A surface wears V2 by adding `dw-v2` to its bodyClass. That remaps the consumed type tokens to
   the V2 stack and sets the cream foundation — so the whole page (incl. any not-yet-rebuilt V1
   bits on it) carries V2 type + ground. Added per-page as each surface is migrated (homepage
   first); the other ~29 routes stay V1 until their turn ("it all comes together"). Not a feature
   flag — V2 pages are fully public, no gate. */
body.dw-v2 {
  --dw-font-display: var(--dw-font-v2-display);
  --dw-font-body: var(--dw-font-v2-body);
  background: var(--dw-cream);
  color: var(--dw-ink);
  margin: 0;            /* kill the UA default 8px body margin (was framing the page
                           in cream + pushing the compliance ribbon off the top edge) */
}

/* ═══════════ dwello V2 — shell (header + compliance ribbon + footer) ═══════════
   Ported from the locked design-system mock (_dwHeaderDesktop / _dsysRenderDwelloFooter,
   research §34 + impl plan §1A). Classes are .dwv2-* — deliberately distinct from the legacy
   .dw-v2-prototype / .dw-v2-* (the old sky-blue interim). Rendered by renderShell when the page
   opts into body.dw-v2. */
.dwv2-ribbon { background: var(--dw-burgundy); color: var(--dw-cream); text-align: center; padding: 5px 16px; font-family: var(--dw-font-v2-body); font-size: 10.5px; letter-spacing: 0.01em; }
.dwv2-ribbon strong { font-weight: 600; }
.dwv2-header { position: sticky; top: 0; z-index: 200; }
.dwv2-bar { display: flex; align-items: center; background: var(--dw-cream); border-bottom: 1px solid rgba(36,19,25,0.10); padding: 6px 26px; }
.dwv2-logo { height: 54px; width: auto; flex: 0 0 auto; display: block; }
.dwv2-logo-link { flex: 0 0 auto; display: flex; line-height: 0; }
.dwv2-bar-spacer { flex: 1; }
.dwv2-nav { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
.dwv2-nav a { font-family: var(--dw-font-v2-display); font-weight: 600; font-size: 13.5px; color: var(--dw-ink-2); text-decoration: none; white-space: nowrap; transition: color 140ms; }
.dwv2-nav a:hover, .dwv2-nav a.active { color: var(--dw-ink); }
.dwv2-signin { font-family: var(--dw-font-v2-display); font-weight: 600; font-size: 13.5px; color: var(--dw-ink); white-space: nowrap; margin-left: 28px; text-decoration: none; flex: 0 0 auto; }
.dwv2-cta { margin-left: 18px; flex: 0 0 auto; background: var(--dw-cta); color: #fff; border: none; border-radius: 10px; padding: 11px 19px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13.5px; white-space: nowrap; cursor: pointer; text-decoration: none; display: inline-block; transition: background 140ms; }
.dwv2-cta:hover { background: var(--dw-burgundy); color: #fff; }
/* V2 link hover guards — override the V1 global `a:hover{color:sky}` so no V2 link flips blue. */
.dwv2-signin:hover, .dwv2-signin:focus { color: var(--dw-ink); }
.dwv2-bar-mobile-actions a:hover, .dwv2-bar-mobile-actions a:focus { color: var(--dw-ink); }
/* Mobile header */
/* Logo fills the bar (Redfin-scale); vertical padding trimmed so the BAR HEIGHT is unchanged (42 + 3 + 3 = 48, same as 32 + 8 + 8). */
.dwv2-bar-mobile { display: none; align-items: center; justify-content: space-between; background: var(--dw-cream); border-bottom: 1px solid rgba(36,19,25,0.08); padding: 3px 16px; }
.dwv2-logo-mobile { height: 42px; width: auto; display: block; }
.dwv2-bar-mobile-actions { display: flex; align-items: center; gap: 16px; color: var(--dw-ink); }
.dwv2-bar-mobile-actions a { display: flex; color: var(--dw-ink); }
@media (max-width: 860px) {
  .dwv2-bar { display: none; }
  .dwv2-bar-mobile { display: flex; }
}

/* ── Hero (block 1, impl plan §2.1) ── */
.dwv2-hero { position: relative; min-height: 500px; background-color: #6f6353; background-size: cover; background-position: center; display: flex; align-items: center; }
.dwv2-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,16,0.22) 0%, rgba(20,12,16,0.34) 55%, rgba(20,12,16,0.60) 100%); }
.dwv2-hero-inner { position: relative; width: 100%; max-width: var(--dw-container); margin: 0 auto; padding: 60px 44px; box-sizing: border-box; }
.dwv2-hero-copy { max-width: 600px; }
.dwv2-h1 { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 46px; line-height: 1.05; letter-spacing: -0.02em; color: #FBF6F1; text-shadow: 0 1px 14px rgba(20,12,16,0.45); margin: 0; }
.dwv2-h1 .dwv2-script { font-family: var(--dw-font-accent); font-weight: 400; font-size: 1.25em; }
.dwv2-hero-sub { font-family: var(--dw-font-v2-body); font-size: 17px; line-height: 1.5; color: rgba(251,246,241,0.92); margin-top: 13px; max-width: 520px; text-shadow: 0 1px 10px rgba(20,12,16,0.4); }
.dwv2-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; box-shadow: 0 12px 34px rgba(20,12,16,0.22); padding: 7px 8px 7px 16px; max-width: 560px; margin-top: 22px; }
.dwv2-search svg { flex: 0 0 auto; }
.dwv2-search-ico { display: flex; align-items: center; } /* desktop: left magnifier; mobile media hides it */
.dwv2-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--dw-font-v2-body); font-size: 14px; color: var(--dw-ink); }
.dwv2-search input::placeholder { color: var(--dw-ink-2); }
.dwv2-search button { flex: 0 0 auto; background: var(--dw-cta); color: #fff; border: none; border-radius: 10px; padding: 11px 18px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background 140ms; }
.dwv2-search button:hover { background: var(--dw-burgundy); }
.dwv2-search-btn-ico { display: none; } /* desktop: text button; mobile media (below) swaps to the glyph */
.dwv2-hero-hint { font-family: var(--dw-font-v2-body); font-size: 12.5px; color: rgba(251,246,241,0.82); margin-top: 10px; }
/* Hero search MODE tabs (Buy / Sell / Rent, §2.1) — folder tabs attached to + tucked behind the
   search bar. Active tab = bar surface (#fff) sitting IN FRONT of the bar (z:2) so its white can't
   be washed by the bar's drop-shadow; inactive tabs = solid dark, tucked behind (z:0). */
.dwv2-modewrap { margin-top: 22px; }
.dwv2-modetabs { display: inline-flex; position: relative; z-index: 0; }
.dwv2-modetab { border: none; cursor: pointer; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13px; color: rgba(251,246,241,0.94); background: rgba(20,12,16,0.58); padding: 9px 22px 18px; margin-bottom: -9px; position: relative; z-index: 0; transition: background 140ms, color 140ms; }
.dwv2-modetab:first-child { border-radius: 12px 0 0 0; }
.dwv2-modetab:last-child { border-radius: 0 12px 0 0; }
.dwv2-modetab + .dwv2-modetab { margin-left: -1px; box-shadow: inset 1px 0 0 rgba(251,246,241,0.12); }
.dwv2-modetab.is-active { background: #fff; color: var(--dw-ink); z-index: 2; box-shadow: none; }
.dwv2-modewrap .dwv2-search { margin-top: 0; border-radius: 4px 14px 14px 14px; position: relative; z-index: 1; }
.dwv2-hero-secondary { margin-top: 18px; }
.dwv2-hero-secondary a { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13.5px; color: #FBF6F1; border-bottom: 1.5px solid rgba(251,246,241,0.5); padding-bottom: 2px; text-decoration: none; }
.dwv2-hero-secondary a:hover, .dwv2-hero-secondary a:focus { color: #FBF6F1; border-bottom-color: #FBF6F1; }
.dwv2-hero-trust { font-family: var(--dw-font-v2-body); font-size: 10.5px; letter-spacing: 0.02em; color: rgba(251,246,241,0.72); margin-top: 24px; }
@media (max-width: 860px) {
  .dwv2-hero { min-height: 60vh; align-items: center; }
  .dwv2-hero-inner { padding: 30px 18px; }
  .dwv2-h1 { font-size: 30px; }
  .dwv2-hero-sub { font-size: 14px; margin-top: 9px; max-width: 100%; }
  .dwv2-search { margin-top: 16px; max-width: 100%; }
  /* Mode tabs span the full bar width + center (#4); bar squares BOTH top corners so Buy feeds in
     on the left and Rent feeds in on the right. */
  .dwv2-modewrap { margin-top: 16px; }
  .dwv2-modetabs { display: flex; width: 100%; }
  .dwv2-modetab { flex: 1; text-align: center; padding: 9px 8px 18px; }
  .dwv2-modewrap .dwv2-search { border-radius: 0 0 14px 14px; }
  .dwv2-hero-trust { font-size: 9.5px; margin-top: 16px; }
  /* Mobile search: drop the left magnifier + collapse the text button to a glyph (matches the bottom bar). */
  .dwv2-search .dwv2-search-ico { display: none; }
  .dwv2-search-btn-text { display: none; }
  .dwv2-search-btn-ico { display: inline-flex; align-items: center; }
  .dwv2-search button.dwv2-search-btn { padding: 11px 14px; }
}

/* ── Footer (impl plan §1A) ── */
.dwv2-footer { background: var(--dw-ink); color: var(--dw-cream); padding: 44px 0 26px; }
.dwv2-footer-inner { max-width: var(--dw-container); margin: 0 auto; padding: 0 30px; }
.dwv2-footer-top { display: flex; gap: 32px; flex-wrap: wrap; }
.dwv2-footer-brand { min-width: 260px; flex: 1.3; }
.dwv2-footer-lockup { height: 150px; width: auto; display: block; margin: 0 0 16px -6px; }
.dwv2-footer-tag { font-family: var(--dw-font-v2-body); font-size: 12.5px; color: rgba(244,237,231,0.64); line-height: 1.55; max-width: 300px; }
.dwv2-footer-addr { font-family: var(--dw-font-v2-body); font-size: 12px; color: rgba(244,237,231,0.64); margin-top: 12px; }
.dwv2-footer-col { min-width: 128px; }
.dwv2-footer-col h4 { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dw-cream); margin: 0 0 13px; }
.dwv2-footer-col a { display: block; font-family: var(--dw-font-v2-body); font-size: 12.5px; color: rgba(244,237,231,0.64); margin-bottom: 9px; text-decoration: none; transition: color 140ms; }
.dwv2-footer-col a:hover { color: var(--dw-cream); }
.dwv2-footer-comp { border-top: 1px solid rgba(255,255,255,0.13); margin-top: 28px; padding-top: 20px; }
.dwv2-footer-marks { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 15px; }
.dwv2-footer-marks img { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.dwv2-eho { display: flex; align-items: center; gap: 7px; color: var(--dw-cream); }
.dwv2-eho span { font-family: var(--dw-font-v2-body); font-size: 11px; color: rgba(244,237,231,0.64); }
.dwv2-realtor { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 11px; letter-spacing: 0.05em; color: rgba(244,237,231,0.64); }
.dwv2-fineprint { font-family: var(--dw-font-v2-body); font-size: 10px; line-height: 1.5; color: rgba(244,237,231,0.42); margin: 0 0 8px; max-width: 900px; }
.dwv2-footer-legal { display: flex; align-items: center; flex-wrap: wrap; margin-top: 10px; font-family: var(--dw-font-v2-body); font-size: 11.5px; color: rgba(244,237,231,0.64); }
.dwv2-footer-legal a { color: rgba(244,237,231,0.64); text-decoration: none; }
.dwv2-footer-legal a:hover { color: var(--dw-cream); }
.dwv2-footer-legal .sep { color: rgba(255,255,255,0.22); margin: 0 8px; }
@media (max-width: 860px) {
  .dwv2-footer-lockup { height: 120px; }
  .dwv2-footer-top { gap: 24px; }
}

/* Mobile header — bumped 2026-04-29 to fit the larger mobile logo
   (Brandon directive). Desktop reverted to original 96px the same
   session. */
@media (max-width: 900px) {
  :root { --dw-header-h: 116px; }
}
@media (max-width: 680px) {
  :root { --dw-header-h: 100px; }
}

/* ───────────── DARK MODE ───────────── */
:root[data-theme="dark"] {
  --dw-paper: #0E1520;
  --dw-mist: #0A1018;
  --dw-stone: #1A2332;
  --dw-outline: rgba(232, 238, 245, 0.08);
  --dw-outline-strong: rgba(232, 238, 245, 0.16);

  --dw-text: #E8EEF5;
  --dw-text-2: #B4C0D0;
  --dw-text-3: #8A98AC;
  --dw-graphite: #E8EEF5;

  --dw-bg: var(--dw-paper);
  --dw-surface: #141D2B;
  --dw-surface-raised: #1A2332;
  --dw-surface-subtle: #0A1018;
  --dw-overlay: rgba(5, 10, 18, 0.72);

  --dw-sky-soft: rgba(110, 181, 233, 0.12);
  --dw-slate-soft: rgba(68, 91, 105, 0.25);
  --dw-gold-soft: rgba(245, 166, 35, 0.12);
  --dw-active-soft: rgba(63, 184, 118, 0.14);
  --dw-pending-soft: rgba(245, 158, 11, 0.14);
  --dw-closed-soft: rgba(100, 116, 139, 0.16);
  --dw-coming-soon-soft: rgba(14, 165, 165, 0.16);
  --dw-alert-soft: rgba(226, 75, 74, 0.14);

  --dw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.20), 0 1px 3px rgba(0, 0, 0, 0.24);
  --dw-shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.24), 0 6px 12px rgba(0, 0, 0, 0.32);
  --dw-shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, 0.32), 0 20px 40px -4px rgba(0, 0, 0, 0.40);
  --dw-shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.50);
  --dw-shadow-focus: 0 0 0 4px rgba(110, 181, 233, 0.30);
}

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

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Firefox scrollbars */
  scrollbar-width: thin;
  scrollbar-color: var(--dw-outline-strong) transparent;
  /* App-feel: no pinch-zoom anywhere on the site. Backs the viewport
     meta's user-scalable=no, so iOS can't fall back to pinch-rescaling
     a touch surface (esp. inside image carousels where two-finger
     gestures are easy to trigger accidentally). pan-x pan-y permits
     scrolling but explicitly excludes pinch + double-tap zoom. */
  touch-action: pan-x pan-y;
}

/* ───────────── SCROLLBARS (WebKit: Chrome/Safari/Edge) ───────────── */
/* Thin, brand-tinted, auto-hiding feel. Consistent everywhere. */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--dw-outline-strong);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background var(--dw-dur) var(--dw-ease);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--dw-text-3);
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner { background: transparent; }

/* ───────────── SCROLLBARS · dwello V2 (custom OVERLAY) ─────────────
   The native scrollbar is HIDDEN entirely — no reserved gutter, so content fills edge-to-edge with
   no white strip. A burgundy overlay thumb (.dwv2-oscroll, driven by dwOverlayScrollbar in JS) floats
   ON TOP of the content, appears while scrolling, and auto-hides ~0.9s after. Scoped to V2 pages;
   works desktop + mobile (touch scroll shows it too). The cream html bg kills any pre-paint white. */
html:has(body.dw-v2) { background: var(--dw-cream); scrollbar-width: none; }
html:has(body.dw-v2)::-webkit-scrollbar { width: 0; height: 0; }
body.dw-v2 { scrollbar-width: none; }
body.dw-v2 ::-webkit-scrollbar { width: 0; height: 0; }
.dwv2-oscroll {
  position: fixed; top: 0; right: 2px; width: 7px; height: 40px; z-index: 999;
  border-radius: 99px; background: rgba(100,41,60,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--dw-ease), background 160ms var(--dw-ease);
  will-change: transform, opacity;
}
.dwv2-oscroll.is-active { opacity: 1; }

/* ── V2 focus: never the default blue box inside controls. Quiet on-brand cues instead. ── */
body.dw-v2 input:focus, body.dw-v2 textarea:focus, body.dw-v2 select:focus,
body.dw-v2 button:focus, body.dw-v2 a:focus, body.dw-v2 [contenteditable]:focus,
body.dw-v2 input:focus-visible, body.dw-v2 textarea:focus-visible, body.dw-v2 select:focus-visible,
body.dw-v2 button:focus-visible { outline: none; box-shadow: none; }
/* Text selection + mobile tap highlight → burgundy, never the OS blue. */
body.dw-v2 ::selection { background: rgba(100,41,60,0.22); color: var(--dw-ink); }
body.dw-v2 ::-moz-selection { background: rgba(100,41,60,0.22); color: var(--dw-ink); }
body.dw-v2, body.dw-v2 * { -webkit-tap-highlight-color: rgba(100,41,60,0.14); }
.dwv2-search:focus-within { box-shadow: 0 14px 38px rgba(20,12,16,0.30); }
.dwv2-news-input { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; padding: 10px 13px; font-family: var(--dw-font-v2-body); font-size: 12px; color: var(--dw-cream); transition: border-color 140ms; }
.dwv2-news-input::placeholder { color: rgba(244,237,231,0.5); }
.dwv2-news-input:focus { border-color: rgba(244,237,231,0.45); }
.dwv2-news-join { background: var(--dw-brass); color: #241319; border: none; border-radius: 9px; padding: 10px 16px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 12px; cursor: pointer; }

/* ── Mobile bottom nav (Option C — CTA-centered). Mobile only; desktop keeps the header nav. ── */
.dwv2-bottomnav { display: none; }
@media (max-width: 860px) {
  .dwv2-bottomnav {
    display: flex; align-items: flex-end; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    background: var(--dw-cream); border-top: 1px solid rgba(36,19,25,0.10);
    padding: 9px 6px calc(11px + env(safe-area-inset-bottom));
  }
  body.dw-v2 { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}
.dwv2-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--dw-warmgrey); }
.dwv2-tab.is-active { color: var(--dw-burgundy); }
/* Hover/focus/active → burgundy (beats the V1 global a:hover sky); svg + label follow via currentColor. */
.dwv2-tab:hover, .dwv2-tab:focus, .dwv2-tab:active { color: var(--dw-burgundy); }
.dwv2-tab-label { font-family: var(--dw-font-v2-display); font-weight: 500; font-size: 9.5px; white-space: nowrap; }
.dwv2-tab.is-active .dwv2-tab-label { font-weight: 700; }
/* Raised Text tab: FAB pops above the bar; the label gets a 24px top gap so "Text" sits on the
   same baseline as the other tab labels (not hidden behind the FAB). */
.dwv2-tab-raised { position: relative; }
.dwv2-tab-raised .dwv2-fab {
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 50px; border-radius: 50%; background: var(--dw-cta); color: var(--dw-cream);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 7px 18px rgba(88,35,50,0.42); border: 3px solid var(--dw-cream);
}
.dwv2-tab-raised .dwv2-tab-label { margin-top: 24px; color: var(--dw-burgundy); font-weight: 700; }

/* ── Listing card (§1C) + Featured local homes (block 2, §2.2) ── */
.dwv2-featured { background: var(--dw-cream); }
.dwv2-featured-inner { max-width: var(--dw-container); margin: 0 auto; padding: 28px 36px 34px; }
.dwv2-featured-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dwv2-featured-head h2 { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; color: var(--dw-ink); margin: 0; white-space: nowrap; }
.dwv2-featured-seeall { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 14px; color: var(--dw-burgundy); white-space: nowrap; border-bottom: 1.5px solid rgba(100,41,60,0.3); padding-bottom: 2px; text-decoration: none; flex: 0 0 auto; }
.dwv2-featured-seeall:hover, .dwv2-featured-seeall:focus { color: var(--dw-burgundy); border-bottom-color: var(--dw-burgundy); }
.dwv2-featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dwv2-card { display: block; background: #fff; border: 1px solid rgba(36,19,25,0.08); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 8px 20px rgba(36,19,25,0.06); text-decoration: none; color: inherit; transition: box-shadow 200ms var(--dw-ease), transform 200ms var(--dw-ease); }
.dwv2-card:hover { box-shadow: 0 2px 4px rgba(36,19,25,0.06), 0 16px 36px rgba(36,19,25,0.11); transform: translateY(-2px); }
.dwv2-card-photo { position: relative; height: 150px; background-color: #6f6353; background-size: cover; background-position: center; overflow: hidden; }
/* In-card photo carousel — native scroll-snap track (swipe on touch / arrows on desktop) + dots.
   Absolutely fills the photo box so it works with both fixed-height (desktop) and the padding-bottom
   aspect-ratio used on mobile. */
.dwv2-cphoto-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.dwv2-cphoto-track::-webkit-scrollbar { display: none; }
.dwv2-cphoto-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; }
.dwv2-cphoto-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dwv2-cphoto-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; pointer-events: none; z-index: 2; }
.dwv2-cphoto-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.55); box-shadow: 0 0 2px rgba(20,12,16,0.4); transition: background 150ms var(--dw-ease); }
.dwv2-cphoto-dot.is-on { background: #fff; }
.dwv2-cphoto-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.88); color: #241319; font-size: 19px; line-height: 1; display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 5px rgba(20,12,16,0.25); z-index: 2; padding: 0; }
.dwv2-cphoto-prev { left: 8px; }
.dwv2-cphoto-next { right: 8px; }
@media (hover: hover) { .dwv2-card-photo:hover .dwv2-cphoto-nav { display: flex; } }
.dwv2-card-pill { position: absolute; top: 10px; left: 10px; max-width: 74%; background: var(--dw-burgundy); color: #F4EDE7; font-family: var(--dw-font-v2-display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.01em; padding: 6px 11px; border-radius: 8px; box-shadow: 0 2px 8px rgba(20,12,16,0.22); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The mock save heart — JUST the heart with a soft drop-shadow, NO circle.
   Scoped under .dwv2-card so it beats the V1 .dw-card-fav white-circle CSS
   (which is also on the button for the favorites JS hook). */
.dwv2-card .dwv2-card-heart, .dwv2-card .dwv2-card-heart.dw-card-fav {
  position: absolute; top: 9px; right: 10px;
  width: auto; height: auto; border-radius: 0;
  background: none; border: 0; box-shadow: none; padding: 4px; margin: -4px;
  display: flex; cursor: pointer; line-height: 0;
  filter: drop-shadow(0 1px 3px rgba(20,12,16,0.45));
}
.dwv2-card .dwv2-card-heart svg { width: 26px; height: 26px; transition: fill 160ms var(--dw-ease), transform 160ms var(--dw-ease); }
.dwv2-card .dwv2-card-heart:hover svg { transform: scale(1.08); }
.dwv2-card .dwv2-card-heart.is-favorited svg { fill: var(--dw-burgundy); }
/* large variant (hero placements) — taller photo, bigger price */
.dwv2-card-large .dwv2-card-photo { height: 230px; }
.dwv2-card-large .dwv2-card-price { font-size: 25px; }
.dwv2-card-body { padding: 9px 14px 12px; }
.dwv2-card-pricerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dwv2-card-price { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -0.02em; color: var(--dw-ink); white-space: nowrap; }
.dwv2-card-status { flex: 0 0 auto; font-family: var(--dw-font-v2-body); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.dwv2-card-specs { font-family: var(--dw-font-v2-body); font-size: 13px; line-height: 1.1; margin-top: 8px; color: var(--dw-ink); }
.dwv2-card-specs b { font-weight: 700; }
.dwv2-card-specs .sep { color: var(--dw-muted-warm); }
.dwv2-card-street { font-family: var(--dw-font-v2-body); font-weight: 500; font-size: 13px; color: var(--dw-ink); margin-top: 8px; }
.dwv2-card-city { font-family: var(--dw-font-v2-body); font-size: 12px; color: var(--dw-ink-2); margin-top: 2px; }
@media (max-width: 860px) {
  .dwv2-featured-inner { padding: 18px 16px 22px; }
  .dwv2-featured-head { gap: 10px; margin-bottom: 12px; }
  .dwv2-featured-head h2 { font-size: 17px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .dwv2-featured-seeall { font-size: 13px; }
  .dwv2-seeall-arrow { display: none; }
  .dwv2-featured-grid { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .dwv2-featured-grid::-webkit-scrollbar { display: none; }
  .dwv2-featured-grid > .dwv2-card { flex: 0 0 78%; }
  .dwv2-card-photo { height: 0; padding-bottom: 62.5%; }
}

/* ── Action / intent band (block 3, §2.3) — Sell · Buy · Connect ── */
.dwv2-action { background: var(--dw-sand); }
.dwv2-action-inner { max-width: var(--dw-container); margin: 0 auto; padding: 30px 36px 36px; }
.dwv2-action-cards { display: flex; gap: 18px; align-items: stretch; }
.dwv2-action-card { flex: 1; min-width: 0; background: #fff; border: 1px solid rgba(36,19,25,0.08); border-radius: 16px; box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 8px 20px rgba(36,19,25,0.06); padding: 24px; display: flex; flex-direction: column; }
.dwv2-action-eyebrow { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dw-burgundy); margin-bottom: 7px; }
.dwv2-action-h { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--dw-ink); line-height: 1.12; }
.dwv2-action-sub { font-family: var(--dw-font-v2-body); font-size: 13px; line-height: 1.45; color: var(--dw-ink-2); margin-top: 7px; }
.dwv2-action-sub strong { color: var(--dw-ink); font-weight: 700; }
.dwv2-sell-row { display: flex; align-items: center; gap: 8px; background: var(--dw-surface-warm); border: 1px solid rgba(100,41,60,0.18); border-radius: 11px; padding: 8px 8px 8px 13px; margin-top: 14px; }
.dwv2-sell-row input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--dw-font-v2-body); font-size: 13px; color: var(--dw-ink); }
.dwv2-sell-row input::placeholder { color: var(--dw-muted-warm); }
.dwv2-sell-btn { flex: 0 0 auto; background: var(--dw-cta); color: #fff; border: none; border-radius: 8px; padding: 9px 14px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: background 140ms; }
.dwv2-sell-btn:hover { background: var(--dw-burgundy); }
.dwv2-sell-disc { display: flex; align-items: flex-start; gap: 6px; margin-top: 11px; font-family: var(--dw-font-v2-body); font-size: 11px; line-height: 1.4; color: var(--dw-ink-2); }
.dwv2-buy-btn { align-self: flex-start; margin-top: 14px; background: transparent; color: var(--dw-burgundy); border: 1.5px solid var(--dw-burgundy); border-radius: 10px; padding: 10px 16px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; transition: background 140ms; }
.dwv2-buy-btn:hover, .dwv2-buy-btn:focus { background: var(--dw-burgundy-wash); color: var(--dw-burgundy); }
.dwv2-buy-note { font-family: var(--dw-font-v2-body); font-size: 11px; line-height: 1.4; color: var(--dw-ink-2); margin-top: 11px; }
.dwv2-action-connect { text-align: center; margin-top: 16px; font-family: var(--dw-font-v2-body); font-size: 13px; color: var(--dw-ink-2); }
.dwv2-action-connect a { font-family: var(--dw-font-v2-display); font-weight: 700; color: var(--dw-burgundy); border-bottom: 1.5px solid rgba(100,41,60,0.3); padding-bottom: 1px; text-decoration: none; }
.dwv2-action-connect a:hover, .dwv2-action-connect a:focus { color: var(--dw-burgundy); border-bottom-color: var(--dw-burgundy); }
@media (max-width: 860px) {
  .dwv2-action-inner { padding: 20px 16px 24px; }
  .dwv2-action-cards { flex-direction: column; gap: 14px; }
  .dwv2-action-card { padding: 18px; }
  .dwv2-action-h { font-size: 19px; }
  .dwv2-sell-row { flex-direction: column; align-items: stretch; gap: 9px; padding: 0; background: transparent; border: none; }
  .dwv2-sell-row input { background: var(--dw-surface-warm); border: 1px solid rgba(100,41,60,0.18); border-radius: 11px; padding: 12px 13px; }
  .dwv2-sell-btn { width: 100%; border-radius: 10px; padding: 12px; font-size: 13.5px; }
  .dwv2-buy-btn { width: 100%; text-align: center; }
  .dwv2-arrow { display: none; }
  .dwv2-action-connect-cta { display: inline-block; margin-top: 5px; }
}

/* ── Why dwello (block 4, §2.4) — Ewelina trust/human layer ──
   Desktop: photo left (grid col 1, full-height), copy stacked right (col 2).
   Mobile: single column with source-order overridden so it reads eyebrow+headline → photo → rest. */
.dwv2-why { background: var(--dw-cream); }
.dwv2-why-inner { max-width: var(--dw-container); margin: 0 auto; padding: 46px 36px 52px; display: grid; grid-template-columns: minmax(0, 360px) 1fr; column-gap: 44px; align-items: stretch; }
.dwv2-why-photo { grid-column: 1; grid-row: 1 / span 50; min-height: 440px; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 32px rgba(36,19,25,0.18); }
.dwv2-why-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 35%; transform: scale(1.44); transform-origin: center 38%; }
.dwv2-why-inner > :not(.dwv2-why-photo) { grid-column: 2; }
.dwv2-why-eyebrow { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dw-burgundy); margin-bottom: 9px; }
.dwv2-why-h { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 1.08; color: var(--dw-ink); margin: 0; }
.dwv2-why-body { font-family: var(--dw-font-v2-body); font-size: 14px; line-height: 1.55; color: var(--dw-ink-2); margin-top: 13px; }
.dwv2-why-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.dwv2-why-pt { display: flex; align-items: flex-start; gap: 9px; font-family: var(--dw-font-v2-body); font-size: 13.5px; line-height: 1.4; color: var(--dw-ink); }
.dwv2-why-pt svg { flex: 0 0 auto; margin-top: 2px; }
.dwv2-why-review { margin-top: 20px; padding: 14px 16px; background: #fff; border: 1px solid rgba(36,19,25,0.08); border-radius: 12px; box-shadow: 0 1px 2px rgba(36,19,25,0.04); max-width: 460px; }
.dwv2-why-stars { color: var(--dw-brass); font-size: 13px; letter-spacing: 3px; }
.dwv2-why-quote { font-family: var(--dw-font-v2-body); font-size: 13px; line-height: 1.5; color: var(--dw-ink); margin-top: 7px; font-style: italic; }
.dwv2-why-cite { font-family: var(--dw-font-v2-body); font-size: 11.5px; color: var(--dw-ink-2); margin-top: 7px; }
.dwv2-why-cta { justify-self: start; display: inline-block; margin-top: 20px; background: var(--dw-cta); color: #fff; border: none; border-radius: 11px; padding: 13px 22px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 14px; text-decoration: none; transition: background 140ms; }
.dwv2-why-cta:hover, .dwv2-why-cta:focus { background: var(--dw-burgundy); color: #fff; }
.dwv2-why-nopressure { font-family: var(--dw-font-v2-body); font-size: 12px; color: var(--dw-ink-2); margin-top: 11px; }
@media (max-width: 860px) {
  .dwv2-why-inner { display: flex; flex-direction: column; column-gap: 0; padding: 28px 16px 34px; }
  .dwv2-why-eyebrow, .dwv2-why-h { order: 0; }
  .dwv2-why-photo { order: 1; width: 236px; margin: 18px auto 6px; aspect-ratio: 4 / 5; min-height: 0; }
  .dwv2-why-body, .dwv2-why-list, .dwv2-why-review, .dwv2-why-cta, .dwv2-why-nopressure { order: 2; }
  .dwv2-why-h { font-size: 24px; }
  .dwv2-why-review { max-width: 100%; }
  .dwv2-why-cta { display: block; text-align: center; }
  .dwv2-why-nopressure { text-align: center; }
}

/* ── Guides (block 5, §2.5) — slim authority strip → /guides ── */
.dwv2-guides { background: var(--dw-sand); }
.dwv2-guides-inner { max-width: var(--dw-container); margin: 0 auto; padding: 32px 36px 38px; }
.dwv2-guides-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dwv2-guides-head h2 { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 23px; letter-spacing: -0.02em; color: var(--dw-ink); line-height: 1.12; margin: 0; }
.dwv2-guides-head p { font-family: var(--dw-font-v2-body); font-size: 13px; color: var(--dw-ink-2); margin: 4px 0 0; }
.dwv2-guides-seeall { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13px; color: var(--dw-burgundy); white-space: nowrap; border-bottom: 1.5px solid rgba(100,41,60,0.3); padding-bottom: 2px; text-decoration: none; flex: 0 0 auto; }
.dwv2-guides-seeall:hover, .dwv2-guides-seeall:focus { color: var(--dw-burgundy); border-bottom-color: var(--dw-burgundy); }
.dwv2-guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dwv2-guide-card { display: block; text-decoration: none; background: #fff; border: 1px solid rgba(36,19,25,0.08); border-radius: 14px; box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 6px 16px rgba(36,19,25,0.05); padding: 18px 18px 16px; transition: box-shadow 200ms var(--dw-ease), transform 200ms var(--dw-ease); }
.dwv2-guide-card:hover { box-shadow: 0 2px 4px rgba(36,19,25,0.06), 0 12px 28px rgba(36,19,25,0.09); transform: translateY(-2px); }
.dwv2-guide-tag { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dw-burgundy); }
.dwv2-guide-title { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; line-height: 1.2; color: var(--dw-ink); margin-top: 8px; }
.dwv2-guide-teaser { font-family: var(--dw-font-v2-body); font-size: 12.5px; line-height: 1.45; color: var(--dw-ink-2); margin-top: 7px; }
.dwv2-guide-read { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 12px; color: var(--dw-burgundy); margin-top: 12px; }
@media (max-width: 860px) {
  .dwv2-guides-inner { padding: 22px 16px 26px; }
  .dwv2-guides-head { flex-wrap: wrap; margin-bottom: 13px; }
  .dwv2-guides-head h2 { font-size: 20px; }
  .dwv2-guides-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Closing CTA (block 6, §2.6) — burgundy band, one primary action + quiet secondary ── */
.dwv2-close { background: var(--dw-burgundy); padding: 58px 36px 62px; text-align: center; }
.dwv2-close h2 { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; color: #F4EDE7; max-width: 620px; margin: 0 auto; }
.dwv2-close p { font-family: var(--dw-font-v2-body); font-size: 15px; line-height: 1.55; color: rgba(244,237,231,0.88); max-width: 540px; margin: 13px auto 0; }
.dwv2-close-primary { display: inline-block; margin-top: 24px; background: var(--dw-cream); color: var(--dw-burgundy); font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 15px; padding: 14px 26px; border-radius: 12px; text-decoration: none; transition: background 140ms; }
.dwv2-close-primary:hover, .dwv2-close-primary:focus { background: #fff; color: var(--dw-burgundy); }
.dwv2-close-secondary { margin-top: 15px; font-family: var(--dw-font-v2-body); font-size: 13px; color: rgba(244,237,231,0.85); }
.dwv2-close-secondary a { font-weight: 600; color: #F4EDE7; border-bottom: 1px solid rgba(244,237,231,0.5); padding-bottom: 1px; text-decoration: none; }
.dwv2-close-secondary a:hover, .dwv2-close-secondary a:focus { border-bottom-color: #F4EDE7; color: #F4EDE7; }
@media (max-width: 860px) {
  .dwv2-close { padding: 40px 20px 46px; }
  .dwv2-close h2 { font-size: 26px; }
  .dwv2-close p { font-size: 14px; max-width: 100%; }
}

body.dw-body {
  margin: 0;
  padding: 0;
  font-family: var(--dw-font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--dw-text);
  background: var(--dw-bg);
  transition: background var(--dw-dur) var(--dw-ease), color var(--dw-dur) var(--dw-ease);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Tabular numbers for prices, stats */
  font-feature-settings: "cv11", "ss01", "ss02";
}

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

a {
  color: var(--dw-sky);
  text-decoration: none;
  transition: color var(--dw-dur-snap) var(--dw-ease);
}
a:hover { color: var(--dw-sky-hover); }

/* Light/dark lockup visibility */
.dw-lockup-light { display: block; }
.dw-lockup-dark { display: none; }
[data-theme="dark"] .dw-lockup-light { display: none; }
[data-theme="dark"] .dw-lockup-dark { display: block; }

/* ───────────── TYPOGRAPHY SCALE ───────────── */
.dw-display {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--dw-text);
  margin: 0 0 var(--dw-sp-4);
}

.dw-h1 {
  font-family: var(--dw-font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--dw-text);
  margin: 0 0 var(--dw-sp-4);
}

.dw-h2 {
  font-family: var(--dw-font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--dw-text);
  margin: 0 0 var(--dw-sp-3);
}

.dw-h3 {
  font-family: var(--dw-font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  margin: 0 0 var(--dw-sp-2);
}

.dw-lede {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--dw-text-2);
  font-weight: 400;
  max-width: 62ch;
  margin: 0 0 var(--dw-sp-6);
}

.dw-body-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--dw-text-2);
}

.dw-editorial {
  font-family: var(--dw-font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.35;
  color: var(--dw-text);
  letter-spacing: -0.01em;
}

.dw-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dw-price {
  font-family: var(--dw-font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--dw-text);
}

/* ───────────── LAYOUT PRIMITIVES ───────────── */
.dw-container {
  width: 100%;
  max-width: var(--dw-container);
  margin: 0 auto;
  padding: 0 var(--dw-sp-6);
}
@media (max-width: 680px) {
  .dw-container { padding: 0 var(--dw-sp-4); }
}

.dw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--dw-header-h));
}

/* ───────────── HEADER ───────────── */
.dw-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--dw-header-h);
  /* Hard cap + clip so the logo can never spill below the header line. */
  max-height: var(--dw-header-h);
  overflow: hidden;
  /* 2026-04-29: solid bg matching mobile after the 0.96-opacity + 6px
     blur attempt didn't resolve the fuzzy logo outline. Translucency +
     backdrop-filter at any value composites the logo's anti-aliased
     edges against a non-stable backdrop — only fully opaque eliminates
     it. Same pattern as the mobile back-nav-flash fix from 2026-04-28. */
  background: var(--dw-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0.5px solid var(--dw-outline);
  transition: background var(--dw-dur) var(--dw-ease), border-color var(--dw-dur) var(--dw-ease);
}
[data-theme="dark"] .dw-header {
  background: var(--dw-surface);
}

.dw-header-inner {
  max-width: var(--dw-container);
  margin: 0 auto;
  padding: 0 var(--dw-sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--dw-sp-8);
}
@media (max-width: 680px) {
  .dw-header-inner { padding: 0 var(--dw-sp-4); gap: var(--dw-sp-4); }
}

.dw-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--dw-dur-snap) var(--dw-ease);
}
.dw-logo-link:hover { transform: translateY(-0.5px); }
.dw-logo-link:active { transform: translateY(0); }

.dw-logo {
  /* SVG viewBox is tight-cropped to actual artwork (no whitespace pad),
     so size directly to fit the header with breathing room. */
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}
/* Desktop keeps the original light/dark swap (dark-ink mark on light
   theme, baby-blue mark on dark theme — designed for each background). */
.dw-logo-light { display: block; }
.dw-logo-dark { display: none; }
[data-theme="dark"] .dw-logo-light { display: none; }
[data-theme="dark"] .dw-logo-dark { display: block; }
@media (max-width: 900px) {
  /* M-Mob-9: header on mobile is logo-only (hamburger hidden, header-actions
     hidden, nav hidden). Center the logo + give it visual weight in the
     mobile header. */
  .dw-header-inner { justify-content: center; }
  .dw-logo-link { margin-left: auto; margin-right: auto; }
  .dw-logo {
    height: 104px;
  }
  /* Solid header on mobile (no backdrop-filter blur). The blur pixels
     reference whatever's behind the header in the live DOM, so during a
     View Transition (e.g. back-nav from listing → search) the content
     behind changes every frame and the blur recomputes — visible as a
     shimmer/flash at the top of the page. Solid background eliminates
     the recomputation and matches native iOS app design. */
  .dw-header {
    background: var(--dw-surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  [data-theme="dark"] .dw-header {
    background: var(--dw-surface);
  }
}
@media (max-width: 680px) {
  .dw-logo {
    height: 88px;
  }
}

.dw-nav {
  display: flex;
  align-items: center;
  gap: var(--dw-sp-6);
  margin-left: var(--dw-sp-4);
}
@media (max-width: 900px) {
  .dw-nav { display: none; }
}

.dw-nav-link {
  color: var(--dw-text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 4px;
  position: relative;
  transition: color var(--dw-dur-snap) var(--dw-ease);
}
.dw-nav-link:hover { color: var(--dw-text); }
.dw-nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--dw-sky);
  border-radius: 1px;
  transition: width var(--dw-dur) var(--dw-ease);
}
.dw-nav-link:hover::after { width: 20px; }
.dw-nav-link.active { color: var(--dw-text); }
.dw-nav-link.active::after { width: 20px; }

.dw-nav-link-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dw-radius-pill);
  padding: 0;
}
.dw-nav-link-icon:hover { background: var(--dw-slate-soft); color: var(--dw-text); }
.dw-nav-link-icon svg { width: 20px; height: 20px; }
.dw-nav-link-icon::after { display: none; }

.dw-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--dw-sp-3);
}

.dw-theme-toggle {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--dw-radius-pill);
  cursor: pointer;
  color: var(--dw-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dw-dur-snap) var(--dw-ease), color var(--dw-dur-snap) var(--dw-ease);
  font-family: inherit;
}
.dw-theme-toggle:hover { background: var(--dw-slate-soft); color: var(--dw-text); }
.dw-theme-icon { width: 18px; height: 18px; position: absolute; transition: opacity var(--dw-dur) var(--dw-ease), transform var(--dw-dur) var(--dw-ease); }
.dw-theme-icon-sun { opacity: 1; transform: rotate(0); }
.dw-theme-icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .dw-theme-icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .dw-theme-icon-moon { opacity: 1; transform: rotate(0); }
.dw-theme-toggle { position: relative; }

.dw-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
}
.dw-mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--dw-text);
  border-radius: 1px;
  transition: all var(--dw-dur) var(--dw-ease);
}
@media (max-width: 900px) {
  .dw-mobile-menu-btn { display: inline-flex; }
  .dw-header-actions { display: none; }
}

/* ───────────── BUTTONS ───────────── */
.dw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--dw-radius);
  border: none;
  font-family: var(--dw-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.dw-btn:active { transform: translateY(1px) scale(0.99); }
.dw-btn:focus-visible { outline: none; box-shadow: var(--dw-shadow-focus); }

.dw-btn-primary {
  background: var(--dw-sky);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(110, 181, 233, 0.30), 0 4px 12px -2px rgba(110, 181, 233, 0.30);
}
.dw-btn-primary:hover {
  background: var(--dw-sky-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(110, 181, 233, 0.35), 0 8px 20px -2px rgba(110, 181, 233, 0.40);
}
.dw-btn-primary:active {
  background: var(--dw-sky-pressed);
  transform: translateY(0);
}

.dw-btn-secondary {
  background: var(--dw-surface);
  color: var(--dw-text);
  border: 1px solid var(--dw-outline);
}
.dw-btn-secondary:hover {
  border-color: var(--dw-outline-strong);
  background: var(--dw-surface-subtle);
  color: var(--dw-text);
}

.dw-btn-ghost {
  background: transparent;
  color: var(--dw-text-2);
}
.dw-btn-ghost:hover {
  background: var(--dw-slate-soft);
  color: var(--dw-text);
}

.dw-btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}
.dw-btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: var(--dw-radius-sm);
}

/* ───────────── PLACEHOLDER (temporary landing) ───────────── */
.dw-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--dw-sp-16) var(--dw-sp-6);
  text-align: center;
  min-height: 70dvh;
}
.dw-placeholder-inner {
  max-width: 640px;
}
.dw-placeholder-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--dw-sp-6);
  opacity: 0.75;
  animation: dw-float 4s var(--dw-ease-smooth) infinite;
}
@keyframes dw-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .dw-placeholder-icon { animation: none; }
}

/* ───────────── FOOTER ───────────── */
.dw-footer {
  background: var(--dw-surface-subtle);
  border-top: 0.5px solid var(--dw-outline);
  margin-top: var(--dw-sp-20);
}

.dw-footer-inner {
  max-width: var(--dw-container);
  margin: 0 auto;
  padding: var(--dw-sp-16) var(--dw-sp-6) var(--dw-sp-12);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--dw-sp-10);
}
@media (max-width: 900px) {
  .dw-footer-inner { grid-template-columns: 1fr 1fr; gap: var(--dw-sp-8); }
  .dw-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .dw-footer-inner { grid-template-columns: 1fr 1fr; padding: var(--dw-sp-10) var(--dw-sp-4) var(--dw-sp-8); }
}

.dw-footer-lockup {
  max-width: 240px;
  height: auto;
  margin-bottom: var(--dw-sp-4);
}

.dw-footer-tagline {
  font-size: 13px;
  color: var(--dw-text-3);
  line-height: 1.5;
  margin: 0;
  max-width: 320px;
}

.dw-footer-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--dw-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--dw-sp-4);
}

.dw-footer-link {
  display: block;
  color: var(--dw-text-2);
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--dw-dur-snap) var(--dw-ease);
}
.dw-footer-link:hover { color: var(--dw-text); }

/* ───────────── COMPLIANCE STRIP ───────────── */
.dw-compliance {
  border-top: 0.5px solid var(--dw-outline);
  background: var(--dw-surface);
}

.dw-compliance-inner {
  max-width: var(--dw-container);
  margin: 0 auto;
  padding: var(--dw-sp-6);
  display: flex;
  gap: var(--dw-sp-6);
  align-items: flex-start;
}
@media (max-width: 720px) {
  .dw-compliance-inner { flex-direction: column; gap: var(--dw-sp-4); padding: var(--dw-sp-5) var(--dw-sp-4); }
}

.dw-compliance-logos {
  display: flex;
  align-items: center;
  gap: var(--dw-sp-4);
  flex-shrink: 0;
}

.dw-exp-mark {
  height: 32px;
  width: auto;
  opacity: 0.85;
}

/* MLS GRID approved icon — required by IDX Rule 23 on the first page where
   listings display. Putting it in the global compliance footer covers the
   homepage (featured listings) + /search + /listings/:id in one place. */
.dw-mls-grid-mark {
  height: 36px;
  width: auto;
  opacity: 0.9;
}

.dw-eho {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--dw-text-3);
}
.dw-eho svg { width: 100%; height: 100%; }

.dw-compliance-text {
  flex: 1;
  min-width: 0;
}

.dw-compliance-p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--dw-text-3);
  margin: 0 0 var(--dw-sp-2);
}
.dw-compliance-p:last-child { margin-bottom: 0; }
.dw-compliance-small { font-size: 10.5px; opacity: 0.85; }

/* ───────────── UTILITIES ───────────── */
.dw-surface-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  box-shadow: var(--dw-shadow-sm);
  transition: box-shadow var(--dw-dur) var(--dw-ease), transform var(--dw-dur) var(--dw-ease), border-color var(--dw-dur) var(--dw-ease);
}
.dw-surface-card:hover {
  box-shadow: var(--dw-shadow-md);
  transform: translateY(-2px);
  border-color: var(--dw-outline-strong);
}

.dw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--dw-radius-pill);
  background: var(--dw-slate-soft);
  color: var(--dw-text-2);
  font-size: 12px;
  font-weight: 500;
  border: 0.5px solid transparent;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}

.dw-chip-active {
  background: var(--dw-sky);
  color: #FFFFFF;
  font-weight: 600;
}

.dw-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--dw-radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dw-status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.dw-status-active { background: var(--dw-active-soft); color: var(--dw-active); }
.dw-status-pending { background: var(--dw-pending-soft); color: var(--dw-pending); }
.dw-status-closed { background: var(--dw-closed-soft); color: var(--dw-closed); }
.dw-status-coming-soon { background: var(--dw-coming-soon-soft); color: var(--dw-coming-soon); }
.dw-status-alert { background: var(--dw-alert-soft); color: var(--dw-alert); }

/* When a status pill is rendered OVER a photo (card overlay context),
   apply a backdrop-blur so the pill reads as a discrete chip regardless
   of what's behind it. Without this the 14% opacity soft-color bg blends
   into dark photo regions in dark mode — Brandon's bug report 2026-04-21. */
.dw-card-badges-top .dw-status-pill {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .dw-card-badges-top .dw-status-pill {
  background: rgba(10, 14, 22, 0.70);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .dw-card-badges-top .dw-status-active { color: #6EDDA0; }
[data-theme="dark"] .dw-card-badges-top .dw-status-pending { color: #FCCB6B; }
[data-theme="dark"] .dw-card-badges-top .dw-status-closed { color: #CBD2DD; }
[data-theme="dark"] .dw-card-badges-top .dw-status-coming-soon { color: #5EDEDE; }
[data-theme="dark"] .dw-card-badges-top .dw-status-alert { color: #F0817F; }
/* Aged-DOM badge uses near-white bg in both modes; in dark mode that blends
   into light/neutral photo regions, so override to the same dark glass. */
[data-theme="dark"] .dw-card-badges-top .dw-card-badge-aged {
  background: rgba(10, 14, 22, 0.70);
  color: #E6E8EC;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE
═══════════════════════════════════════════════════════════════════════════ */

/* ───────────── HERO ───────────── */
.dw-hero {
  position: relative;
  min-height: 88dvh;
  padding: var(--dw-sp-20) var(--dw-sp-6) var(--dw-sp-24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* M-Mob-4: cap the hero on mobile so the search bar reaches eye level
   instead of pushing all featured content below the fold. 88dvh × 80px
   top + 96px bottom = entire fold on iPhone SE. Compress min-height to
   72dvh (capped at 600px on big phones) and drop padding ~40%. Featured
   listings + Why dwello now peek above the fold. */
@media (max-width: 720px) {
  .dw-hero {
    min-height: min(72dvh, 600px);
    padding: var(--dw-sp-12) var(--dw-sp-5) var(--dw-sp-16);
  }
}
.dw-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(110, 181, 233, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 70%, rgba(245, 166, 35, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, var(--dw-bg) 0%, var(--dw-mist) 100%);
  z-index: -1;
}
[data-theme="dark"] .dw-hero-bg {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(110, 181, 233, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 70%, rgba(245, 166, 35, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--dw-bg) 0%, var(--dw-mist) 100%);
}

.dw-hero-inner {
  max-width: 920px;
  width: 100%;
  text-align: center;
  animation: dw-hero-rise 800ms var(--dw-ease-smooth) both;
}
@keyframes dw-hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.dw-hero-eyebrow {
  margin-bottom: var(--dw-sp-4);
  color: var(--dw-sky);
  animation: dw-fade-up 700ms 100ms var(--dw-ease-smooth) both;
}
.dw-hero-title {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: var(--dw-sp-5);
  animation: dw-fade-up 700ms 180ms var(--dw-ease-smooth) both;
}
.dw-hero-lede {
  font-size: clamp(16px, 1.6vw, 22px);
  margin: 0 auto var(--dw-sp-10);
  max-width: 560px;
  animation: dw-fade-up 700ms 280ms var(--dw-ease-smooth) both;
}
@keyframes dw-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.dw-hero-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  box-shadow: var(--dw-shadow-lg);
  max-width: 640px;
  margin: 0 auto var(--dw-sp-8);
  transition: border-color var(--dw-dur) var(--dw-ease), box-shadow var(--dw-dur) var(--dw-ease), transform var(--dw-dur) var(--dw-ease);
  animation: dw-fade-up 700ms 400ms var(--dw-ease-smooth) both;
}
.dw-hero-search:focus-within {
  border-color: var(--dw-sky);
  /* Ship 7h: removed the layered dw-shadow-lg base so focus is a single
     clean ring (matches .dw-input / textarea focus treatment). The layered
     shadow + lift combo made it look "puffy" / double-bordered. */
  box-shadow: var(--dw-shadow-focus);
}
.dw-hero-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.dw-hero-search-icon {
  position: absolute;
  left: 20px;
  width: 20px;
  height: 20px;
  color: var(--dw-text-3);
  pointer-events: none;
}
.dw-hero-search-input {
  flex: 1;
  padding: 16px 20px 16px 52px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--dw-text);
  outline: none;
  width: 100%;
  min-width: 0;
}
.dw-hero-search-input::placeholder {
  color: var(--dw-text-3);
  /* Ship 7i: premium fade for rotating hints. Color transition is more
     cross-browser reliable than ::placeholder opacity (Safari quirks).
     Cubic-bezier 0.4,0,0.2,1 is Material's standard curve — smooth
     acceleration + deceleration, feels refined rather than linear. */
  transition: color 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dw-hero-search-input.is-hint-fading::placeholder { color: transparent; }
.dw-filter-search-input::placeholder {
  transition: color 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dw-filter-search-input.is-hint-fading::placeholder { color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .dw-hero-search-input::placeholder,
  .dw-filter-search-input::placeholder { transition: none; }
}
.dw-hero-search-btn { padding: 14px 28px; flex-shrink: 0; }
@media (max-width: 560px) {
  .dw-hero-search { flex-direction: column; border-radius: var(--dw-radius-lg); padding: 10px; }
  .dw-hero-search-btn { width: 100%; }
}

/* ─── S2 — search suggest dropdown (2026-04-29) ─────────────────────── */
.dw-suggest-dropdown {
  position: fixed;
  z-index: 9999;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--dw-surface);
  color: var(--dw-text);
  border: 1px solid var(--dw-outline);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  padding: 6px 0;
  font-size: 14px;
  animation: dw-suggest-in 0.14s ease-out both;
}
@keyframes dw-suggest-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dw-suggest-group-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dw-text-3);
}
.dw-suggest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  margin: 0 6px;
  transition: background 0.08s ease;
}
.dw-suggest-row.is-highlighted,
.dw-suggest-row:hover {
  background: var(--dw-surface-elevated, rgba(110, 181, 233, 0.08));
}
.dw-suggest-row-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--dw-surface-elevated, rgba(110, 181, 233, 0.10));
  display: grid;
  place-items: center;
  position: relative;
}
.dw-suggest-row-icon::before {
  content: '';
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: var(--dw-icon-filter, none);
  opacity: 0.78;
}
/* Per-type SVG markers via inline data URL — avoids extra HTTP cost */
.dw-suggest-icon-city::before    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 21h18'/><path d='M5 21V7l8-4v18'/><path d='M19 21V11l-6-4'/><path d='M9 9v.01'/><path d='M9 12v.01'/><path d='M9 15v.01'/><path d='M9 18v.01'/></svg>"); }
.dw-suggest-icon-zip::before     { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 1 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.dw-suggest-icon-address::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/><polyline points='9 22 9 12 15 12 15 22'/></svg>"); }
.dw-suggest-icon-mls::before     { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><path d='M9 9h6v6H9z'/></svg>"); }
.dw-suggest-icon-subdivision::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='22 12 18 12 15 21 9 3 6 12 2 12'/></svg>"); }
.dw-suggest-icon-school::before  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236EB5E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 10v6M2 10l10-5 10 5-10 5z'/><path d='M6 12v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/></svg>"); }
.dw-suggest-row-text { flex: 1; min-width: 0; }
.dw-suggest-row-label {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dw-suggest-row-sub {
  font-size: 12px;
  color: var(--dw-text-3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .dw-suggest-dropdown {
    border-radius: 12px;
    max-height: 70vh;
    font-size: 15px;
  }
  .dw-suggest-row { padding: 11px 14px; }
}

.dw-hero-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  animation: dw-fade-up 700ms 520ms var(--dw-ease-smooth) both;
}
.dw-hero-chip-label {
  font-size: 12px;
  color: var(--dw-text-3);
  font-weight: 500;
  margin-right: 4px;
}
.dw-hero-chips .dw-chip {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  padding: 7px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-hero-chips .dw-chip:hover {
  border-color: var(--dw-sky);
  color: var(--dw-sky);
  transform: translateY(-1px);
}

.dw-hero-scroll-hint {
  position: absolute;
  bottom: var(--dw-sp-8);
  left: 50%;
  transform: translateX(-50%);
  color: var(--dw-text-3);
  opacity: 0.5;
  animation: dw-bounce 2.4s var(--dw-ease-smooth) infinite;
}
.dw-hero-scroll-hint svg { width: 20px; height: 20px; }
@keyframes dw-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ───────────── SECTION SCAFFOLDING ───────────── */
.dw-section {
  padding: var(--dw-sp-20) 0;
}
.dw-section-head {
  margin-bottom: var(--dw-sp-10);
}
.dw-section-head-center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.dw-section-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--dw-sp-6);
  flex-wrap: wrap;
}
.dw-section-lede {
  margin-top: var(--dw-sp-3);
  font-size: 16px;
}
.dw-section-cta { flex-shrink: 0; }

/* ───────────── VALUE CARDS ───────────── */
.dw-values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--dw-sp-6);
}
@media (max-width: 900px) { .dw-values-grid { grid-template-columns: 1fr; } }

.dw-value-card {
  padding: var(--dw-sp-8) var(--dw-sp-6);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  transition: border-color var(--dw-dur) var(--dw-ease), transform var(--dw-dur) var(--dw-ease), box-shadow var(--dw-dur) var(--dw-ease);
}
.dw-value-card:hover {
  border-color: var(--dw-sky);
  transform: translateY(-4px);
  box-shadow: var(--dw-shadow-lg);
}
.dw-value-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, var(--dw-gold-soft) 100%);
  border-radius: var(--dw-radius-lg);
  margin-bottom: var(--dw-sp-5);
  color: var(--dw-sky);
  transition: transform var(--dw-dur) var(--dw-ease-spring);
}
.dw-value-card:hover .dw-value-icon { transform: rotate(-4deg) scale(1.05); }
.dw-value-icon svg { width: 28px; height: 28px; }

/* ───────────── LISTING CARDS ───────────── */
.dw-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--dw-sp-6);
}
@media (max-width: 560px) {
  .dw-listings-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCOUNT AREA — sidebar + tabs + cards
   =================================================================== */
.dw-acct-wrap {
  padding: 48px 0 96px;
  min-height: calc(100dvh - var(--dw-header-h));
  background: linear-gradient(180deg, var(--dw-mist) 0%, var(--dw-surface) 400px);
}
.dw-acct-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .dw-acct-grid { grid-template-columns: 1fr; gap: 20px; }
}

.dw-acct-side {
  position: sticky;
  top: calc(var(--dw-header-h) + 16px);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}
@media (max-width: 800px) { .dw-acct-side { position: static; min-height: 0; } }

.dw-acct-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--dw-outline);
  margin-bottom: 14px;
}
.dw-acct-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.dw-acct-hello { font-weight: 700; font-size: 14px; color: var(--dw-text); }
.dw-acct-email { font-size: 12px; color: var(--dw-text-3); margin-top: 2px; }

.dw-acct-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.dw-acct-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--dw-text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s cubic-bezier(0.19,1,0.22,1);
}
.dw-acct-nav-item:hover {
  background: var(--dw-mist);
  color: var(--dw-text);
  transform: translateX(2px);
}
.dw-acct-nav-item.active {
  background: rgba(110, 181, 233, 0.12);
  color: var(--dw-sky);
  font-weight: 600;
}
.dw-acct-nav-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  font-size: 14px;
}

.dw-acct-body { min-width: 0; }
.dw-acct-pane-head { margin-bottom: 28px; }
.dw-acct-pane-title {
  font-family: var(--dw-font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--dw-text);
}
.dw-acct-pane-sub { color: var(--dw-text-2); font-size: 15px; margin: 0; }

.dw-acct-empty {
  padding: 72px 24px;
  text-align: center;
  background: var(--dw-surface);
  border: 1px dashed var(--dw-outline);
  border-radius: 18px;
  color: var(--dw-text-3);
}
.dw-acct-empty-icon { font-size: 42px; margin-bottom: 12px; opacity: 0.8; }
.dw-acct-empty-title { font-size: 18px; font-weight: 600; color: var(--dw-text); margin-bottom: 6px; }
.dw-acct-empty-sub { font-size: 14px; margin-bottom: 0; }

/* ─── Saved-search cards (consumer) ─────────────────────────────────── */
.dw-searches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
@media (max-width: 520px) { .dw-searches-grid { grid-template-columns: 1fr; } }

.dw-ssc {
  position: relative;
  display: block;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 16px;
  padding: 24px 24px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.22s cubic-bezier(0.19,1,0.22,1);
  overflow: hidden;
}
.dw-ssc::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(110,181,233,0.06) 0%, rgba(110,181,233,0) 40%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.dw-ssc:hover {
  transform: translateY(-4px);
  border-color: var(--dw-sky);
  box-shadow: 0 18px 40px rgba(68, 91, 105, 0.12), 0 2px 8px rgba(68, 91, 105, 0.06);
}
.dw-ssc:hover::before { opacity: 1; }
.dw-ssc:hover .dw-ssc-arrow { transform: translateX(4px); color: var(--dw-sky); }

.dw-ssc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.dw-ssc-name {
  font-family: var(--dw-font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--dw-text);
  line-height: 1.2;
}
.dw-ssc-freq {
  font-size: 12px;
  font-weight: 600;
  color: var(--dw-sky);
  letter-spacing: -0.01em;
}
.dw-ssc-foot-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.dw-ssc-foot-sep { color: var(--dw-text-3); opacity: 0.5; }
.dw-ssc-foot-meta { color: var(--dw-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dw-ssc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.dw-ssc-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--dw-mist);
  color: var(--dw-text-2);
}

/* Small inline pill in the top-right — elegant, not shouty. */
.dw-ssc-count {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(110,181,233,0.18), rgba(110,181,233,0.08));
  border: 1px solid rgba(110,181,233,0.28);
  color: var(--dw-sky);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  z-index: 1;
  transition: all 0.2s cubic-bezier(0.19,1,0.22,1);
}
[data-theme="dark"] .dw-ssc-count {
  background: linear-gradient(135deg, rgba(110,181,233,0.22), rgba(110,181,233,0.08));
  border-color: rgba(110,181,233,0.35);
}
.dw-ssc:hover .dw-ssc-count {
  background: linear-gradient(135deg, rgba(110,181,233,0.28), rgba(110,181,233,0.12));
  transform: translateY(-1px);
}
.dw-ssc-count-num { font-weight: 700; letter-spacing: -0.01em; }
.dw-ssc-count-lbl { font-weight: 500; opacity: 0.82; }

.dw-ssc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--dw-outline);
  font-size: 12px;
  color: var(--dw-text-3);
}
.dw-ssc-arrow {
  font-size: 16px;
  color: var(--dw-text-3);
  transition: all 0.22s cubic-bezier(0.19,1,0.22,1);
  flex-shrink: 0;
  margin-left: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════
   SEARCH DETAIL — /account/searches/:id
   Premium two-pane layout with live map + listing grid + reactions.
   =================================================================== */
.dw-sx-page {
  background: var(--dw-mist);
  min-height: calc(100dvh - var(--dw-header-h));
  display: flex;
  flex-direction: column;
}
.dw-sx-head {
  border-bottom: 1px solid var(--dw-outline);
  padding: 22px 40px 0;
  /* NOT sticky — lets the head scroll away so the map + results get the
     full viewport when scrolling through a long result list. The site
     header stays sticky; this one rides below it. */
  background: var(--dw-surface);
}
@media (max-width: 720px) { .dw-sx-head { padding: 16px 20px 0; } }

.dw-sx-head-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dw-sx-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--dw-mist);
  color: var(--dw-text-2);
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.19,1,0.22,1);
}
.dw-sx-back:hover { background: var(--dw-slate); color: #fff; transform: translateX(-2px); }

.dw-sx-title-wrap { flex: 1; min-width: 0; }
.dw-sx-title {
  font-family: var(--dw-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--dw-text);
  line-height: 1.1;
}
.dw-sx-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.dw-sx-stats { display: flex; gap: 14px; flex-shrink: 0; }
.dw-sx-stat {
  text-align: center;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--dw-mist);
  min-width: 58px;
}
.dw-sx-stat-num {
  display: block;
  font-family: var(--dw-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--dw-text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.dw-sx-stat-lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dw-text-3);
  margin-top: 3px;
}
.dw-sx-stat-love .dw-sx-stat-num { color: #E24B4A; }

.dw-sx-filter-row {
  display: flex;
  gap: 6px;
  padding: 14px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dw-sx-filter-row::-webkit-scrollbar { display: none; }
.dw-sx-filter {
  padding: 6px 14px;
  border: 1px solid var(--dw-outline);
  border-radius: 999px;
  background: var(--dw-surface);
  color: var(--dw-text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.19,1,0.22,1);
}
.dw-sx-filter:hover { border-color: var(--dw-sky); color: var(--dw-text); }
.dw-sx-filter.active { background: var(--dw-slate); color: #fff; border-color: var(--dw-slate); }

.dw-sx-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 600px;
}
@media (max-width: 900px) { .dw-sx-body { grid-template-columns: 1fr; } }

.dw-sx-map {
  position: sticky;
  top: var(--dw-header-h);
  height: calc(100dvh - var(--dw-header-h));
  background: var(--dw-mist);
  border-right: 1px solid var(--dw-outline);
}
@media (max-width: 900px) {
  .dw-sx-map { position: relative; top: 0; height: 50dvh; border-right: none; border-bottom: 1px solid var(--dw-outline); }
}

.dw-sx-grid {
  padding: 24px 40px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  align-content: start;
}
@media (max-width: 720px) { .dw-sx-grid { padding: 20px; gap: 14px; } }

/* ─── Listing card (detail view) — photography-led ──────────────────── */
.dw-sx-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.19,1,0.22,1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  animation: dwSxCardIn 0.45s cubic-bezier(0.19,1,0.22,1) forwards;
}
@keyframes dwSxCardIn {
  to { opacity: 1; transform: translateY(0); }
}
.dw-sx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(68,91,105,0.14), 0 2px 8px rgba(68,91,105,0.08);
  border-color: var(--dw-sky);
}
.dw-sx-card.pulse { animation: dwSxPulse 0.9s cubic-bezier(0.19,1,0.22,1); }
@keyframes dwSxPulse {
  0% { box-shadow: 0 0 0 0 rgba(110,181,233,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(110,181,233,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,181,233,0); }
}

.dw-sx-card-photo {
  aspect-ratio: 3/2;
  background: #1a1a1a center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.dw-sx-card-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
}
.dw-sx-card-status {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  color: var(--dw-text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.dw-sx-card-status.st-pending { background: #F59E0B; color: #fff; }
.dw-sx-card-status.st-closed { background: #64748B; color: #fff; }

.dw-sx-card-body { padding: 14px 16px 12px; flex: 1; display: flex; flex-direction: column; }
.dw-sx-card-price {
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dw-text);
  margin-bottom: 4px;
}
.dw-sx-card-specs { font-size: 13px; color: var(--dw-text-2); margin-bottom: 4px; }
.dw-sx-card-addr { font-size: 12px; color: var(--dw-text-3); line-height: 1.45; margin-bottom: 12px; }

/* ─── Reactions row ─────────────────────────────────────────────────── */
.dw-sx-react {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--dw-outline);
  background: var(--dw-mist);
}
.dw-sx-react-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--dw-outline);
  border-radius: 10px;
  background: var(--dw-surface);
  color: var(--dw-text-2);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.19,1,0.22,1);
  position: relative;
  overflow: hidden;
}
.dw-sx-react-btn:hover { transform: translateY(-1px); }
.dw-sx-react-btn:active { transform: scale(0.95); }
.dw-sx-react-btn.active[data-react="love"]   { background: #FEE2E2; border-color: #E24B4A; color: #E24B4A; }
.dw-sx-react-btn.active[data-react="maybe"]  { background: #FEF3C7; border-color: #F59E0B; color: #B45309; }
.dw-sx-react-btn.active[data-react="pass"]   { background: #F1F5F9; border-color: #64748B; color: #475569; }
[data-theme="dark"] .dw-sx-react-btn.active[data-react="love"]   { background: rgba(226,75,74,0.2); border-color: #E24B4A; color: #FCA5A5; }
[data-theme="dark"] .dw-sx-react-btn.active[data-react="maybe"]  { background: rgba(245,158,11,0.2); border-color: #F59E0B; color: #FCD34D; }
[data-theme="dark"] .dw-sx-react-btn.active[data-react="pass"]   { background: rgba(100,116,139,0.25); border-color: #64748B; color: #CBD5E1; }

/* Card loses prominence when passed */
.dw-sx-card[data-reaction="pass"] { opacity: 0.55; filter: saturate(0.7); }
.dw-sx-card[data-reaction="pass"]:hover { opacity: 1; filter: none; }

/* Card gets a warm accent when loved */
.dw-sx-card[data-reaction="love"] .dw-sx-card-photo::before {
  content: '❤️';
  position: absolute;
  top: 12px; right: 12px;
  font-size: 22px;
  filter: drop-shadow(0 2px 6px rgba(226,75,74,0.4));
  animation: dwSxHeartPop 0.55s cubic-bezier(0.19,1,0.22,1);
  z-index: 1;
}
@keyframes dwSxHeartPop {
  0% { transform: scale(0); opacity: 0; }
  55% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.dw-sx-card[data-reaction="maybe"] .dw-sx-card-photo::before {
  content: '🤔';
  position: absolute;
  top: 12px; right: 12px;
  font-size: 22px;
  filter: drop-shadow(0 2px 6px rgba(245,158,11,0.4));
  animation: dwSxHeartPop 0.55s cubic-bezier(0.19,1,0.22,1);
  z-index: 1;
}

/* ─── Custom Mapbox markers (consumer side) ─────────────────────────── */
.dw-sx-marker { cursor: pointer; transform-origin: bottom center; transition: transform 0.18s cubic-bezier(0.19,1,0.22,1); }
.dw-sx-marker:hover, .dw-sx-marker.hover { transform: scale(1.08); z-index: 5; }
.dw-sx-marker.selected { transform: scale(1.18); z-index: 10; }
.dw-sx-marker .dw-sx-marker-pin {
  background: var(--dw-slate);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.28), 0 0 0 2px #fff;
  font-family: var(--dw-font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
}
.dw-sx-marker .dw-sx-marker-pin::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -5px;
  width: 9px; height: 9px;
  background: var(--dw-slate);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 1px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.18);
}
.dw-sx-marker.r-love .dw-sx-marker-pin { background: #E24B4A; }
.dw-sx-marker.r-love .dw-sx-marker-pin::after { background: #E24B4A; }
.dw-sx-marker.r-maybe .dw-sx-marker-pin { background: #F59E0B; }
.dw-sx-marker.r-maybe .dw-sx-marker-pin::after { background: #F59E0B; }
.dw-sx-marker.r-pass .dw-sx-marker-pin { background: #64748B; opacity: 0.5; }
.dw-sx-marker.r-pass .dw-sx-marker-pin::after { background: #64748B; }
.dw-sx-marker.selected .dw-sx-marker-pin { background: var(--dw-sky); box-shadow: 0 4px 14px rgba(110,181,233,0.5), 0 0 0 2px #fff; }
.dw-sx-marker.selected .dw-sx-marker-pin::after { background: var(--dw-sky); }

/* ═══════════════════════════════════════════════════════════════════════
   LISTING DETAIL — Collab section (reactions + notes)
   =================================================================== */
.dw-listing-collab { padding: 40px 0; background: linear-gradient(180deg, transparent 0%, var(--dw-mist) 100%); }
.dw-collab-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(68,91,105,0.04);
}
.dw-collab-head { margin-bottom: 22px; }
.dw-collab-sub { color: var(--dw-text-2); font-size: 14px; margin: 6px 0 0; }

.dw-collab-skeleton { color: var(--dw-text-3); font-size: 13px; padding: 20px; text-align: center; }
.dw-collab-empty {
  padding: 24px;
  text-align: center;
  background: var(--dw-mist);
  border-radius: 12px;
  color: var(--dw-text-3);
  font-size: 13px;
}

.dw-collab-signin { padding: 28px 20px; text-align: center; background: linear-gradient(135deg, rgba(245,166,35,0.12), rgba(110,181,233,0.08)); border-radius: 14px; }
.dw-collab-signin-icon { font-size: 32px; margin-bottom: 10px; }
.dw-collab-signin p { color: var(--dw-text-2); margin: 0 0 16px; font-size: 14px; }

.dw-collab-react-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.dw-collab-react {
  flex: 1;
  padding: 14px 10px;
  border: 1px solid var(--dw-outline);
  border-radius: 12px;
  background: var(--dw-surface);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s cubic-bezier(0.19,1,0.22,1);
}
.dw-collab-react span { font-size: 13px; font-weight: 500; }
.dw-collab-react:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.dw-collab-react:active { transform: scale(0.97); }
.dw-collab-react.active[data-react="love"]  { background: #FEE2E2; border-color: #E24B4A; color: #E24B4A; }
.dw-collab-react.active[data-react="maybe"] { background: #FEF3C7; border-color: #F59E0B; color: #B45309; }
.dw-collab-react.active[data-react="pass"]  { background: #F1F5F9; border-color: #64748B; color: #475569; }
[data-theme="dark"] .dw-collab-react.active[data-react="love"]  { background: rgba(226,75,74,0.2); color: #FCA5A5; }
[data-theme="dark"] .dw-collab-react.active[data-react="maybe"] { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .dw-collab-react.active[data-react="pass"]  { background: rgba(100,116,139,0.25); color: #CBD5E1; }

.dw-collab-notes { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 400px; overflow-y: auto; }
.dw-collab-note {
  padding: 12px 14px;
  border-radius: 12px;
  max-width: 82%;
  font-size: 14px;
  line-height: 1.5;
}
.dw-collab-note.mine   { background: var(--dw-mist); align-self: flex-end; border-bottom-right-radius: 4px; }
.dw-collab-note.theirs { background: rgba(110,181,233,0.12); align-self: flex-start; border-bottom-left-radius: 4px; }
.dw-collab-note-head { font-size: 11px; color: var(--dw-text-3); margin-bottom: 4px; }
.dw-collab-note-who { font-weight: 600; color: var(--dw-text-2); margin-right: 8px; }
.dw-collab-note-body { color: var(--dw-text); }

.dw-collab-compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--dw-outline);
}
.dw-collab-compose textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--dw-outline);
  border-radius: 10px;
  background: var(--dw-surface);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 44px;
}
.dw-collab-compose textarea:focus { outline: none; border-color: var(--dw-sky); box-shadow: 0 0 0 3px rgba(110,181,233,0.15); }

/* ═══════════════════════════════════════════════════════════════════════
   SHARE PAGE — /share/:batchId (agent sent you N listings)
   =================================================================== */
.dw-share-hero {
  padding: 56px 0 32px;
  background: linear-gradient(180deg, var(--dw-mist) 0%, var(--dw-surface) 100%);
  border-bottom: 1px solid var(--dw-outline);
}
.dw-share-hero-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.dw-share-agent { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.dw-share-agent-photo, .dw-share-agent-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(68,91,105,0.15);
}
.dw-share-agent-avatar {
  background: linear-gradient(135deg, var(--dw-sky), var(--dw-slate));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px;
}
.dw-share-agent h1 { margin: 4px 0 0; }
.dw-share-batch-note {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-left: 4px solid var(--dw-sky);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dw-text-2);
  margin-top: 14px;
}
.dw-share-batch-sig { margin-top: 10px; font-size: 12px; color: var(--dw-text-3); font-weight: 600; }

.dw-share-body { padding: 40px 0 80px; }
.dw-share-grid {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.dw-share-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.19,1,0.22,1);
  display: flex;
  flex-direction: column;
}
.dw-share-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(68,91,105,0.14); }
.dw-share-card-photo {
  display: block;
  aspect-ratio: 3/2;
  background: #1a1a1a center/cover no-repeat;
  text-decoration: none;
}
.dw-share-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.dw-share-card-price { font-family: var(--dw-font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 5px; }
.dw-share-card-specs { font-size: 14px; color: var(--dw-text-2); margin-bottom: 4px; }
.dw-share-card-addr  { font-size: 13px; color: var(--dw-text-3); line-height: 1.45; margin-bottom: 12px; }
.dw-share-card-note  {
  background: rgba(245,158,11,0.08);
  border-left: 3px solid #F59E0B;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dw-text-2);
  font-style: italic;
  margin-bottom: 4px;
}
.dw-share-note-from { font-style: normal; font-weight: 600; color: #B45309; margin-right: 6px; }

/* ═══════════════════════════════════════════════════════════════════════
   HOME MATCH — immersive swipe deck
   =================================================================== */

/* ─── Landing & Preferences (calm, pre-deck) ─────────────────────────── */
.dw-match-land,
.dw-match-land-hero {
  min-height: calc(100dvh - var(--dw-header-h));
  padding: 80px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center top, rgba(110,181,233,0.12), transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(245,166,35,0.08), transparent 50%),
              var(--dw-surface);
}
[data-theme="dark"] .dw-match-land,
[data-theme="dark"] .dw-match-land-hero {
  background: radial-gradient(ellipse at center top, rgba(110,181,233,0.18), transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(245,166,35,0.12), transparent 50%),
              #0E1520;
}
.dw-match-land-inner { max-width: 780px; width: 100%; }
.dw-match-land-h1 {
  font-family: var(--dw-font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 10px 0 14px;
  color: var(--dw-text);
  background: linear-gradient(135deg, var(--dw-text) 0%, var(--dw-sky) 180%);
  -webkit-background-clip: text;
  background-clip: text;
}
.dw-match-land-lede { font-size: 17px; line-height: 1.55; color: var(--dw-text-2); margin: 0; max-width: 540px; }
.dw-match-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dw-text-3);
  margin: 32px 0 12px;
}

.dw-match-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dw-match-picker-card {
  text-align: left;
  padding: 18px 20px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: all 0.22s cubic-bezier(0.19,1,0.22,1);
}
.dw-match-picker-card:hover { transform: translateY(-3px); border-color: var(--dw-sky); box-shadow: 0 12px 32px rgba(68,91,105,0.12); }
.dw-match-picker-name { font-family: var(--dw-font-display); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.dw-match-picker-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.dw-match-picker-chips span {
  font-size: 11px; font-weight: 500; padding: 3px 8px;
  border-radius: 8px; background: var(--dw-mist); color: var(--dw-text-2);
}

/* Preferences form */
.dw-match-prefs { min-height: calc(100dvh - var(--dw-header-h)); padding: 56px 24px; }
.dw-match-prefs-inner { max-width: 560px; margin: 0 auto; }
.dw-match-prefs-back { color: var(--dw-text-3); font-size: 13px; text-decoration: none; display: inline-block; margin-bottom: 12px; }
.dw-match-prefs-back:hover { color: var(--dw-sky); }
.dw-match-prefs-section { margin-top: 20px; }
.dw-match-prefs-section label {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dw-text-3); margin-bottom: 8px;
}
.dw-match-prefs-section input[type="text"],
.dw-match-prefs-section input[type="number"] {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--dw-outline);
  border-radius: 10px;
  background: var(--dw-surface);
  color: var(--dw-text);
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}
.dw-match-prefs-section input:focus { outline: none; border-color: var(--dw-sky); box-shadow: 0 0 0 3px rgba(110,181,233,0.15); }
.dw-match-prefs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dw-match-prefs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-match-prefs-pills button {
  padding: 8px 14px;
  border: 1px solid var(--dw-outline);
  border-radius: 999px;
  background: var(--dw-surface);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.dw-match-prefs-pills button:hover { border-color: var(--dw-sky); color: var(--dw-text); }
.dw-match-prefs-pills button.active { background: var(--dw-slate); color: #fff; border-color: var(--dw-slate); }

/* ─── Deck stage (immersive) ────────────────────────────────────────── */
.dw-body-match .dw-header { display: none; }
.dw-body-match .dw-footer { display: none; }
.dw-body-match { overflow: hidden; }

.dw-match-stage {
  position: fixed;
  inset: 0;
  background: #0B111B;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  touch-action: none;
}
.dw-match-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(110,181,233,0.15), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(245,166,35,0.1), transparent 50%);
  pointer-events: none;
}

.dw-match-hud {
  position: relative; z-index: 5;
  width: 100%; max-width: 520px;
  padding: 20px 24px 12px;
  display: flex; align-items: center; gap: 16px;
}
.dw-match-hud-exit {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  color: #fff; text-decoration: none;
  font-size: 18px;
  transition: all 0.18s;
}
.dw-match-hud-exit:hover { background: rgba(255,255,255,0.12); transform: scale(1.05); }
.dw-match-hud-progress {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.dw-match-hud-progress::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--dw-sky), #F5A623);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.19,1,0.22,1);
}
/* M-Match-5: streak counter chip in /match/play HUD. Surfaces the
   rights-since-last-match counter so the user can see the streak
   tier ratchet up. Hidden under 3; warm at 3-5, hot at 6-7, blazing
   at 8+ (where the streak match tier becomes eligible to fire). */
.dw-match-hud-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #FFD27A;
  background: rgba(245, 166, 35, 0.14);
  border: 1px solid rgba(245, 166, 35, 0.30);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 240ms cubic-bezier(0.19,1,0.22,1);
}
.dw-match-hud-streak[hidden] { display: none; }
.dw-match-hud-streak.is-bumped {
  animation: dw-match-streak-bump 360ms cubic-bezier(0.19,1,0.22,1);
}
@keyframes dw-match-streak-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.dw-match-hud-streak.tier-hot {
  color: #FFB347;
  background: rgba(245, 100, 35, 0.20);
  border-color: rgba(245, 100, 35, 0.45);
}
.dw-match-hud-streak.tier-blazing {
  color: #FF7A47;
  background: rgba(226, 75, 74, 0.28);
  border-color: rgba(226, 75, 74, 0.55);
  box-shadow: 0 0 14px rgba(226, 75, 74, 0.40);
  animation: dw-match-streak-blaze 1.4s ease-in-out infinite;
}
@keyframes dw-match-streak-blaze {
  0%, 100% { box-shadow: 0 0 12px rgba(226, 75, 74, 0.35); }
  50%      { box-shadow: 0 0 22px rgba(226, 75, 74, 0.65); }
}
.dw-match-streak-flame {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(245, 166, 35, 0.55));
}
.dw-match-hud-streak.tier-blazing .dw-match-streak-flame {
  filter: drop-shadow(0 0 6px rgba(226, 75, 74, 0.70));
}

/* M-Match-6: rare-find pre-match teaser banner. Briefly overlays a
   gold→red badge over the deck when the new top card has fit_score ≥ 90.
   1.4s lifespan with fade-in + fade-out, anchored above the card stack
   so the user sees "this one's special" before they decide how to swipe. */
.dw-match-rare-banner {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245,166,35,0.95) 0%, rgba(226,75,74,0.92) 100%);
  color: #fff;
  font-family: var(--dw-font-display, inherit);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
  box-shadow: 0 6px 22px rgba(245,166,35,0.45), 0 0 36px rgba(226,75,74,0.35);
  animation: dw-match-rare-in 0.45s cubic-bezier(0.19,1,0.22,1);
}
@keyframes dw-match-rare-in {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(0.82); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(2px) scale(1.04); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.dw-match-rare-banner.is-leaving {
  animation: dw-match-rare-out 0.4s cubic-bezier(0.4,0,0.6,1) forwards;
}
@keyframes dw-match-rare-out {
  to { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.94); }
}
.dw-match-rare-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 6px rgba(255,210,122,0.85));
  /* Subtle continuous shimmer so the badge never feels static */
  animation: dw-match-rare-shimmer 1.6s ease-in-out infinite;
}
@keyframes dw-match-rare-shimmer {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.18) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .dw-match-rare-banner,
  .dw-match-rare-banner.is-leaving { animation-duration: 0.01ms; }
  .dw-match-rare-icon { animation: none; }
}

.dw-match-hud-actions { display: flex; gap: 8px; }
.dw-match-hud-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
}
.dw-match-hud-btn:hover { background: rgba(255,255,255,0.12); }

.dw-match-deck {
  flex: 1;
  width: 100%; max-width: 420px;
  position: relative;
  padding: 0 20px 20px;
  display: flex; align-items: center; justify-content: center;
}

.dw-match-card {
  position: absolute;
  left: 20px; right: 20px;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  background: #000 center/cover no-repeat;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.2);
  cursor: grab;
  user-select: none;
  will-change: transform;
  /* Keep the transition short so snap-back after a drag feels responsive,
     but we disable transitions entirely during the post-swipe re-render
     (see dwMatchRenderStack opts.instant) so new peek cards snap into
     place without a fill-in animation. */
  transition: transform 0.15s cubic-bezier(0.19,1,0.22,1);
}
.dw-match-card.dragging { transition: none; cursor: grabbing; }
.dw-match-card.fly-right { transform: translateX(140vw) rotate(28deg) !important; opacity: 0; transition: transform 0.5s cubic-bezier(0.45,0,0.65,1), opacity 0.4s linear; }
.dw-match-card.fly-left  { transform: translateX(-140vw) rotate(-28deg) !important; opacity: 0; transition: transform 0.5s cubic-bezier(0.45,0,0.65,1), opacity 0.4s linear; }

.dw-match-card-photo-layer {
  position: absolute; inset: 0;
  background: inherit;
  animation: dwMatchKenBurns 12s ease-in-out infinite alternate;
}
@keyframes dwMatchKenBurns {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.08); }
}
.dw-match-card-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0.85) 100%);
  color: #fff;
}
.dw-match-card-price {
  font-family: var(--dw-font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.dw-match-card-meta { font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 4px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.dw-match-card-addr { font-size: 12px; color: rgba(255,255,255,0.75); text-shadow: 0 1px 6px rgba(0,0,0,0.5); }

/* Photo indicator bars (Instagram-story style) at top of card */
.dw-match-card-bars {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; gap: 4px;
  z-index: 3;
  pointer-events: none;
}
.dw-match-card-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
  transition: background 0.15s;
}
.dw-match-card-bar.active { background: #fff; }

/* Info button top-right (small "i" circle) */
.dw-match-card-info-btn {
  position: absolute;
  top: 22px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: var(--dw-font-display);
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  z-index: 4;
  transition: all 0.15s;
}
.dw-match-card-info-btn:hover { background: rgba(0,0,0,0.65); transform: scale(1.05); }

/* Tap zones for photo cycling — left/right 30% of the card. Center is
   reserved for drag + keeps the area under the overlay clear. */
.dw-match-card-tapzone {
  position: absolute;
  top: 40px; bottom: 30%;
  width: 30%;
  z-index: 2;
  cursor: pointer;
}
.dw-match-card-tapzone.left  { left: 0; }
.dw-match-card-tapzone.right { right: 0; }

/* Stamps during drag */
.dw-match-stamp {
  position: absolute;
  top: 40px;
  padding: 12px 24px;
  border: 6px solid currentColor;
  border-radius: 14px;
  font-family: var(--dw-font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
.dw-match-stamp.love { color: #E24B4A; right: 24px; transform: rotate(-14deg); }
.dw-match-stamp.pass { color: #64748B; left: 24px; transform: rotate(14deg); }

/* Action rail */
.dw-match-actions {
  position: relative; z-index: 5;
  padding: 20px 24px 32px;
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
}
.dw-match-act {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 22px;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s cubic-bezier(0.19,1,0.22,1);
  backdrop-filter: blur(8px);
}
.dw-match-act:hover { transform: translateY(-2px) scale(1.05); }
.dw-match-act:active { transform: scale(0.92); }
.dw-match-act.pass { background: rgba(100,116,139,0.2); border-color: rgba(100,116,139,0.5); }
.dw-match-act.pass:hover { background: #64748B; }
.dw-match-act.love { background: rgba(226,75,74,0.2); border-color: rgba(226,75,74,0.55); width: 72px; height: 72px; font-size: 28px; }
.dw-match-act.love:hover { background: #E24B4A; box-shadow: 0 0 24px rgba(226,75,74,0.6); }
.dw-match-act.undo, .dw-match-act.info { opacity: 0.7; }

/* ─── Match celebration overlay — v2 polish ──────────────────────────
   Scrim cleaner (softer gold radial), title Switzer + tighter tracking,
   picknote a real Inter quote block with sky left-border (no more italic
   sticky-note), reason chips low-contrast like the public site, CTAs
   solid-white pill + ghost outlined matching the v2 button system.
   Surprise tier drops purple → folds back into the warm gold family. */
.dw-match-celebrate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(245,166,35,0.22), transparent 55%),
    rgba(10, 16, 26, 0.92);
  opacity: 0;
  animation: dwMatchOverlayIn 0.32s cubic-bezier(0.19,1,0.22,1) forwards;
}
/* Discovery — sky leads, gold supports. Distinct from strict, still
   on-brand (no dark-blue dropoff like the old gradient). */
.dw-match-celebrate.is-discovery {
  background:
    radial-gradient(ellipse at center, rgba(110,181,233,0.24), rgba(245,166,35,0.10) 45%, transparent 70%),
    rgba(10, 16, 26, 0.93);
}
.dw-match-celebrate.is-discovery .dw-match-celebrate-title {
  background: linear-gradient(135deg, #FFD27A 0%, #6EB5E9 55%, #2E8BD0 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
/* Surprise — same warm-gold scrim as strict; the "LUCKY SWIPE" wording
   carries the differentiation. Purple was off-brand. */
.dw-match-celebrate.is-surprise {
  background:
    radial-gradient(ellipse at center, rgba(245,166,35,0.26), transparent 55%),
    rgba(10, 16, 26, 0.92);
}
.dw-match-celebrate.is-surprise .dw-match-celebrate-title {
  background: linear-gradient(135deg, #FFD27A 0%, #F5A623 40%, #FF7A47 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
@keyframes dwMatchOverlayIn { to { opacity: 1; pointer-events: auto; } }

.dw-match-celebrate-content {
  text-align: center;
  color: #fff;
  padding: 32px 28px;
  max-width: 480px;
  position: relative;
  z-index: 2;
}
.dw-match-celebrate-card {
  width: 240px; height: 260px;
  border-radius: 20px;
  background: #000 center/cover no-repeat;
  margin: 0 auto 24px;
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.15),
    0 20px 60px rgba(245,166,35,0.35),
    0 40px 90px -20px rgba(0,0,0,0.50);
  transform: scale(0);
  animation: dwMatchCardIn 0.55s cubic-bezier(0.19,1,0.22,1) 0.2s forwards;
}
@keyframes dwMatchCardIn {
  0% { transform: scale(0) rotate(-12deg); }
  60% { transform: scale(1.05) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

.dw-match-celebrate-title {
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-size: clamp(44px, 7.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #FFD27A 0%, #F5A623 45%, #E24B4A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  animation: dwMatchTitleIn 0.5s cubic-bezier(0.19,1,0.22,1) 0.4s forwards;
  filter: drop-shadow(0 0 30px rgba(245,166,35,0.45));
}
@keyframes dwMatchTitleIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.dw-match-celebrate-sub {
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: rgba(255,255,255,0.94);
  margin: 0 0 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.45;
  opacity: 0;
  animation: dwMatchTitleIn 0.5s cubic-bezier(0.19,1,0.22,1) 0.7s forwards;
}
/* % fit pill — slimmer, gold-tinted but lower-contrast than before. */
.dw-match-celebrate-pct {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,210,122,0.16);
  border: 1px solid rgba(255,210,122,0.30);
  color: #FFD27A;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-right: 6px;
}

/* Picknote — clean Inter quote block, no italic sticky-note look. Sky
   left-border because the agent's voice is the bridge to the human side. */
.dw-match-celebrate-picknote {
  padding: 18px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid #6EB5E9;
  border-radius: 12px;
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: rgba(255,255,255,0.95);
  text-align: left;
  margin: 0 0 22px;
  opacity: 0;
  animation: dwMatchTitleIn 0.5s cubic-bezier(0.19,1,0.22,1) 1s forwards;
}
.dw-match-celebrate-picknote strong {
  color: #6EB5E9;
  font-style: normal;
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
}

/* Reason chips — refined, low-contrast, matches public-site chip
   styling. Distills the algorithm's reasoning into 2-4 short labels. */
.dw-match-celebrate-reasons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 22px;
  opacity: 0;
  animation: dwMatchTitleIn 0.5s cubic-bezier(0.19,1,0.22,1) 0.85s forwards;
}
.dw-match-celebrate-reason {
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.dw-match-celebrate.is-discovery .dw-match-celebrate-reason {
  background: rgba(110,181,233,0.16);
  border-color: rgba(110,181,233,0.28);
  color: #BDE0F8;
}
/* "rare in your range" — kept as the singular gold→red gradient
   moment. Slightly tighter sizing so it sits beside the regular chips. */
.dw-match-celebrate-reason.is-rare {
  background: linear-gradient(135deg, rgba(245,166,35,0.90) 0%, rgba(226,75,74,0.80) 100%);
  border-color: rgba(255,210,122,0.55);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  box-shadow: 0 2px 10px rgba(245,166,35,0.34);
}

/* CTAs — solid-white pill primary (with arrow) + ghost-outlined
   secondary. Mirrors the v2 button system used across the public site. */
.dw-match-celebrate-ctas {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  opacity: 0;
  animation: dwMatchTitleIn 0.5s cubic-bezier(0.19,1,0.22,1) 1.2s forwards;
}
.dw-match-celebrate-ctas button,
.dw-match-celebrate-ctas a {
  padding: 13px 24px;
  border-radius: 100px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.30);
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.dw-match-celebrate-ctas button:hover,
.dw-match-celebrate-ctas a:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.55);
  transform: translateY(-1px);
}
.dw-match-celebrate-ctas .primary {
  background: #ffffff;
  color: #0B111B;
  border-color: #ffffff;
}
.dw-match-celebrate-ctas .primary::after {
  content: "→";
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 200ms ease;
}
.dw-match-celebrate-ctas .primary:hover {
  background: #6EB5E9;
  color: #ffffff;
  border-color: #6EB5E9;
  transform: translateY(-1px);
}
.dw-match-celebrate-ctas .primary:hover::after {
  transform: translateY(-1px) translateX(2px);
}

/* Confetti particles */
.dw-match-confetti {
  position: fixed; inset: 0; z-index: 99;
  pointer-events: none;
  overflow: hidden;
}
.dw-match-confetti-piece {
  position: absolute;
  width: 10px; height: 14px;
  top: 50%; left: 50%;
  opacity: 0;
  animation: dwMatchConfetti 1.6s cubic-bezier(0.19,1,0.22,1) forwards;
}
@keyframes dwMatchConfetti {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)); }
}

/* Deck-empty state */
.dw-match-empty {
  text-align: center;
  color: rgba(255,255,255,0.85);
  padding: 48px 24px;
  max-width: 360px;
  margin: 0 auto;
}
.dw-match-empty-icon { font-size: 48px; margin-bottom: 16px; }
.dw-match-empty h2 { font-family: var(--dw-font-display); font-size: 28px; margin: 0 0 8px; color: #fff; }
.dw-match-empty p { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.7); margin: 0 0 24px; }
.dw-match-empty .dw-btn { color: #0B111B; }
.dw-match-empty .dw-btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
.dw-match-empty .dw-btn-secondary:hover { background: rgba(255,255,255,0.2); }
.dw-match-empty .dw-btn-ghost { background: transparent; color: rgba(255,255,255,0.7); }
.dw-match-empty .dw-btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ─── Info sheet (slide-up over the card) ─────────────────────────── */
.dw-match-info-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: #14202D;
  color: #fff;
  border-radius: 24px 24px 0 0;
  /* M-Mob-5: bottom padding clears home indicator on iPhone X+ */
  padding: 24px 24px max(40px, calc(24px + env(safe-area-inset-bottom)));
  max-height: 80dvh;
  overflow-y: auto;
  /* M-Mob-5: prevent scroll chain into the body underneath */
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.19,1,0.22,1);
  box-shadow: 0 -12px 44px rgba(0,0,0,0.55);
}
.dw-match-info-sheet.open { transform: translateY(0); }
.dw-match-info-grabber {
  width: 44px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.25);
  margin: 0 auto 20px;
}
.dw-match-info-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none; color: #fff; font-size: 20px;
  cursor: pointer; font-family: inherit;
}
.dw-match-info-price {
  font-family: var(--dw-font-display);
  font-size: 38px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.dw-match-info-addr {
  font-size: 15px; color: rgba(255,255,255,0.9);
  line-height: 1.45; margin-bottom: 18px;
}
.dw-match-info-addr span { font-size: 13px; color: rgba(255,255,255,0.7); }
.dw-match-info-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
}
.dw-match-info-specs > div {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}
.dw-match-info-specs span {
  display: block;
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.dw-match-info-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.dw-match-info-chip {
  font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

/* ─── Pill input (reused on /match/preferences) ──────────────────── */
.dw-pill-input-wrap { position: relative; }
.dw-pill-input-box {
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--dw-outline);
  border-radius: 10px;
  background: var(--dw-surface);
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  cursor: text;
}
.dw-pill-input-box input {
  flex: 1; min-width: 120px;
  background: transparent;
  border: none; outline: none;
  color: var(--dw-text);
  font-size: 14px;
  font-family: inherit;
  padding: 6px 4px;
}
.dw-pill-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 5px 4px 10px;
  border-radius: 7px;
  background: rgba(110,181,233,0.15);
  color: var(--dw-sky);
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.dw-pill-chip-x {
  background: none; border: none; color: var(--dw-sky);
  opacity: 0.6; font-size: 15px; cursor: pointer;
  padding: 0 4px; line-height: 1;
  font-family: inherit;
}
.dw-pill-chip-x:hover { opacity: 1; }
.dw-pill-input-dd {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 20;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 10px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}
.dw-pill-input-opt {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid var(--dw-outline);
}
.dw-pill-input-opt:last-child { border-bottom: none; }
.dw-pill-input-hint { color: var(--dw-sky); font-weight: 600; font-size: 12px; }

/* Nav heart icon (Home Match link) */
.dw-nav-heart { opacity: 0.78; }
.dw-nav-link.active .dw-nav-heart { opacity: 1; color: #E24B4A; fill: rgba(226,75,74,0.15); }

/* ─── Summary page ──────────────────────────────────────────────────── */
.dw-match-summary { padding: 48px 24px 96px; }
.dw-match-summary-inner { max-width: 820px; margin: 0 auto; }
.dw-match-summary-stats {
  display: flex; gap: 18px;
  margin: 20px 0 36px;
  flex-wrap: wrap;
}
.dw-match-summary-stats > div {
  flex: 1; min-width: 120px;
  padding: 20px;
  border-radius: 14px;
  background: var(--dw-mist);
  text-align: center;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dw-text-3); font-weight: 600;
}
.dw-match-summary-stats span {
  display: block;
  font-family: var(--dw-font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--dw-text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.dw-match-summary-stats .love span { color: #E24B4A; }
.dw-match-summary-stats .match span { background: linear-gradient(135deg, #FFD27A, #E24B4A); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.dw-match-summary-h2 { font-family: var(--dw-font-display); font-size: 22px; font-weight: 700; margin: 0 0 18px; }
.dw-match-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dw-match-summary-card {
  display: block;
  text-decoration: none; color: inherit;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 14px; overflow: hidden;
  transition: all 0.22s cubic-bezier(0.19,1,0.22,1);
  position: relative;
}
.dw-match-summary-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(68,91,105,0.14); }
.dw-match-summary-card.matched { border-color: #F5A623; box-shadow: 0 0 0 2px rgba(245,166,35,0.3); }
.dw-match-summary-photo { aspect-ratio: 3/2; background: #1a1a1a center/cover no-repeat; }
.dw-match-summary-body { padding: 14px 16px; }
.dw-match-summary-price { font-family: var(--dw-font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.dw-match-summary-meta { font-size: 13px; color: var(--dw-text-2); margin-bottom: 4px; }
.dw-match-summary-addr { font-size: 12px; color: var(--dw-text-3); line-height: 1.45; }
.dw-match-summary-badge {
  display: inline-block; margin-top: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FFD27A, #F5A623);
  color: #78350F;
  font-size: 11px; font-weight: 700;
}
.dw-match-summary-empty { padding: 60px 20px; text-align: center; color: var(--dw-text-3); font-size: 14px; }

.dw-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  background: var(--dw-surface);
  transition: transform var(--dw-dur) var(--dw-ease), box-shadow var(--dw-dur) var(--dw-ease);
  position: relative;
  /* Perf-2026-04-28: skip paint + layout for offscreen cards entirely.
     Browser only paints what's actually in viewport. Biggest single
     scroll-lag win on long result grids. contain-intrinsic-size keeps
     scrollbar accurate while a card is still virtualized. */
  content-visibility: auto;
  contain-intrinsic-size: 1px 380px;
}
.dw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dw-shadow-lg);
  color: inherit;
}

.dw-card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--dw-radius-lg);
  background: var(--dw-mist);
}
.dw-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--dw-ease-smooth);
}
.dw-card:hover .dw-card-photo {
  transform: scale(1.04);
}

/* Item 7 — multi-photo carousel inside a card. .dw-card-photos is only
   used when there are 2+ photos; single-photo cards render a bare img.
   Imgs stack absolutely with one .is-active at a time; opacity crossfade. */
.dw-card-photos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dw-card-photos .dw-card-photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 220ms var(--dw-ease-smooth), transform 600ms var(--dw-ease-smooth);
  pointer-events: none;
}
.dw-card-photos .dw-card-photo.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
/* Disable the hover-scale on the carousel variant — fighting opacity
   crossfade looks janky. Single-photo cards keep the lift. */
.dw-card:hover .dw-card-photos .dw-card-photo { transform: none; }

/* Prev/next arrows — hidden by default, fade in on card hover. Mobile
   hides them (touch targets too small + swipe is the gesture). */
.dw-card-photo-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0e16;
  font-size: 22px;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms var(--dw-ease), background 140ms var(--dw-ease), transform 140ms var(--dw-ease);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px 0;
}
.dw-card-photo-arr:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}
.dw-card-photo-arr-prev { left: 8px; }
.dw-card-photo-arr-next { right: 8px; }
.dw-card:hover .dw-card-photo-arr,
.dw-card:focus-within .dw-card-photo-arr { opacity: 0.92; }
@media (max-width: 720px), (hover: none) {
  .dw-card-photo-arr { display: none; }
}

/* Dots — bottom-center cluster. Always visible when there are 2+ photos. */
.dw-card-photo-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
  pointer-events: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dw-card-photo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transition: background 180ms var(--dw-ease), width 180ms var(--dw-ease);
  cursor: pointer;
}
.dw-card-photo-dot.is-active {
  background: #fff;
  width: 14px;
  border-radius: 999px;
}

.dw-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.35) 85%, rgba(0,0,0,0.60) 100%);
  pointer-events: none;
}
.dw-card-overlay-content {
  position: absolute;
  left: var(--dw-sp-4);
  bottom: var(--dw-sp-4);
  color: #fff;
}
.dw-card-price {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.dw-card-badges-top {
  position: absolute;
  top: var(--dw-sp-3);
  left: var(--dw-sp-3);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dw-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--dw-radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dw-card-badge-new {
  background: rgba(63, 184, 118, 0.9);
  color: #fff;
}
.dw-card-badge-aged {
  background: rgba(255, 255, 255, 0.85);
  color: var(--dw-text);
}
/* Ship 7b badges */
.dw-card-badge-new-construction {
  background: rgba(212, 104, 45, 0.92);
  color: #fff;
}
.dw-card-badge-price-drop {
  background: rgba(63, 184, 118, 0.92);
  color: #fff;
}
/* Phase C 2026-04-28 — photos count chip. Subtle white-on-dark backdrop
   so it reads as a quiet stat, not a flashy alert. Only shown on
   well-photographed listings (>=20 photos). */
.dw-card-badge-photos {
  background: rgba(15, 22, 32, 0.78);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Phase C 2026-04-28 — listing detail Location section map card. Hover
   lifts subtly + shows the directions CTA more prominently. */
.dw-listing-map-card {
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.dw-listing-map-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(20, 32, 50, 0.18);
}
/* Ship 5.7 Phase B — sparkle badge marks listings that matched an
   active filter via AI extraction from public_remarks (not a
   structured column). Tooltip lists the matched features. Subtle
   amber-gold tone to signal "AI-inferred" without shouting. */
.dw-card-badge-ai {
  background: linear-gradient(135deg, rgba(245, 191, 66, 0.92), rgba(212, 145, 40, 0.92));
  color: #fff;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  cursor: help;
}

/* Open Houses Ship 1 — "Open Sat 1-3p" badge on the listing card.
   Distinct from "New" / "Price drop" badges — uses a saturated emerald
   so it pops as the most actionable thing on the card (a future event
   the user can attend). */
.dw-card-badge-oh {
  background: rgba(63, 184, 118, 0.95);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Open Houses Ship 1 — "Upcoming open houses" detail-page block.
   Sits prominently above the description since it's the most time-
   sensitive, conversion-friendly element on the page. Each row is a
   two-column layout: when (date + time, left) and meta (type, host,
   remarks, right). Pulse dot in the section header signals "live event
   coming up" — not just static info. */
.dw-open-houses-block {
  border-left: 3px solid rgba(63, 184, 118, 0.7);
  padding-left: var(--dw-sp-4);
  background: rgba(63, 184, 118, 0.04);
  border-radius: 0 var(--dw-radius) var(--dw-radius) 0;
}
.dw-oh-pulse {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(63, 184, 118, 0.95);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(63, 184, 118, 0.6);
  animation: dw-oh-pulse 1.8s var(--dw-ease) infinite;
}
@keyframes dw-oh-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 184, 118, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(63, 184, 118, 0); }
}
.dw-open-houses-list {
  list-style: none;
  padding: 0;
  margin: var(--dw-sp-3) 0 var(--dw-sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-3);
}
.dw-open-house-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: var(--dw-sp-4);
  align-items: baseline;
  padding: var(--dw-sp-3) 0;
  border-bottom: 0.5px solid var(--dw-outline);
}
.dw-open-house-row:last-child { border-bottom: 0; }
.dw-open-house-when { white-space: nowrap; }
.dw-open-house-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--dw-text);
}
.dw-open-house-time {
  font-size: 13px;
  color: var(--dw-text-2);
  font-variant-numeric: tabular-nums;
}
.dw-open-house-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--dw-text-2);
}
.dw-open-house-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dw-text-3);
}
.dw-open-house-host { font-size: 13px; }
.dw-open-house-remarks {
  font-size: 13px;
  color: var(--dw-text);
  font-style: italic;
  margin-top: 2px;
}
.dw-open-house-cta {
  font-size: 13px;
  color: var(--dw-text-2);
  margin: 0;
}
@media (max-width: 640px) {
  .dw-open-house-row {
    grid-template-columns: 1fr;
    gap: var(--dw-sp-2);
  }
  .dw-open-house-when { white-space: normal; }
}

/* Ship 5.7 Phase B — "Mentioned in description" evidence section on
   the listing detail page. Precision-first feature list with direct
   quotes pulled from the agent's public_remarks by Claude Haiku.
   Styling echoes the existing dw-section-block rhythm. */
.dw-ai-evidence-intro {
  color: var(--dw-text-2);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 var(--dw-sp-4);
  max-width: 640px;
}
.dw-ai-evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-3);
}
.dw-ai-evidence-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: var(--dw-sp-4);
  align-items: baseline;
  padding: var(--dw-sp-3) var(--dw-sp-4);
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, rgba(245, 191, 66, 0.8), rgba(212, 145, 40, 0.8)) 1;
  background: var(--dw-mist);
  border-radius: 0 var(--dw-radius-sm) var(--dw-radius-sm) 0;
}
.dw-ai-evidence-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--dw-text);
  white-space: nowrap;
}
.dw-ai-evidence-quote {
  font-size: 14px;
  line-height: 1.55;
  color: var(--dw-text-2);
  font-style: italic;
}
@media (max-width: 640px) {
  .dw-ai-evidence-row {
    grid-template-columns: 1fr;
    gap: var(--dw-sp-2);
  }
  .dw-ai-evidence-label { white-space: normal; }
}

.dw-card-fav {
  position: absolute;
  top: var(--dw-sp-3);
  right: var(--dw-sp-3);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dw-text-2);
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  z-index: 2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.dw-card-fav:hover {
  transform: scale(1.08);
  color: var(--dw-gold);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}
.dw-card-fav.is-favorited {
  color: var(--dw-gold);
  background: rgba(255, 255, 255, 0.98);
}
.dw-card-fav.is-favorited svg {
  fill: var(--dw-gold);
  stroke: var(--dw-gold);
  animation: dw-fav-pop 400ms var(--dw-ease-spring);
}
@keyframes dw-fav-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.dw-card-fav svg { width: 20px; height: 20px; }

.dw-card-meta {
  padding: var(--dw-sp-4) var(--dw-sp-2) var(--dw-sp-2);
}
.dw-card-specs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dw-text-2);
  margin-bottom: 4px;
}
.dw-card-spec strong {
  color: var(--dw-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dw-card-spec-sep { opacity: 0.4; }
.dw-card-addr-street {
  font-size: 15px;
  font-weight: 600;
  color: var(--dw-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dw-card-addr-city {
  font-size: 13px;
  color: var(--dw-text-3);
  margin-top: 2px;
}

/* Skeleton loader */
.dw-card-skeleton { pointer-events: none; }
.dw-card-skeleton .dw-card-photo-wrap { background: linear-gradient(90deg, var(--dw-mist) 25%, var(--dw-stone) 50%, var(--dw-mist) 75%); background-size: 200% 100%; animation: dw-skeleton 1.4s linear infinite; }
.dw-skeleton-line { height: 12px; background: linear-gradient(90deg, var(--dw-mist) 25%, var(--dw-stone) 50%, var(--dw-mist) 75%); background-size: 200% 100%; animation: dw-skeleton 1.4s linear infinite; border-radius: 4px; margin-top: 8px; }
@keyframes dw-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───────────── NEIGHBORHOOD CARDS ───────────── */
.dw-nbhds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--dw-sp-5);
}
@media (max-width: 900px) { .dw-nbhds-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .dw-nbhds-grid { grid-template-columns: 1fr; } }

.dw-nbhd-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--dw-mist);
  transition: transform var(--dw-dur) var(--dw-ease);
}
.dw-nbhd-card:hover { transform: translateY(-3px); color: inherit; }
.dw-nbhd-card-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 600ms var(--dw-ease-smooth);
}
.dw-nbhd-card:hover .dw-nbhd-card-photo { transform: scale(1.06); }
.dw-nbhd-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.70) 100%);
}
.dw-nbhd-card-meta {
  position: absolute;
  left: var(--dw-sp-5);
  bottom: var(--dw-sp-4);
  color: #fff;
  z-index: 2;
}
.dw-nbhd-card-name {
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.dw-nbhd-card-sub {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 2px;
}

/* ───────────── ABOUT SECTION ───────────── */
.dw-about-card {
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, var(--dw-gold-soft) 100%);
  border-radius: var(--dw-radius-lg);
  padding: var(--dw-sp-16) var(--dw-sp-10);
  text-align: center;
}
.dw-about-text { max-width: 680px; margin: 0 auto; }
.dw-about-ctas {
  display: flex;
  gap: var(--dw-sp-3);
  justify-content: center;
  margin-top: var(--dw-sp-6);
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .dw-about-card { padding: var(--dw-sp-10) var(--dw-sp-5); }
  .dw-about-ctas { flex-direction: column; }
  .dw-about-ctas .dw-btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH PAGE
═══════════════════════════════════════════════════════════════════════════ */
.dw-searchpage .dw-main { padding: 0; background: var(--dw-bg); }

.dw-filter-bar {
  position: sticky;
  top: var(--dw-header-h);
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 0.5px solid var(--dw-outline);
}
[data-theme="dark"] .dw-filter-bar { background: rgba(14, 21, 32, 0.85); }

.dw-filter-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--dw-sp-4);
  padding: var(--dw-sp-3) var(--dw-sp-6);
  max-width: 100%;
  flex-wrap: wrap;
}

.dw-filter-search {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  position: relative;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-filter-search:focus-within {
  border-color: var(--dw-sky);
  /* Ship 7h: shrink from 4px → 2px focus ring — the smaller filter-bar
     input looked proportionally chunky with a 4px halo. */
  box-shadow: 0 0 0 2px rgba(110, 181, 233, 0.28);
}
.dw-filter-search-icon {
  width: 16px;
  height: 16px;
  color: var(--dw-text-3);
  margin-left: 14px;
}
.dw-filter-search-input {
  flex: 1;
  padding: 10px 14px 10px 10px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--dw-text);
  outline: none;
  min-width: 0;
}

.dw-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dw-filter-chip {
  padding: 8px 14px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dw-filter-chip:hover {
  border-color: var(--dw-outline-strong);
  color: var(--dw-text);
}
.dw-filter-chip.has-value {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
  color: #fff;
  font-weight: 600;
}
.dw-filter-chip-val { color: inherit; opacity: 0.85; }

.dw-filter-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dw-view-toggle {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  width: 36px;
  height: 36px;
  border-radius: var(--dw-radius);
  color: var(--dw-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-view-toggle:hover { color: var(--dw-text); border-color: var(--dw-outline-strong); }
.dw-view-toggle.active {
  background: var(--dw-slate);
  border-color: var(--dw-slate);
  color: #fff;
}
.dw-view-toggle svg { width: 16px; height: 16px; }

.dw-sort-select {
  padding: 8px 12px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

/* Search results layout */
.dw-search-results {
  display: grid;
  height: calc(100dvh - var(--dw-header-h) - 60px);
  /* CRITICAL: grid-template-rows: 1fr forces the single row to fill the
     container's height. Without this, the row sizes to its content, which
     means in full-screen map view (list-wrap display:none, map-wrap has
     no intrinsic height because its children are position:absolute) the
     row collapses to 0 and the map renders black. Split worked because
     the list cards gave the row a height; map-only view broke. M-Mob-2
     made this worse on mobile by removing the fixed height — fixed here. */
  grid-template-rows: 1fr;
  transition: grid-template-columns var(--dw-dur) var(--dw-ease);
}
.dw-search-results[data-view="split"] { grid-template-columns: minmax(440px, 1fr) 1fr; }
.dw-search-results[data-view="list"] { grid-template-columns: 1fr 0; }
.dw-search-results[data-view="map"] { grid-template-columns: 0 1fr; }
/* Split view requires ≥880px to display both panes without clipping
   (left pane has a 440px min). Below that, collapse split → map so the
   layout never blows past viewport width. Mobile users who tap Draw
   from list view (which auto-switches to split) get a full-screen map. */
@media (max-width: 880px) {
  .dw-search-results[data-view="split"] { grid-template-columns: 0 1fr; }
}
.dw-search-results[data-view="list"] .dw-results-map-wrap { display: none; }
.dw-search-results[data-view="map"] .dw-results-list-wrap { display: none; }
/* CRITICAL: pin items to their explicit grid cells so display:none on the
   sibling doesn't shift placement. Without this, in map view list-wrap is
   display:none → grid auto-flow places map-wrap in cell (1,1) → column 1
   is 0px in map view → map-wrap renders at 0 width. Bottom-left chip
   renders at left:12 of the 0-wide wrap (visible at viewport edge) but
   bottom-right + top-right controls render off-screen at -12. Map canvas
   is 0×N → black. Pinning grid-column avoids the shift entirely. */
.dw-results-list-wrap { grid-column: 1; grid-row: 1; }
.dw-results-map-wrap { grid-column: 2; grid-row: 1; }

/* M-Mob-2: at ≤900px the desktop split view's 440px+1fr is too cramped, so
   split degrades to list-only. List view = list, Map view = full-screen map.
   The floating .dw-mob-view-pill (below) is the user's mobile list↔map toggle. */
@media (max-width: 900px) {
  /* Drop the desktop fixed-height calc — filter bar grows to 2 rows on mobile
     (search + chip strip) so the 60px subtraction is wrong. Use a flex chain
     instead. CRITICAL: flex:1 on .dw-search-results requires a flex parent —
     and the parent .dw-search-page is a plain <section> (no display:flex by
     default), so flex:1 was being silently ignored. Map-only view then had
     height:auto + a grid row sized to map-wrap's intrinsic height (0, since
     all map-wrap children are position:absolute) = 0 tall map. Forcing the
     section to be a flex column repairs the chain so the grid fills the
     remaining space below the filter bar regardless of the bar's actual
     height. */
  .dw-search-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .dw-search-results { height: auto; flex: 1; min-height: 0; }
  .dw-search-results[data-view="split"] { grid-template-columns: 1fr !important; }
  .dw-search-results[data-view="split"] .dw-results-map-wrap { display: none !important; }
  /* Hide desktop split-view button on mobile (split doesn't make sense on phones) */
  #dw-view-split { display: none; }
}

/* M-Mob-2: filter bar restructure on mobile.
   Wrap chips into a horizontal-scroll strip and stack the search bar above
   them so the bar takes 2 rows max instead of 3-4 from flex-wrap chaos. */
@media (max-width: 720px) {
  .dw-filter-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px var(--dw-sp-4);
    /* M-Mob-7.4: contain horizontal overflow from the chip strip so iOS
       Safari's bounce gesture doesn't slide the whole page sideways. */
    overflow-x: hidden;
  }
  .dw-filter-search {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .dw-filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    /* M-Mob-7.4: removed the `margin: 0 -16px` extension. The fade-mask
       still sells "more to scroll" without needing the chip strip to
       extend past the parent's padding box (which was leaking horizontal
       overflow to the body on iOS). */
    padding: 2px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Soft fade-out on right edge so the user knows there's more to scroll. */
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .dw-filter-chips::-webkit-scrollbar { display: none; }
  .dw-filter-chip,
  .dw-filter-chip-reset,
  .dw-filter-chip-save { flex-shrink: 0; }
  /* Hide desktop view-toggle row on mobile — replaced by floating .dw-mob-view-pill.
     Sort still useful on mobile but lower priority — collapse for now. */
  .dw-filter-right { display: none; }
}

/* M-Mob-7.4: hide top header on /search mobile and slide the filter bar
   up to the top. With the bottom nav handling navigation, the top dwello
   bar was wasted real estate — 64px reclaimed for actual results.
   The view-transition-name on .dw-header still works on other pages;
   display:none here just means /search doesn't participate in the header
   transition (clean disappear, no awkward animation). */
@media (max-width: 900px) {
  body.dw-searchpage .dw-header { display: none; }
  body.dw-searchpage .dw-filter-bar {
    top: 0;
    /* iOS notch clearance — without this the filter bar tucks under
       the status bar on iPhone X+ */
    padding-top: env(safe-area-inset-top);
  }
  /* Belt-and-suspenders against any future inner overflow leaking to body. */
  body.dw-searchpage { overflow-x: hidden; }
}

/* M-Mob-7.6: For Rent locks Type filter — soft note in the locked slot. */
.dw-more-locked-note {
  padding: 12px 14px;
  background: var(--dw-mist);
  border: 1px dashed var(--dw-outline-strong);
  border-radius: 10px;
  color: var(--dw-text-3);
  font-size: 13px;
  line-height: 1.5;
}

/* M-Mkt-PublicParity (2026-04-27): unified "Filters" pill is now the
   primary control on BOTH desktop and mobile. The 6 per-filter chips
   (price/beds/baths/type/status/more) are hidden everywhere — the
   Filters sheet contains every section. Save + Clear stay visible at
   the bar level on desktop; Clear hides on mobile (lives in sheet footer). */
body.dw-searchpage .dw-filter-chip-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dw-slate);
  color: #fff;
  border-color: var(--dw-slate);
  font-weight: 600;
}
body.dw-searchpage .dw-filter-chip-all svg { stroke: currentColor; }
body.dw-searchpage .dw-filter-chip-all.has-value {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
}
body.dw-searchpage .dw-filter-chip-all .dw-filter-chip-val {
  margin-left: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
body.dw-searchpage .dw-filter-chip[data-filter="price"],
body.dw-searchpage .dw-filter-chip[data-filter="beds"],
body.dw-searchpage .dw-filter-chip[data-filter="baths"],
body.dw-searchpage .dw-filter-chip[data-filter="type"],
body.dw-searchpage .dw-filter-chip[data-filter="status"],
body.dw-searchpage .dw-filter-chip[data-filter="more"] {
  display: none;
}
@media (max-width: 720px) {
  /* M-Mob-7.7: hide the bar-level Clear chip on mobile — Clear lives only
     inside the Filters sheet footer. Mobile bar minimal: Filters · Save. */
  body.dw-searchpage .dw-filter-chip-reset {
    display: none !important;
  }
}

/* M-Mob-2: extra bottom padding on the list so the floating pill doesn't
   overlay the last card. ~64px pill height + 16px breathing room + safe-area. */
@media (max-width: 900px) {
  body.dw-searchpage .dw-results-list-wrap {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* M-Mob-5: touch targets — Apple HIG min is 44×44. Bump key tappable
   chrome on mobile. Filter chips were ~30px tall, mobile menu btn 40×40,
   side btn-chips ~32px. */
@media (max-width: 720px) {
  .dw-filter-chip,
  .dw-filter-chip-reset,
  .dw-filter-chip-save {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .dw-mobile-menu-btn { width: 44px; height: 44px; }
  .dw-btn-chip { min-height: 44px; padding: 10px 14px; }
  /* Listing card favorite/share-button sized targets are inside cards, but
     the listing-cta-btn and mob-view-pill should also clear 44px. */
  body.dw-listingpage .dw-listing-cta-btn { min-height: 44px; }
  body.dw-searchpage .dw-mob-view-pill { min-height: 44px; }
}

/* M-Mob-5: listing detail page — entire body needs bottom padding so the
   sticky CTA bar doesn't cover the last sections (collab + similar listings).
   The earlier .dw-listing-main rule only padded the body+sidebar grid; the
   sections AFTER it (REACTIONS+NOTES, Similar properties) extended below the
   bar. Apply to the entire page on mobile non-Closed listings. */
@media (max-width: 900px) {
  body.dw-listingpage {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* M-Mob-5: listing gallery on mobile — the 4-thumb side-grid below the
   main photo is unusable at 375px (each thumb is ~90px tall). Hide it
   entirely; the main photo + "View all photos" expand button is enough,
   and the lightbox swipe gesture (already wired) lets the user browse
   the full set. Existing 720px rules already collapse main to 1fr 4:3
   so no other overrides needed. */
@media (max-width: 720px) {
  .dw-gallery-side { display: none; }
}

/* M-Mob-2: floating list ↔ map toggle pill. Visible only on /search mobile.
   Centered at the bottom of viewport, glassy pill shape, switches between
   "List" and "Map" labels depending on current view. */
.dw-mob-view-pill {
  display: none;
}
@media (max-width: 900px) {
  body.dw-searchpage .dw-mob-view-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    padding: 12px 22px;
    background: var(--dw-text);
    color: var(--dw-bg);
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(20, 32, 50, 0.22), 0 1px 3px rgba(20, 32, 50, 0.10);
    transition: transform 160ms var(--dw-ease), box-shadow 240ms var(--dw-ease);
    -webkit-tap-highlight-color: transparent;
  }
  body.dw-searchpage .dw-mob-view-pill:active {
    transform: translateX(-50%) scale(0.96);
  }
  body.dw-searchpage .dw-mob-view-pill svg {
    width: 16px; height: 16px;
  }
}

.dw-results-list-wrap {
  overflow-y: auto;
  padding: var(--dw-sp-4) var(--dw-sp-5);
  position: relative;  /* Ship 7n: needed for ::after progress bar anchoring */
}

/* Ship 7n: smooth map-pan → grid update.
   Loading state — shows while a fetch is in flight. Grid dims + a thin
   animated progress bar slides across the top. Applied only for
   viewport refetches (non-append), not infinite scroll. */
.dw-results-list-wrap .dw-results-grid {
  transition: opacity 140ms ease;
}
.dw-results-list-wrap.is-fetching .dw-results-grid {
  opacity: 0.68;
  pointer-events: none;
}
.dw-results-list-wrap.is-fetching::after {
  content: "";
  position: sticky;  /* sticky so it stays at top of the scrollable area */
  top: 0; left: 0; right: 0;
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%, transparent 30%,
    var(--dw-sky) 45%, var(--dw-sky) 55%,
    transparent 70%, transparent 100%
  );
  background-size: 220% 100%;
  animation: dw-progress-slide 1300ms linear infinite;
  pointer-events: none;
  margin-top: -2px;  /* pull up so it hovers at the very top */
  z-index: 5;
}
@keyframes dw-progress-slide {
  0% { background-position: 100% 0; }
  100% { background-position: -120% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Ship 1C: card visual sync when pin is hovered. Subtle sky-blue accent
   outline + slight lift so the pair feels like a unit. Transform scale
   stays tiny (1.01) to avoid layout jank in the CSS grid.
   ═══════════════════════════════════════════════════════════════════════════ */
.dw-card.is-map-hovered {
  outline: 2px solid var(--dw-sky);
  outline-offset: 2px;
  z-index: 2;
  transform: scale(1.01);
  transition:
    outline-color 140ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Ship 7r: DOM-based map pins — brand-quality pill markers
   ═══════════════════════════════════════════════════════════════════════════
   Individual listing pins are rendered as DOM <div> elements via
   mapboxgl.Marker (not WebGL symbol layers). This gives us real CSS
   control: backdrop-filter blur, layered shadows, smooth transitions,
   typography hierarchy. Clusters stay WebGL for scale; individual pins
   are capped by viewport (<500 in practice after clusterMaxZoom=13).

   Pill structure:
     <div class="dw-map-pin" data-status="active">
       <span class="dw-map-pin-dot"></span>
       <span class="dw-map-pin-price">$450k</span>
     </div>
*/

.dw-map-pin {
  --dw-pin-bg: var(--dw-surface);
  --dw-pin-text: var(--dw-text);
  --dw-pin-border: var(--dw-outline-strong);
  --dw-pin-dot: #3FB876;
  --dw-pin-shadow: 0 4px 14px rgba(20, 32, 50, 0.22), 0 1px 3px rgba(20, 32, 50, 0.10);
  display: none;  /* hidden until zoom threshold met */
  position: relative;  /* anchors the absolute price-drop chip */
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  background: var(--dw-pin-bg);
  color: var(--dw-pin-text);
  border: 1px solid var(--dw-pin-border);
  border-radius: 999px;
  font-family: var(--font-display, 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;  /* Ship 1C: <a> element, strip default underline */
  box-shadow: var(--dw-pin-shadow);
  /* Perf-2026-04-28: backdrop-filter on every pin was the headline lag
     source once clusters break — each visible pin requires a separate
     GPU blur composite. With 100+ pins on screen it pegs paint cost.
     Solid surface bg renders effectively instantly. */
  /* (removed backdrop-filter: blur(8px)) */
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

/* Show the pin only when zoomed past the cluster threshold. This is
   toggled by dwMapApplyZoomVisibility() on every zoom event. */
.dw-map-zoomed-in .dw-map-pin { display: inline-flex; }

.dw-map-pin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dw-pin-dot);
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}
.dw-map-pin-price {
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

/* Status color variants — only the DOT changes by default. Pill stays
   quiet/neutral so the map doesn't read as a highlighter-marker mess. */
.dw-map-pin[data-status="active"]  { --dw-pin-dot: #3FB876; }
.dw-map-pin[data-status="soon"]    { --dw-pin-dot: #0EA5A5; }
.dw-map-pin[data-status="pending"] { --dw-pin-dot: #F59E0B; }

/* Closed listings recede — muted background + lighter text + smaller dot */
.dw-map-pin[data-status="closed"] {
  --dw-pin-bg: var(--dw-surface-subtle);
  --dw-pin-text: var(--dw-text-2);
  --dw-pin-dot: #64748B;
  font-weight: 500;
  opacity: 0.85;
}

/* Hover state — lift via shadow deepening, switch to dwello sky accent */
.dw-map-pin:hover,
.dw-map-pin.is-hovered,
.dw-map-pin.is-active {
  --dw-pin-bg: var(--dw-sky);
  --dw-pin-text: #ffffff;
  --dw-pin-border: var(--dw-sky);
  --dw-pin-shadow: 0 10px 28px rgba(110, 181, 233, 0.45), 0 2px 8px rgba(110, 181, 233, 0.25);
  z-index: 10;
}
.dw-map-pin:hover .dw-map-pin-dot,
.dw-map-pin.is-hovered .dw-map-pin-dot,
.dw-map-pin.is-active .dw-map-pin-dot {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}

/* Dark theme — pill adapts naturally via --dw-surface/--dw-text. Bump
   shadow opacity since dark bg is very dark already. */
[data-theme="dark"] .dw-map-pin {
  --dw-pin-bg: rgba(22, 31, 44, 0.92);
  --dw-pin-border: rgba(255, 255, 255, 0.14);
  --dw-pin-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .dw-map-pin-dot {
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.4);
}

/* Ship 1C: just-listed pulse. Pins for listings ≤3 days old get a
   gentle breathing animation on the status dot only (not the whole
   pill — too loud). Pauses on hover so the pulse doesn't compete
   with the hover accent (both would be attention-grabby). */
@keyframes dw-pin-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.55); opacity: 0.65; }
}
.dw-map-pin[data-new="true"] .dw-map-pin-dot {
  animation: dw-pin-dot-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.dw-map-pin[data-new="true"]:hover .dw-map-pin-dot,
.dw-map-pin[data-new="true"].is-hovered .dw-map-pin-dot,
.dw-map-pin[data-new="true"]:focus-visible .dw-map-pin-dot {
  animation: none;
}

/* Ship 1C price-drop chip on pins (green per Ship 1C+ to match the
   .dw-card-badge-price-drop color on listing cards — visual consistency
   across surfaces). Small green badge in the top-right corner of the
   pill. Ring via surface-colored border so it reads as a separate
   element floating above. */
.dw-map-pin-drop {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: rgba(63, 184, 118, 0.95);  /* matches .dw-card-badge-price-drop */
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  border-radius: 999px;
  border: 1.5px solid var(--dw-surface);
  pointer-events: none;  /* don't shift click target from the pill */
}
[data-theme="dark"] .dw-map-pin-drop {
  border-color: rgba(22, 31, 44, 1);
}

/* Ship 7o/1B → 1C: map pin popup card. Shown when user HOVERS an
   unclustered pin (not click). Click on pin navigates — popup is info
   preview only. Pointer-events remain interactive on popup so user can
   rest mouse on it while reading (pauses the hide timer in JS). Close
   button hidden since popups auto-dismiss on hover-out.  */
.mapboxgl-popup.dw-map-popup-wrap .mapboxgl-popup-content {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.14);
  width: 280px;
  background: var(--dw-surface);
}
.mapboxgl-popup.dw-map-popup-wrap .mapboxgl-popup-close-button {
  display: none;
}

/* Ship 1C: fade-in + gentle rise when popup appears. The outer Mapbox
   popup sets its own transform for positioning — we can't touch it
   without breaking map-coordinate tracking. Instead we animate an
   inner wrapper (.dw-map-popup-inner) built inside the popup content. */
.dw-map-popup-inner {
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transform-origin: center bottom;
  transition:
    opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mapboxgl-popup.dw-map-popup-wrap.is-visible .dw-map-popup-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dw-map-popup-photo {
  display: block;
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
}
.dw-map-popup-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.dw-map-popup-photo:hover img { transform: scale(1.03); }
.dw-map-popup-status {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px;
  padding: 4px 9px;
}
.dw-map-popup-body {
  padding: 12px 14px 14px;
}
.dw-map-popup-price {
  font-family: var(--font-display, inherit);
  font-size: 20px;
  font-weight: 800;
  color: var(--dw-text);
  line-height: 1.15;
}
.dw-map-popup-specs {
  font-size: 12px;
  color: var(--dw-text-2);
  margin-top: 3px;
}
.dw-map-popup-addr {
  font-size: 13px;
  color: var(--dw-text);
  margin-top: 6px;
  line-height: 1.35;
  /* Keep single-line-ish — long addresses ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Fade-in animation for newly-inserted cards during diff rendering.
   Only applied to cards that didn't exist in the previous render —
   existing cards stay untouched. Animation is class-gated so a re-fetch
   that keeps the card doesn't re-trigger the entrance. */
@keyframes dw-card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dw-card.dw-card-entering {
  animation: dw-card-enter 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.dw-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--dw-sp-4);
}
.dw-results-count {
  font-size: 14px;
  color: var(--dw-text-2);
  font-weight: 500;
}
.dw-results-count strong { color: var(--dw-text); font-weight: 700; }

.dw-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--dw-sp-5);
}
.dw-search-results[data-view="list"] .dw-results-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.dw-results-map-wrap {
  position: relative;
  background: var(--dw-mist);
  border-left: 0.5px solid var(--dw-outline);
}
.dw-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--dw-text-3);
  gap: var(--dw-sp-4);
}
.dw-map-placeholder-text {
  font-size: 14px;
  text-align: center;
}
.dw-map-placeholder-text small {
  font-size: 11px;
  opacity: 0.7;
}
/* Ship 7c: main search Mapbox map.
   Ship 7k FIX: switched from `position: absolute; inset: 0` to explicit
   `width/height: 100%` + `position: relative`. Root cause of the
   multi-day black-panel saga: Mapbox GL's own CSS (injected via JS at
   runtime) declares `.mapboxgl-map { position: relative; }` with same
   specificity as our rule. Loading order → Mapbox wins the cascade →
   our position:absolute becomes relative → `inset: 0` no longer stretches
   to parent → container collapses to 0 height (Mapbox's children are all
   position:absolute, so intrinsic content height is 0) → canvas falls
   back to HTML <canvas> default 300px (visible as canvas=1001x300 in
   the diag logs).
   Using explicit 100% dims works regardless of position:relative vs
   absolute + plays nicely with Mapbox setting the class. */
.dw-results-map {
  position: relative;
  width: 100%;
  height: 100%;
}
.dw-results-map .mapboxgl-canvas { outline: none; }

/* Ship 7l/1A: "Search as I move the map" toggle + "Redo search here" CTA.
   Floats above the map. Glass-morphism matches the status-pill treatment
   used on listing cards over photos. Sits top-right so Mapbox's
   NavigationControl (also top-right) moves down slightly but still has
   its own column. */
.dw-map-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dw-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--dw-radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--dw-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-toggle:hover { box-shadow: var(--dw-shadow-md); }
.dw-map-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--dw-outline-strong);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-toggle input[type="checkbox"]:checked {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
}
.dw-map-toggle input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
[data-theme="dark"] .dw-map-toggle {
  background: rgba(15, 22, 33, 0.82);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .dw-map-toggle input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.35);
}

/* "Redo search here" — appears above map center when toggle is OFF
   AND user has panned since last search. */
.dw-map-redo {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--dw-sky);
  color: #fff;
  border: none;
  border-radius: var(--dw-radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(110, 181, 233, 0.45);
  animation: dw-fade-up 260ms var(--dw-ease) both;
  transition: transform var(--dw-dur-snap) var(--dw-ease), box-shadow var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-redo:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 6px 18px rgba(110, 181, 233, 0.55);
}
.dw-map-redo[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   Ship 2/Phase-2: Draw-to-search UI
   ═══════════════════════════════════════════════════════════════════════════
   Draw chip (in filter bar) + toolbar overlay on map + apply bar at bottom.
   When draw mode is active, .dw-draw-mode class gets added to the map-wrap.
   That triggers: cursor change, pin click-through disabled, etc.
*/

/* "Draw area" button on the map (top-right, under the search-as-I-move
   toggle). Icon-only by default; ✕ appears inline when a shape is
   applied. Same glass-morphism treatment as the toggle for visual
   unity of map-chrome controls. */
.dw-map-draw-btn {
  position: absolute;
  top: 58px;  /* under the toggle (~46px toggle + 12px top + 10 gap) */
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  min-width: 36px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dw-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--dw-radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--dw-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-draw-btn:hover { box-shadow: var(--dw-shadow-md); }
.dw-map-draw-btn.is-active {
  background: var(--dw-sky);
  color: #fff;
  border-color: var(--dw-sky);
  box-shadow: 0 6px 18px rgba(110, 181, 233, 0.35);
}
.dw-map-draw-btn.is-drawing {
  background: var(--dw-sky);
  color: #fff;
  border-color: var(--dw-sky);
}
.dw-map-draw-btn .dw-map-draw-remove {
  display: none;
  margin-left: 4px;
  padding: 0 3px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.92;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: opacity 120ms ease;
}
.dw-map-draw-btn .dw-map-draw-remove:hover { opacity: 1; }
.dw-map-draw-btn.is-active .dw-map-draw-remove { display: inline-flex; align-items: center; }
[data-theme="dark"] .dw-map-draw-btn {
  background: rgba(15, 22, 33, 0.82);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

/* ─── Mobile: align bottom-map pills with the floating List pill ─
   List pill is `position: fixed` (viewport-anchored). The grand-total
   chip + Layers picker default to `position: absolute` (map-wrap-
   anchored). Even with identical `bottom:` calcs the two reference
   frames differ → vertical mis-alignment. Switch to `position: fixed`
   on mobile so all three pills share the viewport reference and their
   bottom edges line up exactly. */
@media (max-width: 900px) {
  body:not(.dw-body-match) .dw-map-count-chip,
  body:not(.dw-body-match) .dw-map-layers-btn {
    position: fixed;
    bottom: calc(56px + 16px + env(safe-area-inset-bottom));
  }
  body:not(.dw-body-match) .dw-map-count-chip { left: 12px; right: auto; }
  body:not(.dw-body-match) .dw-map-layers-btn  { right: 12px; left: auto; }
  body:not(.dw-body-match) .dw-map-layers-popover {
    position: fixed;
    right: 12px; left: auto;
    bottom: calc(56px + 16px + env(safe-area-inset-bottom) + 48px);
  }
}

/* ─── Ship C 2026-04-27: bottom-left grand-total chip ──────────── */
.dw-map-count-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--dw-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--dw-radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--dw-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-count-chip:hover { box-shadow: var(--dw-shadow-md); transform: translateY(-1px); }
.dw-map-count-chip[hidden] { display: none; }
.dw-map-count-num {
  font-family: var(--dw-font-display, inherit);
  font-weight: 700;
  font-size: 14px;
  color: var(--dw-sky);
  letter-spacing: -0.01em;
}
.dw-map-count-label { color: var(--dw-text-3); font-size: 11.5px; }
[data-theme="dark"] .dw-map-count-chip {
  background: rgba(15, 22, 33, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

/* ─── Ship C 2026-04-27: bottom-right Layers picker ────────────── */
.dw-map-layers-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--dw-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--dw-radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--dw-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-layers-btn:hover { box-shadow: var(--dw-shadow-md); }
.dw-map-layers-btn.is-open { background: var(--dw-sky); color: #fff; border-color: var(--dw-sky); }
.dw-map-layers-label { line-height: 1; }
[data-theme="dark"] .dw-map-layers-btn {
  background: rgba(15, 22, 33, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}
.dw-map-layers-popover {
  position: absolute;
  right: 12px;
  bottom: 56px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline-strong);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 32, 50, 0.22), 0 2px 6px rgba(20, 32, 50, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 140px;
  animation: dw-fade-up 180ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.dw-map-layers-popover[hidden] { display: none; }
.dw-map-layer-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--dw-text);
  text-align: left;
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-map-layer-opt:hover { background: var(--dw-surface-2); }
.dw-map-layer-opt.is-active {
  background: rgba(110, 181, 233, 0.14);
  border-color: var(--dw-sky);
  color: var(--dw-sky);
  font-weight: 600;
}
.dw-map-layer-thumb {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--dw-outline);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.dw-map-layer-thumb.dark { background: linear-gradient(135deg, #14253b 0%, #1d3252 60%, #233a5b 100%); }
.dw-map-layer-thumb.light { background: linear-gradient(135deg, #f3f5f8 0%, #e6ebf2 60%, #d2dae6 100%); }
.dw-map-layer-thumb.satellite { background: linear-gradient(135deg, #2d4f2a 0%, #4a6b3e 30%, #6b7c5a 60%, #8a8a72 100%); }
/* Auto: split light/dark gradient hints at the "follow theme" behavior */
.dw-map-layer-thumb.auto {
  background: linear-gradient(135deg, #f3f5f8 0%, #e6ebf2 49%, #1d3252 51%, #14253b 100%);
}

/* Active-draw-mode adjustments on the map wrap */
.dw-results-map-wrap.dw-draw-mode .mapboxgl-canvas { cursor: crosshair !important; }
.dw-results-map-wrap.dw-draw-mode .dw-map-pin { pointer-events: none; opacity: 0.45; }
.dw-results-map-wrap.dw-draw-mode .dw-map-toggle,
.dw-results-map-wrap.dw-draw-mode .dw-map-redo,
.dw-results-map-wrap.dw-draw-mode .dw-map-count-chip,
.dw-results-map-wrap.dw-draw-mode .dw-map-layers-btn,
.dw-results-map-wrap.dw-draw-mode .dw-map-layers-popover { display: none; }

/* Toolbar at top-center of map during draw mode */
.dw-draw-toolbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  min-width: 320px;
  max-width: min(92vw, 480px);
  background: var(--dw-surface);
  color: var(--dw-text);
  border: 1px solid var(--dw-outline-strong);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(20, 32, 50, 0.22), 0 2px 6px rgba(20, 32, 50, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  animation: dw-fade-up 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.dw-draw-toolbar[hidden] { display: none; }
[data-theme="dark"] .dw-draw-toolbar {
  background: rgba(22, 31, 44, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.dw-draw-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--dw-surface-subtle);
  border-radius: 10px;
}
.dw-draw-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.dw-draw-tab:hover { color: var(--dw-text); }
.dw-draw-tab.is-active {
  background: var(--dw-surface);
  color: var(--dw-sky);
  box-shadow: 0 1px 2px rgba(20, 32, 50, 0.08);
}
[data-theme="dark"] .dw-draw-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--dw-sky);
}

.dw-draw-help {
  font-size: 12px;
  color: var(--dw-text-2);
  text-align: center;
  padding: 2px 4px;
  min-height: 18px;
}

/* Address + miles sub-panel (only visible in radius-addr mode) */
.dw-draw-addr-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.dw-draw-addr-panel[hidden] { display: none; }
.dw-draw-addr-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--dw-surface-subtle);
  border: 1px solid var(--dw-outline);
  border-radius: 8px;
  color: var(--dw-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.dw-draw-addr-input:focus {
  border-color: var(--dw-sky);
  box-shadow: 0 0 0 2px rgba(110, 181, 233, 0.28);
}
.dw-draw-miles-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-draw-miles-label {
  font-size: 12px;
  color: var(--dw-text-2);
  font-weight: 500;
}
.dw-draw-miles {
  width: 64px;
  padding: 6px 8px;
  background: var(--dw-surface-subtle);
  border: 1px solid var(--dw-outline);
  border-radius: 6px;
  color: var(--dw-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  text-align: center;
}
.dw-draw-miles:focus {
  border-color: var(--dw-sky);
  box-shadow: 0 0 0 2px rgba(110, 181, 233, 0.28);
}
.dw-draw-miles-presets {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.dw-draw-miles-presets button {
  padding: 5px 8px;
  min-width: 28px;
  background: var(--dw-surface-subtle);
  border: 1px solid var(--dw-outline);
  border-radius: 6px;
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}
.dw-draw-miles-presets button:hover {
  border-color: var(--dw-sky);
  color: var(--dw-sky);
}
.dw-draw-miles-presets button.is-active {
  background: var(--dw-sky);
  color: #fff;
  border-color: var(--dw-sky);
}

.dw-draw-cancel {
  background: none;
  border: none;
  color: var(--dw-text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px;
  align-self: center;
  transition: color 140ms ease;
}
.dw-draw-cancel:hover { color: var(--dw-text); }

/* Apply bar at bottom of map — appears when a shape has been drawn */
.dw-draw-applybar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline-strong);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(20, 32, 50, 0.22), 0 2px 6px rgba(20, 32, 50, 0.10);
  animation: dw-fade-up 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.dw-draw-applybar[hidden] { display: none; }
[data-theme="dark"] .dw-draw-applybar {
  background: rgba(22, 31, 44, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.dw-draw-applybar .dw-btn { padding: 8px 16px; font-size: 13px; }

/* Tier 1 (B): live in-shape count chip. Sits inside the apply bar at
   the front; updates as user draws or refines the shape. */
.dw-draw-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--dw-sky);
  padding: 0 6px 0 10px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.dw-draw-count:empty { display: none; }
.dw-draw-applybar-sep {
  width: 1px;
  height: 18px;
  background: var(--dw-outline);
  margin: 0 4px;
}
.dw-draw-count:empty + .dw-draw-applybar-sep { display: none; }

/* Tier 1 (D): mode-specific cursor on the map canvas while drawing.
   Crosshair signals "you're drawing now" — same affordance graphics
   tools have used forever. Only applied while in draw mode AND the
   relevant sub-mode is active (polygon-creation cursor changes back
   to grab once the polygon closes and we drop to direct_select). */
.dw-results-map-wrap.dw-draw-mode.dw-draw-polygon .mapboxgl-canvas { cursor: crosshair; }
.dw-results-map-wrap.dw-draw-mode.dw-draw-polygon-freehand .mapboxgl-canvas { cursor: crosshair; }
.dw-results-map-wrap.dw-draw-mode.dw-draw-radius-drag .mapboxgl-canvas { cursor: crosshair; }
.dw-results-map-wrap.dw-draw-mode.dw-draw-radius-addr .mapboxgl-canvas { cursor: default; }

/* Per-shape × delete handle. One DOM marker per applied shape,
   anchored to its centroid. Click → that shape removed from
   _dwDrawState.shapes[]; everything else (other shapes, filters,
   URL, saved-search criteria) re-syncs automatically. */
.dw-shape-delete-handle {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--dw-radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--dw-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--dw-shadow-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.92;
  transition: box-shadow 120ms ease, opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.dw-shape-delete-handle:hover {
  opacity: 1;
  box-shadow: var(--dw-shadow-md);
}
[data-theme="dark"] .dw-shape-delete-handle {
  background: rgba(15, 22, 33, 0.82);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}
/* Hide during active draw mode — they'd clutter the working area */
.dw-results-map-wrap.dw-draw-mode .dw-shape-delete-handle { display: none; }

/* Mobile: tighten the toolbar so it doesn't dominate the small map.
   Single-row tabs are unchanged but padding shrinks; help text is
   smaller; cancel button becomes a compact inline link. */
@media (max-width: 640px) {
  .dw-draw-toolbar {
    top: 8px;
    /* Anchor BOTH edges to viewport (8px gutter each side) so the toolbar
       can't escape horizontally regardless of parent width. The desktop
       `left: 50%; transform: translateX(-50%)` centering breaks on mobile
       when the map wrap is wider than viewport. */
    left: 8px;
    right: 8px;
    transform: none;
    min-width: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 8px;
    gap: 6px;
  }
  .dw-draw-tabs { gap: 2px; padding: 2px; }
  .dw-draw-tab { padding: 6px 8px; font-size: 11px; gap: 4px; }
  .dw-draw-tab svg { width: 12px; height: 12px; }
  /* Help text must wrap (long strings like "Adding to your selection ·
     click corners to draw a new area" otherwise force toolbar wider). */
  .dw-draw-help {
    font-size: 11px;
    min-height: 14px;
    padding: 0;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }
  .dw-draw-cancel { padding: 4px 8px; font-size: 12px; }
  /* Apply bar: viewport-anchored fixed position so it can't be displaced
     by the map wrap's width. Centered horizontally above the List pill.
     Stack: bottom-nav (56px + safe-area) + List pill row (~64px = 16 gap
     + 44 pill min-height + 4 gap) = ~136px + safe-area below the apply bar. */
  .dw-draw-applybar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(56px + 80px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 16px);
    padding: 6px 8px;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .dw-draw-applybar .dw-btn { padding: 7px 12px; font-size: 12px; }
  .dw-draw-count { font-size: 12px; padding: 0 4px 0 8px; }
}

/* Shape overlay: Mapbox fills + outlines for the drawn shape itself.
   Layer IDs: dw-shape-fill + dw-shape-outline (see dwello.js). */

/* Places-autocomplete dropdown (minimal styling) */
.dw-draw-places-dropdown {
  position: absolute;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline-strong);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 32, 50, 0.18);
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  min-width: 260px;
}
.dw-draw-places-dropdown .dw-draw-place {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--dw-outline);
  color: var(--dw-text);
}
.dw-draw-places-dropdown .dw-draw-place:last-child { border-bottom: none; }
.dw-draw-places-dropdown .dw-draw-place:hover,
.dw-draw-places-dropdown .dw-draw-place.is-highlighted {
  background: var(--dw-surface-subtle);
  color: var(--dw-sky);
}

/* The circle-edit handles (DOM markers for radius modes) */
.dw-draw-handle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--dw-sky);
  box-shadow: 0 2px 6px rgba(20, 32, 50, 0.35);
  cursor: grab;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.dw-draw-handle.dw-draw-handle-center {
  background: var(--dw-sky);
  cursor: move;
}
.dw-draw-handle.is-dragging { cursor: grabbing; transform: scale(1.15); box-shadow: 0 4px 12px rgba(20, 32, 50, 0.45); }
.dw-draw-handle:hover { transform: scale(1.1); }

/* Radius label floating above the circle while dragging */
.dw-draw-radius-label {
  position: absolute;
  padding: 4px 10px;
  background: var(--dw-sky);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 2px 6px rgba(20, 32, 50, 0.35);
  white-space: nowrap;
  transform: translate(-50%, -100%);
  margin-top: -6px;
}

.dw-results-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dw-text-3);
  font-size: 13px;
  pointer-events: none;
}
.dw-results-map-marker {
  cursor: pointer;
  user-select: none;
  transition: transform 0.14s var(--dw-ease);
}
.dw-results-map-marker-pin {
  background: var(--dw-surface);
  color: var(--dw-text);
  border: 1.5px solid var(--dw-outline-strong);
  padding: 4px 10px;
  border-radius: var(--dw-radius-pill);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.20);
  white-space: nowrap;
}
.dw-results-map-marker:hover { transform: scale(1.08); z-index: 5; }
.dw-results-map-marker:hover .dw-results-map-marker-pin {
  background: var(--dw-sky);
  color: #fff;
  border-color: var(--dw-sky);
}
.dw-results-map-marker.is-active { transform: scale(1.12); z-index: 10; }
.dw-results-map-marker.is-active .dw-results-map-marker-pin {
  background: var(--dw-sky);
  color: #fff;
  border-color: var(--dw-sky);
  box-shadow: 0 4px 12px rgba(110, 181, 233, 0.45);
}
[data-theme="dark"] .dw-results-map-marker-pin {
  background: #111821;
  color: #E6E8EC;
  border-color: rgba(255,255,255,0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTING DETAIL PAGE
═══════════════════════════════════════════════════════════════════════════ */
.dw-listing-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4px;
  max-width: var(--dw-container);
  margin: 0 auto;
  padding: var(--dw-sp-3) var(--dw-sp-3) 0;
}
@media (max-width: 720px) {
  .dw-listing-gallery { grid-template-columns: 1fr; padding: 0; }
}

.dw-gallery-main {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--dw-radius-lg) 0 0 var(--dw-radius-lg);
  cursor: pointer;
}
@media (max-width: 720px) {
  .dw-gallery-main { border-radius: 0; aspect-ratio: 4/3; }
}
/* Landscape on phone-sized devices: gallery collapses to single column
   (hero full-width, no side thumbs taking 1/3) and the hero ignores
   its 4:3 aspect ratio in favor of filling the visible viewport.
   User can swipe to other photos or tap to open the lightbox.
   Phone landscape width is ~852px+ which is > 720px, so the existing
   max-width:720 rule misses entirely — this rule does the work. */
@media (orientation: landscape) and (max-height: 540px) {
  .dw-listing-gallery {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0;
  }
  .dw-gallery-main {
    aspect-ratio: auto !important;
    height: 85dvh !important;
    border-radius: 0 !important;
  }
}
.dw-gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--dw-ease-smooth);
}
.dw-gallery-main:hover .dw-gallery-main-img { transform: scale(1.03); }

.dw-gallery-expand {
  position: absolute;
  bottom: var(--dw-sp-4);
  right: var(--dw-sp-4);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dw-text);
  border: none;
  border-radius: var(--dw-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--dw-shadow-md);
  transition: all var(--dw-dur-snap) var(--dw-ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dw-gallery-expand:hover { transform: translateY(-1px); box-shadow: var(--dw-shadow-lg); }
/* Ship 7h: dark-mode override — the rgba(255,255,255,0.95) glass looked
   washed out/almost invisible against dark listing photos. Swap to
   dark-glass + brighter text + subtle white border for contrast. Same
   pattern used for status pills over photos. */
[data-theme="dark"] .dw-gallery-expand {
  background: rgba(10, 14, 22, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .dw-gallery-expand:hover {
  background: rgba(10, 14, 22, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
}

.dw-gallery-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}
@media (max-width: 720px) {
  .dw-gallery-side { grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 1fr; padding: 4px; }
}
/* Hide the side-thumb strip in landscape on phone — vertical real
   estate is precious. User taps hero to open the lightbox + full gallery.
   Same media query bumps the in-map popup carousel so its photos read
   much larger when the device is sideways. */
@media (orientation: landscape) and (max-height: 540px) {
  .dw-gallery-side { display: none; }
  .dw-popup-carousel { height: min(60dvh, 280px); }
}
.dw-gallery-side-img {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 400ms var(--dw-ease-smooth);
}
.dw-gallery-side-img:hover { transform: scale(1.04); }
.dw-gallery-side-img:nth-child(2) { border-top-right-radius: var(--dw-radius-lg); }
.dw-gallery-side-img:nth-child(4) { border-bottom-right-radius: var(--dw-radius-lg); }
@media (max-width: 720px) {
  .dw-gallery-side-img:nth-child(2), .dw-gallery-side-img:nth-child(4) { border-radius: 0; }
}

.dw-listing-main { padding: var(--dw-sp-10) var(--dw-sp-6) var(--dw-sp-20); }
.dw-listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--dw-sp-10);
  align-items: flex-start;
}
@media (max-width: 900px) {
  .dw-listing-grid { grid-template-columns: 1fr; gap: var(--dw-sp-8); }
  .dw-listing-sidebar { order: -1; }
}

.dw-listing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--dw-sp-4);
  margin-bottom: var(--dw-sp-5);
  flex-wrap: wrap;
}
.dw-listing-head-text .dw-status-pill { margin-bottom: var(--dw-sp-2); }
.dw-listing-addr {
  margin: 0 0 4px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}
.dw-listing-city {
  font-size: 16px;
  color: var(--dw-text-2);
}
.dw-listing-actions { display: flex; gap: 8px; flex-shrink: 0; }

.dw-listing-pricerow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--dw-sp-6);
  padding: var(--dw-sp-5) 0;
  border-top: 1px solid var(--dw-outline);
  border-bottom: 1px solid var(--dw-outline);
  margin-bottom: var(--dw-sp-8);
  flex-wrap: wrap;
}
.dw-listing-price {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.dw-listing-specs {
  display: flex;
  align-items: center;
  gap: var(--dw-sp-5);
}
.dw-listing-spec {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.dw-listing-spec strong {
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--dw-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.dw-listing-spec span {
  font-size: 12px;
  color: var(--dw-text-3);
  font-weight: 500;
}
.dw-listing-spec-sep {
  width: 1px;
  height: 32px;
  background: var(--dw-outline);
}

/* Ask dwello section */
.dw-ask-section {
  margin-bottom: var(--dw-sp-10);
  padding: var(--dw-sp-6);
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, rgba(110, 181, 233, 0.04) 100%);
  border: 1px solid rgba(110, 181, 233, 0.25);
  border-radius: var(--dw-radius-lg);
  position: relative;
  overflow: hidden;
}
.dw-ask-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.10) 0%, transparent 70%);
  pointer-events: none;
}
.dw-ask-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--dw-sp-4);
  position: relative;
}
.dw-ask-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dw-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--dw-shadow-sm);
  flex-shrink: 0;
}
.dw-ask-avatar img { width: 28px; height: 28px; opacity: 0.85; }
.dw-ask-title {
  font-family: var(--dw-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dw-text);
  letter-spacing: -0.01em;
}
.dw-ask-sub {
  font-size: 13px;
  color: var(--dw-text-2);
  margin-top: 2px;
}
.dw-ask-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}
.dw-ask-chip {
  padding: 10px 16px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dw-ask-chip:hover {
  border-color: var(--dw-sky);
  color: var(--dw-sky);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(110, 181, 233, 0.22);
}
.dw-ask-chip:focus-visible {
  outline: 2px solid var(--dw-sky);
  outline-offset: 2px;
  border-color: var(--dw-sky);
}
.dw-ask-footer {
  position: relative;
  margin-top: var(--dw-sp-4);
  font-size: 11px;
  color: var(--dw-text-3);
  font-style: italic;
}
.dw-ask-footer a { color: var(--dw-sky); font-style: normal; }

/* Compact collapsible variant (default initial state) */
.dw-ask-section:has(> .dw-ask-toggle) { padding: 0; margin-bottom: var(--dw-sp-6); }
.dw-ask-section:has(> .dw-ask-toggle):not(.is-open):not(.dw-ask-section-active)::before { display: none; }
.dw-ask-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  position: relative;
  z-index: 1;
  border-radius: var(--dw-radius-lg);
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-ask-toggle:hover { background: rgba(110, 181, 233, 0.06); }
.dw-ask-toggle:focus-visible { outline: 2px solid var(--dw-sky); outline-offset: -2px; }
.dw-ask-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--dw-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--dw-shadow-sm);
}
.dw-ask-avatar-sm img { width: 19px; height: 19px; opacity: 0.85; }
.dw-ask-title-inline {
  font-family: var(--dw-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--dw-text);
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}
.dw-ask-chevron {
  flex-shrink: 0;
  color: var(--dw-text-2);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.dw-ask-section.is-open .dw-ask-chevron { transform: rotate(180deg); }
.dw-ask-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
.dw-ask-section.is-open .dw-ask-body { grid-template-rows: 1fr; }
.dw-ask-body-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: padding 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}
.dw-ask-section.is-open .dw-ask-body-inner { padding: 2px 14px 14px; }
.dw-ask-sub-collapsed {
  font-size: 13px;
  color: var(--dw-text-2);
  line-height: 1.4;
}
.dw-ask-footer-collapsed {
  font-size: 11px;
  color: var(--dw-text-3);
  font-style: italic;
}
.dw-ask-footer-collapsed a { color: var(--dw-sky); font-style: normal; }

@media (max-width: 640px) {
  .dw-ask-toggle { padding: 9px 12px; gap: 10px; }
  .dw-ask-avatar-sm { width: 26px; height: 26px; }
  .dw-ask-avatar-sm img { width: 16px; height: 16px; }
  .dw-ask-title-inline { font-size: 14px; }
  .dw-ask-body-inner { padding: 0 12px; gap: 8px; }
  .dw-ask-section.is-open .dw-ask-body-inner { padding: 0 12px 12px; }
  .dw-ask-section:has(> .dw-ask-toggle) .dw-ask-chip { padding: 8px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dw-ask-chevron, .dw-ask-body, .dw-ask-body-inner, .dw-ask-toggle { transition: none; }
}

/* Active (chat open) state */
.dw-ask-section-active {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 640px;
}
.dw-ask-section-active .dw-ask-header {
  padding: var(--dw-sp-4) var(--dw-sp-5);
  margin-bottom: 0;
  border-bottom: 1px solid var(--dw-outline);
  background: var(--dw-surface);
  position: relative;
  z-index: 2;
}
.dw-ask-min {
  margin-left: auto;
  background: var(--dw-mist);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--dw-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-ask-min:hover { background: var(--dw-slate-soft); color: var(--dw-text); }

.dw-ask-thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--dw-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-4);
  background: var(--dw-surface);
  min-height: 220px;
  max-height: 440px;
  scroll-behavior: smooth;
}

.dw-ask-msg {
  display: flex;
  gap: 10px;
  animation: dw-msg-in 280ms var(--dw-ease-smooth);
}
@keyframes dw-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dw-ask-msg-user { justify-content: flex-end; }
.dw-ask-msg-assistant { justify-content: flex-start; }

.dw-ask-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dw-sky-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dw-ask-msg-avatar img { width: 20px; height: 20px; opacity: 0.85; }

.dw-ask-msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--dw-radius-lg);
  font-size: 14px;
  line-height: 1.55;
}
.dw-ask-msg-bubble p { margin: 0 0 10px; }
.dw-ask-msg-bubble p:last-child { margin-bottom: 0; }

.dw-ask-msg-user .dw-ask-msg-bubble {
  background: var(--dw-sky);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.dw-ask-msg-assistant .dw-ask-msg-bubble {
  background: var(--dw-mist);
  color: var(--dw-text);
  border-bottom-left-radius: 6px;
}

.dw-ask-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 16px 16px;
}
.dw-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dw-text-3);
  animation: dw-typing 1.2s var(--dw-ease-smooth) infinite;
}
.dw-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.dw-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes dw-typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.dw-ask-inputbar {
  display: flex;
  gap: 8px;
  padding: var(--dw-sp-4) var(--dw-sp-5);
  background: var(--dw-surface);
  border-top: 1px solid var(--dw-outline);
  align-items: center;
}
.dw-ask-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-ask-input:focus {
  border-color: var(--dw-sky);
  background: var(--dw-surface);
  box-shadow: var(--dw-shadow-focus);
}
.dw-ask-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dw-sky);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  box-shadow: 0 2px 6px rgba(110, 181, 233, 0.35);
}
.dw-ask-send-btn:hover {
  background: var(--dw-sky-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(110, 181, 233, 0.45);
}
.dw-ask-send-btn:active { transform: translateY(0) scale(0.96); }

.dw-ask-section-active .dw-ask-footer {
  padding: var(--dw-sp-3) var(--dw-sp-5);
  margin: 0;
  border-top: 1px solid var(--dw-outline);
  background: var(--dw-mist);
  font-style: normal;
  font-size: 10.5px;
  text-align: center;
}

/* Section blocks on listing detail */
.dw-section-block {
  padding-bottom: var(--dw-sp-10);
  margin-bottom: var(--dw-sp-10);
  border-bottom: 1px solid var(--dw-outline);
}
.dw-section-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.dw-listing-description {
  font-size: 15px;
  line-height: 1.65;
  color: var(--dw-text-2);
  margin-bottom: var(--dw-sp-3);
}
.dw-listing-description-attribution {
  font-size: 11px;
  color: var(--dw-text-3);
  font-style: italic;
}

.dw-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--dw-sp-1) var(--dw-sp-6);
}
@media (max-width: 520px) { .dw-facts-grid { grid-template-columns: 1fr; } }
.dw-fact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--dw-outline);
}
.dw-fact-label { color: var(--dw-text-3); font-size: 13px; }
.dw-fact-val { color: var(--dw-text); font-size: 14px; font-weight: 500; text-align: right; }

/* Feature sections (cooling/heating/appliances/etc — multi-enum RESO fields) */
.dw-feature-group {
  padding: 10px 0;
  border-bottom: 0.5px solid var(--dw-outline);
}
.dw-feature-group:last-child { border-bottom: 0; }
.dw-feature-group-label {
  font-size: 13px;
  color: var(--dw-text-3);
  margin-bottom: 6px;
}
.dw-feature-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-feature-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: 14px;
  font-size: 13px;
  color: var(--dw-text);
  white-space: nowrap;
}

.dw-attribution-block {
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  padding: var(--dw-sp-5) var(--dw-sp-5);
  margin-top: var(--dw-sp-6);
}
.dw-attribution-brokerage { margin-bottom: var(--dw-sp-3); }
.dw-attribution-office {
  font-size: 15px;
  font-weight: 600;
  color: var(--dw-text);
  margin-top: 2px;
}
.dw-attribution-agent {
  font-size: 13px;
  color: var(--dw-text-2);
  margin-top: 2px;
}
.dw-attribution-source {
  font-size: 12px;
  color: var(--dw-text-3);
  line-height: 1.5;
  border-top: 0.5px solid var(--dw-outline);
  padding-top: var(--dw-sp-3);
}
.dw-attribution-source p { margin: 0 0 4px; }

/* Sticky contact sidebar */
.dw-listing-sidebar {
  position: sticky;
  top: calc(var(--dw-header-h) + 20px);
}
.dw-contact-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  padding: var(--dw-sp-5);
  box-shadow: var(--dw-shadow-md);
}
.dw-contact-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--dw-sp-4);
  border-bottom: 1px solid var(--dw-outline);
  margin-bottom: var(--dw-sp-4);
}
.dw-contact-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dw-sky-soft);
  padding: 7px;
}
.dw-contact-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dw-text);
}
.dw-contact-sub {
  font-size: 12px;
  color: var(--dw-text-3);
  margin-top: 2px;
}
.dw-contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dw-input {
  padding: 10px 14px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  width: 100%;
  box-sizing: border-box;
}
.dw-input::placeholder { color: var(--dw-text-3); }
.dw-input:focus {
  border-color: var(--dw-sky);
  box-shadow: var(--dw-shadow-focus);
  background: var(--dw-surface);
}
.dw-textarea { min-height: 72px; resize: vertical; font-family: inherit; }

/* ───────────── NOT FOUND ───────────── */
.dw-section-notfound { padding: var(--dw-sp-24) 0; text-align: center; }
.dw-notfound { max-width: 480px; margin: 0 auto; }
.dw-notfound-icon { width: 64px; height: 64px; margin: 0 auto var(--dw-sp-4); opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════════════════════
   HUB HEADER (shared by /neighborhoods, /agents, /home-value)
═══════════════════════════════════════════════════════════════════════════ */
.dw-hub-header {
  padding: var(--dw-sp-16) var(--dw-sp-6) var(--dw-sp-10);
  background:
    radial-gradient(ellipse at 70% 20%, rgba(110, 181, 233, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(245, 166, 35, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, var(--dw-bg) 0%, var(--dw-mist) 100%);
}
.dw-hub-header .dw-container { max-width: 880px; }
.dw-hub-header .dw-eyebrow { margin-bottom: var(--dw-sp-3); color: var(--dw-sky); }
.dw-hub-header .dw-display { font-size: clamp(36px, 5.5vw, 64px); letter-spacing: -0.03em; }
.dw-hub-header .dw-lede { font-size: clamp(16px, 1.4vw, 20px); max-width: 640px; }

/* ═══════════════════════════════════════════════════════════════════════════
   NEIGHBORHOOD PAGES
═══════════════════════════════════════════════════════════════════════════ */
.dw-nbhd-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--dw-sp-5);
}

.dw-nbhd-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  transition: transform var(--dw-dur) var(--dw-ease), box-shadow var(--dw-dur) var(--dw-ease), border-color var(--dw-dur) var(--dw-ease);
}
.dw-nbhd-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dw-shadow-lg);
  border-color: var(--dw-sky);
  color: inherit;
}
.dw-nbhd-hub-card-photo {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--dw-mist);
  transition: transform 600ms var(--dw-ease-smooth);
}
.dw-nbhd-hub-card:hover .dw-nbhd-hub-card-photo { transform: scale(1.05); }
.dw-nbhd-hub-card-body { padding: var(--dw-sp-5); }
.dw-nbhd-hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dw-sp-2);
  margin-bottom: var(--dw-sp-3);
}
.dw-nbhd-hub-card-name {
  margin: 0;
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--dw-text);
}
.dw-nbhd-hub-card-stats {
  display: flex;
  gap: var(--dw-sp-4);
}
.dw-nbhd-hub-stat {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.dw-nbhd-hub-stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--dw-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.dw-nbhd-hub-stat span {
  font-size: 11px;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ───────────── NEIGHBORHOOD HERO (individual page) ───────────── */
.dw-nbhd-hero {
  position: relative;
  padding: var(--dw-sp-20) var(--dw-sp-6) var(--dw-sp-16);
  overflow: hidden;
  min-height: 52dvh;
  display: flex;
  align-items: center;
}
.dw-nbhd-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65) saturate(1.1);
  z-index: 0;
  transform: scale(1.05);
  animation: dw-ken-burns 18s var(--dw-ease-smooth) infinite alternate;
}
@keyframes dw-ken-burns {
  from { transform: scale(1.05); }
  to { transform: scale(1.12) translate(-2%, -1%); }
}
.dw-nbhd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
.dw-nbhd-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}
.dw-nbhd-eyebrow {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--dw-sp-3);
}
.dw-nbhd-hero-title {
  color: #fff;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: -0.035em;
  margin: 0 0 var(--dw-sp-4);
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.dw-nbhd-hero-lede {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.5vw, 20px);
  max-width: 560px;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ───────────── STATS GRID ───────────── */
.dw-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--dw-sp-4);
  margin-top: var(--dw-sp-6);
}
@media (max-width: 720px) { .dw-stats-grid { grid-template-columns: repeat(2, 1fr); } }

.dw-stat-card {
  padding: var(--dw-sp-6) var(--dw-sp-5);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  transition: all var(--dw-dur) var(--dw-ease);
}
.dw-stat-card:hover {
  border-color: var(--dw-outline-strong);
  transform: translateY(-2px);
  box-shadow: var(--dw-shadow-md);
}
.dw-stat-num {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--dw-text);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--dw-sp-2);
}
.dw-stat-label {
  font-size: 12px;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENTS PAGES
═══════════════════════════════════════════════════════════════════════════ */
.dw-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--dw-sp-6);
}

.dw-agent-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  transition: all var(--dw-dur) var(--dw-ease);
}
.dw-agent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dw-shadow-lg);
  border-color: var(--dw-sky);
  color: inherit;
}

.dw-agent-photo {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.dw-agent-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.25) 0%, transparent 60%);
}
.dw-agent-initials {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 72px;
  letter-spacing: -0.03em;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.dw-agent-photo-lg {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  flex-shrink: 0;
  aspect-ratio: unset;
}
.dw-agent-photo-lg .dw-agent-initials { font-size: 54px; }

/* Photo-as-image variant — applied when the agent has a real photo uploaded
   in Atlas. Suppresses the gradient background so the real photo shows, and
   drops the overlay gradient on ::before (still there for the initials
   fallback when no photo is uploaded). */
.dw-agent-photo.dw-agent-photo-img {
  background: var(--dw-surface-2);
  background-size: cover;
  background-position: center center;
}
.dw-agent-photo.dw-agent-photo-img::before { content: none; }

.dw-agent-card-body { padding: var(--dw-sp-5); }
.dw-agent-name {
  margin: 0 0 4px;
  font-family: var(--dw-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--dw-text);
}
.dw-agent-title {
  font-size: 13px;
  color: var(--dw-sky);
  font-weight: 600;
  margin-bottom: var(--dw-sp-3);
}
.dw-agent-bio-preview {
  font-size: 13px;
  color: var(--dw-text-2);
  line-height: 1.55;
  margin-bottom: var(--dw-sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dw-agent-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Individual agent page */
.dw-agent-hero {
  padding: var(--dw-sp-16) var(--dw-sp-6) var(--dw-sp-10);
  background:
    radial-gradient(ellipse at 80% 30%, rgba(110, 181, 233, 0.10) 0%, transparent 50%),
    var(--dw-bg);
}
.dw-agent-hero-inner {
  display: flex;
  gap: var(--dw-sp-10);
  align-items: center;
  max-width: 1080px;
}
@media (max-width: 720px) {
  .dw-agent-hero-inner { flex-direction: column; text-align: center; gap: var(--dw-sp-6); }
  .dw-agent-hero-text .dw-agent-specialties { justify-content: center; }
  .dw-agent-contact { justify-content: center; }
}

.dw-agent-hero-name {
  font-size: clamp(36px, 5.5vw, 64px);
  letter-spacing: -0.035em;
  margin: var(--dw-sp-2) 0 var(--dw-sp-4);
  line-height: 1;
}
.dw-agent-contact {
  display: flex;
  gap: var(--dw-sp-3);
  margin-top: var(--dw-sp-5);
  flex-wrap: wrap;
}

.dw-agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--dw-sp-10);
  align-items: flex-start;
}
@media (max-width: 900px) {
  .dw-agent-grid { grid-template-columns: 1fr; }
  .dw-agent-side { order: -1; }
}

.dw-agent-main .dw-editorial {
  margin: var(--dw-sp-3) 0 var(--dw-sp-8);
}

.dw-agent-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--dw-sp-5);
  padding: var(--dw-sp-5);
  background: var(--dw-mist);
  border-radius: var(--dw-radius-lg);
}
@media (max-width: 480px) { .dw-agent-facts { grid-template-columns: 1fr; } }

.dw-agent-fact .dw-eyebrow { margin-bottom: 4px; }
.dw-agent-fact-val { font-size: 15px; color: var(--dw-text); font-weight: 500; }
.dw-agent-fact-val a { color: var(--dw-sky); text-decoration: none; }

.dw-agent-side { position: sticky; top: calc(var(--dw-header-h) + 20px); }

/* ═══════════════════════════════════════════════════════════════════════════
   HOME VALUATION PAGE
═══════════════════════════════════════════════════════════════════════════ */
.dw-hv-hero {
  position: relative;
  padding: var(--dw-sp-16) var(--dw-sp-6);
  overflow: hidden;
}
.dw-hv-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 30%, rgba(110, 181, 233, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 70%, rgba(245, 166, 35, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, var(--dw-bg) 0%, var(--dw-mist) 100%);
  z-index: -1;
}

.dw-hv-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--dw-sp-12);
  align-items: center;
}
@media (max-width: 900px) {
  .dw-hv-hero-inner { grid-template-columns: 1fr; gap: var(--dw-sp-8); }
}

.dw-hv-title {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.03em;
  margin: var(--dw-sp-3) 0;
}

.dw-hv-checks {
  list-style: none;
  padding: 0;
  margin: var(--dw-sp-6) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-3);
}
.dw-hv-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--dw-text-2);
  line-height: 1.5;
}
.dw-hv-checks li svg {
  width: 20px;
  height: 20px;
  color: var(--dw-sky);
  flex-shrink: 0;
  margin-top: 2px;
}

.dw-hv-form-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  padding: var(--dw-sp-6);
  box-shadow: var(--dw-shadow-lg);
}

.dw-hv-form-head { margin-bottom: var(--dw-sp-5); }
.dw-hv-form {
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-4);
}
.dw-hv-field { display: flex; flex-direction: column; gap: 6px; }
.dw-hv-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dw-hv-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--dw-sp-3); }
@media (max-width: 420px) { .dw-hv-field-row { grid-template-columns: 1fr; } }

.dw-hv-privacy {
  text-align: center;
  color: var(--dw-text-3);
  font-size: 11px;
  margin: var(--dw-sp-2) 0 0;
}

/* How it works steps */
.dw-hv-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--dw-sp-6);
}
@media (max-width: 800px) { .dw-hv-steps { grid-template-columns: 1fr; } }

.dw-hv-step {
  padding: var(--dw-sp-6);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  position: relative;
}
.dw-hv-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: var(--dw-sp-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY LIGHTBOX
═══════════════════════════════════════════════════════════════════════════ */
.dw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 12, 18, 0.96);
  display: flex;
  flex-direction: column;
  animation: dw-lightbox-in 280ms var(--dw-ease-smooth);
}
@keyframes dw-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dw-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--dw-sp-4) var(--dw-sp-6);
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.dw-lightbox-count {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
}
.dw-lightbox-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.dw-lightbox-close svg { width: 20px; height: 20px; }

.dw-lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--dw-sp-4) var(--dw-sp-4);
  overflow: hidden;
}
.dw-lightbox-img-wrap {
  max-width: min(100%, 1400px);
  max-height: 100%;
  position: relative;
  animation: dw-lightbox-img-in 320ms var(--dw-ease-spring);
}
@keyframes dw-lightbox-img-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.dw-lightbox-img {
  max-width: 100%;
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  border-radius: var(--dw-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dw-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dw-lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-50%) scale(1.08); }
.dw-lightbox-nav:disabled { opacity: 0.3; cursor: default; transform: translateY(-50%); }
.dw-lightbox-nav svg { width: 22px; height: 22px; }
.dw-lightbox-prev { left: var(--dw-sp-5); }
.dw-lightbox-next { right: var(--dw-sp-5); }

.dw-lightbox-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: var(--dw-sp-4) var(--dw-sp-6) var(--dw-sp-5);
  scrollbar-width: thin;
  flex-shrink: 0;
  scroll-behavior: smooth;
}
.dw-lightbox-thumb {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--dw-dur-snap) var(--dw-ease), transform var(--dw-dur-snap) var(--dw-ease);
  border: 2px solid transparent;
}
.dw-lightbox-thumb:hover { opacity: 0.8; transform: translateY(-2px); }
.dw-lightbox-thumb.active { opacity: 1; border-color: var(--dw-sky); }

@media (max-width: 640px) {
  .dw-lightbox-nav { width: 44px; height: 44px; }
  .dw-lightbox-prev { left: var(--dw-sp-3); }
  .dw-lightbox-next { right: var(--dw-sp-3); }
  .dw-lightbox-thumbs { padding: var(--dw-sp-3) var(--dw-sp-3) var(--dw-sp-4); }
  .dw-lightbox-thumb { width: 56px; height: 42px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER POPOVERS
═══════════════════════════════════════════════════════════════════════════ */
.dw-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline-strong);
  border-radius: var(--dw-radius);
  box-shadow: var(--dw-shadow-lg);
  padding: var(--dw-sp-5);
  min-width: 280px;
  z-index: 60;
  animation: dw-popover-in 180ms var(--dw-ease-smooth);
}
@keyframes dw-popover-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dw-popover-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dw-text-3);
  margin-bottom: var(--dw-sp-3);
}

.dw-popover-row {
  display: flex;
  gap: 8px;
  margin-bottom: var(--dw-sp-3);
}
.dw-popover-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-sm);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-popover-input:focus { border-color: var(--dw-sky); background: var(--dw-surface); }
.dw-popover-input-prefix { position: relative; flex: 1; }
.dw-popover-input-prefix::before { content: '$'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dw-text-3); font-size: 14px; pointer-events: none; z-index: 1; }
.dw-popover-input-prefix input { padding-left: 22px; }

.dw-popover-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dw-popover-pill {
  padding: 7px 14px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-popover-pill:hover { border-color: var(--dw-sky); color: var(--dw-text); }
.dw-popover-pill.active {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
  color: #fff;
  font-weight: 600;
}

/* Ship 7c: status filter options get row layout w/ count. Disabled state
   when count is 0 (no listings in that status match the current filters). */
.dw-popover-status-opts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--dw-sp-2);
}
.dw-popover-status-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--dw-radius-md);
  color: var(--dw-text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dw-dur-snap) var(--dw-ease);
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.dw-popover-status-opt:hover:not(.disabled) {
  background: var(--dw-surface-2);
  color: var(--dw-text);
}
.dw-popover-status-opt.active {
  background: var(--dw-sky);
  color: #fff;
}
.dw-popover-status-opt.active .dw-popover-status-count { color: rgba(255,255,255,0.8); }
.dw-popover-status-opt.disabled {
  opacity: 0.4;
  cursor: default;
}
.dw-popover-status-label { flex: 1; }
.dw-popover-status-count {
  font-variant-numeric: tabular-nums;
  color: var(--dw-text-3);
  font-size: 12px;
  font-weight: 600;
}

.dw-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--dw-sp-4);
  padding-top: var(--dw-sp-4);
  border-top: 0.5px solid var(--dw-outline);
}
.dw-popover-clear {
  background: none;
  border: none;
  color: var(--dw-text-3);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
}
.dw-popover-clear:hover { color: var(--dw-alert); }

/* Ship 5.2 — live count preview inside popover.
   Shows "247 homes match" at the bottom-left of the footer, updating
   as user toggles draft filters in the panel. The number re-fetches
   debounced via /api/public/listings/count. */
.dw-popover-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--dw-text-2);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity var(--dw-dur-snap) var(--dw-ease);
}
.dw-popover-count.is-loading { opacity: 0.5; }
.dw-popover-count-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dw-sky);
  box-shadow: 0 0 8px var(--dw-sky);
  flex-shrink: 0;
}

/* Ship 5.2 — dual-handle price range slider.
   Two overlapping <input type="range"> sitting on a shared track; the
   fill bar between them renders via a dw-slider-fill absolutely
   positioned under the handles. All-CSS, no lib. Handles sized 20px
   with subtle shadow, matching dwello's tactile/warm brand aesthetic. */
.dw-slider {
  position: relative;
  height: 36px;
  margin: 6px 4px 10px;
}
.dw-slider-track {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--dw-outline);
  border-radius: 4px;
  pointer-events: none;
}
.dw-slider-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--dw-sky);
  border-radius: 4px;
  pointer-events: none;
}
.dw-slider-handle {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%;
  height: 36px;
  background: transparent;
  pointer-events: none;
  outline: none;
}
.dw-slider-handle::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--dw-sky);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  cursor: grab;
  transition: transform var(--dw-dur-snap) var(--dw-ease);
}
.dw-slider-handle::-webkit-slider-thumb:hover { transform: scale(1.08); }
.dw-slider-handle::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.dw-slider-handle::-moz-range-thumb {
  pointer-events: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--dw-sky);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: grab;
}
.dw-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--dw-text);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  padding: 0 4px;
}
.dw-slider-labels .is-max { text-align: right; }

/* ═══════════════════════════════════════════════════════════════════════════
   MORE-FILTERS PANEL (Ship 5.3b.2)
   Multi-section popover with range sliders, pill rows, feature pills,
   and toggles. Sections stacked vertically with subtle dividers. Each
   section labeled with a small uppercase caption.
═══════════════════════════════════════════════════════════════════════════ */
.dw-more-section {
  padding: 14px 0 2px;
  border-top: 0.5px solid var(--dw-outline);
  margin-top: 10px;
}
.dw-more-section:first-of-type {
  border-top: none;
  margin-top: 6px;
  padding-top: 6px;
}
.dw-more-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dw-text-3);
  margin-bottom: 10px;
}
.dw-more-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 4px 0;
  -webkit-user-select: none;
  user-select: none;
}
.dw-more-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dw-text);
}
.dw-more-toggle-sub {
  font-size: 12px;
  color: var(--dw-text-3);
  margin-top: 2px;
}
.dw-toggle-switch {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--dw-outline);
  position: relative;
  cursor: pointer;
  transition: background 160ms var(--dw-ease);
}
.dw-toggle-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: left 180ms var(--dw-ease-smooth);
}
.dw-toggle-switch.is-on {
  background: var(--dw-sky);
}
.dw-toggle-switch.is-on::before {
  left: 21px;
}

/* Desktop More popover — wider since it has more content than the others */
.dw-popover.dw-popover-floating:has(.dw-more-section) {
  min-width: 360px;
}

/* Ship 5.7 Phase A — Keywords section: custom pills + text input */
.dw-custom-pills { margin-top: 8px; }
.dw-pill-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px 7px 14px;  /* extra right pad for × button */
}
.dw-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-pill-remove:hover { background: rgba(255, 255, 255, 0.35); }

/* M-Mob-7.8: pill-shaped keyword input. Container is a rounded-pill that
   wraps the input + Add button as a single visual unit, matching the
   pill style of preset keyword chips above it. Add button is its own
   inner pill, sky-blue. */
.dw-keyword-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 4px 4px 4px 8px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: 999px;
  transition: border-color var(--dw-dur-snap) var(--dw-ease),
              background var(--dw-dur-snap) var(--dw-ease);
}
.dw-keyword-input-wrap:focus-within {
  border-color: var(--dw-sky);
  background: var(--dw-surface);
  box-shadow: 0 0 0 3px rgba(110,181,233,0.12);
}
.dw-keyword-input {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  background: transparent;
  border: none;
  color: var(--dw-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.dw-keyword-input::placeholder { color: var(--dw-text-3); }
.dw-keyword-add {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--dw-sky);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity var(--dw-dur-snap) var(--dw-ease),
              transform var(--dw-dur-snap) var(--dw-ease);
}
.dw-keyword-add:hover { opacity: 0.92; }
.dw-keyword-add:active { transform: scale(0.96); }

/* Ship 5.3b.2: scrollable desktop popover (More panel + 'all' Filters
   sheet). Same flex-column structure as the mobile sheet — body scrolls,
   footer sticks to bottom. Max-height + WIDTH both capped so the popover
   never extends past the viewport in either dimension. */
.dw-popover.dw-popover-floating.dw-popover-scrollable {
  width: 380px;
  min-width: 0;             /* override the :has(.dw-more-section) min-width */
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100dvh - 96px));
  max-height: min(620px, calc(100vh - 96px));  /* fallback for browsers without dvh */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.dw-popover.dw-popover-floating.dw-popover-scrollable > .dw-sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--dw-sp-5);
}
.dw-popover.dw-popover-floating.dw-popover-scrollable > .dw-popover-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: var(--dw-sp-4) var(--dw-sp-5);
  border-top: 1px solid var(--dw-outline);
  background: var(--dw-surface);
}

/* Ship 5.2 — Reset-all chip. Appears in the chip bar only when any
   filter is non-default. Muted style (ghost) so it doesn't compete
   with filter chips but stays visible for users who want to clear. */
.dw-filter-chip-reset {
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  display: none;  /* JS flips to inline-flex when active */
  align-items: center;
  gap: 4px;
}
.dw-filter-chip-reset:hover {
  border-color: var(--dw-alert);
  color: var(--dw-alert);
  border-style: solid;
}
.dw-filter-chip-reset.is-visible { display: inline-flex; }

/* Ship 5.5 — Save Search chip. Lives next to the Reset chip. Always
   visible (anon users get the signup-prompt flow on click). Bookmark
   icon + "Save" label, slightly more prominent than Reset to invite
   the action. Hover lifts to brand sky color. */
.dw-filter-chip-save {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dw-filter-chip-save:hover {
  border-color: var(--dw-sky);
  color: var(--dw-sky);
  background: rgba(82, 145, 244, 0.06);
}
.dw-filter-chip-save svg { stroke-width: 2; }

/* Share chip mirrors the Save chip dimensions / interactions. */
.dw-filter-chip-share {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dw-dur-snap) var(--dw-ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dw-filter-chip-share:hover {
  border-color: var(--dw-sky);
  color: var(--dw-sky);
  background: rgba(82, 145, 244, 0.06);
}
.dw-filter-chip-share svg { stroke-width: 2; }
.dw-filter-chip-save.is-saved {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
  color: #fff;
}

/* Ship 5.6a — NLS search input states + chip-fill animation.
   When a query is being parsed, the input shows a subtle pulse on its
   right edge. When parse completes and chips get auto-filled, those
   chips briefly highlight with a soft sky-blue ring so the user sees
   what the AI understood. */
.dw-filter-search.is-nls-thinking .dw-filter-search-input {
  background-image: linear-gradient(90deg, transparent, var(--dw-sky), transparent);
  background-size: 60px 2px;
  background-repeat: no-repeat;
  background-position: -60px 100%;
  animation: dw-nls-shimmer 1.2s linear infinite;
  cursor: progress;
}
@keyframes dw-nls-shimmer {
  to { background-position: calc(100% + 60px) 100%; }
}
.dw-filter-chip.is-nls-filled {
  animation: dw-nls-chip-pulse 1.4s var(--dw-ease) both;
  box-shadow: 0 0 0 0 var(--dw-sky);
}
@keyframes dw-nls-chip-pulse {
  0% { box-shadow: 0 0 0 0 rgba(82, 145, 244, 0.55), 0 0 0 0 rgba(82, 145, 244, 0); }
  35% { box-shadow: 0 0 0 4px rgba(82, 145, 244, 0.45), 0 0 12px 2px rgba(82, 145, 244, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(82, 145, 244, 0), 0 0 0 0 rgba(82, 145, 244, 0); }
}

/* Ship 5.5 — input field labels (used by Save Search modal; reusable
   anywhere a labeled <input> needs the brand-consistent caption.) */
.dw-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dw-text-3);
  margin-bottom: 6px;
}

/* Backdrop click-to-close */
.dw-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: transparent;
}

.dw-filter-chip-wrap { position: relative; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER POPOVERS — MOBILE BOTTOM SHEET (Ship 5.3a)
   Below 640px, filter popovers become iOS-style bottom sheets. Full-width,
   flex column, drag-handle up top, sticky Apply footer at bottom, scrollable
   body in between. Same DOM as desktop popovers; .dw-popover-sheet class
   swaps positioning + adds sheet chrome.
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .dw-popover-backdrop {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: dw-backdrop-fade-in 280ms var(--dw-ease-smooth);
  }
  .dw-popover-backdrop.is-closing {
    animation: dw-backdrop-fade-out 240ms var(--dw-ease-smooth) forwards;
  }
  .dw-popover.dw-popover-sheet {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    border: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: dw-sheet-in 320ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  .dw-popover.dw-popover-sheet.is-closing {
    animation: dw-sheet-out 240ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }
  /* Drag handle — visual pill + generous tap target for swipe-to-close */
  .dw-sheet-handle {
    padding: 10px 0 8px;
    display: flex;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
  }
  .dw-sheet-handle-bar {
    width: 36px;
    height: 5px;
    border-radius: 3px;
    background: var(--dw-outline-strong);
    opacity: 0.7;
  }
  /* Scrollable body between handle and footer */
  .dw-sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--dw-sp-5) var(--dw-sp-4);
  }
  /* Title row: bigger + bolder on mobile, acts as sheet header */
  .dw-popover.dw-popover-sheet .dw-popover-head {
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dw-text);
    padding: var(--dw-sp-2) 0 var(--dw-sp-4);
    margin-bottom: var(--dw-sp-3);
    border-bottom: 0.5px solid var(--dw-outline);
  }
  /* Touch-sized controls */
  .dw-popover.dw-popover-sheet .dw-popover-pill {
    padding: 11px 18px;
    font-size: 14px;
    min-height: 42px;
  }
  .dw-popover.dw-popover-sheet .dw-popover-status-opt {
    padding: 14px 16px;
    font-size: 15px;
  }
  .dw-popover.dw-popover-sheet .dw-slider {
    margin-top: var(--dw-sp-4);
    margin-bottom: var(--dw-sp-4);
  }
  .dw-popover.dw-popover-sheet .dw-slider-handle {
    height: 48px;  /* bigger touch target for iOS */
  }
  /* Footer: sticky bottom, safe-area-aware */
  .dw-popover.dw-popover-sheet .dw-popover-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: var(--dw-sp-4) var(--dw-sp-5);
    padding-bottom: max(var(--dw-sp-4), env(safe-area-inset-bottom));
    border-top: 1px solid var(--dw-outline);
    background: var(--dw-surface);
  }
  .dw-popover.dw-popover-sheet .dw-popover-footer .dw-btn-primary {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
  }
}

@keyframes dw-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes dw-sheet-out {
  to { transform: translateY(100%); }
}
@keyframes dw-backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dw-backdrop-fade-out {
  to { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER
═══════════════════════════════════════════════════════════════════════════ */
.dw-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  z-index: 150;
  background: var(--dw-surface);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform var(--dw-dur-smooth) var(--dw-ease-smooth);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* M-Mob-5: stop scroll chain into body when reaching drawer scroll edges */
  overscroll-behavior: contain;
  /* Safe-area pad so the bottom CTA sits above the home indicator */
  padding-bottom: env(safe-area-inset-bottom);
}
.dw-mobile-drawer.open { transform: translateX(0); }

.dw-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 149;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dw-dur) var(--dw-ease);
}
.dw-mobile-backdrop.open { opacity: 1; pointer-events: auto; }

.dw-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--dw-sp-5);
  border-bottom: 1px solid var(--dw-outline);
}
.dw-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dw-mist);
  border: none;
  color: var(--dw-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dw-drawer-close svg { width: 18px; height: 18px; }

.dw-drawer-body { padding: var(--dw-sp-4); flex: 1; }

.dw-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--dw-sp-4);
  color: var(--dw-text);
  font-size: 17px;
  font-weight: 500;
  border-radius: var(--dw-radius);
  transition: background var(--dw-dur-snap) var(--dw-ease);
}
.dw-drawer-link:hover { background: var(--dw-mist); color: var(--dw-text); }
.dw-drawer-link svg { width: 22px; height: 22px; color: var(--dw-text-3); }

.dw-drawer-divider { height: 0.5px; background: var(--dw-outline); margin: var(--dw-sp-4); }

.dw-drawer-cta {
  padding: var(--dw-sp-4) var(--dw-sp-5) var(--dw-sp-6);
  border-top: 1px solid var(--dw-outline);
}
.dw-drawer-cta .dw-btn { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   M-Mob-6: NATIVE-APP BOTTOM TAB NAV
   Persistent 5-tab bar at the bottom on mobile only, mirroring Atlas's
   pattern. Hidden on desktop (≥901px) and on Home Match (.dw-body-match)
   which is intentionally immersive. Tabs: Home / Search / Match / Saved
   / More. The More tab opens the existing right-slide drawer (which
   takes over the hamburger's job — hamburger is hidden on mobile).
═══════════════════════════════════════════════════════════════════════════ */
.dw-bottom-nav {
  display: none;
}
@media (max-width: 900px) {
  body:not(.dw-body-match) .dw-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: var(--dw-surface);
    border-top: 0.5px solid var(--dw-outline);
    box-shadow: 0 -2px 12px rgba(20, 32, 50, 0.06);
    /* Backdrop blur so semi-translucent over photos/maps still feels native */
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    /* Pad bottom for the home indicator on iPhone X+ */
    padding-bottom: env(safe-area-inset-bottom);
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    min-height: 56px;
    color: var(--dw-text-3);
    background: transparent;
    border: none;
    text-decoration: none;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 160ms var(--dw-ease);
    -webkit-tap-highlight-color: transparent;
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab svg {
    width: 22px;
    height: 22px;
    transition: transform 200ms var(--dw-ease-smooth);
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab.is-active {
    color: var(--dw-sky);
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab.is-active svg {
    transform: translateY(-1px) scale(1.06);
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab:active svg {
    transform: scale(0.92);
  }
}
[data-theme="dark"] .dw-bottom-nav {
  background: rgba(14, 21, 32, 0.86);
}

/* M-Mob-6: when the bottom nav is shown, the body needs padding so the
   footer doesn't hide under the nav. Approx nav height = 56px + safe-area. */
@media (max-width: 900px) {
  body:not(.dw-body-match) {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
  /* Hamburger goes away on mobile — More tab does its job. Drawer is still
     opened by dwMobileMenuToggle() from the More tab button. */
  body:not(.dw-body-match) .dw-mobile-menu-btn { display: none; }
  /* Floating /search list↔map pill must stack above the nav, not under it.
     Override the M-Mob-2 bottom rule. */
  body.dw-searchpage .dw-mob-view-pill {
    bottom: calc(56px + 16px + env(safe-area-inset-bottom));
  }
  /* Listing-detail sticky CTA bar stacks above the nav too. */
  body.dw-listingpage .dw-listing-cta-bar {
    bottom: calc(56px + env(safe-area-inset-bottom));
    /* The CTA bar already pads its inner content; reset the safe-area
       absorption since the nav now handles it. */
    padding-bottom: 10px;
  }
  /* Listing /search list-wrap was padded so the pill doesn't overlay the
     last card. With the pill now higher, bump the padding too. */
  body.dw-searchpage .dw-results-list-wrap {
    padding-bottom: calc(56px + 80px + env(safe-area-inset-bottom));
  }
  /* Listing detail body padding (M-Mob-5) accounted for the CTA bar at
     bottom:0. With the CTA now above the nav, bump the body pad to clear
     both bars. */
  body.dw-listingpage {
    padding-bottom: calc(56px + 80px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPEED-TO-LEAD CTAs (2026-05-16)
   Header: pill-shaped click-to-call beside the theme toggle. Mobile: hides
   the text label and keeps just the phone icon to save space.
   Floating "Talk to an agent" FAB: bottom-right on every page except the
   immersive Home Match deck. Stacks above the mobile bottom nav.
═══════════════════════════════════════════════════════════════════════════ */
.dw-call-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--dw-text-2, #445B69);
  background: rgba(110, 181, 233, 0.10);
  border: 1px solid rgba(110, 181, 233, 0.28);
  font-family: var(--dw-font-display, inherit);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 160ms var(--dw-ease, ease), border-color 160ms var(--dw-ease, ease), transform 100ms var(--dw-ease, ease);
  white-space: nowrap;
}
.dw-call-cta:hover {
  background: rgba(110, 181, 233, 0.18);
  border-color: rgba(110, 181, 233, 0.45);
}
.dw-call-cta:active { transform: scale(0.97); }
.dw-call-cta svg { color: var(--dw-sky, #6EB5E9); flex-shrink: 0; }
[data-theme="dark"] .dw-call-cta {
  color: var(--dw-text-2, #C2CCD6);
  background: rgba(110, 181, 233, 0.14);
  border-color: rgba(110, 181, 233, 0.32);
}
@media (max-width: 760px) {
  .dw-call-cta-label { display: none; }
  .dw-call-cta { padding: 8px 10px; }
}

/* Floating Call FAB — bottom-right pill, glassy sky gradient, never
   over Home Match deck. Stacks above bottom nav on mobile. */
.dw-call-fab {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #6EB5E9 0%, #5AA1D9 100%);
  font-family: var(--dw-font-display, inherit);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.005em;
  box-shadow:
    0 12px 32px rgba(110, 181, 233, 0.42),
    0 4px 12px rgba(28, 37, 48, 0.10);
  transition: transform 140ms var(--dw-ease, ease), box-shadow 200ms var(--dw-ease, ease);
}
.dw-call-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(110, 181, 233, 0.52),
    0 6px 16px rgba(28, 37, 48, 0.14);
}
.dw-call-fab:active { transform: translateY(0) scale(0.97); }
.dw-call-fab svg { flex-shrink: 0; }
/* Hide on the Home Match immersive deck */
body.dw-body-match .dw-call-fab { display: none; }
@media (max-width: 900px) {
  .dw-call-fab {
    /* Sit above the mobile bottom nav (56px + safe-area). */
    bottom: calc(56px + 16px + env(safe-area-inset-bottom));
    right: 14px;
    padding: 12px 16px;
    font-size: 13px;
  }
  /* On listing pages the listing-cta-bar already sits above the nav,
     so push our fab another 60px to clear it. */
  body.dw-listingpage .dw-call-fab {
    bottom: calc(56px + 80px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   /SELL-NOW — Sprint 2 seller funnel (2026-05-16)
   Hero + how-it-works + modal overlay with 4-step progressive funnel.
═══════════════════════════════════════════════════════════════════════════ */
.dw-sn-hero {
  position: relative;
  padding: var(--dw-sp-16) var(--dw-sp-6) var(--dw-sp-12);
  overflow: hidden;
  text-align: center;
}
.dw-sn-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(110, 181, 233, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(245, 166, 35, 0.12) 0%, transparent 55%);
  z-index: 0;
}
.dw-sn-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.dw-sn-title { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin-bottom: 20px; letter-spacing: -0.02em; }
.dw-sn-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 17px;
  padding: 18px 28px;
}
.dw-sn-trust-row {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
}
.dw-sn-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dw-text-3);
  font-weight: 500;
}
.dw-sn-trust svg { color: var(--dw-sky); flex-shrink: 0; }

.dw-sn-howit { padding: var(--dw-sp-12) var(--dw-sp-6); background: var(--dw-mist); }
[data-theme="dark"] .dw-sn-howit { background: var(--dw-surface-elevated); }
.dw-sn-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 760px) { .dw-sn-steps { grid-template-columns: 1fr; gap: 24px; } }
.dw-sn-step {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
}
.dw-sn-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #6EB5E9, #5AA1D9);
  color: #fff;
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.dw-sn-step .dw-h3 { margin-bottom: 8px; }
.dw-sn-step p { color: var(--dw-text-3); font-size: 14px; line-height: 1.55; margin: 0; }

/* Modal overlay */
.dw-sn-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.dw-sn-modal.is-open { display: flex; }
.dw-sn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 37, 48, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dwSnFadeIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dwSnFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dwSnCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dw-sn-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--dw-surface);
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(28, 37, 48, 0.20), 0 8px 20px rgba(28, 37, 48, 0.08);
  animation: dwSnCardIn 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-sn-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--dw-mist);
  color: var(--dw-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms;
}
.dw-sn-close:hover { background: var(--dw-outline); }
.dw-sn-progress {
  height: 4px;
  background: var(--dw-outline);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.dw-sn-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6EB5E9, #F5A623);
  width: 12%;
  transition: width 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-sn-step-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--dw-text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.dw-sn-step-body { transition: opacity 180ms ease; }
.dw-sn-step-body.is-fading { opacity: 0; }

.dw-sn-step-title {
  font-family: var(--dw-font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--dw-text-1);
  letter-spacing: -0.01em;
}
.dw-sn-step-sub {
  color: var(--dw-text-3);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 22px;
}

.dw-sn-field { margin-bottom: 18px; }
.dw-sn-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--dw-text-2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.dw-sn-input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--dw-outline);
  background: var(--dw-surface);
  color: var(--dw-text-1);
  transition: border-color 160ms, box-shadow 160ms;
  -webkit-appearance: none;
  appearance: none;
}
.dw-sn-input:focus {
  outline: none;
  border-color: var(--dw-sky);
  box-shadow: 0 0 0 3px rgba(110, 181, 233, 0.18);
}

.dw-sn-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dw-sn-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dw-mist);
  border-radius: 12px;
  padding: 4px;
}
.dw-sn-stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--dw-surface);
  color: var(--dw-text-1);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms;
}
.dw-sn-stepper-btn:hover { background: rgba(110, 181, 233, 0.12); }
.dw-sn-stepper-val {
  flex: 1;
  text-align: center;
  font-family: var(--dw-font-display);
  font-size: 17px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--dw-text-1);
  -moz-appearance: textfield;
}
.dw-sn-stepper-val::-webkit-outer-spin-button,
.dw-sn-stepper-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.dw-sn-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dw-sn-pill {
  flex: 1 1 calc(50% - 4px);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--dw-outline);
  background: var(--dw-surface);
  color: var(--dw-text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms;
}
.dw-sn-pill:hover {
  background: rgba(110, 181, 233, 0.06);
  border-color: var(--dw-sky);
}
.dw-sn-pill.is-selected {
  background: var(--dw-sky);
  border-color: var(--dw-sky);
  color: #fff;
}

.dw-sn-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dw-sn-tl-pill {
  display: block;
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--dw-outline);
  background: var(--dw-surface);
  color: var(--dw-text-1);
  font-family: inherit;
  cursor: pointer;
  transition: all 180ms;
}
.dw-sn-tl-pill:hover {
  border-color: var(--dw-sky);
  background: rgba(110, 181, 233, 0.06);
  transform: translateY(-1px);
}
.dw-sn-tl-title { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.dw-sn-tl-sub { font-size: 12px; color: var(--dw-text-3); }

.dw-sn-next {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 15px;
}
.dw-sn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dw-sn-tcpa {
  font-size: 11px;
  color: var(--dw-text-3);
  line-height: 1.5;
  margin-top: 14px;
  text-align: center;
}

/* AVM reveal — dramatic but tasteful */
.dw-sn-avm-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dw-sky);
  text-align: center;
  margin-bottom: 8px;
}
.dw-sn-avm-range {
  font-family: var(--dw-font-display);
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #6EB5E9, #F5A623);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: dwSnAvmIn 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dwSnAvmIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dw-sn-avm-mid {
  text-align: center;
  font-size: 14px;
  color: var(--dw-text-2);
  margin-bottom: 12px;
}
.dw-sn-avm-comps {
  text-align: center;
  font-size: 13px;
  color: var(--dw-text-3);
  margin-bottom: 18px;
}
.dw-sn-avm-note {
  background: var(--dw-mist);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--dw-text-2);
  margin-bottom: 20px;
}

.dw-sn-success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: #1F7F44;
  animation: dwSnAvmIn 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-sn-success-check svg { width: 100%; height: 100%; }
.dw-sn-secondary {
  display: block;
  margin: 20px auto 0;
  padding: 12px 24px;
  border: 1px solid var(--dw-outline);
  background: var(--dw-surface);
  color: var(--dw-text-2);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms;
}
.dw-sn-secondary:hover { background: var(--dw-mist); }

/* ═══════════════════════════════════════════════════════════════════════════
   LENDER PAGE (/mortgage)
═══════════════════════════════════════════════════════════════════════════ */
.dw-lender-hero {
  position: relative;
  padding: var(--dw-sp-16) var(--dw-sp-6) var(--dw-sp-12);
  overflow: hidden;
}
.dw-lender-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(110, 181, 233, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(245, 166, 35, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, var(--dw-bg) 0%, var(--dw-mist) 100%);
  z-index: -1;
}

.dw-lender-hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--dw-sp-12);
  align-items: center;
}
@media (max-width: 900px) {
  .dw-lender-hero-inner { grid-template-columns: 1fr; gap: var(--dw-sp-8); }
  .dw-lender-hero-card { max-width: 400px; margin: 0 auto; }
}

.dw-lender-hero-title {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
  margin: var(--dw-sp-3) 0 var(--dw-sp-4);
  line-height: 1;
}
.dw-lender-hero-lede { max-width: 520px; font-size: clamp(16px, 1.4vw, 18px); }
.dw-lender-hero-ctas {
  display: flex;
  gap: var(--dw-sp-3);
  margin-top: var(--dw-sp-5);
  flex-wrap: wrap;
}

.dw-lender-hero-proof {
  display: flex;
  align-items: center;
  gap: var(--dw-sp-5);
  margin-top: var(--dw-sp-6);
  flex-wrap: wrap;
  padding-top: var(--dw-sp-5);
  border-top: 0.5px solid var(--dw-outline);
}
.dw-lender-proof-stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dw-gold);
  font-size: 16px;
  letter-spacing: 1px;
}
.dw-lender-proof-num {
  color: var(--dw-text);
  font-weight: 700;
  font-family: var(--dw-font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.dw-lender-proof-label {
  color: var(--dw-text-3);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.dw-lender-proof-nmls {
  color: var(--dw-text-3);
  font-size: 12px;
  font-family: var(--dw-font-mono);
}

.dw-lender-hero-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  box-shadow: var(--dw-shadow-lg);
}
.dw-lender-photo-wrap {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, var(--dw-slate-soft) 100%);
  overflow: hidden;
}
.dw-lender-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.dw-lender-card-body { padding: var(--dw-sp-5); }
.dw-lender-card-name {
  font-family: var(--dw-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--dw-text);
}
.dw-lender-card-title {
  font-size: 13px;
  color: var(--dw-sky);
  font-weight: 600;
  margin-top: 2px;
}
.dw-lender-card-company {
  font-size: 12px;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-top: 6px;
}
.dw-lender-card-contact {
  margin-top: var(--dw-sp-4);
  padding-top: var(--dw-sp-4);
  border-top: 0.5px solid var(--dw-outline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dw-lender-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dw-text-2);
  text-decoration: none;
  line-height: 1.35;
}
a.dw-lender-contact-row { color: var(--dw-text); }
a.dw-lender-contact-row:hover { color: var(--dw-sky); }
.dw-lender-contact-row svg { color: var(--dw-text-3); flex-shrink: 0; }

/* Loan programs grid */
.dw-lender-programs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--dw-sp-5);
}
.dw-lender-program {
  display: flex;
  gap: 14px;
  padding: var(--dw-sp-5);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  transition: all var(--dw-dur) var(--dw-ease);
}
.dw-lender-program:hover {
  border-color: var(--dw-sky);
  transform: translateY(-2px);
  box-shadow: var(--dw-shadow-md);
}
.dw-lender-program-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dw-sky-soft);
  color: var(--dw-sky);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dw-lender-program-label {
  font-family: var(--dw-font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  margin: 0 0 4px;
}
.dw-lender-program-desc {
  font-size: 13px;
  color: var(--dw-text-2);
  line-height: 1.5;
  margin: 0;
}

/* Calculator */
.dw-section-calc { background: var(--dw-mist); }
.dw-calc-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  overflow: hidden;
  box-shadow: var(--dw-shadow-md);
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 800px) { .dw-calc-card { grid-template-columns: 1fr; } }

.dw-calc-inputs {
  padding: var(--dw-sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-5);
}
.dw-calc-field { display: flex; flex-direction: column; gap: 8px; }
.dw-calc-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dw-calc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--dw-sp-4); }
.dw-calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.dw-calc-prefix {
  position: absolute;
  left: 14px;
  color: var(--dw-text-3);
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
}
.dw-calc-suffix {
  position: absolute;
  right: 14px;
  color: var(--dw-text-3);
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
}
.dw-calc-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 28px;
  background: var(--dw-mist);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  color: var(--dw-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  box-sizing: border-box;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-calc-input-wrap input:focus {
  border-color: var(--dw-sky);
  background: var(--dw-surface);
  box-shadow: var(--dw-shadow-focus);
}
.dw-calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--dw-stone);
  border-radius: 2px;
  outline: none;
  margin-top: 4px;
}
.dw-calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--dw-sky);
  border-radius: 50%;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(110,181,233,0.4);
  transition: transform var(--dw-dur-snap) var(--dw-ease);
}
.dw-calc-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.dw-calc-slider::-moz-range-thumb {
  width: 20px; height: 20px; background: var(--dw-sky); border-radius: 50%;
  border: 3px solid #fff; cursor: pointer;
}

.dw-calc-results {
  padding: var(--dw-sp-8) var(--dw-sp-6);
  background: linear-gradient(145deg, var(--dw-slate) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.dw-calc-results .dw-eyebrow {
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.dw-calc-total {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-bottom: var(--dw-sp-5);
}
.dw-calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--dw-sp-4) 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  margin-bottom: var(--dw-sp-5);
}
.dw-calc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.dw-calc-line strong {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dw-calc-cta { width: 100%; background: var(--dw-sky); color: #fff; }
.dw-calc-cta:hover { background: var(--dw-sky-hover); color: #fff; }
.dw-calc-note {
  margin: 12px 0 0;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* Testimonials */
.dw-section-testimonials { background: var(--dw-mist); }
.dw-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--dw-sp-5);
  max-width: 1080px;
  margin: 0 auto;
}
.dw-testimonial {
  padding: var(--dw-sp-6);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  margin: 0;
}
.dw-testimonial-stars {
  color: var(--dw-gold);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: var(--dw-sp-3);
}
.dw-testimonial-quote {
  font-family: var(--dw-font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--dw-text);
  margin: 0 0 var(--dw-sp-3);
  letter-spacing: -0.005em;
}
.dw-testimonial-author {
  font-size: 13px;
  color: var(--dw-text-3);
  font-weight: 500;
}

/* Pre-approval card */
.dw-section-preapp { background: var(--dw-bg); }
.dw-preapp-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--dw-sp-8);
  padding: var(--dw-sp-10);
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, var(--dw-gold-soft) 100%);
  border-radius: var(--dw-radius-lg);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .dw-preapp-card { grid-template-columns: 1fr; gap: var(--dw-sp-6); padding: var(--dw-sp-6); }
}

.dw-preapp-bullets {
  list-style: none;
  padding: 0;
  margin: var(--dw-sp-5) 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dw-preapp-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--dw-text);
}
.dw-preapp-bullets li svg {
  color: var(--dw-sky);
  flex-shrink: 0;
  margin-top: 2px;
}

.dw-preapp-form {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  padding: var(--dw-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-3);
  box-shadow: var(--dw-shadow-md);
}
.dw-preapp-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--dw-sp-3); }
@media (max-width: 460px) { .dw-preapp-row { grid-template-columns: 1fr; } }
.dw-preapp-field { display: flex; flex-direction: column; gap: 6px; }
.dw-preapp-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dw-preapp-privacy {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--dw-text-3);
  text-align: center;
}

/* RESPA disclaimer */
.dw-respa {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--dw-sp-4) var(--dw-sp-5);
  background: var(--dw-mist);
  border: 0.5px solid var(--dw-outline);
  border-radius: var(--dw-radius);
  font-size: 12px;
  line-height: 1.55;
  color: var(--dw-text-3);
}
.dw-respa strong {
  color: var(--dw-text-2);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATTORNEY PAGE (/attorney) — extends lender page styles
═══════════════════════════════════════════════════════════════════════════ */
.dw-castle-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dw-text-3);
}

.dw-attorney-stack {
  display: flex;
  flex-direction: column;
  gap: var(--dw-sp-8);
  max-width: 1080px;
  margin: 0 auto;
}

.dw-attorney-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--dw-sp-6);
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: var(--dw-radius-lg);
  padding: var(--dw-sp-6);
  transition: border-color var(--dw-dur) var(--dw-ease), box-shadow var(--dw-dur) var(--dw-ease);
}
.dw-attorney-card:hover {
  border-color: var(--dw-outline-strong);
  box-shadow: var(--dw-shadow-md);
}
@media (max-width: 760px) {
  .dw-attorney-card { grid-template-columns: 1fr; }
  .dw-attorney-card .dw-attorney-photo-wrap { max-width: 240px; margin: 0 auto; }
}

.dw-attorney-photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--dw-radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--dw-sky-soft) 0%, var(--dw-slate-soft) 100%);
}
.dw-attorney-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.dw-attorney-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: var(--dw-sky);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--dw-radius-pill);
  box-shadow: 0 2px 8px rgba(110, 181, 233, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dw-attorney-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dw-attorney-name {
  font-family: var(--dw-font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dw-text);
  line-height: 1.1;
}
.dw-attorney-title {
  font-size: 14px;
  color: var(--dw-sky);
  font-weight: 600;
  margin-top: 4px;
}
.dw-attorney-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--dw-sp-3);
}
.dw-attorney-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dw-text-2);
  margin: var(--dw-sp-4) 0 var(--dw-sp-5);
}

.dw-attorney-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--dw-sp-5);
  padding-top: var(--dw-sp-5);
  border-top: 1px solid var(--dw-outline);
}
@media (max-width: 560px) {
  .dw-attorney-facts { grid-template-columns: 1fr; }
}

.dw-attorney-fact-block .dw-eyebrow {
  margin-bottom: var(--dw-sp-2);
}
.dw-attorney-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dw-text-2);
}
.dw-attorney-list li {
  padding-left: 10px;
  position: relative;
}
.dw-attorney-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--dw-text-3);
  font-weight: 700;
}
.dw-attorney-list-compact li {
  padding: 2px 0 2px 10px;
}

/* Process steps */
.dw-process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}
.dw-process-steps::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(180deg, var(--dw-sky) 0%, var(--dw-sky-soft) 50%, transparent 100%);
  border-radius: 1px;
}
.dw-process-step {
  display: flex;
  gap: var(--dw-sp-5);
  align-items: flex-start;
  padding: var(--dw-sp-5) 0;
  position: relative;
}
.dw-process-num {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 10px rgba(110,181,233,0.3);
  z-index: 1;
  position: relative;
}
.dw-process-title {
  font-family: var(--dw-font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  margin: 0 0 4px;
}
.dw-process-desc {
  font-size: 14px;
  color: var(--dw-text-2);
  line-height: 1.55;
  margin: 0;
  max-width: 600px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH MODAL
═══════════════════════════════════════════════════════════════════════════ */
.dw-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(8, 12, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--dw-sp-4);
  animation: dw-auth-fade 200ms var(--dw-ease-smooth);
}
@keyframes dw-auth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dw-auth-modal {
  background: var(--dw-surface);
  border-radius: var(--dw-radius-lg);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--dw-shadow-xl);
  overflow: hidden;
  animation: dw-auth-pop 320ms var(--dw-ease-spring);
}
@keyframes dw-auth-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dw-auth-head {
  padding: var(--dw-sp-6) var(--dw-sp-6) var(--dw-sp-4);
  position: relative;
}
.dw-auth-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--dw-sp-4);
}
.dw-auth-mark img { width: 24px; height: 24px; filter: brightness(0) invert(1); opacity: 0.95; }

.dw-auth-title {
  font-family: var(--dw-font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--dw-text);
  margin: 0 0 4px;
  line-height: 1.15;
}
.dw-auth-sub {
  font-size: 13px;
  color: var(--dw-text-2);
  line-height: 1.5;
}
.dw-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dw-mist);
  border: none;
  color: var(--dw-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dw-auth-close:hover { background: var(--dw-slate-soft); color: var(--dw-text); }

.dw-auth-body { padding: 0 var(--dw-sp-6) var(--dw-sp-6); }

.dw-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dw-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dw-auth-error {
  padding: 10px 14px;
  background: var(--dw-alert-soft);
  color: var(--dw-alert);
  border-radius: var(--dw-radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  display: none;
}
.dw-auth-error.show { display: block; animation: dw-msg-in 200ms var(--dw-ease-smooth); }

.dw-auth-footer {
  padding: var(--dw-sp-4) var(--dw-sp-6);
  background: var(--dw-mist);
  border-top: 1px solid var(--dw-outline);
  text-align: center;
  font-size: 13px;
  color: var(--dw-text-2);
}
.dw-auth-footer a {
  color: var(--dw-sky);
  font-weight: 600;
  cursor: pointer;
}

.dw-auth-prompt-reason {
  padding: 10px 14px;
  background: var(--dw-gold-soft);
  border-radius: var(--dw-radius-sm);
  font-size: 13px;
  color: var(--dw-text);
  margin-bottom: var(--dw-sp-4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}
.dw-auth-prompt-reason svg { flex-shrink: 0; color: var(--dw-gold); margin-top: 1px; }

/* ───────────── SAVE / FAVORITE BUTTON (listing detail pricerow) ───────────── */
.dw-fav-btn.is-favorited {
  background: var(--dw-gold-soft);
  border-color: var(--dw-gold);
  color: var(--dw-gold);
}
.dw-fav-btn.is-favorited .dw-fav-btn-icon {
  fill: var(--dw-gold);
  animation: dw-fav-pop 400ms var(--dw-ease-spring);
}
.dw-fav-btn-icon { transition: fill var(--dw-dur-snap) var(--dw-ease); }

/* ───────────── TOAST ───────────── */
.dw-toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 190;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.dw-toast {
  background: var(--dw-graphite);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--dw-radius-pill);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--dw-shadow-lg);
  animation: dw-toast-in 280ms var(--dw-ease-spring);
  pointer-events: auto;
}
[data-theme="dark"] .dw-toast { background: var(--dw-surface-raised); color: var(--dw-text); border: 1px solid var(--dw-outline); }
@keyframes dw-toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ───────────── ACCESSIBILITY ───────────── */
*:focus-visible {
  outline: 2px solid var(--dw-sky);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Ship 7i fix: the universal a11y focus ring above double-stacks against
   containers that already have a :focus-within treatment (hero search,
   filter bar). Suppress the inner outline for inputs whose parent owns
   the focus state — user still sees one clean ring on the outer pill. */
.dw-hero-search-input:focus-visible,
.dw-filter-search-input:focus-visible {
  outline: none;
}

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

/* ───────────── NO-PHOTO PLACEHOLDER (cards + detail gallery) ─────────
   Used when a listing has no R2 photos yet — Coming Soon listings
   pre-launch, brand-new MRED entries that haven't drained, or new
   construction / pre-list. Subtle, brand-tinted, "intentional empty
   state" rather than a broken image. */
.dw-no-photo {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--dw-accent) 4%, var(--dw-surface-2)),
    var(--dw-surface-2));
  color: var(--dw-text-3);
  text-align: center;
  padding: 18px 14px;
}
.dw-no-photo svg {
  color: color-mix(in srgb, var(--dw-accent) 70%, var(--dw-text-3));
  opacity: 0.75;
}
.dw-no-photo-label {
  font-family: var(--dw-font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--dw-text-2);
}
/* Detail-page variant — bigger, still uses gallery aspect ratio. */
.dw-no-photo-detail {
  position: relative;
  inset: auto;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  border-radius: var(--dw-radius-lg);
  border: 1px dashed var(--dw-outline);
  margin-bottom: var(--dw-sp-6);
}
.dw-no-photo-detail .dw-no-photo-label { font-size: 14px; }
.dw-no-photo-detail svg { width: 56px; height: 56px; }

/* ───────────── SHIP 7B: SOLD (CLOSED) DETAIL TREATMENT ───────────── */
.dw-sold-empty-photos {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  background: var(--dw-surface-2);
  border-radius: var(--dw-radius-lg);
  display: grid;
  place-items: center;
  color: var(--dw-text-3);
  border: 1px dashed var(--dw-outline);
  margin-bottom: var(--dw-sp-6);
}
.dw-sold-empty-inner {
  text-align: center;
  max-width: 360px;
  padding: var(--dw-sp-4);
}
.dw-sold-empty-title {
  font-family: var(--dw-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dw-text);
  margin: var(--dw-sp-3) 0 4px;
}
.dw-sold-empty-sub {
  font-size: 13px;
  line-height: 1.5;
}
.dw-sold-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--dw-closed-soft);
  border-left: 3px solid var(--dw-closed);
  border-radius: var(--dw-radius-md);
  color: var(--dw-text);
  margin-bottom: var(--dw-sp-4);
}
.dw-sold-banner svg {
  flex-shrink: 0;
  color: var(--dw-closed);
  margin-top: 2px;
}
.dw-sold-banner-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.dw-sold-banner-sub {
  font-size: 12.5px;
  color: var(--dw-text-2);
}
.dw-sold-price-block .dw-sold-price-context {
  font-size: 13px;
  color: var(--dw-text-2);
  margin-top: 4px;
  line-height: 1.5;
}
.dw-sold-price-block strong {
  color: var(--dw-text);
  font-weight: 600;
}
.dw-price-drop-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  background: var(--dw-active-soft);
  color: var(--dw-active);
  border-radius: var(--dw-radius-pill);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   BUYER INQUIRY MODAL (listing detail) — Ship 2026-04-23
   Rips the fake form that lost leads. Modal overlay for showing/
   buyer-agent requests that routes through dwello round-robin.
   ═══════════════════════════════════════════════════════════════ */
.dw-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: dw-modal-fade 160ms var(--dw-ease-smooth);
}
@keyframes dw-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dw-modal-box {
  background: var(--dw-surface);
  border-radius: 14px;
  padding: 28px 22px 22px;
  width: 100%; max-width: 480px;
  position: relative;
  box-shadow: var(--dw-shadow-lg);
  animation: dw-modal-rise 220ms var(--dw-ease-smooth);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
@keyframes dw-modal-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dw-modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px;
  background: transparent; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--dw-text-3);
  border-radius: 50%;
  transition: background var(--dw-dur-snap);
}
.dw-modal-close:hover { background: var(--dw-surface-2); color: var(--dw-text); }

/* ─────────── Schedule Showing (Zillow-style) ───────────
   Day chip row (horizontal scroll), time-of-day pills, mode tiles,
   success card with Sadie countdown pulse.
   Used by dwScheduleShowingOpen in dwello.js. */
.dw-ds-box { max-width: 560px; }
.dw-ds-section-label {
  font-family: var(--dw-font-display, var(--dw-font-body));
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--dw-text-2);
  margin-bottom: 8px;
}
.dw-ds-day-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  padding-bottom: 6px;
  margin: 0 -4px;
  padding-left: 4px; padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.dw-ds-day-row::-webkit-scrollbar { height: 4px; }
.dw-ds-day-row::-webkit-scrollbar-thumb { background: var(--dw-outline); border-radius: 4px; }
.dw-ds-chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  min-width: 72px;
  padding: 10px 12px;
  border: 1.5px solid var(--dw-outline);
  border-radius: 12px;
  background: var(--dw-surface);
  color: var(--dw-text);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color 160ms var(--dw-ease-smooth), background 160ms var(--dw-ease-smooth), transform 80ms var(--dw-ease-smooth);
}
.dw-ds-chip-top {
  font-family: var(--dw-font-display, var(--dw-font-body));
  font-size: 13px; font-weight: 600;
  color: var(--dw-text);
}
.dw-ds-chip-bot {
  font-size: 12px; color: var(--dw-text-3);
  font-variant-numeric: tabular-nums;
}
.dw-ds-chip:hover { border-color: var(--dw-accent); }
.dw-ds-chip:active { transform: scale(0.97); }
.dw-ds-chip.is-weekend .dw-ds-chip-top { color: var(--dw-accent); }
.dw-ds-chip.is-selected {
  border-color: var(--dw-accent);
  background: color-mix(in srgb, var(--dw-accent) 12%, var(--dw-surface));
  box-shadow: 0 0 0 1px var(--dw-accent) inset;
}
.dw-ds-chip.is-selected .dw-ds-chip-top { color: var(--dw-accent); }
.dw-ds-chip.is-selected .dw-ds-chip-bot { color: var(--dw-text); font-weight: 600; }

/* Time slot list — Calendly/OpenTable-style scrollable column.
   15-min granularity = 45 slots; wrap caps at ~280px so ~6 rows visible
   at once. Earliest-available (or pre-selected) slot is auto-scrolled
   to center on open via dwScheduleShowingRefreshSlots. */
.dw-ds-time-list-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1.5px solid var(--dw-outline);
  border-radius: 12px;
  background: var(--dw-surface);
  scrollbar-width: thin;
  scrollbar-color: var(--dw-outline) transparent;
}
.dw-ds-time-list-wrap::-webkit-scrollbar { width: 6px; }
.dw-ds-time-list-wrap::-webkit-scrollbar-thumb { background: var(--dw-outline); border-radius: 4px; }
.dw-ds-time-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dw-ds-time-list li { margin: 0; padding: 0; }
.dw-ds-time-row {
  display: flex; align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--dw-outline);
  color: var(--dw-text);
  cursor: pointer;
  font-family: var(--dw-font-display, var(--dw-font-body));
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  font-variant-numeric: tabular-nums;
  transition: background 120ms var(--dw-ease-smooth), color 120ms var(--dw-ease-smooth);
}
.dw-ds-time-list li:last-child .dw-ds-time-row { border-bottom: 0; }
.dw-ds-time-row:hover:not(.is-disabled) {
  background: color-mix(in srgb, var(--dw-accent) 7%, transparent);
}
.dw-ds-time-row.is-selected {
  background: color-mix(in srgb, var(--dw-accent) 14%, transparent);
  color: var(--dw-accent);
  font-weight: 700;
}
.dw-ds-time-row.is-selected .dw-ds-time-row-label::after {
  content: '✓';
  margin-left: 10px;
  color: var(--dw-accent);
  font-weight: 700;
}
.dw-ds-time-row.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--dw-text-3);
  text-decoration: line-through;
  text-decoration-color: var(--dw-text-3);
}
.dw-ds-time-list-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--dw-text-3);
}

.dw-ds-mode-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.dw-ds-mode {
  padding: 14px 10px;
  border: 1.5px solid var(--dw-outline);
  border-radius: 12px;
  background: var(--dw-surface);
  color: var(--dw-text);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color 160ms var(--dw-ease-smooth), background 160ms var(--dw-ease-smooth);
}
.dw-ds-mode-ico { font-size: 22px; line-height: 1; }
.dw-ds-mode-title {
  font-family: var(--dw-font-display, var(--dw-font-body));
  font-size: 14px; font-weight: 600;
}
.dw-ds-mode-sub { font-size: 11px; color: var(--dw-text-3); }
.dw-ds-mode:hover { border-color: var(--dw-accent); }
.dw-ds-mode.is-selected {
  border-color: var(--dw-accent);
  background: color-mix(in srgb, var(--dw-accent) 12%, var(--dw-surface));
  box-shadow: 0 0 0 1px var(--dw-accent) inset;
}
.dw-ds-mode.is-selected .dw-ds-mode-title { color: var(--dw-accent); }

/* Success card — shown after submit. Pulsing dot suggests a live process. */
.dw-ds-success-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px;
  border: 1.5px solid var(--dw-accent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--dw-accent) 8%, var(--dw-surface));
  text-align: left;
}
.dw-ds-success-pulse {
  flex: 0 0 auto;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dw-accent);
  position: relative;
  margin-top: 5px;
  box-shadow: 0 0 0 0 var(--dw-accent);
  animation: dw-ds-pulse 1.6s var(--dw-ease-smooth) infinite;
}
@keyframes dw-ds-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dw-accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 14px color-mix(in srgb, var(--dw-accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dw-accent) 0%, transparent); }
}
.dw-ds-success-title {
  font-family: var(--dw-font-display, var(--dw-font-body));
  font-weight: 600; font-size: 14px; color: var(--dw-text);
  margin-bottom: 2px;
}
.dw-ds-success-sub { font-size: 13px; color: var(--dw-text-2); line-height: 1.4; }

@media (max-width: 540px) {
  .dw-ds-time-list-wrap { max-height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-ds-success-pulse { animation: none; }
}

/* M-Mob-3: at ≤540px, .dw-modal-box (used by buyer-inquiry, agent-contact,
   saved-search) becomes a bottom sheet — same pattern as Stay Connected popup
   and Account upgrade modal. Slides up from bottom, full width, rounded only
   at top, safe-area-inset-bottom honored. */
@media (max-width: 540px) {
  .dw-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .dw-modal-box {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 22px 22px max(22px, env(safe-area-inset-bottom));
    max-height: 92dvh;
    animation: dw-modal-sheet-rise 280ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes dw-modal-sheet-rise {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* M-Mob-3: sticky bottom CTA bar on listing detail (mobile only).
   Without it, the user has to scroll all the way back up to the sidebar to
   contact dwello after browsing description/features/photos. Mirrors the
   Zillow/Redfin pattern — anchored price + primary "Schedule a showing"
   button. Hidden on desktop (sidebar suffices) and on Closed listings (the
   sidebar already pivots to "Get your home value" for those). */
.dw-listing-cta-bar {
  display: none;
}
@media (max-width: 900px) {
  body.dw-listingpage .dw-listing-cta-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 10px var(--dw-sp-4) calc(10px + env(safe-area-inset-bottom));
    background: var(--dw-surface);
    border-top: 0.5px solid var(--dw-outline);
    box-shadow: 0 -6px 20px rgba(20, 32, 50, 0.08);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    /* No standalone entrance animation. The View Transitions API root
       fade handles the page-entrance feel. A second slide-up here used
       to fight the VT — bar appeared in the new-page snapshot at final
       position, then jumped offscreen when the live DOM took over, then
       slid back up after a 200ms delay (the visible flicker). */
  }
  body.dw-listingpage .dw-listing-cta-price {
    flex: 1;
    min-width: 0;
  }
  body.dw-listingpage .dw-listing-cta-price-num {
    font-family: var(--dw-font-display, inherit);
    font-size: 18px;
    font-weight: 700;
    color: var(--dw-text);
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  body.dw-listingpage .dw-listing-cta-price-meta {
    font-size: 12px;
    color: var(--dw-text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.dw-listingpage .dw-listing-cta-btn {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 14px;
  }
  /* Push the page bottom up so the bar doesn't cover the last content section. */
  body.dw-listingpage .dw-listing-main { padding-bottom: 96px; }
}

/* Listed-by card (secondary CTA on listing detail — listing agent info) */
.dw-listed-by-card {
  background: var(--dw-surface);
  border: 1px solid var(--dw-outline);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.dw-listed-by-name {
  font-family: var(--dw-font-display, inherit);
  font-size: 16px;
  font-weight: 600;
  color: var(--dw-text);
  margin-top: 4px;
}
.dw-listed-by-office {
  font-size: 13px;
  color: var(--dw-text-2);
  margin-top: 2px;
}
.dw-listed-by-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.dw-btn-chip {
  display: inline-flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--dw-outline-strong);
  border-radius: var(--dw-radius-pill);
  color: var(--dw-text);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: all var(--dw-dur-snap) var(--dw-ease);
}
.dw-btn-chip:hover {
  background: var(--dw-surface-2);
  border-color: var(--dw-sky);
  color: var(--dw-sky);
}

/* ═══════════════════════════════════════════════════════════════════════
   Stay Connected popup (Ship 1) — soft-signup popup that fires after
   5 min on site OR 2nd unique page visit. Reuses .dw-auth-backdrop for
   the overlay; bespoke .dw-sc-modal for the panel itself (smaller +
   warmer than the auth modal, with sliding name fields).
   ═══════════════════════════════════════════════════════════════════════ */
.dw-sc-modal {
  background: var(--dw-surface);
  border-radius: var(--dw-radius-lg);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--dw-shadow-xl);
  overflow: hidden;
  animation: dw-auth-pop 320ms var(--dw-ease-spring);
  position: relative;
}
.dw-sc-head {
  padding: var(--dw-sp-6) var(--dw-sp-6) var(--dw-sp-2);
  position: relative;
}
.dw-sc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dw-sky);
  margin-bottom: 8px;
}
.dw-sc-title {
  font-family: var(--dw-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  line-height: 1.15;
  margin: 0 0 6px;
}
.dw-sc-sub {
  font-size: 14px;
  color: var(--dw-text-2);
  line-height: 1.5;
  margin: 0;
}
.dw-sc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--dw-text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease;
}
.dw-sc-close:hover {
  background: var(--dw-surface-2);
  color: var(--dw-text);
}
.dw-sc-perks {
  list-style: none;
  padding: 0;
  margin: var(--dw-sp-3) var(--dw-sp-6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dw-sc-perks li {
  font-size: 13px;
  color: var(--dw-text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-sc-perks li::before {
  content: '✓';
  color: var(--dw-sky);
  font-weight: 700;
  flex-shrink: 0;
}
.dw-sc-form {
  padding: var(--dw-sp-2) var(--dw-sp-6) var(--dw-sp-6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dw-sc-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.32, 0.72, 0, 1), opacity 220ms ease, margin 320ms cubic-bezier(0.32, 0.72, 0, 1);
  margin: 0;
}
.dw-sc-modal.is-name-revealed .dw-sc-name-row {
  max-height: 60px;
  opacity: 1;
  margin: 0 0 4px;
}

/* Lead-type radio cards — revealed when last name has typing input.
   Three side-by-side glass cards: Homeowner / First-Time / Investor.
   Single-select. SVG glyphs (not emoji) for clean cross-platform render.
   Accessibility: actual <input type="radio"> hidden behind labels. */
.dw-sc-leadtype-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 380ms cubic-bezier(0.32, 0.72, 0, 1),
              opacity 260ms ease 80ms,
              margin 380ms cubic-bezier(0.32, 0.72, 0, 1);
  margin: 0;
}
.dw-sc-modal.is-leadtype-revealed .dw-sc-leadtype-row {
  max-height: 130px;
  opacity: 1;
  margin: 4px 0;
}
.dw-sc-leadtype-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dw-text-3);
  margin-top: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.32, 0.72, 0, 1), opacity 220ms ease;
}
.dw-sc-modal.is-leadtype-revealed .dw-sc-leadtype-eyebrow {
  max-height: 24px;
  opacity: 1;
}
.dw-sc-leadtype-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 12px;
  background: var(--dw-surface-2, rgba(247, 249, 252, 0.6));
  border: 1px solid rgba(68, 91, 105, 0.12);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 220ms ease;
  user-select: none;
  font-family: inherit;
}
.dw-sc-leadtype-card:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 181, 233, 0.45);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(27, 79, 138, 0.10);
}
.dw-sc-leadtype-card.is-selected {
  border-color: var(--dw-sky);
  background: linear-gradient(135deg, rgba(110, 181, 233, 0.12) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 4px 14px rgba(27, 79, 138, 0.18),
              inset 0 0 0 1px var(--dw-sky);
}
.dw-sc-leadtype-card.is-selected::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dw-sky);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
  animation: dw-sc-card-check 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes dw-sc-card-check {
  0%   { opacity: 0; transform: scale(0.3); }
  70%  { transform: scale(1.18); }
  100% { opacity: 1; transform: scale(1); }
}
.dw-sc-leadtype-icon {
  width: 26px;
  height: 26px;
  color: var(--dw-slate-deep);
  transition: color 200ms ease, transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
.dw-sc-leadtype-card:hover .dw-sc-leadtype-icon { color: var(--dw-sky); transform: scale(1.05); }
.dw-sc-leadtype-card.is-selected .dw-sc-leadtype-icon { color: var(--dw-sky); }
.dw-sc-leadtype-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dw-text);
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.005em;
}
.dw-sc-leadtype-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.dw-sc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.dw-sc-no {
  background: transparent;
  border: none;
  color: var(--dw-text-3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 160ms ease;
}
.dw-sc-no:hover { color: var(--dw-text); }
.dw-sc-go {
  margin-left: auto;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 220ms ease;
  box-shadow: 0 2px 8px rgba(27, 79, 138, 0.25);
}
.dw-sc-go:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27, 79, 138, 0.35); }
.dw-sc-go:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.dw-sc-error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  display: none;
}
.dw-sc-error.show { display: block; }

/* Success state — replaces form contents on submit */
.dw-sc-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 14px;
  animation: dw-sc-success-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes dw-sc-success-pop {
  0% { opacity: 0; transform: scale(0.4); }
  70% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.dw-sc-success-block {
  text-align: center;
  padding: var(--dw-sp-6);
}
.dw-sc-success-block .dw-sc-title { text-align: center; }
.dw-sc-success-block .dw-sc-sub { text-align: center; margin-bottom: 16px; }
.dw-sc-upgrade-cta {
  margin: var(--dw-sp-4) var(--dw-sp-6) var(--dw-sp-6);
  padding: 14px;
  background: var(--dw-surface-2);
  border-radius: 10px;
  border: 0.5px solid rgba(0,0,0,0.06);
}
.dw-sc-upgrade-cta-line {
  font-size: 12px;
  color: var(--dw-text-3);
  margin-bottom: 8px;
}
/* Matches .dw-sc-go primary CTA — same sky gradient, white text, hover lift. */
.dw-sc-upgrade-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff !important;
  text-decoration: none;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(27, 79, 138, 0.25);
  transition: transform 160ms ease, box-shadow 220ms ease;
}
.dw-sc-upgrade-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27, 79, 138, 0.35); }

@media (max-width: 540px) {
  .dw-sc-modal { max-width: 100%; border-radius: 14px 14px 0 0; align-self: flex-end; }
  .dw-auth-backdrop:has(.dw-sc-modal) { align-items: flex-end; padding: 0; }
}

/* M-Mob-4: plain auth modal (signin/signup) gets the same bottom-sheet
   treatment as the SC popup + account-upgrade modal. Without this, the
   auth modal was the only one in the family that stayed centered on
   mobile. Safe-area-inset-bottom-aware bottom padding so the modal
   doesn't push CTAs under the home indicator. */
@media (max-width: 540px) {
  .dw-auth-modal {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    align-self: flex-end;
    max-height: 92dvh;
  }
  .dw-auth-backdrop:has(.dw-auth-modal) { align-items: flex-end; padding: 0; }
  /* Push the body bottom-padding past the home indicator. The auth modal's
     existing internal padding handles the rest of the chrome. */
  .dw-auth-modal .dw-auth-body {
    padding-bottom: max(var(--dw-sp-6), env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Account upgrade modal (Ship 2) — instant-login signup. Bigger than
   Stay Connected popup; carries phone + password + optional home-value
   address. Reuses .dw-auth-backdrop for the overlay.
   ═══════════════════════════════════════════════════════════════════════ */
.dw-acct-modal {
  background: var(--dw-surface);
  border-radius: var(--dw-radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--dw-shadow-xl);
  overflow: hidden;
  animation: dw-auth-pop 320ms var(--dw-ease-spring);
  position: relative;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}
.dw-acct-head {
  padding: var(--dw-sp-6) var(--dw-sp-6) var(--dw-sp-3);
  position: relative;
  flex-shrink: 0;
}
.dw-acct-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dw-sky);
  margin-bottom: 8px;
}
.dw-acct-title {
  font-family: var(--dw-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  line-height: 1.15;
  margin: 0 0 6px;
}
.dw-acct-sub {
  font-size: 14px;
  color: var(--dw-text-2);
  line-height: 1.5;
  margin: 0;
}
.dw-acct-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--dw-text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease;
}
.dw-acct-close:hover { background: var(--dw-surface-2); color: var(--dw-text); }
.dw-acct-form {
  padding: var(--dw-sp-3) var(--dw-sp-6) var(--dw-sp-6);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}
.dw-acct-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dw-acct-error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.dw-acct-error.show { display: block; }

/* Agent-connection radio (Phase 3, 2026-05-04). Replaces home-value
   checkbox. Two-pill choice with sky-accent reveal of microcopy beneath. */
.dw-acct-agent {
  margin-top: 6px;
  padding: 14px;
  background: var(--dw-surface-2);
  border: 0.5px solid rgba(0,0,0,0.06);
  border-radius: 10px;
}
.dw-acct-agent-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--dw-text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.dw-acct-agent-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dw-acct-agent-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 10px;
  background: var(--dw-surface);
  border: 1px solid rgba(68,91,105,0.16);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dw-text-2);
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.32,0.72,0,1),
              border-color 200ms ease,
              background 200ms ease,
              color 200ms ease,
              box-shadow 220ms ease;
  user-select: none;
}
.dw-acct-agent-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(110,181,233,0.40);
  background: rgba(255,255,255,0.85);
  color: var(--dw-text);
}
.dw-acct-agent-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.dw-acct-agent-pill-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(68,91,105,0.30);
  flex-shrink: 0;
  transition: border-color 200ms ease, background 200ms ease;
  position: relative;
}
.dw-acct-agent-pill.is-picked {
  border-color: var(--dw-sky);
  color: var(--dw-text);
  background: linear-gradient(135deg, rgba(110,181,233,0.14) 0%, rgba(255,255,255,0.95) 100%);
  box-shadow: 0 4px 12px rgba(27,79,138,0.18),
              inset 0 0 0 1px var(--dw-sky);
}
.dw-acct-agent-pill.is-picked .dw-acct-agent-pill-dot {
  border-color: var(--dw-sky);
  background: var(--dw-sky);
  box-shadow: inset 0 0 0 3px var(--dw-surface);
}
.dw-acct-agent-note {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  line-height: 1.4;
  animation: dwAcctNoteFade 280ms cubic-bezier(0.32,0.72,0,1) both;
}
@keyframes dwAcctNoteFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dw-acct-modal.is-agent-yes .dw-acct-agent-note-yes,
.dw-acct-modal.is-agent-no .dw-acct-agent-note-no {
  display: flex;
}
.dw-acct-agent-note-yes,
.dw-acct-agent-note-no {
  background: rgba(68,91,105,0.06);
  border: 1px solid rgba(68,91,105,0.14);
  color: var(--dw-text-2);
}
.dw-acct-agent-note-yes svg,
.dw-acct-agent-note-no svg { color: var(--dw-text-3); flex-shrink: 0; }
.dw-acct-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.dw-acct-no {
  background: transparent;
  border: none;
  color: var(--dw-text-3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 160ms ease;
}
.dw-acct-no:hover { color: var(--dw-text); }
.dw-acct-go {
  margin-left: auto;
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 220ms ease;
  box-shadow: 0 2px 8px rgba(27, 79, 138, 0.25);
}
.dw-acct-go:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27, 79, 138, 0.35); }
.dw-acct-go:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.dw-acct-perks {
  list-style: none;
  padding: 0;
  margin: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dw-acct-perks li {
  font-size: 12px;
  color: var(--dw-text-2);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dw-acct-perks li::before {
  content: '✓';
  color: var(--dw-sky);
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .dw-acct-modal { max-width: 100%; border-radius: 14px 14px 0 0; align-self: flex-end; max-height: 96dvh; }
  .dw-auth-backdrop:has(.dw-acct-modal) { align-items: flex-end; padding: 0; }
  .dw-acct-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   QUALIFYING QUESTIONS MODAL (Phase 4, 2026-05-04)
   Multi-step picker that fires after account-create when user wants an
   agent connection. Lead-type-aware question banks. Glass + sky accent.
   ═══════════════════════════════════════════════════════════════════════ */
.dw-qual-modal {
  background: var(--dw-surface);
  border: 0.5px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
  width: min(560px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
  animation: dwQualModalRise 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes dwQualModalRise {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dw-qual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 12px;
  border-bottom: 0.5px solid rgba(0,0,0,0.04);
}
.dw-qual-progress {
  display: flex;
  gap: 5px;
  flex: 1;
}
.dw-qual-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(68,91,105,0.12);
  transition: background 220ms ease, transform 220ms ease;
}
.dw-qual-dot.is-done {
  background: var(--dw-sky);
  opacity: 0.55;
}
.dw-qual-dot.is-active {
  background: var(--dw-sky);
}
.dw-qual-skip {
  background: transparent;
  border: none;
  color: var(--dw-text-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: inherit;
  transition: color 160ms ease, background 160ms ease;
}
.dw-qual-skip:hover { color: var(--dw-text); background: rgba(68,91,105,0.06); }

.dw-qual-body {
  padding: 22px 26px 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  /* --dw-qual-dir: 1 = next, -1 = back. Drives slide direction below. */
  --dw-qual-dir: 1;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.32,0.72,0,1);
}
.dw-qual-body.is-leaving {
  opacity: 0;
  transform: translateX(calc(var(--dw-qual-dir) * -22px));
  pointer-events: none;
}
.dw-qual-body.is-entering {
  opacity: 0;
  transform: translateX(calc(var(--dw-qual-dir) * 22px));
}

/* Thank-you closing scene — replaces the question card with a confetti
   moment + CTA. Sky-tinted ambient blobs match the rest of dwellohomes.net. */
.dw-qual-modal-thanks {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 0;
}
.dw-qual-thanks-blob {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}
.dw-qual-thanks-blob-1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(110,181,233,0.22) 0%, rgba(110,181,233,0) 70%);
  top: -120px; right: -80px;
  animation: dwQualBlob1 14s ease-in-out infinite alternate;
}
.dw-qual-thanks-blob-2 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(245,166,35,0.16) 0%, rgba(245,166,35,0) 70%);
  bottom: -100px; left: -60px;
  animation: dwQualBlob2 16s ease-in-out infinite alternate-reverse;
}
@keyframes dwQualBlob1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes dwQualBlob2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, -40px) scale(1.08); }
}
.dw-qual-thanks-inner {
  position: relative;
  z-index: 1;
  padding: 56px 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: dwQualThanksRise 480ms cubic-bezier(0.32,0.72,0,1) both;
}
@keyframes dwQualThanksRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dw-qual-thanks-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, #1B4F8A 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow:
    0 12px 32px rgba(110,181,233,0.42),
    0 0 0 6px rgba(110,181,233,0.12),
    inset 0 1px 0 rgba(255,255,255,0.32);
  animation: dwQualCheckBurst 540ms cubic-bezier(0.32,0.72,0,1) both;
  animation-delay: 80ms;
}
@keyframes dwQualCheckBurst {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}
.dw-qual-thanks-title {
  font-family: var(--dw-display, 'Cabinet Grotesk', sans-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--dw-text);
  margin: 0 0 8px;
  line-height: 1.15;
}
.dw-qual-thanks-sub {
  font-size: 14.5px;
  color: var(--dw-text-2);
  line-height: 1.55;
  margin: 0 0 26px;
  max-width: 380px;
}
.dw-qual-thanks-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
.dw-qual-thanks-btn {
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 200ms ease, background 180ms ease, color 180ms ease;
}
.dw-qual-thanks-btn-primary {
  background: linear-gradient(135deg, var(--dw-sky) 0%, #1B4F8A 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 -1px 0 rgba(27,79,138,0.32) inset,
    0 6px 18px rgba(110,181,233,0.42);
}
.dw-qual-thanks-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.26) inset,
    0 -1px 0 rgba(27,79,138,0.36) inset,
    0 12px 28px rgba(110,181,233,0.55);
}
.dw-qual-thanks-btn-ghost {
  background: transparent;
  color: var(--dw-text-3);
  font-weight: 500;
}
.dw-qual-thanks-btn-ghost:hover {
  background: rgba(68,91,105,0.06);
  color: var(--dw-text);
}
.dw-qual-title {
  font-family: var(--dw-display, 'Cabinet Grotesk', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--dw-text);
  letter-spacing: -0.012em;
  margin: 0 0 6px;
  line-height: 1.25;
}
.dw-qual-sub {
  font-size: 13px;
  color: var(--dw-text-3);
  margin: 0 0 16px;
  line-height: 1.45;
}

/* Lead-type 3-card row inside the qualifying flow */
.dw-qual-leadtype-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.dw-qual-leadtype-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: 14px;
  background: var(--dw-surface-2);
  border: 1px solid rgba(68,91,105,0.14);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--dw-text);
  transition: transform 200ms cubic-bezier(0.32,0.72,0,1),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 240ms ease;
}
.dw-qual-leadtype-card:hover {
  transform: translateY(-2px);
  border-color: rgba(110,181,233,0.45);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 6px 18px rgba(27,79,138,0.10);
}
.dw-qual-leadtype-card svg { color: var(--dw-slate-deep); transition: color 200ms ease; }
.dw-qual-leadtype-card:hover svg { color: var(--dw-sky); }
.dw-qual-leadtype-card.is-selected {
  border-color: var(--dw-sky);
  background: linear-gradient(135deg, rgba(110,181,233,0.14) 0%, rgba(255,255,255,0.95) 100%);
  box-shadow: 0 4px 14px rgba(27,79,138,0.18), inset 0 0 0 1px var(--dw-sky);
}
.dw-qual-leadtype-card.is-selected svg { color: var(--dw-sky); }
.dw-qual-leadtype-card.is-selected::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dw-sky);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
  animation: dwQualCheckPop 240ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes dwQualCheckPop {
  0%   { opacity: 0; transform: scale(0.3); }
  70%  { transform: scale(1.18); }
  100% { opacity: 1; transform: scale(1); }
}

/* Question option chips */
.dw-qual-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.dw-qual-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 11px;
  background: var(--dw-surface-2);
  border: 1px solid rgba(68,91,105,0.10);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--dw-text);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms cubic-bezier(0.32,0.72,0,1),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 220ms ease;
}
.dw-qual-opt:hover {
  transform: translateY(-1px);
  border-color: rgba(110,181,233,0.40);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 4px 12px rgba(27,79,138,0.08);
}
.dw-qual-opt.is-selected {
  border-color: var(--dw-sky);
  background: linear-gradient(135deg, rgba(110,181,233,0.12) 0%, rgba(255,255,255,0.95) 100%);
  color: var(--dw-text);
  box-shadow: 0 4px 14px rgba(27,79,138,0.16), inset 0 0 0 1px var(--dw-sky);
  font-weight: 600;
}
.dw-qual-opt-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(68,91,105,0.30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 200ms ease;
}
.dw-qual-opt.is-selected .dw-qual-opt-check {
  border-color: var(--dw-sky);
  background: var(--dw-sky);
}
.dw-qual-opt.is-selected .dw-qual-opt-check::after {
  content: '';
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}
.dw-qual-opt-label { flex: 1; }

/* Conditional address input — Homeowner → "Yes, please" home valuation */
.dw-qual-addr-wrap {
  margin-top: 14px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  background: rgba(110,181,233,0.08);
  border: 1px solid rgba(110,181,233,0.22);
  animation: dwQualAddrIn 320ms cubic-bezier(0.32,0.72,0,1) both;
}
@keyframes dwQualAddrIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dw-qual-addr-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dw-sky);
  margin-bottom: 7px;
}
.dw-qual-addr-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--dw-text);
  background: var(--dw-surface);
  border: 1.5px solid rgba(110,181,233,0.32);
  border-radius: 10px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.dw-qual-addr-input::placeholder {
  color: var(--dw-text-3);
  font-weight: 400;
}
.dw-qual-addr-input:focus {
  border-color: var(--dw-sky);
  box-shadow: 0 0 0 4px rgba(110,181,233,0.16);
  background: var(--dw-surface);
}
.dw-qual-addr-help {
  margin-top: 8px;
  font-size: 12px;
  color: var(--dw-text-3);
  line-height: 1.45;
}

/* Google Places autocomplete dropdown styling — match dwello vocab */
.pac-container {
  border-radius: 12px !important;
  border: 1px solid rgba(68,91,105,0.18) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important;
  background: var(--dw-surface) !important;
  font-family: inherit !important;
  margin-top: 6px !important;
  padding: 4px !important;
  z-index: 20000 !important;
}
.pac-item {
  padding: 9px 12px !important;
  border-radius: 8px !important;
  border-top: none !important;
  cursor: pointer !important;
  font-size: 13.5px !important;
  color: var(--dw-text) !important;
  line-height: 1.4 !important;
}
.pac-item:hover,
.pac-item-selected {
  background: rgba(110,181,233,0.12) !important;
}
.pac-item-query {
  font-size: 13.5px !important;
  color: var(--dw-text) !important;
  font-weight: 600 !important;
}
.pac-matched {
  color: var(--dw-sky) !important;
  font-weight: 700 !important;
}
.pac-icon {
  display: none !important;
}

/* Footer */
.dw-qual-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 0.5px solid rgba(0,0,0,0.04);
  background: var(--dw-surface);
}
.dw-qual-back, .dw-qual-continue {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  transition: transform 160ms ease, box-shadow 220ms ease, color 160ms ease, background 160ms ease;
}
.dw-qual-back {
  background: transparent;
  color: var(--dw-text-3);
}
.dw-qual-back:hover:not(:disabled) { color: var(--dw-text); background: rgba(68,91,105,0.06); }
.dw-qual-back:disabled { opacity: 0.35; cursor: not-allowed; }
.dw-qual-continue {
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,79,138,0.25);
}
.dw-qual-continue:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27,79,138,0.35); }
.dw-qual-continue:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.dw-qual-step-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dw-text-3);
  text-transform: uppercase;
}

@media (max-width: 540px) {
  .dw-qual-modal {
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    align-self: flex-end;
    max-height: 96dvh;
  }
  .dw-auth-backdrop:has(.dw-qual-modal) { align-items: flex-end; padding: 0; }
  .dw-qual-leadtype-row { grid-template-columns: 1fr; gap: 8px; }
  .dw-qual-leadtype-card { flex-direction: row; padding: 12px 14px; justify-content: flex-start; }
  .dw-qual-leadtype-card svg { width: 22px; height: 22px; }
  .dw-qual-title { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Google Places autocomplete dropdown — themed for dwello dark mode.
   Default Google styling renders broken icons + white-on-white text on
   our dark theme. Override the .pac-container that Maps API injects.
   ═══════════════════════════════════════════════════════════════════════ */
.pac-container {
  background: var(--dw-surface) !important;
  border: 0.5px solid var(--dw-border, rgba(255,255,255,0.12)) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45) !important;
  font-family: Inter, system-ui, sans-serif !important;
  margin-top: 4px !important;
  z-index: 200000 !important;       /* above modal backdrops (180) */
  overflow: hidden;
  padding: 4px 0;
}
.pac-item {
  padding: 8px 12px !important;
  border-top: none !important;
  cursor: pointer !important;
  color: var(--dw-text-2) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  transition: background 120ms ease;
}
.pac-item:hover,
.pac-item-selected {
  background: var(--dw-surface-2) !important;
  color: var(--dw-text) !important;
}
.pac-item-query { color: var(--dw-text) !important; font-weight: 600 !important; font-size: 13px !important; }
.pac-matched   { color: var(--dw-sky) !important; font-weight: 700 !important; }
/* Nuke the broken sprite icons entirely — text-only suggestions are cleaner
   anyway. Aggressive selectors with !important to beat Google's inline styles. */
.pac-container .pac-icon,
.pac-container .pac-icon-marker,
.pac-container span[class*="pac-icon"] {
  display: none !important;
  background-image: none !important;
  background: transparent !important;
}
.pac-item-query, .pac-item span:not(.pac-icon) {
  margin-left: 0 !important;
}

/* ── Compliance opt-in micro-copy (Ship 2 + CAN-SPAM/TCPA) ── */
.dw-optin-note {
  font-size: 10px;
  line-height: 1.5;
  color: var(--dw-text-3);
  margin-top: 8px;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.dw-optin-note a {
  color: var(--dw-text-3);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
}
.dw-optin-note a:hover {
  color: var(--dw-text-2);
  text-decoration-color: var(--dw-text-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   M-Mob-7: bottom-nav polish + listing-page collisions + page transitions
═══════════════════════════════════════════════════════════════════════════ */

/* Match tab — amber glow, never blue. Override the generic .is-active sky
   color and add a soft drop-shadow halo on the icon for the "pop" effect.
   File-end placement so this wins over the M-Mob-6 base styles. */
@media (max-width: 900px) {
  body:not(.dw-body-match) .dw-bottom-nav-tab[data-tab="match"] {
    color: #F5A623;
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab[data-tab="match"] svg {
    filter: drop-shadow(0 0 6px rgba(245, 166, 35, 0.55))
            drop-shadow(0 0 14px rgba(245, 166, 35, 0.30));
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab[data-tab="match"].is-active {
    color: #FFB940;
  }
  body:not(.dw-body-match) .dw-bottom-nav-tab[data-tab="match"].is-active svg {
    filter: drop-shadow(0 0 8px rgba(245, 166, 35, 0.75))
            drop-shadow(0 0 18px rgba(245, 166, 35, 0.45));
    animation: dw-match-pulse 2.2s ease-in-out infinite;
  }
  /* Subtle pulse so the tab feels alive even when inactive. */
  body:not(.dw-body-match) .dw-bottom-nav-tab[data-tab="match"]:not(.is-active) svg {
    animation: dw-match-shimmer 3.4s ease-in-out infinite;
  }
}
@keyframes dw-match-pulse {
  0%, 100% { transform: translateY(-1px) scale(1.06); }
  50%      { transform: translateY(-1px) scale(1.14); }
}
@keyframes dw-match-shimmer {
  0%, 100% { opacity: 0.92; }
  50%      { opacity: 1; }
}

/* CTA-bar collision — file-end placement to beat M-Mob-3's later-in-source
   ordering. Without this, .dw-listing-cta-bar sits at bottom:0 under the
   bottom nav. Stack it 56px above + safe-area. */
@media (max-width: 900px) {
  body.dw-listingpage .dw-listing-cta-bar {
    bottom: calc(56px + env(safe-area-inset-bottom)) !important;
    padding-bottom: 10px !important;
  }
  /* Hide redundant sidebar contact card on mobile for active (non-sold)
     listings. The sticky CTA bar at bottom does the same job. Sold
     listings keep the sidebar — it carries Get-your-home-value (no
     sticky bar there). */
  body.dw-listingpage .dw-listing-sidebar.is-active { display: none; }
}

/* ─── M-Mob-7: bottom-sheet "More" popup (replaces right-slide drawer) ───
   Brandon's directive: native-app-style centered grid popup, not the side
   panel. Slides up from bottom, dimmed backdrop, 4-col tile grid, drag
   handle at top. Same visual family as the modal bottom-sheets. */
.dw-mob-more-sheet {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
}
.dw-mob-more-sheet.is-open { display: block; }
.dw-mob-more-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 18, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: dw-mob-more-backdrop-in 240ms var(--dw-ease-smooth);
}
.dw-mob-more-sheet.is-closing .dw-mob-more-backdrop {
  animation: dw-mob-more-backdrop-out 220ms var(--dw-ease-smooth) forwards;
}
@keyframes dw-mob-more-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dw-mob-more-backdrop-out { to { opacity: 0; } }
.dw-mob-more-card {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--dw-surface);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px max(16px, env(safe-area-inset-bottom));
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -10px 40px rgba(8, 12, 18, 0.22);
  animation: dw-modal-sheet-rise 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.dw-mob-more-sheet.is-closing .dw-mob-more-card {
  animation: dw-mob-more-sheet-out 240ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes dw-mob-more-sheet-out {
  to { transform: translateY(100%); }
}
.dw-mob-more-handle {
  display: flex; justify-content: center;
  padding: 6px 0 8px;
}
.dw-mob-more-handle-bar {
  width: 38px; height: 5px;
  border-radius: 3px;
  background: var(--dw-outline-strong);
  opacity: 0.55;
}
.dw-mob-more-header {
  display: flex; align-items: center;
  gap: 12px;
  padding: 6px 4px 14px;
  border-bottom: 0.5px solid var(--dw-outline);
  margin-bottom: 12px;
}
.dw-mob-more-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dw-sky) 0%, var(--dw-slate-deep) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  flex-shrink: 0;
  font-family: var(--dw-font-display, inherit);
}
.dw-mob-more-name {
  font-size: 15px; font-weight: 600;
  color: var(--dw-text);
}
.dw-mob-more-sub {
  font-size: 12px;
  color: var(--dw-text-3);
  margin-top: 2px;
}
.dw-mob-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  padding: 6px 0 16px;
}
.dw-mob-more-tile {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  background: transparent;
  border: none;
  text-decoration: none;
  color: var(--dw-text);
  cursor: pointer;
  font-family: inherit;
  border-radius: 12px;
  transition: background 160ms var(--dw-ease), transform 120ms var(--dw-ease);
  -webkit-tap-highlight-color: transparent;
}
.dw-mob-more-tile:active { transform: scale(0.96); background: var(--dw-mist); }
.dw-mob-more-tile-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--dw-mist);
  display: flex; align-items: center; justify-content: center;
  color: var(--dw-text);
  transition: background 160ms var(--dw-ease);
}
.dw-mob-more-tile-icon svg { width: 22px; height: 22px; }
.dw-mob-more-tile-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--dw-text-2);
  text-align: center;
  letter-spacing: 0.01em;
}
.dw-mob-more-foot {
  border-top: 0.5px solid var(--dw-outline);
  padding-top: 10px;
  display: flex;
  gap: 8px;
}
.dw-mob-more-foot .dw-btn { flex: 1; }

/* ─── M-Mob-7 / M-Mob-7.9: View Transitions API — snappy, directional ────
   Native-app feel on every same-origin navigation. Browsers without
   support degrade gracefully (no transition, normal load).

   Tuning notes:
   - Durations 140ms (out) / 170ms (in) — under 200ms is the threshold
     where a transition starts feeling like response, not animation
     (iOS interaction guideline).
   - cubic-bezier(0.32, 0.72, 0, 1) — iOS-style spring easing. Sharper
     than Material's 0.4,0,0.2,1 — content snaps into place instead of
     floating to a stop.
   - Tiny horizontal slide (12-14px) — sells "forward motion" without
     the heavy translate that makes web pages feel sluggish.
   - Direction-aware: html.vt-forward (default) slides new in from right,
     old to left. html.vt-back slides inverse. Class set by the inline
     direction detector in renderShell from sessionStorage signal —
     forward on link clicks, back on popstate / Navigation API traverse.
   - Pinned chrome via view-transition-name: bottom nav + header don't
     animate; they stay in place across the swap, which is what makes
     it feel app-native instead of full-page-replace. */
@view-transition { navigation: auto; }

/* Default (forward / unknown direction).
   Stagger old → new so they don't both sit at high opacity at the same
   time (was the "ghosting" / double-content artifact during morph).
   Old fades fast on a steep early-out curve so it's mostly gone by 80ms.
   New starts after a 70ms delay on a slow-in curve so it ramps up while
   the old is already at low opacity. opacity(old) + opacity(new) stays
   well under 1 throughout the overlap. */
::view-transition-old(root) {
  animation: 130ms cubic-bezier(0.4, 0, 1, 0.4) both dw-vt-out-fwd;
}
::view-transition-new(root) {
  animation: 220ms cubic-bezier(0.16, 1, 0.3, 1) 70ms both dw-vt-in-fwd;
}
@keyframes dw-vt-out-fwd {
  to { opacity: 0; transform: translateX(-12px); }
}
@keyframes dw-vt-in-fwd {
  from { opacity: 0; transform: translateX(14px); }
}

/* Back navigation — slide direction inverted, same staggered timing. */
html.vt-back ::view-transition-old(root) {
  animation: 130ms cubic-bezier(0.4, 0, 1, 0.4) both dw-vt-out-back;
}
html.vt-back ::view-transition-new(root) {
  animation: 220ms cubic-bezier(0.16, 1, 0.3, 1) 70ms both dw-vt-in-back;
}
@keyframes dw-vt-out-back {
  to { opacity: 0; transform: translateX(12px); }
}
@keyframes dw-vt-in-back {
  from { opacity: 0; transform: translateX(-14px); }
}

/* Persist nav + header chrome across navigations (no fade on these). */
.dw-bottom-nav { view-transition-name: dw-bottom-nav; }
.dw-header { view-transition-name: dw-header; }

/* ───────── In-map listing-popup → /listings/:id morph ─────────────
   The popup tags its hero photo, price, and address with
   view-transition-name="dwl-{photo|price|addr}-{id}". The matching
   /listings/:id elements use the same names. Browser captures both,
   morphs between them on cross-document navigation — photo grows
   from popup-size to full hero size, price/address slide into place.
   Browser's default morph timing handles the smoothness; no custom
   override needed (and pseudo-element attribute selectors aren't
   supported in CSS for view-transition pseudo-elements). */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  html.vt-back ::view-transition-old(root),
  html.vt-back ::view-transition-new(root) {
    animation-duration: 0ms;
  }
}

/* ─── M-Mob-7.1: Match tab embers ─────────────────────────────────────────
   Glowing motes drift up from the sparkle icon every couple seconds —
   feels like a small fire spitting embers. Each ember is a 3-4px amber
   dot that fades in low at the icon center, drifts up + sideways, scales
   down, and fades out past the top of the nav bar. Five embers with
   staggered animation-delay so the emission feels continuous. CSS-only
   (no JS), GPU-accelerated transform/opacity. */
.dw-match-embers {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;        /* zone where embers are anchored — over the icon */
  pointer-events: none;
  /* Allow embers to escape upward into the nav background above the tab. */
  overflow: visible;
}
.dw-match-ember {
  position: absolute;
  top: 18px;            /* roughly the icon center */
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFB940;
  box-shadow:
    0 0 4px rgba(255, 185, 64, 0.85),
    0 0 10px rgba(245, 166, 35, 0.50);
  opacity: 0;
  transform: translate(-50%, 0) scale(0.6);
  /* will-change keeps the layer GPU-cached so emission is smooth on iOS */
  will-change: transform, opacity;
}
@media (max-width: 900px) {
  body:not(.dw-body-match) .dw-match-ember-1 { animation: dw-match-ember-l 2.6s ease-out 0.0s infinite; }
  body:not(.dw-body-match) .dw-match-ember-2 { animation: dw-match-ember-r 2.4s ease-out 0.5s infinite; }
  body:not(.dw-body-match) .dw-match-ember-3 { animation: dw-match-ember-c 2.8s ease-out 1.0s infinite; }
  body:not(.dw-body-match) .dw-match-ember-4 { animation: dw-match-ember-r 2.5s ease-out 1.5s infinite; }
  body:not(.dw-body-match) .dw-match-ember-5 { animation: dw-match-ember-l 2.7s ease-out 2.0s infinite; }
  /* Smaller, redder ember for the 3rd one — variety like real embers */
  body:not(.dw-body-match) .dw-match-ember-3 {
    width: 3px; height: 3px;
    background: #FF8A4A;
    box-shadow:
      0 0 3px rgba(255, 138, 74, 0.85),
      0 0 8px rgba(226, 75, 74, 0.45);
  }
  /* Slightly bigger glowing one for #5 */
  body:not(.dw-body-match) .dw-match-ember-5 {
    width: 5px; height: 5px;
  }
}
/* Drift LEFT — ember floats up with a leftward curve. */
@keyframes dw-match-ember-l {
  0%   { opacity: 0; transform: translate(-50%, 2px) scale(0.5); }
  12%  { opacity: 1; }
  35%  { opacity: 0.95; transform: translate(calc(-50% - 8px), -10px) scale(1); }
  70%  { opacity: 0.6; transform: translate(calc(-50% - 16px), -22px) scale(0.85); }
  100% { opacity: 0; transform: translate(calc(-50% - 22px), -34px) scale(0.4); }
}
/* Drift RIGHT — ember floats up with a rightward curve. */
@keyframes dw-match-ember-r {
  0%   { opacity: 0; transform: translate(-50%, 2px) scale(0.5); }
  12%  { opacity: 1; }
  35%  { opacity: 0.95; transform: translate(calc(-50% + 9px), -11px) scale(1); }
  70%  { opacity: 0.55; transform: translate(calc(-50% + 17px), -23px) scale(0.8); }
  100% { opacity: 0; transform: translate(calc(-50% + 24px), -36px) scale(0.35); }
}
/* Drift CENTER (mostly straight up). */
@keyframes dw-match-ember-c {
  0%   { opacity: 0; transform: translate(-50%, 2px) scale(0.5); }
  12%  { opacity: 1; }
  35%  { opacity: 0.95; transform: translate(calc(-50% + 2px), -12px) scale(1); }
  70%  { opacity: 0.6; transform: translate(calc(-50% - 3px), -26px) scale(0.85); }
  100% { opacity: 0; transform: translate(calc(-50% + 1px), -40px) scale(0.4); }
}
/* Reduced-motion: hide embers entirely. The pulse + glow is enough
   without continuous motion. */
@media (prefers-reduced-motion: reduce) {
  .dw-match-ember { display: none; }
}

/* ─── M-Mob-7.2: center-aligned intro screens on mobile ───────────────────
   Brandon's directive: Home Match sign-in + every "intro / landing / hub
   header" screen feels iOS-native when the title + lede + CTA row are
   centered on mobile, even when desktop stays left-aligned. Skip form
   bodies (preferences, contact forms) — labels next to width:100% inputs
   look weird centered. */
@media (max-width: 720px) {
  /* The intro containers themselves get text-align: center.
     Block children (h1, p, .dw-eyebrow inline-flex) inherit centering
     for their inline content. Button rows below get a separate
     justify-content rule because text-align doesn't affect flex items. */
  .dw-match-land-inner,
  .dw-match-summary-card,
  .dw-hub-header .dw-container {
    text-align: center;
  }
  /* Auto-margin the lede paragraphs (they have max-width caps that pin
     them left without this). */
  .dw-match-land-lede,
  .dw-hub-header .dw-lede {
    margin-left: auto;
    margin-right: auto;
  }
  /* Section labels above pickers/grids — center alongside their grids. */
  .dw-match-section-label {
    text-align: center;
  }
  /* CTA button rows. The intro screens use inline-style display:flex divs.
     Attribute-selector approach is ugly but avoids rewriting every template
     string — and it's explicit, scoped to the intro containers only. */
  .dw-match-land-inner > div[style*="display:flex"],
  .dw-match-land-inner > div[style*="display: flex"],
  .dw-hub-header > .dw-container > div[style*="display:flex"],
  .dw-hub-header > .dw-container > div[style*="display: flex"] {
    justify-content: center;
  }
  /* Picker cards (Home Match saved-search picker) keep their internal
     left-alignment — their content is name + chips, looks better as left
     read. Just center the grid itself. */
  .dw-match-picker-grid {
    justify-items: center;
  }
}

/* M-Mob-7.3: Home Match WHERE? pill-input fix. The .dw-match-prefs-section
   input[type="text"] rule (specificity 0,2,1) was bleeding through and
   rendering the inline pill-input as a full-width nested bordered box
   below the chips — looked like a giant empty input. Bump specificity
   to (0,3,1) by chaining the parent class so the transparent inline
   pill-input styling wins. Affects desktop + mobile. */
.dw-match-prefs-section .dw-pill-input-box input[type="text"] {
  width: auto;
  flex: 1;
  min-width: 120px;
  padding: 6px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  box-sizing: content-box;
}
.dw-match-prefs-section .dw-pill-input-box input[type="text"]:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

/* ───────────── IN-MAP LISTING DETAIL POPUP ─────────────
   Click a price pill on the map → scrollable mini-detail-page
   anchored above or below the pill (smart placement). Map stays
   visible behind the popup; user gets the full listing context
   without navigating away. */
.dw-listing-popup {
  position: fixed;
  z-index: 9999;
  /* Desktop default: hover-tooltip-sized. Mobile shrinks further to
     280×340 in the @media block below. JS sets max-height inline based
     on actual viewport space available on the chosen side of the pill,
     so this is the ceiling — actual height is often less. */
  width: 340px;
  max-width: calc(100vw - 16px);
  max-height: 60vh;
  background: var(--dw-surface, #11161e);
  border: 1px solid var(--dw-outline, rgba(255,255,255,0.10));
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 4px 14px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 200ms cubic-bezier(0.4,0,0.2,1), transform 200ms cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  --dw-popup-caret-x: 50%;
}
.dw-listing-popup.is-visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.dw-listing-popup.is-leaving { opacity: 0; transform: scale(0.97); }

/* Caret pointing at source pill — flips with placement. */
.dw-listing-popup::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: var(--dw-surface, #11161e);
  border-style: solid;
  border-color: var(--dw-outline, rgba(255,255,255,0.10));
  left: var(--dw-popup-caret-x);
  margin-left: -7px;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.dw-listing-popup.is-below::after {
  top: -8px;
  border-width: 1px 1px 0 0;
  transform: rotate(-45deg);
}
.dw-listing-popup.is-above::after {
  bottom: -8px;
  border-width: 0 0 1px 1px;
  transform: rotate(-45deg);
}
/* Once user drags the popup, it's no longer anchored to the pill —
   hide the caret since it'd point at nothing meaningful. */
.dw-listing-popup.is-untethered::after { opacity: 0; }
.dw-listing-popup.is-dragging {
  transition: none !important;
  user-select: none;
  cursor: grabbing;
}

/* iOS-style grabber bar at top center of popup. Drag to reposition
   anywhere on screen (clamped to viewport). 22px tall touch target
   with a 36×4 visible bar inside for clear affordance. */
.dw-popup-grab-handle {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 22px;
  z-index: 6;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.dw-popup-grab-handle::before {
  content: '';
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.30);
  border-radius: 2px;
  transition: background 120ms ease, width 120ms ease;
}
.dw-popup-grab-handle:hover::before, .dw-popup-grab-handle:active::before {
  background: rgba(255,255,255,0.6);
  width: 44px;
}
.dw-popup-grab-handle:active { cursor: grabbing; }
[data-light-theme] .dw-popup-grab-handle::before { background: rgba(0,0,0,0.25); }
[data-light-theme] .dw-popup-grab-handle:hover::before, [data-light-theme] .dw-popup-grab-handle:active::before { background: rgba(0,0,0,0.5); }

.dw-listing-popup-scroll {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Floating header bar (close + open-full-page) overlays the photos.
   Sits below the grab handle which lives at top: 0. */
.dw-popup-header {
  position: absolute; top: 24px; right: 10px; left: 10px;
  z-index: 5;
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.dw-popup-header > * { pointer-events: auto; }
.dw-popup-close, .dw-popup-fullpage {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,22,0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
  flex-shrink: 0;
}
.dw-popup-close:hover, .dw-popup-fullpage:hover { background: rgba(10,14,22,0.92); transform: scale(1.04); }
/* iOS Safari renders SVG without explicit dims as 0×0 inside flex
   centered parents — the dimensions on the inline svg above prevent
   that, but lock them here too as a safety net. */
.dw-popup-close svg, .dw-popup-fullpage svg { width: 14px; height: 14px; display: block; }

/* Photo carousel — horizontal scroll-snap, all photos. Desktop
   default is 180px (hover-tooltip-sized); mobile shrinks to 140 in
   the @media block. */
.dw-popup-carousel {
  position: relative;
  height: 180px;
  background: var(--dw-bg-2, #0c1118);
  flex-shrink: 0;
}
.dw-popup-carousel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Single-axis horizontal pan only — kills any pinch-to-zoom that
     might bleed through on photo touch surfaces. */
  touch-action: pan-x;
}
.dw-popup-carousel-track::-webkit-scrollbar { display: none; }
.dw-popup-photo-slide { flex: 0 0 100%; scroll-snap-align: start; height: 100%; }
.dw-popup-photo-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-popup-carousel-counter {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}
.dw-popup-no-photos {
  min-height: 160px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  color: var(--dw-text-2, rgba(255,255,255,0.75));
  background: var(--dw-bg-2, #0c1118);
  text-align: center;
}
.dw-popup-no-photos svg { color: var(--dw-text-3, rgba(255,255,255,0.5)); flex-shrink: 0; }
.dw-popup-no-photos-title {
  font-family: var(--dw-font-display, system-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--dw-text, #fff);
}
.dw-popup-no-photos-sub {
  font-size: 12px;
  color: var(--dw-text-3, rgba(255,255,255,0.55));
  line-height: 1.4;
}

/* Headline (price, address, status) */
.dw-popup-headline { padding: 16px 18px 14px; }
.dw-popup-status-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.dw-popup-new {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(16,185,129,0.18); color: #10b981;
  padding: 3px 9px; border-radius: 999px;
}
.dw-popup-pricedrop {
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(16,185,129,0.18); color: #10b981;
  padding: 3px 9px; border-radius: 999px;
}
.dw-popup-price {
  font-family: var(--dw-font-display, 'Cabinet Grotesk', system-ui, sans-serif);
  font-size: 28px; font-weight: 700;
  color: var(--dw-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dw-popup-price-sub { font-size: 12px; color: var(--dw-text-3); margin-top: 4px; }
.dw-popup-specs { font-size: 14px; color: var(--dw-text-2); margin-top: 6px; font-weight: 500; }
.dw-popup-addr { font-size: 14px; color: var(--dw-text-2); margin-top: 8px; line-height: 1.35; }
.dw-popup-city { font-size: 12px; color: var(--dw-text-3); margin-top: 2px; }
.dw-popup-directions {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  background: var(--dw-bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--dw-outline, rgba(255,255,255,0.10));
  border-radius: 999px;
  color: var(--dw-text);
  text-decoration: none;
  font-size: 12px; font-weight: 500;
}
.dw-popup-directions:hover { background: var(--dw-bg-3, rgba(255,255,255,0.07)); }

/* Facts grid */
.dw-popup-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  padding: 0 18px 16px;
}
.dw-popup-fact {
  background: var(--dw-bg-2, rgba(255,255,255,0.03));
  border: 1px solid var(--dw-outline, rgba(255,255,255,0.06));
  border-radius: 10px;
  padding: 9px 11px;
}
.dw-popup-fact-val { font-size: 14px; font-weight: 600; color: var(--dw-text); line-height: 1.2; }
.dw-popup-fact-lbl { font-size: 11px; color: var(--dw-text-3); margin-top: 2px; }

/* Section blocks */
.dw-popup-section { padding: 14px 18px; border-top: 1px solid var(--dw-outline); }
.dw-popup-section-h {
  font-family: var(--dw-font-display);
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dw-text-2);
  margin-bottom: 10px;
}
.dw-popup-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-popup-chip {
  font-size: 12px; padding: 5px 11px;
  background: var(--dw-bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--dw-outline, rgba(255,255,255,0.10));
  border-radius: 999px;
  color: var(--dw-text-2);
  font-weight: 500;
}

/* Description */
.dw-popup-desc { padding: 14px 18px; border-top: 1px solid var(--dw-outline); }
.dw-popup-desc-text {
  font-size: 13px; line-height: 1.55;
  color: var(--dw-text-2);
  white-space: pre-wrap;
}
.dw-popup-oh { font-size: 13px; color: var(--dw-text-2); padding: 4px 0; }

/* Ask Dwello entry */
.dw-popup-ask-toggle {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 11px 12px;
  background: linear-gradient(135deg, var(--dw-sky-soft, rgba(110,181,233,0.08)) 0%, rgba(110,181,233,0.03) 100%);
  border: 1px solid rgba(110,181,233,0.25);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.dw-popup-ask-toggle:hover { background: linear-gradient(135deg, rgba(110,181,233,0.15) 0%, rgba(110,181,233,0.05) 100%); }
.dw-popup-ask-icon {
  width: 28px; height: 28px;
  background: var(--dw-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dw-popup-ask-icon img { width: 17px; height: 17px; opacity: 0.85; }
.dw-popup-ask-label { flex: 1; font-size: 13px; font-weight: 500; }
.dw-popup-ask-chevron { color: var(--dw-text-2); flex-shrink: 0; }

/* Sticky footer with primary CTAs */
.dw-popup-footer {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--dw-outline);
  background: var(--dw-surface);
  flex-shrink: 0;
}
.dw-popup-cta {
  flex: 1;
  padding: 10px 14px;
  background: var(--dw-bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--dw-outline, rgba(255,255,255,0.10));
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--dw-text);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 120ms ease, transform 120ms ease;
}
.dw-popup-cta:hover { background: var(--dw-bg-3, rgba(255,255,255,0.07)); }
.dw-popup-cta-primary {
  background: var(--dw-sky, #6EB5E9);
  color: #fff;
  border-color: var(--dw-sky, #6EB5E9);
}
.dw-popup-cta-primary:hover { background: var(--dw-sky-dark, #5aa5dc); transform: translateY(-1px); }
.dw-popup-cta-icon { flex: 0 0 44px; padding: 0; }
.dw-popup-cta-icon.is-favorited { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,0.10); }

/* Loading skeleton (initial popup state before data arrives) */
.dw-listing-popup.is-loading {
  width: 380px;
  max-width: calc(100vw - 16px);
  height: auto;
  max-height: 320px;
}
.dw-listing-popup-loading { padding: 16px; padding-top: 50px; }
.dw-skeleton-photo, .dw-skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: dwSkel 1.4s linear infinite;
  border-radius: 6px;
}
.dw-skeleton-photo { height: 180px; margin-bottom: 14px; }
.dw-skeleton-line { height: 14px; margin-bottom: 8px; }
@keyframes dwSkel {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.dw-listing-popup-error {
  padding: 60px 20px;
  text-align: center;
  color: var(--dw-text-3);
  font-size: 13px;
}

/* Mobile: tooltip-sized popup (matches desktop "mini popup" feel)
   anchored to the pill, with internal scroll for the rest. The map
   stays visible + pannable on the surrounding area — only taps
   directly on the popup or on a different pill close/swap it.
   Squarer ratio (300×360 default), dynamic max-height set inline by
   JS so the popup is guaranteed to fit the available viewport space.
   Old hover-preview popup hidden entirely on mobile so the new big
   popup is the only thing that opens on tap. */
/* Old small hover-preview popup is fully retired. The new in-map
   listing-detail popup now opens on hover (desktop) or tap (mobile)
   and contains everything the old one had plus full scrollable
   content. Hide the old one everywhere so it can't ghost in. */
.dw-map-popup-wrap { display: none !important; }

@media (max-width: 640px) {
  .dw-listing-popup {
    width: min(280px, calc(100vw - 24px));
    /* max-height set inline by dwPositionListingPopup based on actual
       viewport space; the value here is just a defensive ceiling. */
    max-height: 60vh;
  }
  .dw-listing-popup.is-loading {
    width: min(280px, calc(100vw - 24px));
    max-height: 220px;
  }
  .dw-popup-carousel { height: 140px; }
  .dw-popup-header { top: 22px; }
  .dw-popup-grab-handle { height: 20px; }
  .dw-popup-grab-handle::before { width: 30px; height: 3px; }
  .dw-popup-grab-handle:hover::before, .dw-popup-grab-handle:active::before { width: 38px; }
  .dw-popup-no-photos { min-height: 130px; padding: 18px 14px; }
  .dw-popup-no-photos-title { font-size: 14px; }
  .dw-popup-no-photos-sub { font-size: 11px; }
  .dw-popup-price { font-size: 22px; }
  .dw-popup-status-row { margin-bottom: 6px; gap: 6px; }
  .dw-popup-specs { font-size: 13px; margin-top: 4px; }
  .dw-popup-addr { font-size: 13px; margin-top: 6px; }
  .dw-popup-city { font-size: 11px; }
  .dw-popup-headline { padding: 12px 14px 10px; }
  .dw-popup-directions { padding: 6px 10px; font-size: 11px; margin-top: 8px; }
  .dw-popup-facts {
    padding: 0 14px 12px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .dw-popup-fact { padding: 8px 10px; }
  .dw-popup-fact-val { font-size: 13px; }
  .dw-popup-fact-lbl { font-size: 10px; }
  .dw-popup-section { padding: 12px 14px; }
  .dw-popup-section-h { font-size: 11px; margin-bottom: 8px; }
  .dw-popup-desc { padding: 12px 14px; }
  .dw-popup-desc-text { font-size: 12px; line-height: 1.5; }
  .dw-popup-chip { font-size: 11px; padding: 4px 9px; }
  .dw-popup-oh { font-size: 12px; }
  .dw-popup-ask-toggle { padding: 9px 10px; }
  .dw-popup-ask-icon { width: 24px; height: 24px; }
  .dw-popup-ask-icon img { width: 14px; height: 14px; }
  .dw-popup-ask-label { font-size: 12px; }
  .dw-popup-footer { padding: 8px 10px; gap: 6px; }
  .dw-popup-cta { padding: 9px 8px; font-size: 12px; border-radius: 8px; }
  .dw-popup-cta-icon { flex: 0 0 38px; }
  /* Smaller close + open-full-page corner buttons to match scale */
  .dw-popup-close, .dw-popup-fullpage { width: 28px; height: 28px; }
  .dw-popup-close svg, .dw-popup-fullpage svg { width: 12px; height: 12px; }
  .dw-popup-header { top: 8px; left: 8px; right: 8px; }
}

/* Light theme contrast */
[data-light-theme] .dw-popup-close, [data-light-theme] .dw-popup-fullpage {
  background: rgba(255,255,255,0.92);
  color: #111;
  border-color: rgba(0,0,0,0.08);
}

/* Back-to-search button on /listings/:id (mobile + desktop) */
/* Anchor it to the listing page section so it sits at top-left of the
   gallery instead of swimming off into the body. */
.dw-listing-page { position: relative; }
.dw-listing-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  background: rgba(10,14,22,0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.dw-listing-back:hover {
  background: rgba(10,14,22,0.92);
  transform: translateX(-2px);
}
.dw-listing-back svg { flex-shrink: 0; }

/* Mobile: keep visible above gallery, slightly smaller */
@media (max-width: 640px) {
  .dw-listing-back {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 12px;
    padding: 7px 12px 7px 9px;
    font-size: 12px;
  }
  .dw-listing-back-label {
    /* Mobile: hide label to keep the chip compact, leaving just chevron */
    display: none;
  }
  .dw-listing-back {
    width: 36px; height: 36px;
    padding: 0;
    justify-content: center;
  }
}

[data-light-theme] .dw-listing-back {
  background: rgba(255,255,255,0.95);
  color: #111;
  border-color: rgba(0,0,0,0.10);
}
[data-light-theme] .dw-listing-back:hover {
  background: rgba(255,255,255,1);
}

/* ═══════════ dwello V2 — Listing detail (§5): desktop 2-col + mobile "Glance", one responsive structure ═══════════ */
.dwv2-det { background: var(--dw-cream); padding: 6px 34px 40px; font-family: var(--dw-font-v2-body); }
.dwv2-det-backbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 11px 0; background: var(--dw-cream); box-shadow: 0 1px 0 rgba(36,19,25,0.08); }
.dwv2-det-backbar .dwv2-det-back { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 14px; color: var(--dw-ink); text-decoration: none; cursor: pointer; }
.dwv2-det-backbar img { justify-self: center; height: 48px; width: auto; display: block; }
.dwv2-det-backbar .dwv2-det-baracts { justify-self: end; display: flex; gap: 18px; font-size: 12.5px; font-weight: 600; color: var(--dw-ink-2); }
.dwv2-det-backbar .dwv2-det-baracts span { cursor: pointer; }
.dwv2-det-hero { position: relative; height: 430px; border-radius: 14px; overflow: hidden; background-color: #6f6353; background-size: cover; background-position: center; }
.dwv2-det-hero-acts { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 13px; z-index: 2; }
.dwv2-det-hero-pill { position: absolute; top: 14px; left: 14px; z-index: 2; max-width: 70%; background: var(--dw-burgundy); color: #F4EDE7; font-family: var(--dw-font-v2-display); font-weight: 600; font-size: 12.5px; padding: 7px 13px; border-radius: 9px; box-shadow: 0 2px 8px rgba(20,12,16,0.22); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dwv2-det-hero-glass { position: absolute; bottom: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.dwv2-det-glass { background: rgba(20,12,16,0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 12px; padding: 9px 15px; border-radius: 10px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.dwv2-det-body { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 30px; align-items: stretch; }
.dwv2-det-main { min-width: 0; }
.dwv2-det-hdr { padding: 22px 0 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dwv2-det-eyebrow { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dw-burgundy); }
.dwv2-det-pricerow { display: flex; align-items: baseline; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.dwv2-det-price { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 34px; letter-spacing: -0.03em; line-height: 1; color: var(--dw-ink); }
.dwv2-det-struck { font-family: var(--dw-font-v2-display); font-weight: 600; font-size: 19px; color: var(--dw-muted-warm); text-decoration: line-through; text-decoration-color: rgba(36,19,25,0.42); }
.dwv2-det-specs { font-size: 17px; color: var(--dw-ink); margin-top: 13px; }
.dwv2-det-specs b { font-weight: 700; }
.dwv2-det-addr { font-size: 14.5px; color: var(--dw-ink-2); margin-top: 5px; }
.dwv2-det-status { font-family: var(--dw-font-v2-body); font-weight: 700; font-size: 16px; white-space: nowrap; flex: 0 0 auto; padding-top: 3px; }
.dwv2-det-human { display: none; font-size: 14px; line-height: 1.5; color: var(--dw-ink-2); margin-top: 13px; }
.dwv2-det-human .dwv2-script { font-family: var(--dw-font-accent); font-size: 27px; line-height: 0.6; color: var(--dw-burgundy); }
.dwv2-det-nav { position: sticky; top: 70px; z-index: 20; background: var(--dw-cream); display: flex; align-items: center; gap: 22px; border-bottom: 1px solid rgba(36,19,25,0.12); margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.dwv2-det-nav::-webkit-scrollbar { display: none; }
.dwv2-det-nav a { font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13px; padding: 11px 0; color: var(--dw-ink-2); border-bottom: 2.5px solid transparent; white-space: nowrap; text-decoration: none; cursor: pointer; }
.dwv2-det-nav a.is-on, .dwv2-det-nav a:hover { color: var(--dw-ink); border-bottom-color: var(--dw-burgundy); }
.dwv2-det-card { background: #fff; border: 1px solid rgba(36,19,25,0.08); border-radius: 16px; padding: 22px 22px 20px; margin-top: 16px; box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 6px 16px rgba(36,19,25,0.05); }
.dwv2-det-card h3 { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 19px; color: var(--dw-ink); margin: 0 0 15px; }
.dwv2-det-fgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px 16px; }
.dwv2-det-fact { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.3; color: var(--dw-ink); }
.dwv2-det-fact::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--dw-burgundy); flex: 0 0 auto; margin-top: 7px; }
.dwv2-det-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.dwv2-det-chip { background: var(--dw-burgundy-wash); color: var(--dw-burgundy); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 999px; }
.dwv2-det-desc { font-size: 14px; line-height: 1.6; color: var(--dw-ink-2); margin-top: 16px; }
.dwv2-det-desc-cite { font-size: 11.5px; color: var(--dw-muted-warm); margin-top: 10px; }
.dwv2-det-sec-h { font-family: var(--dw-font-v2-display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--dw-ink); margin: 22px 0 12px; }
.dwv2-det-map { position: relative; height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(36,19,25,0.10); box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 6px 16px rgba(36,19,25,0.05); }
.dwv2-det-mls { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(36,19,25,0.12); }
.dwv2-det-rail-card { position: sticky; top: 88px; margin-top: 22px; background: #fff; border: 1px solid rgba(36,19,25,0.10); border-radius: 16px; box-shadow: 0 1px 2px rgba(36,19,25,0.04), 0 10px 26px rgba(36,19,25,0.10); padding: 18px; }
.dwv2-det-btn-primary { width: 100%; background: var(--dw-cta); color: #fff; border: none; border-radius: 11px; padding: 12px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; display: block; text-align: center; transition: background 140ms; }
.dwv2-det-btn-primary:hover { background: var(--dw-burgundy); }
.dwv2-det-btn-ghost { width: 100%; margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 7px; background: transparent; color: var(--dw-burgundy); border: 1.5px solid var(--dw-burgundy); border-radius: 11px; padding: 10px; font-family: var(--dw-font-v2-display); font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.dwv2-det-btn-ghost:hover { background: var(--dw-burgundy-wash); }
.dwv2-det-similar { margin-top: 34px; }
.dwv2-det-similar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dwv2-det-bottombar { display: none; }
@media (max-width: 900px) {
  .dwv2-det { padding: 0 0 calc(74px + env(safe-area-inset-bottom)); }
  .dwv2-det-backbar { padding: 10px 16px; }
  .dwv2-det-backbar img { height: 30px; }
  .dwv2-det-nav { top: 50px; }
  .dwv2-det-backbar .dwv2-det-baracts { display: none; }
  .dwv2-det-hero { height: 300px; border-radius: 0; }
  .dwv2-det-body { grid-template-columns: 1fr; gap: 0; }
  .dwv2-det-main { padding: 0 16px; }
  .dwv2-det-rail { display: none; }
  .dwv2-det-hdr { padding: 18px 0 4px; }
  .dwv2-det-price { font-size: 30px; }
  .dwv2-det-specs { font-size: 15px; }
  .dwv2-det-human { display: block; }
  .dwv2-det-fgrid { grid-template-columns: 1fr 1fr; }
  .dwv2-det-nav { padding: 0 16px; margin: 6px -16px 0; }
  .dwv2-det-similar-grid { grid-template-columns: 1fr; }
  .dwv2-det-bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 9px; padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); background: rgba(251,246,241,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(36,19,25,0.10); }
  .dwv2-det-bottombar .dwv2-det-btn-primary { flex: 1; }
  .dwv2-det-bottombar .dwv2-det-btn-ghost { flex: 0 0 auto; width: auto; margin-top: 0; padding: 12px 16px; }
}
