/* =========================================================================
   Tokens — bold, high-contrast, image-led
   ========================================================================= */
:root {
  --paper: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #eeebe4;
  --surface-3: #e2ded4;
  --ink: #111110;
  --ink-2: #3d3b36;
  --ink-3: #6f6b62;
  --line: #e0dbd0;
  --accent: #0d5b43;          /* deep green: actions, "good" */
  --accent-ink: #ffffff;
  --accent-soft: #dcebe4;
  --accent-soft-ink: #0b4533;
  --warn: #b45309;
  --warn-soft: #f8ead6;
  --warn-ink: #7a3d06;
  --focus: #2f6fdb;
  --scrim: rgba(17, 17, 16, .55);
  /* data (validated: #2f6fdb on #fff light, #4a8ae6 on #1b1d1c dark) */
  --v-now: #2f6fdb; --v-track: #dcd7cc; --v-range: #c9c3b6; --v-surface: var(--paper);
  /* categorical (validated adjacent order, light surface #fff) */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c-other: #b9b4a9;

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.5rem; --fs-2xl: 2.25rem;
  --fs-3xl: clamp(2.4rem, 1.6rem + 3.2vw, 4rem);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(17, 17, 16, .08);
  --shadow-2: 0 12px 32px rgba(17, 17, 16, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f100f; --surface: #1b1d1c; --surface-2: #232625; --surface-3: #2e3230;
    --ink: #f2f0ea; --ink-2: #cdc9c0; --ink-3: #9a958b; --line: #2e3230;
    --accent: #6fd0a6; --accent-ink: #062117; --accent-soft: #173027; --accent-soft-ink: #a8e4c8;
    --warn: #f0a44d; --warn-soft: #34261a; --warn-ink: #f6c58c; --focus: #7aa7f0; --scrim: rgba(0, 0, 0, .66);
    --v-now: #4a8ae6; --v-track: #3a3f3c; --v-range: #555b57; --v-surface: var(--paper);
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c-other: #55504a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --paper: #0f100f; --surface: #1b1d1c; --surface-2: #232625; --surface-3: #2e3230;
  --ink: #f2f0ea; --ink-2: #cdc9c0; --ink-3: #9a958b; --line: #2e3230;
  --accent: #6fd0a6; --accent-ink: #062117; --accent-soft: #173027; --accent-soft-ink: #a8e4c8;
  --warn: #f0a44d; --warn-soft: #34261a; --warn-ink: #f6c58c; --focus: #7aa7f0; --scrim: rgba(0, 0, 0, .66);
  --v-now: #4a8ae6; --v-track: #3a3f3c; --v-range: #555b57; --v-surface: var(--paper);
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c-other: #55504a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55);
}

/* =========================================================================
   Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-md)/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s3); z-index: 100; }

/* =========================================================================
   Primitives
   ========================================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 48px; padding: 0 var(--s5);
  border-radius: var(--r-pill); border: 0; font-weight: 700; font-size: var(--fs-md); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn svg { font-size: 1.15em; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { opacity: .88; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); cursor: pointer; font-size: 19px; }
.link-btn { background: none; border: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: var(--s2); font-size: var(--fs-sm); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 var(--s3) 0 var(--s4); border-radius: var(--r-pill); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap; }
.pill:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.pill.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.pill.on svg { color: var(--paper); }
.pill svg { color: var(--ink-3); font-size: 16px; }
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg button { height: 32px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill); background: transparent; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--paper); }

.pop { position: relative; }
.pop-panel { display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; min-width: 260px; background: var(--surface);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--s5); }
.pop.open .pop-panel { display: block; }
.pop-wide { min-width: min(560px, calc(100vw - 32px)); }
.pop-note { color: var(--ink-3); font-size: var(--fs-xs); margin-bottom: var(--s3); }
.pop-row { display: flex; gap: var(--s3); }
.pop-row label { display: grid; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); flex: 1; }
.pop-row select { height: 44px; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); padding: 0 var(--s2); min-width: 120px; }
.choice { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice button { height: 38px; padding: 0 var(--s4); border-radius: var(--r-pill); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.choice button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px var(--s4); }
.checks label { display: flex; align-items: center; gap: var(--s3); padding: 8px 0; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.checks label svg { font-size: 18px; color: var(--ink-2); }
.checks input { width: 18px; height: 18px; accent-color: var(--ink); }
.checks .n { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs); }

/* condition: one short line filled to the level, the word beside it */
.cond { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.cond i { position: relative; width: 34px; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cond i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--ink); border-radius: 4px; }
.cond.low i::after { background: var(--warn); }

/* feature icon chip: icon + short word, no box clutter */
.feat { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.feat svg { font-size: 18px; color: var(--accent); }
.feat.warn svg { color: var(--warn); }

/* =========================================================================
   Top bar + hero
   ========================================================================= */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); max-width: var(--maxw); margin: 0 auto; padding: var(--s4) var(--gutter); }
