/* ULTRON dashboard styles, design "Pro Fintech" (owner choice 2026-11-19; mockup in
   reports/design-20261119/pro-fintech.html). Served by the api from /static: the CSP allows
   'self' only, so there is no inline style, no external font and no CDN (system fonts).
   Per-card values are quantised classes set by gce.ui.views (ring fill p0..p10, usual-rate
   tick u0..u10, bar width f0..f10, timeline marker tpre and tz0..tz20); free-form shapes
   (split bar, release timeline) are inline SVG with x and width presentation attributes.
   Colour roles: one accent (blue) for ULTRON's own reading and proven skill; amber only for
   risk (EVENT RISK, blackout, DEGRADED, errors); grey for everything without proven skill.
   Up and down always share one neutral tone (never green up, red down). */

:root {
  --bg: #f1f3f7;
  --bg-glow: #e4ebff;
  --bg-grid: transparent;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-glass: rgba(255, 255, 255, 0.80);
  --ink: #0a1020;
  --ink-2: #2f3a4e;
  --muted: #545f73;
  --line: rgba(10, 16, 32, 0.08);
  --line-2: rgba(10, 16, 32, 0.15);
  --track: #e7eaf0;
  --grid: #d5dae3;
  --none-hi: #9aa3b2;
  --none-lo: #6f798a;
  --split-quiet: #7d8697;
  --split-dir: #d9dde5;
  --accent: #1f4fd6;
  --accent-hi: #5b8cff;
  --accent-lo: #1f4fd6;
  --accent-soft: #eaf0ff;
  --accent-line: rgba(31, 79, 214, 0.28);
  --accent-glow: rgba(31, 79, 214, 0.22);
  --risk: #8a5200;
  --risk-hi: #f5a524;
  --risk-soft: #fff4de;
  --risk-line: rgba(214, 138, 0, 0.45);
  --negative: #b45f06;
  --inverse: #0c1220;
  --inverse-ink: #f4f6fa;
  --inverse-muted: #a9b2c3;
  --shadow-1: 0 1px 2px rgba(10, 16, 32, 0.05), 0 8px 24px rgba(10, 16, 32, 0.06);
  --shadow-2: 0 1px 2px rgba(10, 16, 32, 0.06), 0 18px 48px rgba(10, 16, 32, 0.11);
  --radius: 24px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Dark: the midnight language (grid, glows) on the same layout. Written twice: once for the
   system setting, once for a forced data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #05070b;
    --bg-glow: rgba(70, 110, 255, 0.16);
    --bg-grid: rgba(255, 255, 255, 0.035);
    --surface: #0d121a;
    --surface-2: #141a24;
    --surface-glass: rgba(9, 13, 20, 0.78);
    --ink: #f2f5fa;
    --ink-2: #c8cfdb;
    --muted: #97a0b2;
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.14);
    --track: #1e2531;
    --grid: #2a3240;
    --none-hi: #8a93a5;
    --none-lo: #6b7486;
    --split-quiet: #8a93a5;
    --split-dir: #2b3341;
    --accent: #8eacff;
    --accent-hi: #9cb7ff;
    --accent-lo: #3f6dff;
    --accent-soft: rgba(110, 145, 255, 0.12);
    --accent-line: rgba(142, 172, 255, 0.35);
    --accent-glow: rgba(80, 120, 255, 0.45);
    --risk: #ffc56b;
    --risk-hi: #ffb43c;
    --risk-soft: rgba(255, 180, 60, 0.12);
    --risk-line: rgba(255, 180, 60, 0.40);
    --negative: #f0a35a;
    --inverse: #0b1018;
    --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-2: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 50px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #05070b;
  --bg-glow: rgba(70, 110, 255, 0.16);
  --bg-grid: rgba(255, 255, 255, 0.035);
  --surface: #0d121a;
  --surface-2: #141a24;
  --surface-glass: rgba(9, 13, 20, 0.78);
  --ink: #f2f5fa;
  --ink-2: #c8cfdb;
  --muted: #97a0b2;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --track: #1e2531;
  --grid: #2a3240;
  --none-hi: #8a93a5;
  --none-lo: #6b7486;
  --split-quiet: #8a93a5;
  --split-dir: #2b3341;
  --accent: #8eacff;
  --accent-hi: #9cb7ff;
  --accent-lo: #3f6dff;
  --accent-soft: rgba(110, 145, 255, 0.12);
  --accent-line: rgba(142, 172, 255, 0.35);
  --accent-glow: rgba(80, 120, 255, 0.45);
  --risk: #ffc56b;
  --risk-hi: #ffb43c;
  --risk-soft: rgba(255, 180, 60, 0.12);
  --risk-line: rgba(255, 180, 60, 0.40);
  --negative: #f0a35a;
  --inverse: #0b1018;
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-2: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 50px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -140px, var(--bg-glow), transparent 70%),
    radial-gradient(800px 420px at -10% 30%, var(--bg-glow), transparent 70%),
    repeating-linear-gradient(0deg, var(--bg-grid) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--bg-grid) 0 1px, transparent 1px 40px),
    var(--bg);
  background-color: var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); }
