/* ==========================================================================
   Permanente Kennis — styles.css
   Ontwerptaal: een "veldkaart" — kompas, kaartbladen, legende-lijnen.
   Lettertype: Verdana overal (dyslexie-vriendelijk), koppen iets zwaarder.
   ========================================================================== */

:root {
  --paper: #f5f6f4;
  --card: #ffffff;
  --ink: #022e3e;
  --ink-deep: #011a24;
  --ink-soft: #4e6572;
  --red: #e5343c;
  --red-dark: #c22630;
  --teal: #1f7a6c;
  --teal-dark: #145a4f;
  --amber: #c9932e;
  --amber-dark: #a6761c;
  --violet: #8452ad;
  --violet-dark: #663a8c;
  --sky: #2f86c9;
  --sky-dark: #1c66a0;
  --ocean: #7ec8e3;
  --sand: #f4e4c1;
  --correct: #2f6e52;
  --line: #dbe1e0;
  --line-strong: #c2cbca;
  --radius: 10px;
  --max: 760px;
  --shadow: 0 1px 0 rgba(2, 46, 62, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Verdana, Geneva, "DejaVu Sans", sans-serif;
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='170' height='170' viewBox='0 0 170 170'><g fill='none' stroke='%234e6572' stroke-width='1' opacity='0.4'><circle cx='85' cy='85' r='62'/><circle cx='85' cy='85' r='40'/><line x1='85' y1='10' x2='85' y2='160'/><line x1='10' y1='85' x2='160' y2='85'/><line x1='27' y1='27' x2='143' y2='143'/><line x1='143' y1='27' x2='27' y2='143'/></g><path d='M85 22 L93 85 L85 148 L77 85 Z' fill='%234e6572' opacity='0.3'/><path d='M22 85 L85 93 L148 85 L85 77 Z' fill='%234e6572' opacity='0.18'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='170' height='170' viewBox='0 0 170 170'><g fill='none' stroke='%234e6572' stroke-width='1' opacity='0.4'><circle cx='85' cy='85' r='62'/><circle cx='85' cy='85' r='40'/><line x1='85' y1='10' x2='85' y2='160'/><line x1='10' y1='85' x2='160' y2='85'/><line x1='27' y1='27' x2='143' y2='143'/><line x1='143' y1='27' x2='27' y2='143'/></g><path d='M85 22 L93 85 L85 148 L77 85 Z' fill='%234e6572' opacity='0.3'/><path d='M22 85 L85 93 L148 85 L85 77 Z' fill='%234e6572' opacity='0.18'/></svg>"),
    radial-gradient(ellipse 900px 700px at 4% 2%, rgba(244, 228, 193, 0.55), transparent 60%),
    radial-gradient(ellipse 900px 700px at 98% 100%, rgba(126, 200, 227, 0.32), transparent 60%),
    repeating-radial-gradient(circle at 6% 98%, rgba(2,46,62,0.05) 0, rgba(2,46,62,0.05) 1px, transparent 1.4px, transparent 26px),
    repeating-radial-gradient(circle at 96% 4%, rgba(2,46,62,0.045) 0, rgba(2,46,62,0.045) 1px, transparent 1.4px, transparent 30px),
    linear-gradient(rgba(2,46,62,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,46,62,0.05) 1px, transparent 1px);
  background-size: 170px 170px, 170px 170px, auto, auto, 620px 620px, 640px 640px, 44px 44px, 44px 44px;
  background-position: calc(100% - 6px) 6px, 6px calc(100% - 6px), 0 0, 0 0, 0 0, 0 0, -1px -1px, -1px -1px;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  color: var(--ink);
  margin: 0 0 0.4em 0;
  line-height: 1.25;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 0.8em 0; max-width: 64ch; }

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

button { font-family: inherit; }

svg { width: 100%; height: 100%; display: block; }

.site-header {
  border-bottom: 2px solid var(--line-strong);
  background: var(--card);
}
.site-header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.3s ease; }
.brand:hover .brand-mark img { transform: rotate(-8deg) scale(1.08); }
.brand-text strong { display: block; font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 1.02rem; }
.brand-text span { display: block; font-size: 0.78rem; color: var(--ink-soft); }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.crumbs a { color: var(--red); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--line-strong); }
.crumbs .current { color: var(--ink); font-weight: bold; }

/* ---------- hero / home -------------------------------------------------- */

.hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 24px;
  background: var(--ink);
  min-height: 260px;
}
.hero-media {
  position: absolute;
  inset: 0;
  line-height: 0;
  z-index: 0;
}
.hero-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2,46,62,0.88) 0%, rgba(2,46,62,0.32) 55%, rgba(2,46,62,0.08) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 22px 26px 24px;
  color: #fff;
  text-align: left;
}
.hero-content h1 {
  color: #fff;
  font-size: 1.9rem;
  display: block;
  max-width: 100%;
  position: relative;
  padding-bottom: 12px;
  overflow-wrap: break-word;
}
.hero-content h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
}
.hero-sub {
  max-width: 52ch;
  margin: 8px 0 0;
  color: rgba(255,255,255,0.9);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
@keyframes pk-badge-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  animation: pk-badge-in 0.5s ease backwards;
}
.hero-badge.badge-red { animation-delay: 0.05s; }
.hero-badge.badge-teal { animation-delay: 0.15s; }
.hero-badge.badge-amber { animation-delay: 0.25s; }

@keyframes pk-dash-flow {
  to { stroke-dashoffset: -100; }
}
.hero-route path {
  animation: pk-dash-flow 3.5s linear infinite;
}
@keyframes pk-waypoint-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.75; }
}
.hero-waypoint {
  transform-box: fill-box;
  transform-origin: center;
  animation: pk-waypoint-pulse 2.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pk-sparkle-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.75); }
  50% { opacity: 0.9; transform: scale(1.15); }
}
.hero-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pk-sparkle-twinkle 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pk-needle-swing {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}
.hero-compass-needle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pk-needle-swing 3.6s ease-in-out infinite;
}
@keyframes pk-cloud-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -4px); }
}
.hero-cloud {
  animation: pk-cloud-drift 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pk-earth-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}
.hero-earth circle {
  animation: pk-earth-glow 4.5s ease-in-out infinite;
}
@keyframes pk-mascot-bob {
  0%, 100% { transform: translate(58px, 168px) rotate(0deg); }
  50% { transform: translate(58px, 164px) rotate(-2deg); }
}
.hero-mascot {
  animation: pk-mascot-bob 3.2s ease-in-out infinite;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.hero-badge.badge-red { background: var(--red); }
.hero-badge.badge-teal { background: var(--teal); }
.hero-badge.badge-amber { background: var(--amber-dark); }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 30px;
}
.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
  box-shadow: var(--shadow);
}
.stat-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.stat-icon svg { width: 1.5rem; height: 1.5rem; display: block; }
@keyframes pk-flame-flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.12) rotate(2deg); }
}
.stat-icon-pulse {
  display: inline-block;
  animation: pk-flame-flicker 1.6s ease-in-out infinite;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 0 7px rgba(229, 52, 60, 0.55)) drop-shadow(0 0 3px rgba(240, 166, 59, 0.6));
}
.stat-tile { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(2,46,62,0.14); }
.stat-check-badge {
  width: 1.6rem; height: 1.6rem;
  border-radius: 7px;
  background: linear-gradient(145deg, #7be3ad, #22b06a);
  box-shadow: 0 2px 7px rgba(34,176,106,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  animation: pk-check-badge-bounce 2.6s ease-in-out infinite;
}
.stat-check-badge svg { width: 0.95rem; height: 0.95rem; }
@keyframes pk-check-badge-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(-5deg); }
}