.wordmark { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; font-size: var(--fs-lg); font-weight: 500; letter-spacing: -.02em; }
.wordmark img { width: 34px; height: 34px; border-radius: 10px; display: block; }
.wordmark span { font-size: 20px; letter-spacing: -.03em; }
.wordmark b { font-weight: 800; }
.hero { max-width: 980px; margin: 0 auto; padding: var(--s7) var(--gutter) var(--s6); text-align: center; }
.hero-title { text-wrap: balance; font-family: var(--font-display); font-weight: 500; font-size: var(--fs-3xl); line-height: 1.02; letter-spacing: -.03em; }
.hero-sub { color: var(--ink-2); margin-top: var(--s4); font-size: var(--fs-lg); }
body.searched .hero { padding-top: 0; padding-bottom: var(--s4); }
body.searched .hero-title, body.searched .hero-sub, body.searched .examples, body.searched .ex-pills { display: none; }
.search { position: relative; display: flex; align-items: center; gap: var(--s2); margin-top: var(--s6); background: var(--surface); border-radius: var(--r-pill);
  padding: 8px 8px 8px 56px; box-shadow: var(--shadow-2), inset 0 0 0 1.5px var(--line); }
body.searched .search { margin-top: 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.search:focus-within { box-shadow: var(--shadow-2), inset 0 0 0 2px var(--ink); }
.search-ico { position: absolute; left: 22px; font-size: 22px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none; font-size: var(--fs-lg); font-weight: 500; }
.search input::placeholder { color: var(--ink-3); font-weight: 400; }
.search input::-webkit-search-cancel-button { display: none; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; max-width: 980px; margin: var(--s6) auto 0; }
/* stickers: die-cut white edge, a soft drop shadow, a slight turn; reaching for one straightens and lifts it */
.sticker { border: 0; cursor: pointer; padding: 11px 18px 12px; border-radius: 16px; font: 700 15px/1.25 var(--font-ui); letter-spacing: -.005em;
  text-align: left; color: #111110; background: var(--sk); transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 0 0 3px #fff, 0 6px 14px -4px rgba(20, 20, 10, .28), 0 1px 2px rgba(20, 20, 10, .12);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1), box-shadow .45s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
.sticker:hover, .sticker:focus-visible { transform: rotate(0deg) translateY(-3px) scale(1.03);
  box-shadow: 0 0 0 3px #fff, 0 14px 26px -8px rgba(20, 20, 10, .32), 0 2px 4px rgba(20, 20, 10, .12); outline: none; }
.sticker:active { transform: rotate(0deg) scale(.97); transition-duration: .1s; }
.sticker.s0 { --sk: #e4fe53; color: #1c2400; }
.sticker.s1 { --sk: #4aa5f6; }
.sticker.s2 { --sk: #e28564; }
.sticker.s3 { --sk: #0d5b43; color: #fff; }
.sticker.s4 { --sk: #f6e3c3; }
.sticker.s5 { --sk: #111110; color: #f5f3ee; }
:root[data-theme="dark"] .sticker { box-shadow: 0 0 0 3px #f2f0ea, 0 8px 18px -6px rgba(0, 0, 0, .6); }
/* wide screens: the stickers leave the row and scatter in the margins around the heading and the search box */
@media (min-width: 1400px) {
  .hero { position: relative; }
  .examples { position: absolute; inset: 0; margin: 0; max-width: none; display: block; pointer-events: none; }
  .sticker { position: absolute; max-width: 240px; pointer-events: auto; font-size: 14.5px; }
  .sticker:nth-child(1) { left: -214px; top: 9%; }
  .sticker:nth-child(2) { right: -214px; top: 12%; }
  .sticker:nth-child(3) { left: -196px; top: 34%; }
  .sticker:nth-child(4) { right: -214px; top: 38%; }
  .sticker:nth-child(5) { left: -212px; top: 60%; }
  .sticker:nth-child(6) { right: -216px; top: 62%; }
  .sticker:nth-child(7) { left: -212px; top: 84%; }
  .sticker:nth-child(8) { right: -210px; top: 86%; }
}
@media (max-width: 640px) { .sticker { font-size: 13.5px; padding: 9px 14px 10px; } .sticker:nth-child(n+6) { display: none; } .examples { gap: 12px 10px; } }
@media (prefers-reduced-motion: reduce) { .sticker, .sticker:hover, .sticker:active { transition: none; transform: none; } }

/* toolbar */
.toolbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
.toolbar > * { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.understood { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding-top: var(--s3); }
.understood:empty { display: none; }
.understood .lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-right: var(--s1); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--s2) 0 var(--s3); border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-soft-ink); border: 0; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.chip svg { font-size: 14px; opacity: .7; }
.understood .note { font-size: var(--fs-xs); font-weight: 600; color: var(--warn-ink); background: var(--warn-soft); border-radius: var(--r-sm); padding: 5px var(--s2); }
.filters { display: flex; align-items: center; gap: var(--s2); padding-top: var(--s3); padding-bottom: var(--s3); }

/* =========================================================================
   Results + card
   ========================================================================= */
.results-wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--s4) var(--gutter) var(--s8); }
.results-head { margin-bottom: var(--s5); }
.results-meta { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.01em; }
.results-meta small { display: block; font-family: var(--font-ui); font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-top: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s7) var(--s5); }
.divider { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s4); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.empty { grid-column: 1 / -1; text-align: center; padding: var(--s8) var(--s4); color: var(--ink-2); }
.empty h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); color: var(--ink); margin-bottom: var(--s2); }
.more-wrap { display: flex; justify-content: center; margin-top: var(--s7); }

.card { position: relative; display: flex; flex-direction: column; gap: var(--s3); cursor: pointer; min-width: 0; }
.card.weak { opacity: .82; }
.card-media { position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-3); }
.card-track { display: flex; height: 100%; transition: transform .4s var(--ease); }
.card-track img { width: 100%; height: 100%; flex: none; object-fit: cover; }
.card:hover .card-track img:first-child { transform: none; }
.card-media .noimg { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: var(--fs-sm); }
.card-nav { position: absolute; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: var(--r-pill); border: 0; background: #fff; color: #111;
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s var(--ease); box-shadow: var(--shadow-1); }
.card-nav.prev { left: var(--s3); } .card-nav.next { right: var(--s3); }
.card:hover .card-nav, .card-nav:focus-visible { opacity: 1; }
@media (hover: none) { .card-nav { display: none; } .card-track { overflow-x: auto; scroll-snap-type: x mandatory; } .card-track img { scroll-snap-align: start; } }
.card-dots { position: absolute; bottom: var(--s3); left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.card-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.card-dots i.on { background: #fff; }
.card-badge { position: absolute; top: var(--s3); left: var(--s3); background: #fff; color: #111; font-size: var(--fs-xs); font-weight: 700; padding: 5px 10px; border-radius: var(--r-pill); box-shadow: var(--shadow-1); }
.card-body { display: grid; gap: 6px; padding: 0 4px; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.card-price { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.card-price small { font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); }
.card-specs { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
.card-addr { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-snip { font-size: var(--fs-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-snip mark { background: none; color: var(--ink); font-weight: 700; }
.card-feats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: 4px; }

/* =========================================================================
   Listing page
   ========================================================================= */
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; }
.sheet-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) var(--gutter); background: var(--paper); }
.sheet-bar .btn { height: 42px; padding: 0 var(--s4); }
.sheet-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }

.hero-photo { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.hero-main { position: relative; width: 100%; aspect-ratio: 16 / 8; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-3); border: 0; padding: 0; cursor: zoom-in; display: block; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-main .count { position: absolute; right: var(--s4); bottom: var(--s4); background: #fff; color: #111; font-weight: 700; font-size: var(--fs-sm); padding: 8px var(--s4); border-radius: var(--r-pill); display: inline-flex; gap: 6px; align-items: center; }
.thumbs { display: flex; gap: var(--s2); margin-top: var(--s2); overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: none; width: 112px; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); cursor: pointer; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .hero-photo { padding: 0; } .hero-main { border-radius: 0; aspect-ratio: 4 / 3; } .thumbs { padding: 0 var(--gutter); } .thumbs button { width: 84px; } }

.listing { max-width: var(--maxw); margin: 0 auto; padding: var(--s6) var(--gutter) var(--s8); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s7); align-items: start; }
@media (max-width: 1000px) {
  .listing { grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding-top: var(--s4); }   /* minmax(0,…): the room rail must not widen the page */
  .listing-side { order: -1; }
  .side-card { position: static; box-shadow: none; background: none; padding: 0; gap: var(--s3); }
  .side-card .side-rows, .side-card .btn, .side-card .side-agent { display: none; }
}
.eyebrow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; }
.listing-head h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); line-height: 1.1; margin-top: var(--s2); letter-spacing: -.025em; }
.listing-addr { color: var(--ink-2); margin-top: var(--s2); font-size: var(--fs-lg); }
.glance { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); margin-top: var(--s5); padding-top: var(--s4); border-top: 1.5px solid var(--line); }
.glance div { display: grid; gap: 4px; }
.glance b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.glance span { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.glance .cond { margin-top: 6px; }

.side-card { position: sticky; top: var(--s5); background: var(--surface); border-radius: var(--r-lg); padding: var(--s6) var(--s5); box-shadow: var(--shadow-2); display: grid; gap: var(--s4); }
.side-price { font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.side-price small { display: block; font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); margin-top: 6px; letter-spacing: 0; }
.side-rows { display: grid; gap: var(--s2); font-size: var(--fs-sm); margin: 0; }
.side-rows div { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-top: 1.5px solid var(--line); }
.side-rows dt { color: var(--ink-3); font-weight: 500; }
.side-rows dd { margin: 0; font-weight: 700; text-align: right; }
.side-card .btn { width: 100%; }
.side-agent { font-size: var(--fs-sm); color: var(--ink-3); }

.block { padding: var(--s7) 0 0; }
.block > h2, .block summary h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; letter-spacing: -.02em; }
.block-lede { color: var(--ink-2); margin-top: var(--s2); max-width: 64ch; }
.block-plain { padding: var(--s5) 0; border-top: 1.5px solid var(--line); margin-top: var(--s5); }
.block-plain > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.block-plain > summary::-webkit-details-marker { display: none; }
.block-plain > summary h2 { font-size: var(--fs-xl); }
.block-plain > summary .sum { margin-left: auto; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; text-align: right; }
.block-plain > summary::after { content: ""; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); rotate: 45deg; margin: 0 6px 6px; transition: rotate .2s var(--ease); flex: none; }
.block-plain[open] > summary::after { rotate: 225deg; margin-bottom: 0; }
.prose { white-space: pre-line; color: var(--ink-2); margin-top: var(--s3); max-width: 70ch; }
.sub-h { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin: var(--s6) 0 var(--s3); }
.caveat { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s4); max-width: 70ch; }

