/* de Bouwdoos: rustige ledenomgeving in de huisstijl van Website Visie
   (context/huisstijl.md in het OS): petrol en kalk, vermiljoen alleen als stip.
   Eén breedte voor alle pagina's, één afstandenschaal, één kaartstijl.
   Radius-regel: kaarten en vensters 12px, knoppen en velden 6px, labels rond. */
:root {
  /* Huisstijl Website Visie */
  --petrol: #0F3A44;
  --diepzee: #1D5462;
  --vermiljoen: #E5533A;   /* alleen de stip en kleine accenten, nooit tekst of vlakken */
  --mist: #D3E0DE;
  --kalk: #F4F2EC;
  --wit: #FFFFFF;
  --tekst: #3D5458;        /* lopende tekst op wit en kalk */
  --accent: #B63E26;       /* accent in tekst op wit en kalk */
  --font-kop: 'Archivo', Arial, ui-sans-serif, system-ui, sans-serif;   /* koppen: breed 112%, Semibold */
  --font-tekst: 'Manrope', Arial, ui-sans-serif, system-ui, sans-serif; /* tekst en knoppen */
  --font-label: 'Geist Mono', 'Courier New', ui-monospace, monospace;  /* alleen labels, nummers en stappen */

  /* Afgeleide tinten (de namen zijn gebleven, de waarden volgen de huisstijl) */
  --black: var(--petrol);
  --white: var(--wit);
  --on-dark: var(--kalk);  /* tekst op een petrol vlak */
  --gray-50: #F9F8F5;
  --gray-100: var(--kalk);
  --gray-200: #E3EAE8;
  --gray-300: var(--mist);
  --gray-400: #9DB0B1;
  --gray-500: #5F7275;
  --gray-600: #4D6266;
  --gray-700: var(--tekst);
  --gray-800: var(--diepzee);
  --gray-900: var(--petrol);

  --bg: var(--white);
  --bg-subtle: var(--gray-50);
  --bg-sidebar: var(--kalk);
  --surface: var(--white);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --text: var(--tekst);
  --heading: var(--petrol);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --ring: rgba(15, 58, 68, .2);
  --shadow-sm: 0 1px 2px rgba(15, 58, 68, .05);
  --shadow-md: 0 4px 16px rgba(15, 58, 68, .07);
  --shadow-lg: 0 24px 64px rgba(15, 58, 68, .18);

  /* Afstanden: alles is een veelvoud hiervan. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 28px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  --radius-sm: 6px;
  --radius-lg: 12px;
  --sidebar-w: 256px;
  --page-w: 840px;      /* inclusief de zijmarges van de pagina */
  --page-pad: 40px;
  --font: var(--font-tekst);
  --mono: var(--font-label);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gray-400); transition: text-decoration-color .15s var(--ease); }
a:hover { text-decoration-color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-kop); font-stretch: 112%; color: var(--heading); line-height: 1.05; font-weight: 600; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); font-size: 13px; }
a.muted { text-decoration: none; }
a.muted:hover { color: var(--text); text-decoration: underline; }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.with-icon svg { width: 14px; height: 14px; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; border-radius: 4px; }
svg { stroke: currentColor; }
.sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); vertical-align: middle; margin: 0 6px; }
/* Labels, nummers en stappen in Geist Mono (huisstijl). Nooit voor koppen of lopende tekst. */
.eyebrow, .nav-label, .row-kind, .toc .label, .fase-num, .step-num, .step-dot, .subnav-count, .fase-count, .tab-n { font-family: var(--font-label); }

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

