/* LeoCode: gedeelde huisstijl voor de kern en alle cursussen.
   Cursussen laden dit bestand met <link rel="stylesheet" href="/static/leocode.css">.
   Kleuren van een cursus komen uit course.json en worden gezet als
   --c-primair, --c-accent en --c-zacht op een element. */

@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/static/fonts/courier-prime-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/static/fonts/courier-prime-latin-700-normal.woff2") format("woff2"); }

:root {
  --leo-inkt: #1C1C1C;
  --leo-grond: #D7DADF;
  --leo-papier: #FFFFFF;
  --leo-grijs: #4A4F57;
  --leo-lijn: #A9AEB6;
  --leo-vlak: #F1F2F4;
  --leo-invoer: #1F4FD1;
  --leo-fout: #A3231B;
  --leo-goed: #1E6B3A;
  --leo-schaduw: 0 1px 3px rgba(0,0,0,.18);
  --leo-sans: "Atkinson Hyperlegible", Verdana, sans-serif;
  --leo-mono: "Courier Prime", "Courier New", monospace;
  --c-primair: #1C1C1C;
  --c-accent: #FFFFFF;
  --c-zacht: #D7DADF;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--leo-grond); color: var(--leo-inkt); font-family: var(--leo-sans); font-size: 17px; line-height: 1.5; }
a { color: inherit; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--leo-invoer); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; }
.mono { font-family: var(--leo-mono); }
.grijs { color: var(--leo-grijs); }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.leo-wrap { max-width: 1160px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.leo-wrap.smal { max-width: 980px; }
.leo-blad { background: var(--leo-papier); box-shadow: var(--leo-schaduw); padding: 36px 44px; }
@media (max-width: 640px) { .leo-blad { padding: 24px 20px; } .leo-wrap { padding: 16px 12px 40px; } }

/* Merk: "Leo" in een blokje + rest */
.leo-merk { font: 700 30px/1 var(--leo-mono); display: inline-flex; align-items: center; gap: 3px; text-decoration: none; }
.leo-merk > span:first-child { background: var(--c-primair); color: var(--c-accent); padding: 2px 8px; }
.leo-merk.omgekeerd > span:first-child { background: var(--c-accent); color: var(--c-primair); }
.leo-merk.groot { font-size: 52px; }
.leo-merk.middel { font-size: 40px; }
.leo-merk.klein { font-size: 24px; }

/* Bovenbalk */
.leo-balk { background: var(--leo-papier); box-shadow: var(--leo-schaduw); padding: 14px 28px; display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: center; }
.leo-balk .links, .leo-balk nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.leo-balk nav { font-size: 15px; gap: 20px; }
.leo-balk nav a { text-decoration: none; }
.leo-balk nav a:hover { text-decoration: underline; }
.leo-balk .scheiding { color: var(--leo-lijn); }
.leo-kop { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid var(--leo-inkt); padding-bottom: 10px; font-size: 14px; }

/* Knoppen */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: 700 16px var(--leo-sans); border: 2px solid var(--leo-inkt); background: var(--leo-papier); color: var(--leo-inkt);
  cursor: pointer; text-decoration: none; }