b, strong { font-weight: 650; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(26px, 5vw, 34px); font-weight: 760; margin: 4px 0 8px; }
h2 { font-size: 21px; font-weight: 720; margin: 0 0 10px; }
h3 { font-size: 17px; font-weight: 700; margin: 18px 0 8px; }
h4 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; color: var(--ink-2); }
p { margin: 0 0 10px; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hint { color: var(--muted); font-size: 14.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Glossary terms: one tap opens the definition (HTML popover), never hover only.
   The vertical padding with an equal negative margin widens the tap area towards 44 pt
   without moving the text (padding on an inline box does not change the line height). */
.term {
  display: none; font: inherit; color: inherit; background: none; border: none;
  padding: 10px 2px; margin: -10px -2px; min-height: 0; text-transform: inherit;
  letter-spacing: inherit; cursor: pointer;
  text-decoration: underline dotted; text-decoration-color: var(--none-lo);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.term:hover, .term:focus-visible { text-decoration-color: var(--accent); }
.term-link { color: inherit; }
.def {
  display: none; max-width: min(28rem, calc(100vw - 32px)); padding: 20px 20px 16px;
  max-height: calc(100dvh - 32px); overflow: auto; margin: auto;
  border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2); font-size: 16px; line-height: 1.45; text-transform: none;
  letter-spacing: normal; font-weight: 400; text-align: left;
}
.def::backdrop { background: rgba(5, 7, 11, 0.4); }
.def p { margin: 0 0 10px; }
.def .def-title { font-family: var(--display); font-weight: 700; font-size: 19px; }
.def .def-why { color: var(--muted); font-size: 15px; }
.def-close {
  min-height: 44px; min-width: 96px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); font: 600 15px var(--sans); cursor: pointer;
}
@supports selector(:popover-open) {
  .term { display: inline; }
  .term-link { display: none; }
  .def:popover-open { display: block; }
}

/* ---------- Sticky top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface-glass);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .bar { background: var(--surface); } }
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.bar-in {
  max-width: 1440px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo));
  box-shadow: 0 4px 14px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #ffffff; font: 800 16px var(--rounded);
}
.brand-name { font: 800 17px var(--display); letter-spacing: 0.16em; }
.nav { display: flex; gap: 2px; justify-content: center; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 560; font-size: 15px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
  font: 700 13px var(--sans); letter-spacing: 0.06em; white-space: nowrap; justify-self: end;
}
.live-pill .t { color: var(--muted); font-weight: 560; letter-spacing: 0; font-family: var(--mono); font-size: 13px; }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--none-lo); flex: none; }
.live-pill.is-polling .pulse { background: var(--accent-lo); }
.live-pill.is-polling .pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--accent-hi); opacity: 0; animation: pulse 2.4s ease-out infinite;
}
/* Pulse only while the state is LIVE; amber without a pulse for warn and risk states. */
.live-pill.is-polling:not(.tone-live) .pulse::after { animation: none; display: none; }
.live-pill.is-polling.tone-muted .pulse { background: var(--none-lo); }
.live-pill.tone-warn, .live-pill.tone-risk { color: var(--risk); border-color: var(--risk-line); background: var(--risk-soft); }
.live-pill.tone-warn .pulse, .live-pill.tone-risk .pulse { background: var(--risk-hi); }
.live-pill.is-stale { color: var(--risk); border-color: var(--risk-line); background: var(--risk-soft); }
.live-pill.is-stale .pulse { background: var(--risk-hi); }
.live-pill.is-stale .pulse::after { animation: none; display: none; }
@keyframes pulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-pill.is-polling .pulse::after { animation: none; opacity: 0.5; } }

