/* Hellenica, stijl "Fresco": donker lapis, ivoor en goud, met een frescokleur per gebouw. */
:root {
  color-scheme: dark;
  --night: #0e1322; --night-2: #161c31; --night-3: #1f2742; --line: rgba(216, 180, 106, .28); --hair: rgba(242, 234, 219, .1);
  --ivory: #f2eadb; --ivory-2: #b9b3a6; --muted: #8a90a6; --gold: #d8b46a;
  --lapis: #4d74f0; --saffron: #e9a93f; --porphyry: #c9445e; --aegean: #25a89d; --olive: #93ad4b;
  --ok: #7fc06a; --bad: #e0606f;
  --acc: var(--lapis);
  --display: "Bodoni Moda", "GFS Didot", Didot, "Bodoni 72", Georgia, serif;
  --greek: "GFS Didot", "Bodoni Moda", "Palatino Linotype", Georgia, serif;
  --ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hud-h: 60px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--night); color: var(--ivory); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
[hidden] { display: none !important; }
.gr { font-family: var(--greek); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- knoppen en velden ---------- */
.btn { font: 600 13.5px var(--ui); letter-spacing: .03em; color: var(--night); background: var(--ivory); border: 1px solid transparent; border-radius: 2px;
  padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.08); }
.btn.acc { background: var(--acc); color: #fff; }
.btn.line { background: transparent; color: var(--ivory); border-color: rgba(242, 234, 219, .3); }
.btn.line:hover { border-color: var(--ivory); }
.btn.ghost { background: transparent; color: var(--ivory-2); padding-inline: 10px; }
.btn.ghost:hover { color: var(--ivory); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(224, 96, 111, .5); }
.btn.danger.armed { background: var(--bad); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ivory-2); }
.input { width: 100%; background: rgba(242, 234, 219, .05); border: 1px solid rgba(242, 234, 219, .2); border-radius: 2px; padding: 11px 13px; color: var(--ivory); }
.input:focus { outline: none; border-color: var(--gold); background: rgba(242, 234, 219, .08); }
.input.gr-input { font-family: var(--greek); }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; }