/* ---------- doelen (goals) ------------------------------------------------ */

.goals-panel {
  margin: 0 0 30px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.goals-panel h3 { margin-bottom: 4px; }
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 28px;
  margin-top: 12px;
}
.goals-col h4 {
  margin: 0 0 8px;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.goals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
}
.goal-check {
  width: 22px; height: 22px; flex: none;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.goal-check svg { width: 13px; height: 13px; }
.goal-icon { font-size: 1.05rem; flex: none; }
.goal-text { display: flex; flex-direction: column; line-height: 1.25; }
.goal-text strong { font-size: 0.88rem; color: var(--ink); }
.goal-target { font-size: 0.74rem; color: var(--ink-soft); }
.goal-item.goal-locked { opacity: 0.5; }
.goal-item.goal-next {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
}
@keyframes pk-goal-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,122,108,0.28); }
  50% { box-shadow: 0 0 0 5px rgba(31,122,108,0); }
}
.goal-item.goal-next .goal-check { animation: pk-goal-ring 2s ease-in-out infinite; }
@keyframes pk-check-pop {
  0% { transform: scale(0) rotate(-25deg); }
  55% { transform: scale(1.3) rotate(6deg); }
  75% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.goal-item.goal-achieved .goal-check {
  background: linear-gradient(145deg, #7be3ad, #22b06a);
  border-color: #1c9a5c;
  box-shadow: 0 2px 7px rgba(34,176,106,0.4);
  animation: pk-check-pop 0.5s cubic-bezier(.34,1.56,.64,1) backwards;
}
.goal-item.goal-achieved .goal-text strong { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--line-strong); }
@keyframes pk-check-draw {
  to { stroke-dashoffset: 0; }
}
.goal-item.goal-achieved .goal-check svg path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pk-check-draw 0.35s ease forwards;
  animation-delay: 0.25s;
}
.stat-value { font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 1.8rem; font-weight: bold; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--ink-soft); }
.stat-milestone { font-size: 0.74rem; font-weight: bold; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--ink-soft); }
.stat-streak { border-top: 4px solid var(--amber); }
.stat-streak .stat-value { color: var(--amber-dark); }
.stat-answered { border-top: 4px solid var(--teal); }
.stat-answered .stat-value { color: var(--teal-dark); }
.stat-global { border-top: 4px solid var(--sky); }
.stat-global .stat-value { color: var(--sky-dark); }

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 28px 0 36px;
}
.sheet-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-top: 6px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow);
}
.sheet-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  pointer-events: none;
}
.sheet-card::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.09;
  pointer-events: none;
  transition: transform 0.25s ease;
}
.sheet-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 16px 30px rgba(2,46,62,0.18); }
.sheet-card:hover::after { transform: scale(1.25); }
.sheet-card:hover .sheet-icon-badge { transform: rotate(-6deg) scale(1.08); }
@keyframes pk-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.sheet-card {
  animation: pk-card-in 0.5s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
.sheet-stamp {
  position: absolute;
  top: 14px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: currentColor;
  color: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  font-weight: bold;
  font-size: 0.95rem;
  transform: rotate(8deg);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}
.sheet-icon-badge {
  width: 52px; height: 52px;
  margin-bottom: 12px;
  padding: 11px;
  border-radius: 14px;
  background: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.sheet-icon-badge svg { color: var(--card); width: 100%; height: 100%; }
.sheet-card.accent-ink { color: var(--ink); }
.sheet-card.accent-red { color: var(--red); border-top-color: var(--red); }
.sheet-card.accent-teal { color: var(--teal); border-top-color: var(--teal); }
.sheet-card.accent-amber { color: var(--amber-dark); border-top-color: var(--amber); }
.sheet-card.accent-violet { color: var(--violet); border-top-color: var(--violet); }
.sheet-card.accent-sky { color: var(--sky); border-top-color: var(--sky); }
.sheet-card h2, .sheet-card .sheet-subtitle, .sheet-card .sheet-intro { color: var(--ink); }
.sheet-card.accent-ink .sheet-subtitle,
.sheet-card.accent-red .sheet-subtitle,
.sheet-card.accent-teal .sheet-subtitle,
.sheet-card.accent-amber .sheet-subtitle,
.sheet-card.accent-violet .sheet-subtitle,
.sheet-card.accent-sky .sheet-subtitle { color: var(--ink-soft); }
.sheet-card .sheet-label { color: currentColor; border-color: currentColor; background: rgba(0,0,0,0.03); }
.sheet-card .sheet-meta { color: currentColor; }
.sheet-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 10px;
  border: 1px solid var(--line-strong);
}
.sheet-card h2 { margin-bottom: 2px; }
.sheet-subtitle { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 10px; }
.sheet-intro { font-size: 0.92rem; color: var(--ink-soft); }
.sheet-footer {
  margin-top: auto;
  padding-top: 10px;
}
.sheet-meta {
  display: inline-flex;
  margin-top: 0;
  font-size: 0.82rem;
  font-weight: bold;
}
.sheet-progress {
  margin-top: 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(2,46,62,0.08);
  overflow: hidden;
}
.sheet-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  width: 0%;
  transition: width 0.9s cubic-bezier(.22,.9,.3,1);
}
.sheet-progress-label {
  display: block;
  margin-top: 5px;
  font-size: 0.74rem;
  font-weight: bold;
  color: var(--ink-soft);
}

.legend-block {
  border-top: 1px dashed var(--line-strong);
  padding-top: 20px;
}
.legend-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.legend-heading h3 { margin: 0; }
.legend-mascot {
  width: 40px; height: 40px; flex: none;
  color: var(--teal);
}
@keyframes pk-globe-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-4deg); }
}
.legend-mascot svg { animation: pk-globe-bob 3s ease-in-out infinite; }
.legend-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.legend-item { display: flex; gap: 12px; align-items: flex-start; }
.legend-icon {
  width: 38px; height: 38px; flex: none;
  padding: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-top: 0;
}
.legend-icon svg { color: var(--card); width: 100%; height: 100%; }
.legend-item:nth-child(6n+1) { color: var(--ink); }
.legend-item:nth-child(6n+2) { color: var(--red); }
.legend-item:nth-child(6n+3) { color: var(--teal); }
.legend-item:nth-child(6n+4) { color: var(--amber-dark); }
.legend-item:nth-child(6n+5) { color: var(--violet); }
.legend-item:nth-child(6n+6) { color: var(--sky); }
.legend-item strong { color: var(--ink); }
.legend-item p { margin: 2px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.legend-note { margin-top: 16px; font-size: 0.85rem; color: var(--ink-soft); border-top: 1px dashed var(--line-strong); padding-top: 12px; }

/* ---------- module overview ---------------------------------------------- */

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 8px;
}
.module-intro { color: var(--ink-soft); max-width: 60ch; }
.module-counter { margin-top: -8px; }
.module-counter img { height: 20px; display: block; border-radius: 4px; }

/* optionele sfeerfoto boven een kaartblad (bv. de aarde vanuit de ruimte) —
   bewust klein en rustig gehouden: illustratief, geen blikvanger die de
   knoppen/onderdelen eronder overschreeuwt. */
.module-header-img {
  margin: 4px 0 18px;
  max-width: 360px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 4px 14px rgba(2,46,62,0.08);
}
.module-header-img img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.module-header-img figcaption {
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: #eef1ee;
}
@media (max-width: 700px) {
  .module-header-img { max-width: 100%; }
}
.sheet-counter { display: block; height: 18px; margin-top: 6px; border-radius: 3px; }

