/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --img-bg: #f3f2ee;
  --ink: #141413;
  --ink-2: #52514e;
  --muted: #8a8983;
  --line: #e5e3dc;
  --line-2: #d6d3ca;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-soft: #e6effb;
  --good: #0a7a2f;
  --good-soft: #e3f3e7;
  --warn: #9a5b00;
  --warn-soft: #fdf1d8;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --grid: #ebe9e3;
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 4px 16px rgba(20, 20, 19, .05);
  --shadow-lg: 0 2px 4px rgba(20, 20, 19, .05), 0 12px 32px rgba(20, 20, 19, .09);
  --r: 14px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --img-blend: multiply;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110; --surface: #1a1a19; --surface-2: #222220; --img-bg: #f3f2ee;
    --ink: #f4f3ee; --ink-2: #c3c2b7; --muted: #8f8e86; --line: #2b2b29; --line-2: #3a3a37;
    --accent: #5b9bea; --accent-ink: #8ab8f2; --accent-soft: #1b2a3d;
    --good: #5cc983; --good-soft: #15291c; --warn: #f0b44c; --warn-soft: #2e2412;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #262624;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110; --surface: #1a1a19; --surface-2: #222220; --img-bg: #f3f2ee;
  --ink: #f4f3ee; --ink-2: #c3c2b7; --muted: #8f8e86; --line: #2b2b29; --line-2: #3a3a37;
  --accent: #5b9bea; --accent-ink: #8ab8f2; --accent-soft: #1b2a3d;
  --good: #5cc983; --good-soft: #15291c; --warn: #f0b44c; --warn-soft: #2e2412;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #262624;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.4);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { max-width: 1320px; margin: 0 auto; padding: 0 28px 80px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand-bg { fill: var(--ink); stroke: none; }
