
:root {
  color-scheme: light dark;
  --bg: #f6f5f2; --bg-accent: #efede8; --card: #ffffff; --ink: #1c1a26;
  --ink-2: #585464; --muted: #6e6a7e;
  --line: #e8e4de; --line-strong: #d8d3ca;
  --accent: #ff7a4f; --accent-hover: #f06537; --accent-ink: #1c1a26;
  --accent-soft: rgba(255, 122, 79, 0.14);
  --link: #b3441d; --link-hover: #8f3312;
  --rail: #1c1a26; --rail-line: #2d2a3a; --rail-ink: #f3f1f6; --rail-muted: #9a94a8;
  --viz: #2a78d6; --grid: #e9e6df; --axis-ink: #898781;
  --viz-a: #2a78d6; --viz-b: #eb6834; --viz-c: #1baf7a;
  --viz-d: #eda100; --viz-e: #e87ba4; --viz-f: #008300;
  --viz-g: #6b4fd8; --viz-h: #0f8f8c;
  --green: #067647; --green-bg: #ecfdf3; --red: #b42318; --red-bg: #fef3f2;
  --amber: #b54708; --amber-bg: #fffaeb; --gray: #475467; --gray-bg: #f2f2ef;
  --blue: #1d4ed8; --blue-bg: #eff6ff;
  --shadow-card: 0 1px 2px rgba(28, 26, 38, 0.04), 0 4px 16px rgba(28, 26, 38, 0.04);
  --shadow-pop: 0 24px 64px rgba(28, 26, 38, 0.28);
  --focus: #f06537;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark;
    --bg: #131217; --bg-accent: #1b1a21; --card: #1d1c24; --ink: #ecebf1;
    --ink-2: #b6b2c2; --muted: #9c97ab;
    --line: #2b2935; --line-strong: #383544;
    --accent: #ff8a63; --accent-hover: #ffa184; --accent-ink: #1c1a26;
    --accent-soft: rgba(255, 138, 99, 0.16);
    --link: #ff9e78; --link-hover: #ffb397;
    --rail: #100f15; --rail-line: #23212d; --rail-ink: #f0eef4; --rail-muted: #8d87a0;
    --viz: #3987e5; --grid: #2b2935; --axis-ink: #8d8a99;
    --viz-a: #3987e5; --viz-b: #d95926; --viz-c: #199e70;
    --viz-d: #c98500; --viz-e: #d55181; --viz-f: #008300;
    --viz-g: #9b86f0; --viz-h: #2bbfb8;
    --green: #5fd68f; --green-bg: rgba(16, 163, 74, 0.16);
    --red: #f0857c; --red-bg: rgba(220, 68, 58, 0.16);
    --amber: #f0b45e; --amber-bg: rgba(245, 158, 11, 0.14);
    --gray: #aeb4bf; --gray-bg: rgba(148, 163, 184, 0.13);
    --blue: #8ab8f2; --blue-bg: rgba(57, 135, 229, 0.16);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.6);
    --focus: #ffa184;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131217; --bg-accent: #1b1a21; --card: #1d1c24; --ink: #ecebf1;
    --ink-2: #b6b2c2; --muted: #9c97ab;
    --line: #2b2935; --line-strong: #383544;
    --accent: #ff8a63; --accent-hover: #ffa184; --accent-ink: #1c1a26;
    --accent-soft: rgba(255, 138, 99, 0.16);
    --link: #ff9e78; --link-hover: #ffb397;
    --rail: #100f15; --rail-line: #23212d; --rail-ink: #f0eef4; --rail-muted: #8d87a0;
    --viz: #3987e5; --grid: #2b2935; --axis-ink: #8d8a99;
    --viz-a: #3987e5; --viz-b: #d95926; --viz-c: #199e70;
    --viz-d: #c98500; --viz-e: #d55181; --viz-f: #008300;
    --viz-g: #9b86f0; --viz-h: #2bbfb8;
    --green: #5fd68f; --green-bg: rgba(16, 163, 74, 0.16);
    --red: #f0857c; --red-bg: rgba(220, 68, 58, 0.16);
    --amber: #f0b45e; --amber-bg: rgba(245, 158, 11, 0.14);
    --gray: #aeb4bf; --gray-bg: rgba(148, 163, 184, 0.13);
    --blue: #8ab8f2; --blue-bg: rgba(57, 135, 229, 0.16);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.6);
    --focus: #ffa184;
}
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 13.5px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--gray-bg); padding: 1px 4px; border-radius: 4px; }
kbd { font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--gray-bg); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; color: var(--muted); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
.hidden { display: none; }
.muted { color: var(--muted); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ─── shell: ink rail + pearl field ─── */
body.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; background: var(--rail); color: var(--rail-ink); padding: 18px 12px 14px; overflow-y: auto; }
.rail-top { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--rail-ink); padding: 2px 6px; }
.brand:hover { color: var(--rail-ink); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #ff9d76, #ff7a4f); color: #1c1a26; font-weight: 700; font-size: 16px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.brand-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--rail-muted); font-weight: 600; }
.rail-search { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--rail-line); background: rgba(255, 255, 255, 0.04); color: var(--rail-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.rail-search:hover { border-color: #3a3648; color: var(--rail-ink); }
.rail-search kbd { margin-left: auto; background: rgba(255, 255, 255, 0.06); border-color: var(--rail-line); color: var(--rail-muted); }
.rail-nav { display: flex; flex-direction: column; gap: 18px; }
.rail-group { display: flex; flex-direction: column; gap: 2px; }
.rail-eyebrow { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rail-muted); font-weight: 700; padding: 0 10px; margin-bottom: 6px; }
.rail-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-radius: 9px; background: transparent; color: var(--rail-muted); font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; }
.rail-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--rail-ink); text-decoration: none; }
.rail-item.active { background: rgba(255, 255, 255, 0.08); color: #ffffff; font-weight: 600; }
.rail-item.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.rail-foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--rail-line); padding-top: 10px; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 32px 64px; min-width: 0; animation: pageIn 0.16s ease-out both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 20px; }
.page-title .muted { font-size: 15px; font-weight: 500; }

