/* Stratabot dashboard - Stratalytic tokens (Monolight + Work Sans, #0700E8 / #F1F1F3 / #17181C).
   Wereld: dienstregeling van een handelsdag, gelezen als een seinbord. Grijs is de grond;
   kleur betekent altijd status (groen/amber/rood) of nadruk (blauw), nooit decoratie. */

@font-face { font-family: "Monolight"; src: url("fonts/monolight-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Monolight"; src: url("fonts/monolight-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/worksans-latin-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

/* Tokens. Licht is de basis en staat volledig op :root; donker overschrijft alleen kleuren, twee keer:
   onder prefers-color-scheme (tenzij expliciet licht gekozen) en onder data-theme="dark" (expliciete keuze
   wint). De twee donkere blokken zijn letterlijk gelijk; tests/unit/test_mm_theme.py bewaakt dat, en dat elk
   token uit het donkere blok ook hier staat. Kleur bestaat nergens anders dan in deze drie blokken
   (uitzondering, tijdelijk: het dienstregeling-blok). Alle tekstparen halen WCAG AA 4,5:1, lampen 3:1. */
:root {
  color-scheme: light;
  --bg: #F1F1F3;
  --surface: #FFFFFF;
  --surface-2: #F7F7F9;
  --ink: #17181C;
  --ink-2: #45464D;
  --ink-3: #63646B;
  --line: #DCDDE2;
  --line-2: #ECEDF0;
  --line-3: #C5C6CE;
  --blue: #0700E8;
  --blue-ink: #0600B8;
  --blue-soft: #E7E6FD;
  --on-blue: #FFFFFF;
  --ok: #16A34A;   --ok-ink: #13773A;   --ok-soft: #E3F5E9;
  --warn: #F97316; --warn-ink: #A84D06; --warn-soft: #FDEBDC;
  --crit: #DC2626; --crit-ink: #B91C1C; --crit-soft: #FBE3E3;
  --off: #A5A6AD;  --off-ink: #63646B;  --off-soft: #EEEEF1;
  --lamp-ink: #FFFFFF;
  --pos: #13773A; --neg: #B91C1C;
  --grey-1: #5B5C63; --grey-2: #85868E; --grey-3: #A5A6AD; --grey-4: #BEBFC6; --grey-5: #6F7078;
  --display: "Monolight", "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 4px;
  --gutter: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
/* Donker: dezelfde grijze grond, nu de inkt van het merk (#17181C-familie) als grond en licht als inkt.
   Blauw wordt lichter (#0700E8 is op donker onleesbaar), de seinkleuren feller met een donker icoon,
   de tinten (-soft) donker en warm zodat tags en rijen leesbaar blijven. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111215;
    --surface: #1E1F24;
    --surface-2: #26272D;
    --ink: #F1F1F3;
    --ink-2: #C6C7CE;
    --ink-3: #9EA0A8;
    --line: #383940;
    --line-2: #2C2D33;
    --line-3: #4A4B53;
    --blue: #8582FF;
    --blue-ink: #A5A3FF;
    --blue-soft: #26255A;
    --on-blue: #0E0F12;
    --ok: #3DBF6B;   --ok-ink: #6EE398;   --ok-soft: #17311F;
    --warn: #FB8C2B; --warn-ink: #FFB05C; --warn-soft: #3A2612;
    --crit: #EF4A4A; --crit-ink: #FF8585; --crit-soft: #3F1B1B;
    --off: #6E6F77;  --off-ink: #A6A7AF;  --off-soft: #27282E;
    --lamp-ink: #0E0F12;
    --pos: #6EE398; --neg: #FF8585;
    --grey-1: #B4B5BD; --grey-2: #8E8F97; --grey-3: #74757D; --grey-4: #5E5F67; --grey-5: #A0A1A9;
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111215;
    --surface: #1E1F24;
    --surface-2: #26272D;
    --ink: #F1F1F3;
    --ink-2: #C6C7CE;
    --ink-3: #9EA0A8;
    --line: #383940;
    --line-2: #2C2D33;
    --line-3: #4A4B53;
    --blue: #8582FF;
    --blue-ink: #A5A3FF;
    --blue-soft: #26255A;
    --on-blue: #0E0F12;
    --ok: #3DBF6B;   --ok-ink: #6EE398;   --ok-soft: #17311F;
    --warn: #FB8C2B; --warn-ink: #FFB05C; --warn-soft: #3A2612;
    --crit: #EF4A4A; --crit-ink: #FF8585; --crit-soft: #3F1B1B;
    --off: #6E6F77;  --off-ink: #A6A7AF;  --off-soft: #27282E;
    --lamp-ink: #0E0F12;
    --pos: #6EE398; --neg: #FF8585;
    --grey-1: #B4B5BD; --grey-2: #8E8F97; --grey-3: #74757D; --grey-4: #5E5F67; --grey-5: #A0A1A9;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-3) var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); }
::selection { background: var(--blue); color: var(--on-blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
a { color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-3); border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
input, button { font: inherit; caret-color: var(--blue); }
svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.25; }
.num, td.num, .tnum { font-variant-numeric: tabular-nums lining-nums; }
.label { font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.small { font-size: 0.8125rem; }

/* ---------- pagina-raster ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 0 32px 64px; }
.section { margin-top: 48px; }
.section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.section > header p { margin: 0; color: var(--ink-3); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { display: grid; gap: var(--gutter); align-items: start; }
/* een grid-cel krijgt anders zijn min-content-breedte en duwt de pagina horizontaal open (mobiel /propr) */
.grid > * { min-width: 0; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- masthead ---------- */
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
.mast .brand { display: flex; align-items: center; gap: 12px; }
.mast .brand a { color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; }
.mast .brand .mark { width: 14px; height: 14px; background: var(--blue); transform: rotate(45deg); flex: none; }
.mast .brand .host { color: var(--ink-3); font-size: 0.8125rem; }
.mast nav { display: flex; gap: 20px; justify-content: flex-end; font-size: 0.875rem; }
.mast nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.mast nav a[aria-current="page"], .mast nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.clock { color: var(--ink-3); font-size: 0.8125rem; text-align: right; }
.mast nav form { display: inline; }
.mast nav button { all: unset; cursor: pointer; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid transparent; font-size: 0.875rem; }
.mast nav button:hover { color: var(--ink); border-bottom-color: var(--ink); }
.mast nav button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.mast .clock form.refresh { display: inline; margin-left: 10px; }
.mast .clock form.refresh button { all: unset; cursor: pointer; color: var(--blue); border-bottom: 1px solid transparent; }
.mast .clock form.refresh button:hover { border-bottom-color: var(--blue); }
.mast .clock form.refresh button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
/* themaschakelaar: drie standen als één klein seinkastje; de actieve stand is de inkt, de rest de grond */
.theme { display: inline-flex; vertical-align: middle; margin-left: 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.theme button { all: unset; cursor: pointer; padding: 3px 8px; font: 500 0.6875rem/1.4 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--line); transition: background 160ms var(--ease-out), color 160ms var(--ease-out); }
.theme button:first-child { border-left: 0; border-radius: 2px 0 0 2px; }
.theme button:last-child { border-radius: 0 2px 2px 0; }
.theme button:hover { color: var(--ink); background: var(--surface-2); }
.theme button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }
.theme button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 2px; }

/* ---------- verdict ---------- */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 20px 24px; align-items: center; padding: 28px 0 8px; }
.verdict .lamp-xl { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--lamp-ink); }
.verdict .lamp-xl svg { width: 30px; height: 30px; }
.verdict h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.02em; text-transform: lowercase; }
.verdict p { margin: 4px 0 0; color: var(--ink-2); font-size: 1rem; }
.verdict .facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--ink-3); font-size: 0.8125rem; padding-top: 6px; }
.verdict .facts b { color: var(--ink); font-weight: 500; }
.lamp-xl.is-ok { background: var(--ok); } .lamp-xl.is-warn { background: var(--warn); } .lamp-xl.is-crit { background: var(--crit); } .lamp-xl.is-off { background: var(--off); }