.knop:hover { text-decoration: underline; }
.knop.vol { background: var(--c-primair); border-color: var(--c-primair); color: #FFFFFF; }
.knop.inkt { background: var(--leo-inkt); border-color: var(--leo-inkt); color: #FFFFFF; }
.knop.groot { min-height: 52px; font-size: 17px; }
.knop.klein { min-height: 44px; padding: 0 14px; font-size: 15px; }
.knop.breed { display: flex; width: 100%; }
.knop[disabled], .knop.uit { border: 2px dashed var(--leo-lijn); color: var(--leo-grijs); background: var(--leo-papier); cursor: default; text-decoration: none; }

/* Formulieren (werkbladstijl) */
.veld { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; }
.veld input, .veld select { font: 700 17px var(--leo-sans); color: var(--leo-invoer); border: 1.5px solid var(--leo-inkt); padding: 10px; background: #fff; }
.veld .hulp { font-weight: 400; font-size: 13px; color: var(--leo-grijs); }
.melding { padding: 10px 12px; background: var(--leo-vlak); font-size: 15px; color: var(--leo-grijs); }
.melding.fout { background: #FBE9E7; color: var(--leo-fout); }
.melding.goed { background: #E5F2E9; color: var(--leo-goed); }
.of { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; font-size: 14px; color: var(--leo-grijs); }
.of::before, .of::after { content: ""; flex: 1; height: 1px; background: var(--leo-lijn); }
.vinkje { font: 700 15px var(--leo-mono); }

/* Cursuskaarten (openbare startpagina) */
.kaarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.kaart { background: var(--leo-papier); box-shadow: var(--leo-schaduw); display: flex; flex-direction: column; }
.kaart-kop { background: var(--c-primair); color: #fff; padding: 26px 26px 22px; }
.kaart-kop .graad { font-size: 14px; color: var(--c-zacht); margin-bottom: 12px; }
.kaart-voorbeeld { min-height: 40px; }
.kaart-voorbeeld.leeg { margin: 22px 26px 0; padding: 22px; border: 2px dashed var(--leo-lijn); font: 700 15px var(--leo-mono); color: var(--leo-grijs); text-align: center; }
.kaart-lijf { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.kaart-lijf p { margin: 0; }
.kaart-lijf ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--leo-grijs); }
.kaart-lijf ul b { font-family: var(--leo-mono); color: var(--leo-inkt); }
.kaart-lijf .knop { margin-top: auto; }

/* Cursuslijst (na aanmelden) */
.lijst { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--leo-inkt); }
.lijst > li { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--leo-lijn); }
.lijst .merkvak { flex: 0 0 190px; }
.lijst .tekst { flex: 1 1 280px; font-size: 16px; }
.lijst .status { flex: 0 0 auto; font: 700 15px var(--leo-mono); color: var(--c-primair); }
.verder { border: 2px solid var(--c-primair); margin-bottom: 34px; }
.verder-kop { background: var(--c-primair); color: #fff; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.verder-kop .graad { font-size: 14px; color: var(--c-zacht); }
.verder-lijf { padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.balkje { flex: 1; height: 10px; background: #E3E5E8; }
.balkje > div { height: 100%; background: var(--c-primair); }

/* Tabellen (leerkracht) */
.tabel-box { overflow-x: auto; }
table.leo { border-collapse: collapse; width: 100%; font-size: 16px; }
table.leo th, table.leo td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--leo-lijn); vertical-align: top; }
table.leo th { border-bottom: 1.5px solid var(--leo-inkt); font-size: 14px; }
.code { font: 700 18px var(--leo-mono); letter-spacing: 1px; }

/* Gedeelde oefenwidget (leocode-oefening.js) */
.oef { display: flex; flex-direction: column; gap: 12px; }
.oef-kop { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--leo-inkt); padding-bottom: 8px; }
.oef-kop h2 { margin: 0; font-size: 26px; }
.oef-ok { color: var(--leo-goed); }
.oef-opgave p { margin: 0 0 10px; }
.oef-opgave code, .oef code { font-family: var(--leo-mono); background: var(--leo-vlak); padding: 0 4px; }
.oef-pre { margin: 0; padding: 8px 10px; background: var(--leo-vlak); font: 15px/1.5 var(--leo-mono); white-space: pre-wrap; word-break: break-word; min-height: 1.5em; }
.oef-pre.leeg { color: var(--leo-grijs); font-style: italic; }
.oef-voorbeelden td, .oef-voorbeelden th { vertical-align: top; }
.oef-controles { margin: 0; font-size: 14px; }
.oef-knoppen { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.oef-invoer { width: 100%; font: 16px var(--leo-mono); border: 1.5px solid var(--leo-inkt); padding: 8px; }
.oef-uitvoer { display: flex; flex-direction: column; gap: 10px; }
.oef-test { border: 1.5px solid var(--leo-lijn); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.oef-test.ok { border-color: var(--leo-goed); }
.oef-test.nok { border-color: var(--leo-fout); }
.oef-test-kop { font-weight: 700; }
.oef-test-rij { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.oef-label { font-size: 13px; font-weight: 700; color: var(--leo-grijs); margin-bottom: 2px; }
.oef-grafiek { max-width: 100%; border: 1px solid var(--leo-lijn); background: #fff; }
.oef-hints { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.oef-hints h3 { margin: 6px 0 0; font-size: 17px; }
.oef-hint { width: 100%; }
.cm-leocode-melding { padding: 6px 10px; background: #FBE9E7; color: var(--leo-fout); font-size: 14px; border: 1.5px solid var(--leo-inkt); border-top: 0; }
.oef-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

/* --- Woordenlijst: uitleg bij begrippen (2.0) --------------------------------------------- */
.leo-begrip { border-bottom: 2px dotted currentColor; cursor: help; text-decoration: none; }
.leo-begrip:focus-visible { outline: 3px solid var(--leo-invoer); outline-offset: 2px; }
.leo-tip { position: absolute; z-index: 1000; max-width: min(340px, calc(100vw - 16px)); padding: 10px 12px;
  background: var(--leo-inkt); color: #FFFFFF; font-size: 15px; line-height: 1.4; box-shadow: var(--leo-schaduw);
  display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.leo-tip[hidden] { display: none; }
.leo-tip b { font-family: var(--leo-mono); font-size: 15px; }
.leo-tip .zie { color: #C9CDD3; font-size: 14px; }

/* --- Toetsmodus (2.0): zolang een leerling een toets maakt, op elke pagina ---------------------- */
html.leo-toetsmodus body { background: #F5A400 !important; }
html.leo-toetsmodus body::after { content: ""; position: fixed; inset: 0; border: 10px solid #B34700;
  pointer-events: none; z-index: 900; }
.leo-toetsband { position: sticky; top: 0; z-index: 901; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 10px 18px; padding: 10px 18px; background: #B34700; color: #FFFFFF; font-size: 16px; }
.leo-toetsband .knop { background: #FFFFFF; color: var(--leo-inkt); border-color: #FFFFFF; }

/* --- Toetspagina's (2.0) ----------------------------------------------------------------------- */
.toets-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.toets-klok { font-family: var(--leo-mono); font-size: 26px; font-weight: 700; padding: 4px 12px; background: var(--leo-inkt); color: #FFFFFF; }
.toets-klok.bijna { background: var(--leo-fout); }
.toets-bolletjes { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; padding: 0; list-style: none; }
.toets-bolletjes button { min-width: 44px; min-height: 44px; border: 2px solid var(--leo-inkt); background: var(--leo-papier);
  font-family: var(--leo-mono); font-size: 16px; cursor: pointer; }
.toets-bolletjes button.af { background: var(--leo-vlak); text-decoration: underline; }
.toets-bolletjes button[aria-current="step"] { background: var(--leo-inkt); color: #FFFFFF; }
.toets-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.toets-vraag pre.code { background: var(--leo-vlak); padding: 12px 14px; overflow-x: auto; font-family: var(--leo-mono); font-size: 16px; margin: 10px 0; }
.toets-optie { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--leo-lijn); margin: 8px 0; cursor: pointer; min-height: 44px; }
.toets-optie:has(input:checked) { border-color: var(--leo-inkt); background: var(--leo-vlak); }
.toets-stuk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--leo-lijn); margin: 6px 0; background: var(--leo-papier); }
.toets-stuk .mono { flex: 1; white-space: pre-wrap; }
.toets-stuk button { min-width: 44px; min-height: 44px; }
.toets-stuk.sleept { opacity: .5; }
.toets-invul { font-family: var(--leo-mono); font-size: 16px; white-space: pre-wrap; line-height: 2.4; background: var(--leo-vlak); padding: 10px 14px; }
.toets-invul input { font-family: var(--leo-mono); font-size: 16px; min-height: 40px; min-width: 6ch; padding: 2px 6px; border: 2px solid var(--leo-inkt); }
.toets-opgeslagen { color: var(--leo-goed); font-size: 15px; }
.toets-status { font-size: 14px; padding: 2px 8px; border: 1px solid var(--leo-lijn); white-space: nowrap; }
.toets-status.bezig { background: #FFE6B3; } .toets-status.ingediend { background: #D5ECDD; } .toets-status.tijd_om, .toets-status.niet_ingediend { background: #F6D5D2; }
.toets-bank details { border-top: 1px solid var(--leo-lijn); padding: 8px 0; }
.toets-bank summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.toets-bank label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.toets-code { font-family: var(--leo-mono); font-size: 44px; letter-spacing: 8px; font-weight: 700; }
/* (2.1) checklist: tip ("let op") */
.oef-checklist li.let-op { color: var(--leo-grijs); }
/* (2.2) niveau van een toetsvraag */
.sterren { font-family: var(--leo-sans); color: #A86A00; letter-spacing: 1px; white-space: nowrap; }