@media (max-width: 1023px) {
  .bar-in { grid-template-columns: auto 1fr; }
  .nav {
    grid-column: 1 / -1; grid-row: 2; justify-content: flex-start;
    overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
}

/* ---------- Page ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 16px 16px 40px; }
@media (min-width: 768px) { .page { padding: 28px 28px 56px; } }
@media (min-width: 1280px) { .page { padding: 32px 40px 64px; } }
.page-head { margin: 4px 2px 18px; max-width: 60rem; }
.page-head p { color: var(--ink-2); font-size: 16px; }
.page-head .hint { color: var(--muted); }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 18px; margin: 0 0 16px; min-width: 0;
}
@media (min-width: 768px) { .panel { padding: 22px; } }
.panel > :last-child { margin-bottom: 0; }
.eyebrow {
  margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.grid-2 { display: grid; gap: 16px; }
.grid-2 > .panel { margin: 0; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

/* Notices */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 16px;
  border-radius: 18px; font-size: 15px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2);
}
.notice::before {
  content: ""; flex: none; width: 0; height: 0; margin-top: 3px; border-left: 8px solid transparent;
  border-right: 8px solid transparent; border-bottom: 14px solid var(--risk-hi);
}
.notice-warn, .notice-error { background: var(--risk-soft); border-color: var(--risk-line); }
.notice[hidden] { display: none; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px; border-radius: 999px;
  font: 700 12px/1.3 var(--sans); letter-spacing: 0.04em; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
}
.chip-plain, .chip-live { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); text-transform: uppercase; }
.chip-plain::before, .chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip-t { min-width: 0; } /* the chip text is one flex item, so the gap sits only after the icon */
.nw { white-space: nowrap; }
.chip-muted { color: var(--muted); font-weight: 650; letter-spacing: 0; font-size: 12.5px; }
.chip-warn { color: var(--risk); border-color: var(--risk-line); background: transparent; letter-spacing: 0; font-size: 12.5px; }
.chip-risk { color: var(--risk); background: var(--risk-soft); border-color: var(--risk-line); text-transform: uppercase; }
.chip-risk::before, .chip-warn::before {
  content: ""; flex: none; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 9px solid currentColor;
}

/* ---------- Home: status panel and next release ---------- */
.top { display: grid; gap: 12px; margin-bottom: 8px; }
.top > .panel, .top > .release { margin: 0; }
@media (min-width: 1024px) { .top { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 20px; } }