/* ---------- lampen ---------- */
.lamp { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--lamp-ink); flex: none; vertical-align: -3px; }
.lamp svg { width: 11px; height: 11px; }
.lamp.is-ok { background: var(--ok); }
.lamp.is-warn { background: var(--warn); }
.lamp.is-crit { background: var(--crit); }
.lamp.is-off { background: transparent; border: 1.5px solid var(--off); color: var(--off); }
.lamp.lg { width: 24px; height: 24px; } .lamp.lg svg { width: 14px; height: 14px; }
.tag { display: inline-block; font-family: var(--display); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tag.is-crit { background: var(--crit-soft); border-color: transparent; color: var(--crit-ink); }
.tag.is-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.tag.is-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok-ink); }
.tag.is-off { background: var(--off-soft); border-color: transparent; color: var(--off-ink); }

/* ---------- aandacht ---------- */
.attention { border-top: 1px solid var(--line); }
.attention .row { display: grid; grid-template-columns: 18px 118px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.attention .row.is-crit { background: linear-gradient(90deg, var(--crit-soft), transparent 60%); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.attention .row .title { font-weight: 500; }
.attention .row .detail { color: var(--ink-2); }
.attention .row time { color: var(--ink-3); font-size: 0.8125rem; white-space: nowrap; }
.attention .warns { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.attention .warns .row { grid-template-columns: 18px 108px 1fr auto; font-size: 0.9375rem; }
.attention .none { padding: 16px 0; margin: 0; color: var(--ink-2); }

/* ---------- dienstregeling ---------- */
.timeline { padding: 18px 20px 12px; overflow-x: auto; }
.timeline svg { width: 100%; min-width: 720px; height: auto; overflow: visible; }
.timeline .track { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.timeline .track-done { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.timeline .tick { stroke: var(--line-3, var(--line)); stroke-width: 1; }
.timeline .tick-major { stroke: var(--ink-3); stroke-width: 1; }
.timeline .hour { font: 500 11px var(--body); fill: var(--ink-3); font-variant-numeric: tabular-nums; text-anchor: middle; }
.timeline .window { fill: var(--blue-soft); }
.timeline .station-time { font: 500 12px var(--body); fill: var(--ink); font-variant-numeric: tabular-nums; text-anchor: middle; }
.timeline .station-name { font: 400 11px var(--body); fill: var(--ink-2); text-anchor: middle; }
.timeline .leader { stroke: var(--line); stroke-width: 1; }
.timeline .station { stroke: var(--surface); stroke-width: 3; }
.timeline .station.is-done, .timeline .station.is-late { fill: var(--ok); }
.timeline .station.is-due { fill: var(--warn); }
.timeline .station.is-missed, .timeline .station.is-failed { fill: var(--crit); }
.timeline .station.is-planned { fill: var(--surface); stroke: var(--ink-2); stroke-width: 2; }
.timeline .station.is-no-service { fill: var(--off-soft); stroke: var(--off); stroke-width: 2; }
.timeline .now-line { stroke: var(--blue); stroke-width: 2; }
.timeline .now-label { font: 500 11px var(--display); fill: var(--blue-ink); letter-spacing: 0.04em; text-anchor: middle; }
.timeline .lane-label { font: 500 10.5px var(--display); fill: var(--ink-3); letter-spacing: 0.05em; text-transform: uppercase; }
.timeline .propr-track { stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 6; }
.timeline .propr-track.is-warn { stroke: var(--warn); } .timeline .propr-track.is-crit { stroke: var(--crit); } .timeline .propr-track.is-off { stroke: var(--off); }
.timeline .propr-dot { stroke: var(--surface); stroke-width: 3; fill: var(--ok); }
.timeline .propr-dot.is-warn { fill: var(--warn); } .timeline .propr-dot.is-crit { fill: var(--crit); } .timeline .propr-dot.is-off { fill: var(--off); }
.timeline .legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--ink-2); }
.timeline .legend li { display: flex; align-items: center; gap: 7px; }
.timeline .legend i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .timeline .track-done { transition: stroke-dashoffset 900ms var(--ease-out); }
  .timeline.is-live .track-done { stroke-dashoffset: 0 !important; }
}

/* ---------- boekenbord ---------- */
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font-family: var(--display); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board th.num, .board td.num { text-align: right; }
.board td { padding: 14px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr { transition: background 160ms var(--ease-out); }
.board tbody tr:hover { background: var(--surface-2); }
.board .book { display: flex; align-items: center; gap: 12px; }
.board .book a { font-weight: 500; color: var(--ink); text-decoration: none; }
.board .book a:hover { color: var(--blue); }
.board .book small { display: block; color: var(--ink-3); font-size: 0.8125rem; }
.board .equity { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.board .equity small { display: block; font-size: 0.75rem; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.board .delta { font-weight: 500; }
.board .delta small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.75rem; }
.board .age { color: var(--ink-3); font-size: 0.8125rem; white-space: nowrap; }
.board .spark { width: 180px; height: 44px; }
.board .spark path { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.board .spark .base { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.board .spark .end { fill: var(--blue); }
.volbar { width: 120px; }
.volbar .rail { position: relative; height: 8px; background: var(--line-2); border-radius: 4px; overflow: visible; }
.volbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 4px; }
.volbar .fill.is-warn { background: var(--warn); } .volbar .fill.is-crit { background: var(--crit); }
.volbar .target { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--blue); }
.volbar small { display: block; margin-top: 5px; color: var(--ink-3); font-size: 0.75rem; white-space: nowrap; }
.board .go { color: var(--ink-3); }
.board .go svg { width: 16px; height: 16px; }

/* ---------- figuren (dataviz-scaffold) ---------- */
.fig { padding: 20px 22px 16px; }
.fig .fig-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.fig h3 { font-size: 1.125rem; }
.fig .sub { margin: 4px 0 0; color: var(--ink-3); font-size: 0.8125rem; }
.fig .plot { margin-top: 14px; min-height: 120px; }
.fig .plot svg { max-width: 100%; height: auto; font-family: var(--body) !important; }
.fig .plot [aria-label="tip"] text, .fig .plot figure { font-family: var(--body); }
.fig .source { margin: 12px 0 0; color: var(--ink-3); font-size: 0.75rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fig .source .brand-mark { color: var(--blue); display: inline-block; vertical-align: -1px; margin-right: 4px; }
.legend-books { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.legend-books button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 0.8125rem; transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.legend-books button:hover { background: var(--surface-2); }
.legend-books button[aria-pressed="true"] { border-color: var(--blue); color: var(--ink); background: var(--blue-soft); }
.legend-books button:disabled { color: var(--ink-3); cursor: default; text-decoration: line-through; }
.legend-books button:disabled i { background: var(--off) !important; }
.legend-books i { width: 14px; height: 3px; border-radius: 2px; background: var(--sw, var(--grey-2)); display: inline-block; }
.legend-books .val { font-variant-numeric: tabular-nums; color: var(--ink); }
/* venster-keuze en uitlezing van de hoofdgrafiek (dradenkruis vult de uitlezing) */
.range { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.range button { appearance: none; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 4px 10px; border-radius: 2px;
  font: 500 0.75rem/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; transition: color 160ms var(--ease-out), background 160ms var(--ease-out); }
.range button:hover { color: var(--ink); }
.range button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.range button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-height: 20px; margin-top: 10px; font-size: 0.8125rem; color: var(--ink-2); }
.readout[data-empty] { visibility: hidden; }
.readout .cmp-day { font-family: var(--display); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.readout .cmp-val { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.readout .cmp-val.is-focus { color: var(--ink); }
.readout .cmp-val i { width: 10px; height: 3px; border-radius: 2px; background: var(--sw, var(--grey-2)); }
.readout .cmp-val b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.cmp-cross { stroke: var(--line-3); stroke-width: 1; pointer-events: none; }
@media (max-width: 640px) { .readout { gap: 2px 10px; font-size: 0.75rem; } }
.plot-static { margin-top: 12px; }
.plot-static th, .plot-static td { font-size: 0.8125rem; }
.js .noscript-only { display: none; }

/* ---------- signaalbord ---------- */
.signals { columns: 3; column-gap: var(--gutter); }
.signals .group { padding: 16px 18px 6px; break-inside: avoid; margin-bottom: var(--gutter); }
.signals .group > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.signals .group > header h3 { display: flex; align-items: center; gap: 10px; }
.signals .group > header .count { color: var(--ink-3); font-size: 0.8125rem; }
.checks { margin: 0; padding: 0; list-style: none; }
.checks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line-2); }
.checks li:first-child { border-top: 0; }
.checks .t { font-weight: 500; font-size: 0.875rem; line-height: 1.3; }
.checks .d { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.4; margin-top: 1px; overflow-wrap: anywhere; }
.checks li.is-off .t { color: var(--ink-3); font-weight: 400; }
.checks li.is-off .d { color: var(--ink-3); }
.checks time { color: var(--ink-3); font-size: 0.75rem; }

/* ---------- tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th { text-align: left; font-family: var(--display); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
table.data .empty td { color: var(--ink-3); padding: 16px 12px; }

/* ---------- kerncijfers (boek/propr) ---------- */
.hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.hero .stat { padding: 18px 20px 16px; border-left: 1px solid var(--line); }
.hero .stat:first-child { border-left: 0; padding-left: 0; }
.hero .stat .label { display: block; margin-bottom: 8px; }
.hero .stat .v { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.hero .stat .v.sm { font-size: 1.5rem; }
.hero .stat .sub { margin-top: 8px; color: var(--ink-3); font-size: 0.8125rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px var(--gutter); padding: 16px 20px; }
.kv div { padding: 6px 0; border-top: 1px solid var(--line-2); }
.kv dt { color: var(--ink-3); font-size: 0.75rem; font-family: var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.kv dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- propr-sporen ---------- */
.tracks { padding: 20px 22px 18px; display: grid; gap: 28px; }
.trackrow .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.trackrow .head strong { font-weight: 500; }
.trackrow .rail { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--crit-soft) 0, var(--crit-soft) var(--red, 0%), var(--warn-soft) var(--red, 0%), var(--warn-soft) var(--amber, 0%), var(--line-2) var(--amber, 0%)); }
.trackrow .mark { position: absolute; top: -6px; width: 2px; height: 22px; background: var(--ink-3); }
.trackrow .mark span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.trackrow .mark span.up { top: auto; bottom: 24px; }
.trackrow .mark.is-now { background: var(--blue); width: 3px; height: 26px; top: -8px; }
.trackrow .mark.is-now span { color: var(--blue-ink); font-weight: 500; }
.trackrow .mark.is-crit { background: var(--crit); } .trackrow .mark.is-warn { background: var(--warn); }
.trackrow .mark.is-crit span { color: var(--crit-ink); } .trackrow .mark.is-warn span { color: var(--warn-ink); }
.trackrow { padding-bottom: 28px; }

/* ---------- voet ---------- */
.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 0.8125rem; }
.foot a { color: var(--ink-2); }

/* ---------- responsive ---------- */
/* ---------- naast de backtest ---------- */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; }
.models .none { grid-column: 1 / -1; margin: 0; padding: 16px 0; color: var(--ink-2); }
.model { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.model::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--off); border-radius: var(--radius) var(--radius) 0 0; }
.model.is-ok::before { background: var(--ok); } .model.is-warn::before { background: var(--warn); } .model.is-crit::before { background: var(--crit); }
.model > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.model > header h3 { display: flex; align-items: center; gap: 8px; }
.model > header a { color: var(--ink); text-decoration: none; }
.model > header a:hover { color: var(--blue); }
.model .delta-big { font-family: var(--display); font-size: 2.25rem; line-height: 1; letter-spacing: -0.02em; margin-top: 6px; color: var(--ink); }
.model .delta-big small { font-size: 0.875rem; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.model.is-crit .delta-big { color: var(--crit-ink); }
.model .delta-big.is-off { color: var(--ink-3); }
.model .sub { margin: 0; color: var(--ink-2); font-size: 0.875rem; line-height: 1.45; }
.model .sub b { font-weight: 500; color: var(--ink); }
.model .plot { min-height: 132px; margin-top: 2px; }
.model .plot.is-empty { border: 1px dashed var(--line); border-radius: var(--radius); }
.model .foot { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line-2); color: var(--ink-3); text-wrap: pretty; }
.model .table-wrap { margin-top: 6px; }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login { width: min(100%, 400px); }
.login-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 20px; }
.login-brand .mark { width: 14px; height: 14px; background: var(--blue); transform: rotate(45deg); flex: none; }
.login-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 24px; }
.login-panel h1 { font-size: 2rem; line-height: 1; letter-spacing: -0.02em; text-transform: lowercase; }
.login-lead { margin: 10px 0 0; color: var(--ink-2); }
.login-lead code { font: 500 0.9em var(--body); background: var(--surface-2); padding: 1px 6px; border-radius: 3px; }
.login-error { display: flex; gap: 10px; align-items: flex-start; margin: 20px -12px 0; padding: 9px 12px; background: linear-gradient(90deg, var(--crit-soft), transparent 92%); border-radius: 3px; color: var(--crit-ink); font-size: 0.9375rem; }
.login-error .lamp { margin-top: 2px; }
.login-form { margin-top: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.field input:hover { border-color: var(--line-3); }
.field input:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input::placeholder { color: var(--ink-3); }
.remember { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 0.9375rem; cursor: pointer; }
.remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.btn-primary { margin-top: 4px; padding: 11px 16px; border: 1px solid var(--blue); border-radius: 3px; background: var(--blue); color: var(--on-blue); font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: 0.01em; cursor: pointer; transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-primary:disabled { background: var(--off); border-color: var(--off); cursor: default; }
.login-foot { margin: 16px 0 0; color: var(--ink-3); font-size: 0.8125rem; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .login { animation: login-in 480ms var(--ease-out) both; }
  @keyframes login-in { from { opacity: 0; transform: translateY(8px); } }
}

.mast .clock b { color: var(--ink); font-weight: 500; }
.more > summary { display: none; }
.via-bridge { margin: 8px 0 0; padding: 6px 10px; display: inline-block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font-size: 0.8125rem; }
.via-bridge b { color: var(--ink); font-weight: 500; }
@media (max-width: 1100px) {
  .signals { columns: 2; }
  .attention .warns { grid-template-columns: 1fr; }
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .models { grid-template-columns: 1fr; }
  .page { padding: 0 16px 48px; }
  .mast { grid-template-columns: 1fr; gap: 10px; padding: 14px 0 12px; }
  .mast nav { gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
  .mast nav a[href="/api/status.json"] { display: none; }
  .mast .clock { font-size: 0.8125rem; color: var(--ink-3); }
  .mast .clock .clock-more { display: none; }
  .mast .clock .theme { margin: 6px 0 0 12px; }
  .section > header p { display: none; }        /* de intro's zijn desktop-tekst; mobiel telt de kop */
  .section > header { margin-bottom: 10px; }
  /* mobiel: oordeel, de kaarten naast de backtest en Aandacht; de rest onder één knop */
  .verdict { align-items: start; padding-top: 22px; }
  .verdict .lamp-xl { width: 44px; height: 44px; }
  .verdict .lamp-xl svg { width: 24px; height: 24px; }
  .verdict .facts { gap: 6px 16px; }
  .verdict .facts .fact-probes { display: none; }
  .model .foot { display: none; }
  .model .delta-big { font-size: 2rem; }
  .more { margin-top: 32px; }
  .more > .section:first-of-type { margin-top: 24px; }
  .more > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--display); font-size: 0.9375rem; color: var(--ink); }
  .more > summary::-webkit-details-marker { display: none; }
  .more > summary::after { content: "meer"; color: var(--blue); font-size: 0.8125rem; font-family: var(--body); }
  .more[open] > summary::after { content: "minder"; }
  .verdict h1 { font-size: 2rem; }
  .mast .brand .host { display: none; }
  .login-body { align-items: start; padding: 12vh 16px 32px; }
  .login-panel { padding: 22px 20px 20px; }
  .attention .row, .attention .warns .row { grid-template-columns: 18px 1fr; row-gap: 2px; }
  .attention .row > div, .attention .row time { grid-column: 2; }
  .attention .row time { display: none; }
  .signals { columns: 1; }
  .grid-2 { grid-template-columns: 1fr; }
  .board-wrap { overflow-x: auto; }
  .board { min-width: 900px; }
  .hero { grid-template-columns: 1fr; }
  .hero .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .hero .stat:first-child { border-top: 0; }
  .timeline { padding: 12px 8px 8px; }
}
@media print {
  .mast nav, .legend-books button, .theme { display: none; }
  .panel { break-inside: avoid; }
}

/* dienstregeling */
/* stations zijn links naar het boek; aanwijzen, focus of aantikken toont de rit in een tooltip (mm.js: stationTips) */
.timeline a.station-link { cursor: pointer; text-decoration: none; outline: none; }
.timeline .station-hit { fill: transparent; pointer-events: all; stroke: transparent; stroke-width: 2; transition: stroke 160ms var(--ease-out); }
.timeline .station, .timeline .propr-dot { transform-box: fill-box; transform-origin: center; transition: transform 200ms var(--ease-out); }
.timeline a.station-link:hover .station, .timeline a.station-link:focus-visible .station, .timeline a.station-link.is-open .station,
.timeline a.station-link:hover .propr-dot, .timeline a.station-link:focus-visible .propr-dot, .timeline a.station-link.is-open .propr-dot { transform: scale(1.3); }
.timeline a.station-link:hover .station-name, .timeline a.station-link:focus-visible .station-name { fill: var(--blue-ink); }
.timeline a.station-link:hover .station-time, .timeline a.station-link:focus-visible .station-time { fill: var(--blue-ink); }
.timeline a.station-link:focus-visible .station-hit { stroke: var(--blue); }
.timeline .legend .legend-hint { color: var(--ink-3); }
.timeline .legend .legend-hint::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--blue); flex: none; }
.tl-tip { position: fixed; z-index: 30; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-size: 0.8125rem; line-height: 1.4; pointer-events: auto; }
.tl-tip::before { content: ""; position: absolute; left: var(--ax, 50%); top: -5px; width: 8px; height: 8px; margin-left: -4px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.tl-tip[data-dir="up"]::before { top: auto; bottom: -5px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tl-tip .tt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--display); font-weight: 500; font-size: 0.9375rem; letter-spacing: -0.01em; }
.tl-tip .tt-head b { font-weight: 500; }
.tt-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--off); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.tt-dot.is-done, .tt-dot.is-late, .tt-dot.is-ok { background: var(--ok); }
.tt-dot.is-due, .tt-dot.is-warn { background: var(--warn); }
.tt-dot.is-missed, .tt-dot.is-failed, .tt-dot.is-crit { background: var(--crit); }
.tt-dot.is-planned { background: var(--surface); box-shadow: 0 0 0 1px var(--ink-2); }
.tt-dot.is-no-service, .tt-dot.is-off { background: var(--off-soft); box-shadow: 0 0 0 1px var(--off); }
.tl-tip .tt-rows { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; }
.tl-tip .tt-rows dt { font-family: var(--display); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.tl-tip .tt-rows dd { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tl-tip .tt-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--blue-ink); text-decoration: none; font-weight: 500; }
.tl-tip .tt-go svg { width: 12px; height: 12px; }
.tl-tip .tt-go:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 0.18em; }
@media (prefers-reduced-motion: no-preference) {
  .tl-tip { animation: tl-tip-in 140ms var(--ease-out) both; }
  @keyframes tl-tip-in { from { opacity: 0; transform: translateY(-3px); } }
  .tl-tip[data-dir="up"] { animation-name: tl-tip-in-up; }
  @keyframes tl-tip-in-up { from { opacity: 0; transform: translateY(3px); } }
}
@media (hover: none) { .timeline a.station-link:hover .station, .timeline a.station-link:hover .propr-dot { transform: none; } }
/* boekpagina: de ritten van vandaag; het anker uit het bord licht de rij op */
.dienst .services tr { scroll-margin-top: 24px; transition: background 400ms var(--ease-out); }
.dienst .services tr:target td { background: var(--blue-soft); }
.dienst .services td { white-space: nowrap; }
.dienst .services td.small { white-space: normal; color: var(--ink-3); min-width: 160px; }
.dienst .services tr.is-failed td:first-child, .dienst .services tr.is-missed td:first-child { box-shadow: inset 2px 0 0 var(--crit); }
.dienst .dienst-foot { margin: 0; padding: 10px 12px 12px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 0.8125rem; }
.dienst .dienst-foot code { font: 500 0.9em var(--body); background: var(--surface-2); padding: 1px 6px; border-radius: 3px; color: var(--ink-2); }
@media (max-width: 820px) {
  .tl-tip { font-size: 0.875rem; }
  .dienst .services { min-width: 640px; }
}

/* ---------- thema: tijdelijke overrides ---------- */
/* Het dienstregeling-blok hierboven draagt nog #fff en #C5C6CE (papierwit en tick-grijs). Deze regels
   zetten die op tokens zonder dat blok aan te raken; zodra het blok zelf var(--surface)/var(--line-3)
   gebruikt kan dit weg. In licht zijn de waarden identiek. */
.timeline .tick { stroke: var(--line-3); }
.timeline .station { stroke: var(--surface); }
.timeline .station.is-planned { fill: var(--surface); }
.timeline .propr-dot { stroke: var(--surface); }
.timeline .legend i { border-color: var(--surface); }