/* The home */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3) var(--s5); margin-top: var(--s5); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: var(--s4); overflow-x: auto; padding-bottom: var(--s3); margin-top: var(--s4); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.room { scroll-snap-align: start; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.room-photo { border: 0; padding: 0; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--surface-3); }
.room-photo img { width: 100%; height: 100%; object-fit: cover; }
.room-body { padding: var(--s4); display: grid; gap: var(--s3); }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.room-head h3 { font-size: var(--fs-lg); font-weight: 700; }
.room-key { display: grid; gap: 6px; font-size: var(--fs-sm); }
.room-key div { display: flex; align-items: center; gap: var(--s2); }
.room-key svg { font-size: 17px; color: var(--ink-3); }
.room details summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; list-style: none; }
.room details summary::-webkit-details-marker { display: none; }
.room details summary::after { content: " +"; }
.room details[open] summary::after { content: " −"; }
.room-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--s3); margin: var(--s2) 0 0; font-size: var(--fs-xs); }
.room-rows dt { color: var(--ink-3); } .room-rows dd { margin: 0; }

/* The area */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 var(--s7); margin-top: var(--s4); }
.key { padding: var(--s4) 0; border-top: 1.5px solid var(--line); }
.key .v-head { flex-direction: column; gap: 2px; }
.key .v-label { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.key .v-value { font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.v-row { padding: var(--s3) 0; }
.v-row + .v-row { border-top: 1.5px solid var(--line); }
.v-head { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); }
.v-label { font-weight: 600; }
.v-value { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.v-period, .v-foot { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; font-family: var(--font-ui); letter-spacing: 0; }
.v-svg { display: block; width: 100%; height: auto; overflow: visible; margin: var(--s2) 0 4px; }
.v-track { stroke: var(--v-track); stroke-width: 2; stroke-linecap: round; }
.v-band { stroke: var(--v-range); stroke-width: 6; stroke-linecap: round; }
.v-median { stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; }
.v-move { stroke: var(--v-now); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.v-then { fill: var(--v-surface); stroke: var(--v-now); stroke-width: 2; }
.v-now { fill: var(--v-now); stroke: var(--v-surface); stroke-width: 2.5; }
.v-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; margin-top: var(--s4); }
.v-legend svg { width: 26px; height: 14px; vertical-align: middle; margin-right: 4px; }
.panel { margin-top: var(--s3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s5) var(--s4); margin-top: var(--s5); }
.tile { background: none; padding: 0; border: 0; text-align: left; cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); align-items: baseline; }
.tile > svg { grid-row: span 3; align-self: start; margin-top: 4px; }
.tile:hover span, .tile[aria-expanded="true"] span { text-decoration: underline; text-underline-offset: 3px; }
.tile svg { font-size: 22px; color: var(--ink-2); }
.tile b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.tile span { font-size: var(--fs-sm); font-weight: 600; }
.tile small { font-size: var(--fs-xs); color: var(--ink-3); }
.tile.zero b { color: var(--ink-3); }
.tile-list { margin-top: var(--s3); }
.gauge-row { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s5); }
.gauge { width: 132px; height: 76px; }
.gauge .bg { stroke: var(--v-track); stroke-width: 12; }
.gauge .fg { stroke: var(--ink); stroke-width: 12; }
.gauge text { fill: var(--ink); stroke: none; font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.gauge-cap b { display: block; font-size: var(--fs-lg); }
.gauge-cap span { color: var(--ink-3); font-size: var(--fs-sm); }

.p-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.p-table td { padding: 9px 4px; border-top: 1.5px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.p-table tr:first-child td { border-top: 0; }
.p-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 4.4rem; color: var(--ink-2); font-weight: 600; }
.p-table td.p-name { font-weight: 600; }
.p-table td.p-name .sub { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; font-weight: 500; }
.p-table td.pillcell { width: 6.6rem; text-align: right; }
.p-table tr.more { display: none; }
.p-table.all tr.more { display: table-row; }
.p-more { margin-top: var(--s2); background: none; border: 0; padding: 4px 0; color: var(--ink); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rating { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--ink); }
.rating.hi { background: var(--accent); color: var(--accent-ink); }
.rating.lo { background: var(--warn-soft); color: var(--warn-ink); }
.kv2 td:first-child { width: 58%; color: var(--ink-3); font-weight: 500; }
.kv2 td.num { width: auto; white-space: normal; text-align: right; color: var(--ink); }
.chips-s { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--s2) 0; }
.chip-s { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }
.hs-notes { font-size: var(--fs-sm); color: var(--ink-2); margin: var(--s3) 0; }
details.inner > summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); margin-top: var(--s3); }

