/* =====================================================================
   Skillmeester — handboek Skills & Zelfontwikkeling
   Gedeeld design system. Donker thema (default) + licht thema.
   Huisstijl in lijn met Onderneemmeester / Ecom meester.
   ===================================================================== */

:root {
  /* Donker thema (default) — stone-neutralen, gelijk aan referentie */
  --bg:        #0c0a09;   /* stone-950 */
  --bg-2:      #1c1917;   /* sidebar / topbar — stone-900 */
  --panel:     #1c1917;   /* kaarten, tools — stone-900 */
  --panel-2:   #292524;   /* inputs, lichtere vlakken — stone-800 */
  --line:      #292524;   /* stone-800 */
  --line-2:    rgba(41,37,36,.6);

  --ink:       #f5f5f4;   /* hoofdtekst — stone-100 */
  --ink-soft:  #a8a29e;   /* stone-400 */
  --ink-faint: #78716c;   /* stone-500 */
  --display:   #fafaf9;   /* grote koppen — stone-50 */

  --accent:      #8b5cf6;  /* violet-500 */
  --accent-2:    #7c3aed;  /* violet-600 */
  --accent-dim:  rgba(139,92,246,.12);
  --accent-soft: rgba(139,92,246,.05);
  --accent-border: rgba(139,92,246,.55);
  --accent-ink:  #ffffff;  /* tekst op violet */

  /* Content-type kleuren (op donker) */
  --c-verdieping: #8AA0FF;
  --c-tool:       #5FCB8E;
  --c-model:      #F2B45C;
  --c-opdracht:   #FF8C66;
  --c-zelftoets:  #5FC7D6;
  --c-visual:     #C49BFF;
  --c-structuur:  #9AA6B2;
  --c-valkuil:    #FF7A7A;

  /* Typografie */
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", "Consolas", monospace;

  --sidebar-w: 288px;
  --read-w: 820px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 40px rgba(0,0,0,.35);
}

[data-theme="light"] {
  --bg:        #FAF6F0;
  --bg-2:      #FFFFFF;
  --panel:     #FFFFFF;
  --panel-2:   #F5EFE5;
  --line:      #e7e5e4;   /* stone-200 */
  --line-2:    rgba(231,229,228,.8);

  --ink:       #1c1917;   /* stone-900 */
  --ink-soft:  #57534e;   /* stone-600 */
  --ink-faint: #78716c;   /* stone-500 */
  --display:   #1c1917;

  --accent:      #7c3aed;  /* violet-600 */
  --accent-2:    #6d28d9;  /* violet-700 */
  --accent-dim:  rgba(124,58,237,.10);
  --accent-soft: rgba(124,58,237,.06);
  --accent-border: rgba(124,58,237,.45);
  --accent-ink:  #FFFFFF;

  --c-verdieping: #4F46E5;
  --c-tool:       #0E8C6A;
  --c-model:      #B45309;
  --c-opdracht:   #C2410C;
  --c-zelftoets:  #0E7490;
  --c-visual:     #7C3AED;
  --c-structuur:  #475569;
  --c-valkuil:    #B91C1C;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

/* =====================================================================
   LAYOUT
   ===================================================================== */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.content { min-width: 0; padding: 32px 32px 140px; }
/* Links uitgelijnd, breedte gelijk aan referentie (max-w-4xl ≈ 896px) */
.content > * { max-width: 880px; }
.hero-block { max-width: 880px; margin: 0; }
.prose { max-width: 820px; margin: 0; }

/* =====================================================================
   TOPBAR
   ===================================================================== */
#topbar {
  grid-column: 1 / -1;
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-2);
}
.tb-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  flex: none;
}
.brand-text { line-height: 1.15; }
.brand-name { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--display); letter-spacing: -.01em; }
.brand-name em { color: var(--accent); font-style: italic; }
.brand-tag { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }

.tb-right { display: flex; align-items: center; gap: 14px; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress .pl { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.progress .pt { width: 160px; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.progress .pf { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
.progress .pp { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 600; min-width: 3em; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 9px;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.kbd {
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px;
  cursor: pointer; background: transparent; transition: border-color .15s, color .15s;
}
.kbd:hover { border-color: var(--accent); color: var(--accent); }
.hamburger { display: none; }

/* =====================================================================
   SIDEBAR
   ===================================================================== */
#sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  position: sticky; top: 71px; align-self: start;
  height: calc(100vh - 71px);
  overflow-y: auto;
  padding: 22px 16px 60px;
}
.nav-search {
  width: 100%; font-family: var(--sans); font-size: 14px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 14px 11px 38px; border-radius: 10px; margin-bottom: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2376746B' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat; background-position: 13px center;
}
.nav-search::placeholder { color: var(--ink-faint); }
.nav-search:focus { outline: none; border-color: var(--accent); }

.nav-group { margin-top: 22px; }
.nav-group-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 12px 8px; display: flex; gap: 8px;
}
.nav-group-title .gn { color: var(--accent); }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; margin: 2px 0;
  text-decoration: none; color: var(--ink-soft);
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-item .ni-num { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); width: 20px; flex: none; }
.nav-item .ni-ico { width: 18px; height: 18px; flex: none; color: var(--ink-faint); display: grid; place-items: center; }
.nav-item .ni-ico svg { width: 18px; height: 18px; }
.nav-item .ni-label { flex: 1; }
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item:hover .ni-ico { color: var(--accent); }
.nav-item.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav-item.active .ni-num, .nav-item.active .ni-ico { color: var(--accent-ink); }
.nav-item.todo { opacity: .45; pointer-events: none; }
.nav-item.todo .ni-soon { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--line); padding: 2px 6px; border-radius: 999px; }

/* =====================================================================
   HERO (Welkom)
   ===================================================================== */
.hero-block { margin-bottom: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 999px;
  padding: 5px 12px; margin-bottom: 24px;
}
.eyebrow .dot { color: var(--ink-faint); }
.hero-title {
  font-family: var(--serif); color: var(--display);
  font-size: clamp(2.8rem, 7vw, 4.5rem); line-height: 1.02; letter-spacing: -.02em;
  font-weight: 600; margin: 0 0 24px; text-wrap: balance;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.6; color: var(--ink-soft);
  max-width: 42rem; text-wrap: pretty;
}
.hero-sub em { color: var(--ink); font-style: italic; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.cta-row .btn { border-radius: 12px; padding: 13px 20px; font-size: 14px; }
.cta-row .btn.ghost { border-width: 2px; }

/* Statistiekenbalk onder de hero — 4 gelijke kolommen, accent-zacht paneel */
.stat-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 48px 0; padding: 20px;
  background: var(--accent-soft); border: 1px solid var(--line-2); border-radius: 16px;
}
.stat-band .stat { text-align: center; padding: 0; border: none; }
.stat-band .stat .num {
  font-family: var(--serif); color: var(--accent);
  font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.1; font-weight: 600; letter-spacing: -.01em;
}
.stat-band .stat .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 4px;
}
.stat-band .stat.date { text-align: center; }
.stat-band .stat.date .num { font-size: clamp(1.3rem, 3vw, 1.7rem); }
@media (max-width: 720px) {
  .stat-band { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
}

/* =====================================================================
   PROSE / KOPPEN
   ===================================================================== */
.prose h1 { font-family: var(--serif); color: var(--display); font-size: 2.6rem; line-height: 1.1; font-weight: 500; letter-spacing: -.015em; margin: 0 0 .3em; }
.prose h2 { font-family: var(--serif); color: var(--display); font-size: 1.7rem; font-weight: 500; margin: 2.2em 0 .5em; }
.prose h3 { font-family: var(--sans); font-size: 1.18rem; font-weight: 700; color: var(--ink); margin: 1.7em 0 .4em; }
.prose p { margin: 0 0 1.15em; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.6em 0; }

/* Module-header */
.m-head { margin: 6px 0 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.m-pijler { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.m-num { font-family: var(--mono); color: var(--ink-faint); font-size: 13px; }
.m-lead { font-size: 1.22rem; color: var(--ink-soft); margin-top: .5em; line-height: 1.55; }

/* =====================================================================
   BADGES / BLOKKEN
   ===================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent);
}
.badge.verdieping { color: var(--c-verdieping); background: color-mix(in srgb, var(--c-verdieping) 16%, transparent); }
.badge.is-tool    { color: var(--c-tool);       background: color-mix(in srgb, var(--c-tool) 16%, transparent); }
.badge.model      { color: var(--c-model);      background: color-mix(in srgb, var(--c-model) 16%, transparent); }
.badge.opdracht   { color: var(--c-opdracht);   background: color-mix(in srgb, var(--c-opdracht) 16%, transparent); }
.badge.zelftoets  { color: var(--c-zelftoets);  background: color-mix(in srgb, var(--c-zelftoets) 16%, transparent); }
.badge.visual     { color: var(--c-visual);     background: color-mix(in srgb, var(--c-visual) 16%, transparent); }
.badge.structuur  { color: var(--c-structuur);  background: color-mix(in srgb, var(--c-structuur) 16%, transparent); }
.section-tag { margin: 2.6em 0 .2em; }

.callout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 1.7em 0; }
.callout p:last-child { margin-bottom: 0; }

.box { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px 26px; margin: 1.9em 0; background: var(--panel); }
.box .box-title { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .7em; display: flex; align-items: center; gap: .5em; color: var(--accent); }
.box.opdracht  { border-left-color: var(--c-opdracht); }
.box.opdracht  .box-title { color: var(--c-opdracht); }
.box.zelftoets { border-left-color: var(--c-zelftoets); }
.box.zelftoets .box-title { color: var(--c-zelftoets); }
.box.valkuil   { border-left-color: var(--c-valkuil); }
.box.valkuil   .box-title { color: var(--c-valkuil); }

.lagen { display: grid; gap: 1px; margin: 1.5em 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.lagen div { background: var(--panel); padding: 14px 20px; }
.lagen div b { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }

/* =====================================================================
   INTERACTIEVE TOOLS
   ===================================================================== */
.tool {
  font-family: var(--sans); background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; margin: 2em 0; box-shadow: var(--shadow);
  font-size: 16px; line-height: 1.55;
}
.tool .tool-kicker { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.tool h3 { font-family: var(--serif); color: var(--display); margin: 0 0 .2em; font-size: 1.5rem; font-weight: 500; }
.tool .tool-sub { color: var(--ink-soft); margin: 0 0 20px; font-size: 15px; }
.tool h4 { font-family: var(--sans); color: var(--ink); }
.tool label { font-family: var(--sans); font-weight: 600; font-size: 14px; display: block; margin-bottom: 5px; color: var(--ink); }
.tool input[type="text"], .tool textarea, .tool select {
  width: 100%; font-family: var(--sans); font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--ink);
}
.tool input::placeholder, .tool textarea::placeholder { color: var(--ink-faint); }
.tool input:focus, .tool textarea:focus, .tool select:focus { outline: none; border-color: var(--accent); }
.tool textarea { resize: vertical; min-height: 72px; }
.tool input[type="range"] { width: 100%; accent-color: var(--accent); }
.field { margin-bottom: 16px; }

.btn { font-family: var(--sans); font-weight: 600; font-size: 15px; background: var(--accent); color: var(--accent-ink); border: none; padding: 12px 22px; border-radius: 10px; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.secondary:hover { background: var(--accent-dim); }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* Baseline sliders */
.skill-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.skill-row:last-child { border-bottom: none; }
.skill-row .sr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.skill-row .sr-name { font-weight: 600; color: var(--ink); }
.skill-row .sr-pijler { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.skill-row .sr-val { font-family: var(--mono); font-weight: 700; color: var(--accent); min-width: 2.2em; text-align: right; }

.bars { margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: 210px 1fr 56px; gap: 12px; align-items: center; padding: 7px 0; }
.bar-row .bar-name { font-size: 14px; color: var(--ink-soft); }
.bar-track { background: var(--panel-2); border-radius: 999px; height: 14px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; }
.bar-prev { position: absolute; top: 0; height: 100%; width: 2px; background: var(--ink); opacity: .6; }
.bar-num { font-family: var(--mono); font-size: 14px; font-weight: 600; text-align: right; color: var(--ink); }
.delta-up { color: var(--c-tool); font-size: 12px; }
.delta-down { color: var(--c-valkuil); font-size: 12px; }

.muted { color: var(--ink-faint); font-size: 14px; font-family: var(--sans); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Generieke kaartjes voor module-tools (bv. gewoonte-kaart) */
.cards { display: grid; gap: 12px; margin-top: 16px; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card .card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.card .card-title { font-weight: 700; color: var(--ink); }
.card .card-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.streak-dots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dot-day { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); transition: all .12s; }
.dot-day.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dot-day.miss { background: transparent; border-color: var(--c-valkuil); color: var(--c-valkuil); }

/* =====================================================================
   CARDS op Welkom (overzicht pijlers)
   ===================================================================== */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 48px 0; }
@media (min-width: 700px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature .fn { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.feature h3 { font-family: var(--sans); color: var(--ink); font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.feature p { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* =====================================================================
   PAGER + SCROLL-TO-TOP
   ===================================================================== */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 70px; padding-top: 26px; border-top: 1px solid var(--line); font-family: var(--sans); }
.pager a { text-decoration: none; color: var(--ink-soft); font-size: 15px; max-width: 46%; }
.pager a:hover { color: var(--accent); }
.pager .lbl { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 4px; }
.pager .disabled { opacity: .4; pointer-events: none; }

#toTop {
  position: fixed; right: 28px; bottom: 28px; z-index: 30;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--accent); color: var(--accent);
  cursor: pointer; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .15s;
  box-shadow: var(--shadow);
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { transform: translateY(-2px); }
#toTop svg { width: 20px; height: 20px; }

/* =====================================================================
   RESPONSIEF
   ===================================================================== */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  #sidebar {
    position: fixed; top: 71px; left: 0; width: 86%; max-width: 340px;
    height: calc(100vh - 71px); z-index: 50;
    transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  #sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; }
  .progress .pt { width: 90px; }
  .content { padding: 40px 24px 120px; }
  #scrim { position: fixed; inset: 71px 0 0; background: rgba(0,0,0,.5); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .25s; }
  #scrim.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .progress, .brand-tag { display: none; }
  .bar-row { grid-template-columns: 110px 1fr 50px; }
  .tool { padding: 18px; }
  .hero-title { font-size: clamp(2.4rem, 13vw, 3.4rem); }
}

/* =====================================================================
   LEER-ENGINE: mastery-bolletjes, herhaal-knop, quiz, herhaal-modal
   ===================================================================== */
/* Mastery-bolletjes in de zijbalk */
.nav-item .ni-mast { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-left: auto; }
.ni-mast.mast-read   { background: #f59e0b; }  /* gelezen  */
.ni-mast.mast-test   { background: #0ea5e9; }  /* getoetst */
.ni-mast.mast-master { background: #10b981; }  /* beheerst */
.nav-item.active .ni-mast { box-shadow: 0 0 0 2px var(--accent); }

/* Herhalen-knop in de topbar */
.review-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  border-radius: 9px; padding: 7px 11px; cursor: pointer; font-family: var(--mono); font-size: 12px;
  transition: border-color .15s, color .15s, background .15s;
}
.review-btn svg { width: 15px; height: 15px; }
.review-btn:hover { border-color: var(--accent); color: var(--accent); }
.review-btn.has-due { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.review-btn .rb-count { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Quiz-blok onderaan een module */
.quizbox {
  margin: 56px 0 0; padding: 28px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
}
.quiz-kicker { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.quiz-h { font-family: var(--serif); color: var(--display); font-size: 1.6rem; font-weight: 600; margin: 6px 0 6px; }
.quiz-intro { font-family: var(--sans); color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; }
.quiz-q { padding: 18px 0; border-top: 1px solid var(--line); }
.qq-text { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: 16px; display: flex; gap: 10px; line-height: 1.45; margin-bottom: 12px; }
.qq-num { font-family: var(--mono); font-size: 12px; color: var(--accent); flex: none; padding-top: 3px; }
.qq-opts { display: grid; gap: 8px; }
.qq-opt {
  text-align: left; font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; cursor: pointer; transition: border-color .12s, background .12s;
}
.qq-opt:hover:not(:disabled) { border-color: var(--accent); }
.qq-opt:disabled { cursor: default; }
.qq-opt.is-correct { border-color: #10b981; background: color-mix(in srgb, #10b981 14%, transparent); color: var(--ink); }
.qq-opt.is-wrong   { border-color: #ef4444; background: color-mix(in srgb, #ef4444 14%, transparent); color: var(--ink); }
.qq-explain { margin-top: 10px; font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--ink-soft); padding: 12px 14px; border-radius: 10px; border-left: 3px solid var(--line); background: var(--panel-2); }
.qq-explain.ok { border-left-color: #10b981; }
.qq-explain.no { border-left-color: #ef4444; }
.qq-explain strong { color: var(--ink); }
.qq-correct { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-soft); }
.quiz-result { margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-family: var(--sans); font-size: 14.5px; border: 1px solid var(--line); }
.quiz-result.pass { border-color: #10b981; background: color-mix(in srgb, #10b981 10%, transparent); }
.quiz-result.fail { border-color: var(--accent); background: var(--accent-soft); }
.quiz-result strong { color: var(--ink); }
.quiz-retry { margin-left: 8px; padding: 7px 14px !important; font-size: 13px !important; }

/* Herhaal-modal */
.review-ov { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.review-card { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.rev-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rev-kicker { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.rev-x { background: transparent; border: none; color: var(--ink-faint); font-size: 18px; cursor: pointer; line-height: 1; }
.rev-x:hover { color: var(--ink); }
.rev-mod { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 6px; }
.rev-q { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: 17px; line-height: 1.45; margin-bottom: 16px; }
.rev-opts { display: grid; gap: 8px; }
.rev-next { margin-top: 16px; width: 100%; }
.rev-empty { text-align: center; padding: 24px 8px 12px; }
.rev-empty-ic { width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, #10b981 16%, transparent); color: #10b981; display: grid; place-items: center; font-size: 24px; margin: 0 auto 14px; }
.rev-empty h3 { font-family: var(--serif); color: var(--display); font-weight: 600; margin: 0 0 6px; }
.rev-empty p { font-family: var(--sans); color: var(--ink-soft); font-size: 14.5px; margin: 0; }

@media print {
  #topbar, #sidebar, #toTop, .pager, .btn-row, .nav-search, .quizbox, .review-ov { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; font-size: 12pt; }
}