/* App-shell: zijbalk links, inhoud rechts. */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: var(--s-4) var(--s-3);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-kop); font-stretch: 112%; font-weight: 600; font-size: 14px; color: var(--heading); text-decoration: none; padding: 6px 8px; letter-spacing: -.01em; }
.brand img { display: block; border-radius: 6px; }
.nav { display: flex; flex-direction: column; gap: var(--s-5); margin-top: var(--s-6); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { display: block; padding: 0 10px; margin-bottom: 4px; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.nav a, .nav-row > a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 14px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a > svg { width: 16px; height: 16px; flex: 0 0 16px; }
.nav a:hover { background: var(--gray-200); color: var(--text); }
.nav a.active { background: var(--white); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }
.nav-row { display: flex; align-items: center; gap: 2px; border-radius: var(--radius-sm); }
.nav-row > a { flex: 1; min-width: 0; }
.nav-row.active { background: var(--white); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }
.nav-row.active > a { color: var(--text); }
.nav-row.active > a:hover { background: transparent; }
.nav-toggle { height: 28px; width: 28px; padding: 0; margin-right: 4px; background: transparent; border-color: transparent; color: var(--text-muted); border-radius: 6px; flex: 0 0 28px; }
.nav-toggle:hover { background: var(--gray-200); border-color: transparent; color: var(--text); }
.nav-toggle svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.nav-toggle.open svg { transform: rotate(180deg); }
.subnav { margin: 4px 0 2px; padding: 0 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.subnav[hidden] { display: none; }
.subnav-group ol { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.subnav a { padding: 4px 8px; font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.subnav a.subnav-fase { font-weight: 500; color: var(--text); justify-content: space-between; padding: 5px 8px; }
.subnav a.subnav-fase.active { background: var(--white); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }
.subnav-count { font-size: 11px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.subnav a.done { color: var(--text-muted); }
.subnav a.done .step-dot { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.subnav a.done .step-dot svg { width: 10px; height: 10px; stroke-width: 3; }
.step-dot {
  display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border-strong); font-size: 10px; font-weight: 600; color: var(--text-secondary); background: var(--white);
  font-variant-numeric: tabular-nums;
}
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: var(--s-3); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-width: 0; text-decoration: none; border-radius: var(--radius-sm); transition: background .15s var(--ease); }
.sidebar-user:hover { background: var(--gray-200); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--black); color: var(--on-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: 0 0 28px;
}
.sidebar-user .who { min-width: 0; line-height: 1.3; }
.sidebar-user .who strong { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .who span { display: block; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar, .mobile-nav { display: none; }
main.page { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: var(--s-10) var(--page-pad) 96px; }

/* Paginakop en secties */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-8); }
.page-header h1 { margin: 0; font-size: 24px; }
.page-header .subtitle { margin: 8px 0 0; color: var(--text-secondary); font-size: 15px; max-width: 60ch; line-height: 1.55; }
.page-actions { display: flex; gap: var(--s-2); flex-shrink: 0; }
.section { margin-top: var(--s-12); }
.section-head { margin-bottom: var(--s-4); }
.section-head h2 { margin-bottom: 4px; font-size: 18px; }
.section-head .muted { margin: 0; font-size: 14px; max-width: 60ch; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.eyebrow { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 0 0 4px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-muted); font-size: 13px; margin: 0 0 var(--s-5); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 14px; height: 14px; stroke: var(--gray-400); }
.contact { margin: 8px 0 0; }

/* Kaarten */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 14px var(--s-5); border-bottom: 1px solid var(--border); }
.card-header h2 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.card-header h2 a { text-decoration: none; }
.card-header h2 a:hover { text-decoration: underline; }
.card-header .muted { white-space: nowrap; }
.card-body { padding: var(--s-5); }
.card-body > :last-child { margin-bottom: 0; }
.card-footer { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.card-footer form { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }

/* Knoppen */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; text-decoration: none;
  background: var(--black); color: var(--on-dark); border: 1px solid var(--black);
  padding: 0 14px; height: 36px; border-radius: var(--radius-sm); white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.button:hover, button:hover { background: var(--gray-800); border-color: var(--gray-800); color: var(--on-dark); }
.button:active, button:active { transform: translateY(1px); }
.button.secondary, button.secondary { background: var(--white); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.button.secondary:hover, button.secondary:hover { background: var(--gray-50); color: var(--text); border-color: var(--gray-400); }
.button.ghost, button.ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.button.ghost:hover, button.ghost:hover { background: var(--gray-100); color: var(--text); border-color: transparent; }
.button.link, button.link { background: none; border: 0; color: var(--text-muted); padding: 0; height: auto; font-weight: 400; text-decoration: underline; text-underline-offset: 2px; }
.button.link:hover, button.link:hover { background: none; color: var(--text); }
.button.danger, button.danger { background: var(--white); color: #b42318; border-color: #f0b8b1; box-shadow: var(--shadow-sm); }
.button.danger:hover, button.danger:hover { background: #fef3f2; color: #912018; border-color: #e58b80; }
.danger-zone { border-color: #f0b8b1; }
.button.block { width: 100%; }
.button.small, button.small { height: 32px; padding: 0 12px; font-size: 13px; }
.button svg, button svg { width: 16px; height: 16px; }

/* Formulieren */
form label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
input[type="email"], input[type="text"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 14px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-bottom: 14px;
  background: var(--white); color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder { color: var(--gray-400); }
input[type="email"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="date"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--ring); }
select { padding-right: 32px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374747d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
textarea { height: auto; padding: 8px 12px; line-height: 1.5; resize: vertical; }
.field { margin-bottom: 14px; }
.field input, .field select, .field textarea { margin-bottom: 0; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.form-row .field { margin: 0; min-width: 140px; }
.form-row .field.grow { flex: 1 1 200px; }
.form-row .field.full { flex: 1 1 100%; }
.flash { margin: 0 0 var(--s-4); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--gray-50); font-size: 13px; }
.error { color: var(--text); background: var(--gray-100); border: 1px solid var(--border); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
input[type="checkbox"] { accent-color: var(--black); }

/* Labels en nummers */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500; line-height: 1; vertical-align: middle; text-decoration: none; white-space: nowrap;
  background: var(--gray-100); color: var(--text-secondary); border: 1px solid var(--border);
}
.badge.dark { background: var(--black); color: var(--on-dark); border-color: var(--black); }
a.badge-link:hover { text-decoration: underline; }
.step-num {
  display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border-strong); background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.step-num.small { width: 22px; height: 22px; flex-basis: 22px; font-size: 11px; }
.step-num svg { width: 14px; height: 14px; stroke-width: 2.5; }

/* Meldingen (kaart met tekst links en knop rechts) */
.notice { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 16px var(--s-5); }
.notice .label { margin: 0; font-size: 12px; color: var(--text-muted); }
.notice .title { margin: 2px 0 0; font-weight: 500; }
.notice .title a { text-decoration: none; }
.notice .title a:hover { text-decoration: underline; }
.notice.compat, .notice.pending { align-items: flex-start; }
.notice-text { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; }
.notice-text:empty { display: none; }

/* Rijen in een kaart (handleidingen, onderdelen van een stap) */
.rows { list-style: none; margin: 0; padding: 0; }
.row + .row { border-top: 1px solid var(--border); }
.row-link { display: flex; align-items: center; gap: var(--s-4); padding: 14px var(--s-5); text-decoration: none; color: inherit; transition: background .15s var(--ease); }
a.row-link:hover { background: var(--gray-50); }
.row-main { flex: 1; min-width: 0; }
.row-kind { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); margin-bottom: 2px; }
.row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 500; }
.row-summary { display: block; color: var(--text-secondary); margin-top: 2px; font-size: 13px; }
.row-summary a { color: var(--text); }
.row-meta { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.row-prompt { display: block; margin-top: 6px; font-size: 13px; font-style: italic; color: var(--text-secondary); }
.row-link > svg { width: 16px; height: 16px; stroke: var(--gray-400); flex: 0 0 16px; transition: transform .15s var(--ease), stroke .15s var(--ease); }
a.row-link:hover > svg { stroke: var(--text); transform: translateX(2px); }
.row-n {
  display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--gray-100); border: 1px solid var(--border); font-size: 11px; font-weight: 600; color: var(--text-secondary);
}
.rows .empty { padding: var(--s-5); color: var(--text-muted); font-size: 13px; }

/* Routekaart: voortgang */
.progress { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); padding: var(--s-6); }
.progress-main { flex: 1; min-width: 0; }
.progress .label { margin: 0; font-size: 12px; color: var(--text-muted); }
.progress .title { margin: 2px 0 14px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.bar { height: 6px; border-radius: 999px; background: var(--gray-100); border: 1px solid var(--border); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--black); border-radius: 999px; transition: width .4s var(--ease); }
.progress .notice-text { margin-top: 12px; }
.progress .button { flex-shrink: 0; }

/* Routekaart: fases met hun stappen */
.fase-head { display: flex; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-4); }
.fase-num { display: inline-flex; width: 36px; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--black); color: var(--on-dark); font-size: 14px; font-weight: 600; margin-top: 2px; }
.fase-head-main { flex: 1; min-width: 0; }
.fase-head h2 { font-size: 19px; margin-bottom: 4px; }
.fase-head h2 a { text-decoration: none; }
.fase-head h2 a:hover { text-decoration: underline; }
.fase-head .muted { margin: 0; font-size: 14px; max-width: 60ch; }
.fase-count { font-size: 13px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 10px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step-row { display: flex; align-items: stretch; transition: background .15s var(--ease); }
.step-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.step-row + .step-row { border-top: 1px solid var(--border); }
.step-row:hover { background: var(--gray-50); }
.step-check { display: flex; align-items: center; padding: 0 0 0 var(--s-5); margin: 0; }
.step-check input[type="checkbox"] { width: 20px; height: 20px; margin: 0; cursor: pointer; }
.step-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-4); padding: 16px var(--s-5) 16px var(--s-4); text-decoration: none; color: inherit; }
.step-link > svg { width: 16px; height: 16px; stroke: var(--gray-400); flex: 0 0 16px; transition: transform .15s var(--ease), stroke .15s var(--ease); }
.step-row:hover .step-link > svg { stroke: var(--text); transform: translateX(2px); }
.step-row.done .step-num { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.step-row.done .row-title { color: var(--text-secondary); }

/* Fasepagina: de stappen als secties */
.facts-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; margin: var(--s-7) 0 0; padding: var(--s-5) 0 0; border-top: 1px solid var(--border); font-size: 14px; }
.facts-inline dt { color: var(--text-muted); }
.facts-inline dd { margin: 0; color: var(--text); }
.stap { margin-top: var(--s-12); padding-top: var(--s-10); border-top: 1px solid var(--border); scroll-margin-top: var(--s-6); }
.stap-head { display: flex; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-5); }
.stap-head .step-num { width: 36px; height: 36px; flex-basis: 36px; font-size: 14px; margin-top: 2px; }
.stap-head h2 { font-size: 22px; margin-bottom: 6px; }
.stap-summary { margin: 0; color: var(--text-secondary); font-size: 15px; max-width: 60ch; }
.stap.is-done .step-num { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.stap-items { margin-top: var(--s-6); }
.klaar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding: 16px var(--s-5); margin-top: var(--s-4); }
.klaar .label { margin: 0 0 2px; font-size: 12px; color: var(--text-muted); }
.klaar .title { margin: 0; font-size: 14px; font-weight: 500; }
.klaar.is-done { background: var(--gray-50); }
.klaar-text { flex: 1; min-width: 0; }
.done-form { margin: 0; flex-shrink: 0; }

/* Teruglink en pager */
.back-link { display: flex; align-items: center; gap: 12px; padding: 14px var(--s-5); text-decoration: none; transition: background .15s var(--ease); }
.back-link:hover { background: var(--gray-50); }
.back-link svg { width: 16px; height: 16px; stroke: var(--gray-400); flex: 0 0 16px; }
.back-link small { display: block; font-size: 12px; color: var(--text-muted); }
.back-link strong { font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-10); }
.pager-link { display: flex; align-items: center; gap: 12px; padding: 14px var(--s-4); text-decoration: none; transition: background .15s var(--ease); }
.pager-link:hover { background: var(--gray-50); }
.pager-link.next { justify-content: flex-end; text-align: right; }
.pager-link svg { width: 16px; height: 16px; stroke: var(--gray-400); flex: 0 0 16px; }
.pager-link:hover svg { stroke: var(--text); }
.pager-link small { display: block; font-size: 12px; color: var(--text-muted); }
.pager-link strong { font-weight: 500; }

/* Artikelen (fase, handleiding, skill) */
.article-head { margin-bottom: var(--s-7); }
.article h1 { font-size: 28px; margin-bottom: 10px; }
.article .lead { font-size: 16px; color: var(--text-secondary); margin: 0; max-width: 60ch; line-height: 1.55; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 var(--s-7); border-radius: var(--radius-lg); overflow: hidden; background: var(--black); border: 1px solid var(--border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-10); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.article-footer code { font-family: var(--mono); font-size: 12px; background: var(--gray-100); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; }

/* Inhoudsopgave in de marge van artikelen */
main.page.has-toc { max-width: calc(var(--page-w) + 260px); }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 0 60px; align-items: start; }
.article-wrap > .article-main { grid-column: 1; grid-row: 1; min-width: 0; }
.toc { grid-column: 2; grid-row: 1; position: sticky; top: var(--s-10); font-size: 13px; }
.toc .label { margin: 0 0 8px; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-muted); text-decoration: none; line-height: 1.4; transition: color .15s var(--ease), border-color .15s var(--ease); }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--black); font-weight: 500; }
.prose h2, .prose h3, .section { scroll-margin-top: var(--s-6); }

