/* RealEstates.Report - warm, family-first design system (still a data-science platform: every metric, chart and caveat stays).
   Light = "Daylight": cream paper, terracotta, sage and sunshine.   Dark = "Evening": warm lamplit browns, never cold or neon.
   Fonts are self-hosted (Fraunces + Nunito, SIL OFL). Chart palettes: categorical values follow the validated palette; the sequential ramp is sage green;
   diverging is blue <-> terracotta with a neutral middle. Status colours are reserved and always paired with an icon + label. */
@font-face { font-family: "Fraunces"; src: url("../vendor/fonts/fraunces-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../vendor/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../vendor/fonts/nunito-normal.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root, :root[data-theme="light"] {
  --side: 266px; --r: 26px; --r-sm: 18px;
  --plane: #faf4e8; --surface: #fffdf7; --surface-2: #f6efe0; --surface-3: #ece1cc; --panel: rgba(255,253,247,.96);
  --line: rgba(95,62,35,.10); --line-2: rgba(95,62,35,.20);
  --ink: #3a2e27; --ink-2: #6b5c50; --ink-3: #96877a;
  --acc: #bd5a3c; --acc-2: #bd5a3c; --acc-3: #5e9167; --sun: #f2b94e; --coral: #e88a80; --sky: #8bb8d4;
  --acc-wash: rgba(189,90,60,.10); --acc-ink: #a74a2d;
  --grad: linear-gradient(135deg, #c6603f, #b04d31); --grad-soft: linear-gradient(135deg, rgba(189,90,60,.13), rgba(242,185,78,.16));
  --panel-shadow: 0 1px 2px rgba(95,62,35,.05), 0 16px 34px -20px rgba(120,80,40,.30);
  --panel-hover: 0 2px 4px rgba(95,62,35,.06), 0 22px 42px -20px rgba(120,80,40,.38);
  --dot-ring: rgba(58,46,39,.30);
  --good: #4e8a5f; --good-t: #3b7650; --warn: #a56700; --serious: #cf6a3f; --crit: #b02a3f; --crit-t: #b02a3f;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --lo: #3f86b5; --hi: #c0553b; --mid: #efe6d4;
  --seq0: #e8f1e5; --seq1: #cae0cb; --seq2: #98c4a0; --seq3: #5e9167; --seq4: #2f6540;
  --age0: #f2b95f; --age1: #ee9b78; --age2: #df8a90; --age3: #8fbbd6; --age4: #5b8bb0;
  --kg-green: linear-gradient(135deg, #5a8f64, #3e6e4a); --kg-terra: linear-gradient(135deg, #cb6444, #ad4a2f);
  --kg-sun: linear-gradient(135deg, #f1c05a, #dc9a30); --kg-coral: linear-gradient(135deg, #d77880, #b94f5b); --kg-sky: linear-gradient(135deg, #6c9fc2, #4a82a8);
  --art-halo: #fae3bd; --art-sun: #f4bf5c; --art-far: #93bf9b; --art-near: #5e9167; --art-roof: #bf5a3f; --art-wall: #fff3df; --art-door: #e2a93c; --art-win: #85b6d6;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --plane: #1b1511; --surface: #251d18; --surface-2: #2d241e; --surface-3: #3a2e26; --panel: rgba(38,29,24,.94);
  --line: rgba(255,232,205,.09); --line-2: rgba(255,232,205,.18);
  --ink: #f7ede1; --ink-2: #cdbfae; --ink-3: #988979;
  --acc: #e07a58; --acc-2: #e07a58; --acc-3: #86bb8c; --sun: #f6c25f; --coral: #ee8f86; --sky: #8fbbd6;
  --acc-wash: rgba(224,122,88,.15); --acc-ink: #f0a184;
  --grad: linear-gradient(135deg, #d2674a, #b9533a); --grad-soft: linear-gradient(135deg, rgba(224,122,88,.20), rgba(246,194,95,.14));
  --panel-shadow: inset 0 1px 0 rgba(255,240,220,.05), 0 20px 42px -24px rgba(0,0,0,.65);
  --panel-hover: inset 0 1px 0 rgba(255,240,220,.07), 0 26px 50px -24px rgba(0,0,0,.75);
  --dot-ring: rgba(255,240,220,.26);
  --good: #5f9e72; --good-t: #8fcf9a; --warn: #f6c25f; --crit: #d9677a; --crit-t: #ff8d9a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --lo: #4a95c6; --hi: #e0725a; --mid: #4a3d33;
  --seq0: #1f3327; --seq1: #2d4e39; --seq2: #41704f; --seq3: #5f9f70; --seq4: #a9dab3;
  --age0: #f2b95f; --age1: #ee9b78; --age2: #df8a90; --age3: #8fbbd6; --age4: #5b8bb0;
  --kg-green: linear-gradient(135deg, #5a8f64, #3b6a47); --kg-terra: linear-gradient(135deg, #cb6444, #a94529);
  --kg-sun: linear-gradient(135deg, #e8b34f, #cf8f2a); --kg-coral: linear-gradient(135deg, #d27680, #b24d59); --kg-sky: linear-gradient(135deg, #6aa1c6, #4a7ea3);
  --art-halo: #4f3f27; --art-sun: #f5be5a; --art-far: #8dbb95; --art-near: #5a8d65; --art-roof: #bf5a3f; --art-wall: #fff1dd; --art-door: #e3a83b; --art-win: #85b6d6;
  color-scheme: dark;
}
:root[data-side="collapsed"] { --side: 76px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
body { margin: 0; color: var(--ink); font: 400 15px/1.6 var(--font); background-color: var(--plane); position: relative; isolation: isolate; }
/* a soft, warm atmosphere: gentle sun-glow top-right and a sage haze bottom-left; drifts very slowly (compositor-only) */
body::before { content: ""; position: fixed; inset: -8%; z-index: -1; pointer-events: none;
  background: radial-gradient(620px 420px at 94% -6%, rgba(244,191,92,.30), transparent 62%), radial-gradient(900px 560px at 2% 108%, rgba(120,170,128,.20), transparent 62%), radial-gradient(700px 480px at 50% 0%, rgba(232,138,128,.10), transparent 60%); }
:root[data-theme="dark"] body::before { background: radial-gradient(640px 440px at 94% -8%, rgba(244,191,92,.14), transparent 62%), radial-gradient(900px 560px at 2% 110%, rgba(120,180,130,.11), transparent 62%), radial-gradient(700px 480px at 50% 0%, rgba(224,122,88,.08), transparent 60%); }
.anim body::before { animation: drift 80s ease-in-out infinite alternate; } @keyframes drift { to { transform: translate3d(1.2%, 1.6%, 0) scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .anim body::before { animation: none; } }

a { color: var(--acc-ink); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.12; letter-spacing: -.01em; font-weight: 700; font-optical-sizing: auto; } h1 { font-size: 28px; } h2 { font-size: 20px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pos { color: var(--good-t); } .neg { color: var(--crit-t); } .warn { color: var(--warn); } .acc { color: var(--acc-ink); }
.lbl { font: 700 12.5px/1.3 var(--font); color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.glow, .strip .v, .big, .tile .v { text-shadow: none !important; }                       /* numbers never glow */

/* ---------- shell: floating sidebar card + content ---------- */
.shell { display: grid; grid-template-columns: calc(var(--side) + 28px) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .28s cubic-bezier(.3,.8,.3,1); }
.side { position: sticky; top: 14px; align-self: start; margin: 14px 0 14px 14px; height: calc(100vh - 28px); border-radius: 30px; padding: 18px 13px 14px;
  display: flex; flex-direction: column; gap: 4px; overflow: hidden auto; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--panel-shadow); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 4px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand img { height: 30px; width: auto; flex: none; } .brand .txt { min-width: 0; } .brand b { display: block; font: 700 15.5px var(--serif); letter-spacing: -.01em; white-space: nowrap; } .brand b em { font-style: normal; color: var(--acc); } .brand i { display: block; font-size: 11.5px; color: var(--ink-3); font-style: normal; white-space: nowrap; }
.side-toggle { flex: none; width: 32px; height: 32px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.side-toggle:hover { background: var(--acc-wash); color: var(--acc-ink); }
.side-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .28s; }
.sec { margin: 16px 10px 4px; font: 800 11px var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 18px; color: var(--ink-2); font-weight: 700; white-space: nowrap; border: 1px solid transparent; transition: background .2s, color .2s; }
.side a.nav svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side a.nav:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side a.nav[aria-current="page"] { background: var(--grad-soft); color: var(--ink); border-color: var(--line-2); } .side a.nav[aria-current="page"] svg { stroke: var(--acc); }
.side .foot { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
/* collapsed: icon rail */
:root[data-side="collapsed"] .side { padding-left: 9px; padding-right: 9px; }
:root[data-side="collapsed"] .brand-row { flex-direction: column; gap: 10px; padding-bottom: 10px; }
:root[data-side="collapsed"] .brand .txt, :root[data-side="collapsed"] .nav .t, :root[data-side="collapsed"] .sec, :root[data-side="collapsed"] .foot .small, :root[data-side="collapsed"] .theme-switch .name { display: none; }
:root[data-side="collapsed"] .side a.nav { justify-content: center; padding: 12px 0; }
:root[data-side="collapsed"] .side-toggle svg { transform: rotate(180deg); }
:root[data-side="collapsed"] .theme-switch { justify-content: center; padding: 8px 4px; }
:root[data-side="collapsed"] .theme-switch .track { width: 50px; }
:root[data-theme="light"][data-side="collapsed"] .theme-switch .thumb { transform: translateX(20px); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 1200; display: flex; align-items: center; gap: 14px; padding: 14px 32px 10px; background: transparent; }
.crumb { font: 800 13px var(--font); color: var(--ink-2); white-space: nowrap; }
.grow { flex: 1; }
.search { position: relative; width: min(560px, 46vw); }
.search input { width: 100%; height: 44px; padding: 0 48px 0 20px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; box-shadow: var(--panel-shadow); }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 4px var(--acc-wash), var(--panel-shadow); }
.search kbd { position: absolute; right: 15px; top: 11px; font: 11px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 7px; padding: 0 7px; background: var(--surface-2); }
.sugg { position: absolute; left: 0; right: 0; top: 50px; z-index: 1300; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 24px 56px -20px rgba(80,50,25,.40); max-height: 64vh; overflow: auto; }
.sugg[hidden] { display: none; } .sugg .lbl { padding: 12px 18px 4px; }
.sugg [role=option] { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 18px; cursor: pointer; }
.sugg [role=option][aria-selected=true], .sugg [role=option]:hover { background: var(--acc-wash); }
.sugg .act { color: var(--acc-ink); border-top: 1px solid var(--line); font-weight: 700; }
.tgl { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none; font-weight: 600; }
.tgl i { width: 34px; height: 19px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.tgl i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink-3); transition: transform .2s, background .2s; }
.tgl[aria-checked=true] i { background: var(--acc-wash); border-color: var(--acc); } .tgl[aria-checked=true] i::after { transform: translateX(15px); background: var(--acc); }
.ibtn { height: 34px; min-width: 34px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; cursor: pointer; font: inherit; padding: 0 10px; }
.ibtn:hover { color: var(--ink); background: var(--surface-2); }
.content { padding: 6px 32px 110px; }
.burger { display: none; }

/* ---------- warm hero (home) ---------- */
.hero2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 32px; align-items: center; padding: 18px 4px 6px; }
.kicker { font: 800 11.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hero2 h1 { font-size: clamp(36px, 4.6vw, 66px); line-height: 1.03; letter-spacing: -.02em; margin: 12px 0 16px; font-weight: 700; }
.hero2 h1 em { font-style: italic; color: var(--acc); font-weight: 600; }
.hero2 .lead { font-size: 18px; color: var(--ink-2); max-width: 560px; margin: 0 0 16px; }
.calm { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font: 700 13px var(--font); color: var(--good-t); background: color-mix(in srgb, var(--acc-3) 16%, transparent); }
.art { width: 100%; max-width: 560px; justify-self: end; height: auto; display: block; }
.art .halo { fill: var(--art-halo); } .art .sun { fill: var(--art-sun); } .art .far { fill: var(--art-far); } .art .near { fill: var(--art-near); } .art .roof { fill: var(--art-roof); } .art .wall { fill: var(--art-wall); } .art .door { fill: var(--art-door); } .art .win { fill: var(--art-win); }
.anim .art .sun, .anim .art .halo { transform-origin: 340px 150px; animation: breathe 7s ease-in-out infinite; } @keyframes breathe { 50% { transform: scale(1.04); } }
.gentle { display: flex; gap: 10px; padding: 14px 20px; border: 1px solid color-mix(in srgb, var(--sun) 45%, transparent); background: color-mix(in srgb, var(--sun) 16%, var(--surface)); border-radius: var(--r-sm); font-size: 14px; margin: 18px 0; color: var(--ink); }
.kcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 18px 0 8px; }
.kcard { position: relative; overflow: hidden; border-radius: var(--r); padding: 22px 24px 22px; color: #fff; min-height: 190px; box-shadow: var(--panel-shadow); }
.kcard::after { content: ""; position: absolute; right: -30px; bottom: -44px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.17); }
.kcard h3 { font: 700 18px var(--serif); color: inherit; letter-spacing: 0; text-transform: none; }
.kcard .v { font: 700 46px/1.1 var(--serif); margin: 12px 0 8px; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.kcard p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 22em; position: relative; z-index: 1; opacity: .96; }
.kcard.green { background: var(--kg-green); } .kcard.terra { background: var(--kg-terra); } .kcard.coral { background: var(--kg-coral); }
.kcard.sun { background: var(--kg-sun); color: #3a2a12; }
.anim .kcard { transition: transform .25s, box-shadow .25s; } .anim .kcard:hover { transform: translateY(-4px); box-shadow: var(--panel-hover); }
.eyebrow { font: 800 11.5px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.panel .sub { color: var(--ink-2); font-size: 14px; margin: 6px 0 14px; max-width: 62ch; }
.panel .serif { font: 700 26px/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 8px; }
.budget { font: 700 40px var(--serif); color: var(--acc); margin: 6px 0 4px; font-variant-numeric: lining-nums; }
input[type=range].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px; border: 0; padding: 0; background: linear-gradient(90deg, var(--acc) var(--p, 50%), var(--surface-3) var(--p, 50%)); cursor: pointer; box-shadow: none; }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 4px solid var(--acc); box-shadow: 0 2px 8px rgba(80,50,25,.3); cursor: grab; }
input[type=range].slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 4px solid var(--acc); cursor: grab; }
.brows { display: grid; gap: 9px; margin-top: 14px; }
.brow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 118px; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; transition: opacity .25s; } .brow.off { opacity: .42; }
.brow .t { height: 14px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .brow .t i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4f8a5c, #8fbf9a); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.brow .e { text-align: right; font-variant-numeric: tabular-nums; } .brow .e small { display: block; font-weight: 600; color: var(--ink-3); font-size: 11px; line-height: 1.1; }
.pace { display: flex; height: 26px; border-radius: 99px; overflow: hidden; margin: 14px 0 10px; gap: 2px; } .pace i { display: block; height: 100%; min-width: 4px; }
.pacelegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); } .pacelegend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.scards { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; margin-top: 14px; }
.scard { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--panel-shadow); transition: transform .25s, box-shadow .25s; color: inherit; display: block; }
.scard:hover { text-decoration: none; box-shadow: var(--panel-hover); } .anim .scard:hover { transform: translateY(-4px); }
.scard .artw { position: relative; height: 112px; } .scard .artw svg { position: absolute; left: 0; bottom: -1px; width: 100%; height: 56px; }
.scard .body { padding: 14px 16px 16px; } .scard h4 { margin: 0 0 10px; font: 700 19px var(--serif); letter-spacing: -.01em; }
.scard dl { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 14px; margin: 0; justify-content: start; } .scard dt { font-size: 11.5px; font-weight: 700; color: var(--ink-3); } .scard dd { margin: 0; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.heart { position: absolute; right: 12px; top: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.92); color: #9a8b7e; font-size: 18px; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(60,40,20,.22); transition: transform .2s, color .2s; }
.heart:hover { transform: scale(1.1); } .heart[aria-pressed=true] { color: #c0392b; }
.fam { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1100; display: flex; align-items: center; gap: 22px; padding: 11px 22px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 14px 34px -14px rgba(80,50,25,.45); color: var(--ink); font-weight: 800; font-size: 14px; backdrop-filter: blur(10px); }
.fam:hover { text-decoration: none; border-color: var(--acc); } .fam small { font-weight: 600; color: var(--ink-3); font-size: 12px; } .fam .hrt { color: #c0392b; margin-right: 6px; }

/* ---------- briefing / pills / tabs ---------- */
.greet { font: 700 34px var(--serif); letter-spacing: -.02em; margin: 4px 0 2px; } .greet span { color: var(--acc); font-style: italic; }
.dataline { font: 600 13px var(--font); color: var(--ink-3); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.dataline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good-t); display: inline-block; margin-right: 7px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--good-t) 18%, transparent); }
.headline { display: flex; gap: 16px; align-items: flex-start; margin: 10px 0 18px; }
.headline p { margin: 0; font-size: 17.5px; line-height: 1.55; max-width: 1100px; font-weight: 600; } .headline p b { color: var(--acc-ink); font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 99px; font: 800 12px var(--font); white-space: nowrap; border: 1px solid transparent; }
.pill.good { color: var(--good-t); background: color-mix(in srgb, var(--good-t) 14%, transparent); } .pill.bad { color: var(--crit-t); background: color-mix(in srgb, var(--crit-t) 13%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--sun) 24%, transparent); } .pill.info { color: var(--acc-ink); background: var(--acc-wash); } .pill.mute { color: var(--ink-3); border: 1px dashed var(--line-2); }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-3); border: 0; }
.tabs button { all: unset; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 12.5px; color: var(--ink-2); transition: background .2s, color .2s; } .tabs button + button { border: 0; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed=true], .tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(80,50,25,.2); }
:root[data-theme="dark"] .tabs button[aria-pressed=true], :root[data-theme="dark"] .tabs button[aria-selected=true] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- KPI strip + panels ---------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--panel-shadow); overflow: hidden; }
.strip .cell { padding: 16px 20px 15px; border-left: 1px solid var(--line); min-width: 0; } .strip .cell:first-child { border-left: 0; }
.strip .v { font: 700 28px/1.15 var(--serif); letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.strip .s { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.panel { position: relative; min-width: 0; padding: 22px 24px 24px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--panel-shadow); transition: box-shadow .25s, transform .25s; }
.panel:hover { box-shadow: var(--panel-hover); }
.anim .panel:hover { transform: translateY(-2px); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-h .lbl { font: 700 18px/1.25 var(--serif); color: var(--ink); letter-spacing: -.01em; display: inline-flex; align-items: center; }
.panel-h .lbl::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); margin-right: 10px; flex: none; }
.panel-h .meta { font-size: 12.5px; color: var(--ink-3); text-align: right; }
.panel .note { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; }
.big { font: 700 36px/1.1 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.read { display: grid; grid-template-columns: 1fr 1.3fr 1.2fr; gap: 34px; margin-top: 28px; padding: 22px 6px 0; border-top: 1px solid var(--line); }
.read .lbl { font: 700 16px var(--serif); color: var(--ink); }
.take { display: grid; grid-template-columns: 82px 1fr; gap: 6px 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); } .take b { font: 700 22px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.spot { border-left: 4px solid var(--acc-3); padding: 4px 0 4px 16px; border-radius: 3px; }

/* ---------- property hero ---------- */
.hero { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: 20px; }
.vis { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); min-height: 360px; box-shadow: var(--panel-shadow); isolation: isolate; }
.vis .stage { position: absolute; inset: 0; } .vis img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis .badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; z-index: 500; flex-wrap: wrap; }
.vis .tabs { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); }
.vis .thumbs { position: absolute; right: 12px; bottom: 12px; z-index: 500; display: flex; gap: 6px; }
.vis .thumbs img { width: 58px; height: 44px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); } .vis .thumbs img[aria-current=true] { border-color: #fff; }
.ph-note { position: absolute; right: 12px; top: 12px; z-index: 500; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-2); color: var(--ink-2); background: color-mix(in srgb, var(--surface) 82%, transparent); white-space: nowrap; }
.chip.obs { color: var(--acc-ink); border-color: transparent; background: var(--acc-wash); } .chip.good { color: var(--good-t); border-color: transparent; background: color-mix(in srgb, var(--good-t) 15%, transparent); }
.chip.warn { color: var(--warn); border-color: transparent; background: color-mix(in srgb, var(--sun) 26%, transparent); } .chip.crit { color: var(--crit-t); border-color: transparent; background: color-mix(in srgb, var(--crit-t) 14%, transparent); }
.chip.nodata { color: var(--ink-3); border-style: dashed; background: transparent; }
.title-block h1 { font-size: 34px; } .price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 12px 0 8px; } .price-row .big { font-size: 48px; }

