/* ==========================================================================
   Oefentheorie — ontwerpsysteem
   Eén bestand, geen build. Kleuren staan als tokens op :root en worden in
   donkere modus opnieuw gezet.
   ========================================================================== */

:root {
  --bg: #f4f6fb;
  --bg-deep: #e8ecf6;
  --surface: #ffffff;
  --surface-2: #f7f9fe;
  --line: #dfe4f0;
  --line-strong: #c6cee0;
  --text: #11162a;
  --muted: #5b6480;
  --muted-2: #8a92a8;

  --brand: #1b4fd0;
  --brand-dark: #133b9f;
  --brand-soft: #e7edfd;
  --brand-ink: #ffffff;

  --ok: #11835a;
  --ok-soft: #dff4ea;
  --bad: #c62a24;
  --bad-soft: #fde7e5;
  --warn: #9a6505;
  --warn-soft: #fdf1d8;

  --shadow-sm: 0 1px 2px rgba(17, 22, 42, .06), 0 1px 3px rgba(17, 22, 42, .04);
  --shadow: 0 2px 6px rgba(17, 22, 42, .07), 0 10px 24px -12px rgba(17, 22, 42, .18);
  --shadow-lg: 0 8px 20px rgba(17, 22, 42, .10), 0 28px 60px -24px rgba(17, 22, 42, .30);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --wrap: 1120px;
  --tab-h: 62px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg: #0b0f1a;
    --bg-deep: #070a12;
    --surface: #141a29;
    --surface-2: #1a2132;
    --line: #26303f;
    --line-strong: #3a4659;
    --text: #e9edf7;
    --muted: #9aa5bd;
    --muted-2: #6f7a92;

    --brand: #5b8cff;
    --brand-dark: #3f6fe0;
    --brand-soft: #182544;
    --brand-ink: #0a0f1c;

    --ok: #43c89a;
    --ok-soft: #112a22;
    --bad: #ff7a70;
    --bad-soft: #2d1513;
    --warn: #f0bf63;
    --warn-soft: #2a2110;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 14px 32px -16px rgba(0, 0, 0, .7);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, .5), 0 36px 70px -28px rgba(0, 0, 0, .8);
  }
}

:root[data-theme="dark"] {
  --bg: #0b0f1a;
  --bg-deep: #070a12;
  --surface: #141a29;
  --surface-2: #1a2132;
  --line: #26303f;
  --line-strong: #3a4659;
  --text: #e9edf7;
  --muted: #9aa5bd;
  --muted-2: #6f7a92;

  --brand: #5b8cff;
  --brand-dark: #3f6fe0;
  --brand-soft: #182544;
  --brand-ink: #0a0f1c;

  --ok: #43c89a;
  --ok-soft: #112a22;
  --bad: #ff7a70;
  --bad-soft: #2d1513;
  --warn: #f0bf63;
  --warn-soft: #2a2110;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 14px 32px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, .5), 0 36px 70px -28px rgba(0, 0, 0, .8);
}

/* --------------------------------------------------------------- basis ---- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.65rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }

/* Pictogrammen schalen mee met de tekst ernaast. Zonder deze regel heeft een
   inline SVG geen afmeting en vult hij de hele breedte. */
.ico { width: 1.15em; height: 1.15em; flex: none; }
.verdict-title .ico { width: 1.25em; height: 1.25em; }
small { font-size: .82rem; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd {
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: .05em .4em; font-size: .78em;
}
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .2em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: .7rem 1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.wrap-narrow { max-width: 760px; }

.main { padding-bottom: calc(var(--tab-h) + 28px); min-height: 60dvh; }
@media (min-width: 860px) { .main { padding-bottom: 48px; } }

/* -------------------------------------------------------------- header ---- */

.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 12px; height: 60px; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.03em; color: var(--text); text-decoration: none; font-size: 1.06rem; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--brand); }

