/* ============================================================
   Vermogenmeester — design system
   Stone-neutralen (spec-identiek), accent = goud #d4a017.
   Donker thema (default) + licht thema.
   No-build; werkt via file:// en lokale server.
   ============================================================ */

: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:        #d4a017;  /* goud */
  --accent-2:      #b8860b;  /* goud hover */
  --accent-dim:    rgba(212,160,23,.12);
  --accent-soft:   rgba(212,160,23,.05);
  --accent-border: rgba(212,160,23,.55);
  --accent-ink:    #1c1410;  /* tekst op goud */

  /* 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);

  /* Aliases voor tool-kleuren (blijven werken) */
  --brand:        var(--accent);
  --brand-bright: var(--accent-2);
  --brand-dim:    rgba(212,160,23,.6);
  --brand-deep:   #5a3e00;
  --brand-soft:   var(--accent-soft);
  --brand-line:   var(--accent-border);
  --warn:        #E88A66;
  --warn-bg:     rgba(232,138,102,.10);
  --warn-line:   rgba(232,138,102,.30);
  --glow:        rgba(212,160,23,.55);
}

.dark {
  /* zelfde als :root (dark is default) */
  --bg:        #0c0a09;
  --bg-2:      #1c1917;
  --panel:     #1c1917;
  --panel-2:   #292524;
  --line:      #292524;
  --line-2:    rgba(41,37,36,.6);
  --ink:       #f5f5f4;
  --ink-soft:  #a8a29e;
  --ink-faint: #78716c;
  --display:   #fafaf9;
  --accent:        #d4a017;
  --accent-2:      #b8860b;
  --accent-dim:    rgba(212,160,23,.12);
  --accent-soft:   rgba(212,160,23,.05);
  --accent-border: rgba(212,160,23,.55);
  --accent-ink:    #1c1410;
  --brand:        var(--accent);
  --brand-bright: var(--accent-2);
  --brand-dim:    rgba(212,160,23,.6);
  --brand-deep:   #5a3e00;
  --brand-soft:   var(--accent-soft);
  --brand-line:   var(--accent-border);
  --warn:        #E88A66;
  --warn-bg:     rgba(232,138,102,.10);
  --warn-line:   rgba(232,138,102,.30);
  --glow:        rgba(212,160,23,.55);
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 18px 48px rgba(0,0,0,.45);
}

.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:        #a16207;  /* goud licht */
  --accent-2:      #b8860b;
  --accent-dim:    rgba(161,98,7,.10);
  --accent-soft:   rgba(161,98,7,.06);
  --accent-border: rgba(161,98,7,.45);
  --accent-ink:    #1c1410;
  --brand:        var(--accent);
  --brand-bright: var(--accent-2);
  --brand-dim:    rgba(161,98,7,.6);
  --brand-deep:   #3d2800;
  --brand-soft:   var(--accent-soft);
  --brand-line:   var(--accent-border);
  --warn:        #c0552f;
  --warn-bg:     rgba(192,85,47,.08);
  --warn-line:   rgba(192,85,47,.25);
  --glow:        rgba(161,98,7,.40);
  --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; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ============================================================
   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, #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);
  height: auto;
}
.tb-inner, .topbar-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; color: inherit; }
.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;
  box-shadow: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.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, .brand-sub { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; white-space: nowrap; }

.top-right, .tb-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.top-progress, .progress { display: flex; align-items: center; gap: 10px; }
.tp-label, .progress .pl { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.tp-track, .progress .pt { width: 120px; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.tp-fill, .progress .pf { display: block; height: 100%; width: 0%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.tp-pct, .progress .pp { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 600; min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }

.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;
  font-size: 18px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.kbd-hint, .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;
  display: flex; align-items: center; gap: 3px;
}
.kbd-hint:hover, .kbd:hover { border-color: var(--accent); color: var(--accent); }
.kbd-hint kbd { font-family: var(--sans); font-size: 12px; }

.nav-toggle, .hamburger { display: none; }

/* sun/moon wisselen op thema */
.ic-moon { display: none; }
.light .ic-sun { display: none; }
.light .ic-moon { display: block; }

/* ============================================================
   SIDEBAR
   ============================================================ */
#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;
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
}

/* Zoekbalk */
.search, .nav-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 8px; color: var(--ink-faint);
}
.search input, .nav-search {
  border: none; background: none; outline: none; width: 100%;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
}
.search input::placeholder, .nav-search::placeholder { color: var(--ink-faint); }
.search input:focus, .nav-search:focus { outline: none; }
.search:focus-within, .nav-search-wrap:focus-within { border-color: var(--accent); }