/* ---------- controls ---------- */
.btn { height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 800 13.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, box-shadow .2s, transform .2s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -10px rgba(176,77,49,.7); } .btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); } .btn[disabled] { opacity: .5; cursor: default; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
input[type=text], input[type=number], input[type=search], select { height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; min-width: 0; width: 100%; }
input:focus, select:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 3px var(--acc-wash); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; } .check input { accent-color: var(--acc); width: 17px; height: 17px; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(134px, 1fr)); gap: 12px; }
.filters { display: grid; gap: 14px; align-content: start; } .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.split { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 20px; align-items: start; }

/* ---------- tables ---------- */
.tbl { overflow: auto; border: 1px solid var(--line); border-radius: 18px; max-height: 560px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font: 800 12px var(--font); color: var(--ink-3); padding: 11px 13px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); position: sticky; top: 0; z-index: 2; white-space: nowrap; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; } th button { all: unset; cursor: pointer; } th button:hover { color: var(--ink); }
th[aria-sort=ascending] button::after { content: " \2191"; color: var(--acc); } th[aria-sort=descending] button::after { content: " \2193"; color: var(--acc); } th[aria-sort=none] button::after { content: " \2195"; opacity: .4; }
td { padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; } tr:last-child td { border-bottom: 0; }
tbody tr:hover, tbody tr.hl { background: var(--acc-wash); } td a { color: var(--ink); font-weight: 700; } td a:hover { color: var(--acc-ink); }
td.addr { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { display: inline-block; height: 5px; border-radius: 3px; background: var(--acc); vertical-align: middle; margin-left: 6px; opacity: .85; }

/* ---------- charts & misc ---------- */
.chart { width: 100%; display: block; } .chart text { fill: var(--ink-2); font: 600 11px var(--font); font-variant-numeric: tabular-nums; } .chart .strong { fill: var(--ink); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
canvas.plot { width: 100%; display: block; border-radius: 14px; }
.tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 14px 34px -12px rgba(80,50,25,.45); border-radius: 14px; padding: 9px 13px; font-size: 12.5px; max-width: 280px; }
.tip b { color: var(--ink); } .tip .k { color: var(--ink-3); }
.map { height: 420px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; isolation: isolate; } .map.tall { height: 520px; }
.risk { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .risk .r { border: 1px dashed var(--line-2); border-radius: 18px; padding: 15px; } .risk .r.ok { border: 1px solid color-mix(in srgb, var(--good-t) 45%, transparent); background: color-mix(in srgb, var(--good-t) 8%, transparent); } .risk .r.bad { border: 1px solid color-mix(in srgb, var(--crit-t) 55%, transparent); background: color-mix(in srgb, var(--crit-t) 9%, transparent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; font-size: 13.5px; } .kv dt { color: var(--ink-2); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.banner { display: flex; gap: 10px; padding: 13px 18px; border: 1px solid color-mix(in srgb, var(--sun) 45%, transparent); background: color-mix(in srgb, var(--sun) 15%, var(--surface)); border-radius: var(--r-sm); font-size: 14px; margin-bottom: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.3s linear infinite; border-radius: 12px; min-height: 18px; } @keyframes sk { to { background-position: -200% 0; } }
.empty { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 200px; color: var(--ink-2); padding: 10px; } .empty .glyph { font-size: 30px; color: var(--ink-3); }
dialog { border: 1px solid var(--line-2); border-radius: 24px; background: var(--surface); color: var(--ink); padding: 22px; max-width: 420px; box-shadow: 0 30px 70px -20px rgba(80,50,25,.55); } dialog::backdrop { background: rgba(40,24,12,.5); backdrop-filter: blur(3px); }

/* map: theme-aware (street tiles get a warm night tint in Evening; imagery is untouched) */
:root[data-theme="dark"] .tiles-street { filter: invert(.9) sepia(.4) hue-rotate(-12deg) saturate(.75) brightness(.92) contrast(.92); }
.leaflet-container { background: var(--surface-2); font-family: var(--font); }
.leaflet-bar a, .leaflet-control-layers { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line-2) !important; }
.leaflet-tooltip { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 10px 28px -10px rgba(80,50,25,.45); border-radius: 12px; font-family: var(--font); }
.leaflet-tooltip-top::before { border-top-color: var(--surface); } .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-3) !important; } .leaflet-control-attribution a { color: var(--acc-ink) !important; }

/* sidebar theme switch: sun over a warm day sky / moon over a lamplit evening */
.theme-switch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; text-align: left; transition: box-shadow .2s, border-color .2s; }
.theme-switch:hover { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-wash); }
.theme-switch .track { position: relative; width: 56px; height: 30px; border-radius: 99px; flex: none; overflow: hidden; border: 1px solid var(--line-2); transition: background .35s; background: linear-gradient(135deg, #3b2a3f, #7a4a52 60%, #e0875a); }
:root[data-theme="light"] .theme-switch .track { background: linear-gradient(135deg, #ffe7ae, #ffd9b8 55%, #f7c6b4); }
.theme-switch .thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; transition: transform .35s cubic-bezier(.3,.8,.3,1), background .35s, box-shadow .35s; background: linear-gradient(135deg, #fff4e0, #e8cfae); box-shadow: 0 0 12px rgba(255,225,180,.6); }
:root[data-theme="light"] .theme-switch .thumb { transform: translateX(26px); background: linear-gradient(135deg, #fff2b8, #f6b73c); box-shadow: 0 0 14px rgba(246,183,60,.7); }
.theme-switch svg { width: 13px; height: 13px; stroke: #4a3220; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch .moon { display: block; } .theme-switch .sun { display: none; } :root[data-theme="light"] .theme-switch .moon { display: none; } :root[data-theme="light"] .theme-switch .sun { display: block; stroke: #8a4b00; }
.theme-switch .name { display: flex; flex-direction: column; line-height: 1.2; } .theme-switch .name b { font-size: 13.5px; } .theme-switch .name i { font-size: 11.5px; color: var(--ink-3); font-style: normal; }

/* ---------- motion ---------- */
.anim .reveal { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; } @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.anim .grow-w { transition: width .9s cubic-bezier(.2,.7,.2,1); } .anim .needle { transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.anim .pop { animation: pop .5s both; } @keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .anim .reveal, .anim .pop, .skeleton, .anim .art .sun, .anim .art .halo { animation: none !important; } .anim .grow-w, .anim .needle, .shell { transition: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1200px) { .c3, .c4 { grid-column: span 6; } .c5, .c7, .c8 { grid-column: span 12; } .hero { grid-template-columns: 1fr; } .read { grid-template-columns: 1fr; } .hero2 { grid-template-columns: 1fr; } .art { justify-self: center; max-width: 420px; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 1400; top: 10px; bottom: 10px; left: 10px; margin: 0; height: auto; width: 276px; transform: translateX(-120%); transition: transform .28s; }
  .side.open { transform: none; }
  :root[data-side="collapsed"] .side .t, :root[data-side="collapsed"] .side .brand .txt { display: inline; } :root[data-side="collapsed"] .side .sec, :root[data-side="collapsed"] .side .foot .small { display: block; } :root[data-side="collapsed"] .side a.nav { justify-content: flex-start; padding: 11px 13px; } :root[data-side="collapsed"] .theme-switch .name { display: flex; }
  .side-toggle { display: none; } .burger { display: inline-flex; } .content { padding: 6px 14px 110px; } .top { padding: 10px 14px; } .crumb { display: none; } .search { width: auto; flex: 1; }
  .c3, .c4, .c6 { grid-column: span 12; } .split { grid-template-columns: 1fr; } .tgl span { display: none; } .fam small { display: none; } .brow { grid-template-columns: 38px minmax(0, 1fr) 96px; }
}
@media print {
  .side, .top, .no-print, .tabs, .btn, .fam, .heart { display: none !important; } .shell { display: block; } body { background: #fff; color: #000; font-size: 11px; } body::before { display: none; } .content { padding: 0; }
  .panel, .strip { border-color: #ccc; background: #fff; box-shadow: none; break-inside: avoid; } .map, .vis, .art { display: none; } .g12 { display: block; } .panel { margin-bottom: 10px; } a { color: #000; } .chart text { fill: #333; }
}
td.num, th.num { white-space: nowrap; }


/* ---------- property page: warm cards, gradient price bar, comfortable-numbers lab ---------- */
.kcard.sky { background: var(--kg-sky); }
.kcards.p .kcard { min-height: 168px; padding: 20px 22px; } .kcards.p .kcard .v { font-size: 40px; margin: 8px 0 6px; } .kcards.p .kcard p { font-size: 13px; }
.gbar { position: relative; height: 16px; border-radius: 99px; margin: 22px 4px 8px; background: linear-gradient(90deg, #6a9c71, #e9b84e 52%, #d2674a); }
.gbar .mk { position: absolute; top: -6px; width: 10px; height: 28px; margin-left: -5px; border-radius: 6px; background: var(--surface); border: 3px solid var(--ink); box-shadow: 0 3px 8px rgba(60,40,20,.35); }
.glabels { position: relative; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); height: 20px; margin: 0 2px; font-weight: 600; }
.glabels .mid { position: absolute; transform: translateX(-50%); color: var(--ink-3); }
details.more { margin-top: 14px; border-top: 1px dashed var(--line-2); padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 800; font-size: 13px; color: var(--acc-ink); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::before { content: "\25B8"; transition: transform .2s; } details.more[open] > summary::before { transform: rotate(90deg); }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 34px; margin: 6px 0 18px; }
.sl .slh { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 15px; margin-bottom: 8px; } .sl .slh b { font-family: var(--serif); font-size: 17px; }
.ftiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.ftile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px 15px; min-width: 0; }
.ftile .k { font-size: 12.5px; font-weight: 700; color: var(--ink-3); } .ftile .v { font: 700 28px/1.15 var(--serif); margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: lining-nums; } .ftile .s { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.panel h2.serif + .sub { margin-top: 0; }