.top-nav { display: none; margin-left: 6px; gap: 2px; }
@media (min-width: 900px) { .top-nav { display: flex; } }
.top-nav a {
  padding: .45rem .7rem; border-radius: 999px; font-size: .92rem; font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.top-nav a:hover { background: var(--surface-2); color: var(--text); }
.top-nav a[aria-current] { background: var(--brand-soft); color: var(--brand); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------- knoppen -- */

.btn {
  --_bg: var(--surface);
  --_fg: var(--text);
  --_bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 650; line-height: 1.2;
  padding: .62rem 1.05rem; border-radius: 999px;
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: color-mix(in srgb, var(--_bg) 92%, var(--text)); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-primary { --_bg: var(--brand); --_fg: var(--brand-ink); --_bd: transparent; box-shadow: var(--shadow-sm); }
.btn-primary:hover { --_bg: var(--brand-dark); }
.btn-ghost { --_bg: transparent; --_bd: transparent; color: var(--muted); }
.btn-ghost:hover { --_bg: var(--surface-2); color: var(--text); }
.btn-outline { --_bg: transparent; --_bd: var(--line-strong); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn-sm { padding: .38rem .75rem; font-size: .86rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; border-radius: 999px; width: 38px; height: 38px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* --------------------------------------------------------------- kaarten -- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
@media (min-width: 700px) { .card-pad { padding: 22px; } }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.section { padding: 26px 0; }
.section-lg { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .74rem; font-weight: 750; color: var(--muted-2); margin: 0 0 .35em; }

.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

.pill {
  display: inline-flex; align-items: center; gap: .4em;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; font-weight: 650;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pill-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.pill-brand { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }

.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* ----------------------------------------------------------------- hero --- */

.hero { position: relative; padding: 36px 0 10px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 50% auto -20%; height: 460px;
  background: radial-gradient(60% 60% at 30% 40%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; gap: 26px; align-items: center; }
@media (min-width: 920px) { .hero-in { grid-template-columns: 1.05fr .95fr; gap: 40px; } .hero { padding-top: 54px; } }
.hero h1 { margin-bottom: .5em; }
.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.hero-stat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.hero-stat span { font-size: .82rem; color: var(--muted); }

.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-art figure { margin: 0; display: grid; justify-items: center; gap: 6px; }
.hero-art figcaption { font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.3; }

/* ------------------------------------------------------- categoriekaart --- */

.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cat {
  display: grid; gap: 10px; padding: 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.cat-top { display: flex; align-items: center; gap: 12px; }
.cat-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); }
.cat-ico svg { width: 32px; height: 32px; }
.cat h3 { margin: 0; font-size: 1.08rem; }
.cat-sub { font-size: .8rem; color: var(--muted); }
.cat-norm { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 9px; }

/* ----------------------------------------------------------- voortgang ---- */

.bar { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s ease; }
.bar-ok > i { background: var(--ok); }
.bar-bad > i { background: var(--bad); }
.bar-lg { height: 12px; }

.ring { display: grid; place-items: center; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring-label { position: absolute; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }

.stat-tile { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.stat-tile b { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.1; }
.stat-tile span { font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------------------- borden -- */

.sign { display: block; }
.sign-chip {
  display: grid; gap: 8px; justify-items: center; padding: 12px 8px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--text); transition: transform .1s ease, box-shadow .18s ease;
}
.sign-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sign-chip .sign { width: 74px; height: 74px; }
.sign-chip b { font-size: .83rem; font-weight: 650; line-height: 1.3; }
.sign-chip code { font-size: .7rem; color: var(--muted-2); }

.sign-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }

.sign-hero { display: grid; gap: 18px; align-items: start; }
@media (min-width: 640px) { .sign-hero { grid-template-columns: 180px 1fr; } }
.sign-hero .sign { width: 100%; max-width: 180px; }

/* ------------------------------------------------------------------ les -- */

.chapter {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s ease, box-shadow .18s ease, transform .1s ease;
}
.chapter:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.chapter-no {
  width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .95rem;
}
.chapter-done .chapter-no { background: var(--ok-soft); color: var(--ok); }
.chapter-body { min-width: 0; flex: 1; }
.chapter-body b { display: block; font-size: 1rem; }
.chapter-body span { font-size: .82rem; color: var(--muted); }

.slide-shell { display: grid; gap: 16px; }
.slide-progress { display: flex; gap: 4px; }
.slide-progress i { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.slide-progress i.on { background: var(--brand); }
.slide-progress i.seen { background: color-mix(in srgb, var(--brand) 45%, var(--line)); }

.slide {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px; display: grid; gap: 16px;
}
@media (min-width: 760px) { .slide { padding: 30px 34px; } }
.slide-visual { display: grid; place-items: center; gap: 10px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.slide-visual .sign { width: min(150px, 42vw); height: auto; }
.slide-visual-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.slide-visual-row figure { margin: 0; display: grid; gap: 6px; justify-items: center; max-width: 150px; }
.slide-visual-row figcaption { font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.35; }
.slide-visual-row .sign { width: 92px; }

.slide h2 { margin: 0; }
.slide-body > :last-child { margin-bottom: 0; }

.note {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 14px; font-size: .95rem;
}
.note-warn { border-color: var(--warn); background: var(--warn-soft); }
.note-bad { border-color: var(--bad); background: var(--bad-soft); }
.note-ok { border-color: var(--ok); background: var(--ok-soft); }
.note b { display: block; margin-bottom: .15em; }
.note > :last-child { margin-bottom: 0; }

.examples { display: grid; gap: 8px; }
.example { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.example-ico { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.example-do .example-ico { background: var(--ok-soft); color: var(--ok); }
.example-dont .example-ico { background: var(--bad-soft); color: var(--bad); }

.slide-nav { display: flex; align-items: center; gap: 10px; }
.slide-count { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- vragen -- */

.q-shell { display: grid; gap: 14px; }
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.q-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 18px; display: grid; gap: 16px;
}
@media (min-width: 760px) { .q-card { padding: 26px 30px; } }
.q-visual { display: grid; place-items: center; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.q-visual .bord { width: min(148px, 40vw); height: min(148px, 40vw); }
.q-visual svg.scene { width: 100%; max-width: 480px; height: auto; }

/* Zodra er geantwoord is, moet de uitleg in beeld passen: het bord krimpt tot
   een vignet, zodat je op een telefoon niet eerst voorbij een grote tekening
   moet scrollen om te zien waarom je fout zat. */
.q-card-klaar .q-visual { padding: 6px; }
.q-card-klaar .q-visual .bord { width: 62px; height: 62px; }
.q-card-klaar .q-visual svg.scene { max-width: 230px; }
.q-text { font-size: 1.12rem; font-weight: 650; line-height: 1.45; }

.opts { display: grid; gap: 9px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  font: inherit; cursor: pointer; padding: 13px 15px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--line-strong); border-radius: var(--r);
  transition: border-color .12s ease, background-color .12s ease, transform .08s ease;
}
.opt:hover { border-color: var(--brand); background: var(--surface-2); }
.opt:active { transform: translateY(1px); }
.opt-key {
  flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; font-weight: 800; color: var(--muted);
}
.opt-text { flex: 1; min-width: 0; }
.opt[data-state="chosen"] { border-color: var(--brand); background: var(--brand-soft); }
.opt[data-state="chosen"] .opt-key { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.opt[data-state="ok"] { border-color: var(--ok); background: var(--ok-soft); }
.opt[data-state="ok"] .opt-key { background: var(--ok); color: #fff; border-color: transparent; }
.opt[data-state="bad"] { border-color: var(--bad); background: var(--bad-soft); }
.opt[data-state="bad"] .opt-key { background: var(--bad); color: #fff; border-color: transparent; }
.opt[data-state="dim"] { opacity: .62; }
.opts-locked .opt { cursor: default; }
.opts-locked .opt:hover { border-color: var(--line-strong); background: var(--surface); }
.opts-locked .opt[data-state="ok"]:hover { border-color: var(--ok); background: var(--ok-soft); }
.opts-locked .opt[data-state="bad"]:hover { border-color: var(--bad); background: var(--bad-soft); }

.verdict { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); }
.verdict-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.verdict-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 32%, transparent); }
.verdict-title { font-weight: 800; display: flex; align-items: center; gap: .5em; }
.verdict p { margin: 0; font-size: .95rem; }

.timer {
  display: inline-flex; align-items: center; gap: .45em; font-variant-numeric: tabular-nums;
  font-weight: 750; padding: .25rem .65rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem;
}
.timer-hot { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }

.qtimer { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.qtimer > i { display: block; height: 100%; background: var(--brand); }
.qtimer-hot > i { background: var(--bad); }

/* --------------------------------------------------------------- examen --- */

.exam-top {
  position: sticky; top: 60px; z-index: 20; padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.exam-top-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.result-head { display: grid; gap: 18px; place-items: center; text-align: center; padding: 10px 0 4px; }
.result-head h1 { margin: 0; }
.verdict-badge {
  display: inline-flex; align-items: center; gap: .5em; padding: .5rem 1.1rem; border-radius: 999px;
  font-weight: 800; letter-spacing: -.01em;
}
.verdict-badge.pass { background: var(--ok-soft); color: var(--ok); }
.verdict-badge.fail { background: var(--bad-soft); color: var(--bad); }

.review-item { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.review-item.wrong { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.review-q { font-weight: 650; }
.review-ans { font-size: .9rem; }
.review-ans b { font-weight: 700; }

/* -------------------------------------------------------------- tabbalk --- */

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 50; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: stretch;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .tabbar { display: none; } }
.tabbar a {
  flex: 1; display: grid; place-items: center; gap: 2px; text-decoration: none;
  color: var(--muted); font-size: .68rem; font-weight: 650; padding: 8px 2px;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current] { color: var(--brand); }

/* ---------------------------------------------------------------- footer -- */

.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; }
.foot-in { display: grid; gap: 20px; padding: 28px 0; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: .6em; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35em; }
.foot a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot-bottom { border-top: 1px solid var(--line); padding: 14px 0; font-size: .78rem; color: var(--muted-2); }
.foot-merk { color: var(--text); font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--line-2, var(--line)); }
.foot-merk:hover { color: var(--brand); border-bottom-color: currentColor; }

/* ---------------------------------------------------------------- toast --- */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px); transform: translate(-50%, 18px);
  z-index: 80; max-width: min(420px, calc(100vw - 32px));
  background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* --------------------------------------------------------------- diverse -- */

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td b { font-weight: 700; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button {
  font: inherit; font-size: .85rem; font-weight: 650; padding: .35rem .8rem; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.input, select.input {
  font: inherit; padding: .6rem .8rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); width: 100%;
}

.search { position: relative; }
.search .input { padding-left: 2.3rem; border-radius: 999px; }
.search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .82rem; font-weight: 650; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: transparent; }

.empty { display: grid; gap: 10px; place-items: center; text-align: center; padding: 40px 20px; color: var(--muted); }

.anim-in { animation: in .25s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* De les nog eens als doorlopende tekst, onder de dia's. */
.les-tekst { padding: 18px 0; border-top: 1px solid var(--line); }
.les-tekst:first-child { border-top: 0; padding-top: 4px; }
.les-tekst h3 { margin: 0 0 .5em; }
.les-tekst-vb { margin: .6em 0; padding-left: 1.1em; }
.les-tekst-vb li { margin-bottom: .3em; }

/* Een antwoord met een bord erin: tekening links, tekst ernaast, ook als de
   tekst over twee regels loopt. */
.opt-text > .row { flex-wrap: nowrap; align-items: center; gap: .75rem; }
.opt-text .bord { width: 56px; height: 56px; flex: none; }

/* De taalknop naast de categoriekeuze. */
.taalknop {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 .5rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none;
  font-size: .78rem; font-weight: 750; letter-spacing: .03em;
}
.taalknop:hover { border-color: var(--brand); color: var(--brand); }