.topic-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-strong);
  margin-top: 12px;
}
.topic-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line-strong);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--ink);
  border-radius: 6px;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.topic-row:hover { background: rgba(31, 122, 108, 0.07); border-left-color: var(--teal); transform: translateX(3px); }
.topic-kind-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(31,122,108,0.15);
  transition: transform 0.15s ease;
}
.topic-row:hover .topic-kind-dot { transform: scale(1.3); }
.topic-kind-dot.kind-category { background: var(--amber); box-shadow: 0 0 0 3px rgba(201,147,46,0.18); }
.topic-kind-dot.kind-map { background: var(--red); box-shadow: 0 0 0 3px rgba(229,52,60,0.15); }
.topic-row-main { flex: 1; min-width: 0; }
.topic-row-main h3 { margin-bottom: 2px; font-size: 1rem; }
.topic-row-main p { margin: 0; font-size: 0.83rem; color: var(--ink-soft); }
.mastery {
  width: 84px; height: 8px; border-radius: 999px; background: var(--line);
  overflow: hidden; flex: none;
}
.mastery-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--amber), var(--teal)); border-radius: 999px; transition: width 0.8s cubic-bezier(.22,.9,.3,1); }

.big-cta { margin-top: 26px; display: inline-block; }

/* ---------- buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 5px 12px rgba(2,46,62,0.12); }
.btn:active { transform: translateY(0) scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:disabled:hover { transform: none; box-shadow: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border-color: var(--red-dark);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(229,52,60,0.25);
}
.btn-primary:hover { background: linear-gradient(135deg, #ef4b53 0%, var(--red) 100%); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(229,52,60,0.35); }
.btn-primary:active { transform: translateY(0) scale(0.96); }

/* ---------- topic intro / mode cards --------------------------------------- */

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
@keyframes pk-mode-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mode-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  animation: pk-mode-in 0.4s ease backwards;
}
.mode-grid .mode-card:nth-child(1) { animation-delay: 0.03s; }
.mode-grid .mode-card:nth-child(2) { animation-delay: 0.09s; }
.mode-grid .mode-card:nth-child(3) { animation-delay: 0.15s; }
.mode-grid .mode-card:nth-child(4) { animation-delay: 0.21s; }
.mode-grid .mode-card:nth-child(5) { animation-delay: 0.27s; }
.mode-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(29,53,87,0.16); }
.mode-icon {
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--paper);
  transition: transform 0.2s ease;
}
.mode-card:hover .mode-icon { transform: scale(1.14) rotate(-8deg); }
.mode-card p { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }
.mode-grid .mode-card:nth-child(5n+1) { border-left: 4px solid var(--ink); }
.mode-grid .mode-card:nth-child(5n+1) .mode-icon { color: var(--ink); background: rgba(2,46,62,0.08); }
.mode-grid .mode-card:nth-child(5n+2) { border-left: 4px solid var(--red); }
.mode-grid .mode-card:nth-child(5n+2) .mode-icon { color: var(--red); background: rgba(229,52,60,0.1); }
.mode-grid .mode-card:nth-child(5n+3) { border-left: 4px solid var(--teal); }
.mode-grid .mode-card:nth-child(5n+3) .mode-icon { color: var(--teal); background: rgba(31,122,108,0.1); }
.mode-grid .mode-card:nth-child(5n+4) { border-left: 4px solid var(--amber); }
.mode-grid .mode-card:nth-child(5n+4) .mode-icon { color: var(--amber-dark); background: rgba(201,147,46,0.12); }
.mode-grid .mode-card:nth-child(5n+5) { border-left: 4px solid var(--red-dark); }
.mode-grid .mode-card:nth-child(5n+5) .mode-icon { color: var(--red-dark); background: rgba(194,38,48,0.1); }
.score-note { color: var(--ink-soft); font-size: 0.88rem; }
.topic-note {
  background: #fbf3e4;
  border: 1px solid #e6d3a4;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #6b4f16;
}

.direction-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  margin: 4px 0 22px;
  background: var(--card);
}
.dir-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.25s ease, color 0.25s ease, transform 0.12s ease;
}
.dir-btn:active { transform: scale(0.93); }
.dir-btn-active {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
}

/* ---------- progress dots --------------------------------------------------- */

.progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0 20px;
}
.progress-dots .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-strong);
  transition: transform 0.2s ease, background 0.2s ease;
}
@keyframes pk-dot-done { from { transform: scale(0.3); } to { transform: scale(1); } }
.progress-dots .dot-done { background: var(--teal); animation: pk-dot-done 0.3s ease; }
@keyframes pk-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,52,60,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(229,52,60,0); }
}
.progress-dots .dot-active { background: var(--red); transform: scale(1.3); animation: pk-dot-pulse 1.4s ease-in-out infinite; }

/* ---------- flashcards -------------------------------------------------------- */

.study-hint { color: var(--ink-soft); font-size: 0.88rem; }
.card-stage { display: flex; justify-content: center; margin: 10px 0 20px; perspective: 1200px; }

.flashcard {
  width: min(100%, 480px);
  height: 220px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease;
}
.flashcard:hover { transform: scale(1.015); }
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.flashcard.is-flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  border-top: 5px solid var(--sky);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(29,53,87,0.1);
}
.flashcard-front::before,
.flashcard-face::before {
  content: "";
}
.flashcard-back { transform: rotateY(180deg); background: linear-gradient(160deg, #fbf8ef 0%, #f3ece0 100%); border-top-color: var(--amber); }
.flashcard-label {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--red);
  text-transform: none;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.flashcard-face p { font-size: 1.15rem; font-weight: bold; margin: 0; max-width: 42ch; }

.study-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.study-count { color: var(--ink-soft); font-size: 0.88rem; min-width: 4.5em; text-align: center; }

/* ---------- viering bij juist antwoord -------------------------------------- */

.celebrate-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.celebrate-flash {
  position: absolute;
  width: 14px; height: 14px;
  margin-left: -7px; margin-top: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(240,166,59,0.55) 45%, transparent 72%);
  animation: pk-flash-pop 0.5s ease-out forwards;
}
@keyframes pk-flash-pop {
  0% { transform: scale(0); opacity: 1; }
  60% { transform: scale(6); opacity: 0.55; }
  100% { transform: scale(10); opacity: 0; }
}
.celebrate-confetti {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  animation: pk-confetti-fall var(--dur, 1.2s) cubic-bezier(.15,.8,.3,1) forwards;
}
@keyframes pk-confetti-fall {
  0% { transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  10% { opacity: 1; }
  45% { transform: translate(-50%, -50%) translate(var(--tx), var(--mty)) rotate(var(--rot1)) scale(1); }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--fty)) rotate(var(--rot2)) scale(0.9); opacity: 0; }
}
.celebrate-spark {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  animation: pk-spark-burst var(--dur, 0.6s) ease-out forwards;
}
@keyframes pk-spark-burst {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0.3); opacity: 0; }
}
.celebrate-ribbon {
  position: absolute;
  width: 28px; height: 4px;
  border-radius: 2px;
  pointer-events: auto;
  cursor: pointer;
  animation: pk-ribbon-fly var(--dur, 0.9s) ease-out forwards;
}
@keyframes pk-ribbon-fly {
  0% { transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scaleX(0.3); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scaleX(1); opacity: 0; }
}
.celebrate-piece {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  animation: pk-piece-burst var(--dur, 0.8s) ease-out forwards;
}
@keyframes pk-piece-burst {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot)); opacity: 0; }
}
.celebrate-clap {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  animation: pk-clap-pop var(--dur, 0.9s) ease-out forwards;
}
@keyframes pk-clap-pop {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(0.5); opacity: 0; }
  25% { opacity: 1; transform: translate(-50%, -50%) translate(calc(var(--tx) * 0.4), calc(var(--ty) * 0.4)) scale(1.3); }
  55% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0.95) rotate(-8deg); }
  75% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1.15) rotate(8deg); }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flashcard-inner { transition: none; }
  .sheet-card, .mode-card { transition: none; }
  .sheet-card,
  .hero-badge,
  .hero-route path,
  .hero-waypoint,
  .hero-sparkle,
  .hero-compass-needle,
  .hero-cloud,
  .hero-mascot,
  .hero-earth circle,
  .stat-icon-pulse,
  .stat-check-badge,
  .goal-item.goal-next .goal-check,
  .goal-item.goal-achieved .goal-check,
  .goal-item.goal-achieved .goal-check svg path,
  .legend-mascot svg,
  .mode-card,
  .flashcard,
  .progress-dots .dot-done,
  .progress-dots .dot-active,
  .option-wrong, .option-correct,
  .quiz-input.input-wrong, .quiz-input.input-correct,
  tr.row-wrong .table-input, tr.row-correct .table-input,
  .feedback-good, .feedback-bad,
  .quiz-card,
  .result-big {
    animation: none !important;
  }
  .btn:hover, .btn-primary:hover, .btn:active, .btn-primary:active { transform: none; }
  .topic-row:hover { transform: none; }
  .mode-card:hover { transform: none; }
  .mastery-fill { transition: none; }
  .sheet-progress-fill { transition: none; }
  .brand-mark img { transition: none; }
  .goal-item.goal-achieved .goal-check svg path { stroke-dashoffset: 0; }
}

