/*
 * krabbenkreek.css — gedeelde stijlen voor alle interactieve biologie-tools
 * Serveer dit bestand vanuit de root van krabbenkreek.nl.
 * Verwijs ernaar vanuit elke HTML-pagina met: <link rel="stylesheet" href="/krabbenkreek.css">
 *
 * Lettertypen zijn hier ingeladen — geen losse <link> tags in de HTML meer nodig.
 * Kleurvariabelen worden per pagina ingesteld in een klein <style>:root{...}</style> blok.
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
 *   --bg         achtergrondkleur body
 *   --paper      kaartachtergrond (wit of bijna-wit)
 *   --ink        hoofdtekstkeur
 *   --ink-soft   secondaire tekst
 *   --line       randkleur
 *   --bin-dark   donkere accentkleur (banner)
 *   --bin-mid    middentoon (sub-banner, knoppen)
 *   --bin-pale   lichte accentkleur (kaarten, info-panelen)
 *   --atp        goudgele accentkleur voor oefenvragen-knop (#E8B339)
 *   --good       groen voor correct antwoord (#2E8B4F)
 *   --good-bg    licht groen (#E3F4E8)
 *   --bad        rood voor fout antwoord (#C0433F)
 *   --bad-bg     licht rood (#FBE6E5)
 *   --exam-col   paars voor examenvraag-systeem (#7052B0)
 *   --exam-pale  licht paars (#F2EEF9)
 */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  padding: 0 0 60px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   BANNER (donkere topbalk)
   ============================================================ */
.banner { background: var(--bin-dark); color: #fff; padding: 14px 24px; }
.banner-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.banner h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2.6vw, 25px);
  margin: 0;
  letter-spacing: -0.01em;
}
.banner-right { display: flex; align-items: center; gap: 12px; }

.home-btn, .back-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.55);
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 7px 13px; border-radius: 7px;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease;
}
.home-btn:hover, .back-btn:hover { background: rgba(255,255,255,.15); }
.home-btn:focus-visible, .back-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.badge {
  font-family: 'IBM Plex Mono', monospace;
  background: #fff; color: var(--bin-dark);
  font-weight: 600; font-size: 18px;
  padding: 5px 12px; border-radius: 4px;
}

/* ============================================================
   SUB-BANNER (lichtere balk onder banner)
   ============================================================ */