/* Navigatie */
.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-part, .nav-group-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ink-faint);
  margin: 18px 0 6px; padding: 0 10px;
  font-weight: 600;
}
.nav-part .np-num, .nav-group-title .gn { color: var(--accent); font-family: var(--mono); font-weight: 600; }

.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: 14.5px; font-weight: 500;
  transition: background .12s, color .12s;
  border: 1px solid transparent; cursor: pointer;
}
.nav-item .ni-num { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); width: 20px; flex: none; font-variant-numeric: tabular-nums; }
.nav-item .ni-ic, .nav-item .ni-ico { color: var(--ink-faint); width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.nav-item .ni-ic svg, .nav-item .ni-ico svg { width: 18px; height: 18px; }
.nav-item .ni-title, .nav-item .ni-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .ni-check { color: var(--accent); opacity: 0; }
.nav-item.done .ni-check { opacity: 1; }
.nav-item.done .ni-num { color: var(--accent); }
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item:hover .ni-ic, .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-ic, .nav-item.active .ni-ico, .nav-item.active .ni-check { color: var(--accent-ink); }
.nav-item.hidden { display: none; }

/* ============================================================
   HERO (Welkom)
   ============================================================ */
.hero-block { margin-bottom: 0; }

/* Pill-badge */
.eyebrow, .hero-pill {
  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, .lead {
  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; margin: 0 0 32px;
}
.hero-sub em, .lead em { color: var(--ink); font-style: italic; }

/* CTA-rij */
.cta-row, .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 0; }

/* Knoppen — basis */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink);
  padding: 11px 17px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  text-decoration: none; font-family: var(--sans);
  transition: background .15s, transform .1s, border-color .15s;
}
.btn:hover { border-color: var(--accent-border); }
.btn:active { transform: translateY(1px); }

/* Primaire (gevulde accent) knop */
.btn.btn-primary, .btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.btn-primary:hover, .btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* Ghost knop */
.btn.ghost, .btn.btn-secondary {
  background: transparent; color: var(--ink);
  border: 2px solid var(--line);
}
.btn.ghost:hover, .btn.btn-secondary:hover { background: var(--panel-2); }

.btn.btn-done {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border);
}

/* CTA-rij stijl (binnen hero) */
.cta-row .btn, .hero-cta .btn { border-radius: 12px; padding: 12px 20px; font-size: 14px; }
.cta-row .btn.ghost, .hero-cta .btn.ghost { border-width: 2px; }

/* ============================================================
   STAT-STRIP (4 kolommen, accent-zacht paneel)
   ============================================================ */
.stat-band, .hero-stats {
  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;
  overflow: visible;
}
/* Verwijder de aparte linker-borders die de oude stijl had */
.hero-stats .stat + .stat { border-left: none; }

.stat-band .stat, .hero-stats .stat {
  text-align: center; padding: 0; border: none;
  display: flex; flex-direction: column; align-items: center;
  background: transparent; flex: unset;
}
.stat-band .stat .num, .hero-stats .stat-n,
.stat-band .stat .stat-n {
  display: block;
  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, .hero-stats .stat-l,
.stat-band .stat .stat-l {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 4px;
}
/* Datum-stat */
.hero-stats .stat-date { text-align: center; }
.hero-stats .stat-date .stat-year { color: var(--accent); }

@media (max-width: 720px) {
  .stat-band, .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .hero-stats .stat + .stat { border-left: none; }
  .hero-stats .stat:nth-child(2), .hero-stats .stat:nth-child(4) { border-left: none; }
  .hero-stats .stat:nth-child(3), .hero-stats .stat:nth-child(4) { border-top: none; }
}

/* ============================================================
   FEATURE-GRID / PIJLER-KAARTEN
   ============================================================ */
.feature-grid, .pillars {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin: 0 0 48px;
}
@media (min-width: 700px)  { .feature-grid, .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-grid, .pillars { grid-template-columns: repeat(3, 1fr); } }

.feature, .pillar {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column;
}
.feature .fn, .feature .feature-eyebrow {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.feature h3, .pillar h3 {
  font-family: var(--sans); color: var(--ink); font-size: 15px; font-weight: 600; margin: 0 0 4px;
}
.feature p, .pillar p {
  font-family: var(--sans); font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55;
}

/* Icoon-vakje in kaart (spec §5c) */
.feature-icon, .pillar .p-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent); margin-bottom: 10px; flex: none;
}
.feature-icon svg, .pillar .p-ico svg { width: 16px; height: 16px; }
.pillar .p-ico .ic { width: 18px; height: 18px; }
.feature.highlighted .feature-icon { background: var(--accent); color: var(--accent-ink); }

/* Sectiekop boven de kaarten */
.section-kop { margin-bottom: 24px; }
.section-kop .eyebrow { margin-bottom: 8px; }
.section-kop h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.25rem); margin: 0; color: var(--display);
}
.section-kop h2 em { font-style: italic; color: var(--accent); }