/* Lopende tekst uit Markdown */
.prose { font-size: 16px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 19px; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 16px; margin: 1.6em 0 .4em; }
.prose p { margin: 0 0 1em; }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.prose blockquote { margin: 1em 0; padding: 2px 16px; border-left: 2px solid var(--black); color: var(--text-secondary); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--gray-100); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--gray-900); color: var(--gray-100); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 1.2em; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 13px; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; margin: 0; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 500; color: var(--text-secondary); font-size: 13px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* Checklists: aanvinkbaar en onthouden */
.prose li.check { list-style: none; margin-left: -1.4em; display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.prose li.check + li.check { border-top: 1px solid var(--gray-100); }
.prose li.check input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 18px; cursor: pointer; }
.prose li.check label { flex: 1; cursor: pointer; font-weight: 400; font-size: inherit; margin: 0; transition: color .15s var(--ease); }
.prose li.check.is-done label { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--gray-400); }

/* Blokken: een balkje dat een venster opent */
.blok { margin: 0 0 var(--s-3); }
.blok + .blok { margin-top: calc(-1 * var(--s-3) + 8px); }
.prose .blok + p, .prose .blok + h2, .prose .blok + h3 { margin-top: var(--s-6); }
.blok-bar {
  width: 100%; height: auto; justify-content: space-between; text-align: left;
  background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 12px 14px 12px 16px; font-weight: 400; white-space: normal; line-height: 1.4;
}
.blok-bar:hover { background: var(--gray-50); border-color: var(--border-strong); color: var(--text); }
.blok-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.blok-main strong { font-weight: 500; font-size: 15px; }
.blok-main span { font-size: 13px; color: var(--text-secondary); }
.blok-cta { flex-shrink: 0; margin-left: 16px; font-size: 13px; font-weight: 500; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--white); transition: background .15s var(--ease), color .15s var(--ease); }
.blok-bar:hover .blok-cta { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.blok-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text); }
.blok-dialog::backdrop { background: rgba(15, 58, 68, .4); }
.blok-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 14px var(--s-6); border-bottom: 1px solid var(--border); background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.blok-dialog-head h2 { margin: 0; font-size: 16px; }
.blok-dialog-head form { margin: 0; }
.blok-dialog-body { padding: var(--s-6); font-size: 15px; }
.blok-dialog-body > :first-child { margin-top: 0; }
.blok-dialog-body h2 { font-size: 16px; }
.blok-dialog-body h3 { font-size: 15px; }

