/* ---- IEP Oefentoets — stijl ---- */
:root {
  --blauw: #1f6feb;
  --blauw-donker: #1a4fa0;
  --groen: #1a9d5a;
  --groen-licht: #e6f7ee;
  --oranje: #e8830c;
  --rood: #d83b3b;
  --rood-licht: #fdecec;
  --geel-licht: #fff7e0;
  --grijs: #5b6472;
  --grijs-licht: #eef1f5;
  --lijn: #dde2ea;
  --tekst: #1c2430;
  --wit: #ffffff;
  --radius: 14px;
  --schaduw: 0 2px 10px rgba(20, 40, 80, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--tekst);
  background: #f4f6fa;
  line-height: 1.55;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header / footer */
.site-header {
  background: var(--blauw);
  color: #fff;
  padding: 14px 0;
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.logo { font-size: 1.25rem; font-weight: 700; color: #fff; text-decoration: none; }
a.logo:hover { opacity: .9; }
.site-header .sub { opacity: .85; font-size: .95rem; }

.site-footer {
  margin-top: 48px;
  padding: 20px 0;
  color: var(--grijs);
  border-top: 1px solid var(--lijn);
}

main.wrap { padding-top: 28px; padding-bottom: 20px; }

/* Kaarten */
.card {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 22px;
  margin-bottom: 18px;
}

h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 0 0 10px; }
h3 { font-size: 1.05rem; margin: 18px 0 8px; }
p.intro { color: var(--grijs); margin-top: 0; }

/* Knoppen */
.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--blauw);
  color: #fff;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--blauw-donker); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b9c2d0; cursor: not-allowed; }
.btn.secundair { background: var(--grijs-licht); color: var(--tekst); }
.btn.secundair:hover { background: #e2e7ee; }
.btn.groot { padding: 16px 24px; font-size: 1.05rem; }
.knoprij { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* Startkeuzes */
.keuzes { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 10px; }
@media (max-width: 640px) { .keuzes { grid-template-columns: 1fr; } }
.keuze {
  text-align: left;
  border: 2px solid var(--lijn);
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.keuze:hover { border-color: var(--blauw); background: #f7faff; }
.keuze .titel { font-size: 1.15rem; font-weight: 700; display: block; margin-bottom: 4px; }
.keuze .meta { color: var(--grijs); font-size: .92rem; }
.keuze .emoji { font-size: 1.5rem; }

/* Voortgang */
.voortgang-balk {
  height: 10px; background: var(--grijs-licht);
  border-radius: 999px; overflow: hidden; margin: 6px 0 4px;
}
.voortgang-vul { height: 100%; background: var(--blauw); width: 0%; transition: width .2s; }
.voortgang-tekst { font-size: .9rem; color: var(--grijs); display:flex; justify-content: space-between; }
.tag {
  display: inline-block; font-size: .8rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: var(--grijs-licht); color: var(--grijs);
}

/* Leestekst */
.leestekst {
  background: var(--geel-licht);
  border: 1px solid #f0e2b8;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.leestekst h3 { margin-top: 0; }
.leestekst p { margin: 0 0 10px; }

/* Vraag */
.vraag-tekst { font-size: 1.15rem; font-weight: 600; margin: 6px 0 16px; }
.vraag-tekst table {
  border-collapse: collapse; margin: 10px 0; font-size: 1rem; font-weight: 500;
}
.vraag-tekst th, .vraag-tekst td {
  border: 1px solid var(--lijn); padding: 6px 12px; text-align: center;
}
.vraag-tekst th { background: var(--grijs-licht); }

.opties { display: grid; gap: 10px; }
.optie {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--lijn); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; background: #fff;
  font-size: 1.02rem; transition: border-color .12s, background .12s;
}
.optie:hover { border-color: var(--blauw); background: #f7faff; }
.optie.gekozen { border-color: var(--blauw); background: #eaf2ff; }
.optie .letter {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grijs-licht); color: var(--grijs);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.optie.gekozen .letter { background: var(--blauw); color: #fff; }

.invul input {
  font-size: 1.15rem; padding: 12px 14px; border: 2px solid var(--lijn);
  border-radius: 10px; width: 220px; max-width: 100%;
}
.invul input:focus { outline: none; border-color: var(--blauw); }
.invul .hint { color: var(--grijs); font-size: .92rem; margin-top: 6px; }

/* Resultaat */
.score-groot { font-size: 2.4rem; font-weight: 800; color: var(--blauw); }
.onderdeel-rij {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  align-items: center; padding: 10px 0; border-bottom: 1px solid var(--lijn);
}
.onderdeel-rij:last-child { border-bottom: none; }
.onderdeel-naam { font-weight: 600; }
.balk { grid-column: 1 / -1; height: 9px; background: var(--grijs-licht); border-radius: 999px; overflow: hidden; }
.balk-vul { height: 100%; }
.niveau { font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.niveau.sterk { background: var(--groen-licht); color: var(--groen); }
.niveau.aandacht { background: var(--geel-licht); color: var(--oranje); }
.niveau.oefenen { background: var(--rood-licht); color: var(--rood); }
.vul-sterk { background: var(--groen); }
.vul-aandacht { background: var(--oranje); }
.vul-oefenen { background: var(--rood); }

/* Review */
.review-item { border-left: 4px solid var(--lijn); padding: 6px 0 6px 14px; margin: 14px 0; }
.review-item.goed { border-color: var(--groen); }
.review-item.fout { border-color: var(--rood); }
.review-item .vraag { font-weight: 600; }
.review-item .regel { font-size: .95rem; margin: 3px 0; }
.review-item .jouw.fout-tekst { color: var(--rood); }
.review-item .goed-tekst { color: var(--groen); font-weight: 600; }
.review-item .uitleg { color: var(--grijs); font-size: .92rem; background: var(--grijs-licht); padding: 8px 10px; border-radius: 8px; margin-top: 6px; }

/* Historie */
.historie { font-size: .95rem; }
.historie li { margin: 4px 0; color: var(--grijs); }

.verborgen { display: none; }

/* Header-acties (uitloggen) */
.site-header .wrap { justify-content: space-between; }
.header-links { margin-left: auto; }
.header-links button {
  background: rgba(255,255,255,.18); color: #fff; border: none;
  padding: 6px 12px; border-radius: 8px; font-size: .85rem; cursor: pointer;
}
.header-links button:hover { background: rgba(255,255,255,.3); }

/* Herkansing-keuze accent */
.keuze.herkansing { border-color: var(--oranje); background: #fff8ef; }
.keuze.herkansing:hover { border-color: var(--oranje); background: #fff2e0; }
.keuze:disabled { opacity: .55; cursor: not-allowed; }
.keuze:disabled:hover { border-color: var(--lijn); background: #fff; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto 0; }
.login-wrap .card { text-align: center; }
.login-wrap input {
  font-size: 1.1rem; text-align: center;
  padding: 12px 14px; border: 2px solid var(--lijn); border-radius: 10px;
  width: 100%; margin: 8px 0;
}
.login-wrap input[type="password"] { font-size: 1.4rem; letter-spacing: .3em; }
.login-wrap input:focus { outline: none; border-color: var(--blauw); }
.login-wrap .btn { width: 100%; margin-top: 6px; }
.login-fout { color: var(--rood); font-size: .95rem; margin: 8px 0 0; }
.login-tip { color: var(--grijs); font-size: .85rem; margin: 12px 0 0; }

.laden { color: var(--grijs); padding: 12px 0; }

/* Dieper oefenen — onderwerp-knoppen */
.onderwerp-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 8px; }
.onderwerp-knop {
  border: 2px solid var(--lijn); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: .95rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: border-color .12s, background .12s;
}
.onderwerp-knop:hover { border-color: var(--blauw); background: #f7faff; }
.onderwerp-knop .aantal {
  background: var(--grijs-licht); color: var(--grijs); border-radius: 999px;
  font-size: .78rem; padding: 1px 8px; font-weight: 700;
}

/* Breadcrumb */
.kruimel { font-size: .9rem; color: var(--grijs); margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.kruimel .stap { color: var(--grijs); }
.kruimel .stap[data-go] { color: var(--blauw); cursor: pointer; font-weight: 600; }
.kruimel .stap[data-go]:hover { text-decoration: underline; }
.kruimel .stap.huidig { color: var(--tekst); font-weight: 700; }
.kruimel .scheiding { color: var(--lijn); }

/* Breukfiguren (SVG) */
.figuur { margin: 4px 0 16px; }
.figuur svg { max-width: 100%; height: auto; }


/* Subonderwerp dat het kind beheerst (adaptief oefenen) */
.keuze.beheerst { border-color: var(--groen); background: var(--groen-licht); }

/* Directe feedback per vraag (dieper oefenen) */
.optie:disabled { cursor: default; opacity: 1; color: var(--tekst); }
.optie:disabled:hover { border-color: var(--lijn); background: var(--wit); }
.optie.is-goed, .optie.is-goed:disabled:hover { border-color: var(--groen); background: var(--groen-licht); }
.optie.is-goed .letter { background: var(--groen); color: #fff; }
.optie.is-fout, .optie.is-fout:disabled:hover { border-color: var(--rood); background: var(--rood-licht); }
.optie.is-fout .letter { background: var(--rood); color: #fff; }
.invul input:disabled { background: var(--grijs-licht); color: var(--tekst); }
.feedback { margin: 16px 0 4px; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--lijn); }
.feedback.goed { border-color: var(--groen); background: var(--groen-licht); }
.feedback.fout { border-color: var(--rood); background: var(--rood-licht); }
.feedback .kop { font-weight: 700; font-size: 1.08rem; margin-bottom: 6px; }
.feedback .regel { margin-bottom: 6px; }
.feedback .tip { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--geel-licht); }
.feedback .uitleg { margin-top: 6px; }
.review-item .tip { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--geel-licht); }