/* ---------- HUD ---------- */
.hud { position: sticky; top: 0; z-index: 20; height: var(--hud-h); display: flex; align-items: center; gap: 18px;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
  background: rgba(14, 19, 34, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { font-family: var(--display); font-size: 22px; letter-spacing: .02em; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ivory); display: flex; align-items: baseline; gap: 8px; }
.logo i { font-family: var(--greek); font-style: normal; color: var(--gold); font-size: 16px; }
.hud .stats { margin-left: auto; display: flex; gap: 24px; }
.st { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.st small { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.st b { white-space: nowrap; font-family: var(--display); font-weight: 400; font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
.st b span { font-size: 13px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 2px; padding: 5px 8px; cursor: pointer; color: var(--ivory); }
.who:hover { border-color: var(--hair); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--ui); color: var(--night); background: var(--gold); }
.dbg-btn { color: var(--gold); border: 1px dashed var(--line); }
.menu { position: absolute; right: 16px; top: calc(var(--hud-h) - 4px); width: 260px; background: var(--night-2); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); padding: 8px; z-index: 30; }
.menu .head { padding: 10px 12px 12px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.menu .head b { display: block; }
.menu .head small { color: var(--muted); }
.menu button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 2px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.menu button:hover { background: var(--night-3); }
@media (max-width: 720px) {
  .hud { gap: 10px; }
  .hud .stats { gap: 14px; }
  .st small { font-size: 8.5px; letter-spacing: .1em; }
  .st b { font-size: 17px; }
  .st.hide-sm, .logo i, .who .nm { display: none; }
}

/* ---------- inloggen ---------- */
.login { position: relative; min-height: 100%; display: grid; place-items: center; padding: 40px max(16px, env(safe-area-inset-left, 0px)); overflow: hidden; }
.login .bg { position: absolute; inset: 0; opacity: .5; }
.login .bg svg { width: 100%; height: 100%; }
.login .bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(14, 19, 34, .55), rgba(14, 19, 34, .95) 75%); }
.login-card { position: relative; width: min(440px, 100%); background: rgba(22, 28, 49, .94); border: 1px solid var(--line); border-radius: 4px; padding: 34px 34px 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-family: var(--display); font-weight: 400; font-size: 46px; line-height: 1; margin: 0; }
.login-card h1 + .gr { color: var(--gold); font-size: 20px; margin-top: -8px; }
.login-card p { margin: 0; color: var(--ivory-2); }
.tabs2 { display: flex; border-bottom: 1px solid var(--hair); }
.tabs2 button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs2 button[aria-selected="true"] { color: var(--ivory); border-color: var(--gold); }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.meander { display: block; width: 100%; height: 12px; color: var(--gold); opacity: .5; }

/* ---------- kaart ---------- */
.mapview { position: relative; height: calc(100dvh - var(--hud-h)); min-height: 420px; overflow: hidden; background: #0b2034; }
.mapview > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bld { cursor: pointer; outline: none; }
.bld .shape { transition: transform .35s cubic-bezier(.2, .7, .2, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.bld:hover .shape, .bld.on .shape { transform: translateY(-6px); }
.bld .halo { opacity: 0; transition: opacity .3s; }
.bld:hover .halo, .bld.on .halo, .bld:focus-visible .halo { opacity: 1; }
.lbl-gr { font-family: var(--greek); font-size: 15px; fill: var(--ivory); }
.lbl-nl { font-family: var(--ui); font-size: 9.5px; letter-spacing: .2em; fill: var(--ivory-2); font-weight: 600; }
.lbl-st { font-family: var(--ui); font-size: 9px; fill: var(--gold); font-weight: 700; letter-spacing: .1em; }
.pop { position: absolute; left: max(24px, env(safe-area-inset-left, 0px)); top: 24px; width: 320px; padding: 22px 24px 20px; background: rgba(18, 23, 40, .95);
  border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 24px 50px rgba(0, 0, 0, .5); z-index: 4; }
.pop .mod { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.pop h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 8px 0 0; line-height: 1.1; }
.pop .gname { font-family: var(--greek); color: var(--gold); font-size: 17px; }
.pop p { margin: 10px 0 14px; color: var(--ivory-2); font-size: 13.5px; }
.bar { height: 3px; background: rgba(242, 234, 219, .12); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc); }
.pop .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 0 16px; font-variant-numeric: tabular-nums; }
.pop .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.legend { position: absolute; left: max(24px, env(safe-area-inset-left, 0px)); bottom: 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; z-index: 3; font-size: 11.5px; color: var(--ivory-2); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend .dot { width: 9px; height: 9px; }
@media (max-width: 720px) {
  .pop { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; padding: 18px; }
  .pop p { display: none; }
  .pop h2 { font-size: 24px; }
  .legend { display: none; }
}

/* ---------- gebouwpagina ---------- */
.page { max-width: 1040px; margin: 0 auto; padding-block: 34px 70px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 28px; }
.bhead { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.bhead h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 6vw, 56px); line-height: 1; margin: 8px 0 4px; }
.bhead .gname { font-family: var(--greek); font-size: 22px; color: var(--acc); }
.bhead p { margin: 12px 0 0; max-width: 60ch; color: var(--ivory-2); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ivory-2); font-size: 13px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.back:hover { color: var(--ivory); }
h3.sec { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h3.sec small { font-family: var(--ui); font-size: 13px; color: var(--muted); }
.llist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.llist li { border-bottom: 1px solid var(--hair); }
.lrow { width: 100%; display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 16px 4px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ivory); }
.lrow:hover:not(:disabled) { background: rgba(242, 234, 219, .03); }
.lrow:disabled { cursor: default; color: var(--muted); }
.lrow .num { font-family: var(--display); font-size: 26px; color: var(--acc); font-variant-numeric: lining-nums; text-align: center; }
.lrow:disabled .num { color: var(--muted); }
.lrow b { display: block; font-weight: 600; }
.lrow small { color: var(--muted); }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--hair); color: var(--muted); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.pill.done { color: var(--ok); border-color: rgba(127, 192, 106, .4); }
.pill.now { color: #fff; background: var(--acc); border-color: transparent; }
.pill.soon { border-style: dashed; }
.phase { display: flex; flex-direction: column; gap: 10px; }
.empty { border: 1px dashed var(--line); border-radius: 4px; padding: 28px; color: var(--ivory-2); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.empty b { color: var(--ivory); font-family: var(--display); font-weight: 400; font-size: 22px; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--hair); border-radius: 4px; padding: 16px 18px; background: var(--night-2); }
.stat small { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat b { font-family: var(--display); font-weight: 400; font-size: 34px; font-variant-numeric: lining-nums tabular-nums; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.boxes > div { border: 1px solid var(--hair); border-radius: 3px; padding: 10px; text-align: center; background: var(--night-2); }
.boxes > div i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.boxes > div b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.boxes .fill { height: 3px; margin-top: 8px; background: var(--acc); opacity: .8; }
.wtable { width: 100%; border-collapse: collapse; }
.wtable th { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; font-weight: 700; padding: 0 12px 10px 0; }
.wtable td { padding: 12px 12px 12px 0; border-top: 1px solid var(--hair); vertical-align: baseline; }
.wtable td.gr { font-size: 22px; }
.wtable .tr { color: var(--ivory-2); font-style: italic; font-family: var(--display); }
.scroll-x { overflow-x: auto; }
@media (max-width: 720px) { .bhead { grid-template-columns: 1fr; } .boxes { grid-template-columns: repeat(3, 1fr); } .wtable .hide-sm { display: none; } }

/* ---------- les ---------- */
.lesson { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100dvh - var(--hud-h)); }
.rail { border-right: 1px solid var(--line); padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 22px; background: var(--night-2); position: relative; overflow: hidden; }
.rail .mod { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--acc); }
.rail h2 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.05; margin: 6px 0 4px; }
.rail .gname { font-family: var(--greek); color: var(--ivory-2); font-size: 17px; }
.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.parts button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; padding: 13px 0; border: 0; border-top: 1px solid var(--hair); background: none; color: var(--muted); text-align: left; cursor: pointer; font-size: 14px; }
.parts button:disabled { cursor: default; }
.parts .rn { font-family: var(--display); font-size: 15px; }
.parts .done { color: var(--ivory-2); }
.parts .done .ico { color: var(--acc); }
.parts .now { color: var(--ivory); font-weight: 600; }
.parts .now .rn { color: var(--acc); }
.parts .ico { width: 15px; height: 15px; }
.rail .big-gr { position: absolute; right: -24px; bottom: -70px; font-family: var(--greek); font-size: 280px; line-height: 1; color: var(--acc); opacity: .14; pointer-events: none; }
.main { position: relative; padding: 28px 48px 30px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.mtop { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ticks { display: flex; gap: 4px; flex-wrap: wrap; }
.ticks i { width: 22px; height: 3px; background: rgba(242, 234, 219, .15); }
.ticks i.on { background: var(--acc); }
.ticks i.ok { background: var(--acc); }
.ticks i.no { background: var(--bad); }
.ticks i.cur { background: var(--acc); opacity: .5; }
.mtop .count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--hair); padding-top: 18px; margin-top: auto; }
@media (max-width: 860px) {
  .lesson { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 20px 0; gap: 12px; }
  .rail h2 { font-size: 26px; }
  .rail .big-gr { display: none; }
  .parts { flex-direction: row; overflow-x: auto; }
  .parts li { flex: 1 0 auto; }
  .parts button { grid-template-columns: auto auto auto; gap: 8px; padding: 12px 14px 12px 0; border-top: 0; border-bottom: 2px solid transparent; }
  .parts .now { border-bottom-color: var(--acc); }
  .main { padding: 22px 20px 26px; }
}

