/* Diktaat Duits — opmaak
   Uitgangspunt: een gefotokopieerd diktaat, geen dashboard. Eén kolom, lijnen in plaats van kaarten,
   papierkleuren, één accentkleur (balpen-blauw) en verder inkt. Geen schaduwen, geen verlopen. */

:root {
  --paper: #F4EFE4;
  --paper-2: #FBF8F1;
  --rule: #D6CDBD;
  --ink: #1E1B16;
  --ink-2: #5B564D;
  --ink-3: #6E685E;
  --pen: #2447A6;
  --pen-deep: #1A367F;
  --pen-wash: #E3E8F5;
  --ok: #2E6B3F;
  --no: #B0362B;
  --marker: #F5E6A3;
  --serif: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 3px;
  --measure: 68ch;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1916; --paper-2: #24211D; --rule: #3B362F;
    --ink: #EDE7DB; --ink-2: #B0A797; --ink-3: #938B7E;
    --pen: #8FA6EE; --pen-deep: #A9BBF3; --pen-wash: #262B3D;
    --ok: #86C79A; --no: #E88E80; --marker: #574B1E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1916; --paper-2: #24211D; --rule: #3B362F;
  --ink: #EDE7DB; --ink-2: #B0A797; --ink-3: #938B7E;
  --pen: #8FA6EE; --pen-deep: #A9BBF3; --pen-wash: #262B3D;
  --ok: #86C79A; --no: #E88E80; --marker: #574B1E;
  color-scheme: dark;
}

/* ---------- basis ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: 2.1rem; margin-bottom: .75rem; }
h2 { font-size: 1.45rem; font-weight: 600; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--pen); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--pen-deep); }
b, strong { font-weight: 600; }
kbd {
  font-family: var(--sans); font-size: .72em; font-weight: 500;
  color: inherit; opacity: .7;
  border: 1px solid currentColor; border-radius: 2px; padding: 0 .35em; margin-left: .45em;
  vertical-align: .1em;
}
mark { background: var(--marker); color: var(--ink); padding: 0 .05em; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper-2); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.note { color: var(--ink-2); font-size: .95rem; border-left: 2px solid var(--rule); padding-left: .75rem; }
.kicker { color: var(--ink-2); font-size: .9rem; margin: 0 0 .35rem; }
.lede { font-size: 1.2rem; max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: .2rem; }
.page-head { margin-bottom: 1.25rem; }

/* ---------- kop en navigatie ---------- */
.top {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: .85rem var(--gutter) .7rem;
  border-bottom: 1px solid var(--rule);
  max-width: 64rem; margin: 0 auto;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { font-weight: 500; color: var(--ink-2); }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 1.25rem; flex: 1; }
.nav a, .gear { color: var(--ink-2); text-decoration: none; font-weight: 500; padding: .15rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .gear:hover { color: var(--ink); }
.nav a.current, .gear.current { color: var(--ink); border-bottom-color: var(--pen); }
.gear { font-size: .95rem; }
.page { max-width: 64rem; margin: 0 auto; padding: 1.75rem var(--gutter) 4rem; }
.page:focus { outline: none; }
.foot { max-width: 64rem; margin: 0 auto; padding: 1rem var(--gutter) 2rem; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--rule); }
.foot p { margin: 0; }