/* ---------- quiz --------------------------------------------------------------- */

.quiz-score { color: var(--ink-soft); font-size: 0.9rem; }
.quiz-stage { display: flex; justify-content: center; }
@keyframes pk-quiz-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-card-map {
  width: min(100%, 760px);
}
.quiz-card {
  width: min(100%, 520px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-top: 5px solid var(--red);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 4px 14px rgba(29,53,87,0.08);
  animation: pk-quiz-in 0.35s ease;
}
.quiz-prompt { font-size: 1.25rem; font-weight: bold; margin: 4px 0 18px; }

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.option-btn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid var(--line-strong);
  background: #fff;
  font-size: 0.96rem;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.12s ease, transform 0.08s ease;
}
.option-btn:hover:not(:disabled) { border-color: var(--sky); transform: translateX(2px); }
.option-btn:disabled { cursor: default; }
@keyframes pk-pop-correct {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
@keyframes pk-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.option-correct { border-color: var(--correct); background: #e9f2ec; animation: pk-pop-correct 0.4s ease; }
.option-wrong { border-color: var(--red); background: #fbeaea; animation: pk-shake 0.45s ease; }

.quiz-input-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz-input {
  flex: 1;
  min-width: 180px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.quiz-input.input-correct { border-color: var(--correct); background: #e9f2ec; animation: pk-pop-correct 0.4s ease; }
.quiz-input.input-wrong { border-color: var(--red); background: #fbeaea; animation: pk-shake 0.45s ease; }

@keyframes pk-feedback-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-feedback { min-height: 1.4em; font-size: 0.94rem; font-weight: bold; }
.feedback-good { color: var(--correct); animation: pk-feedback-in 0.3s ease; }
.feedback-bad { color: var(--red); animation: pk-feedback-in 0.3s ease; }
.feedback-mastered { color: var(--amber-dark); animation: pk-feedback-in 0.3s ease; font-size: 1.02rem; }
.feedback-answer { text-decoration: underline; text-decoration-color: rgba(229,52,60,0.4); text-underline-offset: 2px; }

.quiz-next-holder { margin-top: 6px; }

.quiz-result { text-align: center; }
@keyframes pk-result-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.result-big { font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 2.8rem; font-weight: bold; background: linear-gradient(135deg, var(--red), var(--amber-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 2px; animation: pk-result-pop 0.5s cubic-bezier(.34,1.56,.64,1); }
.result-msg { color: var(--ink-soft); }
.missed-heading { font-weight: bold; margin-top: 14px; margin-bottom: 4px; }
.missed-list { text-align: left; max-width: 44ch; margin: 0 auto 14px; color: var(--ink-soft); font-size: 0.9rem; }
.missed-correct { color: var(--correct); font-weight: bold; }
.quiz-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }

/* ---------- juist/fout ------------------------------------------------------------ */

.tf-statement {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 4px 0 18px;
  line-height: 1.4;
}
.tf-buttons { display: flex; gap: 12px; margin-bottom: 14px; }
.tf-btn { flex: 1; text-align: center; font-weight: bold; border-width: 2px; }
.tf-buttons .tf-btn:first-child { color: var(--teal-dark); border-color: var(--teal); }
.tf-buttons .tf-btn:first-child:hover:not(:disabled) { background: rgba(31,122,108,0.08); transform: none; }
.tf-buttons .tf-btn:last-child { color: var(--red-dark); border-color: var(--red); }
.tf-buttons .tf-btn:last-child:hover:not(:disabled) { background: rgba(229,52,60,0.06); transform: none; }

/* ---------- tabeltoets -------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 10px 0 18px; }
.quiz-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
}
.quiz-table th, .quiz-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}
.quiz-table th {
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: bold;
  font-size: 0.82rem;
}
.table-term { font-weight: bold; white-space: nowrap; }
.table-input {
  width: 100%;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-family: inherit;
  font-size: 1rem; /* 16px: voorkomt dat iOS Safari automatisch inzoomt bij het focussen */
  transition: border-color 0.15s ease;
}
tr.row-correct .table-input { border-color: var(--correct); background: #e9f2ec; animation: pk-pop-correct 0.4s ease; }
tr.row-wrong .table-input { border-color: var(--red); background: #fbeaea; animation: pk-shake 0.45s ease; }
.table-correction { color: var(--red-dark); font-weight: bold; font-size: 0.88rem; }
.table-correction-ok { color: var(--correct); text-align: center; }

/* ---------- section headings (module overview) --------------------------------------- */

.section-heading {
  margin: 26px 0 4px;
  padding-top: 14px;
  border-top: 3px solid var(--sand);
  font-size: 1rem;
  color: var(--ink);
}
.topic-list + .section-heading { margin-top: 30px; }
.topic-kind-dot.kind-map { background: var(--red); }

/* ---------- kaartoefeningen (echte bundelkaarten, zonder coördinaten) ------------------- */

.mapimg-wrap {
  width: 100%;
  max-width: 100%;
  margin: 12px auto 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: #eef1ee;
  box-shadow: 0 4px 14px rgba(2,46,62,0.08);
  position: relative;
}
.mapimg-wrap-quiz { max-width: 100%; }
.mapimg-plain {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.mapimg-zoom-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(2,46,62,0.85);
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.mapimg-zoom-btn:hover { background: var(--red); }

/* marker die het gevraagde symbool aanduidt op de kaart tijdens het oefenen */
.map-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  pointer-events: none;
  z-index: 5;
}
.map-marker-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(2,46,62,0.35);
}
.map-marker-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  border: 2px solid var(--red);
  animation: pk-marker-pulse 1.8s ease-out infinite;
}
@keyframes pk-marker-pulse {
  0% { transform: scale(0.4); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .map-marker-ring { animation: none; opacity: 0.5; }
}

/* full-bleed kaart op smalle schermen: gebruikt de volledige breedte van het toestel */
@media (max-width: 700px) {
  .mapimg-wrap {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

.map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(1,26,36,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 12px 16px;
  touch-action: pinch-zoom;
}
.map-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.map-lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--red);
  color: #fff;
  font-family: inherit;
  font-weight: bold;
  font-size: 0.92rem;
  cursor: pointer;
}
body.lightbox-open { overflow: hidden; }

.map-legend-card { width: min(100%, 560px); margin: 0 auto; }
.map-prompt { font-weight: bold; font-size: 1.2rem; margin: 4px 0 14px; text-align: center; }
.map-capital-block { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }

@media (max-width: 480px) {
  .map-prompt { font-size: 1.05rem; }
}

/* ---------- footer -------------------------------------------------------------- */

.site-footer {
  border-top: 3px solid var(--sand);
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.footer-mascot { display: block; font-size: 1.6rem; margin-bottom: 4px; }
.footer-credit {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.88rem;
}

/* ---------- focus & accessibility ------------------------------------------------ */

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* ==========================================================================
   Nieuw: volledige leeromgeving (leren/oefenen/fouten/testen/onderhoud)
   ========================================================================== */

.footer-teacher-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.cta-strip {
  text-align: center;
  margin: 0 0 32px;
}
.btn-hero { padding: 15px 28px; font-size: 1.05rem; }

/* ---------- hoe werkt het (home) ---------- */
.howitworks {
  margin: 26px 0;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.howitworks h3 { margin-bottom: 14px; }
.howitworks-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.howitworks-step { text-align: left; }
.howitworks-icon {
  width: 34px; height: 34px;
  padding: 7px;
  border-radius: 9px;
  background: var(--paper);
  color: var(--teal);
  margin-bottom: 8px;
}
.howitworks-step:nth-child(1) .howitworks-icon { color: var(--ink); background: rgba(2,46,62,0.08); }
.howitworks-step:nth-child(2) .howitworks-icon { color: var(--teal); background: rgba(31,122,108,0.1); }
.howitworks-step:nth-child(3) .howitworks-icon { color: var(--red); background: rgba(229,52,60,0.1); }
.howitworks-step:nth-child(4) .howitworks-icon { color: var(--amber-dark); background: rgba(201,147,46,0.12); }
.howitworks-step:nth-child(5) .howitworks-icon { color: var(--violet); background: rgba(132,82,173,0.12); }
.howitworks-step strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.howitworks-step p { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- mijn voortgang / snelkoppelingen (home) ---------- */
.progress-panel {
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.progress-panel h3 { margin-bottom: 12px; }
.progress-panel-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.module-bars { margin: 10px 0 18px; }
.labeled-bar-head {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; font-weight: bold; color: var(--ink-soft);
  margin-bottom: 4px;
}
.labeled-bar-track {
  height: 9px; border-radius: 999px; background: var(--line); overflow: hidden;
}
.labeled-bar-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(.22,.9,.3,1); }
.labeled-bar-fill.bar-practiced { background: var(--amber); }
.labeled-bar-fill.bar-mastered { background: var(--teal); }

.quick-links { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: bold;
}
.quick-link svg { width: 18px; height: 18px; }
.quick-link-fouten { color: var(--red-dark); border-color: rgba(229,52,60,0.35); }
.quick-link-onderhoud { color: var(--teal-dark); border-color: rgba(31,122,108,0.35); }
.quick-link-count {
  background: currentColor;
  color: var(--card);
  border-radius: 999px;
  min-width: 22px;
  padding: 1px 7px;
  font-size: 0.78rem;
  text-align: center;
}
.quick-link-empty { opacity: 0.55; }

/* ---------- "Ga verder waar je gebleven was" (startpagina) ---------- */
.continue-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(31,122,108,0.35);
  background: linear-gradient(135deg, rgba(31,122,108,0.12), rgba(47,134,201,0.1));
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.continue-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31,122,108,0.18); }
.continue-icon {
  flex: none;
  width: 34px; height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
}
.continue-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.continue-kicker { font-size: 0.76rem; font-weight: bold; color: var(--teal-dark); text-transform: uppercase; letter-spacing: 0.02em; }
.continue-text strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-arrow { flex: none; font-size: 1.3rem; color: var(--teal-dark); font-weight: bold; }

/* ---------- actierij: onderhoud (prominent) + mijn fouten ---------- */
.action-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin: 0 0 26px;
  align-items: stretch;
}
.maintenance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--line-strong);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.maintenance-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(2,46,62,0.16); }
.maintenance-icon {
  flex: none;
  width: 46px; height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(31,122,108,0.12);
  color: var(--teal);
}
.maintenance-text { flex: 1; min-width: 0; }
.maintenance-text strong { display: block; font-size: 1.1rem; font-family: "Atkinson Hyperlegible", Verdana, sans-serif; }
.maintenance-text p { margin: 2px 0 0; font-size: 0.84rem; color: var(--ink-soft); }
.maintenance-count {
  flex: none;
  min-width: 2.4em;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-soft);
  font-weight: bold;
  font-size: 1rem;
}
.maintenance-card-due {
  border-color: var(--teal);
  background: linear-gradient(135deg, rgba(31,122,108,0.1), var(--card) 65%);
}
.maintenance-count-due {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(31,122,108,0.5);
  animation: pk-maintenance-pulse 2s ease-in-out infinite;
}
@keyframes pk-maintenance-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,122,108,0.45); }
  50% { box-shadow: 0 0 0 7px rgba(31,122,108,0); }
}
.action-row .quick-link-fouten { justify-content: center; }
@media (max-width: 640px) {
  .action-row { grid-template-columns: 1fr; }
  .action-row .quick-link { justify-content: flex-start; }
}

/* ---------- uitklapbaar "hoe werkt het / mijn cijfers" (startpagina) ---------- */
.home-more {
  margin: 30px 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
  overflow: hidden;
}
.home-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 20px;
  font-weight: bold;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-more > summary::-webkit-details-marker { display: none; }
.home-more > summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--ink-soft);
  transition: transform 0.15s ease;
}
.home-more[open] > summary::after { transform: rotate(180deg); }
.home-more > summary:hover { background: var(--paper); }
.home-more-inner { padding: 4px 20px 22px; }
.home-more .howitworks { border: none; padding: 0; margin: 8px 0 24px; background: none; }
.home-more .stats-strip { margin-bottom: 24px; }
.home-more .progress-panel-bars { margin-bottom: 24px; }