/* Skills */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step3 { display: flex; gap: 12px; padding: var(--s-4) var(--s-5); font-size: 13px; }
.step3 + .step3 { border-left: 1px solid var(--border); }
.step3 strong { display: block; font-weight: 500; margin-bottom: 2px; }
.step3 span:not(.step-num) { color: var(--text-secondary); }
.skill-card { display: flex; flex-direction: column; }
.skill-card-body { padding: 18px var(--s-5); flex: 1; }
.skill-card h3 { font-size: 16px; margin-bottom: 4px; }
.skill-card h3 a { text-decoration: none; }
.skill-card h3 a:hover { text-decoration: underline; }
.skill-summary { color: var(--text-secondary); margin-bottom: 14px; }
.skill-card-footer { justify-content: space-between; }
.prompt { position: relative; background: var(--gray-50); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; }
.prompt-label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.prompt-text { margin: 0; font-size: 14px; font-weight: 500; font-style: italic; }
.prompt button { position: absolute; top: 10px; right: 10px; }
.prompt button.copied { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.skill-start { margin-bottom: var(--s-7); }
.skill-start .prompt { margin-top: 4px; }
.skill-start .prompt .prompt-text { padding-right: 110px; font-size: 15px; }
.skill-start h2 { margin-bottom: 2px; }
.skill-start .muted { margin-bottom: 12px; }

/* Tabs (prompts, vragen, beheer) */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--border); margin-bottom: var(--s-6); overflow-x: auto; overflow-y: hidden; }
.tab { padding: 8px 12px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 13px; white-space: nowrap; transition: color .15s var(--ease); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--black); }
.tabs.wrap { flex-wrap: wrap; overflow: visible; gap: 2px 0; }
.tab .tab-n { display: inline-block; min-width: 18px; margin-right: 6px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border); font-size: 11px; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tab.active .tab-n { background: var(--black); color: var(--on-dark); border-color: var(--black); }