/* ---------- knoppen, chips, velden ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 500; line-height: 1.2;
  padding: .6rem 1.05rem; border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--paper-2); color: var(--ink); }
.btn.primary { background: var(--pen); border-color: var(--pen); color: var(--paper-2); }
.btn.primary:hover { background: var(--pen-deep); border-color: var(--pen-deep); color: var(--paper-2); }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.primary:hover { color: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .btn.primary:hover { color: var(--paper); } }
.btn.quiet { border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); background: transparent; text-decoration: underline; }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem .75rem; align-items: center; margin: 1.25rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: inherit; font-size: .9rem; padding: .3rem .7rem; cursor: pointer; text-decoration: none;
  border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; color: var(--ink-2);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--paper-2); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin: 0 0 .75rem; }
.search, select, .answer {
  font: inherit; color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--ink-3); border-radius: var(--radius); padding: .5rem .65rem;
}
.search { width: min(100%, 22rem); }
.search:focus, select:focus, .answer:focus { outline: 2px solid var(--pen); outline-offset: 1px; border-color: var(--pen); }
select { padding-right: 1.5rem; }
.options { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0 0 1.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.options label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: var(--ink-2); }
.options select { color: var(--ink); font-size: 1rem; }

/* ---------- puntjes ---------- */
.dot {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--pen); background: transparent; vertical-align: -1px; padding: 0; cursor: default;
}
.dot.core { cursor: pointer; }
.dot.core.on, .dot.s3 { background: var(--pen); }
.dot.s0 { border-color: var(--ink-3); }
.dot.s1 { border-color: var(--pen); background: var(--pen-wash); }
.dot.s2 { background: var(--pen); opacity: .55; }
.dot.core:hover { border-color: var(--pen-deep); box-shadow: 0 0 0 2px var(--pen-wash); }
.days { display: flex; flex-wrap: wrap; gap: 5px; margin: 1rem 0 .25rem; }
.days i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--rule); }
.days i.on { background: var(--pen); border-color: var(--pen); }
.bar { display: flex; height: 8px; border: 1px solid var(--rule); background: var(--paper-2); margin: .5rem 0 .5rem; max-width: 40rem; }
.bar i { display: block; height: 100%; }
.bar .s3 { background: var(--pen); }
.bar .s2 { background: var(--pen); opacity: .55; }
.bar .s1 { background: var(--pen-wash); }
.bar .s0 { background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .95rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- lijsten met links ---------- */
.linklist { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--rule); max-width: 44rem; }
.linklist li { border-bottom: 1px solid var(--rule); }
.linklist a { display: block; padding: .8rem 0; color: inherit; text-decoration: none; }
.linklist a:hover b { text-decoration: underline; text-decoration-color: var(--pen); text-underline-offset: .15em; }
.linklist b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.linklist span { color: var(--ink-2); font-size: .95rem; }

/* ---------- tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: .45rem .7rem .45rem 0; border-bottom: 1px solid var(--rule); }
thead th { font-weight: 600; font-size: .85rem; color: var(--ink-2); border-bottom: 1px solid var(--ink-3); padding-top: 0; }
tbody th { font-weight: 500; color: var(--ink-2); white-space: nowrap; }
caption { text-align: left; caption-side: top; font-family: var(--serif); font-weight: 600; padding: 0 0 .5rem; }
.num { white-space: nowrap; }
.conj { max-width: 48rem; }
.conj td, .conj th { white-space: nowrap; }
.conj .end { font-weight: 600; }
.conj .stem.changed { color: var(--pen); font-weight: 600; }
.conj td[rowspan] { vertical-align: top; border-bottom: 1px solid var(--rule); line-height: 1.7; }
.conj .perf { display: block; color: var(--ink-2); font-size: .9rem; margin-top: .25rem; }
.conj-extra { display: none; margin: .25rem 0 0; }
.conj-extra div { padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.conj-extra dt { font-size: .85rem; color: var(--ink-2); }
.conj-extra dd { margin: 0; }
.forms { max-width: 48rem; margin-bottom: 1.25rem; }
.forms th { font-weight: 600; color: var(--ink); }
.verbs td a, .progress-table td a { color: var(--ink); text-decoration: none; font-weight: 600; }
.verbs td a:hover, .progress-table td a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.c-dot { width: 2rem; padding-right: .4rem; }
.c-forms { display: none; }
.c-strength { width: 2rem; text-align: right; padding-right: 0; }
.verbs td.c-strength { text-align: right; }
.sessions { max-width: 32rem; }
.misses { max-width: 48rem; }

/* ---------- theorie ---------- */
.theory h2.boxed {
  display: inline-block; font-size: 1.25rem; padding: .3rem .7rem; margin: 2.25rem 0 1rem;
  border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 2px; background: var(--paper-2);
}
.theory h2.plain { margin-top: 2.5rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: .6rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 1rem; font-size: .95rem; }
.subnav a { color: var(--ink-2); text-decoration: none; }
.subnav a:hover { color: var(--pen); text-decoration: underline; }
.tsec:focus { outline: none; }
.aside { max-width: var(--measure); margin: 1.5rem 0; padding: .9rem 1rem; border: 1px solid var(--rule); background: var(--paper-2); }
.aside h3 { margin: 0 0 .5rem; font-size: 1rem; }
.aside p:last-child { margin-bottom: 0; }