/* ---------- dubbele voortgangsbalk (geoefend + beheerst) ---------- */
.sheet-progress-double { position: relative; height: 9px; background: rgba(2,46,62,0.08); }
.sheet-progress-fill.fill-practiced { position: absolute; left: 0; top: 0; background: var(--amber); opacity: 0.55; }
.sheet-progress-fill.fill-mastered { position: absolute; left: 0; top: 0; background: var(--teal); }

.mastery-double { position: relative; }
.mastery-fill.fill-practiced { position: absolute; left: 0; top: 0; background: var(--amber); opacity: 0.55; }
.mastery-fill.fill-mastered { position: absolute; left: 0; top: 0; background: var(--teal); }

/* ---------- voortgang-chips (onderdeel-hub) ---------- */
.progress-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.progress-chip {
  font-size: 0.8rem; font-weight: bold;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.progress-chip.chip-mastered { color: var(--teal-dark); border-color: rgba(31,122,108,0.35); }
.progress-chip.chip-practicing { color: var(--amber-dark); border-color: rgba(201,147,46,0.35); }
.progress-chip.chip-due { color: var(--red-dark); border-color: rgba(229,52,60,0.35); }

/* ---------- onderdeel-hub: leren / oefenen / fouten / testen ---------- */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.stage-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stage-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(29,53,87,0.16); }
.stage-num {
  position: absolute; top: 12px; right: 14px;
  font-size: 0.72rem; font-weight: bold;
  color: var(--ink-soft);
}
.stage-icon {
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--paper);
  color: var(--teal);
}
.stage-card:nth-child(1) .stage-icon { color: var(--ink); background: rgba(2,46,62,0.08); }
.stage-card:nth-child(2) .stage-icon { color: var(--teal); background: rgba(31,122,108,0.1); }
.stage-card:nth-child(3) .stage-icon { color: var(--red); background: rgba(229,52,60,0.1); }
.stage-card:nth-child(4) .stage-icon { color: var(--amber-dark); background: rgba(201,147,46,0.12); }
.stage-card:nth-child(5) .stage-icon { color: var(--violet); background: rgba(132,82,173,0.12); }
.stage-card p { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }

