:root {
  --bg: #0b1220;
  --bg2: #111a2e;
  --card: #152038;
  --card2: #1b2847;
  --line: #26365c;
  --text: #e6edf7;
  --muted: #94a3c2;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #1e2a55 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 var(--font);
  min-height: 100vh;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.35rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ── Top bar ── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(11, 18, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .3px; color: var(--text); text-decoration: none; }
.logo b { color: var(--accent); }
.logo svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; scrollbar-width: none; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: .95rem; }
.top nav a:hover, .top nav a.on { color: var(--text); background: var(--card); }
.player { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .9rem; white-space: nowrap; }
.chip.xp b { color: var(--accent); }
.chip.streak b { color: var(--warn); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0b1220; font-weight: 800; text-decoration: none; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; margin-left: 0; }
  .chip.streak { display: none; }
}

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }

/* ── Cards / layout ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); cursor: pointer; text-decoration: none; color: var(--text);
  font-weight: 600; transition: transform .08s, background .15s, border-color .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #062029; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 28px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero .intro { padding: 28px; background: linear-gradient(135deg, #17244a, #12203d 60%, #0f2a3a); }
.hero .intro p { color: var(--muted); max-width: 52ch; }
.levelcard .bar { height: 12px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.levelcard .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .6s; }
.bigtitle { font-size: 1.6rem; font-weight: 800; }

/* ── World map ── */
.map { position: relative; }
.map h2 { margin-top: 8px; }
.nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.node {
  position: relative; display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.node:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px -12px rgba(34, 211, 238, .35); }
