/* ===========================================================
   AIGP Zelfstudie — gedeelde stylesheet
   Lichte, statische site. Geen build-stap nodig.
   =========================================================== */

:root {
  /* Basis */
  --bg: #0f1419;
  --bg-soft: #161c24;
  --bg-card: #1c232e;
  --bg-card-hover: #232c39;
  --border: #2b3543;
  --text: #e6edf3;
  --text-soft: #9fb0c0;
  --text-dim: #6b7c8e;
  --white: #ffffff;

  /* Accent */
  --accent: #5e9eff;
  --accent-soft: rgba(94, 158, 255, 0.12);

  /* Domein-kleuren */
  --d1: #5e9eff; /* Foundations - blauw */
  --d2: #b388ff; /* Laws - paars */
  --d3: #4dd0a7; /* Development - groen */
  --d4: #ffab5e; /* Deployment - oranje */

  --d1-soft: rgba(94, 158, 255, 0.14);
  --d2-soft: rgba(179, 136, 255, 0.14);
  --d3-soft: rgba(77, 208, 167, 0.14);
  --d4-soft: rgba(255, 171, 94, 0.14);

  --ok: #4dd0a7;
  --bad: #ff7a7a;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #1a2433 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(15, 20, 25, 0.82);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 16px;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--white); font-size: 1.02rem;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--d1), var(--d2));
  display: grid; place-items: center; font-size: 0.82rem; font-weight: 800; color: #0f1419;
}
.topbar nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--text-soft); padding: 7px 12px; border-radius: 8px; font-size: 0.9rem;
}
.topbar nav a:hover { background: var(--bg-card); color: var(--white); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 34px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  color: var(--accent); font-weight: 700; margin-bottom: 12px;
}
.hero h1 { font-size: 2.5rem; line-height: 1.12; margin: 0 0 14px; color: var(--white); }
.hero p.lead { font-size: 1.12rem; color: var(--text-soft); max-width: 640px; margin: 0; }

/* ---------- Sectie ---------- */
section.block { padding: 30px 0; }
.section-title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--text-dim); font-weight: 700; margin: 0 0 16px;
}
h2 { font-size: 1.6rem; color: var(--white); margin: 0 0 6px; }
h3 { font-size: 1.18rem; color: var(--white); margin: 26px 0 10px; }
p { color: var(--text-soft); }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { transform: translateY(-3px); background: var(--bg-card-hover); border-color: #38465a; text-decoration: none; }

/* Domein-card */
.domain-card { position: relative; overflow: hidden; }
.domain-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c, var(--accent));
}
.domain-card .badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--c, var(--accent)); margin-bottom: 10px;
}
.domain-card .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); }
.domain-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.domain-card p { margin: 0; font-size: 0.92rem; color: var(--text-soft); }
.domain-card .weight {
  position: absolute; top: 16px; right: 18px;
  font-size: 1.5rem; font-weight: 800; color: var(--c, var(--accent)); opacity: 0.9;
}

.d1 { --c: var(--d1); }
.d2 { --c: var(--d2); }
.d3 { --c: var(--d3); }
.d4 { --c: var(--d4); }

/* ---------- Flow / pijplijn ---------- */
.flow {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  margin: 18px 0;
}
.flow-step {
  flex: 1 1 0; min-width: 150px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 3px solid var(--c, var(--accent));
  border-radius: var(--radius-sm); padding: 16px;
  position: relative; margin: 6px;
}
.flow-step .num {
  font-size: 0.7rem; font-weight: 800; color: var(--c, var(--accent)); letter-spacing: 0.08em;
}
.flow-step h4 { margin: 6px 0 6px; color: var(--white); font-size: 1rem; }
.flow-step p { margin: 0; font-size: 0.85rem; color: var(--text-soft); }
.flow-step .arrow {
  position: absolute; right: -18px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 1.3rem; z-index: 2;
}
@media (max-width: 760px) { .flow-step .arrow { display: none; } }

