/* Kitching Lab — een schrift met ruitjespapier: koningsblauwe inkt, markeerstift-geel, rode correctiepen. */
:root {
  --paper: #fbfcff;
  --paper-2: #f1f4fb;
  --grid: rgba(60, 90, 170, 0.07);
  --ink: #16213d;
  --ink-soft: #55607d;
  --line: #d9dfee;
  --brand: #1f3fa8;          /* koningsblauw, vulpeninkt */
  --brand-ink: #ffffff;
  --marker: #ffe45c;         /* markeerstift */
  --marker-ink: #3b3200;
  --hl: color-mix(in srgb, var(--marker) 70%, transparent);
  --good: #15803d;
  --good-bg: #e7f6ec;
  --bad: #c62828;            /* rode correctiepen */
  --bad-bg: #fdecec;
  --warn-bg: #fff6d6;
  --card: #ffffff;
  --shadow: 0 1px 0 rgba(22, 33, 61, 0.06), 0 6px 18px -10px rgba(22, 33, 61, 0.25);
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1426; --paper-2: #151c33; --grid: rgba(140, 170, 255, 0.06); --ink: #e6ebfa; --ink-soft: #a3adc9; --line: #2a3452;
    --brand: #8ea8ff; --brand-ink: #0c1330; --marker: #f5d63d; --marker-ink: #2b2400; --hl: color-mix(in srgb, var(--marker) 30%, transparent); --good: #4ade80; --good-bg: #12301f;
    --bad: #ff7b7b; --bad-bg: #3a1618; --warn-bg: #3a3212; --card: #161e36; --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1426; --paper-2: #151c33; --grid: rgba(140, 170, 255, 0.06); --ink: #e6ebfa; --ink-soft: #a3adc9; --line: #2a3452;
  --brand: #8ea8ff; --brand-ink: #0c1330; --marker: #f5d63d; --marker-ink: #2b2400; --hl: color-mix(in srgb, var(--marker) 30%, transparent); --good: #4ade80; --good-bg: #12301f;
  --bad: #ff7b7b; --bad-bg: #3a1618; --warn-bg: #3a3212; --card: #161e36; --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }
.small-caps { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; border-radius: 6px; }

/* ---------- Topbalk ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100% - 1080px) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 1.1rem; transform: rotate(-4deg); }
.logo.big { font-size: 1.8rem; margin-bottom: 12px; }
.logo.big .logo-mark { width: 46px; height: 46px; font-size: 1.5rem; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--paper); }
.me { display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; }
.streak, .lvl { padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--marker); color: var(--marker-ink); font-size: 0.75rem; font-weight: 800; font-family: var(--font-mono); vertical-align: middle; }
@media (max-width: 640px) {
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .subject-about { display: none; }
  .subject { padding: 12px; }
  .subject-name { font-size: 1.05rem; }
  .nav a span { display: none; }
  .nav a { padding: 7px 10px; }
  .logo-text { display: none; }
}

/* ---------- Layout ---------- */
.main { max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.main.narrow { max-width: 560px; padding-block: 8vh 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.section-title { margin: 8px 0 -4px; display: flex; gap: 8px; align-items: center; }
.back { text-decoration: none; font-weight: 700; color: var(--ink-soft); }
.back:hover { color: var(--brand); }
.big-emoji { font-size: 3rem; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
input, select { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
input:focus, select:focus { border-color: var(--brand); outline: none; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 1rem var(--font-body); padding: 10px 18px; border-radius: 12px; cursor: pointer; text-decoration: none;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 3px 0 color-mix(in srgb, var(--brand) 55%, #000); }
.btn.ghost { border-color: var(--line); box-shadow: none; background: transparent; }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { padding: 6px 12px; font-size: 0.88rem; }
.btn.big { padding: 13px 24px; font-size: 1.08rem; }
.btn.danger { color: var(--bad); }
.btn.armed { background: var(--bad); color: #fff; border-color: var(--bad); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Home ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.hero h1 { display: inline; background: linear-gradient(transparent 64%, var(--hl) 64%) no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero h1 + p { margin-top: 10px; }
.hero-stats { display: flex; gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 110px; }
.stat-n { font-family: var(--font-mono); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--ink-soft); font-size: 0.82rem; }
.stat .meter { margin-top: 6px; }
.mission { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--marker); }
.tasks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.task { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 2px dashed var(--line); text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; }
.task span:nth-child(2) { flex: 1; min-width: 0; }
.task:hover { border-color: var(--brand); border-style: solid; }
.task.done { background: var(--good-bg); border-style: solid; border-color: transparent; color: var(--good); }
.task-icon { font-size: 1.3rem; }
.chev { color: var(--ink-soft); }
.subject-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.subject {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--c); box-shadow: var(--shadow); transition: transform 0.12s;
}
.subject:hover { transform: translateY(-3px) rotate(-0.4deg); }
.subject-icon { font-size: 1.8rem; line-height: 1; }
.subject-icon.big { font-size: 3rem; }
.subject-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.subject-about { color: var(--ink-soft); font-size: 0.88rem; flex: 1; }
.subject-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); font-family: var(--font-mono); }
.meter { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--line); }
.meter > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.5s; }
.tips { background: var(--warn-bg); border-color: transparent; }

/* ---------- Vak & lessen ---------- */
.subject-head { display: flex; gap: 18px; align-items: center; }
.subject-head > div:last-child { flex: 1; min-width: 0; }
.subject-head .meter { max-width: 360px; }
.period { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.period .unit-list { align-self: stretch; }
.unit-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.unit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.unit:hover { border-color: var(--brand); }
.unit-main { flex: 1; min-width: 0; }
.unit-title { font-weight: 700; }
.unit-sub { color: var(--ink-soft); font-size: 0.82rem; }
.badge { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.new { background: var(--paper-2); color: var(--ink-soft); }
.badge.mid { background: var(--warn-bg); color: var(--ink); }
.badge.ok { background: var(--good-bg); color: var(--good); }
.lesson { display: flex; flex-direction: column; gap: 14px; }
.lesson-head { display: flex; gap: 14px; align-items: center; }
.lesson-body { max-width: 70ch; }
.lesson-body ul, .lesson-body ol { padding-left: 1.3em; margin: 0 0 0.8em; }
.lesson-body li { margin-bottom: 0.25em; }
.lesson-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.example { background: var(--paper-2); border-left: 4px solid var(--accent, var(--brand)); padding: 10px 14px; border-radius: 0 10px 10px 0; font-family: var(--font-mono); font-size: 0.92rem; }
.tbl { border-collapse: collapse; margin: 6px 0 12px; font-size: 0.95rem; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; max-width: 100%; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--paper-2); font-weight: 700; }
.tbl.small { font-size: 0.8rem; }
.tbl.small th, .tbl.small td { padding: 4px 6px; text-align: center; }
.mistakes summary, .wordlist summary { cursor: pointer; font-weight: 700; }
.mistakes li { margin: 4px 0; }
.boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.box { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--paper-2); }
.box-n { font-family: var(--font-mono); font-weight: 800; font-size: 1.2rem; }
.box-l { font-size: 0.7rem; color: var(--ink-soft); }
.box.b5 { background: var(--good-bg); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.b1 { background: var(--bad); } .dot.b2 { background: #f59e0b; } .dot.b3 { background: #eab308; } .dot.b4 { background: #84cc16; } .dot.b5 { background: var(--good); }
.words td.fr, .words td.en { font-weight: 700; }

/* ---------- Oefensessie ---------- */
.session { display: flex; flex-direction: column; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; }
.session-top { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 12px; background: var(--paper-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.35s ease; }
.session-score { font-family: var(--font-mono); font-weight: 800; font-variant-numeric: tabular-nums; }
.session-title { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); }
.question-card { display: flex; flex-direction: column; gap: 14px; border-top: 5px solid var(--accent); }
.q-num { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.q-text { font-size: 1.2rem; font-weight: 700; }
.math { font-family: var(--font-mono); font-size: 1.3em; white-space: nowrap; background: var(--paper-2); padding: 2px 10px; border-radius: 8px; }
.sentence { font-family: var(--font-body); font-weight: 400; font-size: 1.15em; margin-top: 10px; padding: 12px 14px; background: var(--paper-2); border-radius: 10px; }
.blank { display: inline-block; min-width: 3.5em; border-bottom: 3px solid var(--accent); color: transparent; }
.fr { font-style: italic; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-family: var(--font-mono); font-size: 0.9em; line-height: 1.1; margin: 0 2px; }
.frac span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px; }
.visual { display: flex; justify-content: center; max-width: 100%; overflow-x: auto; }
.passage { background: var(--paper-2); border-radius: 10px; padding: 14px 16px; font-weight: 400; font-size: 0.98rem; max-height: 320px; overflow-y: auto; max-width: 70ch; text-align: left; }
.passage h4 { margin-bottom: 6px; }
.options { display: flex; flex-direction: column; gap: 8px; }
.options.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.option {
  display: flex; align-items: center; gap: 10px; text-align: left; font: 600 1.02rem var(--font-body); padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; transition: border-color 0.1s, transform 0.08s;
}
.option:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.option .key { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--paper-2); font: 700 0.78rem var(--font-mono); color: var(--ink-soft); }
.option.correct { border-color: var(--good); background: var(--good-bg); }
.option.wrong { border-color: var(--bad); background: var(--bad-bg); }
.option:disabled { cursor: default; }
.input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.answer-input { flex: 1; min-width: 140px; font-size: 1.15rem; padding: 12px 14px; }
.answer-input.is-good { border-color: var(--good); background: var(--good-bg); }
.answer-input.is-bad { border-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; text-decoration-color: var(--bad); }
.affix { font-weight: 700; font-family: var(--font-mono); }
.keys { display: flex; gap: 6px; flex-wrap: wrap; }
.key-btn { font: 700 1rem var(--font-body); width: 40px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); cursor: pointer; }
.key-btn:hover { border-color: var(--accent); }
.hint { background: var(--warn-bg); padding: 10px 14px; border-radius: 10px; }
.feedback:empty { display: none; }
.feedback { padding: 12px 16px; border-radius: 12px; }
.feedback.good { background: var(--good-bg); color: var(--ink); border-left: 5px solid var(--good); }
.feedback.bad { background: var(--bad-bg); color: var(--ink); border-left: 5px solid var(--bad); }
.feedback.warn { background: var(--warn-bg); border-left: 5px solid var(--marker); }
.fb-title { font-weight: 800; font-family: var(--font-display); font-size: 1.1rem; }
.feedback.good .fb-title { color: var(--good); }
.feedback.bad .fb-title { color: var(--bad); }
.explain { margin-top: 6px; font-size: 0.95rem; }
.small-note { margin-top: 6px; font-size: 0.9rem; }
.q-actions { display: flex; justify-content: flex-end; }
.order-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; counter-reset: ord; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; counter-increment: ord; }
.order-list li::before { content: counter(ord); font: 800 0.9rem var(--font-mono); color: var(--ink-soft); width: 1.4em; }
.order-text { flex: 1; font-weight: 600; min-width: 0; }
.order-btns { display: flex; gap: 4px; }
.order-list li.correct { border-color: var(--good); background: var(--good-bg); }
.order-list li.wrong { border-color: var(--bad); background: var(--bad-bg); }
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stars { font-size: 2.4rem; color: #f5b301; letter-spacing: 6px; }
.result-pct { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; }
.result-line { color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.9rem; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.review { text-align: left; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.review li { padding: 10px 14px; border-radius: 10px; background: var(--paper-2); font-size: 0.95rem; }
.review .passage { display: none; }
.review .visual { display: none; }
.review-q { font-weight: 700; }
.bad-text { color: var(--bad); text-decoration: line-through; }

/* ---------- Kaart & figuren ---------- */
.map-wrap { display: flex; justify-content: center; }
.nl-map { width: 100%; max-width: 440px; height: auto; }
.nl-map.small { max-width: 300px; }
.m-sea { fill: color-mix(in srgb, var(--brand) 10%, var(--paper)); }
.m-land { fill: color-mix(in srgb, var(--good) 22%, var(--card)); stroke: color-mix(in srgb, var(--good) 45%, var(--ink)); stroke-width: 1; }
.m-water { fill: color-mix(in srgb, var(--brand) 22%, var(--paper)); stroke: color-mix(in srgb, var(--brand) 40%, transparent); stroke-width: 0.8; }
.m-river { fill: none; stroke: color-mix(in srgb, var(--brand) 55%, var(--paper)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m-dot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.m-dot.water { fill: var(--brand); }
.m-dot.eiland { fill: #b45309; }
.m-hit { fill: transparent; }
.m-label { font: 700 12px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 3px; opacity: 0; pointer-events: none; }
.show-all .m-label { opacity: 1; }
.m-place[role="button"] { cursor: pointer; }
.m-place[role="button"]:hover .m-dot, .m-place:focus-visible .m-dot { fill: var(--marker); stroke: var(--ink); }
.show-labels .m-place:hover .m-dot { fill: var(--ink); stroke: var(--card); }
.m-place.highlight .m-dot { fill: var(--bad); r: 9; }
.show-labels .m-place.correct .m-dot, .m-place.correct .m-dot { fill: var(--good); r: 9; }
.show-labels .m-place.wrong .m-dot, .m-place.wrong .m-dot { fill: var(--bad); r: 9; }
.m-place.correct .m-label, .m-place.wrong .m-label { opacity: 1; font-size: 14px; }
.m-compass { font: 800 16px var(--font-display); fill: var(--ink); }
.m-compass-arrow { fill: var(--ink); }
.map-tip { text-align: center; color: var(--ink-soft); font-size: 0.85rem; }
.grid-svg { width: 100%; max-width: 330px; height: auto; }
.g-line { stroke: var(--line); stroke-width: 1; }
.g-line.axis { stroke: var(--ink); stroke-width: 2; }
.g-num { font: 11px var(--font-mono); fill: var(--ink-soft); }
.g-ax { font: italic 700 14px var(--font-body); fill: var(--ink); }
.g-pt { fill: var(--bad); }
.g-lbl { font: 800 15px var(--font-display); fill: var(--bad); }
.shape-svg { width: 100%; max-width: 300px; height: auto; }
.shape { fill: color-mix(in srgb, var(--accent, var(--brand)) 18%, var(--card)); stroke: var(--ink); stroke-width: 2; }
.shape-h { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 5 4; }
.shape-lbl { font: 700 13px var(--font-mono); fill: var(--ink); }

/* ---------- Jaarplan ---------- */
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.day { background: var(--paper-2); border-radius: 10px; padding: 10px; }
.day-name { font-family: var(--font-display); font-weight: 800; margin-bottom: 4px; }
.day-task { font-size: 0.88rem; }
.day-task::before { content: '▢ '; color: var(--ink-soft); }
.plan-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.plan.current { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--marker); }
.plan-sub { margin-bottom: 10px; }
.plan-sub-name { font-weight: 800; font-size: 0.92rem; }
.plan-sub ul { margin: 2px 0 0; padding-left: 1.2em; font-size: 0.9rem; }

/* ---------- Voortgang ---------- */
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-row .stat { border-radius: var(--r); }
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 150px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; gap: 4px; }
.col-bar { background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.col-l { text-align: center; font: 0.72rem var(--font-mono); color: var(--ink-soft); }
.subj-rows { display: flex; flex-direction: column; gap: 10px; }
.subj-row { display: grid; grid-template-columns: 200px 1fr 48px; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 700; }
.subj-row b { font-family: var(--font-mono); text-align: right; }
@media (max-width: 520px) { .subj-row { grid-template-columns: 1fr 48px; } .subj-row .meter { grid-column: 1 / -1; grid-row: 2; } }
.plain { padding-left: 1.2em; margin: 0; }
.badges { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge-card { text-align: center; padding: 12px 8px; border-radius: 12px; border: 2px dashed var(--line); opacity: 0.55; filter: grayscale(1); }
.badge-card.got { opacity: 1; filter: none; border: 2px solid var(--marker); background: color-mix(in srgb, var(--marker) 14%, var(--card)); }
.badge-i { font-size: 1.8rem; }
.badge-n { font-weight: 800; font-family: var(--font-display); }
.badge-d { font-size: 0.75rem; color: var(--ink-soft); }
.warn-text { color: var(--bad); font-weight: 700; }
.welcome h1 { font-size: 2rem; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { top: 105%; transform: translateX(40px) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .confetti { display: none; }
}

/* ---------- Profielen ---------- */
/* Groep 7 krijgt een eigen inktkleur (groen-blauw), zodat je ziet wiens profiel open staat. */
:root[data-grade="po7"] { --brand: #0f7a6c; }
@media (prefers-color-scheme: dark) { :root[data-grade="po7"]:not([data-theme="light"]) { --brand: #5eead4; --brand-ink: #062a25; } }
:root[data-theme="dark"][data-grade="po7"] { --brand: #5eead4; --brand-ink: #062a25; }
.who { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); text-decoration: none; max-width: 140px; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grade-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.grade-pick legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.grade-opt { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.grade-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); }
.grade-opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.grade-opt span { display: flex; flex-direction: column; }
.grade-opt small { color: var(--ink-soft); }
.profile-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.profile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.profile:hover { border-color: var(--brand); transform: translateY(-2px); }
.profile.current { border-color: var(--ink); box-shadow: 5px 5px 0 var(--marker); }
.profile.add { border-style: dashed; box-shadow: none; }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); font: 800 1.8rem var(--font-display); transform: rotate(-4deg); }
.profile.add .avatar { background: var(--paper-2); color: var(--ink-soft); }
.profile-name { font: 800 1.2rem var(--font-display); }
@media (max-width: 640px) { .who span { display: none; } .lvl { display: none; } .topbar { gap: 8px; } .nav { gap: 0; } }

/* ---------- Verkeersborden ---------- */
.sign-svg { width: 120px; height: 120px; }
.clock-svg { width: 170px; height: 170px; }
.clock-face { fill: var(--card); stroke: var(--ink); stroke-width: 4; }
.clock-tick { stroke: var(--ink); stroke-width: 2; }
.clock-num { font: 700 13px var(--font-body); fill: var(--ink); }
.clock-h { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.clock-m { stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.bar-svg { width: 100%; max-width: 420px; height: auto; }
.bar-rect { fill: var(--brand); }
.bar-lbl { font: 12px var(--font-body); fill: var(--ink); }
.bar-grid { stroke: var(--line); }

/* ---------- Toezicht tijdens een ronde ---------- */
.session-watch { font-size: 0.82rem; color: var(--ink-soft); background: var(--paper-2); border-radius: 10px; padding: 6px 12px; }
.session-note { background: var(--warn-bg); border-left: 5px solid var(--marker); border-radius: 10px; padding: 10px 14px; font-weight: 700; }

/* Telefoon: vakken in twee kolommen (staat onderaan zodat het de basisregel overschrijft). */
@media (max-width: 640px) {
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .subject-name { font-size: 0.98rem; overflow-wrap: anywhere; hyphens: auto; }
}

/* ---------- Toetsplanner ---------- */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.test-card { border-top: 6px solid var(--c); display: flex; flex-direction: column; gap: 12px; }
.test-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.test-head > div:first-child { min-width: 0; }
.countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; padding: 8px 10px; border-radius: 14px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); line-height: 1.1; }
.countdown b { font-size: 1.6rem; }
.countdown span { font-size: 0.7rem; }
.countdown.small { min-width: 56px; padding: 6px 8px; }
.countdown.small b { font-size: 1.3rem; }
.ready { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-weight: 700; font-size: 0.9rem; }
.plan-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-days li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper-2); align-items: start; }
.plan-days li.today { outline: 2px solid var(--ink); background: color-mix(in srgb, var(--marker) 22%, var(--card)); }
.plan-date { font-weight: 800; font-size: 0.85rem; text-transform: capitalize; }
.plan-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plan-items a { text-decoration: none; color: var(--ink); font-weight: 600; }
.plan-items a.done { color: var(--good); text-decoration: line-through; }
.next-test { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); border: 2px solid var(--ink); }
.next-test .nt-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.next-test.empty { border-style: dashed; border-color: var(--line); box-shadow: none; }
.unit-pick { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 0; padding: 8px 12px; display: grid; gap: 4px; }
.unit-pick legend { font-weight: 700; font-size: 0.85rem; padding: 0 4px; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.grade-form { display: flex; gap: 6px; }
.grade-form input { width: 80px; padding: 6px 8px; }
@media (max-width: 480px) { .plan-days li { grid-template-columns: 1fr; gap: 4px; } }