/* ---------- werkwoordpagina ---------- */
.verb-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.verb-title .dot { width: 16px; height: 16px; }
.verb-title .nl { font-family: var(--sans); font-weight: 400; font-size: 1.15rem; color: var(--ink-2); }
.stamtijden { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem 1.5rem; margin: 0 0 1.25rem; padding: .75rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: 48rem; }
.meta div { margin: 0; }
.meta dt { font-size: .85rem; color: var(--ink-2); }
.meta dd { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); padding-top: .75rem; margin-top: 1.5rem; max-width: 48rem; }
.pager a { text-decoration: none; font-weight: 600; color: var(--ink); }
.pager a span { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-2); }
.pager a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.pager a:last-child { text-align: right; }

/* ---------- oefenen ---------- */
.drill { max-width: 42rem; }
.drill-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--ink-2); margin-bottom: .35rem; }
.progress { height: 2px; background: var(--rule); margin-bottom: 2rem; }
.progress i { display: block; height: 100%; background: var(--pen); }
.prompt-word { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; margin: 0; line-height: 1.1; overflow-wrap: anywhere; }
.prompt-sub { color: var(--ink-2); font-size: 1.05rem; margin: .35rem 0 0; }
.answers { margin-top: 1.5rem; }
.field { display: block; margin: 0 0 1rem; }
.field > span { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: .3rem; }
.answer { width: 100%; font-size: 1.2rem; }
.answer.ok { border-color: var(--ok); }
.answer.no { border-color: var(--no); }
.answer[readonly] { background: transparent; }
.verdict { display: block; font-size: .95rem; margin-top: .3rem; }
.verdict.ok { color: var(--ok); }
.verdict.no { color: var(--no); }
.verdict.no b { font-size: 1.1rem; color: var(--ink); }
.verdict.no mark { background: var(--marker); color: var(--ink); }
.charbar { display: flex; align-items: center; gap: .4rem; margin: .25rem 0 1rem; }
.charbar button { font: inherit; font-size: 1.1rem; width: 2.4rem; height: 2.2rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); color: var(--ink); cursor: pointer; }
.charbar button:hover { border-color: var(--ink-3); }
.charbar .hint { font-size: .85rem; color: var(--ink-3); margin-left: .35rem; }
.after { margin-top: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.sheet { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem; margin: 0 0 1rem; max-width: 36rem; }
.sheet div { display: contents; }
.sheet dt { color: var(--ink-2); font-size: .9rem; padding-top: .1rem; }
.sheet dd { margin: 0; font-weight: 600; }
.card-face .sheet { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.sentence { font-family: var(--serif); font-size: 1.45rem; line-height: 1.8; font-weight: 500; }
.gap { display: inline-block; border-bottom: 1.5px solid var(--ink); padding: 0 .35rem; margin: 0 .1rem; font-family: var(--sans); font-size: .7em; font-weight: 400; color: var(--ink-2); line-height: 1.6; vertical-align: baseline; white-space: nowrap; }
.gap b { color: var(--pen); font-weight: 600; }
.model { font-size: 1.05rem; margin-bottom: .35rem; }
.mini { list-style: none; padding: 0; margin: .75rem 0 0; color: var(--ink-2); font-size: .95rem; }
.mini a { font-weight: 600; }
.choices { display: grid; gap: .5rem; margin-top: 1.5rem; max-width: 30rem; }
.choice { font: inherit; font-size: 1.05rem; text-align: left; padding: .65rem .8rem; border: 1px solid var(--ink-3); border-radius: var(--radius); background: var(--paper-2); color: var(--ink); cursor: pointer; }
.choice:hover:not([disabled]) { border-color: var(--ink); }
.choice kbd { margin: 0 .5rem 0 0; }
.choice.ok { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.choice.no { border-color: var(--no); color: var(--no); text-decoration: line-through; }
.choice[disabled] { cursor: default; }
.drill-foot { margin-top: 2.5rem; font-size: .85rem; color: var(--ink-3); }
.summary .lede { margin-bottom: 1.5rem; }

/* ---------- instellingen ---------- */
.settings-form { max-width: 36rem; border-top: 1px solid var(--rule); }
.settings-form label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.settings-form label.check { justify-content: flex-start; }
.settings-form input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--pen); margin: 0; }

/* ---------- smal scherm ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .top { gap: 1rem; padding: .75rem var(--gutter) .6rem; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    justify-content: space-around; gap: 0;
    background: var(--paper); border-top: 1px solid var(--rule);
    padding: .45rem var(--gutter) calc(.45rem + env(safe-area-inset-bottom));
    font-size: .9rem;
  }
  .nav a { padding: .2rem .1rem; }
  .gear { margin-left: auto; }
  .page { padding-bottom: 5.5rem; }
  .foot { padding-bottom: 5rem; }
  .prompt-word { font-size: 2.1rem; }
  .sentence { font-size: 1.25rem; }
  .sheet { grid-template-columns: 1fr; gap: .1rem; }
  .sheet dt { margin-top: .5rem; }
  .verbs thead { display: none; }
  .verbs, .verbs tbody { display: block; }
  .verbs tr { display: grid; grid-template-columns: 1.6rem 1fr 1.6rem; column-gap: .45rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
  .verbs td { display: block; border: 0; padding: 0; }
  .verbs td.c-dot { grid-column: 1; grid-row: 1 / span 4; width: auto; }
  .verbs td:nth-child(2) { grid-column: 2; grid-row: 1; font-size: 1.05rem; }
  .verbs td.c-strength { grid-column: 3; grid-row: 1; width: auto; text-align: right; }
  .verbs td:empty { display: none; }
  .verbs td:nth-child(3), .verbs td:nth-child(4), .verbs td:nth-child(5) { display: none; }
  .verbs td.c-forms { display: block; grid-column: 2 / span 2; grid-row: 2; color: var(--ink-2); }
  .verbs td:nth-child(6) { grid-column: 2 / span 2; grid-row: 3; color: var(--ink-2); }
  .progress-table tr { grid-template-columns: 1.6rem 1fr; }
  .progress-table td:nth-child(3), .progress-table td:nth-child(4), .progress-table td:nth-child(5) { display: block; grid-column: 2; color: var(--ink-2); font-size: .95rem; }
  .progress-table td:nth-child(3) { grid-row: 2; }
  .progress-table td:nth-child(4) { grid-row: 3; }
  .progress-table td:nth-child(5) { grid-row: 4; }
  .progress-table td[data-l]:not([data-l=""])::before { content: attr(data-l) ": "; color: var(--ink-3); }
  .progress-table td:empty { display: none; }
  .conj { font-size: .95rem; }
  .conj td[rowspan], .conj th.c-extra { display: none; }
  .conj-extra { display: block; }
  .meta { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .nav { font-size: .82rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .choice, .answer { transition: border-color 80ms linear, background-color 80ms linear; }
}
@media print {
  .top, .foot, .nav, .gear, .actions, .toolbar, .drill-foot { display: none; }
  body { background: #fff; color: #000; }
}
