/* nl-streamt — basisstijl, losjes gebaseerd op het Breakingbits design system:
   volle kleurvlakken, mono-labels, dikke lijnen, nergens een afgeronde hoek.
   Alle kleuren en lettertypen zijn custom properties; een merk overschrijft
   ze in zijn thema (/-/theme.css) en kan daar ook eigen CSS toevoegen.
   Klassennamen zijn stabiel en bedoeld om op te stylen. */
:root {
  --surface: #244399;
  --surface-deep: #15275a;
  --ink: #ffffff;
  --panel: #ffffff;
  --on-panel: #244399;
  --card: #d3dcf3;
  --on-card: #15275a;
  --label: #f6cff4;
  --accent: #f6cff4;
  --on-accent: #15275a;
  --paper: #eef1f9;
  --live: #e0004d;
  --on-live: #ffffff;
  --focus: #f6cff4;
  --danger: #b00020;

  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --space-1: 6px;
  --space-2: 16px;
  --space-3: 32px;
  --space-4: 56px;
  --space-5: 96px;
  --radius: 0px;
  --border-thin: 3px;
  --border-heavy: 10px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
/* hidden moet altijd winnen van display-regels van componenten. */
[hidden] { display: none !important; }
html { background: var(--surface); }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: var(--border-thin) solid var(--focus); outline-offset: 3px; }
.panel :focus-visible, .card :focus-visible { outline-color: var(--surface-deep); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--space-2)); margin-inline: auto; padding-inline: var(--space-2); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--panel); color: var(--on-panel); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip:focus { left: var(--space-2); top: var(--space-2); }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: 1.1; text-wrap: balance; }
.display { font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.01em; }
.h1 { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -0.01em; }
.h2 { font-size: clamp(24px, 3.4vw, 32px); }
.h3 { font-size: 22px; line-height: 1.25; }
.lead { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.45; max-width: 36em; }
p { margin: 0; max-width: 42em; }
.body-sm, .small { font-size: 16px; line-height: 1.5; }
.label, .mono {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; line-height: 1.3;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.label { color: var(--label); }
.panel .label, .card .label { color: inherit; }
.muted { opacity: .8; }
.stack { display: grid; gap: var(--space-2); align-content: start; }
.stack-sm { display: grid; gap: var(--space-1); align-content: start; }
.stack-lg { display: grid; gap: var(--space-3); align-content: start; }
.row-flex { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: center; }

.section-title {
  display: inline-block; justify-self: start; margin: 0; font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.15; text-transform: uppercase;
  color: var(--label); border-bottom: var(--border-heavy) solid var(--label); padding-bottom: var(--space-1);
}
.panel .section-title { color: var(--on-panel); border-bottom-color: var(--on-panel); }

/* ---------- Knoppen en links ---------- */
.button, button.button {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 16px; line-height: 20px;
  text-transform: uppercase; text-decoration: none; letter-spacing: 0.02em;
  color: var(--on-panel); background: var(--panel); border: var(--border-thin) solid var(--panel);
  padding: 10px 18px; border-radius: var(--radius); cursor: pointer; justify-self: start; min-height: 44px;
}
.button:hover { text-decoration: underline; text-decoration-thickness: var(--border-thin); text-underline-offset: 5px; }
.panel .button, .card .button { color: var(--panel); background: var(--on-panel); border-color: var(--on-panel); }
.button--ghost, .panel .button--ghost, .card .button--ghost { background: transparent; color: inherit; border-color: currentColor; }
.button--accent, .panel .button--accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button--live, .panel .button--live { background: var(--live); color: var(--on-live); border-color: var(--live); }
.button--danger, .panel .button--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button--small { font-size: 13px; padding: 6px 10px; min-height: 36px; }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.link { font-family: var(--font-mono); font-weight: 700; font-size: 15px; text-transform: uppercase; text-decoration: none; color: var(--label); }
.link::after { content: " >"; }
.link:hover { text-decoration: underline; text-decoration-thickness: var(--border-thin); }
.panel .link, .card .link { color: inherit; }

/* ---------- Vlakken ---------- */
.panel { background: var(--panel); color: var(--on-panel); padding: var(--space-3); border-radius: var(--radius); min-width: 0; }
.card { background: var(--card); color: var(--on-card); padding: var(--space-2); border-radius: var(--radius); display: grid; gap: var(--space-1); align-content: start; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2); }
@media (max-width: 640px) { .panel { padding: var(--space-2); } }