.sub-banner { background: var(--bin-mid); color: #fff; padding: 9px 24px; }
.sub-banner-inner {
  max-width: 1080px; margin: 0 auto;
  font-size: 15px; opacity: .96;
  display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
}

/* ============================================================
   NAV-KNOPPEN in sub-banner (Voorbeelden / Oefenvragen)
   ============================================================ */
.nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 7px;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: opacity .15s ease;
}
.nav-btn:hover { opacity: .85; }
.nav-btn.voorbeelden { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.nav-btn.oefenvragen { background: var(--atp, #E8B339); color: #2B2200; }

/* ============================================================
   INTRO HEADER
   ============================================================ */
header.intro { padding: 28px 24px 6px; max-width: 1080px; margin: 0 auto; }
.sub { font-size: 16.5px; color: var(--ink-soft); max-width: 760px; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.tab-btn {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 16px;
  cursor: pointer; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 15px; font-weight: 500; color: var(--ink);
  transition: border-color .15s, transform .1s;
}
.tab-btn.active { border-color: var(--ink); transform: translateY(-1px); }
.tab-btn:focus-visible { outline: 2px solid var(--bin-dark); outline-offset: 2px; }
.panel { display: none; margin-top: 20px; }
.panel.active { display: block; }

/* ============================================================
   MODE TOGGLE + STEP CONTROLS
   ============================================================ */
.mode-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.mode-pill {
  display: inline-flex;
  border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; background: var(--paper);
}
.mode-pill button {
  border: none; background: none;
  padding: 10px 18px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer; color: var(--ink-soft);
}
.mode-pill button.selected { background: var(--bin-dark); color: #fff; }

.step-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.step-controls button {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 9px 15px; border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper); cursor: pointer;
  transition: background .12s;
}
.step-controls button:disabled { opacity: .35; cursor: not-allowed; }
.step-controls button.primary { background: var(--bin-dark); color: #fff; border-color: var(--bin-dark); }
.step-counter { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink-soft); }

/* ============================================================
   FLOW / PATHWAY NODES
   ============================================================ */
.flow-card {
  margin-top: 20px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 22px;
}
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; justify-content: center; }
.node {
  width: 162px; min-height: 118px;
  background: var(--bin-pale); border: 2px solid var(--bin-mid);
  border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  cursor: pointer; margin: 6px;
  transition: transform .12s ease, box-shadow .15s ease;
}
.node:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(0,0,0,.3); }
.node.active { border-color: #C0433F; box-shadow: 0 0 0 3px rgba(192,67,63,.22); }
.node.done { opacity: .55; }
.node.locked { opacity: .35; cursor: not-allowed; pointer-events: none; }
.node .ntitle { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13.5px; }
.node .nform { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.node .nloc { font-size: 10.5px; color: var(--bin-dark); margin-top: 6px; font-style: italic; }
.arrow { display: flex; align-items: center; color: var(--bin-mid); font-size: 22px; padding: 0 2px; }

/* ============================================================
   INFO PANEL
   ============================================================ */
.info-panel {
  margin-top: 18px; background: var(--bin-pale);
  border: 1px solid var(--line); border-left: 4px solid var(--bin-mid);
  border-radius: 8px; padding: 16px 18px;
  font-size: 15px; min-height: 54px;
}
.info-panel b { color: var(--bin-dark); }

/* ============================================================
   SCORE BAR
   ============================================================ */
.score-bar {
  position: sticky; top: 0; z-index: 20;
  margin-top: 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  box-shadow: 0 8px 20px -16px rgba(0,0,0,.25);
}
.score-label { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; }
.score-num { font-family: 'IBM Plex Mono', monospace; color: var(--bin-dark); font-weight: 600; }
.score-bar > button {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bin-pale); cursor: pointer; color: var(--bin-dark);
}

/* ============================================================
   QUESTION CARDS
   ============================================================ */
.q-card {
  margin-top: 26px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 26px;
}
.q-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.q-num { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 600; color: var(--bin-dark); }
.q-type {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  background: var(--bin-pale); color: var(--bin-dark);
  padding: 3px 8px; border-radius: 5px;
}
.q-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin: 0 0 12px; }
.scenario {
  background: var(--bin-pale); border-left: 4px solid var(--bin-mid);
  border-radius: 6px; padding: 11px 14px;
  font-size: 15px; margin-bottom: 14px;
}
.q-text { font-weight: 500; font-size: 15.5px; margin-bottom: 10px; }

/* Multiple choice */
.options-col { display: flex; flex-direction: column; gap: 8px; }
.option-btn {
  text-align: left; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); cursor: pointer; color: var(--ink);
  transition: border-color .12s;
}
.option-btn:hover:not(:disabled) { border-color: var(--bin-mid); }
.option-btn:disabled { cursor: default; }
.option-btn.correct { background: var(--good-bg, #E3F4E8); border-color: var(--good, #2E8B4F); color: var(--good, #2E8B4F); font-weight: 600; }
.option-btn.incorrect { background: var(--bad-bg, #FBE6E5); border-color: var(--bad, #C0433F); color: var(--bad, #C0433F); font-weight: 600; }

/* Open questions */
.open-area {
  width: 100%; min-height: 90px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; background: var(--bg);
  resize: vertical; margin-bottom: 10px;
}
.show-answer-btn {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 14px;
  padding: 9px 14px; border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bin-pale); cursor: pointer; color: var(--bin-dark);
}
.model-answer {
  margin-top: 10px;
  background: var(--good-bg, #E3F4E8);
  border: 1px solid var(--good, #2E8B4F);
  border-radius: 8px; padding: 12px 14px;
  font-size: 14.5px; display: none;
}
.model-answer.show { display: block; }
.model-answer strong { color: var(--good, #2E8B4F); }

/* Explain text */
.explain-text { margin-top: 8px; font-size: 14px; color: var(--ink-soft); display: none; }
.explain-text.show { display: block; }

/* Sort / drag-and-drop */
.sort-instruction { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.chip-pool {
  display: flex; gap: 8px; flex-wrap: wrap;
  min-height: 44px; padding: 10px;
  background: var(--bg); border: 1px dashed var(--line);
  border-radius: 8px; margin-bottom: 14px;
}
.chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px;
  padding: 7px 12px;
  background: var(--bin-pale); border: 1.5px solid var(--bin-mid);
  border-radius: 7px; cursor: grab; user-select: none;
}
.chip.correct { background: var(--good-bg, #E3F4E8); border-color: var(--good, #2E8B4F); }
.chip.incorrect { background: var(--bad-bg, #FBE6E5); border-color: var(--bad, #C0433F); }
.chip.selected { outline: 2px solid var(--bin-dark); outline-offset: 2px; }
.bins-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bin {
  flex: 1 1 180px; min-height: 80px;
  background: var(--bg); border: 2px dashed var(--line);
  border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.bin.dragover { border-color: var(--bin-mid); background: var(--bin-pale); }
.bin-label { font-size: 13px; font-weight: 600; color: var(--bin-dark); margin-bottom: 2px; }
.check-btn {
  margin-top: 14px; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 8px;
  border: none; background: var(--bin-dark); color: #fff; cursor: pointer;
}
.check-btn:hover { filter: brightness(1.1); }
.task-result { margin-top: 8px; font-size: 14px; font-weight: 500; min-height: 20px; }

/* ============================================================
   EXAM REFERENCE SYSTEM
   ============================================================ */
.exam-section { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.exam-section-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--exam-col, #7052B0);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.exam-refs { display: flex; gap: 8px; flex-wrap: wrap; min-height: 24px; }
.exam-ref-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  padding: 4px 10px; border-radius: 5px;
  background: var(--exam-pale, #F2EEF9);
  border: 1px solid var(--exam-col, #7052B0);
  color: var(--exam-col, #7052B0);
  display: inline-flex; align-items: center; gap: 6px;
}
.exam-ref-tag .del { cursor: pointer; font-size: 13px; opacity: .6; }
.exam-ref-tag .del:hover { opacity: 1; }
.add-ref-btn {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px;
  padding: 5px 11px; border-radius: 6px;
  border: 1px dashed var(--exam-col, #7052B0);
  background: var(--exam-pale, #F2EEF9);
  color: var(--exam-col, #7052B0); cursor: pointer;
}
.add-ref-btn:hover { filter: brightness(.95); }

/* ============================================================
   MODAL (voor examenvraag toevoegen)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 100;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper); border-radius: 14px;
  padding: 28px; max-width: 440px; width: 90%;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.45);
}
.modal h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin: 0 0 16px; }
.modal label { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; margin-top: 12px; }
.modal input, .modal select, .modal textarea {
  width: 100%; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg);
}
.modal textarea { min-height: 60px; resize: vertical; }
.modal-btns { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.modal-btns button {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 14px;
  padding: 9px 16px; border-radius: 7px;
  border: 1px solid var(--line); cursor: pointer; background: var(--bg);
}
.modal-btns .save-btn { background: var(--exam-col, #7052B0); color: #fff; border-color: var(--exam-col, #7052B0); }

/* ============================================================
   FILTER BUTTONS (voorbeelden-pagina's)
   ============================================================ */
.filter-row { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 20px;
  border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; color: var(--ink-soft);
  transition: background .12s, border-color .12s, color .12s;
}
.filter-btn.active { color: #fff; }
.filter-btn[data-filter="all"].active { background: var(--bin-dark); border-color: var(--bin-dark); }

/* ============================================================
   VOORBEELD-KAARTEN
   ============================================================ */
.examples-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .examples-grid { grid-template-columns: 1fr; } }
.example-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.example-card.hidden { display: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.example-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; margin: 0; }
.type-badge {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 5px; color: #fff;
}
.theory-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  padding: 4px 10px; border-radius: 5px;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--ink-soft); display: inline-block; margin: 2px;
}

/* ============================================================
   TEKST-BLOKKEN & TABELLEN
   ============================================================ */
section.text-block { margin-top: 46px; }
section.text-block h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 21px; margin-bottom: 8px;
}
section.text-block p { font-size: 16.5px; }

/* ── Wat-moet-je-weten-blok (standaard bovenaan elke theoriepagina) ──
   Gebruik: <section class="text-block summary-block"> ... </section>
   De h2 mag gewoon <h2 style="margin-top:0;">Wat moet je weten?</h2> zijn.
   ─────────────────────────────────────────────────────────────── */
section.text-block.summary-block {
  background: var(--paper);
  border: 2px solid var(--bin-mid);
  border-left: 6px solid var(--bin-dark);
  border-radius: 12px;
  padding: 28px 40px;
  margin-top: 28px;
  margin-bottom: 28px;
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
section.text-block.summary-block h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  color: var(--bin-dark);
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--line);
}
@media (max-width: 700px) {
  section.text-block.summary-block {
    width: 100%;
    padding: 20px 18px;
  }
}

table.compare-table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; margin-top: 10px;
}
table.compare-table th, table.compare-table td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.compare-table th { background: var(--bin-pale); font-weight: 600; color: var(--bin-dark); }
table.compare-table tr:last-child td { border-bottom: none; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: 46px; font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 16px;
  max-width: 1080px;
  margin-left: auto; margin-right: auto;
  padding-left: 24px; padding-right: 24px;
}

/* ============================================================
   TALLY CARDS (used on pathway overview pages)
   ============================================================ */
.tally-card {
  margin-top: 20px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
}
.tally-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 16.5px; margin: 0 0 12px; }
.tally-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.tally-pill {
  font-family: 'IBM Plex Mono', monospace; font-size: 14px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.tally-pill .dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============================================================
   TOGGLE PILL (fermentation type, route type etc.)
   ============================================================ */
.toggle-pill {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
}
.toggle-pill button {
  border: none; background: var(--paper);
  padding: 8px 14px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13.5px;
  cursor: pointer; color: var(--ink-soft);
}
.toggle-pill button.selected { background: var(--ink); color: #fff; }

/* ============================================================
   LEGEND ROW (diagrams)
   ============================================================ */
.legend {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 18px; font-size: 13.5px; color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

/* ============================================================
   CYCLE / FERM / ROUTE NOTES
   ============================================================ */
.cycle-note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; font-style: italic; }
.convergence-note {
  margin-top: 24px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; font-size: 15px;
  display: flex; align-items: center; gap: 14px;
}
.convergence-note .icon { font-size: 22px; }

/* ============================================================
   FERM CARD / SORT CARD VARIANTS
   ============================================================ */
.ferm-card {
  margin-top: 20px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
}
.ferm-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 16.5px; margin: 0 0 4px; }
.ferm-card .hint { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }

/* ============================================================
   LEAD / LAG STRAND NODES (replicatie)
   ============================================================ */
.node.lead-node { background: #D4F0EE; border-color: #2E8B8B; }
.node.lag-node  { background: #FAE4D0; border-color: #E07830; }

/* ============================================================
   ENZYME GRID (replicatie)
   ============================================================ */
.enzyme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 600px) { .enzyme-grid { grid-template-columns: 1fr; } }
.enz-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
}
.enz-card h4 { font-family: 'Space Grotesk', sans-serif; font-size: 15px; margin: 0 0 4px; color: var(--bin-dark); }
.enz-card p  { font-size: 14px; color: var(--ink-soft); margin: 0; }
svg.repl-svg { width: 100%; height: auto; display: block; }

/* ============================================================
   KARYOGRAM GRID (chromosomen-structuur)
   ============================================================ */
.kary-card { margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.kary-card p { font-size: 15px; color: var(--ink-soft); max-width: 760px; margin: 0 0 16px; }
.kary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px,1fr)); gap: 12px; margin-top: 10px; }
.chrom-card {
  background: var(--bin-pale); border: 1.5px solid var(--line);
  border-radius: 8px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: border-color .15s, transform .12s;
}
.chrom-card:hover  { border-color: var(--bin-mid); transform: translateY(-2px); }
.chrom-card.selected { border-color: var(--bin-dark); background: #C4E8EB; }
.chrom-num { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--bin-dark); margin-top: 5px; }
.chrom-vis { width: 20px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.chrom-seg   { width: 16px; border-radius: 2px; background: var(--bin-mid); }
.chrom-centro{ width: 8px; height: 4px; background: var(--bin-dark); border-radius: 2px; }
.kary-info {
  margin-top: 14px; background: var(--bin-pale);
  border-left: 4px solid var(--bin-mid); border-radius: 8px;
  padding: 13px 16px; font-size: 14.5px; min-height: 44px;
}

/* ============================================================
   GENE LOCI TABLE (genlocaties-loci)
   ============================================================ */
.band-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.band-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin: 0 0 10px; }
.band-card p  { font-size: 15.5px; color: var(--ink-soft); max-width: 760px; }
.nomenclature-box {
  margin-top: 18px; background: var(--bin-pale);
  border-left: 4px solid var(--bin-mid); border-radius: 8px;
  padding: 14px 18px; font-size: 15px;
}
.nomenclature-box b { color: var(--bin-dark); }
.notation-example {
  font-family: 'IBM Plex Mono', monospace; font-size: 15px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 14px;
  margin-top: 12px; display: inline-block;
}
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.search-bar input {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 15px;
  padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); flex: 1 1 240px; min-width: 0;
}
.search-bar input:focus { outline: 2px solid var(--bin-mid); outline-offset: 1px; }
.chrom-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.cf-btn {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  padding: 5px 10px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--paper);
  cursor: pointer; color: var(--ink-soft);
}
.cf-btn.active { background: var(--bin-dark); color: #fff; border-color: var(--bin-dark); }
.result-count { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
table.gene-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.gene-table th { background: var(--bin-pale); font-weight: 600; color: var(--bin-dark); padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
table.gene-table th:hover { filter: brightness(.96); }
table.gene-table th .sort-icon { font-size: 10px; margin-left: 4px; opacity: .5; }
table.gene-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.gene-table tr:last-child td { border-bottom: none; }
table.gene-table tr:hover td { background: var(--bin-pale); }
.gene-code { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--bin-dark); }
.locus { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink-soft); }
.highlight { background: #FFF0A0; }
.no-results { padding: 24px; text-align: center; color: var(--ink-soft); font-style: italic; }

/* ============================================================
   NUCLEOTIDE BASE SELECTOR (nucleinebasen-bouw)
   ============================================================ */
.base-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.base-grid  { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.base-btn {
  width: 72px; height: 72px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--bin-pale);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: transform .12s, border-color .15s;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px;
}
.base-btn:hover { transform: translateY(-2px); border-color: var(--bin-mid); }
.base-btn.active { border-color: var(--bin-dark); background: #C4E8EB; }
.base-btn .blabel { font-size: 11px; font-family: 'IBM Plex Mono', monospace; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
.base-btn.purine    { background: #E0EEF8; border-color: #4A8AC4; }
.base-btn.pyrimidine{ background: #F0E8F8; border-color: #8A5AC4; }
.base-btn.purine.active    { background: #C0D8F0; border-color: #1A5AA0; }
.base-btn.pyrimidine.active{ background: #DDD0F0; border-color: #5A2AA0; }
.base-info { background: var(--bin-pale); border: 1px solid var(--line); border-left: 4px solid var(--bin-mid); border-radius: 8px; padding: 18px 20px; min-height: 60px; }
.base-info h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin: 0 0 6px; }
.base-info b { color: var(--bin-dark); }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .pair-grid { grid-template-columns: 1fr; } }
.pair-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.pair-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; margin: 0 0 10px; }
.pair-card p  { font-size: 15px; color: var(--ink-soft); }
.hbond-row { display: flex; gap: 6px; margin-top: 10px; }
.hbond { width: 22px; height: 22px; border-radius: 50%; background: #E8B339; border: 2px solid #B08828; display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; color: #3B2900; }
.compare-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .compare-2col { grid-template-columns: 1fr; } }
.mol-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.mol-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.mol-badge { font-family: 'IBM Plex Mono', monospace; font-size: 12px; padding: 3px 9px; border-radius: 5px; color: #fff; background: var(--bin-dark); }
.mol-badge.rna { background: #7052B0; }
table.prop-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.prop-table th, table.prop-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.prop-table th { font-weight: 600; color: var(--bin-dark); background: var(--bin-pale); }
table.prop-table tr:last-child td { border-bottom: none; }
.nucleotide-diagram { margin-top: 14px; background: var(--bin-pale); border-radius: 8px; padding: 14px 16px; font-size: 14.5px; }
.nucleotide-diagram b { color: var(--bin-dark); }

/* ============================================================
   DYNAMISCHE TERUGKNOP — gebruik dit patroon op elke nieuwe pagina
   die door meerdere theorie-pagina's wordt gedeeld.

   1. In elke theorie-pagina: voeg ?from=pagina-id toe aan de link:
        <a href="voorbeelden-X.html?from=mijn-pagina">💡 Voorbeelden</a>

   2. In de gedeelde voorbeelden/oefenvragen-pagina:
      a) Geef de terugknop een id:
           <a class="back-btn" id="backBtn" href="fallback.html">← Terug</a>

      b) Voeg dit script toe vlak voor </body>:

      <script id="back-btn-js">
      (function(){
        var from = new URLSearchParams(location.search).get('from');
        var map = {
          'pagina-a': ['pagina-a.html', '← Paginanaam A'],
          'pagina-b': ['pagina-b.html', '← Paginanaam B'],
        };
        var entry = map[from] || map['pagina-a'];
        var btn = document.getElementById('backBtn');
        if(btn && entry){ btn.href = entry[0]; btn.textContent = entry[1]; }
      })();
      </script>

   Dat is alles. Geen server nodig — werkt op statische bestanden.
   ============================================================ */

/* ============================================================
   KLEURTHEMA: DNA-TECHNIEKEN (BINAS 71M) — indigo
   --bin-dark:#2E2A6A; --bin-mid:#5A54B0; --bin-pale:#E8E7F8;
   --bg:#F0EFF8; --ink:#12101A; --ink-soft:#4A4870; --line:#C8C6E8;
   ============================================================ */

/* ── Leeftijdsbadges (techniek-tijdlijn) ───────────────────
   Gebruik op elke pagina die DNA-technieken bespreekt:
   <span class="age-badge age-classic">🕰 Klassiek</span>
   <span class="age-badge age-new">⚗️ Modern</span>
   <span class="age-badge age-revolution">🚀 Revolutionair</span>
   ──────────────────────────────────────────────────────── */
.age-badge{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;padding:3px 10px;border-radius:5px;font-weight:600;
  display:inline-block;
}
.age-classic   {background:#FDF0E0;color:#8A6020;border:1px solid #C09030;}
.age-new       {background:#E3F4E8;color:#1B5E3A;border:1px solid #2E8B4F;}
.age-revolution{background:#F8E0EC;color:#7A1A3A;border:1px solid #C04070;}