/* ---------- stepper: leren → oefenen → fouten → testen (onderdeel-hub) ---------- */
.stepper {
  position: relative;
}
@media (min-width: 640px) {
  .stepper {
    padding-top: 6px;
  }
  .stepper::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 8%;
    right: 8%;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px);
    z-index: 0;
  }
  .stepper .stage-card { z-index: 1; }
}
.stage-card-recommended {
  border-color: var(--red);
  border-width: 2px;
  box-shadow: 0 10px 24px rgba(229,52,60,0.16);
  transform: translateY(-2px);
}
.stage-card-recommended .stage-icon { color: var(--red) !important; background: rgba(229,52,60,0.12) !important; }
.stage-recommended {
  position: absolute;
  top: -12px;
  left: 14px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(229,52,60,0.35);
}
.stage-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem; font-weight: bold;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
}
.stage-badge-zero { background: var(--line); color: var(--ink-soft); }
.small-heading { margin-top: 26px; }
.mode-grid-compact { margin-top: 10px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.empty-state-icon { font-size: 2.4rem; margin-bottom: 10px; }

.quiz-card-thumb {
  display: block;
  max-width: 220px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  margin-bottom: 10px;
}

/* ---------- levend gevoel tijdens het oefenen: reeks + beheersingsmeter ---------- */
.quiz-live-streak {
  min-height: 1.2em;
  font-weight: bold;
  color: var(--amber-dark);
  margin: -4px 0 8px;
  font-size: 0.9rem;
}
.quiz-live-streak-on { animation: pk-feedback-in 0.3s ease; }

.graad-panel {
  margin-top: 30px;
  padding: 20px 20px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  border-top-width: 6px;
}
.graad-panel-eerste { background: rgba(47,134,201,0.14); border-color: var(--sky); }
.graad-panel-tweede { background: rgba(31,122,108,0.14); border-color: var(--teal); }
.graad-panel .graad-heading { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.graad-panel .graad-heading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.graad-panel-eerste .graad-heading::before { background: var(--sky); }
.graad-panel-tweede .graad-heading::before { background: var(--teal); }
.graad-note { color: var(--ink-soft); font-size: 0.88rem; margin-top: -8px; }
.graad-panel .sheet-grid { margin-top: 16px; }
.graad-panel + .goals-panel { margin-top: 30px; }

.level-chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  background: var(--paper);
  color: var(--ink-soft);
}
.level-chip.level-easy { color: var(--teal-dark); background: rgba(31,122,108,0.12); }
.level-chip.level-mid { color: var(--amber-dark); background: rgba(201,147,46,0.14); }
.level-chip.level-hard { color: var(--red-dark); background: rgba(229,52,60,0.12); }

.mastery-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.mastery-meter-done { color: var(--teal-dark); font-weight: bold; }
.meter-dots { display: inline-flex; gap: 4px; }
.meter-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.meter-dot-on { background: var(--teal); }

.result-mastered-banner {
  margin-top: 4px;
  padding: 10px 14px;
  background: rgba(201,147,46,0.14);
  border: 1px solid rgba(201,147,46,0.4);
  border-radius: 8px;
  color: var(--amber-dark);
  font-weight: bold;
  font-size: 0.92rem;
}
.result-streak-banner {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: bold;
}

/* ---------- leerkrachtoverzicht ---------- */
.teacher-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 6px 0 20px;
}
.teacher-summary-tile {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
  text-align: center;
}
.teacher-summary-value { display: block; font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 1.5rem; font-weight: bold; color: var(--ink); }
.teacher-summary-label { display: block; font-size: 0.76rem; color: var(--ink-soft); margin-top: 2px; }
.teacher-summary-tile-warn { border-color: rgba(229,52,60,0.4); background: rgba(229,52,60,0.06); }
.teacher-summary-tile-warn .teacher-summary-value { color: var(--red-dark); }

.teacher-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.teacher-section-head .section-heading { margin: 0; padding-top: 0; border-top: none; flex: 1; min-width: 200px; }

.teacher-sort-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--ink-soft);
  white-space: nowrap;
}
.teacher-th-active .teacher-sort-btn { color: var(--ink); }
.teacher-sort-btn:hover { color: var(--red); }

.projector-overlay { padding: 30px 20px; }
.projector-inner {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 30px 36px;
  max-width: 760px;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
}
.projector-inner h2 { font-size: 1.8rem; margin-bottom: 18px; }
.projector-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 14px; }
.projector-list li { font-size: 1.3rem; font-weight: bold; }
.projector-meta { display: block; font-size: 0.9rem; font-weight: normal; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 600px) {
  .projector-inner { padding: 22px 20px; }
  .projector-inner h2 { font-size: 1.4rem; }
  .projector-list li { font-size: 1.05rem; }
}

.teacher-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-danger {
  background: #fff;
  border: 1px solid var(--red);
  color: var(--red-dark);
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-danger:disabled { opacity: 0.6; cursor: default; }
.view-teacher .teacher-table th, .view-teacher .teacher-table td { text-align: left; }
.teacher-table tr.row-warn td { background: rgba(201,147,46,0.12); }
.teacher-table tr.row-wrong td { background: rgba(229,52,60,0.12); }
.teacher-table tr.row-good td { background: rgba(31,122,108,0.08); }
.teacher-table tfoot td { font-weight: bold; border-top: 2px solid var(--line-strong); }
.teacher-expand-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: bold;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.teacher-expand-btn:hover { color: var(--red); }
.teacher-detail-row td { padding: 0 0 16px; border: none; }
.teacher-detail {
  margin: 4px 0 8px 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--line-strong);
  background: var(--card);
}
.teacher-table-detail { font-size: 0.92rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .quiz-card, .flashcard { padding: 16px; }
  .flashcard { height: 200px; }
  .stage-grid { grid-template-columns: 1fr; }
}

/* ---------- mobiele optimalisaties (leerlingen gebruiken dit vooral op de smartphone) ---------- */
@media (max-width: 640px) {
  main { padding: 18px 16px 70px; }
  .site-header-inner { padding: 10px 16px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text strong { font-size: 0.92rem; }
  .brand-text span { font-size: 0.7rem; }
  .hero-content { padding: 18px 18px 20px; }
  .hero-content h1 { font-size: 1.45rem; }
  .hero-sub { font-size: 0.92rem; }

  /* grotere tapdoelen: minstens ~44px hoog, zoals aanbevolen voor touch */
  .btn { padding: 12px 16px; min-height: 44px; }
  .option-btn { padding: 14px 14px; min-height: 46px; }
  .tf-btn { padding: 14px; min-height: 46px; }
  .quiz-input, .table-input { padding: 12px 14px; }
  .mode-card, .stage-card { padding: 16px; }
  .quick-link, .maintenance-card, .continue-card { min-height: 44px; }
  .mapimg-zoom-btn { padding: 10px 16px; }
  .map-lightbox-close { padding: 12px 18px; }
  .teacher-expand-btn { padding: 6px 0; display: inline-block; }

  /* stepper-verbindingslijn heeft geen zin als de kaartjes toch onder
     elkaar staan op een smal scherm */
  .stepper::before { display: none; }
  .action-row { gap: 10px; }
}

/* ==========================================================================
   Spelletjes: snelheidsronde, medailles en memory (assets/spelletjes.js)
   ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- blok "Even spelen" op de startpagina ---------- */
.games-panel {
  margin-top: 30px;
  padding: 20px 20px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--amber);
  border-top-width: 6px;
  background: rgba(201,147,46,0.13);
}
.games-panel .graad-heading { margin-top: 0; border-top: 0; padding-top: 0; font-size: 1.3rem; }
.games-panel .graad-heading::before { background: var(--amber); }
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.game-tile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line-strong);
  color: var(--ink); text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.game-tile strong { font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 1.15rem; }
