@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #1B2B4B;
  --navy-2:    #253652;
  --primary:   #2F6FE0;
  --primary-d: #2460C8;
  --primary-l: #EBF2FE;
  --bg:        #F3F6FB;
  --bg-2:      #E8ECF4;
  --card:      #FFFFFF;
  --text:      #1B2B4B;
  --text-2:    #475876;
  --muted:     #8493B2;
  --border:    #DDE4F0;
  --border-2:  #C8D2E6;

  --green:   #059669;
  --green-l: #D1FAE5;
  --amber:   #D97706;
  --amber-l: #FEF3C7;
  --red:     #DC2626;
  --red-l:   #FEE2E2;

  /* Subject palette (6, cycling) */
  --s0: #D44E1A; --s0g: #F07A47;
  --s1: #2563EB; --s1g: #60A5FA;
  --s2: #059669; --s2g: #34D399;
  --s3: #7C3AED; --s3g: #A78BFA;
  --s4: #0891B2; --s4g: #38BDF8;
  --s5: #BE185D; --s5g: #F472B6;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 3px rgba(27,43,75,.06);
  --shadow-sm: 0 2px 8px rgba(27,43,75,.08), 0 1px 2px rgba(27,43,75,.04);
  --shadow:    0 4px 16px rgba(27,43,75,.10), 0 1px 4px rgba(27,43,75,.05);
  --shadow-lg: 0 12px 36px rgba(27,43,75,.14), 0 3px 8px rgba(27,43,75,.06);
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.03em; }
h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { margin-bottom: .5rem; }

a { color: var(--primary); }

/* ============================================================
   WORDMARK
   ============================================================ */
.wm          { font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.wm-studie   { color: #fff; }
.wm-spotter  { color: #6AAEF5; }
.wm-studie-dark  { color: var(--navy); }
.wm-spotter-dark { color: var(--primary); }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.22);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo img { display: block; }
.header-logo .wm { font-size: 1.15rem; }

.header-page-title {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-left: .25rem;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  flex: 1;
  min-width: 0;
}
.header-breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .15s; }
.header-breadcrumb a:hover { color: #fff; }
.header-breadcrumb .sep { color: rgba(255,255,255,.25); }
.header-breadcrumb .current { color: rgba(255,255,255,.9); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-user-name { font-size: .85rem; color: rgba(255,255,255,.7); white-space: nowrap; }
.header-user-name strong { color: #fff; font-weight: 600; }
.header-niveau {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: .1rem .45rem;
  margin-left: .3rem;
  vertical-align: middle;
  color: rgba(255,255,255,.85);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  padding: .28rem .7rem;
  font-size: .8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, border-color .18s;
}
.btn-header:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); color: #fff; }
.btn-header.danger { background: rgba(220,38,38,.2); border-color: rgba(220,38,38,.4); }
.btn-header.danger:hover { background: rgba(220,38,38,.32); }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  background: var(--navy);
  color: rgba(255,255,255,.45);
  padding: 1.1rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: rgba(255,255,255,.8); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  min-height: 44px;
  padding: .55rem 1.2rem;
  line-height: 1.3;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(47,111,224,.28); }
.btn-primary:hover { background: var(--primary-d); box-shadow: 0 4px 14px rgba(47,111,224,.38); transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-l); }
.btn-ghost { background: transparent; color: var(--text-2); border: 2px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--border-2); }
.btn-full { width: 100%; }
.btn-sm { font-size: .85rem; padding: .35rem .9rem; min-height: 34px; }
.btn-lg { font-size: 1.05rem; padding: .7rem 1.5rem; min-height: 50px; }

/* Legacy class compat for quiz.php */
.knop-primair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .65rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(47,111,224,.28);
}
.knop-primair:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(47,111,224,.38); }
.knop-primair:active { transform: none; }
.knop-primair:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.knop-secundair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: .6rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px;
  transition: all .2s;
}
.knop-secundair:hover { background: var(--primary-l); }