/* uitleg */
.prose { max-width: 66ch; display: flex; flex-direction: column; gap: 14px; }
.prose h3 { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.08; margin: 0 0 4px; text-wrap: balance; }
.prose p { margin: 0; color: var(--ivory-2); font-size: 15.5px; line-height: 1.7; }
.prose p b { color: var(--ivory); font-weight: 600; }
.prose .gr { color: var(--ivory); font-size: 1.15em; }
.prose .gr.big { font-size: 1.5em; }
.prose .note { border-left: 2px solid var(--acc); padding-left: 14px; font-size: 14px; }
.lgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.lg { border: 1px solid var(--hair); border-radius: 3px; padding: 8px 0 6px; text-align: center; background: var(--night-2); }
.lg .gr { display: block; font-size: 22px; line-height: 1.1; }
.lg i { font-style: normal; font-size: 10.5px; color: var(--muted); }
@media (max-width: 720px) { .lgrid { grid-template-columns: repeat(4, 1fr); } }
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.groups > div { border: 1px solid var(--hair); border-radius: 4px; padding: 16px; background: var(--night-2); display: flex; flex-direction: column; gap: 8px; }
.groups h5 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--ivory); }
.groups p { font-size: 13.5px; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipl { border: 1px solid var(--line); border-radius: 2px; padding: 3px 8px; font-size: 19px; color: var(--ivory); }
@media (max-width: 720px) { .groups { grid-template-columns: 1fr; } }
.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tbl th { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; font-weight: 700; padding: 0 12px 8px 0; }
.tbl td { padding: 10px 12px 10px 0; border-top: 1px solid var(--hair); color: var(--ivory-2); vertical-align: baseline; }
.tbl td.gr { font-size: 22px; color: var(--ivory); }

/* woordkaarten */
.card-stage { flex: 1; display: grid; place-items: center; }
.wcard { width: min(560px, 100%); border: 1px solid var(--line); border-radius: 4px; background: var(--night-2); padding: 34px 36px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.wcard::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--acc); opacity: .1; }
.wcard .kind { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--acc); }
.wcard .huge { font-family: var(--greek); font-size: 96px; line-height: 1; }
.wcard .huge.word { font-size: 64px; }
.wcard .huge span { font-size: .55em; color: var(--ivory-2); margin-left: .12em; }
.wcard .name { font-family: var(--display); font-size: 26px; }
.wcard .name .gr { color: var(--gold); font-size: .8em; margin-left: 8px; }
.wcard dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; border-top: 1px solid var(--hair); padding-top: 14px; }
.wcard dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 3px; }
.wcard dd { margin: 0; color: var(--ivory-2); }
.wcard dd .gr { color: var(--ivory); font-size: 1.15em; }