.game-tile span:last-child { color: var(--ink-soft); font-size: 0.92rem; }
.game-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(2,46,62,0.14); }
.game-tile-speed:hover { border-color: var(--red); }
.game-tile-memory:hover { border-color: var(--sky); }
.game-tile-icon { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
@media (max-width: 600px) { .games-grid { grid-template-columns: 1fr; } }

/* ---------- kiesscherm (welk kaartblad / welk memory) ---------- */
.game-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.game-pick {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line-strong); border-left: 6px solid var(--red);
  color: var(--ink); text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.game-pick:hover { transform: translateY(-2px); border-color: var(--red); }
.game-pick-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.game-pick-desc { font-size: 0.88rem; color: var(--ink-soft); }
.game-pick-record { margin-top: auto; padding-top: 6px; font-size: 0.88rem; font-weight: bold; color: var(--amber-dark); }
.game-pick-record-empty { color: var(--ink-soft); font-weight: normal; }

/* ---------- knoppen op een kaartblad ---------- */
.module-games { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.btn-game { border-color: var(--amber); }
.btn-game:hover { border-color: var(--amber-dark); color: var(--amber-dark); }

/* ---------- snelheidsronde ---------- */
.speed-intro-card, .speed-result {
  background: var(--card); border: 1px solid var(--line-strong); border-top: 6px solid var(--red);
  border-radius: 12px; padding: 26px; margin: 16px 0 20px; text-align: center;
  max-width: 520px;
}
.speed-intro-card p, .speed-result p { margin-left: auto; margin-right: auto; }
.speed-intro-big {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 4rem; font-weight: bold; line-height: 1;
  color: var(--red);
}
.speed-intro-unit { color: var(--ink-soft); margin-top: 4px; }
.speed-intro-record, .speed-result-line { font-weight: bold; }
.speed-intro-tip, .speed-result-meta { font-size: 0.86rem; color: var(--ink-soft); }
.speed-result-record { border-top-color: var(--amber); box-shadow: 0 0 0 4px rgba(201,147,46,0.25); }
.speed-countdown {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-weight: bold;
  font-size: 7rem; color: var(--red); text-align: center; padding: 60px 0;
}
.speed-countdown-tick { animation: pk-result-pop 0.5s cubic-bezier(.34,1.56,.64,1); }
.speed-hud {
  position: sticky; top: 0; z-index: 5;
  background: var(--paper); padding: 10px 0 12px; margin-bottom: 8px;
}
.speed-hud-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: bold; font-size: 1.1rem; }
.speed-hud-item { white-space: nowrap; }
.speed-combo { color: var(--amber-dark); font-size: 0.95rem; }
.speed-score { display: inline-block; }
.speed-bump { animation: pk-result-pop 0.35s ease; }
.speed-time-track { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.speed-time-fill { height: 100%; width: 100%; background: var(--teal); border-radius: 6px; transition: width 0.1s linear, background-color 0.3s ease; }
.speed-time-fill.speed-time-low { background: var(--red); }
.speed-card { border-top-color: var(--amber); }
.speed-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 10px; border-radius: 5px;
  background: var(--paper); border: 1px solid var(--line-strong);
  font-size: 0.78rem; font-weight: bold; color: var(--ink-soft); vertical-align: 1px;
}
.speed-miss-list { list-style: none; padding: 0; margin: 10px 0 0; max-width: 620px; }
.speed-miss-list li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--card);
}
.speed-miss-list li:first-child { border-radius: 8px 8px 0 0; }
.speed-miss-list li:last-child { border-radius: 0 0 8px 8px; border-bottom: 0; }
.speed-miss-list strong { color: var(--correct); text-align: right; }