.knop-klein {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xs);
  padding: .28rem .7rem;
  font-size: .8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s;
}
.knop-klein:hover { background: rgba(255,255,255,.22); color: #fff; }
.knop-uitloggen { background: rgba(220,38,38,.2); border-color: rgba(220,38,38,.4); }

/* ============================================================
   FORMS
   ============================================================ */
.form-groep { margin-bottom: 1.1rem; }
.form-groep label,
.form-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: .4rem;
}
.form-groep input,
.form-groep select,
.form-control,
textarea {
  width: 100%;
  padding: .7rem .95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-groep input:focus,
.form-groep select:focus,
.form-control:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,111,224,.12);
}
textarea { resize: vertical; min-height: 100px; }

.fout-melding,
.alert-error {
  background: var(--red-l);
  color: var(--red);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  margin-bottom: 1rem;
  font-size: .9rem;
  font-weight: 500;
}

/* ============================================================
   LOGIN / WELCOME
   ============================================================ */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(145deg, #0F1D3A 0%, #1B3A7A 50%, #0F1D3A 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(47,111,224,.35) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(106,174,245,.2) 0%, transparent 40%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
  justify-content: center;
}
.login-logo img { width: 52px; height: 52px; display: block; }
.login-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
  text-align: center;
  margin-bottom: .35rem;
}
.login-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .93rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem;
}
.page-main.narrow { max-width: 780px; }

/* ============================================================
   WELCOME BAR (onderaan header, boven subject-grid)
   ============================================================ */
.welcome-bar {
  background: linear-gradient(to right, var(--navy), var(--navy-2));
  color: #fff;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.welcome-bar-inner { max-width: 1100px; margin: 0 auto; }
.welcome-bar h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .2rem;
}
.welcome-bar h2 em { font-style: normal; color: #6AAEF5; }
.welcome-bar p { color: rgba(255,255,255,.55); font-size: .95rem; }

/* ============================================================
   SUBJECT GRID (homepage)
   ============================================================ */
.subjects-wrap {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem;
}
.subjects-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.subject-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.subject-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.subject-card-cap {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}
/* Subject cap colors */
.sub-0 { background: linear-gradient(135deg, var(--s0), var(--s0g)); }
.sub-1 { background: linear-gradient(135deg, var(--s1), var(--s1g)); }
.sub-2 { background: linear-gradient(135deg, var(--s2), var(--s2g)); }
.sub-3 { background: linear-gradient(135deg, var(--s3), var(--s3g)); }
.sub-4 { background: linear-gradient(135deg, var(--s4), var(--s4g)); }
.sub-5 { background: linear-gradient(135deg, var(--s5), var(--s5g)); }

.subject-card-body { padding: .95rem 1.15rem 1.1rem; flex: 1; }
.subject-card-label { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.subject-card-meta { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.subject-card-arrow {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  padding: .65rem 1.15rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   CHAPTER OVERVIEW PAGE (vakken.php)
   ============================================================ */
.chapter-hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.chapter-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.chapter-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}
.chapter-hero-text h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.chapter-hero-text p  { font-size: .85rem; color: var(--muted); margin: 0; }
.chapter-hero-back { margin-left: auto; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .4rem .85rem; transition: border-color .2s, background .2s; white-space: nowrap; }
.chapter-hero-back:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }

.chapters-section {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 1.75rem 1.5rem;
}
.chapters-grid { display: flex; flex-direction: column; gap: .7rem; }

.chapter-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.chapter-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); transform: translateX(2px); }
.chapter-card.status-afgerond    { border-left: 4px solid var(--green); }
.chapter-card.status-bezig       { border-left: 4px solid var(--amber); }
.chapter-card.status-niet-begonnen { border-left: 4px solid transparent; }

.chapter-num {
  text-align: center;
  line-height: 1;
}
.chapter-num-label {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.04em;
  display: block;
}
.chapter-num-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--primary-l);
  color: var(--primary);
  border-radius: 20px;
  padding: .12rem .42rem;
  margin-top: .25rem;
}