.brand-edge { stroke: var(--bg); stroke-width: 2; }
.brand-node { fill: var(--bg); stroke: none; }
.brand-hot { fill: var(--accent); stroke: none; }
.tabs { display: flex; gap: 4px; }
.tabs a { white-space: nowrap; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.index-pill { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.index-pill .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 7px; vertical-align: 1px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 18px; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- hero + search bar ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 600; line-height: 1.08; letter-spacing: -.03em; }
.hero h1 em, .h1-sm em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-ink); letter-spacing: -.01em; }
.searchbar { margin: 34px auto 0; max-width: 760px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-lg); transition: border-color .15s, box-shadow .15s; }
.searchbar:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft); }
.sb-icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.searchbar input[type=text] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 10px 4px; }
.searchbar input::placeholder { color: var(--muted); }
.sb-cam { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 12px; padding: 9px 12px; color: var(--ink-2); font-weight: 500; flex: none; }
.sb-cam:hover { color: var(--ink); border-color: var(--line-2); }
.sb-cam svg { width: 18px; height: 18px; }
.sb-go { border: 0; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 20px; font-weight: 600; flex: none; }
.sb-go:hover { opacity: .9; }
.query-chip { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 10px; padding: 4px 6px 4px 4px; max-width: 46%; flex: none; }
.query-chip img { width: 30px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--img-bg); }
.query-chip span { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.query-chip button { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; padding: 0 4px; }
.suggest { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.suggest button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.suggest button:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.ctl { display: flex; flex-direction: column; gap: 6px; }
.ctl > label { font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ctl .hint { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 4px; }
.ctl.disabled { opacity: .4; pointer-events: none; }
.ctl-filter { margin-left: auto; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 13px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg-sm button { padding: 4px 10px; font-size: 12.5px; }
.ef-row { display: flex; align-items: center; gap: 10px; height: 34px; }
.ef-row output { min-width: 34px; text-align: right; font-weight: 500; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 170px; height: 4px; border-radius: 4px; outline: none;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--line-2) var(--fill, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.toggles { display: flex; gap: 14px; height: 34px; align-items: center; }
.tog { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; font-weight: 500; }
.tog input { display: none; }
.tog span { width: 30px; height: 18px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; }
.tog span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tog input:checked + span { background: var(--accent); }
.tog input:checked + span::after { transform: translateX(12px); }
.filter-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 7px 13px; font-weight: 500; color: var(--ink-2); }
.filter-btn:hover, .filter-btn[aria-expanded=true] { color: var(--ink); border-color: var(--line-2); }
.filter-btn svg { width: 16px; height: 16px; }
.badge { background: var(--ink); color: var(--bg); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 600; }

/* ---------- filters ---------- */
.filters { margin-top: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 28px; }
.facet h5 { margin: 0 0 8px; font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facet-wide { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { color: inherit; opacity: .55; font-family: var(--mono); font-size: 11px; }
.sw { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.chips-scroll { max-height: 92px; overflow-y: auto; }
.filters-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.link-btn { border: 0; background: none; color: var(--accent-ink); font-weight: 500; padding: 0; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat-k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-v { font-size: 26px; font-weight: 500; letter-spacing: -.02em; margin-top: 2px; }
.stat-v small { font-size: 14px; color: var(--muted); margin-left: 2px; }
.stat-s { font-size: 12px; color: var(--ink-2); margin-top: 2px; min-height: 18px; }
.stat-s .good { color: var(--good); font-weight: 500; }
.meter { height: 5px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 0; background: var(--good); border-radius: 4px; transition: width .3s; }
.meter i.partial { background: var(--warn); }

/* ---------- results ---------- */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 14px; }
.results-head h2 { font-size: 18px; font-weight: 600; }
.results-head h2 q { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 21px; }
.ghost-btn { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 7px 12px; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.ghost-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--line-2); }
.ghost-btn:disabled { opacity: .45; cursor: default; }
.ghost-btn svg { width: 16px; height: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; position: relative;
  transition: transform .18s, box-shadow .18s, border-color .18s; animation: rise .35s both; cursor: pointer; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card-img { aspect-ratio: 3 / 4; background: var(--img-bg); display: grid; place-items: center; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: var(--img-blend); transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.rank { position: absolute; top: 9px; left: 9px; font-family: var(--mono); font-size: 11px; color: #52514e; background: rgba(255,255,255,.85);
  border-radius: 6px; padding: 1px 6px; }
.score { position: absolute; top: 9px; right: 9px; font-family: var(--mono); font-size: 11px; color: #141413; background: rgba(255,255,255,.9);
  border-radius: 6px; padding: 1px 6px; }
.approx { position: absolute; bottom: 9px; left: 9px; font-size: 10.5px; font-weight: 600; color: #7a4800; background: #fdf1d8;
  border-radius: 6px; padding: 2px 7px; display: flex; align-items: center; gap: 4px; }
.more { position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 6px); opacity: 0; transition: .18s;
  background: #141413; color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.card:hover .more { opacity: 1; transform: translate(-50%, 0); }
.card-body { padding: 11px 12px 12px; }
.card-name { font-weight: 500; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px; }
.card-meta { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.card-meta .sw { width: 10px; height: 10px; }
.scorebar { height: 3px; background: var(--surface-2); border-radius: 3px; margin-top: 9px; overflow: hidden; }
.scorebar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.skeleton .card-img { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton .card-name { height: 14px; width: 80%; background: var(--surface-2); border-radius: 4px; min-height: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

.missed { margin-top: 36px; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.missed-head { margin-bottom: 14px; }
.missed-head h3 { font-size: 15px; font-weight: 600; }
.missed-head p { margin: 2px 0 0; }
.grid-ghost .card { opacity: .78; }
.grid-ghost .card:hover { opacity: 1; }

/* ---------- sweep ---------- */
.sweep { margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; animation: rise .3s both; }
.sweep-head { display: flex; justify-content: space-between; gap: 16px; }
.sweep-head h3 { font-size: 15px; font-weight: 600; }
.sweep-head p { margin: 3px 0 0; font-size: 13px; }
.sweep-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
figure { margin: 0; }
figcaption { font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: 220px; position: relative; }
.chart-lg { height: 380px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-family: var(--mono); font-size: 11px; stroke: none; }
.chart .axis-title { fill: var(--muted); font-size: 11.5px; stroke: none; }
.chart .ref { stroke: var(--ink-2); stroke-width: 1; opacity: .55; }
.chart .ref-text { fill: var(--ink-2); font-size: 11px; stroke: none; }
.chart .series { stroke-width: 2; fill: none; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot-hit { fill: transparent; stroke: none; cursor: pointer; }
.chart .end-label { font-size: 12px; font-weight: 500; fill: var(--ink); stroke: none; }
.chart .band { fill: var(--good-soft); stroke: none; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-lg); max-width: 260px; }
.tooltip b { font-weight: 600; }
.tooltip .mono { opacity: .9; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.refkey { height: 0; border-top: 1px solid var(--ink-2); opacity: .6; }

/* ---------- benchmark page ---------- */
.page-head { padding: 44px 0 22px; max-width: 760px; }
.h1-sm { font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.lede { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 28px; font-weight: 500; letter-spacing: -.02em; margin-top: 4px; font-family: var(--mono); }
.kpi .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.kpi.hero-kpi { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kpi.hero-kpi .k, .kpi.hero-kpi .s { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.kpi.hero-kpi .v { font-size: 20px; line-height: 1.35; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.panel h3 { font-size: 15px; font-weight: 600; }
.panel p.muted { margin: 3px 0 12px; font-size: 13px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-row .panel { margin-bottom: 16px; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 128px 1fr 70px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .lbl { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.bar-row .val { font-family: var(--mono); font-size: 12px; color: var(--ink); text-align: right; }
.bar-track { height: 14px; position: relative; }
.bar-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--series-1); }
.bar-row.ref .bar-track i { background: var(--line-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
th:hover { color: var(--ink); }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
td { font-family: var(--mono); }
tr.rec td { background: var(--good-soft); }
.tag { font-family: var(--font); font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 1px 6px; background: var(--good); color: var(--surface); margin-left: 6px; }
.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); }

/* ---------- how page ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; position: relative; }
.flow-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.flow-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 12px; font-weight: 500; }
.flow-step h4 { margin: 12px 0 6px; font-size: 15px; font-weight: 600; }
.flow-step p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.knobs dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; margin: 14px 0 0; }
.knobs dt { font-weight: 500; color: var(--accent-ink); }
.knobs dd { margin: 0; color: var(--ink-2); }
.index-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-family: var(--mono); font-size: 16px; margin-top: 2px; }

/* ---------- overlays ---------- */
.drop-overlay { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px);
  display: grid; place-items: center; }
.drop-overlay div { border: 2px dashed var(--accent); border-radius: 24px; padding: 60px 80px; font-size: 18px; font-weight: 500; color: var(--accent-ink);
  background: var(--surface); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-lg); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stats, .kpis { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr 1fr; }
  .panel-row, .sweep-charts { grid-template-columns: 1fr; }
  .index-pill { display: none; }
}
@media (max-width: 600px) {
  main { padding: 0 16px 60px; }
  .topbar-inner { padding: 10px 16px; gap: 14px; }
  .brand span { display: none; }
  .tabs a { padding: 6px 8px; font-size: 13px; }
  .hero { padding: 32px 0 20px; }
  .searchbar { padding-left: 12px; flex-wrap: wrap; }
  .sb-cam span { display: none; }
  .query-chip { max-width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .flow { grid-template-columns: 1fr; }
  .ctl-filter { margin-left: 0; }
  input[type=range] { width: 130px; }
  .knobs dl { grid-template-columns: 1fr; gap: 2px; }
  .knobs dd { margin-bottom: 10px; }
  .bar-row { grid-template-columns: 100px 1fr 56px; }
}