/* Status panel: every word comes from the system state, never a hard-coded "live". */
.status { display: grid; gap: 10px; align-content: start; }
.st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-msg { margin: 0; font-size: 15px; color: var(--ink-2); }
.st-reopen { margin: 0; font-size: 15px; font-weight: 600; }
.ages { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.ages li { white-space: nowrap; }
.ages b { color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.checked { margin: 0; font-size: 14px; color: var(--muted); }
.checked b { color: var(--ink-2); font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.status.tone-risk { border-color: var(--risk-line); background: linear-gradient(var(--risk-soft), var(--risk-soft)), var(--surface); }
.status.tone-warn { border-color: var(--risk-line); }
@media (min-width: 1024px) { .status { gap: 14px; } .st-msg { font-size: 17px; } }

/* Next release: inverse panel with an amber (risk) countdown, in both themes. */
.release {
  position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius);
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(255, 180, 60, 0.20), transparent 62%),
    linear-gradient(160deg, #18202f, var(--inverse) 62%);
  color: var(--inverse-ink); box-shadow: var(--shadow-2); border: 1px solid rgba(255, 255, 255, 0.07);
  display: grid; gap: 14px; align-content: start; min-width: 0;
}
@media (min-width: 768px) { .release { padding: 22px; gap: 16px; } }
.release .eyebrow { color: var(--inverse-muted); }
.release p { margin: 0; }
.release a { color: var(--inverse-ink); }
.release .term { text-decoration-color: rgba(255, 255, 255, 0.5); }
.rel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.rel-name { margin: 4px 0 2px; font: 720 clamp(21px, 4.6vw, 28px)/1.15 var(--display); letter-spacing: -0.02em; color: var(--inverse-ink); }
.rel-when { font-size: 15px; color: var(--inverse-ink); }
.countdown-boxes { display: flex; align-items: center; gap: 6px; }
.countdown-boxes.cd-h0 .cd-hours { display: none; }
.cd-pre, .cd-suf { font-size: 14px; color: var(--inverse-muted); }
.cd-box {
  display: flex; align-items: baseline; gap: 3px; padding: 8px 11px; border-radius: 14px;
  background: rgba(255, 180, 60, 0.08); border: 1px solid rgba(255, 180, 60, 0.30);
  box-shadow: 0 0 24px rgba(255, 180, 60, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cd-box b { font: 650 26px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: #ffd27f; }
.cd-box i { font-style: normal; font-size: 13px; color: var(--inverse-muted); font-weight: 600; }
@media (min-width: 768px) { .cd-box { padding: 10px 14px; border-radius: 16px; } .cd-box b { font-size: 34px; } }

.tl-bar { position: relative; }
.timeline svg { display: block; width: 100%; height: 22px; }
.tl-track { fill: rgba(255, 255, 255, 0.12); }
.tl-zoom { fill: rgba(255, 255, 255, 0.20); }
.tl-break { stroke: rgba(255, 255, 255, 0.55); stroke-width: 2; }
.tl-black { fill: rgba(255, 180, 60, 0.55); }
.tl-rel { fill: #ffd27f; }
/* The "now" marker: an HTML span over the SVG (its class moves with the clock). */
.tl-bar > .clock {
  position: absolute; top: 2px; width: 5px; height: 18px; margin-left: -2px; border-radius: 2px;
  background: #ffffff; box-shadow: 0 0 0 2px rgba(12, 18, 32, 0.6);
}
.tpre { left: 2px; }
.tz0 { left: 72%; } .tz1 { left: 73.4%; } .tz2 { left: 74.8%; } .tz3 { left: 76.2%; }
.tz4 { left: 77.6%; } .tz5 { left: 79%; } .tz6 { left: 80.4%; } .tz7 { left: 81.8%; }
.tz8 { left: 83.2%; } .tz9 { left: 84.6%; } .tz10 { left: 86%; } .tz11 { left: 87.4%; }
.tz12 { left: 88.8%; } .tz13 { left: 90.2%; } .tz14 { left: 91.6%; } .tz15 { left: 93%; }
.tz16 { left: 94.4%; } .tz17 { left: 95.8%; } .tz18 { left: 97.2%; } .tz19 { left: 98.6%; }
.tz20 { left: calc(100% - 3px); }
.tl-labels { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--inverse-muted); }
.tl-labels .r { text-align: right; white-space: nowrap; }
.tl-labels b { color: var(--inverse-ink); font-family: var(--mono); font-weight: 600; font-size: 12.5px; }
.tl-note { margin-top: 2px; font-size: 12.5px; color: var(--inverse-muted); }
.rel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.blackout {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 180, 60, 0.14); border: 1px solid rgba(255, 180, 60, 0.38); color: #ffd27f;
  font-size: 14px; font-weight: 600;
}
.blackout .term, .blackout .term-link { color: #ffd27f; }
.rel-later { font-size: 14px; color: var(--inverse-muted); }
.rel-later b { color: var(--inverse-ink); font-weight: 600; }
.rel-empty { font-size: 16px; color: var(--inverse-ink); }
.more, a.more-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.more::after, a.more-link::after { content: "\203A"; margin-left: 6px; font-size: 18px; }

/* ---------- Section heading ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 22px 2px 12px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font: 760 24px var(--display); letter-spacing: -0.025em; }
.sec-head p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Horizon cards: one column on a phone, 2 x 2 from iPad portrait, four in a row
   from 1280 px (never 3 + 1). ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1280px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  container-type: inline-size;
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: 20px 18px 12px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.card p { margin: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-head > div { min-width: 0; flex: 1 1 11rem; }
.card-head > .chips { flex: 0 0 auto; }
.card-head h3 { margin: 0; font: 770 26px/1.1 var(--display); letter-spacing: -0.025em; }
.card-head h3 small { display: block; font: 700 12.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.card-head .meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.card-head .chips { justify-content: flex-end; margin-top: 2px; margin-left: auto; max-width: 100%; }
.card-head .chip { white-space: nowrap; }
/* Secondary chips (Experimental, EVENT RISK, late bar, reason codes) on their own row,
   always one chip high even when empty, so cards in one row line up. */
.sub-chips { min-height: 28px; margin-top: -8px; }
.chip-was { display: none; }
.card.expired .head-chip .chip-plain { display: none; }
.card.expired .head-chip .chip-was { display: inline-flex; }
.chip { max-width: 100%; }
.numbers { display: flex; flex-direction: column; gap: 18px; }

.question {
  padding: 14px 16px; border-radius: 16px; background: var(--surface-2);
  font-size: 16px; line-height: 1.45; color: var(--ink-2);
}
.question .q { display: block; font: 700 12.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* Hero: segmented ring with a tick for the usual rate, beside comparison bars. Stacked by
   default; side by side when the card is wide enough (container query). */
.hero { display: grid; gap: 16px; justify-items: center; }
.hero .compare { width: 100%; }
@container (min-width: 320px) {
  .hero { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; align-items: center; gap: 16px; }
  .hero .ring { --size: 124px; --w: 11px; }
  .hero .ring-n { font-size: 52px; }
}
@container (min-width: 400px) {
  .hero { gap: 20px; }
  .hero .ring { --size: 140px; --w: 12px; }
  .hero .ring-n { font-size: 60px; }
}
.ring {
  --v: 0; --u: 0; --size: 140px; --w: 12px;
  position: relative; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; flex: none;
}
/* Fill and tick both start at 12 o'clock and run clockwise (36deg per tenth). */
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-hi) 0deg, var(--accent-lo) calc(var(--v) * 36deg), var(--track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + 1px)),
                repeating-conic-gradient(from 0deg, #000 0deg 33.5deg, transparent 33.5deg 36deg);
  -webkit-mask-composite: source-in;
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + 1px)),
                repeating-conic-gradient(from 0deg, #000 0deg 33.5deg, transparent 33.5deg 36deg);
          mask-composite: intersect;
  filter: drop-shadow(0 6px 14px var(--accent-glow));
}
.ring::after {
  content: ""; position: absolute; left: 50%; top: -6px; width: 3px; height: calc(var(--w) + 12px);
  margin-left: -1.5px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 2px var(--surface);
  transform-origin: 50% calc(var(--size) / 2 + 6px);
  transform: rotate(calc(var(--u) * 36deg));
}
.ring.nou::after { display: none; }
.p0 { --v: 0; } .p1 { --v: 1; } .p2 { --v: 2; } .p3 { --v: 3; } .p4 { --v: 4; } .p5 { --v: 5; }
.p6 { --v: 6; } .p7 { --v: 7; } .p8 { --v: 8; } .p9 { --v: 9; } .p10 { --v: 10; }
.u0 { --u: 0; } .u1 { --u: 1; } .u2 { --u: 2; } .u3 { --u: 3; } .u4 { --u: 4; } .u5 { --u: 5; }
.u6 { --u: 6; } .u7 { --u: 7; } .u8 { --u: 8; } .u9 { --u: 9; } .u10 { --u: 10; }
.ring-c { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.ring-k { font: 700 12px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ring-n { font: 700 60px/0.9 var(--rounded); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ring-d { margin-top: 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.ring-empty { font: 650 15px/1.2 var(--sans); color: var(--muted); text-align: center; max-width: 9ch; }

.compare { display: grid; gap: 11px; min-width: 0; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px; }
.cmp-l { font-size: 14px; color: var(--muted); min-width: 0; }
.cmp-l .term { text-align: left; }
.cmp-v { font-size: 14px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-t { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.cmp-f { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--none-hi); }
.cmp.me .cmp-l { color: var(--ink); font-weight: 700; letter-spacing: 0.06em; font-size: 13px; text-transform: uppercase; }
.cmp.me .cmp-v { color: var(--accent); font-size: 15px; }
.cmp.me .cmp-t { height: 10px; }
.cmp.me .cmp-f { background: linear-gradient(90deg, var(--accent-hi), var(--accent-lo)); }
.f0 { width: 0; } .f1 { width: 10%; } .f2 { width: 20%; } .f3 { width: 30%; } .f4 { width: 40%; }
.f5 { width: 50%; } .f6 { width: 60%; } .f7 { width: 70%; } .f8 { width: 80%; } .f9 { width: 90%; }
.f10 { width: 100%; }
.legend { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.legend::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--ink); flex: none; }

/* No proven skill against the time of day: ring and ULTRON bar go grey, no glow. */
.skill-none .ring::before {
  background: conic-gradient(from 0deg, var(--none-hi) 0deg, var(--none-lo) calc(var(--v) * 36deg), var(--track) 0);
  filter: none;
}
.skill-none .cmp.me .cmp-f { background: var(--none-lo); }
.skill-none .cmp.me .cmp-v { color: var(--ink-2); }
.skill-none .ring-n { color: var(--ink-2); }

/* Honest skill lines: label above, tag below, the tag wraps. */
.facts { margin: 0; padding: 0; list-style: none; display: grid; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.facts li { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.facts li + li { border-top: 1px solid var(--line); }
.tag {
  display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 650; line-height: 1.3; white-space: normal;
}
@container (max-width: 340px) { .tag { font-size: 13px; padding: 4px 10px; } }
.tag-some { background: var(--accent-soft); color: var(--accent); }
.tag-none { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* Swing range */
.swing { display: grid; gap: 4px; }
.swing-v { margin-top: 2px; font: 700 34px/1.1 var(--rounded); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.swing-v span { font: 560 17px var(--sans); color: var(--muted); margin: 0 4px; letter-spacing: 0; }
.swing .sub { font-size: 14px; color: var(--muted); }

/* Secondary: up / quiet / down split. Quiet is the strong tone; up and down equal and faint. */
.split { padding-top: 14px; border-top: 1px dashed var(--line-2); display: grid; gap: 8px; }
.split-h { font-size: 14px; color: var(--muted); }
.split-h b { color: var(--ink-2); font-weight: 600; }
.split-h .term, .split-h .term-link { white-space: nowrap; }
.split svg { display: block; width: 100%; height: 8px; }
.split svg.usual { height: 4px; }
.sp-dir { fill: var(--split-dir); }
.sp-quiet { fill: var(--split-quiet); }
.split svg.usual .sp-quiet { fill: var(--none-hi); }
.split-n { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.split-n b { color: var(--ink-2); font-weight: 650; }
.split-n .grp { white-space: nowrap; }
.split-u { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lean { font-size: 14px; color: var(--muted); }
.rel-lines { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }

.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.model { font-size: 12.5px; color: var(--muted); min-width: 0; flex: 1 1 12rem; line-height: 1.5; display: grid; gap: 2px; }
.model .seg, .model-line .seg { display: block; }
@container (max-width: 379px) { .card-foot .why-btn { flex: 1 1 100%; justify-content: center; } }
.why-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  text-decoration: none; font-weight: 650; font-size: 15px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  margin-left: auto;
}
.why-btn::after { content: "\203A"; font-size: 18px; line-height: 1; color: var(--accent); }
.why-btn:hover { border-color: var(--accent-line); }

/* EVENT RISK in a blackout: the banner is the strong cue; the numbers stay readable in the
   muted colour (at least 4.5:1), greyed by colour and never faded. */
.risk-banner {
  padding: 12px 14px; border-radius: 14px; background: var(--risk-soft); border: 1px solid var(--risk-line);
  font-size: 14.5px; color: var(--ink);
}
.risk-banner p + p { margin-top: 4px; color: var(--ink-2); }
.greyed { border-color: var(--risk-line); }
.greyed .ring::before {
  background: conic-gradient(from 0deg, var(--none-hi) 0deg, var(--none-lo) calc(var(--v) * 36deg), var(--track) 0);
  filter: none;
}
.greyed .ring-n, .greyed .cmp.me .cmp-v, .greyed .swing-v, .greyed .question { color: var(--muted); }
.greyed .cmp.me .cmp-f { background: var(--none-lo); }
.greyed .tag-some { background: var(--surface-2); color: var(--muted); }

/* DEGRADED: numbers kept for context with an amber edge and note. */
.degraded { border-color: var(--risk-line); }
.note {
  padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2);
  border-left: 4px solid var(--risk-hi);
}

/* Unavailable, closed and expired: an empty ring, never a number. */
.ring-off::before { background: var(--track); filter: none; }
.ring-off::after { display: none; }
.empty { display: grid; justify-items: center; gap: 14px; padding: 8px 0 4px; text-align: center; }
.empty p { font-size: 15.5px; color: var(--ink-2); max-width: 32ch; }
.mode-expired, .mode-closed, .card.expired { background: var(--surface-2); box-shadow: none; }
.mode-expired, .card.expired { border: 1px dashed var(--line-2); }
.mode-unavailable { border-color: var(--risk-line); }
.expired-note { display: none; }
.card.expired .numbers { display: none; }
.card.expired .expired-note { display: block; }

/* ---------- Why page ---------- */
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.back::before { content: "\2039"; margin-right: 6px; font-size: 18px; }
.why-layout { display: grid; gap: 16px; }
.why-layout > .panel, .why-layout > .why-reading { margin: 0; }
@media (min-width: 1024px) {
  .why-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
  .why-layout > * { grid-column: 2; }
  .why-layout > .why-reading { grid-column: 1; grid-row: 1 / span 6; position: sticky; top: 84px; }
}
.why-reading > .hint { margin: 10px 4px 0; }
.lines p { color: var(--ink-2); }
.bullets { margin: 0; padding-left: 20px; color: var(--ink-2); }
.bullets li + li { margin-top: 6px; }
details.drivers {
  padding: 6px 18px; margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1); min-width: 0;
}
@media (min-width: 768px) { details.drivers { padding: 8px 22px; } }
details.drivers summary {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 700; font-size: 17px;
}
details.drivers summary .hint { font-family: var(--sans); font-weight: 400; display: block; margin-top: 2px; }
details.drivers summary::-webkit-details-marker { display: none; }
details.drivers[open] { padding-bottom: 18px; }
.sum-mark {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--accent); font: 600 14px var(--sans);
  background: var(--surface-2);
}
.sum-hide { display: none; }
details[open] > summary .sum-show { display: none; }
details[open] > summary .sum-hide { display: inline; }

/* ---------- Tables ---------- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
table { border-collapse: collapse; }
.rows, .pairs { width: 100%; font-size: 15px; }
.rows th, .rows td, .pairs th, .pairs td {
  text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.rows thead th {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.rows tbody tr:last-child td, .pairs tr:last-child th, .pairs tr:last-child td { border-bottom: none; }
.rows td:first-child, .rows th:first-child, .pairs th { padding-left: 0; }
.pairs th { font-weight: 400; width: 50%; color: var(--muted); }
.pairs td { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.result-ok { color: var(--accent); font-weight: 650; }
.result-bad { color: var(--risk); font-weight: 700; }

/* ---------- Track record ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.track { scroll-margin-top: 120px; }
.track-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 6px; }
.track-head h2 { margin: 0; font-size: 26px; font-weight: 770; letter-spacing: -0.025em; }
.track-cols { display: grid; gap: 8px 28px; }
@media (min-width: 1024px) { .track-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.track-cols > div { min-width: 0; }
.track h3 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); margin: 16px 0 10px; }
.model-line { font-size: 13.5px; color: var(--muted); line-height: 1.6; display: grid; gap: 2px; }
.table-note { margin-top: -4px; }
.figures { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0 0 12px; }
@media (min-width: 640px) { .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.figures figure {
  margin: 0; min-width: 0; padding: 10px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
figure svg { display: block; width: 100%; max-width: 100%; height: auto; }
.paper-box { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }
.paper-box p:last-child { margin: 0; }

/* ---------- Releases page ---------- */
.event-list { display: grid; gap: 14px; }
@media (min-width: 1024px) { .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.event-row { margin: 0; display: grid; gap: 10px; align-content: start; }
.event-row p { margin: 0; }
.ev-name { margin: 0; font-size: 21px; font-weight: 720; }
.ev-when { font-size: 15.5px; color: var(--ink-2); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ev-count {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--risk-soft); border: 1px solid var(--risk-line); color: var(--risk);
  font: 650 14px var(--mono); font-variant-numeric: tabular-nums;
}
.ev-black { font-size: 14.5px; color: var(--ink-2); }
.ev-cons { padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.ev-cons b { color: var(--ink); font-family: var(--mono); font-weight: 650; }

/* ---------- Status page ---------- */
.status-page .status { margin-bottom: 16px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.plain-list li:last-child { border-bottom: none; }
.plain-list .when { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.facts-line { font-size: 15px; color: var(--ink-2); }

/* ---------- Can and cannot ---------- */
.about-grid { display: grid; gap: 12px; margin: 0 0 16px; }
.about-row { display: grid; gap: 0; margin: 0; padding: 0; overflow: hidden; }
@media (min-width: 768px) { .about-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.about-row > div { padding: 16px 18px; min-width: 0; }
.about-row > div + div { border-top: 1px solid var(--line); background: var(--surface-2); }
@media (min-width: 768px) { .about-row > div + div { border-top: none; border-left: 1px solid var(--line); } }
.about-row .eyebrow { margin-bottom: 6px; }
.about-row .can .eyebrow { color: var(--accent); }
.about-row p { margin: 0; color: var(--ink-2); }

/* ---------- Glossary ---------- */
.filter-box { display: grid; gap: 8px; }
.filter-box label { font-weight: 650; font-size: 14px; color: var(--muted); }
#glossary-filter, .login input {
  width: 100%; min-height: 48px; font: inherit; font-size: 17px; padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--ink);
}
#glossary-filter:focus, .login input:focus { outline: 3px solid var(--accent-line); border-color: var(--accent); }
dl.glossary { margin: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { dl.glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.entry {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1);
  padding: 16px 18px; min-width: 0;
}
.entry[hidden] { display: none; }
dl.glossary dt { font-family: var(--display); font-weight: 720; font-size: 19px; margin: 0 0 6px; scroll-margin-top: 120px; }
dl.glossary dt:target { color: var(--accent); }
.entry:has(dt:target) { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1); }
dl.glossary dd { margin: 0; }
dl.glossary dd p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
dl.glossary dd p:first-child { color: var(--ink); font-size: 16px; }
dl.glossary dd p:last-child { margin: 0; }
dfn { font-style: normal; }

/* ---------- Sign in ---------- */
.login-wrap { max-width: 26rem; margin: 6vh auto 0; }
.login { display: grid; gap: 8px; }
.login label { font-weight: 650; font-size: 14px; color: var(--muted); margin-top: 6px; }
.btn, .login button {
  min-height: 48px; margin-top: 12px; padding: 0 20px; border-radius: 999px; border: none; cursor: pointer;
  font: 650 16px var(--sans); color: #ffffff;
  background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo));
  box-shadow: 0 6px 18px var(--accent-glow);
}
.login + .hint { margin-top: 12px; }
button.quiet {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 600 15px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
}

/* ---------- Footer ---------- */
footer.disclaimer { max-width: 1440px; margin: 0 auto; padding: 0 16px 48px; }
.foot-in { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 8px; justify-items: start; }
.foot-in p { margin: 0; }
.disclaimer-text { font-size: 15px; font-weight: 650; color: var(--ink-2); }
.foot-in .hint { font-size: 14px; }
.signout { margin-top: 4px; }
@media (min-width: 768px) { footer.disclaimer { padding: 0 28px 56px; } }
@media (min-width: 1280px) { footer.disclaimer { padding: 0 40px 64px; } }

/* Charts (gce.eval.svg classes; kept equal to SVG_CSS by a test). */
.sv-t { fill: var(--muted,#57606a); font-size: 10px; font-family: inherit; }
.sv-t.sv-ink { fill: var(--ink,#1f2328); }
.sv-t.sv-lg { font-size: 11px; }
.sv-l { stroke-width: 1; }
.sv-l.sv-grid { stroke: var(--grid,#d0d7de); }
.sv-l.sv-muted { stroke: var(--muted,#57606a); }
.sv-l.sv-ink { stroke: var(--ink,#1f2328); }
.sv-dash { stroke-dasharray: 4 3; }
.sv-pt { fill: var(--accent,#2563eb); stroke: var(--accent,#2563eb); stroke-width: 1.5; }
.sv-pt.sv-hollow { fill: none; }
.sv-bar { fill: var(--accent,#2563eb); }
.sv-bar.sv-neg { fill: var(--negative,#c2410c); }
.sv-bar.sv-lock { fill-opacity: 0.5; stroke: var(--ink,#1f2328); stroke-dasharray: 2 2; }
.sv-x { stroke: var(--muted,#57606a); stroke-width: 1.5; fill: none; }