/* vragen */
.qbox { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 44px; align-items: center; flex: 1; }
.qbox.nobig { grid-template-columns: 1fr; max-width: 720px; }
.qbig { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 300px; width: 100%; }
.qbig::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--acc); opacity: .4; }
.qbig::after { content: ""; position: absolute; inset: 7%; border-radius: 50%; background: var(--acc); opacity: .1; }
.qbig .letter { position: relative; font-family: var(--greek); font-size: clamp(90px, 13vw, 170px); line-height: .9; }
.qbig .letter span { font-size: .5em; margin-left: .1em; color: var(--ivory-2); }
.qbig .word { position: relative; font-family: var(--greek); font-size: clamp(38px, 5vw, 56px); text-align: center; padding: 0 12px; }
.q { font-family: var(--display); font-size: 30px; margin: 0 0 6px; font-weight: 400; line-height: 1.15; text-wrap: balance; }
.q .gr { color: var(--gold); }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 13.5px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { font: 500 15px var(--ui); color: var(--ivory); background: transparent; border: 1px solid rgba(242, 234, 219, .2); border-radius: 2px; padding: 15px 18px;
  display: flex; align-items: baseline; gap: 12px; cursor: pointer; text-align: left; transition: background .2s, border-color .2s; min-width: 0; }
