/* 2step console. Same system as the landing page: near-black, one blue, Space Grotesk over Inter. */
:root {
	color-scheme: dark;
	--page: oklch(14.5% 0.004 270); --panel: oklch(17.5% 0.005 270); --soft: oklch(21% 0.006 270); --ink: oklch(96% 0.003 270); --muted: oklch(72% 0.01 270); --faint: oklch(55% 0.01 270); --line: oklch(27% 0.006 270);
	--accent: oklch(68% 0.19 258); --accent-ink: oklch(15% 0.03 258); --accent-soft: oklch(27% 0.08 258);
	--detected: oklch(66% 0.2 25); --suspect: oklch(75% 0.15 60); --observed: oklch(70% 0.14 240); --errors: oklch(70% 0.15 295); --ok: oklch(76% 0.15 150);
	--detected-bg: oklch(25% 0.07 25); --suspect-bg: oklch(26% 0.06 60); --observed-bg: oklch(25% 0.06 240); --errors-bg: oklch(25% 0.07 295); --ok-bg: oklch(24.5% 0.05 150);
	--grid: oklch(23% 0.005 270); --scrim: rgba(0, 0, 0, .6);
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Space Grotesk", "Inter", system-ui, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
	color-scheme: light;
	--page: oklch(97% 0.003 270); --panel: oklch(100% 0 0); --soft: oklch(95% 0.004 270); --ink: oklch(18% 0.01 270); --muted: oklch(45% 0.012 270); --faint: oklch(62% 0.01 270); --line: oklch(89% 0.005 270);
	--accent: oklch(52% 0.2 258); --accent-ink: oklch(100% 0 0); --accent-soft: oklch(94% 0.04 258);
	--detected: oklch(55% 0.21 25); --suspect: oklch(65% 0.17 55); --observed: oklch(55% 0.16 250); --errors: oklch(52% 0.18 295); --ok: oklch(52% 0.15 150);
	--detected-bg: oklch(95% 0.03 25); --suspect-bg: oklch(95% 0.04 60); --observed-bg: oklch(94% 0.03 245); --errors-bg: oklch(94% 0.03 295); --ok-bg: oklch(94% 0.04 150);
	--grid: oklch(93% 0.004 270); --scrim: rgba(15, 17, 20, .38);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 14px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 13px; font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.error { color: var(--detected); margin-top: 8px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

input, select, button { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 6px 10px; min-height: 34px; }
button { cursor: pointer; font-weight: 550; }
button:hover:not(:disabled) { background: var(--soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.primary, a.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: var(--accent); opacity: .92; }
button.danger { background: var(--detected); border-color: var(--detected); color: #fff; }
button.danger:hover:not(:disabled) { background: var(--detected); opacity: .92; }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
button.ghost:hover:not(:disabled) { color: var(--ink); background: var(--soft); }
button.small { min-height: 26px; padding: 0 8px; font-size: 12px; }
a.button { display: inline-block; text-align: center; padding: 8px 14px; border-radius: 6px; font-weight: 600; }
a.button:hover { text-decoration: none; opacity: .92; }

.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn:hover:not(:disabled) { color: var(--ink); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }

/* ---- sign in */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(380px, 100%); display: grid; gap: 12px; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.login h1 { font-size: 22px; letter-spacing: -.01em; margin-top: 8px; }
.login details { color: var(--muted); }
.login summary { cursor: pointer; }
.login form { display: flex; gap: 8px; margin-top: 8px; }
.login form input { flex: 1; }

/* ---- shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 18px 12px; background: var(--panel); border-right: 1px solid var(--line); z-index: 30; }
.rail .brand { padding: 0 8px; }
#nav { display: grid; gap: 2px; }
#nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; text-align: left; }
#nav button:hover { background: var(--soft); color: var(--ink); }
#nav button.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
#nav button.on .ico { color: var(--accent); }
#nav .label { flex: 1; }
.rule { height: 1px; background: var(--line); margin: 8px 6px; }
.count { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
#nav button.on .count { background: var(--panel); }
.count.warn { background: var(--errors-bg); color: var(--ink); }
.rail-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }

.stage { min-width: 0; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--page); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 18px; letter-spacing: -.01em; margin-right: auto; white-space: nowrap; }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search input { width: 280px; padding-left: 34px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-height: 32px; padding: 0 11px; background: transparent; color: var(--muted); font-weight: 500; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.account { display: flex; align-items: center; gap: 4px; }
.menu-btn { display: none; }

#view { padding: 20px 24px 56px; display: grid; gap: 16px; max-width: 1360px; }
#view > section { display: grid; gap: 16px; }
.note { padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--suspect); border-radius: 6px; background: var(--panel); }

/* ---- panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head.pad { padding: 16px 16px 0; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cols .panel h2 { margin-bottom: 12px; }
.scroll { overflow-x: auto; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.more { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot { font-size: 13px; }

/* ---- tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; }
.tile { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 2px; }
.tile .name { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tile .swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tile b { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.02em; }
.tile .delta { font-size: 12.5px; color: var(--muted); }
.tile .delta.up { color: var(--ink); font-weight: 600; }

/* ---- chart */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--muted); font-size: 13px; margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; min-height: 220px; }
.chart svg { display: block; width: 100%; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover, .chart .hit.on { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.s-detected { fill: var(--detected); } .s-suspect { fill: var(--suspect); } .s-observed { fill: var(--observed); } .s-errors { fill: var(--errors); }
.chart .spike { fill: var(--ink); }
.chart .spike-label { fill: var(--ink); font-weight: 600; }
.chart.dim { opacity: .55; transition: opacity .15s; }
.swatch-detected, .legend .k-detected { background: var(--detected); } .swatch-suspect, .legend .k-suspect { background: var(--suspect); }
.swatch-observed, .legend .k-observed { background: var(--observed); } .swatch-errors, .legend .k-errors { background: var(--errors); }
.swatch-players { background: var(--accent); }

/* ---- tables */
table.grid { border-collapse: collapse; width: 100%; min-width: 720px; }
.grid th, .grid td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--soft); white-space: nowrap; }
.grid th.num, .grid td.num { text-align: right; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid.hover tbody tr { cursor: pointer; }
.grid.hover tbody tr:hover { background: var(--soft); }
.grid.hover tbody tr:focus-visible { outline-offset: -2px; }
.grid .when { white-space: nowrap; color: var(--muted); }
.grid .detail { max-width: 380px; overflow-wrap: anywhere; color: var(--muted); }
.grid .sub { display: block; margin: 0; font-size: 12px; }
.grid .who { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips > button { border-radius: 999px; min-height: 30px; padding: 0 12px; }
.chips > button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 650; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.check input { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }

/* ---- pills and tags */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--soft); color: var(--ink); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.detected { background: var(--detected-bg); } .pill.detected::before { background: var(--detected); }
.pill.suspect { background: var(--suspect-bg); } .pill.suspect::before { background: var(--suspect); }
.pill.observed { background: var(--observed-bg); } .pill.observed::before { background: var(--observed); }
.pill.error, .pill.invalid, .pill.missing, .pill.stuck, .pill.silent, .pill.timeout, .pill.invoke_error { background: var(--errors-bg); } .pill.error::before, .pill.invalid::before, .pill.missing::before, .pill.stuck::before, .pill.silent::before, .pill.timeout::before, .pill.invoke_error::before { background: var(--errors); }
.pill.high { background: var(--detected-bg); } .pill.high::before { background: var(--detected); }
.pill.medium { background: var(--suspect-bg); } .pill.medium::before { background: var(--suspect); }
.pill.low { background: var(--observed-bg); } .pill.low::before { background: var(--observed); }
.pill.none::before { background: var(--faint); }
.tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; background: var(--soft); color: var(--muted); font-weight: 500; }
.tag.banned { background: var(--detected-bg); color: var(--ink); }
.tag.weak { background: var(--suspect-bg); color: var(--ink); }

/* ---- ranked lists */
.rank { display: grid; gap: 10px; }
.rank .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.rank .row:hover { background: var(--soft); }
.rank .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .meter { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.rank .meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.rank .meter i.high { background: var(--detected); } .rank .meter i.medium { background: var(--suspect); } .rank .meter i.low { background: var(--observed); }
.rank .empty { padding: 16px 0; }

/* ---- drawer */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 50; display: flex; flex-direction: column; animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-title h2 { font-size: 17px; letter-spacing: -.01em; }
.drawer-title .sub { margin-top: 2px; }
.drawer-body { overflow-y: auto; padding: 16px 20px 32px; display: grid; gap: 20px; align-content: start; }
.block { display: grid; gap: 8px; }
.block > h3 { color: var(--muted); font-weight: 600; font-size: 13px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .unset { color: var(--faint); }
.why { display: grid; gap: 10px; }
.why .item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; }
.why .item header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.why .item header b { font-weight: 650; }
.why .item header .spacer { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.why .item p { color: var(--muted); font-size: 13px; }
.why .item q { display: block; margin-top: 2px; padding: 4px 8px; border-radius: 5px; background: var(--soft); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; quotes: none; }
.timeline { display: grid; gap: 0; }
.timeline .t { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.timeline .t:last-child { border-bottom: 0; }
.timeline .t span:first-child { color: var(--muted); }
.banform { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.banform .line { display: flex; gap: 8px; flex-wrap: wrap; }
.banform input { flex: 1 1 200px; background: var(--panel); }

/* ---- tooltip */
.tip { position: fixed; z-index: 60; pointer-events: none; min-width: 150px; padding: 8px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .12); font-size: 12.5px; }
.tip .when { color: var(--muted); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; }
.tip .r i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.tip .r b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }

/* ---- smaller screens */
@media (max-width: 1100px) {
	.app { grid-template-columns: 64px minmax(0, 1fr); }
	.rail { padding: 18px 8px; align-items: center; }
	.rail .brand span:last-child, #nav .label, #nav .count, .rail-foot span:last-child { display: none; }
	#nav button { justify-content: center; padding: 0; width: 44px; }
	.search input { width: 200px; }
}
@media (max-width: 720px) {
	.app { grid-template-columns: minmax(0, 1fr); }
	.rail { position: fixed; left: 0; top: 0; width: 236px; align-items: stretch; transform: translateX(-100%); transition: transform .18s; padding: 18px 12px; }
	.rail .brand span:last-child, #nav .label, #nav .count, .rail-foot span:last-child { display: initial; }
	#nav button { justify-content: flex-start; padding: 0 10px; width: 100%; }
	.rail-open .rail { transform: none; }
	.rail-open .scrim { display: block; }
	.menu-btn { display: inline-flex; }
	.bar { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
	.bar h1 { flex: 1; }
	.search { order: 5; flex: 1 1 100%; } .search input { width: 100%; }
	.seg { order: 6; overflow-x: auto; }
	.account #who { display: none; }
	#view { padding: 16px 16px 48px; }
	.tile b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.drawer, .rail, .chart.dim { animation: none; transition: none; }
}
.tag.repeat { font-variant-numeric: tabular-nums; }
/* Population page */
.pop-bar { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: flex-end; }
.pop-bar select { min-width: 200px; }
.grid.pop tr.group td { background: var(--soft); border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: 8px; }
.grid.pop tr.group:first-child td { border-top: 0; }
.grid.pop tr.group .sub, .grid td .sub { color: var(--muted); }
.grid.pop td.indent { padding-left: 30px; }
.tag.obf { background: var(--suspect-bg); color: var(--ink); margin-left: 0; }
.tag.plain { background: var(--soft); color: var(--muted); margin-left: 0; }
.grid.pop td .mono + .tag, .grid td .who + .tag { margin-left: 8px; }
.pill.ok { background: var(--ok-bg); } .pill.ok::before { background: var(--ok); }
.range { white-space: nowrap; }
.tag.review-confirmed { background: var(--detected-bg); color: var(--ink); }
.tag.review-false_positive { background: var(--soft); color: var(--muted); text-decoration: line-through; }
.tag.review-review { background: var(--suspect-bg); color: var(--ink); }
.reviewform { display: grid; gap: 8px; }
.reviewform .chips > button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 650; }
.reviewform textarea { width: 100%; resize: vertical; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.person { display: flex; align-items: center; gap: 10px; }
.av { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--soft); border: 1px solid var(--line); object-fit: cover; }
.av.lg { width: 40px; height: 40px; }
.drawer-title { display: flex; align-items: center; gap: 12px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 13.5px; }
.toast.err { border-color: var(--detected); }
.check.live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.check.live input:checked + .pulse { background: var(--ok, #2f9e5b); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .check.live input:checked + .pulse { animation: none; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
a.button.small, .actions a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
th.pick, td.pick { width: 34px; padding-right: 0; }
td.pick input, th.pick input { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
.pickbar { position: sticky; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.line { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0; }
.stack { display: grid; gap: 4px; font-size: 12.5px; }
.rules { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0; }
.rules input[type="number"] { width: 110px; }
.wave-new input[type="text"] { min-width: 240px; flex: 1; }
.check-picker { margin: 4px 0 8px; }
.check-picker summary { cursor: pointer; color: var(--muted); }
.check-picker .chips { margin-top: 8px; max-height: 190px; overflow: auto; }
.chips label.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.chips label.chip input { min-height: 0; width: 14px; height: 14px; padding: 0; accent-color: var(--accent); }
.wave { margin-bottom: 12px; }
.wave-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.wave-head h2 { margin: 0; }
.wave-targets { display: grid; gap: 6px; margin: 10px 0; }
.wave-targets .t { display: flex; gap: 10px; align-items: center; }
.wave-targets .t .reason { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.executed { background: var(--ok-bg); } .pill.executed::before { background: var(--ok); }
.pill.pending { background: var(--suspect-bg); } .pill.pending::before { background: var(--suspect); }
.pill.rolled_back { background: var(--soft); }
button.danger { border-color: var(--detected); }

/* ---- refinements */
h1, h2, .brand, .tile b, .login h1 { font-family: var(--display); }
h1, h2 { font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 15px; }
body { font-size: 14px; }
.brand img { width: 34px; height: auto; flex: none; }
.brand { letter-spacing: -.02em; }
input, select, button { border-radius: 8px; border-color: var(--line); background: var(--soft); }
input:focus-visible, select:focus-visible { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; }
button:hover:not(:disabled) { border-color: var(--faint); }
button.primary, a.button.primary { background: var(--ink); color: var(--page); border-color: var(--ink); }
button.primary:hover:not(:disabled), a.button.primary:hover { background: var(--ink); opacity: .86; }
a.button { border-radius: 8px; border: 1px solid transparent; }
.login-wrap { position: relative; background: radial-gradient(60% 50% at 50% 0%, oklch(45% 0.16 258 / 0.30), transparent 70%), var(--page); }
.login { border-radius: 14px; padding: 32px; gap: 14px; background: var(--panel); }
.login h1 { font-size: 26px; letter-spacing: -.03em; }
.rail { background: var(--page); padding: 20px 12px; }
#nav button { border-radius: 8px; }
#nav button.on { background: var(--soft); box-shadow: inset 2px 0 0 var(--accent); }
.bar { background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(10px); padding: 12px 28px; }
.bar h1 { font-size: 20px; }
.seg { border-radius: 8px; background: var(--soft); }
.seg button { background: transparent; }
.seg button.on { background: var(--accent-soft); color: var(--ink); }
#view { padding: 24px 28px 64px; gap: 18px; max-width: 1400px; }
.panel, .tile { border-radius: 14px; }
.panel { padding: 20px; }
.panel.flush { padding: 0; }
.panel-head.pad { padding: 20px 20px 0; }
.tile { padding: 18px 20px; gap: 4px; }
.tile b { font-size: 32px; letter-spacing: -.03em; font-weight: 600; }
.tile .name { font-size: 13px; }
.grid th { background: transparent; text-transform: none; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 11px 16px; }
.grid td { padding: 11px 16px; }
.grid.hover tbody tr:hover { background: color-mix(in srgb, var(--soft) 80%, transparent); }
.grid.pop tr.group td { background: var(--soft); }
.pill { font-size: 12px; padding: 2px 10px; }
.chips > button { background: transparent; }
.chips > button.on { background: var(--accent-soft); border-color: var(--accent); }
.drawer { border-radius: 14px 0 0 14px; background: var(--panel); box-shadow: -24px 0 64px rgba(0, 0, 0, .35); }
.why .item { border-radius: 10px; background: var(--page); }
.banform, .tip, .toast, .pickbar { border-radius: 10px; }
.mono, .why .item q { font-family: var(--mono); font-size: 12px; }
.note { border-radius: 10px; }
.rank .meter { background: var(--soft); }
.chart text { font-family: var(--font); }