/* Home-cards (module-overzicht onderaan) */
.section-label { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 36px 0 4px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; margin-bottom: 48px; }
.home-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 7px;
  transition: border-color .15s, transform .15s;
}
.home-card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.home-card .hc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-card .hc-ic { color: var(--accent); }
.home-card .hc-id { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; }
.home-card .hc-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.home-card .hc-desc { font-size: 13px; color: var(--ink-soft); }

/* ============================================================
   PROSE / KOPPEN (artikelen)
   ============================================================ */
.article { max-width: var(--read-w); margin: 0; }
.crumb { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.module-id { font-family: var(--serif); font-size: 14px; color: var(--accent); font-weight: 600; letter-spacing: .5px; }
.module-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 16px; }

.article h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.06; letter-spacing: -.02em;
  margin: 4px 0 6px; color: var(--display);
}
.article h2 {
  font-family: var(--serif); font-weight: 500; font-size: 1.7rem;
  margin: 2.2em 0 .5em; color: var(--display);
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.article h3 { font-family: var(--sans); font-size: 1.18rem; font-weight: 700; color: var(--ink); margin: 1.7em 0 .4em; }
.article p { margin: 13px 0; }
.article ul, .article ol { margin: 13px 0; padding-left: 24px; }
.article li { margin: 7px 0; }
.article li::marker { color: var(--accent); }
.article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-border); }
.article a:hover { border-color: var(--accent); }
.article strong { color: var(--ink); font-weight: 600; }
.article em { font-style: italic; }
.article 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; }

/* Leerdoelen */
.goals { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 30px; }
.goals h3 { font-family: var(--sans); margin: 0 0 10px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.goals ul { margin: 0; padding-left: 20px; }
.goals li { margin: 5px 0; color: var(--ink); }
.goals li::marker { color: var(--accent); }

/* ============================================================
   BADGES
   ============================================================ */
.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; border: 1px solid transparent;
  background: var(--accent-dim); color: var(--accent);
}
.badge-fundament, .badge.badge-fundament { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.badge-gevorderd, .badge.badge-gevorderd { color: #E0B65C; background: rgba(224,182,92,.12); border-color: rgba(224,182,92,.30); }
.badge-expert,    .badge.badge-expert    { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.badge-pijler,    .badge.badge-pijler   { color: var(--ink-soft); background: var(--panel-2); border-color: var(--line); }

/* ============================================================
   CALLOUTS / BOXES
   ============================================================ */
.callout {
  border-radius: var(--radius); padding: 16px 20px; margin: 20px 0;
  background: var(--panel); border: 1px solid var(--line);
}
.callout .ct { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; font-size: 14.5px; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.warn .ct { color: var(--warn); }
.callout.tip, .callout.info { background: var(--accent-soft); border-color: var(--accent-border); }
.callout.tip .ct, .callout.info .ct { color: var(--accent); }

.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); }

.verify { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }

/* Kwaliteitslat-rijen */
.layered { margin: 12px 0; }
.layered .lr { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.layered .lr:last-child { border-bottom: none; }
.layered .lr .lk { font-weight: 600; color: var(--accent); font-size: 14px; }

/* Valkuilen */
.pitfalls { list-style: none; padding: 0; margin: 14px 0; }
.pitfalls li { position: relative; padding: 11px 14px 11px 40px; margin: 9px 0; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); }
.pitfalls li::before { content: "⚠"; position: absolute; left: 13px; top: 11px; color: var(--warn); }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--panel-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); font-weight: 600; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   INTERACTIEVE TOOLS / REKENTOOL
   ============================================================ */
.tool {
  font-family: var(--sans); background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; margin: 28px 0; box-shadow: var(--shadow);
  font-size: 16px; line-height: 1.55;
}
.tool-head, .tool .tool-kicker-wrap {
  padding: 18px 22px;
  background: color-mix(in srgb, var(--accent-soft) 100%, transparent);
  border-bottom: 1px solid var(--line);
}
.tool-head .th-tag, .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-head h3, .tool h3 {
  font-family: var(--serif); color: var(--display); margin: 4px 0 4px; font-size: 1.5rem; font-weight: 500;
}
.tool-head p, .tool .tool-sub { margin: 0; font-size: 14px; color: var(--ink-soft); }
.tool-body { padding: 22px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px) { .tool-grid { grid-template-columns: 1fr; } }

.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); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--ink-faint); font-weight: 400; }
.field input[type="number"],
.field input[type="text"],
.field input[type="range"],
.field select,
.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,
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.tool textarea { resize: vertical; min-height: 72px; }
.tool input[type="range"],
.field input[type="range"] { padding: 0; accent-color: var(--accent); }
.field-row { display: flex; align-items: center; gap: 12px; }
.range-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); min-width: 62px; text-align: right; }