.chapter-info { min-width: 0; }
.chapter-info h3 {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapter-meta { font-size: .78rem; color: var(--muted); }

.chapter-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
  min-width: 130px;
}

/* Progress badges */
.voortgang-badge {
  font-size: .73rem;
  font-weight: 600;
  padding: .18rem .6rem;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-niet-begonnen { background: var(--bg-2);   color: var(--muted); }
.badge-bezig         { background: var(--amber-l); color: var(--amber); }
.badge-afgerond      { background: var(--green-l); color: var(--green); }

/* Taal-mode buttons */
.taal-acties { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }
.taal-aantal-rij { display: flex; align-items: center; gap: .45rem; }
.taal-aantal-label { font-size: .76rem; color: var(--muted); font-weight: 600; }
.taal-aantal-sel {
  padding: .18rem .45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: .78rem;
  font-family: inherit;
  background: var(--card);
  cursor: pointer;
  color: var(--text-2);
}
.taal-modi { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.knop-mode {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-xs);
  padding: .3rem .65rem;
  font-size: .78rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.knop-mode:hover { background: var(--primary-d); }

/* ============================================================
   QUIZ HEADER (quiz.php — compact dark topbar)
   ============================================================ */
.app-header.quiz-header { position: sticky; top: 0; }
.header-inhoud { /* legacy compat */
  max-width: 1100px;
  margin: 0 auto;
  padding: .65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-inhoud h1 { font-size: .97rem; font-weight: 600; color: rgba(255,255,255,.88); flex: 1; text-align: center; margin: 0; }
.terug-link { color: rgba(255,255,255,.6); text-decoration: none; font-size: .85rem; white-space: nowrap; transition: color .15s; flex-shrink: 0; }
.terug-link:hover { color: #fff; }
.header-score { font-weight: 700; font-size: .9rem; color: #fff; white-space: nowrap; flex-shrink: 0; }
.header-leerling { margin-left: auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }

/* ============================================================
   QUIZ CONTENT (quiz.php)
   ============================================================ */
main { flex: 1; }
.quiz-container { max-width: 740px; margin: 0 auto; padding: 1.5rem 1.25rem; }

.laden-scherm { text-align: center; padding: 4rem 2rem; }
.laden-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ss-spin .85s linear infinite;
  margin: 0 auto 1.25rem;
}
@keyframes ss-spin { to { transform: rotate(360deg); } }
.laden-sub { font-size: .88rem; color: var(--muted); margin-top: .3rem; }

.voortgangsbalk-container { margin-bottom: 1.25rem; }
.voortgangsbalk { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: .4rem; }
.voortgang-vulling { height: 100%; background: linear-gradient(90deg, var(--primary), #6AAEF5); border-radius: 4px; transition: width .4s ease; }
.voortgang-tekst { font-size: .8rem; color: var(--muted); text-align: right; font-weight: 500; }

.vraag-kaart {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.1rem;
}
.vraag-nummer { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .3rem; }
.vraag-type-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  background: var(--primary-l);
  color: var(--primary);
  padding: .16rem .58rem;
  border-radius: 20px;
  margin-bottom: .9rem;
}
.vraag-tekst { font-size: 1.1rem; font-weight: 500; line-height: 1.7; color: var(--text); margin-bottom: 1.1rem; }

.toelichting-sectie { border-top: 1px solid var(--border); padding-top: .9rem; margin-top: .5rem; }
.toelichting-knop {
  background: none;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: .45rem .95rem;
  font-size: .85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.toelichting-knop:hover { background: var(--bg); color: var(--text-2); border-color: var(--border-2); }
.toelichting-tekst {
  margin-top: .7rem;
  padding: .75rem 1rem;
  background: #FFFBEB;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .88rem;
  color: var(--text-2);
}

.antwoord-sectie { margin-top: .5rem; }
.antwoord-sectie label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: .5rem; }
.antwoord-sectie textarea { width: 100%; padding: .75rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; resize: vertical; min-height: 100px; transition: border-color .2s; }
.antwoord-sectie textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,224,.12); }

.meerkeuze-opties { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.meerkeuze-optie {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all .18s;
  font-weight: 500;
  color: var(--text);
}
.meerkeuze-optie:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-l); }
.meerkeuze-optie.geselecteerd { border-color: var(--primary); background: var(--primary-l); color: var(--primary); }

.feedback-sectie { margin-top: 1.1rem; border-radius: var(--radius-sm); padding: 1rem 1.25rem; }
.feedback-correct { background: var(--green-l); border-left: 4px solid var(--green); }
.feedback-fout    { background: var(--red-l);   border-left: 4px solid var(--red); }
.feedback-indicator { font-size: .85rem; font-weight: 700; margin-bottom: .3rem; }
.feedback-correct .feedback-indicator { color: var(--green); }
.feedback-fout    .feedback-indicator { color: var(--red); }
.feedback-tekst { font-size: .92rem; line-height: 1.6; color: var(--text-2); margin-bottom: .75rem; }
.tip-box { background: var(--amber-l); border-left: 3px solid var(--amber); padding: .65rem 1rem; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; font-size: .88rem; color: var(--text-2); margin-top: .75rem; }
.vraag-uitleg { background: rgba(47,111,224,.06); border-left: 3px solid var(--primary); padding: .65rem 1rem; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; font-size: .88rem; margin-top: .75rem; }

.model-antwoord-details { margin-top: .75rem; }
.model-antwoord-details summary { font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; padding: .3rem 0; }
.model-antwoord { margin-top: .5rem; padding: .75rem 1rem; background: var(--bg); border-radius: var(--radius-sm); font-size: .88rem; line-height: 1.6; color: var(--text-2); }

.actie-rij { display: flex; gap: .75rem; margin-top: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }

/* ============================================================
   RESULTATEN / FOUT
   ============================================================ */
.resultaten-scherm, .fout-scherm {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 540px;
  margin: 2rem auto;
}
.resultaten-scherm h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.score-groot { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; color: var(--primary); margin-bottom: .5rem; }
.sterren { font-size: 2rem; margin-bottom: 1.25rem; }
.fout-icoon { font-size: 3rem; margin-bottom: .75rem; }

/* ============================================================
   NIVEAU TABS
   ============================================================ */
.niveau-tabs { display: flex; gap: .5rem; margin-bottom: 1.4rem; }
.niveau-tab {
  flex: 1;
  text-align: center;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  color: var(--primary);
  background: var(--card);
  border: 2px solid var(--border);
  transition: all .2s;
}
.niveau-tab:hover { border-color: var(--primary); background: var(--primary-l); }
.niveau-tab.actief { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   HISTORY PAGE
   ============================================================ */
.stat-kaarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-kaart {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  padding: 1.1rem;
  text-align: center;
}
.stat-getal { font-size: 2.2rem; font-weight: 800; color: var(--primary); letter-spacing: -.04em; }
.stat-label { font-size: .82rem; color: var(--muted); font-weight: 500; margin-top: .15rem; }

.sessie-kaart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1rem 1.25rem;
  margin-bottom: .65rem;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.verborgen { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .header-inner { padding: .6rem 1rem; }
  .welcome-bar { padding: 1.5rem 1rem; }
  .subjects-wrap, .chapters-section { padding: 1.25rem 1rem; }
  .subjects-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .chapter-card { grid-template-columns: 44px 1fr; }
  .chapter-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .taal-acties { align-items: flex-start; }
  .taal-modi { justify-content: flex-start; }
  .meerkeuze-opties { grid-template-columns: 1fr; }
  .page-main { padding: 1.25rem 1rem; }
  .quiz-container { padding: 1.25rem 1rem; }
  .footer-inner { justify-content: center; }
}

@media (max-width: 400px) {
  .subjects-grid { grid-template-columns: 1fr; }
}