.node .ic { font-size: 2rem; }
.node .num { position: absolute; top: 14px; right: 16px; color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.node h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.node .meta { color: var(--muted); font-size: .88rem; }
.progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; background: var(--good); }
.stars { color: var(--warn); letter-spacing: 2px; font-size: .95rem; }
.stars .off { color: #3a4a70; }

.labs .node .ic { font-size: 1.7rem; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.tag.good { color: var(--good); border-color: rgba(52, 211, 153, .4); }

/* ── Topic page ── */
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.lessonlist { list-style: none; padding: 0; margin: 0; }
.lessonlist li a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text); }
.lessonlist li a:hover { background: var(--card2); }
.lessonlist .k { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg2); flex-shrink: 0; }
.lessonlist .done .k { background: rgba(52, 211, 153, .18); color: var(--good); }
.lessonlist .t { flex: 1; }
.lessonlist .time { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* ── Lesson reader ── */
.reader { max-width: 760px; }
.reader .content { font-size: 1.04rem; }
.reader .content b { color: #fff; }
.reader .content li p { margin: .2em 0; }
.reader .content table { border-collapse: collapse; width: 100%; overflow-x: auto; display: block; }
.reader .content td, .reader .content th { border: 1px solid var(--line); padding: 6px 10px; }
.reader .content img { background: #fff; border-radius: 8px; padding: 6px; }
.note { border-left: 3px solid var(--accent2); background: rgba(167, 139, 250, .08); padding: 10px 14px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: .92rem; }

/* ── Quiz ── */
.quiz { max-width: 820px; margin: 0 auto; }
.qhead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.hearts { font-size: 1.2rem; letter-spacing: 2px; }
.hearts .lost { filter: grayscale(1); opacity: .3; }
.qbar { flex: 1; min-width: 120px; height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.combo { font-family: var(--mono); color: var(--warn); font-weight: 700; min-width: 54px; text-align: right; }
.qtext { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; white-space: pre-line; }
.qhint { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--card2);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.opt:hover:not(:disabled) { border-color: #3d5590; }
.opt .key { font-family: var(--mono); width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; background: var(--bg2); color: var(--muted); font-size: .85rem; }
.opt .lbl { white-space: pre-line; }
.opt.sel { border-color: var(--accent); background: rgba(34, 211, 238, .08); }
.opt.sel .key { background: var(--accent); color: #062029; }
.opt.ok { border-color: var(--good); background: rgba(52, 211, 153, .12); }
.opt.ok .key { background: var(--good); color: #052e1f; }
.opt.no { border-color: var(--bad); background: rgba(248, 113, 113, .1); }
.opt.no .key { background: var(--bad); color: #3b0a0a; }
.opt:disabled { cursor: default; }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; }
.feedback.ok { background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .4); }
.feedback.no { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .4); }
.feedback h3 { margin: 0 0 4px; font-size: 1.05rem; }
.qactions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.qimg { background: #fff; padding: 8px; border-radius: 10px; margin: 6px 0 14px; max-height: 340px; object-fit: contain; }
.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.shake { animation: shake .35s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.floatxp { position: fixed; pointer-events: none; font-weight: 800; color: var(--accent); font-size: 1.3rem; animation: floatxp 1s ease forwards; z-index: 50; }
@keyframes floatxp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-50px); } }

.result { text-align: center; }
.result .score { font-size: 3.2rem; font-weight: 900; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.review { text-align: left; margin-top: 20px; }
.review details { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.review summary { cursor: pointer; }

/* exam navigator */
.qgrid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.qgrid button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; font-size: .8rem; font-family: var(--mono); }
.qgrid button.ans { background: #23406b; }
.qgrid button.cur { border-color: var(--accent); border-width: 2px; }
.qgrid button.flag { box-shadow: inset 0 -3px 0 var(--warn); }
.timer { font-family: var(--mono); font-size: 1.1rem; }
.timer.low { color: var(--bad); }

/* ── Labs ── */
.lab { max-width: 900px; margin: 0 auto; }
.field { display: grid; gap: 4px; }
.field label { font-size: .88rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit;
}
input.mono { font-family: var(--mono); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.ok { border-color: var(--good); background: rgba(52, 211, 153, .08); }
input.no { border-color: var(--bad); background: rgba(248, 113, 113, .08); }
.big { font-family: var(--mono); font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 700; letter-spacing: 1px; text-align: center; padding: 18px 0; }
.bin { font-family: var(--mono); font-size: .95rem; overflow-x: auto; white-space: pre; background: var(--bg2); padding: 12px; border-radius: 10px; }
.bin .n { color: var(--accent); }
.bin .h { color: var(--accent2); }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card2); color: var(--text); }

/* terminal */
.term-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
@media (max-width: 860px) { .term-wrap { grid-template-columns: 1fr; } }
.term { background: #05080f; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--mono); font-size: .92rem; color: #cde7d8; height: 460px; display: flex; flex-direction: column; overflow: hidden; }
.term .bar { padding: 8px 12px; background: #0d1422; color: var(--muted); font-size: .8rem; display: flex; gap: 6px; align-items: center; }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3b4560; display: inline-block; }
.term .out { flex: 1; overflow-y: auto; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.term .out .err { color: #ff8f8f; }
.term .out .ok { color: var(--good); }
.term .out .sys { color: var(--muted); }
.term .in { display: flex; align-items: center; padding: 8px 12px; border-top: 1px solid #101a2c; }
.term .in span { white-space: nowrap; color: #7ee3a6; }
.term .in input { background: transparent; border: 0; color: #e6ffef; font-family: var(--mono); padding: 4px 6px; outline: none; }
.term .in input:focus { outline: none; }
.goals { list-style: none; padding: 0; margin: 0; }
.goals li { display: flex; gap: 8px; padding: 6px 0; font-size: .93rem; }
.goals li .c { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); flex-shrink: 0; display: grid; place-items: center; font-size: .75rem; }
.goals li.done .c { background: var(--good); border-color: var(--good); color: #052e1f; }
.goals li.done { color: var(--muted); }

/* match game */
.timerbar { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.timerbar i { display: block; height: 100%; background: var(--warn); transition: width .25s linear; }

/* ── Auth / leaderboard ── */
.auth { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.msg { padding: 10px 14px; border-radius: 10px; font-size: .93rem; }
.msg.err { background: rgba(248, 113, 113, .12); color: #fecaca; }
.msg.ok { background: rgba(52, 211, 153, .12); color: #bbf7d0; }
table.lb { width: 100%; border-collapse: collapse; }
table.lb td, table.lb th { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.lb td:last-child, table.lb th:last-child { text-align: right; font-family: var(--mono); }
table.lb tr.me td { color: var(--accent); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--accent); padding: 12px 18px; border-radius: 12px; z-index: 60; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: toast .3s ease; max-width: calc(100% - 32px); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 30px 16px; border-top: 1px solid var(--line); }
kbd { font-family: var(--mono); font-size: .8em; background: var(--bg2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

/* ── Netwerkschema's (scene.js) ── */
.scene { width: 100%; height: auto; display: block; background: radial-gradient(600px 300px at 50% 0%, #142246, #0a1120); border-radius: var(--radius); border: 1px solid var(--line); }
.scene .zone { fill: color-mix(in srgb, var(--z) 7%, transparent); stroke: color-mix(in srgb, var(--z) 45%, transparent); stroke-dasharray: 5 5; }
.scene .zone-l { fill: var(--z); font: 600 12px var(--font); }
.scene .link line { stroke: #4b5f8f; stroke-width: 3; transition: stroke .3s, stroke-width .3s; }
.scene .link.trunk line { stroke: #a78bfa; stroke-width: 5; }
.scene .link.wifi line { stroke-dasharray: 3 6; }
.scene .link.serial line { stroke-dasharray: 10 4; }
.scene .link.hl line { stroke: var(--accent); stroke-width: 5; }
.scene .link.blocked line { stroke: var(--bad); stroke-dasharray: 6 6; }
.scene .link-l, .scene .port-l { fill: var(--muted); font: 12px var(--mono); text-anchor: middle; }
.scene .port-l { fill: #7f93c0; font-size: 10px; }
.scene .icon > * { fill: #1d2b4f; stroke: #8fb4ff; stroke-width: 1.8; }
.scene .icon .ln { fill: none; stroke: #8fb4ff; }
.scene .icon .led { fill: var(--good); stroke: none; }
.scene .icon .badge { fill: var(--accent2); stroke: none; }
.scene .icon .ic-txt { fill: #8fb4ff; stroke: none; font: 700 10px var(--mono); text-anchor: middle; }
.scene .t-router .icon > * { stroke: #5eead4; }
.scene .t-router .icon .ln { stroke: #5eead4; }
.scene .t-switch .icon > *, .scene .t-l3switch .icon > * { stroke: #93c5fd; }
.scene .t-cloud .icon > * { stroke: #c4b5fd; }
.scene .t-firewall .icon > * { stroke: #fca5a5; }
.scene .halo { fill: transparent; transition: fill .3s; }
.scene .node-g.hl .halo { fill: rgba(34, 211, 238, .16); stroke: var(--accent); stroke-width: 2; }
.scene .node-g.dim { opacity: .35; }
.scene .node-g.flash .halo { animation: nflash .5s ease; }
@keyframes nflash { 0% { fill: rgba(52, 211, 153, .5); } 100% { fill: transparent; } }
.scene .node-l { fill: var(--text); font: 600 14px var(--font); text-anchor: middle; }
.scene .node-s { fill: var(--muted); font: 12px var(--mono); text-anchor: middle; }
.scene .pkt-l { font: 700 13px var(--mono); text-anchor: middle; paint-order: stroke; stroke: #0b1220; stroke-width: 3px; }

/* ── Visuele uitleg ── */
.explain { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .explain { grid-template-columns: 1fr; } }
.steptext h3 { margin-bottom: 6px; }
.steptext p { margin: .4em 0; }
.steptext code, .kern code { font-family: var(--mono); background: var(--bg2); padding: 1px 5px; border-radius: 5px; font-size: .9em; color: #bae6fd; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font: 600 .75rem var(--mono); cursor: pointer; }
.dots button.on { background: var(--accent); color: #062029; border-color: var(--accent); }
.dots button.seen { border-color: var(--accent); }
.mtable { width: 100%; border-collapse: collapse; font: .85rem var(--mono); margin-top: 10px; }
.mtable caption { text-align: left; color: var(--muted); font: 600 .8rem var(--font); padding-bottom: 4px; }
.mtable th, .mtable td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.mtable th { background: var(--bg2); color: var(--muted); font-weight: 600; }
.mtable tr.new td { background: rgba(52, 211, 153, .14); color: #bbf7d0; }
.mtable tr.use td { background: rgba(34, 211, 238, .14); color: #a5f3fc; }
.kern { margin: 0; padding-left: 18px; }
.kern li { margin: 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* ── Studieplan ── */
.plan-week { margin-top: 22px; }
.days { display: grid; gap: 10px; }
.day { display: grid; grid-template-columns: 54px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.day.done { border-color: rgba(52, 211, 153, .45); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.day .dn { font: 800 1.3rem var(--mono); color: var(--accent); text-align: center; }
.day .dn small { display: block; font: 600 .65rem var(--font); color: var(--muted); text-transform: uppercase; }
.day h3 { font-size: 1rem; margin: 0 0 6px; }
.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.tasks li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.tasks input { margin-top: 4px; accent-color: var(--good); width: 16px; height: 16px; flex-shrink: 0; }
.tasks .ty { font: 600 .7rem var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--bg2); color: var(--muted); white-space: nowrap; margin-top: 2px; }
.tasks .ty-netacad { color: #7dd3fc; } .tasks .ty-lab { color: #fcd34d; } .tasks .ty-quiz { color: #86efac; } .tasks .ty-uitleg { color: #c4b5fd; } .tasks .ty-loi { color: #fda4af; } .tasks .ty-examen { color: #fca5a5; }
.ready { display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--bg2) 0); display: grid; place-items: center; flex-shrink: 0; }
.ring span { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font: 800 1.3rem var(--mono); }

/* ── Mobiel & app (PWA) ── */
.tabbar { display: none; }
.term .keys { display: none; }
.installcard { margin-bottom: 20px; border-color: var(--accent); background: linear-gradient(135deg, #12304a, var(--card)); }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); width: 100%; max-width: 520px; animation: sheet .25s ease; }
.sheet ol { padding-left: 20px; } .sheet li { margin: 8px 0; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.kbdish { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--bg2); }
@media (display-mode: standalone) { footer { display: none; } }

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .top { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; flex-wrap: nowrap; }
  .top nav { display: none; }
  .logo span { font-size: .95rem; }
  .player { gap: 6px; }
  .chip { padding: 3px 8px; font-size: .82rem; }
  main { padding: 16px 12px calc(96px + env(safe-area-inset-bottom)); }
  footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(13, 20, 36, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; padding: 4px 0; border-radius: 10px; min-height: 48px; justify-content: center; }
  .tabbar a span { font-size: 1.25rem; line-height: 1.1; filter: grayscale(.6); }
  .tabbar a.on { color: var(--text); background: var(--card); }
  .tabbar a.on span { filter: none; }
  /* geen automatisch inzoomen op iPhone */
  input[type=text], input[type=email], input[type=password], input[type=number], select, .term .in input { font-size: 16px; }
  .card { padding: 16px; }
  .hero .intro { padding: 20px; }
  .btn { padding: 11px 16px; min-height: 44px; }
  .btn.small { min-height: 36px; }
  .nodes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .node { padding: 14px; }
  .node .ic { font-size: 1.6rem; }
  .node h3 { font-size: .98rem; }
  .node .meta { font-size: .8rem; }
  .node .num { top: 10px; right: 10px; font-size: .72rem; }
  .opt { padding: 13px 14px; }
  .qtext { font-size: 1.05rem; }
  .qactions .btn { flex: 1; }
  .term { height: 58vh; min-height: 340px; font-size: .84rem; }
  .term .keys { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #101a2c; overflow-x: auto; }
  .term .keys button { flex: 1 0 auto; background: #121c30; border: 1px solid #22314f; color: #cde7d8; border-radius: 8px; padding: 8px 10px; font: 600 .8rem var(--mono); }
  .term .in span { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
  .explain .row .btn.primary { flex: 1; }
  .day { grid-template-columns: 40px 1fr; padding: 12px; gap: 8px; }
  .tasks li { font-size: .88rem; }
  .mtable { font-size: .75rem; display: block; overflow-x: auto; }
  .bin { font-size: .78rem; }
  .big { font-size: 1.5rem; padding: 12px 0; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .ready { flex-direction: column; align-items: stretch; }
  .ring { align-self: center; }
}
@media (max-width: 360px) { .nodes { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .explain .stack { display: contents; }
  .explain #sc { order: 1; } .explain .legend { order: 2; margin-top: -8px; } .explain #txt { order: 3; }
  .explain .ctrl { order: 4; position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 5; background: rgba(11, 18, 32, .92); backdrop-filter: blur(8px); padding: 8px; margin: 0 -8px; border-radius: 12px; }
  .explain .dots { order: 5; }
}
@media (min-width: 761px) and (max-width: 900px) { .explain .ctrl { bottom: 8px; } }
@media (hover: none) { .qhint .muted, .lab > p.muted kbd { display: none; } }

/* ───────── Toegang: homepagina, wachtstatus en beheer ───────── */
.top .inlog { display: none; }
body.gast #nav, body.gast .tabbar, body.gast .player .chip { display: none; }
body.gast .top .inlog { display: inline-flex; }
body.gast .top .avatar { display: none; }
body.gast.ingelogd .top .avatar { display: grid; }
body.gast.ingelogd .top .inlog { display: none; }
@media (max-width: 760px) { body.gast main { padding-bottom: 24px; } }


.userlist { display: grid; gap: 10px; }
.user { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.user .avatar { flex: none; }
.user.pending { border-left: 4px solid var(--warn); }
.user.rejected { opacity: .75; }
.user .acties { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) { .user { flex-wrap: wrap; } .user .acties { width: 100%; justify-content: flex-start; } }

/* ───────── Homepagina ───────── */
.landing h2 { margin: 6px 0 10px; font-size: clamp(1.45rem, 3vw, 2rem); }
.kicker { font-family: var(--mono); color: var(--accent); letter-spacing: .08em; font-size: .8rem; text-transform: uppercase; }
.lhero { position: relative; margin: -8px 0 10px; padding: 34px 20px 40px; border-radius: 24px; overflow: hidden;
  background: radial-gradient(700px 380px at 15% 10%, rgba(34, 211, 238, .14), transparent 70%), radial-gradient(600px 400px at 90% 90%, rgba(167, 139, 250, .16), transparent 70%); }
#netbg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.lhero-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px; align-items: center; }
.lhero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.06; margin: 14px 0 16px; letter-spacing: -.02em; }
.glans { background: linear-gradient(90deg, var(--accent), var(--accent2), var(--good), var(--accent)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: glans 8s linear infinite; }
@keyframes glans { to { background-position: 300% 0; } }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; line-height: 1.6; }
.pil { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .35); color: var(--accent); }
.btn.groot { padding: 13px 22px; font-size: 1.02rem; border-radius: 12px; }
.btn.primary.groot { box-shadow: 0 10px 30px -10px rgba(34, 211, 238, .7); }
.btn.primary.groot:hover { transform: translateY(-2px); }
.cijfers { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 26px; margin-top: 26px; }
.cijfers div { display: flex; flex-direction: column; }
.cijfers b { font-size: 1.9rem; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.cijfers span { color: var(--muted); font-size: .82rem; margin-top: 4px; }

.demo { padding: 12px; background: rgba(21, 32, 56, .85); backdrop-filter: blur(6px); box-shadow: 0 30px 80px -30px rgba(34, 211, 238, .35);
  animation: zweef 7s ease-in-out infinite; }
@keyframes zweef { 50% { transform: translateY(-8px); } }
.demo svg { width: 100%; height: auto; display: block; }
.demotabs { display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; }
.demotabs button { flex: 1; white-space: nowrap; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.demotabs button.on { color: var(--text); border-color: var(--accent); background: rgba(34, 211, 238, .1); }
.democap { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px 4px; min-height: 3.4em; }
.democap span { font-size: .75rem; }
.demobalk { height: 3px; background: var(--bg2); border-radius: 9px; overflow: hidden; margin: 2px 6px 4px; }
.demobalk i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .6s; }

.blok { margin-top: 64px; }
.koptekst { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.koptekst p { line-height: 1.6; }
.onthul { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.onthul.in { opacity: 1; transform: none; }
.onthul [style*="--d"] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease var(--d), transform .6s ease var(--d), border-color .2s, box-shadow .2s; }
.onthul.in [style*="--d"] { opacity: 1; transform: none; }

.drie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stap3 { transition: transform .25s, border-color .25s; }
.stap3:hover { transform: translateY(-4px); border-color: var(--accent); }
.stap3 .ic, .stappen .ic { font-size: 2rem; }
.stap3 h3 { margin: 8px 0 6px; }
.stap3 p { margin: 0; line-height: 1.55; }

.twee { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }
.term-demo { padding: 0; overflow: hidden; background: #070c17; }
.termkop { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #0e1628; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.termkop i { width: 10px; height: 10px; border-radius: 50%; background: #f87171; }
.termkop i:nth-child(2) { background: #fbbf24; }
.termkop i:nth-child(3) { background: #34d399; }
.termkop span { margin-left: 8px; font-family: var(--mono); }
#typterm { margin: 0; padding: 14px 16px; min-height: 290px; font-family: var(--mono); font-size: .84rem; line-height: 1.6; color: #d7e3f4; white-space: pre-wrap; word-break: break-word; }
#typterm .pr { color: var(--good); margin-right: 6px; }
#typterm .ok { color: var(--warn); }
#typterm .uit { color: var(--muted); }
#typterm .cursor { color: var(--accent); animation: knipper 1s steps(1) infinite; }
@keyframes knipper { 50% { opacity: 0; } }
.proef h3 { margin: 8px 0 14px; line-height: 1.4; }
.proef .opt { padding: 10px 12px; }
.proefuitleg { margin: 12px 0 0; line-height: 1.55; min-height: 1em; }

.blauwdruk { display: grid; gap: 16px; padding: 22px; }
.bpkop { display: flex; justify-content: space-between; gap: 10px; }
.bpkop .mono { color: var(--accent); font-weight: 700; }
.bpbalk { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bpbalk i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1.4s cubic-bezier(.2, .8, .2, 1) .2s; }
.in .bpbalk i { width: var(--w); }
.bpx { font-size: .84rem; }

.feat { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feat .node { cursor: default; }
.feat .node:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 40px -16px rgba(34, 211, 238, .45); }

.tijdlijn { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; position: relative; display: grid; gap: 14px; }
.tijdlijn::before { content: ""; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), var(--accent2), var(--good)); opacity: .5; }
.tijdlijn li { position: relative; padding-left: 52px; }
.tijdlijn .bol { position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); box-shadow: 0 0 0 6px var(--bg); }
.tijdlijn .card { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; }

.stappen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stappen li { position: relative; padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.stappen .nr { position: absolute; top: 14px; right: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #062029; font-weight: 800; font-size: .85rem; }
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { padding: 14px 18px; transition: border-color .2s; }
.faq details[open] { border-color: var(--accent); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; line-height: 1.6; }

.slot { margin-top: 64px; text-align: center; padding: 42px 20px; border-radius: 24px; border: 1px solid rgba(34, 211, 238, .35);
  background: radial-gradient(500px 220px at 50% 0%, rgba(34, 211, 238, .2), transparent 70%), linear-gradient(135deg, #17244a, #12203d 60%, #10293a); }
.slot h2 { margin-top: 0; }
.slot p { color: var(--muted); }
.disclaimer { text-align: center; font-size: .82rem; margin: 26px auto 0; max-width: 640px; }

.statuskaart { margin-bottom: 18px; border-width: 2px; }
.statuskaart.wacht { border-color: var(--warn); }
.statuskaart.nee { border-color: var(--bad); }
.statuskaart .groot { font-size: 2rem; }

@media (max-width: 900px) {
  .lhero-in, .twee { grid-template-columns: 1fr; }
  .drie { grid-template-columns: 1fr; }
  .stappen { grid-template-columns: repeat(2, 1fr); }
  .cijfers { grid-template-columns: repeat(2, auto); gap: 16px 30px; }
}
@media (max-width: 480px) {
  .stappen { grid-template-columns: 1fr; }
  .blok { margin-top: 48px; }
  #typterm { font-size: .76rem; min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .glans, .demo, #typterm .cursor { animation: none; }
  .onthul, .onthul [style*="--d"] { opacity: 1; transform: none; transition: none; }
}

/* ───────── Aanvragen, privacy en statistieken ───────── */
.auth { max-width: 560px; }
.velden2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .velden2 { grid-template-columns: 1fr; } }
input[type=date] { color-scheme: dark; }
.akkoord { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.akkoord input { margin-top: 3px; }
.privacy h2 { margin-top: 22px; font-size: 1.15rem; }
.privacy li, .privacy p { line-height: 1.6; }

.admintabs { margin: 10px 0 18px; }
.admintabs a { padding: 7px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.admintabs a.on { background: var(--card2); color: var(--text); }
.userinfo { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .86rem; margin: 4px 0 2px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.kpi .ic { font-size: 1.4rem; }
.kpi b { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span:not(.ic) { color: var(--muted); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.grafiek { width: 100%; height: auto; display: block; }
.grafiek text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.grafiek .raster { stroke: var(--line); stroke-width: 1; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.legenda i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.hbalken { display: grid; gap: 10px; }
.hbk { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.hbk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbk b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbb { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.hbb i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: groei .9s cubic-bezier(.2, .8, .2, 1); transform-origin: left; }
@keyframes groei { from { transform: scaleX(0); } }

/* Statische inhoud voor zoekmachines en de eerste weergave (wordt door de app vervangen) */
.seo { max-width: 760px; margin: 30px auto; line-height: 1.6; }
.seo h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.1; }
.seo p, .seo li { color: var(--muted); }
.statgrid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 420px) { .statgrid { grid-template-columns: 1fr; } }

/* ───────── Examenvragen: exhibit, volgorde, koppelen ───────── */
.exhibit { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #070c17; }
.exkop { padding: 6px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #0e1628; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.exhibit pre { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: .82rem; line-height: 1.5; color: #d7e3f4; overflow-x: auto; white-space: pre; }
.volgorde { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); }
.vitem .lbl { flex: 1; }
.vitem.ok { border-color: var(--good); background: rgba(52, 211, 153, .1); }
.vitem.no { border-color: var(--bad); background: rgba(248, 113, 113, .08); }
.vknop { display: flex; gap: 4px; }
.vknop button { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); cursor: pointer; font-size: 1rem; }
.vknop button:hover:not(:disabled) { border-color: var(--accent); }
.vknop button:disabled { opacity: .3; cursor: default; }
.koppel { display: grid; gap: 8px; }
.kitem { display: grid; grid-template-columns: 1fr minmax(160px, 1.2fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); }
.kitem.sel { border-color: #3d5590; }
.kitem.ok { border-color: var(--good); background: rgba(52, 211, 153, .1); }
.kitem.no { border-color: var(--bad); background: rgba(248, 113, 113, .08); }
.kitem .goed { grid-column: 2; color: var(--good); }
@media (max-width: 560px) { .kitem { grid-template-columns: 1fr; } .kitem .goed { grid-column: 1; } }

/* ───────── Proefexamens ───────── */
.examgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.examkaart { border-width: 2px; }
.examkaart.gehaald { border-color: var(--good); }
.examkaart.bezig { border-color: var(--warn); }
.examnr { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #062029; flex: none; }

/* ───────── Beginnerslessen ───────── */
.echt { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(167, 139, 250, .12); border: 1px dashed rgba(167, 139, 250, .5); font-size: .9rem; }
.echt b { color: var(--accent2); }
pre.mini { background: #070c17; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: .82rem; overflow-x: auto; }
.basiskop .bar { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.basiskop .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; }
.leerpad { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.lpstap { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; transition: transform .2s, border-color .2s; }
.lpstap:hover { transform: translateY(-2px); border-color: var(--accent); }
.lpstap.klaar { border-color: rgba(52, 211, 153, .5); }
.lpnr { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--bg2); border: 2px solid var(--accent); color: var(--accent); flex: none; }
.lpstap.klaar .lpnr { background: var(--good); border-color: var(--good); color: #062029; }
.lpic { font-size: 1.6rem; }
.lptxt { display: flex; flex-direction: column; gap: 2px; }
.basisbanner { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; text-decoration: none; color: var(--text); border-color: rgba(167, 139, 250, .5); background: linear-gradient(135deg, rgba(167, 139, 250, .12), rgba(34, 211, 238, .06)); }
.basisbanner:hover { border-color: var(--accent2); }

/* ───────── Toets per onderdeel ───────── */
.toetsgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.toetskaart { display: flex; flex-direction: column; gap: 10px; }
.toetsversie { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); }
.toetsversie.gehaald { border-color: var(--good); }
.toetsversie.bezig { border-color: var(--warn); }