.result-card { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 9px; padding: 15px 17px; margin-bottom: 12px; }
.result-card .rc-label { font-family: var(--mono); font-size: 12px; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.result-card .rc-value { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.result-card .rc-sub { font-size: 12.5px; color: var(--ink-soft); }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
/* .stat in tool-context: niet overschrijven met stat-band */
.stat-row .stat { flex: 1 1 130px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; text-align: left; display: block; }
.stat-row .stat .s-label { font-size: 11.5px; color: var(--ink-faint); }
.stat-row .stat .s-value { font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.tool canvas { width: 100%; height: auto; display: block; }
.tool-legend { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }
.tool-takeaway { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; padding: 13px 16px; }
.tool-takeaway b { color: var(--accent); }

/* Opdracht / Zelftoets */
.task { border: 1px solid var(--accent-border); background: var(--panel); border-left: 3px solid var(--accent); border-radius: 9px; padding: 16px 20px; margin: 22px 0; }
.task h4 { font-family: var(--serif); margin: 0 0 6px; color: var(--accent); font-size: 17px; }

.quiz { margin: 22px 0; display: flex; flex-direction: column; gap: 9px; }
.quiz-q { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.quiz-q > button { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 14px 18px; font-size: 15px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; align-items: center; font-family: inherit; }
.quiz-q > button:hover { background: var(--panel-2); }
.quiz-q .qa { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 18px; color: var(--ink-soft); }
.quiz-q.open .qa { max-height: 460px; padding: 0 18px 16px; }
.quiz-q .chev { color: var(--accent); transition: transform .25s ease; }
.quiz-q.open .chev { transform: rotate(90deg); }

/* ============================================================
   MODULE-FOOTER / PAGER
   ============================================================ */
.module-foot { max-width: var(--read-w); margin: 52px 0 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }

.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; }

/* =====================================================================
   LEER-ENGINE: mastery-bolletjes, herhaal-knop, quiz-blok, herhaal-modal
   Accent-tokens worden geërfd van het goud-thema (var(--accent) = #d4a017).
   Mastery-kleuren zijn semantisch vast (amber/sky/emerald).
   ===================================================================== */

/* --- 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; }  /* amber  — gelezen  */
.ni-mast.mast-test   { background: #0ea5e9; }  /* sky    — getoetst */
.ni-mast.mast-master { background: #10b981; }  /* emerald — beheerst */
.nav-item.active .ni-mast { box-shadow: 0 0 0 2px var(--accent); }

/* --- Herhalen-knop in de topbar (.tb-right) --- */
.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;
  max-width: var(--read-w);
}
.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 (overlay) --- */
.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 {
  .quizbox, .review-ov, #vm-reviewBtn { display: none !important; }
}

/* ============================================================
   SIDEBAR FOOTER / LEGENDA
   ============================================================ */
.legend { margin-top: 26px; padding: 16px 10px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.legend-title { width: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.sidebar-foot { margin-top: 18px; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.save-hint { display: block; font-size: 11px; color: var(--ink-faint); margin-bottom: 6px; line-height: 1.4; }
.link-btn { background: none; border: none; color: var(--ink-faint); font-size: 11.5px; cursor: pointer; padding: 0; text-decoration: underline; font-family: inherit; }
.link-btn:hover { color: var(--accent); }

/* ============================================================
   NAAR BOVEN
   ============================================================ */
#toTop, .to-top {
  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, .to-top.show { opacity: 1; pointer-events: auto; }
#toTop:hover, .to-top:hover { transform: translateY(-2px); }
#toTop svg, .to-top .ic { width: 20px; height: 20px; }

/* Scrim */
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
.scrim.show { display: block; }

/* ============================================================
   RESPONSIEF
   ============================================================ */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  #sidebar, .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); top: 0;
  }
  #sidebar.open, .sidebar.open { transform: translateX(0); }
  .nav-toggle, .hamburger { display: grid; }
  .content { padding: 40px 24px 120px; }
  #scrim, .scrim { position: fixed; inset: 0; z-index: 45; }
}
@media (max-width: 980px) {
  .nav-toggle { display: grid; }
  .brand-tag, .brand-sub { display: none; }
  .tp-label { display: none; }
  .kbd-hint { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .tp-track { width: 70px; }
  .hero-title { font-size: clamp(2.4rem, 13vw, 3.4rem); }
  .tool-grid { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .topbar, #topbar, #sidebar, .sidebar, .scrim, .module-foot, #toTop, .to-top, .pager, .btn-row { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .article a { color: #000; border: none; }
}