/* overflow-x keeps a too-wide table scrolling INSIDE its card, not bleeding out. */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; overflow-x: auto; box-shadow: var(--shadow-card); }
.card:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); scroll-margin-top: 16px; }
.card-title { font-size: 13px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; }
.card-title .muted { font-weight: 400; }
.card.attention { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--card)), var(--card) 60%); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.two-col .card { margin-bottom: 16px; }
/* Split tables need real width — never more than two per row. */
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 16px; align-items: start; }
.split-grid .card { margin-bottom: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card.stat { margin-bottom: 0; overflow: hidden; }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.stat-row { display: flex; align-items: baseline; gap: 8px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value.attn { color: var(--amber); }
.stat-value.bad { color: var(--red); }
.stat-note { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat-sub { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; }
.attn-text { color: var(--amber); }

.delta { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.delta-good { color: var(--green); background: var(--green-bg); }
.delta-bad { color: var(--red); background: var(--red-bg); }
.delta-flat { color: var(--gray); background: var(--gray-bg); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 12px; border-radius: 999px; font-size: 13px; border: 1px solid transparent; transition: filter 0.12s ease, transform 0.12s ease; }
.chip:hover { text-decoration: none; filter: brightness(0.96); }
.chip:active { transform: translateY(1px); }
.chip strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.chip-bad { color: var(--red); background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 18%, transparent); }
.chip-warn { color: var(--amber); background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 18%, transparent); }
.chip-info { color: var(--blue); background: var(--blue-bg); border-color: color-mix(in srgb, var(--blue) 18%, transparent); }
.all-clear { color: var(--green); font-weight: 600; margin: 0; }

.spark { width: 100%; max-width: 150px; height: 34px; display: block; margin-top: 8px; }
.spark-line { fill: none; stroke: var(--viz); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { stroke: none; }
.spark-dot { fill: var(--viz); }
.grad-a { stop-color: var(--viz); stop-opacity: 0.26; }
.grad-b { stop-color: var(--viz); stop-opacity: 0.02; }
.budget-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.budget-cell .meter { width: 90px; flex: none; }

.table { width: 100%; border-collapse: collapse; }
.diagnostic-trace code { overflow-wrap: anywhere; white-space: normal; }
.table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color 0.1s ease; }
.table tbody tr:hover { background: var(--bg-accent); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Identity links in dense tables stay ink with a quiet underline; the coral
   arrives on hover — keeps rows calm without hiding the affordance. */
.table a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent); text-underline-offset: 2px; }
.table a:hover { color: var(--link); text-decoration-color: currentColor; }
.detail-cell { min-width: 220px; max-width: 340px; overflow-wrap: anywhere; }
.nowrap-cell { white-space: nowrap; }
.sort { color: var(--muted); }
.table a.sort { color: var(--muted); text-decoration: none; }
.table a.sort:hover { color: var(--link); }
.table a.sort.active { color: var(--ink); font-weight: 700; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge-green { color: var(--green); background: var(--green-bg); }
.badge-red { color: var(--red); background: var(--red-bg); }
.badge-amber { color: var(--amber); background: var(--amber-bg); }
.badge-gray { color: var(--gray); background: var(--gray-bg); }
.badge-blue { color: var(--blue); background: var(--blue-bg); }

/* Inline marker chip — 'academic', a network kind, a campaign tag. Used by
   the waitlist and traffic pages since they shipped; it had no rule at all
   until 2026-09-02, so every one of them rendered as bare inline text. */
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--gray-bg); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill--warn { color: var(--amber); background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 32%, transparent); }