/* Vragen (uitklapbaar) en updates */
.qa { padding: var(--s-5); }
.qa h2 { margin-bottom: 2px; font-size: 15px; }
.qa .row-meta { margin: 0 0 12px; }
.qa .prose { font-size: 15px; }
details.qa { padding: 0; }
details.qa summary { list-style: none; display: flex; align-items: center; gap: var(--s-4); padding: 16px var(--s-5); cursor: pointer; border-radius: var(--radius-lg); transition: background .15s var(--ease); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary:hover { background: var(--gray-50); }
details.qa[open] summary { border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 1px solid var(--border); }
details.qa .qa-main { flex: 1; min-width: 0; }
details.qa .qa-title { display: block; font-weight: 500; font-size: 15px; }
details.qa .qa-main .row-meta { margin: 2px 0 0; }
details.qa summary > svg { width: 16px; height: 16px; stroke: var(--gray-400); flex: 0 0 16px; transition: transform .2s var(--ease), stroke .15s var(--ease); }
details.qa summary:hover > svg { stroke: var(--text); }
details.qa[open] summary > svg { transform: rotate(180deg); }
details.qa .qa-body { padding: var(--s-5); }

/* Promptbibliotheek */
.prompt-group-head { margin-bottom: var(--s-4); }
.prompt-group-head h2 { font-size: 20px; }
.prompt-intro { margin: 0 0 var(--s-5); }
.prompt-index { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 var(--s-5); font-size: 13px; }
.prompt-index a { text-decoration: none; color: var(--text-secondary); }
.prompt-index a:hover { color: var(--text); text-decoration: underline; }
.prompt-index a .muted { font-size: 12px; }
.prompt-card { scroll-margin-top: 16px; }
.prompt-card-head { padding: 18px var(--s-5) 14px; }
.prompt-card h3 { font-size: 16px; margin-bottom: 8px; }
.prompt-card h3 a { text-decoration: none; }
.prompt-card h3 a:hover { text-decoration: underline; }
.prompt-meta { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.prompt-meta div { display: flex; gap: 8px; }
.prompt-meta dt { flex: 0 0 110px; color: var(--text-muted); }
.prompt-meta dd { margin: 0; color: var(--text-secondary); }
.prompt-block { position: relative; margin: 0 var(--s-5); background: var(--gray-50); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.prompt-block pre { margin: 0; padding: 14px 16px; padding-right: 120px; font-family: inherit; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-block mark { background: var(--gray-200); color: var(--text); padding: 0 3px; border-radius: 3px; font-weight: 500; }
.prompt-block button { position: absolute; top: 10px; right: 10px; }
.prompt-block button.copied { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.prompt-note { padding: 12px var(--s-5) 16px; font-size: 13px; }
.prompt-note > :last-child { margin-bottom: 0; }
.prompt-card > .prompt-block:last-child { margin-bottom: var(--s-5); }
.prompt-list { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.prompt-list a { color: var(--text-secondary); text-decoration: none; }
.prompt-list a:hover { color: var(--text); text-decoration: underline; }
.prompt-list li.muted { font-size: 12px; }
.article .prompt-intro { margin-bottom: var(--s-6); }
/* Een ```prompt blok in een artikel: zelfde kaart als in de bibliotheek, in de tekstkolom. */
.prose .prompt-block { margin: 0 0 1.2em; }
.prose .prompt-block pre { background: transparent; color: var(--text); font-family: inherit; font-size: 15px; padding: 14px 16px; padding-right: 120px; border-radius: 0; margin: 0; }
.blok-dialog-body .prompt-block pre { font-size: 14px; }

/* Account: feitenlijst in rijen */
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; padding: 12px var(--s-5); align-items: baseline; }
.facts > div + div { border-top: 1px solid var(--border); }
.facts dt { color: var(--text-muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 500; }

/* Vragenuur */
.meet .card-body .label { margin: 0 0 2px; font-size: 12px; color: var(--text-muted); }
.meet-when { font-size: 18px; font-weight: 600; margin: 0 0 var(--s-4); letter-spacing: -.01em; }
.meet-hint { margin: 10px 0 0; }
.meet .card-footer.notice { display: block; padding: 14px var(--s-5); }
.meet .card-footer .notice-text { margin-top: 4px; }

/* Pagina's zonder zijbalk (inloggen, verlopen, meldingen) */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-10) var(--s-4); background: var(--bg-subtle); }
.auth .brand { margin-bottom: var(--s-5); font-size: 15px; }
.auth .card { width: 100%; max-width: 400px; box-shadow: var(--shadow-md); }
.auth .card-body { padding: var(--s-7); }
.auth h1 { font-size: 18px; margin-bottom: 6px; }
.auth p { color: var(--text-secondary); }
.auth form { margin-top: var(--s-4); }
.auth .foot { margin-top: var(--s-4); font-size: 13px; color: var(--text-muted); text-align: center; }

/* Beheer */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.stat { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.admin-grid .card { display: flex; flex-direction: column; }
.card-note { margin: 0; padding: 0 var(--s-5) 14px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.data th, table.data td { text-align: left; padding: 10px var(--s-5); border-top: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
table.data th { border-top: 0; font-weight: 500; color: var(--text-muted); font-size: 12px; }
table.data tr:hover td { background: var(--gray-50); }
.cell-main { font-weight: 500; text-decoration: none; }
.cell-main:hover { text-decoration: underline; }
.cell-sub { display: block; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.cell-action { text-align: right; }
.cell-action .button svg { width: 14px; height: 14px; }
.border-top { border-top: 1px solid var(--border); }
.row-flex { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--s-5); }
.row-flex .row-title a { text-decoration: none; }
.row-flex .row-title a:hover { text-decoration: underline; }
.row-flex form { margin: 0; }
.loginlink .title code { font-family: var(--mono); font-size: 12px; word-break: break-all; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }
.loginlink button.copied { background: var(--black); color: var(--on-dark); border-color: var(--black); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li + li { border-top: 1px solid var(--border); }
.checklist label { display: flex; align-items: center; gap: 14px; padding: 12px var(--s-5); margin: 0; font-weight: 400; font-size: 14px; cursor: pointer; }
.checklist label:hover { background: var(--gray-50); }
.checklist input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; }
.checklist .check-main { flex: 1; min-width: 0; }
.checklist .check-main > span:first-child { display: block; font-weight: 500; }
.checklist .inactive label { color: var(--text-muted); }
.checklist .badge { flex-shrink: 0; }

/* Mobiel: zijbalk wordt een bovenbalk met uitklapmenu */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--white); position: sticky; top: 0; z-index: 10; }
  .topbar .menu-toggle { background: none; border: 1px solid var(--border-strong); color: var(--text); width: 36px; padding: 0; box-shadow: var(--shadow-sm); }
  .topbar .menu-toggle:hover { background: var(--gray-50); }
  .mobile-nav { display: none; border-bottom: 1px solid var(--border); background: var(--bg-sidebar); padding: 8px 12px 12px; }
  .mobile-nav.open { display: block; }
  .mobile-nav .nav { margin-top: 0; }
  main.page { padding: var(--s-6) var(--s-4) 64px; }
  .page-header { flex-direction: column; margin-bottom: var(--s-6); }
  .page-header h1 { font-size: 22px; }
  .page-actions { width: 100%; flex-wrap: wrap; }
  .section { margin-top: var(--s-10); }
  .grid-2, .steps3 { grid-template-columns: 1fr; }
  .step3 + .step3 { border-left: 0; border-top: 1px solid var(--border); }
  .progress, .klaar { flex-direction: column; align-items: stretch; }
  .notice { flex-direction: column; align-items: flex-start; }
  .notice .button { align-self: flex-start; }
  .fase-count { display: none; }
  .facts-inline { grid-template-columns: 1fr; gap: 2px 0; }
  .facts-inline dd { margin-bottom: 10px; }
  .stap { margin-top: var(--s-10); padding-top: var(--s-8); }
  .stap-head h2 { font-size: 20px; }
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat-n { font-size: 18px; }
  .form-row .field { flex: 1 1 100%; }
  table.data th, table.data td { padding: 10px 16px; }
  .checklist label, .row-flex { padding: 12px 16px; }
  .pager { grid-template-columns: 1fr; }
  .skill-start .prompt .prompt-text { padding-right: 0; margin-bottom: 36px; }
  .prompt button { top: auto; bottom: 10px; }
  .prompt-block pre { padding-right: 16px; padding-bottom: 52px; }
  .prompt-block button { top: auto; bottom: 10px; }
  .prompt-meta div { flex-direction: column; gap: 0; }
  .prompt-meta dt { flex-basis: auto; }
  .prompt-card-head { padding: 16px 16px 12px; }
  .prompt-block { margin: 0 16px; }
  .prose .prompt-block { margin: 0 0 1.2em; }
  .prose .prompt-block pre { padding-right: 16px; padding-bottom: 52px; }
  .prompt-note { padding: 12px 16px 16px; }
  details.qa summary, details.qa .qa-body { padding-left: 16px; padding-right: 16px; }
  .prompt-card > .prompt-block:last-child { margin-bottom: 16px; }
  .article h1 { font-size: 23px; }
  .prose { font-size: 15px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .card-body, .card-header, .card-footer, .qa, .row-link, .notice, .progress, .klaar, .back-link { padding-left: 16px; padding-right: 16px; }
  .step-check { padding-left: 16px; }
  .step-link { padding-right: 16px; }
  .auth .card-body { padding: 24px 20px; }
  .blok-dialog-head, .blok-dialog-body { padding-left: 16px; padding-right: 16px; }
}

/* Smaller dan de breedte met marge: inhoudsopgave boven het artikel */
@media (max-width: 1180px) {
  .article-wrap { display: block; }
  .toc { position: static; margin: 0 0 var(--s-6); padding: 14px var(--s-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--gray-50); }
  .toc ol { border-left: 0; columns: 2; column-gap: 24px; }
  .toc a { padding: 3px 0; margin: 0; border: 0; break-inside: avoid; }
  .toc a.active { border: 0; }
}
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* Vragenuur Plus onderin de kaart van het vragenuur. */
.plus-notice { padding: 0; width: 100%; }