.tag {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 12px; line-height: 14px;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 6px; background: var(--card); color: var(--on-card); white-space: nowrap;
}
.tag--live { background: var(--live); color: var(--on-live); }
.tag--live::before { content: "● "; }
.tag--accent { background: var(--accent); color: var(--on-accent); }
.tag--dark { background: var(--surface-deep); color: var(--ink); }
.tag--ok { background: #d8f0dd; color: #0b4a1c; }
.tag--warn { background: #ffe8b3; color: #5a3b00; }
.tag--error { background: #ffd6dc; color: #7a0019; }

/* ---------- Formulieren ---------- */
form { margin: 0; }
.field { display: grid; gap: var(--space-1); }
.field > label, .field > .field-label, fieldset legend {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.03em;
}
.field .hint { font-size: 15px; line-height: 1.4; opacity: .85; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select {
  font: inherit; font-size: 17px; color: var(--on-panel); background: #fff;
  border: var(--border-thin) solid var(--on-panel); border-radius: var(--radius); padding: 8px 10px; width: 100%; min-height: 44px;
}
.field input[type=color] { padding: 2px; width: 64px; height: 44px; }
.field textarea { min-height: 110px; resize: vertical; }
.field textarea.code { font-family: var(--font-mono); font-size: 14px; min-height: 220px; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: var(--border-thin) solid var(--focus); outline-offset: 0; }
.field [aria-invalid=true] { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--on-panel); flex: none; }
fieldset { border: var(--border-thin) solid currentColor; padding: var(--space-2); margin: 0; display: grid; gap: var(--space-1); min-width: 0; }
.form-grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }

.notice { padding: 12px 16px; border-left: var(--border-heavy) solid currentColor; background: var(--paper); color: var(--surface-deep); }
.notice--error { color: #7a0019; background: #ffeef0; }
.notice--ok { color: #0b4a1c; background: #eaf7ed; }

/* ---------- Speler ---------- */
.player { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player__offline {
  position: absolute; inset: 0; display: grid; place-content: center; gap: var(--space-1); text-align: center;
  padding: var(--space-3); background: var(--surface-deep); color: var(--ink);
}
.player__offline .h2 { max-width: 20em; }
.player__message {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; max-width: none;
  padding: 8px 12px; background: rgb(0 0 0 / 70%); color: #fff; font-size: 15px; pointer-events: none;
}
.player__badge { position: absolute; top: 12px; left: 12px; z-index: 2; pointer-events: none; }

/* ---------- Poll ---------- */
.poll { display: grid; gap: var(--space-2); }
.poll__question { font-size: 22px; line-height: 1.25; font-weight: 900; }
.poll__options { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.poll__choice { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--paper); cursor: pointer; font-weight: 700; min-height: 44px; }
.poll__choice input { width: 22px; height: 22px; accent-color: var(--on-panel); margin: 0; flex: none; }
.poll__choice:has(input:checked) { outline: var(--border-thin) solid var(--on-panel); }
.poll__result { display: grid; gap: 4px; }
.poll__result-head { display: flex; justify-content: space-between; gap: var(--space-1); font-weight: 700; }
.poll__result.is-mine .poll__result-head > span:first-child::after { content: " · jouw stem"; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; }
.meter { display: block; width: 100%; height: 12px; background: var(--card); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--on-panel); transition: width .4s ease; }
.poll__total { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; }

/* ---------- Grafiekje ---------- */
.spark { width: 100%; height: 60px; display: block; }
.spark path { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.stat { display: grid; gap: 2px; }
.stat__value { font-size: 34px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat__label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