.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] { flex: 0 1 320px; }
input, select, textarea { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.action-controls-stack { flex-direction: column; align-items: stretch; }
.strategy-edit { width: 100%; min-height: 96px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

.btn { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease; }
.btn:hover { background: var(--gray-bg); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn-block { width: 100%; padding: 10px; }
.pager { margin: 4px 0 12px; }
.footnote { font-size: 12px; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.detail-grid .card { margin-bottom: 0; }

/* ─── facts + explainers (the detail pages) ───────────────────────────
   Shared by the waitlist person page and the two Traffic drill-downs.
   A field label, its value, and a "?" that opens a plain-language note on
   what the value IS, where it came from, and what its absence means. Built
   from <details>, not JS: the console CSP forbids inline script, and a hover
   tooltip is unreachable on touch and unreadable at three sentences long.
   Two shapes, because the two jobs clip differently — a per-field note is a
   popover (it must not reflow the row it explains) and a section note
   expands in flow (a card holding a wide table has overflow-x, which would
   clip a popover). .card--facts turns that clipping off for the popover
   cards, which hold no wide tables by construction. */
.card--facts { overflow: visible; }
/* Wider than .detail-grid: a fact card holds timestamps and consent
   sentences, and a 320px column wraps "2026-08-29 09:15:02 UTC" onto three
   lines. Two columns on a laptop, three on a wide monitor. */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.facts-grid .card { margin-bottom: 0; }
/* Capped so the "?" stays near the value it explains even when the card runs
   the full width of the page. */
.facts { display: grid; gap: 9px; margin: 0; max-width: 720px; }
.fact { display: grid; grid-template-columns: 168px minmax(0, 1fr) 18px; gap: 3px 12px; align-items: baseline; }
.fact-k { color: var(--muted); font-size: 12.5px; }
.fact-v { overflow-wrap: anywhere; }
.fact-v .muted { font-size: 12.5px; }
.tip { position: relative; justify-self: end; }
.tip > summary { list-style: none; cursor: pointer; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; user-select: none; transition: background-color 0.12s ease, color 0.12s ease; }
.tip > summary::-webkit-details-marker { display: none; }
.tip > summary::marker { content: ""; }
.tip > summary:hover { color: var(--ink); border-color: var(--ink-2); }
.tip[open] > summary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.tip-body { position: absolute; right: -2px; top: 23px; z-index: 30; width: min(340px, 74vw); padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--card); box-shadow: var(--shadow-pop); font-size: 12px; line-height: 1.55; color: var(--ink-2); font-weight: 400; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; }
.tip-body p { margin: 0 0 7px; }
.tip-body p:last-child { margin-bottom: 0; }
.tip-body strong { color: var(--ink); font-weight: 600; }
.explain { margin: -2px 0 12px; }
.explain > summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.explain > summary::-webkit-details-marker { display: none; }
.explain > summary::marker { content: ""; }
.explain > summary::before { content: "?"; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.explain > summary:hover { color: var(--ink); }
.explain[open] > summary::before { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.explain-body { margin-top: 9px; padding: 11px 14px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--bg-accent); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.explain-body p { margin: 0 0 8px; }
.explain-body p:last-child { margin-bottom: 0; }
.explain-body strong { color: var(--ink); font-weight: 600; }

/* A page-view trail. On the waitlist person page the join is a row IN the
   journey, not a fact printed above it — where it falls between page views
   is the whole point of listing them. */
.trail-join td { background: color-mix(in srgb, var(--accent) 12%, var(--card)); font-weight: 600; }
.trail-gap { color: var(--muted); font-size: 11px; white-space: nowrap; }
.trail-when { white-space: nowrap; }
.hero-line { color: var(--muted); margin: -12px 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* The drill-downs' "how this was computed" list — the derivation as steps
   rather than a paragraph, because an operator checking a number against it
   reads for the ONE step they doubt. */
.method-list { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.65; }
.method-list li { margin-bottom: 5px; }
.method-list li:last-child { margin-bottom: 0; }
.method-list strong { color: var(--ink); font-weight: 600; }

.meter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.meter { flex: 0 1 260px; height: 10px; accent-color: var(--viz); }
.meter-warn { accent-color: var(--amber); }

/* ─── login — the backstage door: always-ink field, Pearl aurora ─── */
.login-body { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 24px;
  background-color: #131118;
  background-image:
    radial-gradient(720px 480px at 12% -6%, rgba(255, 122, 79, 0.16), transparent 60%),
    radial-gradient(640px 420px at 88% 8%, rgba(127, 227, 196, 0.10), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(255, 161, 126, 0.08), transparent 55%);
}
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; width: 360px; max-width: 100%; box-shadow: var(--shadow-pop); animation: pageIn 0.2s ease-out both; }
.login-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 17px; }
.login-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.login-brand-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.login-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.login-status { color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field input { padding: 9px 12px; }
.login-error { color: var(--red); background: var(--red-bg); border-radius: 9px; padding: 8px 10px; font-size: 13px; margin: 0; }

/* Second factor (/admin/verify). The setup key and recovery codes are meant to
   be READ OFF THE SCREEN and typed, so both are monospace with wide tracking —
   the failure mode this styling exists to prevent is a mis-transcribed
   character producing codes that never verify, which is close to
   undiagnosable from the operator's side. */
.login-account { margin: -8px 0 16px; font-size: 13px; color: var(--muted); word-break: break-all; }
.login-hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.secret-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: 0.08em; background: var(--gray-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0 14px; word-break: break-all; user-select: all; }
.secret-uri { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); background: var(--gray-bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 4px 0 16px; word-break: break-all; user-select: all; }
.recovery-list { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; grid-template-columns: 1fr; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: 0.04em; }
.recovery-list li { background: var(--gray-bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; user-select: all; }
.replace-block { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.replace-block > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.replace-block > summary:hover { color: var(--ink); }
.replace-block .login-form { margin-top: 10px; }

/* Phase 1C actions */
.action-list { display: flex; flex-direction: column; gap: 12px; }
.action-form { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.12s ease; }
.action-form:focus-within { border-color: var(--line-strong); }
.action-form.action-danger { border-color: color-mix(in srgb, var(--red) 25%, var(--line)); background: color-mix(in srgb, var(--red-bg) 35%, var(--card)); }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.inline-check input { margin: 0; }
.danger-sep { display: flex; align-items: center; gap: 10px; margin: 6px 0 -2px; color: var(--red); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.danger-sep::before, .danger-sep::after { content: ""; height: 1px; background: color-mix(in srgb, var(--red) 28%, transparent); flex: 1; }
.action-head { display: flex; flex-direction: column; gap: 2px; }
.action-desc { font-size: 12px; color: var(--muted); }
.action-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.action-controls input { flex: 1 1 160px; min-width: 120px; }
.action-controls select { flex: 0 0 auto; }
/* Schools — the profile editor lays its labelled fields out in a two-column grid. */
.school-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 14px; align-items: end; }
.school-profile-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.school-profile-grid input, .school-profile-grid select { width: 100%; min-width: 0; flex: none; }
.btn-danger { border-color: color-mix(in srgb, var(--red) 45%, transparent); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.action-result { border-radius: 9px; padding: 10px 12px; font-size: 13px; margin: 12px 0 0; overflow-wrap: anywhere; }
.action-result.ok { color: var(--green); background: var(--green-bg); }
.action-result.err { color: var(--red); background: var(--red-bg); }
.action-result code { background: transparent; font-size: 13px; font-weight: 700; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; vertical-align: 1px; }
.copy-btn:hover { color: var(--ink); background: var(--gray-bg); }
.copy-btn.copied { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }

/* Referrals */
.action-inline { display: inline-block; margin: 0; }
.action-inline .btn { padding: 3px 10px; font-size: 12px; }
.ref-tree { list-style: none; margin: 0; padding-left: 0; }
.ref-tree ul { list-style: none; margin: 4px 0 4px 10px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.ref-tree li { padding: 3px 0; font-size: 13px; }
.ref-node { font-weight: 600; }

/* Phase 1B analytics */
.analytics-toolbar { flex-wrap: wrap; align-items: center; }
.presets { display: flex; gap: 4px; margin-right: 8px; }
.preset { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--card); font-size: 12.5px; font-weight: 500; }
.preset:hover { background: var(--gray-bg); text-decoration: none; color: var(--ink); }
.preset.active { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.field-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-axis { fill: var(--axis-ink); font-size: 11px; }
.chart-empty { fill: var(--muted); font-size: 13px; }
.chart-area { stroke: none; }
.chart-line { fill: none; stroke: var(--viz); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line-fill { fill: var(--viz); }
.chart-bar { fill: var(--viz); transition: filter 0.1s ease; }
.chart-bar:hover { filter: brightness(1.15); }
.chart-hit { fill: transparent; pointer-events: all; }
.chart-guide { stroke: var(--axis-ink); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; pointer-events: none; transition: opacity 0.1s ease; }
.chart-focus-dot { fill: var(--viz); stroke: var(--card); stroke-width: 1.5; opacity: 0; pointer-events: none; transition: opacity 0.1s ease; }
.chart-datum:hover .chart-guide { opacity: 0.65; }
.chart-datum:hover .chart-focus-dot { opacity: 1; }
.bar-cell { width: 24%; }
.bar-head { width: 24%; }
.bar-cell .meter { width: 100%; display: block; }
.meter-muted { accent-color: var(--muted); }
/* Plain-language incident explanations (2026-09-02). Every security row
   carries a one-line human headline under its enum name plus a collapsed
   panel; the panel is its own <tr> so it can span the full table width
   without breaking the row's column alignment. */
.incident-plain { font-size: 12px; margin-top: 3px; max-width: 260px; }
.incident-explain-row > td { padding-top: 0; border-top: none; }
.incident-explain { font-size: 13px; }
.incident-explain summary { cursor: pointer; color: var(--muted); }
.incident-explain summary:hover { color: var(--ink); }
.incident-explain[open] { padding: 8px 0 12px; }
.incident-explain p { margin: 8px 0 4px; max-width: 78ch; }
.incident-explain ol, .incident-explain ul { margin: 4px 0 8px; padding-left: 22px; max-width: 78ch; }
.incident-explain li { margin: 3px 0; }
.daily-details { margin-top: 12px; }
.daily-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.daily-details summary:hover { color: var(--ink); }
.daily-details[open] summary { margin-bottom: 8px; }

/* Phase 1E inbox */
.payload { background: var(--gray-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; overflow-x: auto; max-height: 70vh; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Vision diagnostics — screenshot grid + asset links */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--gray-bg); }
.shot img { width: 100%; height: auto; display: block; }
.shot figcaption { padding: 6px 8px; font-size: 12px; color: var(--muted); }
.asset-list { margin: 12px 0 0; padding-left: 20px; }

/* ─── ⌘K palette (DOM built by the served admin.js — no framework) ─── */
.cmdk-root { position: fixed; inset: 0; z-index: 80; display: none; }
body.cmdk-open .cmdk-root { display: block; }
body.cmdk-open { overflow: hidden; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(19, 17, 24, 0.45); backdrop-filter: blur(3px); }
.cmdk { position: relative; margin: 12vh auto 0; width: min(580px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; animation: cmdkIn 0.14s ease-out both; }
@keyframes cmdkIn { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.cmdk-input { width: 100%; border: none; border-bottom: 1px solid var(--line); border-radius: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 15px 18px; }
.cmdk-input:focus-visible { outline: none; border-color: var(--line); }
.cmdk-list { max-height: 336px; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink); cursor: pointer; text-decoration: none; }
.cmdk-item:hover { color: var(--ink); text-decoration: none; }
.cmdk-item .ic { color: var(--muted); }
.cmdk-item.active { background: var(--accent-soft); }
.cmdk-hint { margin-left: auto; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cmdk-empty { padding: 18px; color: var(--muted); text-align: center; }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }

/* ─── responsive: the rail folds into a top bar ─── */
@media (max-width: 940px) {
  body.shell { display: block; }
  .rail { position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; overflow-x: auto; overflow-y: hidden; }
  .rail-top { flex-direction: row; align-items: center; gap: 10px; flex: 1; }
  .brand-text { display: none; }
  .rail-search { width: auto; flex: none; }
  .rail-search span, .rail-search kbd { display: none; }
  .rail-nav { flex-direction: row; gap: 4px; }
  .rail-group { flex-direction: row; gap: 2px; }
  .rail-eyebrow { display: none; }
  .rail-item span { display: none; }
  .rail-item.active::before { left: 6px; right: 6px; top: auto; bottom: -2px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .rail-foot { flex-direction: row; border-top: none; padding-top: 0; }
  .main { padding: 20px 16px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Bench (model-qualification results) ───
   Categorical series slots --viz-a…h / .bench-f1…f8 are the dataviz
   reference palette in fixed order, validated (light on #ffffff, dark on
   #1d1c24) 2026-08-13; --viz-g/h and f7/f8 were added 2026-08-28 when
   GLM 5.3 Flash became a seventh series. Correctness segments wear STATUS
   colours; "not recorded" is a hatched neutral — distinct from zero and
   from wrong. */
.bench-f1 { fill: var(--viz-a); } .bench-f2 { fill: var(--viz-b); } .bench-f3 { fill: var(--viz-c); }
.bench-f4 { fill: var(--viz-d); } .bench-f5 { fill: var(--viz-e); } .bench-f6 { fill: var(--viz-f); }
.bench-f7 { fill: var(--viz-g); } .bench-f8 { fill: var(--viz-h); }
.bench-s1 { stroke: var(--viz-a); } .bench-s2 { stroke: var(--viz-b); } .bench-s3 { stroke: var(--viz-c); }
.bench-s4 { stroke: var(--viz-d); } .bench-s5 { stroke: var(--viz-e); } .bench-s6 { stroke: var(--viz-f); }
.bench-s7 { stroke: var(--viz-g); } .bench-s8 { stroke: var(--viz-h); }
.bench-f1-bg { background: var(--viz-a); } .bench-f2-bg { background: var(--viz-b); } .bench-f3-bg { background: var(--viz-c); }
.bench-f4-bg { background: var(--viz-d); } .bench-f5-bg { background: var(--viz-e); } .bench-f6-bg { background: var(--viz-f); }
.bench-f7-bg { background: var(--viz-g); } .bench-f8-bg { background: var(--viz-h); }
.bench-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; font-size: 12px; color: var(--ink-2); }
.bench-key { display: inline-flex; align-items: center; gap: 6px; }
.bench-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bench-swatch-hatch { background: repeating-linear-gradient(45deg, var(--muted) 0 1px, transparent 1px 4px); border: 1px solid var(--line-strong); }
.bench-seg-ok { fill: var(--green); } .bench-seg-part { fill: var(--amber); } .bench-seg-bad { fill: var(--red); }
.bench-seg-ok-bg { background: var(--green); } .bench-seg-part-bg { background: var(--amber); } .bench-seg-bad-bg { background: var(--red); }
.bench-seg-null { stroke: var(--line-strong); stroke-width: 1; }
.bench-null-bg { fill: var(--gray-bg); }
.bench-null-hatch { stroke: var(--muted); stroke-width: 1; }
.bench-row-label { fill: var(--ink); font-size: 11px; }
.bench-end-label { fill: var(--ink-2); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.bench-end-label-2 { fill: var(--muted); font-size: 9.5px; }
.bench-point-label { fill: var(--ink); font-size: 10.5px; }
.bench-ci { stroke: var(--ink); stroke-width: 1.6; }
.bench-delta-dot { fill: var(--viz); stroke: var(--card); stroke-width: 1.5; }
.bench-margin-band { fill: var(--red); opacity: 0.06; }
.bench-margin-line { stroke: var(--red); stroke-width: 1; stroke-dasharray: 4 3; }
.bench-zero-line { stroke: var(--axis-ink); stroke-width: 1; }
.bench-twin-link { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.bench-dot { fill: var(--viz); stroke: var(--card); stroke-width: 2; }
.bench-dot.bench-f1 { fill: var(--viz-a); } .bench-dot.bench-f2 { fill: var(--viz-b); }
.bench-dot.bench-f3 { fill: var(--viz-c); } .bench-dot.bench-f4 { fill: var(--viz-d); }
.bench-dot.bench-f5 { fill: var(--viz-e); } .bench-dot.bench-f6 { fill: var(--viz-f); }
.bench-dot.bench-f7 { fill: var(--viz-g); } .bench-dot.bench-f8 { fill: var(--viz-h); }
.bench-dot-ghost { fill: var(--muted); opacity: 0.55; stroke: var(--card); stroke-width: 2; }
.bench-dot-reprice { fill: var(--card); stroke: var(--viz); stroke-width: 1.8; stroke-dasharray: 3 2; }
.bench-dot-contrib { fill: var(--card); stroke: var(--muted); stroke-width: 1.8; }
.bench-shape { stroke: var(--card); stroke-width: 1.5; }
.bench-shape-contrib { fill: var(--card); stroke: var(--muted); stroke-width: 1.8; }
.bench-method-list { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.bench-method-list li { margin: 4px 0; }
.bench-incumbent-mark { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.bench-epoch-rule { stroke: var(--axis-ink); stroke-width: 1; stroke-dasharray: 5 4; }
.bench-epoch-label { fill: var(--muted); font-size: 10px; }
.bench-series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bench-series-dot { stroke: var(--card); stroke-width: 1.5; }
.bench-402-rule { stroke: var(--red); stroke-width: 1.5; }
.bench-bar { fill: var(--viz); }
.bench-bar-ghost { fill-opacity: 0.4; }
.bench-bar-outline { fill: var(--viz); fill-opacity: 0.08; stroke: var(--viz); stroke-width: 1.5; stroke-dasharray: 4 3; }
.bench-bar-anchor { stroke: var(--ink); stroke-width: 1.5; }
.bench-bar-value { fill: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bench-bar-note { fill: var(--muted); font-size: 10px; font-weight: 400; }
.bench-matrix td { min-width: 150px; vertical-align: top; }
.bench-gate-matrix td { white-space: nowrap; }
.bench-model-cell { white-space: nowrap; }
.bench-cell-note { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.bench-cell-link { text-decoration: none; }
.bench-cell-link:hover { text-decoration: none; filter: brightness(0.96); }

/* Bench decision workspace — compact layers, exact-value inspection, and
   cross-chart focus without a client charting dependency. */
.bench-subnav { gap: 6px; }
.bench-subnav .btn { border-radius: 999px; font-size: 12px; padding: 6px 12px; }
.bench-decision-card { background: linear-gradient(145deg, color-mix(in srgb, var(--viz) 7%, var(--card)), var(--card) 46%); }
.bench-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.bench-section-title { margin: 2px 0 0; font-size: 17px; letter-spacing: -0.015em; }
.bench-eyebrow { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.bench-insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bench-insight { min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: color-mix(in srgb, var(--card) 88%, transparent); }
.bench-insight-label { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.055em; text-transform: uppercase; }
.bench-insight strong { display: block; margin-top: 5px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.bench-insight strong code { font-size: 14px; }
.bench-insight p { margin: 5px 0 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; }

.bench-explorer { position: relative; margin: 0 0 16px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--viz) 22%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--viz) 4%, var(--card)); box-shadow: var(--shadow-card); }
.bench-explorer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bench-explorer-copy { margin: 1px 0 8px; color: var(--ink-2); font-size: 12px; }
.bench-model-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }
.bench-model-chip, .bench-clear-focus, .bench-tab { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; cursor: pointer; }
.bench-model-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 9px; border-radius: 999px; font: 500 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bench-model-chip:hover { border-color: color-mix(in srgb, var(--viz) 42%, var(--line)); color: var(--ink); }
.bench-model-chip.active { border-color: var(--viz); background: color-mix(in srgb, var(--viz) 13%, var(--card)); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--viz) 18%, transparent); }
.bench-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--viz); opacity: 0.55; }
.bench-model-chip.active .bench-chip-dot { opacity: 1; }
/* A methodological caveat is a footnote, not the page. Fifty-nine of these
   paragraphs (~21,000 characters) rendered inline under the charts and were
   roughly a third of every page's height — the single biggest reason the
   section read as a wall of grey prose. Collapsed, every word survives one
   click away and the chart above keeps the reader. The summary names what is
   inside, so an operator auditing a number knows which one holds the answer. */
.bench-why { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.bench-why > summary { width: max-content; max-width: 100%; color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 650; }
.bench-why > summary:hover { color: var(--ink-2); }
.bench-why[open] > summary { margin-bottom: 7px; color: var(--ink-2); }
.bench-why-body { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.bench-model-more { margin-top: 8px; }
.bench-model-more summary { width: max-content; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 650; }
.bench-model-more[open] summary { margin-bottom: 8px; color: var(--ink-2); }
.bench-chip-price { margin-left: 2px; padding-left: 7px; border-left: 1px solid var(--line); color: var(--blue); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.bench-price-pins { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; margin-top: 10px; }
.bench-price-pin { min-width: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--blue) 7%, var(--card)); }
.bench-price-pin:focus { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }
.bench-price-kicker { display: block; color: var(--blue); font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.bench-price-pin strong { display: block; margin-top: 4px; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.bench-price-pin strong span { margin-left: 2px; color: var(--ink-2); font-size: 10.5px; font-weight: 500; }
.bench-price-reference { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.bench-clear-focus { border-radius: 8px; padding: 5px 10px; font-size: 11px; white-space: nowrap; }
.bench-clear-focus:disabled { opacity: 0.42; cursor: default; }
.bench-inspector { display: block; min-height: 31px; margin-top: 10px; padding: 7px 10px; border-left: 3px solid var(--viz); border-radius: 0 8px 8px 0; background: var(--gray-bg); color: var(--ink-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.bench-tabs { min-width: 0; }
.bench-tablist { display: inline-flex; gap: 3px; max-width: 100%; margin-bottom: 12px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-accent); overflow-x: auto; }
.bench-tab { flex: none; padding: 6px 11px; border-color: transparent; border-radius: 7px; background: transparent; font-size: 12px; }
.bench-tab:hover { color: var(--ink); }
.bench-tab.active { border-color: var(--line); background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(28, 26, 38, 0.06); }
.bench-tab-panel[hidden] { display: none; }
/* Section-level tabs sit BETWEEN cards rather than inside one, so they read as
   a navigator over the evidence instead of a control on a chart: full-width
   rule, larger targets, no card chrome of their own. */
.bench-section-tabs { margin-top: 22px; }
.bench-section-tablist { display: flex; gap: 2px; width: 100%; margin-bottom: 16px; padding: 4px; border-radius: 12px; }
.bench-section-tablist .bench-tab { flex: 1 1 0; padding: 9px 10px; font-size: 12.5px; text-align: center; }
.bench-panel-title { margin: 0 0 8px; font-size: 12px; color: var(--ink-2); }
.bench-chart-card:target { scroll-margin-top: 14px; }
.bench-chart { min-width: 760px; max-width: none; }
.bench-data-mark { cursor: crosshair; transition: opacity 0.14s ease, filter 0.14s ease; }
.bench-data-mark:hover, .bench-data-mark:focus { filter: brightness(1.12) drop-shadow(0 0 4px color-mix(in srgb, var(--viz) 30%, transparent)); outline: none; }
[data-bench-model] { transition: opacity 0.14s ease, filter 0.14s ease, background-color 0.14s ease; }
.bench-model-muted { opacity: 0.14 !important; filter: saturate(0.25); }
tr.bench-model-muted, section.bench-model-muted { opacity: 0.28 !important; }
.bench-model-active { opacity: 1 !important; }
tr.bench-model-active { background: color-mix(in srgb, var(--viz) 8%, var(--card)); }

/* More readable scatter + candidate/incumbent comparison marks. */
.bench-axis-title { fill: var(--ink-2); font-size: 10.5px; font-weight: 600; }
.bench-point-label { paint-order: stroke; stroke: var(--card); stroke-width: 3.5px; stroke-linejoin: round; }
.bench-label-link { stroke: var(--axis-ink); stroke-width: 0.8; opacity: 0.65; }
.bench-win-zone { fill: var(--green); opacity: 0.055; }
.bench-zone-label { fill: var(--green); font-size: 9.5px; font-weight: 600; }
.bench-reference-line { stroke: var(--axis-ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.62; }
.bench-pareto-line { fill: none; stroke: var(--viz); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: 0.72; }
.bench-dot-qualified { fill: var(--green); }
.bench-dot-failed { fill: var(--red); }
.bench-dot-qualified-bg { background: var(--green) !important; }
.bench-dot-failed-bg { background: var(--red) !important; }
.bench-legend-dot { display: inline-block; width: 9px; height: 9px; border: 1.5px solid var(--card); border-radius: 50%; background: var(--viz); box-shadow: 0 0 0 1px var(--line-strong); }
.bench-legend-diamond { display: inline-block; width: 8px; height: 8px; border: 1.5px solid var(--ink); background: var(--card); transform: rotate(45deg); }
.bench-line-key { display: inline-block; width: 18px; border-top: 2px dashed var(--viz); }
.bench-compare-line { stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
.bench-compare-candidate { fill: var(--viz); stroke: var(--card); stroke-width: 2; }
.bench-compare-candidate.bench-dot-qualified { fill: var(--green); }
.bench-compare-candidate.bench-dot-failed { fill: var(--red); }
.bench-compare-incumbent { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.bench-compare-reprice { fill: var(--card); stroke: var(--viz); stroke-width: 1.8; stroke-dasharray: 3 2; }
.bench-legend-ring { display: inline-block; width: 9px; height: 9px; border: 1.5px dashed var(--viz); border-radius: 50%; background: var(--card); }
.bench-legend-outline { display: inline-block; width: 14px; height: 9px; border: 1.5px dashed var(--viz); border-radius: 2px; background: var(--card); }
.bench-legend-dot-faded { opacity: 0.45; }

/* The gauntlet outcome board (Bench → Vision): a categorical chip matrix —
   words + status colour per cell, never colour alone; steps ride inline. */
.bench-chart-card:has(.bench-vg-matrix) { overflow-x: auto; }
.bench-vg-matrix { width: max-content; min-width: 100%; }
.bench-vg-matrix th, .bench-vg-matrix td { white-space: nowrap; padding: 6px 6px; }
.bench-vg-matrix thead th { vertical-align: top; }
.bench-vg-matrix thead th:not(:first-child) { min-width: 132px; }
.bench-vg-matrix .badge { font-size: 10px; padding: 2px 7px; }
.bench-vg-skin-row th { padding: 9px 7px 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); background: var(--bg-accent); border-bottom: 1px solid var(--line-strong); }
.bench-vg-target { color: var(--ink-2); font-size: 11.5px; font-weight: 500; text-align: left; }
.bench-vg-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.bench-vg-artifact-row td { background: color-mix(in srgb, var(--amber) 4%, transparent); }
.bench-chart-subtitle { margin: 14px 0 4px; font-size: 12px; color: var(--ink-2); }
.bench-dot-open { fill: var(--card); stroke: var(--viz); stroke-width: 2; }

/* Causal before/after readout: keep harness changes out of the cross-model
   frontier and make the direction of each exact card delta readable first. */
.bench-change-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bench-change-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-accent); }
.bench-change-kind { display: block; color: var(--viz); font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.bench-change-card h3 { margin: 5px 0 0; font-size: 14px; line-height: 1.35; }
.bench-change-card > p { min-height: 49px; margin: 6px 0 12px; color: var(--ink-2); font-size: 11.5px; line-height: 1.45; }
.bench-change-metrics { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.bench-change-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 9px; background: var(--card); }
.bench-change-metric > span { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.bench-change-metric strong { grid-row: 2; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bench-change-arrow { margin: 0 5px; color: var(--muted); font-weight: 400; }
.bench-change-metric em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11px; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
.bench-change-good { color: var(--green); }
.bench-change-tradeoff { color: var(--amber); }
.bench-change-neutral { color: var(--ink-2); }
.bench-change-card footer { display: flex; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 10.5px; }
.bench-route-table td { vertical-align: middle; }
.bench-harness-table { min-width: 1320px; }
.bench-harness-table td:nth-child(1), .bench-harness-table td:nth-child(2) { min-width: 170px; }
.bench-harness-table code { overflow-wrap: anywhere; white-space: normal; }

/* Vision arm ladder — two measures per row on one axis. Durable wears the
   primary series slot, accuracy the third; the pairing is fixed so a reader
   who learns it once reads every tier the same way. A scored-only accuracy
   is hatched (see armLadderSvg) because it is not comparable with a
   coverage-adjusted one. */
.bench-arm-model { fill: var(--ink); font-size: 11.5px; font-weight: 600; }
.bench-arm-harness { fill: var(--muted); font-size: 10px; }
.bench-arm-bar { stroke: none; }
.bench-arm-durable { fill: var(--viz-a); }
.bench-arm-accuracy { fill: var(--viz-c); }
.bench-arm-accuracy.bench-arm-scored { fill: url(#benchNullHatch); stroke: var(--line-strong); stroke-width: 1; }
.bench-arm-note { fill: var(--muted); font-size: 9.5px; font-variant-numeric: tabular-nums; }
/* Compact by design — it must NOT inherit .bench-chart's 760px floor, which
   exists so a full-width chart squashes its card into a scroller rather than
   itself. This one is sized for the half-width lane card. */
.bench-lane-rank { width: 100%; min-width: 0; max-width: 100%; }
.bench-lane-rank-label { fill: var(--ink-2); font-size: 11px; }
.bench-lane-rank-value { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.bench-lane-rank-value-lead { fill: var(--ink); font-weight: 700; }
.bench-lane-bar-lead { fill: var(--viz-a); }
.bench-lane-bar-rest { fill: var(--muted); fill-opacity: 0.32; }
.bench-arm-panel-head { fill: var(--ink-2); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.bench-bar-value-soft { fill: var(--ink-2); }
.bench-arm-row.bench-arm-partial { opacity: 0.55; }
.bench-arm-durable-bg { background: var(--viz-a); }
.bench-arm-accuracy-bg { background: var(--viz-c); }
.bench-arm-ring { background: transparent; border: 2px solid var(--ink); }

/* Lever ledger — one derived single-factor comparison per row. */
.bench-lever-table td, .bench-lever-table th { vertical-align: middle; }
.bench-lever-token { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-accent); font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bench-lever-move { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bench-lever-move .bench-lever-arrow { color: var(--muted); }
.bench-lever-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.bench-lever-delta.up { color: var(--green); }
.bench-lever-delta.down { color: var(--red); }
.bench-lever-delta.flat { color: var(--muted); font-weight: 500; }

/* Skin grid — where a lane still fails, one cell per skin x arm. */
.bench-skin-grid td, .bench-skin-grid th { padding: 5px 8px; white-space: nowrap; }
.bench-skin-cell { display: inline-block; min-width: 46px; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; font-size: 11.5px; text-align: center; }
.bench-skin-full { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--ink); }
.bench-skin-part { background: color-mix(in srgb, var(--amber) 34%, transparent); color: var(--ink); font-weight: 600; }
.bench-skin-none { background: color-mix(in srgb, var(--red) 30%, transparent); color: var(--ink); font-weight: 600; }
.bench-skin-absent { color: var(--muted); }

/* Lane cards on the overview — one per benchmarked product lane. */
.bench-lane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bench-lane-card { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); }
.bench-lane-card h3 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.bench-lane-headline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bench-lane-headline strong { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bench-lane-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 12px; }
.bench-lane-rows dt { color: var(--muted); }
.bench-lane-rows dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.bench-lane-foot { margin-top: auto; padding-top: 4px; font-size: 12px; }

@media (max-width: 900px) {
  .bench-lane-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .bench-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-change-card > p { min-height: 0; }
}
@media (max-width: 620px) {
  .bench-insight-grid { grid-template-columns: 1fr; }
  .bench-change-grid { grid-template-columns: 1fr; }
  .bench-section-head, .bench-explorer-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .bench-clear-focus { align-self: flex-start; }
  .bench-tablist { display: flex; }
}

.security-page { max-width: 1280px; margin: 0 auto; }
.security-header, .security-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.security-header .page-title { margin: 0; font-size: 32px; letter-spacing: -1px; }
.security-header p { margin: 6px 0; }
.security-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; color: var(--muted); }
.security-heading h2 { font-size: 17px; margin: 0 0 12px; }
.security-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.security-metric { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); }
.security-metric > a { display: flex; flex-direction: column; gap: 7px; padding: 22px; color: var(--ink); border-radius: 14px; }
.security-metric > a:hover { background: var(--bg-accent); text-decoration: none; }
.security-metric > a > span { padding-right: 25px; font-weight: 600; }
.security-metric strong { font-size: 36px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.security-metric strong.security-unavailable { font-size: 20px; overflow-wrap: anywhere; }
.security-metric small { color: var(--muted); }
.security-metric > .security-help { position: absolute; top: 16px; right: 16px; }
.security-tone-critical strong { color: var(--red); }
.security-tone-warning strong { color: var(--amber); }
.security-help { position: relative; flex: 0 0 auto; font-weight: 400; }
.security-help > summary { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); cursor: pointer; list-style: none; font-weight: 700; background: var(--card); }
.security-help > summary::-webkit-details-marker { display: none; }
.security-help[open] > summary { color: var(--link); border-color: var(--link); }
.security-help > div { position: absolute; z-index: 20; right: 0; top: 33px; width: min(320px, 76vw); padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 13px; }
.security-help > div strong { font-size: 13px; }
.security-help p { margin: 7px 0 0; }
.security-health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.security-health-grid > div + div { border-left: 1px solid var(--line); padding-left: 22px; }
.security-health-grid p { color: var(--ink-2); margin-bottom: 0; }
.security-caution { color: var(--amber); }
.security-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.security-page label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; }
.security-page select, .security-page input, .security-page textarea { border: 1px solid var(--line-strong); padding: 9px 11px; border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; max-width: 100%; }
.security-filters select { max-width: 245px; }
.security-page textarea { width: 100%; resize: vertical; margin: 6px 0 12px; }
.security-incident { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 12px; padding: 20px; margin: 14px 0; background: var(--card); }
.security-critical { border-left-color: var(--red); }
.security-incident h3 { font-size: 17px; margin: 12px 0 5px; }
.security-incident h3 a { color: var(--ink); }
.security-incident p { color: var(--ink-2); max-width: 95ch; }
.security-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 12px; }
dl.security-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.security-facts dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.security-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 0; }
.security-explanation { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.security-page summary { cursor: pointer; }
.security-explanation summary { color: var(--link); }
.security-explanation li { margin: 6px 0; }
.security-internal { margin-top: 20px; padding: 16px; background: var(--bg-accent); border-radius: 12px; }
.security-json { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border-radius: 8px; background: var(--bg-accent); max-height: 320px; overflow: auto; font-size: 12px; }
.security-event { border-top: 1px solid var(--line); padding: 14px 0; }
.security-page .table-scroll { overflow: auto; }
.security-page .action-inline { display: inline-flex; margin-top: 12px; }
.security-page .action-result:not(.hidden) { position: sticky; top: 12px; z-index: 21; }
.security-page :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 1000px) { .security-metric:nth-child(odd) .security-help > div { left: -90px; right: auto; } .security-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .security-health-grid { grid-template-columns: 1fr; } .security-health-grid > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; } }
@media (max-width: 560px) { .security-header { flex-direction: column; gap: 10px; } .security-metrics { gap: 8px; } .security-metric > a { padding: 16px; } .security-metric small { font-size: 11px; } .security-incident { padding: 14px; } .security-filters label { width: 100%; } .security-filters select { max-width: none; } dl.security-facts { grid-template-columns: 1fr; gap: 4px; } .security-facts dd { margin-bottom: 10px; } }