.opt .k { font-family: var(--display); color: var(--muted); font-size: 14px; width: 14px; flex: none; }
.opt .g { font-family: var(--greek); color: var(--ivory-2); margin-left: auto; font-size: 16px; }
.opt .gbig { font-family: var(--greek); font-size: 26px; line-height: 1; }
.opt:hover:not(:disabled) { border-color: var(--acc); }
.opt:disabled { cursor: default; }
.opt.right { background: var(--acc); border-color: var(--acc); color: #fff; }
.opt.right .g, .opt.right .k { color: #fff; }
.opt.wrong { border-color: var(--bad); color: var(--ivory-2); text-decoration: line-through; text-decoration-color: var(--bad); }
.opt.hint { border-style: dashed; border-color: var(--gold); }
.typerow { display: flex; gap: 10px; max-width: 520px; }
.typerow .input { font-size: 18px; }
.typerow .input.ok { border-color: var(--ok); }
.typerow .input.no { border-color: var(--bad); }
.fb { min-height: 24px; margin-top: 16px; font-size: 14px; color: var(--ivory-2); }
.fb b { color: var(--ivory); }
.fb.ok b { color: var(--ok); }
.fb.no b { color: var(--bad); }
.dbg-hint { font-size: 12px; color: var(--gold); margin-top: 8px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; max-width: 620px; }
.match .col { display: flex; flex-direction: column; gap: 8px; }
.match button { border: 1px solid rgba(242, 234, 219, .2); background: transparent; border-radius: 2px; padding: 11px 14px; cursor: pointer; text-align: left; color: var(--ivory); }
.match button.gr { font-size: 22px; padding-block: 6px; }
.match button.sel { border-color: var(--acc); background: rgba(77, 116, 240, .12); box-shadow: inset 0 0 0 1px var(--acc); }
.match button.paired { background: var(--acc); border-color: var(--acc); color: #fff; opacity: .85; cursor: default; }
.match button.shake { animation: shake .35s; border-color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .match button.shake { animation: none; } * { transition: none !important; } }
@media (max-width: 860px) {
  .qbox { grid-template-columns: 1fr; gap: 20px; }
  .qbig { max-width: 190px; margin: 0 auto; }
  .q { font-size: 24px; }
  .opts { grid-template-columns: 1fr; }
}

/* resultaat */
.result { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; max-width: 620px; }
.result .frac { font-family: var(--display); font-size: 96px; line-height: 1; font-variant-numeric: lining-nums; }
.result .frac span { color: var(--muted); font-size: .45em; }
.result h3 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0; }
.result p { margin: 0; color: var(--ivory-2); }
.result .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.laurel { color: var(--gold); width: 120px; height: 60px; }

/* ---------- debugpaneel ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 50; background: #12182b; border-left: 1px solid var(--gold);
  box-shadow: -30px 0 60px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.drawer header .tag { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--night); background: var(--gold); padding: 3px 7px; border-radius: 2px; font-weight: 700; }
.drawer .body { overflow-y: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 22px; }
.dsec { display: flex; flex-direction: column; gap: 10px; }
.dsec h4 { margin: 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.dsec .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dsec .row .input { width: auto; flex: 1; min-width: 0; padding: 8px 10px; }
.dsec select.input { padding: 8px 10px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold); }
.dparts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.target { border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-size: 13px; color: var(--ivory-2); background: rgba(216, 180, 106, .06); }
.target b { color: var(--ivory); }
textarea.input { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 160px; resize: vertical; }
.ulist { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.ulist > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
.ulist small { color: var(--muted); }
.ulist .acts { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; }

/* ---------- melding ---------- */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ivory); color: var(--night);
  padding: 12px 18px; border-radius: 2px; font-weight: 600; font-size: 14px; box-shadow: 0 14px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
.loading { min-height: 100%; display: grid; place-items: center; color: var(--muted); }

/* ---------- venster ---------- */
.modalwrap { position: fixed; inset: 0; z-index: 40; background: rgba(8, 11, 20, .7); display: grid; place-items: center; padding: 16px; }

/* ---------- zinnen, tabellen en Grieks toetsenbord ---------- */
.src { font-size: clamp(24px, 3vw, 32px); line-height: 1.4; margin: 4px 0 22px; color: var(--ivory); }
.src u { text-decoration-color: var(--acc); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.tline { min-height: 58px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0 12px; border-bottom: 1px dashed rgba(242, 234, 219, .3); margin-bottom: 16px; }
.tline.ok { border-bottom-color: var(--ok); }
.tline.no { border-bottom-color: var(--bad); }
.tline .muted { font-size: 13.5px; }
.tbank { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tile { font: 500 15px var(--ui); color: var(--ivory); background: var(--night-2); border: 1px solid rgba(242, 234, 219, .22); border-radius: 2px; padding: 9px 14px; cursor: pointer; }
.tile.gr { font-family: var(--greek); font-size: 20px; padding: 5px 13px; }
.tile:hover:not(:disabled) { border-color: var(--acc); }
.tbank .tile:disabled { opacity: .25; cursor: default; }
.tline .tile { background: rgba(255, 255, 255, .04); border-color: var(--acc); }
.tline .tile:disabled { opacity: 1; cursor: default; }
.trow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qtable { border-collapse: collapse; margin-bottom: 18px; min-width: 420px; }
.qtable th, .qtable td { padding: 10px 14px 10px 0; border-top: 1px solid var(--hair); text-align: left; vertical-align: middle; }
.qtable thead th { border-top: 0; font-weight: 400; }
.qtable thead th .gr { display: block; font-size: 20px; }
.qtable thead th small { color: var(--muted); font-size: 12px; }
.qtable tbody th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.qtable td.gr { font-size: 20px; }
.qtable td .pre { font-size: 20px; margin-right: 6px; }
.qtable td .input { width: 150px; display: inline-block; padding: 7px 10px; font-size: 18px; }
.qtable .input.ok { border-color: var(--ok); }
.qtable .input.no { border-color: var(--bad); }
.qtable .corr { display: block; color: var(--ok); font-size: 16px; margin-top: 4px; }
.gkb { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; max-width: 460px; }
.gkb > div { display: flex; gap: 6px; }
.gk { flex: 1; min-width: 0; font-family: var(--greek); font-size: 20px; color: var(--ivory); background: var(--night-2); border: 1px solid rgba(242, 234, 219, .18); border-radius: 2px; padding: 7px 0; cursor: pointer; }
.gk:hover { border-color: var(--acc); }
.gk:active { background: var(--acc); }
.gk.wide { font-family: var(--ui); font-size: 13px; }
.kbhint { font-size: 12px; color: var(--muted); margin: 8px 0 0; max-width: 60ch; }

/* Griekse tekst nooit automatisch in hoofdletters: daarbij blijven accenten los staan */
.gr-nocaps { font-family: var(--greek); text-transform: none; letter-spacing: .02em; font-size: 1.25em; font-weight: 400; }

/* ---------- woordentrainer ---------- */
.trainer { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.trow2 { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.trow2 .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trow2 .info small { color: var(--muted); }
.trow2 .bar { max-width: 360px; margin-top: 4px; }
.trow2 .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.freegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.freegrid fieldset { border: 1px solid var(--hair); border-radius: 4px; padding: 12px 16px 16px; margin: 0; min-width: 0; background: var(--night-2); }
.freegrid legend { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); font-weight: 700; padding: 0 6px; }
.opts-col { display: flex; flex-direction: column; gap: 8px; }
.opts-col .toggle { font-size: 14px; }
.toggle input[type="radio"] { width: 16px; height: 16px; accent-color: var(--acc); }
.toggle input[type="checkbox"] { accent-color: var(--acc); }
.wtable .ck { width: 28px; }
.wtable .ck input { width: 17px; height: 17px; accent-color: var(--acc); }
.star { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.star:hover { color: var(--gold); }
.star.on { color: var(--gold); }
.star.on .ico { fill: var(--gold); }
.pill.bad { color: var(--bad); border-color: rgba(224, 96, 111, .45); }
@media (max-width: 860px) { .freegrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .freegrid { grid-template-columns: 1fr; } .trow2 { grid-template-columns: 1fr; } .trow2 .acts { justify-content: flex-start; } .boxes { grid-template-columns: repeat(2, 1fr); } }

/* sorteren */
.sortlist { display: flex; flex-direction: column; border-top: 1px solid var(--hair); margin-bottom: 18px; max-width: 620px; }
.sortrow { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.sortrow .gr { font-size: 22px; }
.sortrow small { color: var(--muted); }
.sortbtns { display: flex; gap: 6px; }
.sortb { font: 500 13px var(--ui); color: var(--ivory); background: transparent; border: 1px solid rgba(242, 234, 219, .2); border-radius: 2px; padding: 7px 11px; cursor: pointer; }
.sortb:hover:not(:disabled) { border-color: var(--acc); }
.sortb.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.sortb.right { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.sortb.on.right { background: var(--ok); border-color: var(--ok); color: var(--night); }
.sortb.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.sortb.hint { border-style: dashed; border-color: var(--gold); }
.qtable .plainhead { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .sortrow { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- rijtjestrainer ---------- */
.subsec { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); font-weight: 700; margin: 22px 0 6px; }
.trow2.gram { grid-template-columns: 20px 1fr auto; }
.trow2.gram > input { width: 17px; height: 17px; accent-color: var(--acc); }
.trow2 .smp { font-family: var(--greek); font-weight: 400; color: var(--ivory-2); margin-left: 6px; font-size: 1.05em; }
.trow.scope { margin-bottom: 6px; }
.trow.scope .toggle { font-size: 14px; }
.trow.scope .btn { margin-left: auto; }
.qtable tr.grp th { border-top: 0; padding: 16px 0 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); font-weight: 700; }
.qtable td.muted { color: var(--muted); }
.qtable.study td.gr { font-size: 21px; white-space: nowrap; }
.qtable.study .art { color: var(--muted); }
.qtable.study thead th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.qtable.study thead th .gr { text-transform: none; letter-spacing: 0; color: var(--ivory); font-weight: 400; }
.qtable.study thead th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; }
@media (max-width: 560px) { .trow2.gram { grid-template-columns: 20px 1fr; } .trow2.gram .acts { grid-column: 2; } .trow.scope .btn { margin-left: 0; } }

/* ---------- leestekst ---------- */
.reader { border: 1px solid var(--hair); border-left: 3px solid var(--acc); border-radius: 3px; background: var(--night-2); padding: 14px 18px 12px; margin: 0 0 22px; }
.reader .rtitle { font-size: 13px; color: var(--acc); margin-bottom: 4px; }
.reader .rintro { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.reader .rtext { font-size: 21px; line-height: 1.75; margin: 0 0 8px; }
.reader .rtext > span { opacity: .55; }
.reader .rtext > span.past { opacity: .8; }
.reader .rtext > span.cur { opacity: 1; background: rgba(255, 255, 255, .06); box-shadow: 0 2px 0 var(--acc); }
.gw { font: inherit; color: inherit; background: none; border: 0; padding: 0 1px; cursor: pointer; border-radius: 2px; }
.gw:hover, .gw.on { background: rgba(255, 255, 255, .12); color: var(--ivory); }
.reader .gloss { font-size: 13.5px; color: var(--ivory-2); min-height: 1.4em; border-top: 1px solid var(--hair); padding-top: 8px; }
.reader .gloss .gr { font-size: 1.15em; }
.wcard .name .dict { display: block; font-size: 20px; margin-top: 6px; font-style: normal; color: var(--ivory-2); }