/* ---------- medailles ---------- */
.medal-row { display: inline-flex; gap: 4px; margin-top: 8px; }
.medal-mini { width: 20px; height: 24px; opacity: 0.55; }
.medal-mini.medal-earned { opacity: 1; }
.medal-panel {
  margin: 20px 0 6px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line);
}
.medal-heading { font-size: 1rem; margin: 0 0 12px; }
.medal-list { display: flex; gap: 12px; flex-wrap: wrap; }
.medal-item {
  flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; border-radius: 8px; background: var(--paper); text-align: center;
}
.medal-icon { width: 44px; height: 53px; }
.medal-item.medal-earned .medal-icon { animation: pk-result-pop 0.6s cubic-bezier(.34,1.56,.64,1); }
.medal-locked strong, .medal-locked .medal-target { color: var(--ink-soft); }
.medal-target { font-size: 0.8rem; color: var(--ink-soft); }
.medal-earned.medal-brons { background: #f7ebdf; }
.medal-earned.medal-zilver { background: #eef2f4; }
.medal-earned.medal-goud { background: #fbf1d4; }
.medal-next { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.medal-toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 12px;
  width: min(calc(100% - 32px), 460px);
  padding: 12px 14px; border-radius: 12px;
  background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(2,46,62,0.35);
  animation: pk-toast-in 0.4s cubic-bezier(.34,1.56,.64,1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.medal-toast strong { flex: 1; }
.medal-toast-icon { width: 34px; height: 41px; flex: none; }
.medal-toast-close { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.medal-toast-out { opacity: 0; transform: translate(-50%, 20px); }
@keyframes pk-toast-in { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- confetti ---------- */
.game-burst { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.game-burst-piece {
  position: absolute; top: 70%; width: 10px; height: 14px; border-radius: 2px;
  animation: pk-burst 1.5s cubic-bezier(.2,.7,.4,1) forwards;
}
@keyframes pk-burst {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 420px)) rotate(var(--rot)); opacity: 0; }
}

/* ---------- memory ---------- */
.mem-hud {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  margin: 10px 0 14px; padding: 10px 14px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line-strong); font-size: 0.95rem;
}
.mem-hud-record { margin-left: auto; color: var(--amber-dark); font-weight: bold; }
.mem-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mem-grid-8 { grid-template-columns: repeat(4, 1fr); }
.mem-grid-16 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) {
  .mem-grid, .mem-grid-16 { grid-template-columns: repeat(4, 1fr); gap: 7px; }
}
.mem-card {
  position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none;
  cursor: pointer; perspective: 800px; font: inherit; color: var(--ink);
}
.mem-grid-map .mem-card { aspect-ratio: 1 / 1; }
.mem-inner {
  position: absolute; inset: 0; display: block;
  transition: transform 0.45s ease; transform-style: preserve-3d;
}
.mem-open .mem-inner, .mem-done .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front {
  position: absolute; inset: 0; border-radius: 10px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mem-back {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 28%, rgba(255,255,255,0.18) 28% 30%, transparent 30% 44%, rgba(255,255,255,0.14) 44% 46%, transparent 46%),
    linear-gradient(135deg, var(--ink) 0%, #0b4a60 100%);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(2,46,62,0.25);
  transition: transform 0.12s ease;
}
.mem-card:hover .mem-back { transform: translateY(-2px); }
.mem-back-mark {
  width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-weight: bold; font-size: 1.3rem;
}
.mem-front {
  transform: rotateY(180deg); background: var(--card);
  border: 2px solid var(--line-strong); padding: 6px; gap: 4px; text-align: center; overflow: hidden;
}
.mem-kind-a .mem-front { border-top: 6px solid var(--teal); }
.mem-kind-b .mem-front { border-top: 6px solid var(--sky); }
.mem-face-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.mem-face-text { font-weight: bold; font-size: 0.9rem; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.mem-map { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 4px; }
.mem-map img { display: block; max-width: none; height: auto; }
.mem-map-dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 3px solid var(--red); background: rgba(229,52,60,0.25);
  box-shadow: 0 0 0 2px #fff;
}
.mem-done .mem-front { border-color: var(--correct); background: #e9f2ec; }
.mem-done { cursor: default; }
.mem-miss .mem-front { border-color: var(--red); }
.mem-miss { animation: pk-shake 0.45s ease 0.45s; }
.mem-result { margin-top: 0; }
.mem-result-title { font-weight: bold; font-size: 1.1rem; }
.mem-actions { margin-top: 20px; }
@media (max-width: 560px) {
  .mem-face-text { font-size: 0.72rem; }
  .mem-front { padding: 4px 3px; }
  .mem-map-dot { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-width: 2px; }
  .mem-face-label { font-size: 0.58rem; }
  .speed-intro-big { font-size: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mem-inner { transition: none; }
  .medal-toast, .speed-bump, .speed-countdown-tick, .medal-item.medal-earned .medal-icon { animation: none; }
}

/* Snelheidsronde: kaart iets kleiner, zodat de antwoorden zonder scrollen
   zichtbaar blijven. De omhulling krimpt mee met de afbeelding, zodat het
   rode rondje (in % van de omhulling) op dezelfde plek blijft staan. */
.speed-card .mapimg-wrap { width: fit-content; margin: 0 auto 14px; }
.speed-card .mapimg-plain { width: auto; max-width: 100%; max-height: 42vh; }
.speed-card .mapimg-zoom-btn { display: none; }
.speed-card { padding: 20px 22px; }
.speed-card .quiz-prompt { margin-bottom: 12px; }

.mem-grid { max-width: 760px; }
.mem-grid-8 { max-width: 560px; }

@media (min-width: 900px) {
  .speed-card.quiz-card-map {
    width: min(100%, 980px);
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    column-gap: 24px; align-content: start;
  }
  .speed-card.quiz-card-map > .mapimg-wrap { grid-row: 1 / span 4; margin: 0; align-self: start; }
  .speed-card.quiz-card-map .mapimg-plain { max-height: 62vh; }
}

/* ==========================================================================
   Leerkrachtoverzicht (tv-): top 10 en inklapbare kaartbladen met balkjes
   ========================================================================== */
.tv-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.tv-toolbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tv-filter { display: inline-flex; background: var(--card); border: 2px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tv-filter-btn {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-size: 0.9rem; color: var(--ink-soft);
}
.tv-filter-btn:hover { color: var(--ink); }
.tv-filter-active { background: var(--ink); color: #fff; }
.tv-filter-active:hover { color: #fff; }

.tv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.tv-tile { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px; }
.tv-tile-value { display: block; font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 1.7rem; font-weight: bold; line-height: 1.15; }
.tv-tile-value-sm { font-size: 1.15rem; }
.tv-tile-label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 640px) { .tv-tiles { grid-template-columns: 1fr; } }

.tv-h2 { font-size: 1.2rem; margin: 30px 0 2px; }
.tv-note { font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 10px; }
.tv-empty { padding: 20px; background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.tv-sub { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: normal; }

/* balkje met % fout */
.tv-bar-wrap { display: grid; grid-template-columns: 110px auto; column-gap: 10px; align-items: center; justify-self: end; }
.tv-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.tv-bar-fill { display: block; height: 100%; border-radius: 5px; }
.tv-bad { background: var(--red); }
.tv-mid { background: var(--amber); }
.tv-good { background: var(--teal); }
.tv-text-bad { color: var(--red-dark); }
.tv-text-mid { color: var(--amber-dark); }
.tv-text-good { color: var(--teal-dark); }
.tv-bar-pct { font-weight: bold; font-size: 0.9rem; white-space: nowrap; min-width: 70px; }
.tv-bar-extra { grid-column: 1 / -1; font-size: 0.76rem; color: var(--ink-soft); text-align: right; margin-top: 2px; }

/* top 10 */
.tv-top { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.tv-top-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tv-top-row:last-child { border-bottom: 0; }
.tv-rank {
  width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.85rem;
}
.tv-top-row:nth-child(-n+3) .tv-rank { background: var(--red); border-color: var(--red); color: #fff; }

/* per kaartblad */
.tv-module { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.tv-module-head {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px 14px 40px; cursor: pointer; list-style: none; position: relative;
}
.tv-module-head::-webkit-details-marker { display: none; }
.tv-module-head::before { content: "▸"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.tv-module[open] > .tv-module-head::before { content: "▾"; }
.tv-module-head:hover { background: var(--paper); }
.tv-module[open] > .tv-module-head { border-bottom: 1px solid var(--line); }
.tv-module-label { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-right: 8px; }
.tv-module-title strong { font-size: 1.05rem; }
.tv-onderdelen { list-style: none; margin: 0; padding: 4px 0; }
.tv-onderdeel { border-bottom: 1px solid var(--line); }
.tv-onderdeel:last-child { border-bottom: 0; }
.tv-onderdeel-btn {
  width: 100%; display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 16px 10px 22px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font-size: 0.95rem;
}
.tv-onderdeel-btn:hover { background: var(--paper); }
.tv-chevron { color: var(--ink-soft); }
.tv-detail { padding: 4px 16px 14px 50px; background: #fafbfa; }
.tv-items { list-style: none; margin: 0; padding: 0; }
.tv-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.tv-item:last-child { border-bottom: 0; }
.tv-hidden { display: none; }
.tv-more { margin-top: 8px; background: none; border: 0; color: var(--red); cursor: pointer; font-size: 0.88rem; text-decoration: underline; padding: 4px 0; }
.tv-untouched { margin-top: 16px; }

.tv-footer { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); }
.tv-reset { background: none; border: 0; padding: 4px 0; color: var(--ink-soft); font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.tv-reset:hover { color: var(--red-dark); }

@media (max-width: 600px) {
  .tv-toolbar { flex-direction: column; align-items: stretch; }
  .tv-filter { justify-content: center; }
  .tv-top-row { grid-template-columns: 28px 1fr; }
  .tv-top-row .tv-bar-wrap, .tv-module-head .tv-bar-wrap, .tv-onderdeel-btn .tv-bar-wrap, .tv-item .tv-bar-wrap { grid-column: 2 / -1; justify-self: stretch; grid-template-columns: 1fr auto; }
  .tv-module-head { grid-template-columns: 1fr; }
  .tv-module-head .tv-bar-wrap { grid-column: 1; }
  .tv-onderdeel-btn { grid-template-columns: 18px 1fr; }
  .tv-item { grid-template-columns: 1fr; gap: 4px; }
  .tv-item .tv-bar-wrap { grid-column: 1; }
  .tv-detail { padding-left: 22px; }
}
@media (max-width: 600px) {
  .tv-filter { border-radius: 14px; }
  .tv-tiles { grid-template-columns: 1fr 1fr; }
  .tv-tiles .tv-tile:last-child { grid-column: 1 / -1; }
  .tv-tile-value { font-size: 1.4rem; }
}
