/* Huisstijl: marineblauw, middenblauw en helder blauw. Inter staat lokaal in /fonts, dus geen externe verzoeken. */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-latin.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-latin-ext.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --brand-navy: #182866;
  --brand-navy-deep: #10133F;
  --brand-blue: #0051A1;
  --brand-sky: #0093D9;
  --brand-sky-light: #ADD5F0;
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --surface2: #EDEFEF;
  --ink: #182866;
  --muted: #5A6485;
  --line: #D3D7D8;
  --accent: #0051A1;
  --accent-ink: #FFFFFF;
  --amber: #F2E500;
  --amber-ink: #182866;
  --danger: #8A1C0D;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10133F; --surface: #182866; --surface2: #10133F; --ink: #EEF1F9; --muted: #B4BEDD;
    --line: #34417F; --accent: #ADD5F0; --accent-ink: #10133F; --danger: #FF9C8A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10133F; --surface: #182866; --surface2: #10133F; --ink: #EEF1F9; --muted: #B4BEDD;
  --line: #34417F; --accent: #ADD5F0; --accent-ink: #10133F; --danger: #FF9C8A; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.45;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) max(48px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.wrap.wide { max-width: 1400px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 700; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.hint { font-size: 15px; }
#view { display: flex; flex-direction: column; gap: 16px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.prompt { font-size: 24px; font-weight: 500; line-height: 1.3; }
.group { margin-top: 8px; }
.tables { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
button { font: inherit; cursor: pointer; }
.tbl, .tab, .rbtn { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 12px 8px; font-weight: 700; min-height: 48px; }
.tbl[aria-pressed="true"], .tab[aria-pressed="true"], .rbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { padding-inline: 18px; }
input[type="text"], input[type="password"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
textarea { resize: vertical; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lbl { font-weight: 700; font-size: 15px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); cursor: pointer; font-weight: 500; }
.opt input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.opt:has(input:checked) { border-color: var(--accent); }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 14px 22px; font-weight: 700; min-height: 52px; width: 100%; margin-top: 8px; }
.primary:disabled { opacity: 0.6; cursor: default; }
.secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 12px 18px; font-weight: 700; }
.danger { border-color: var(--danger); color: var(--danger); }
.status { font-size: 15px; color: var(--muted); min-height: 1.4em; }
.status.err { color: var(--danger); font-weight: 700; }
#banner:empty { display: none; }
.banner { background: var(--amber); color: var(--amber-ink); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.pill { display: inline-block; background: var(--amber); color: var(--amber-ink); font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.ctrl { display: flex; flex-direction: column; gap: 10px; }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.card li, .card .ans { overflow-wrap: anywhere; }
.scherm { display: flex; flex-direction: column; gap: 16px; }
.scherm .card { font-size: clamp(17px, 1.5vw, 24px); }
.einde { text-align: center; align-items: center; padding-block: 24px; }
.eindlijst { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.eindlijst li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: clamp(17px, 1.5vw, 24px); }
.scherm .prompt { font-size: clamp(24px, 2.4vw, 40px); }
.empty { color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 12px; }
.track { background: var(--surface2); border-radius: 8px; height: 22px; overflow: hidden; }
.fill { background: var(--accent); height: 100%; }
.rsel { display: flex; gap: 8px; flex-wrap: wrap; }
footer { margin-top: 24px; color: var(--muted); font-size: 15px; }
footer summary { cursor: pointer; padding: 6px 0; }
footer form { margin-top: 8px; }
footer input { max-width: 260px; }
@media (max-width: 420px) { h1 { font-size: 26px; } .prompt { font-size: 21px; } }
.keybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.keybar.setup { align-items: stretch; flex-direction: column; }
.keybar form { display: flex; flex-direction: column; gap: 8px; }
.keystate.err { color: var(--danger); font-weight: 700; }
.keystate.ok { color: var(--accent); font-weight: 700; }
.note { font-size: 15px; color: var(--muted); }
.qrbox { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.linkrow { display: flex; flex-direction: column; gap: 8px; }
.qrbox svg { background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.qr-overlay { position: fixed; inset: 0; z-index: 50; background: #fff; color: #182866; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; text-align: center; }
.qr-overlay svg { width: min(72vh, 88vw); height: min(72vh, 88vw); }
.qr-overlay .qr-cap { font-size: clamp(22px, 3.2vw, 44px); font-weight: 700; }
.qr-overlay .qr-sub { font-size: clamp(15px, 1.6vw, 22px); color: #5A6485; }
.qr-overlay .secondary { color: #182866; background: #fff; border-color: #D3D7D8; }
.gate { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.gate-card h1 { margin: 0; }

.wrap > header, .gate-card > header { display: flex; align-items: center; gap: 16px; background: var(--brand-navy); color: #fff; border-radius: 16px; padding: 16px 20px; }
header .logo { height: 56px; width: auto; flex: none; }
header h1 { color: #fff; }
.logout { margin-left: auto; background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); border-radius: 12px; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.logout[hidden] { display: none; }
.logout:hover { background: rgba(255,255,255,.12); }
header .eyebrow { color: var(--brand-sky-light); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) header { background: var(--brand-navy); border: 1px solid var(--line); } }

/* PDF-export: alleen zichtbaar bij afdrukken, altijd licht en zwart op wit */
.printdoc { display: none; }
@media print {
  body > :not(.printdoc) { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 12pt; }
  .printdoc { display: block; color: #000; }
  .printdoc h1 { font-size: 20pt; margin-bottom: 4pt; }
  .printdoc h2 { font-size: 15pt; margin: 16pt 0 4pt; break-after: avoid; }
  .printdoc h3 { font-size: 12pt; margin: 8pt 0 2pt; }
  .printdoc .pq { font-style: italic; margin-bottom: 6pt; }
  .printdoc .pt { break-inside: avoid; margin-bottom: 8pt; }
  .printdoc p { margin: 2pt 0; }
}