/* stacked composition bars (census) */
.stack { display: grid; gap: var(--s3); margin-top: var(--s3); }
.stack-row { display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); align-items: center; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); }
.stack-bar { display: flex; height: 10px; border-radius: 10px; overflow: hidden; gap: 2px; }
.stack-bar i { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px var(--s4); font-size: var(--fs-xs); margin-top: var(--s3); color: var(--ink-2); }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 9, .97); display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; }
.viewer figure { margin: 0; display: grid; justify-items: center; gap: var(--s3); padding: var(--s6) 0; }
.viewer img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: var(--r-sm); }
.viewer figcaption { color: #e7e4dd; font-size: var(--fs-sm); font-weight: 600; }
.viewer .icon-btn { background: rgba(255, 255, 255, .12); box-shadow: none; color: #fff; justify-self: center; }
.viewer-close { position: absolute; top: var(--s4); right: var(--s4); }
@media (max-width: 640px) { .viewer { grid-template-columns: 44px 1fr 44px; } }

/* skeleton */
.skel .card-media { animation: pulse 1.2s ease-in-out infinite; }
.skel .line { height: 14px; border-radius: 4px; background: var(--surface-3); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.sm-only { display: none; }
@media (max-width: 760px) {
  .lg-only { display: none; } .sm-only { display: inline; }
  .toolbar { backdrop-filter: none; background: var(--paper); }   /* a blur would trap the bottom-sheet popovers */
  .seg button, .chip { height: 40px; } .pill { height: 44px; } .link-btn { min-height: 44px; }
  .toolbar { display: flex; overflow-x: auto; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { max-width: none; margin: 0; padding-left: 0; padding-right: 0; flex: none; }
  .toolbar > .understood { padding-left: var(--gutter); flex-wrap: nowrap; padding-top: 0; }
  .toolbar > .filters { padding-right: var(--gutter); }
  .understood:not(:empty) + .filters { padding-left: var(--s2); }
  .understood:empty + .filters { padding-left: var(--gutter); }
  .understood .lbl, .understood .note { display: none; }
  .understood { align-items: center; }
  .hero { padding-top: var(--s5); }
  .results-meta { font-size: 1.25rem; }
  .grid { gap: var(--s6); }
  .card-price { font-size: 1.45rem; }
  .sheet-bar { padding: var(--s2) var(--s3); }
  .rail { grid-auto-columns: 78%; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .keys { gap: 0; }
  .filters { overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .pop { position: static; }
  .pop-panel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; min-width: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 72vh; overflow: auto; padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); }
  .pop-wide { min-width: 0; }
  .search { padding-left: 46px; }
  .search .btn { padding: 0 var(--s4); height: 44px; }
  .search-ico { left: 16px; }
  .listing-head h1 { font-size: 1.8rem; }
  .side-card { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =========================================================================
   Tune: preference ranking panel
   ========================================================================= */
.pill-tune[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.pill-tune[aria-pressed="true"] svg { color: var(--paper); }
.pill-tune svg { color: var(--ink); }
.results-wrap.tuning { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.results-col { min-width: 0; }
.tune { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; padding-right: var(--s2); scrollbar-width: thin; }
.tune-handle, .tune-close { display: none; }
.tune-head h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); letter-spacing: -.02em; }
.tune-lede { color: var(--ink-2); font-size: var(--fs-sm); margin: var(--s2) 0 var(--s4); }
.tune-group { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin: var(--s5) 0 var(--s1); }
.trow { padding: var(--s3) 0; border-top: 1.5px solid var(--line); }
.trow-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.trow-label { font-weight: 700; font-size: var(--fs-md); }
.trow-label small { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.trow.off .trow-label { color: var(--ink-3); font-weight: 600; }
/* importance: five notches, the last one is "Must" */
.imp { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); flex: none; }
.imp button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.imp button i { display: block; border-radius: 50%; background: var(--ink-3); opacity: .35; }
.imp button:nth-child(1) i { width: 5px; height: 5px; } .imp button:nth-child(2) i { width: 8px; height: 8px; }
.imp button:nth-child(3) i { width: 11px; height: 11px; } .imp button:nth-child(4) i { width: 14px; height: 14px; }
.imp button.on i { background: var(--ink); opacity: 1; }
.imp button.must { width: auto; padding: 0 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--ink-3); }
.imp button.must.on { background: var(--ink); color: var(--paper); }
.trow .target { margin-top: var(--s3); }
.target-ends { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.trow.off .target { display: none; }
/* range input: thin track, bold thumb */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); margin-top: -9px; box-shadow: var(--shadow-1); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); }
/* hard constraints: value + lock */
.hard { display: grid; gap: var(--s2); }
.hard-val { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.hard-val b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.lock { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 0; cursor: pointer; font-size: var(--fs-xs); font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.lock svg { font-size: 14px; }
.lock[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.place-in { display: flex; gap: var(--s2); }
.place-in input { flex: 1; min-width: 0; height: 40px; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); padding: 0 var(--s3); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: var(--s2); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); font-size: 18px; font-weight: 700; cursor: pointer; }
.words { width: 100%; min-height: 64px; resize: vertical; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); padding: var(--s2) var(--s3); font: inherit; font-size: var(--fs-sm); }
/* relax suggestions */
.relax { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.relax:empty { display: none; }
.relax button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--s3); border-radius: var(--r-pill); border: 0; background: var(--accent-soft); color: var(--accent-soft-ink); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.relax button svg { font-size: 15px; }
/* cards in tune mode: fit + match bars */
.card-fit { position: absolute; top: var(--s3); right: var(--s3); background: var(--ink); color: var(--paper); font-weight: 800; font-size: var(--fs-xs); padding: 5px 10px; border-radius: var(--r-pill); }
.mbars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--s4); margin-top: 6px; }
.mbar { display: grid; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.mbar i { display: block; height: 3px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.mbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--ink); border-radius: 3px; }
.mbar.unk { color: var(--ink-3); } .mbar.unk i::after { width: 0; }
.card.moving { transition: transform .45s var(--ease); }
.tune-fab { display: none; }

@media (max-width: 1000px) {
  .results-wrap.tuning { display: block; }
  /* frosted glass: the results stay visible (and visibly move) behind the controls */
  .tune { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 55; max-height: 55vh; border-radius: 26px 26px 0 0;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
    box-shadow: 0 -1px 0 color-mix(in srgb, var(--ink) 8%, transparent), 0 -18px 50px rgba(0, 0, 0, .16);
    padding: 0 var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .3s var(--ease); }
  .tune .trow { border-top-color: color-mix(in srgb, var(--ink) 10%, transparent); }
  .tune .imp { background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .tune .imp button { width: 34px; height: 34px; }
  .tune .imp button.must { height: 34px; padding: 0 12px; }
  .tune .lock:not([aria-pressed="true"]), .tune .stepper button, .tune .place-in input, .tune .words { background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .tune.open { transform: none; }
  .tune-handle { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 10px auto 6px; }
  .tune-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; padding: var(--s2) var(--s4); margin: 0 calc(-1 * var(--s4)); z-index: 1;
    background: color-mix(in srgb, var(--surface) 55%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .tune-close { background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: none; }
  .tune-close { display: inline-grid; }
  .tuning ~ .tune-fab, body.tune-on .tune-fab { display: inline-flex; position: fixed; left: 50%; translate: -50% 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; box-shadow: var(--shadow-2); }
  body.tune-open .tune-fab { display: none; }
}
body.tune-on .filters > :not(#tuneBtn):not(.seg) { display: none; }
body.tune-on .understood { display: none; }

.card-more { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); margin-top: 2px; }
.room-photo { position: relative; }
.room-more { position: absolute; right: 8px; bottom: 8px; background: #fff; color: #111; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }

.card-value { font-size: var(--fs-xs); font-weight: 800; }
.card-value.good { color: var(--accent); }
.card-value.high { color: var(--ink-3); }

.card-check { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 3px 8px; border-radius: var(--r-pill); margin-bottom: 2px; }
.card-check.m3 { background: var(--accent); color: var(--accent-ink); }
.card-check.m2 { background: var(--accent-soft); color: var(--accent-soft-ink); }
.card-check.m1 { background: var(--surface-2); color: var(--ink-2); }
.card-check.m0 { background: var(--warn-soft); color: var(--warn-ink); }
.judge-note { display: block; font-family: var(--font-ui); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; margin-top: 2px; }

/* ---------------------------------------------------------------- compare: card toggle + tray */
.card-cmp { position: absolute; top: 10px; left: 10px; z-index: 2; height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: rgba(255,255,255,.92); color: #111110; font: 700 12px var(--font-ui); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.18);
  opacity: 0; transition: opacity .15s; }
.card:hover .card-cmp, .card:focus-within .card-cmp, .card-cmp[aria-pressed="true"] { opacity: 1; }
.card-cmp[aria-pressed="true"] { background: #111110; color: #fff; }
@media (hover: none) { .card-cmp { opacity: 1; } }
.tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45; width: min(760px, calc(100% - 32px));
  display: flex; align-items: center; gap: var(--s3); padding: 10px 10px 10px 12px; border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); }
.tray[hidden] { display: none; }
.tray-homes { flex: 1; display: flex; gap: var(--s3); min-width: 0; overflow-x: auto; }
.tray-home { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 200px; }
.tray-img { position: relative; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--surface-3); flex: none; }
.tray-img img { width: 100%; height: 100%; object-fit: cover; }
.tray-pin { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; font-size: 9.5px; }
.tray-home:nth-child(1) .tray-pin { background: var(--h1); } .tray-home:nth-child(2) .tray-pin { background: var(--h2); } .tray-home:nth-child(3) .tray-pin { background: var(--h3); }
.tray-txt { display: grid; min-width: 0; font-size: var(--fs-xs); line-height: 1.3; }
.tray-txt b { font-size: var(--fs-sm); }
.tray-txt small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-x { border: 0; background: none; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.tray-x:hover { color: var(--ink); background: var(--surface-2); }
.tray-slot { align-self: center; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.tray-go { flex: none; }
.tray-go.disabled { opacity: .35; pointer-events: auto; cursor: not-allowed; }
body.tray-on .results-wrap { padding-bottom: 110px; }
@media (max-width: 640px) {
  .tray { bottom: 10px; padding: 8px; gap: 8px; }
  .tray-txt, .tray-slot { display: none; }
  .tray-home { flex: none; }
}

/* ---------------------------------------------------------------- account, save, gate */
.topbar { gap: var(--s2); }
.acct { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.acct-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; background: none; color: var(--ink);
  font: 700 var(--fs-sm) var(--font-ui); cursor: pointer; border-radius: var(--r-pill); }
.acct-link:hover { background: var(--surface); }
.acct-link svg, .save-btn svg, .side-save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.acct-in { height: 40px; }
.acct-menu { position: relative; }
.acct-me { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #e4fe53; color: #1c2400; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08); font: 800 var(--fs-sm) var(--font-ui); cursor: pointer; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 290px; padding: 6px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -18px rgba(20, 20, 10, .35); transform-origin: top right; animation: pop-in .32s cubic-bezier(.2, .9, .25, 1); }
@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.acct-pop[hidden] { display: none; }
.acct-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 10px 12px; }
.acct-who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-who small { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #e4fe53; color: #1c2400; font: 800 15px var(--font-ui); }
.acct-plan { height: 24px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font: 700 12px var(--font-ui); background: var(--surface-2); color: var(--ink-2); }
.acct-plan.plus { background: var(--ink); color: #e4fe53; }
.acct-grp { border-top: 1px solid var(--line); padding: 4px 0; }
.acct-grp > button, .acct-grp > a { display: flex; align-items: center; gap: 12px; width: 100%; text-decoration: none; text-align: left; border: 0; background: none;
  padding: 0 10px; height: 42px; border-radius: 12px; font: 600 14.5px var(--font-ui); color: var(--ink); cursor: pointer; }
.acct-grp > button:hover, .acct-grp > a:hover { background: var(--surface-2); }
.acct-grp svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acct-grp span { flex: 1; }
.acct-grp em { font-style: normal; color: var(--ink-3); font-weight: 500; font-size: 13px; }
.acct-plus svg { stroke: #0d5b43; }
:root[data-theme="dark"] .acct-plus svg { stroke: #6fd0a6; }
.acct-out { color: var(--ink-3) !important; }
.acct-out span { padding-left: 30px; }
@media (prefers-reduced-motion: reduce) { .acct-pop { animation: none; } }
.save-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #111110; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.save-btn[aria-pressed="true"] svg, .side-save[aria-pressed="true"] svg { fill: #e0443a; stroke: #e0443a; }
.side-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-bottom: var(--s2); }
.ai-note { display: block; font-size: 11px; font-style: italic; color: var(--ink-3); margin-top: 2px; }
.ai-note .link-btn { font-size: 11px; padding: 0; font-style: italic; }
.walk { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3) var(--s4); margin: var(--s3) 0 0; }
.walk dt { font-size: 12px; color: var(--ink-3); } .walk dd { margin: 0; font-weight: 700; }
.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(17,17,16,.45); padding: var(--s4); }
.gate[hidden] { display: none; }
.gate-card { position: relative; width: min(420px, 100%); background: var(--surface); border-radius: var(--r-lg); padding: var(--s6) var(--s5) var(--s5); display: grid; gap: var(--s3); }
.gate-card h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); }
.gate-card p { color: var(--ink-2); margin: 0; }
.gate-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; color: var(--ink-3); cursor: pointer; }
@media (max-width: 640px) { .acct-link span { display: none; } }

/* locked figures: the card stays, the number is a quiet lock */
.lk { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: .95em; min-height: 16px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-3); vertical-align: middle; cursor: pointer; }
.lk svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.key .v-value .lk { width: 96px; height: 1.6rem; }
.tile b .lk { width: 48px; }
.lk-track { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: var(--s3); }
.lk-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.lk-row:first-child { border-top: 0; }
.lk-note { display: flex; align-items: center; gap: 8px; font-size: 11px; font-style: italic; color: var(--ink-3); margin: var(--s2) 0 0; }
.lk-note .lk { width: 22px; cursor: default; }
.lk-note .link-btn { font-size: 11px; padding: 0; font-style: italic; }

/* AI search: the headline action */
.ai-btn { display: inline-flex; align-items: center; gap: 8px; }
.ai-btn svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.search-plain { height: 48px; }
.search-plain[hidden] { display: none; }
.ai-pitch { max-width: 620px; margin: var(--s4) auto 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; text-align: center; }
.ai-pitch:empty { display: none; }
.ai-pitch .link-btn { padding: 0; font-size: inherit; }
@media (max-width: 640px) { .search-plain { display: none; } .ai-btn span { display: none; } .ai-pitch { font-size: 12px; } }
.hero-eyebrow { display: block; text-align: center; font: 800 12px var(--font-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: var(--s3); }

/* ---------------------------------------------------------------- headline: the rolling AI name */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wheel { display: inline-block; vertical-align: bottom; height: 1.12em; overflow: hidden; text-align: left;
  transition: width .6s cubic-bezier(.2, .9, .25, 1); }
.wheel-in { display: flex; flex-direction: column; align-items: flex-start; transition: transform .6s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
.wheel-in > span { display: block; width: max-content; height: 1.12em; line-height: 1.12em; padding: 0 .06em; white-space: nowrap;
  background: linear-gradient(transparent 64%, #e4fe53 64%, #e4fe53 92%, transparent 92%); }
:root[data-theme="dark"] .wheel-in > span { background: linear-gradient(transparent 64%, rgba(228, 254, 83, .35) 64%, rgba(228, 254, 83, .35) 92%, transparent 92%); }
@media (prefers-reduced-motion: reduce) { .wheel, .wheel-in { transition: none; } }
/* narrow phones: the wordmark and the account links need room between them */
@media (max-width: 480px) {
  .wordmark img { width: 30px; height: 30px; }
  .wordmark span { font-size: 17px; }
  .acct { gap: 4px; margin-left: 12px; }
  .acct-link { padding: 0 8px; }
}

/* hero example searches, as in the approved design: small plain white pills in one quiet centred row */
.ex-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 700px; margin: 22px auto 0; }
.ex-pill { border: 0; cursor: pointer; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--ink, #111110);
  box-shadow: inset 0 0 0 1px #e0dbd0; font: 500 13px/1.3 var(--font-ui); }
.ex-pill:hover, .ex-pill:focus-visible { box-shadow: inset 0 0 0 1.5px #111110; outline: none; }
:root[data-theme="dark"] .ex-pill { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }

/* "Your AI ran a search": shown when the person's AI moves the page through the connector (static/live.js) */
.ai-note { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 60;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 14px/1.2 var(--font-ui);
  box-shadow: var(--shadow-2); transition: opacity .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
.ai-note.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .ai-note { transition: opacity .2s ease; transform: translate(-50%, 0); } }