/* ---------- Charts ---------- */
.chart-row {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.donut-wrap { position: relative; width: 200px; height: 200px; }
.donut { transform: rotate(-90deg); width: 200px; height: 200px; }
.donut .seg { fill: none; stroke-width: 30; }
.donut .track { fill: none; stroke: var(--bg-soft); stroke-width: 30; }
.donut-center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.donut-center .big { font-size: 1.5rem; font-weight: 800; color: var(--white); line-height: 1; }
.donut-center .small { font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 12px; }
.legend-item { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center; }
.legend-item .sw { width: 14px; height: 14px; border-radius: 4px; background: var(--c, var(--accent)); }
.legend-item .lt { color: var(--text); font-size: 0.94rem; }
.legend-item .lt b { color: var(--white); }
.legend-item .lv { font-weight: 800; color: var(--c, var(--accent)); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .chart-row { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
}

.mini-donut { width: 120px; height: 120px; position: relative; }
.mini-donut svg { transform: rotate(-90deg); width: 120px; height: 120px; }
.mini-donut .track { fill: none; stroke: var(--bg-soft); stroke-width: 14; }
.mini-donut .prog { fill: none; stroke: var(--d3); stroke-width: 14; stroke-linecap: round; }
.mini-donut .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.mini-donut .lbl .v { font-size: 1.3rem; font-weight: 800; color: var(--white); }
.mini-donut .lbl .l { font-size: 0.66rem; color: var(--text-dim); }

/* ---------- Scatter-plot / matrix ---------- */
.plot {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 24px 44px 56px; margin: 16px 0;
  height: 420px;
}
.plot-area { position: relative; width: 100%; height: 100%; }
.plot-area::before, .plot-area::after { /* assen */
  content: ""; position: absolute; background: var(--border);
}
.plot-area::before { left: 0; bottom: 0; width: 100%; height: 1px; }   /* x-as */
.plot-area::after { left: 0; bottom: 0; width: 1px; height: 100%; }     /* y-as */
.plot .grid-line { position: absolute; background: rgba(43,53,67,0.45); }
.plot .grid-line.h { left: 0; width: 100%; height: 1px; }
.plot .grid-line.v { bottom: 0; height: 100%; width: 1px; }
.plot .axis-x { position: absolute; bottom: -32px; font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.04em; }
.plot .axis-y {
  position: absolute; left: -40px; top: 50%; transform: rotate(-90deg);
  font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.04em; transform-origin: center;
}
.plot .tick { position: absolute; font-size: 0.68rem; color: var(--text-dim); }
.plot .tick.x { bottom: -18px; transform: translateX(-50%); }
.plot .tick.y { left: -30px; transform: translateY(50%); }
.plot-point {
  position: absolute; transform: translate(-50%, 50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2;
}
.plot-point .pt {
  width: 16px; height: 16px; border-radius: 50%; background: var(--c, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
}
.plot-point .pl {
  font-size: 0.72rem; color: var(--text); white-space: nowrap; font-weight: 600;
  background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border);
}
@media (max-width: 600px) {
  .plot { height: 360px; padding-left: 48px; }
  .plot-point .pl { font-size: 0.64rem; }
}

/* ---------- Geneste hiërarchie ---------- */
.nest {
  border: 2px solid var(--c, var(--accent));
  border-radius: var(--radius);
  padding: 16px;
  background: var(--cs, var(--accent-soft));
  position: relative;
  margin: 6px 0;
}
.nest .nest-label {
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.05em;
  color: var(--c, var(--accent)); display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.nest .nest-desc { font-size: 0.82rem; color: var(--text-soft); margin: 0 0 10px; }
.nest .nest-inner { margin-top: 10px; }
.nest.lvl1 { --c: var(--d1); --cs: rgba(94,158,255,0.07); }
.nest.lvl2 { --c: #7bb3ff; --cs: rgba(123,179,255,0.09); }
.nest.lvl3 { --c: var(--d3); --cs: rgba(77,208,167,0.09); }
.nest.lvl4 { --c: var(--d4); --cs: rgba(255,171,94,0.10); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
thead th {
  background: var(--bg-soft); color: var(--text); text-align: left;
  padding: 12px 14px; font-weight: 700; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-soft); }
td strong, th strong { color: var(--white); }

/* ---------- Weegbalken ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 46px; align-items: center; gap: 12px; }
.bar-label { font-size: 0.9rem; color: var(--text); font-weight: 600; }
.bar-track { background: var(--bg-soft); border-radius: 99px; height: 16px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; border-radius: 99px; background: var(--c, var(--accent)); }
.bar-val { font-size: 0.85rem; color: var(--text-soft); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .bar-row { grid-template-columns: 110px 1fr 42px; } .bar-label { font-size: 0.8rem; } }

/* ---------- Stat tegels ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.stat .v { font-size: 1.7rem; font-weight: 800; color: var(--white); }
.stat .l { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }

/* ---------- Curriculum / leslijst ---------- */
.curriculum { display: grid; gap: 20px; }
.dom-group {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card);
}
.dom-group .dom-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  border-left: 5px solid var(--c, var(--accent)); background: var(--bg-soft);
}
.dom-group .dom-head .dom-w { margin-left: auto; font-weight: 800; color: var(--c, var(--accent)); }
.dom-group .dom-head h3 { margin: 0; color: var(--white); font-size: 1.1rem; }
.dom-group .dom-head .cnt { font-size: 0.78rem; color: var(--text-dim); }
.subgroup { padding: 6px 0; }
.subgroup .sub-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); font-weight: 700; padding: 12px 18px 4px;
}
.lec {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px; font-size: 0.9rem; color: var(--text-soft);
  border-top: 1px solid rgba(43,53,67,0.5);
}
.lec:first-child { border-top: none; }
a.lec { text-decoration: none; }
a.lec:hover { background: var(--bg-soft); text-decoration: none; }
.lec .st {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 800;
}
.lec.done .st { background: var(--ok); color: #0f1419; }
.lec.done .lec-title { color: var(--white); }
.lec.todo .st { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); }
.lec.quiz-row .st { background: var(--d2-soft); color: var(--d2); border: 1px solid var(--d2); }
.lec .lec-title { flex: 1; }
.lec .lec-meta { font-size: 0.76rem; color: var(--text-dim); }
.lec.done .lec-title::after { content: " ↗"; color: var(--ok); font-size: 0.8rem; }

/* ---------- Callout ---------- */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px; margin: 18px 0; color: var(--text);
}
.callout.tip { border-color: var(--d3); background: var(--d3-soft); }
.callout.warn { border-color: var(--d4); background: var(--d4-soft); }
.callout strong { color: var(--white); }
.callout .tag { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- Glossary ---------- */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.term {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.term dt { font-weight: 700; color: var(--white); margin-bottom: 4px; }
.term dd { margin: 0; font-size: 0.88rem; color: var(--text-soft); }

/* ---------- Quiz ---------- */
.quiz { display: flex; flex-direction: column; gap: 18px; }
.q {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.q .q-num { font-size: 0.74rem; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; }
.q .q-text { font-weight: 600; color: var(--white); margin: 6px 0 14px; font-size: 1.02rem; }
.q .opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease;
}
.opt:hover { border-color: #44546a; }
.opt .mark {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-dim);
  flex-shrink: 0; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
  color: transparent;
}
.opt .opt-text { font-size: 0.92rem; color: var(--text); }
.opt.correct { border-color: var(--ok); background: rgba(77, 208, 167, 0.12); }
.opt.correct .mark { border-color: var(--ok); background: var(--ok); color: #0f1419; }
.opt.wrong { border-color: var(--bad); background: rgba(255, 122, 122, 0.1); }
.opt.wrong .mark { border-color: var(--bad); background: var(--bad); color: #0f1419; }
.opt.disabled { cursor: default; }
.explain {
  margin-top: 13px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 0.88rem; color: var(--text-soft); display: none;
}
.explain.show { display: block; }
.explain strong { color: var(--white); }

/* ---------- Lesson header ---------- */
.lesson-head { padding: 40px 0 10px; }
.lesson-head .crumbs { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 12px; }
.lesson-head .crumbs a { color: var(--text-soft); }
.lesson-head h1 { font-size: 2.1rem; margin: 0 0 8px; color: var(--white); }
.lesson-head .sub { color: var(--text-soft); font-size: 1.02rem; }
.pill {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 99px; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-soft); margin-right: 6px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border); margin-top: 50px; padding: 26px 0 50px;
  color: var(--text-dim); font-size: 0.85rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .glossary { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}
@media (max-width: 520px) {
  .grid.cols-2 { grid-template-columns: 1fr; }
}

/* ---------- Active recall (verberg & test mezelf) ---------- */
.recall { margin: 14px 0; }
.recall-btn {
  cursor: pointer; font-family: inherit; font-size: 0.8rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent); border-radius: 99px; padding: 7px 15px;
  display: inline-flex; align-items: center; gap: 7px; transition: background 0.12s ease;
}
.recall-btn:hover { background: rgba(94, 158, 255, 0.22); }
.recall.testing .recall-btn { color: var(--d4); background: var(--d4-soft); border-color: var(--d4); }
.recall-q {
  display: none; margin-top: 12px; padding: 16px 18px;
  border-radius: var(--radius-sm); background: var(--d4-soft); border: 1px dashed var(--d4);
  color: var(--text); font-weight: 600; line-height: 1.5;
}
.recall-q .hint { display: block; font-weight: 400; font-size: 0.82rem; color: var(--text-soft); margin-top: 6px; }
.recall.testing .recall-q { display: block; }
