/* Leer Nederlands — visual system v3, skinnable.
   Default is the original look (bare :root); the switcher sets data-skin on <html> for the Dutch skins.
   Colour still means something: --voc = words, --gram = grammar, --spk = speaking, --exam = exams. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&family=Archivo:wght@400;500;600;700&family=Archivo+Black&family=Saira+Condensed:wght@600;700&family=Libre+Franklin:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ===== Origineel (default) — the original warm/orange system ===== */
:root {
  --bg: #F3F5F7; --panel: #FFFFFF; --panel-2: #F8FAFB; --ink: #17202A; --ink-2: #3B4753; --muted: #6E7681; --line: #DDE2E7;
  --accent: #E8621A; --accent-soft: #FDEEE4; --accent-ink: #9A3E0B; --btn-ink: #FFFFFF; --focus: var(--accent);
  --voc: #E8621A; --voc-soft: #FDEEE4; --gram: #2F5D8A; --gram-soft: #E6EEF6; --spk: #1E7F4F; --spk-soft: #E3F3EA; --exam: #6B4FBB; --exam-soft: #EEE9FA;
  --green: #1E7F4F; --amber: #B4530A; --red: #C2322B; --red-soft: #FBE7E5; --blue: #2F5D8A;
  --radius: 14px; --shadow: 0 1px 2px rgba(23,32,42,.05), 0 6px 20px -12px rgba(23,32,42,.18);
  --display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* original look keeps its dark mode (skins are light-committed) */
@media (prefers-color-scheme: dark) { :root:not([data-skin]):not([data-theme="light"]) {
  --bg: #0F1419; --panel: #171D24; --panel-2: #1C232B; --ink: #E6EAEE; --ink-2: #C2C9D1; --muted: #8B95A1; --line: #2A333D;
  --accent: #F0793A; --accent-soft: #3A2418; --accent-ink: #FFB48A;
  --voc: #F0793A; --voc-soft: #3A2418; --gram: #7FB0E0; --gram-soft: #1B2B3C; --spk: #4CC383; --spk-soft: #173225; --exam: #A78BFA; --exam-soft: #2A2340;
  --green: #4CC383; --amber: #E8945A; --red: #F07070; --red-soft: #3A1D1B; --blue: #7FB0E0;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
}}
/* ===== Delfts — cobalt on cool porcelain, Delftware blue-and-white ===== */
:root[data-skin="delfts"] {
  --bg: #EEF2F8; --panel: #FFFFFF; --panel-2: #E7EDF6; --ink: #16204A; --ink-2: #3A4676; --muted: #6B76A0; --line: #CDD8EC;
  --accent: #1B3A8C; --accent-soft: #DFE7F6; --accent-ink: #14306E; --btn-ink: #FFFFFF; --focus: var(--accent);
  --voc: #1B3A8C; --voc-soft: #DFE7F6; --gram: #2F6FB5; --gram-soft: #DEEBF7; --spk: #2E7D6B; --spk-soft: #DCEFE9; --exam: #6B4FA8; --exam-soft: #E9E4F5;
  --green: #2E7D6B; --amber: #B26A00; --red: #B3322B; --red-soft: #F6E2E0; --blue: #2F6FB5;
  --pop: #E07A2E; --pop-soft: #F7E1CE; --pop-ink: #A24E17;
  --radius: 7px; --shadow: 0 1px 2px rgba(22,32,74,.06), 0 10px 26px -16px rgba(22,32,74,.28);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Delft is the only look: clean porcelain wash + orange pop + painted tile icons */
:root[data-skin="delfts"] body { background-image: linear-gradient(180deg, #F4F7FB 0%, #EAEFF7 60%, #E6ECF5 100%); background-attachment: fixed; }
:root[data-skin="delfts"] .card.today .eyebrow { color: var(--pop-ink); }
:root[data-skin="delfts"] .streak { background: var(--pop-soft); color: var(--pop-ink); }
:root[data-skin="delfts"] .progress-bar span { background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 72%, var(--pop) 100%); }
.dtile { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; }
.dtile svg { width: 40px; height: 40px; display: block; filter: drop-shadow(0 2px 6px rgba(22,32,74,.16)); }
.dtile.sm { width: 30px; height: 30px; } .dtile.sm svg { width: 30px; height: 30px; }
.dtile.lg { width: 54px; height: 54px; } .dtile.lg svg { width: 54px; height: 54px; }
.tile .dtile { margin-bottom: 6px; }
/* ===== De Stijl — Mondrian primaries, black rules, heavy grotesk ===== */
:root[data-skin="stijl"] {
  --bg: #EFECE3; --panel: #FBFAF6; --panel-2: #F1EEE6; --ink: #141210; --ink-2: #3A352D; --muted: #6B665C; --line: #141210;
  --accent: #D01E12; --accent-soft: #F7DCD9; --accent-ink: #9C140B; --btn-ink: #FFFFFF; --focus: var(--accent);
  --voc: #D01E12; --voc-soft: #F7DCD9; --gram: #123EA8; --gram-soft: #DDE4F4; --spk: #1E7F4F; --spk-soft: #DFF0E6; --exam: #E0A400; --exam-soft: #FBEEC2;
  --green: #1E7F4F; --amber: #B26A00; --red: #D01E12; --red-soft: #F7DCD9; --blue: #123EA8;
  --radius: 0px; --shadow: none;
  --display: "Archivo Black", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
}
/* ===== Perron — NS railway wayfinding: signal yellow on ink, condensed signage type ===== */
:root[data-skin="perron"] {
  --bg: #F2F1EC; --panel: #FFFFFF; --panel-2: #ECEAE3; --ink: #14140F; --ink-2: #3A382F; --muted: #6F6A5F; --line: #D8D5CB;
  --accent: #F5B301; --accent-soft: #FDEECB; --accent-ink: #5C4500; --btn-ink: #14140F; --focus: #0A55C9;
  --voc: #C26A00; --voc-soft: #F7E7D2; --gram: #0A55C9; --gram-soft: #DCE7FB; --spk: #1E7F4F; --spk-soft: #DFF0E6; --exam: #6B4FBB; --exam-soft: #E9E3F7;
  --green: #1E7F4F; --amber: #C26A00; --red: #C0281F; --red-soft: #F7DED9; --blue: #0A55C9;
  --radius: 4px; --shadow: 0 1px 2px rgba(20,20,15,.06), 0 8px 20px -14px rgba(20,20,15,.3);
  --display: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Libre Franklin", system-ui, -apple-system, sans-serif;
}
/* ===== Gouache — weathered plaster, muted painterly palette, Spectral serif ===== */
:root[data-skin="gouache"] {
  --bg: #EBE4D7; --panel: rgba(251,247,238,.9); --panel-2: rgba(241,234,220,.82); --ink: #332F27; --ink-2: #544E42; --muted: #8B8578; --line: #D6CBB6;
  --accent: #A85F38; --accent-soft: #EFE3D5; --accent-ink: #7C4022; --btn-ink: #F6F0E6; --focus: #5E6E77;
  --voc: #A85F38; --voc-soft: #EFE3D5; --gram: #5E6E77; --gram-soft: #E1E6E7; --spk: #6E7A52; --spk-soft: #E7EADC; --exam: #7A6A82; --exam-soft: #EAE4EE;
  --green: #6E7A52; --amber: #A87A2E; --red: #A34B3E; --red-soft: #F0E1DC; --blue: #5E6E77;
  --radius: 4px; --shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 20px -14px rgba(60,50,35,.5);
  --display: "Spectral", Georgia, "Times New Roman", serif;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-skin="gouache"] body {
  background-color: #EBE4D7;
  background-image:
    radial-gradient(130% 60% at 12% -2%, rgba(176,105,63,.05), transparent 60%),
    radial-gradient(120% 55% at 92% 102%, rgba(94,110,119,.06), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='0.07'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: auto, auto, 600px 600px, 160px 160px;
}
/* the newest skin sits full-width at the foot of the picker */
.skin-picker .skin:last-child { grid-column: 1 / -1; }
/* Gouache theme illustrations: multi-tone flat glyphs on a soft plaster tile */
.gicon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; flex: none;
  background: rgba(94,110,119,.07); border: 1px solid rgba(120,110,92,.2); }
.gicon svg { width: 30px; height: 30px; display: block; }
.gicon.sm { width: 30px; height: 30px; border-radius: 3px; } .gicon.sm svg { width: 22px; height: 22px; }
.gicon.lg { width: 52px; height: 52px; } .gicon.lg svg { width: 40px; height: 40px; }
.tile .gicon { margin-bottom: 6px; }
/* Perron headings read as signage: condensed + uppercase */
:root[data-skin="perron"] h2, :root[data-skin="perron"] h3 { text-transform: uppercase; letter-spacing: .01em; }
/* De Stijl: rules are thick and black */
:root[data-skin="stijl"] .card, :root[data-skin="stijl"] .tile, :root[data-skin="stijl"] .opt,
:root[data-skin="stijl"] .answer-input, :root[data-skin="stijl"] .word-token { border-width: 2px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: 30px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
h4 { font-size: 15px; font-weight: 700; }
p { margin: 8px 0; }
button { font: inherit; cursor: pointer; }
select, input, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
select:focus, input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
#app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.topbar { display: none; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 19px; font-weight: 800; }
.brand .tag { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.flag { width: 30px; height: 22px; border-radius: 6px; flex: none;
  background: linear-gradient(180deg, #AE1C28 0 33%, #fff 33% 66%, #21468B 66%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
/* Stempel character: postmark logo + "Gehaald" stamps */
.pmlogo { width: 30px; height: 30px; flex: none; display: inline-block; }
.pmlogo svg { width: 100%; height: 100%; display: block; }
.pmlogo.sm { width: 22px; height: 22px; }
.stamp-badge { justify-self: end; font-family: var(--mono); font-weight: 600; font-size: 10px; letter-spacing: .06em;
  color: var(--accent); border: 1.5px solid var(--accent); border-radius: 6px; padding: 3px 8px; transform: rotate(-4deg); white-space: nowrap; }
.stamp-wrap { display: flex; justify-content: center; margin-bottom: 6px; }
.stampbig { width: 116px; height: 116px; animation: stampin .28s cubic-bezier(.2,1.4,.5,1) both; }
@keyframes stampin { 0% { transform: scale(1.6) rotate(-12deg); opacity: 0 } 100% { transform: scale(1) rotate(-7deg); opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .stampbig { animation: none; transform: rotate(-7deg); } }

/* theme pictograms (Vlak): a solid glyph in a soft colour dot */
.themeicon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--c) 15%, var(--panel)); }
.themeicon svg { width: 22px; height: 22px; fill: var(--c); }
.themeicon.sm { width: 30px; height: 30px; } .themeicon.sm svg { width: 17px; height: 17px; }
.themeicon.lg { width: 52px; height: 52px; } .themeicon.lg svg { width: 28px; height: 28px; }
.tile .themeicon { margin-bottom: 6px; }
.vocab-theme-h { display: flex; align-items: center; gap: 12px; }
.vocab-theme-h h3 { margin: 0; display: flex; align-items: center; gap: 10px; flex: 1; }

.skin-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); }
.skin-picker .skin { border: none; background: transparent; color: var(--muted); font-family: var(--body); font-weight: 600; font-size: 12px; padding: 7px 4px; border-radius: var(--radius); cursor: pointer; line-height: 1.1; }
.skin-picker .skin:hover { color: var(--ink); }
.skin-picker .skin[aria-pressed="true"] { background: var(--panel); color: var(--accent-ink); box-shadow: var(--shadow); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.skin-select { font-size: 12px; padding: 5px 8px; border-radius: var(--radius); }
.level-picker { display: flex; align-items: center; gap: 8px; }
.level-picker label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.level-picker select { flex: 1; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav .group { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 12px 0 4px 10px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
nav a::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--line); flex: none; }
nav a[data-mod="voc"]::before { background: var(--voc); } nav a[data-mod="gram"]::before { background: var(--gram); }
nav a[data-mod="spk"]::before { background: var(--spk); } nav a[data-mod="exam"]::before { background: var(--exam); }
nav a:hover { background: var(--panel-2); color: var(--ink); }
nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.engine-status { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--amber); } .dot.bad { background: var(--red); }
main { padding: 34px clamp(24px, 4vw, 72px) 100px; max-width: 1600px; width: 100%; min-width: 0; margin-inline: auto; }
#app > * { min-width: 0; }
.loading { color: var(--muted); }
.page-head { margin-bottom: 22px; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.bottombar { display: none; }

@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { grid-column: 1; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 15; }
  .brand.small { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 16px; }
  .brand.small .flag { width: 22px; height: 16px; border-radius: 4px; }
  .topbar-account { font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
  #app.gated .topbar { display: none; }
  main { padding: 18px 16px 90px; }
  .unit-row { grid-template-columns: 30px 28px 1fr 46px; gap: 9px; }
  h2 { font-size: 26px; }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 0; border-radius: 10px; }
  .bottombar a .ic { width: 22px; height: 22px; border-radius: 7px; background: var(--line); }
  .bottombar a[data-mod="voc"] .ic { background: var(--voc); } .bottombar a[data-mod="gram"] .ic { background: var(--gram); }
  .bottombar a[data-mod="spk"] .ic { background: var(--spk); } .bottombar a[data-mod="exam"] .ic { background: var(--exam); }
  .bottombar a.active { color: var(--ink); font-weight: 600; }
}

/* ---------- home: today card, numbers, folded path ---------- */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.streak { display: flex; align-items: baseline; gap: 6px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 6px 14px; }
.streak .n { font-family: var(--display); font-weight: 800; font-size: 20px; } .streak .l { font-size: 12px; font-weight: 600; }
.card.today { border-color: transparent; background: linear-gradient(135deg, var(--panel) 0%, var(--accent-soft) 140%); padding: 24px 26px; }
.card.today .eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 700; margin-bottom: 4px; }
.card.today h3 { font-size: 24px; margin-bottom: 4px; }
.card.today .what { font-size: 16px; margin: 4px 0 14px; max-width: 60ch; } .card.today .what em { font-style: normal; font-weight: 600; color: var(--accent-ink); }
.unit-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.ustep { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.ustep .d { width: 8px; height: 8px; border-radius: 3px; background: var(--line); }
.ustep.voc .d { background: var(--voc); } .ustep.gram .d { background: var(--gram); } .ustep.exam .d { background: var(--exam); }
.ustep .v { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ustep.cur { border-color: var(--accent); color: var(--ink); background: var(--panel); box-shadow: 0 0 0 3px var(--accent-soft); }
.ustep.done { opacity: .7; } .ustep.done .d { background: var(--green); }
.today-actions { gap: 14px; }
.btn.big { padding: 14px 26px; font-size: 17px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.segb { border: none; background: transparent; padding: 8px 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.segb.on { background: var(--ink); color: var(--panel); }
.lnk { color: var(--ink-2); font-weight: 600; text-decoration: none; font-size: 14px; } .lnk:hover { text-decoration: underline; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.numb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.numb .n { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; } .numb .l { font-size: 12px; color: var(--muted); }
.unit-fold { padding: 6px 12px; font-size: 13px; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.side-settings { border-top: 1px solid var(--line); padding-top: 10px; }
.side-settings summary { cursor: pointer; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; list-style: none; }
.side-settings summary::before { content: "▸ "; } .side-settings[open] summary::before { content: "▾ "; }
.side-settings .level-picker { margin-bottom: 8px; }
@media (max-width: 820px) { .card.today { padding: 18px; } .card.today h3 { font-size: 21px; } .today-actions .btn.big { width: 100%; text-align: center; } }

/* ---------- account link + gate (sign-in, welcome, placement) ---------- */
.account-link { margin-top: auto; display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); text-decoration: none; color: var(--ink); }
.account-link .who { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-link .sub { font-size: 11.5px; color: var(--muted); }
.account-link.active { border-color: var(--accent); }
.account-link + .engine-status { margin-top: 0; }
#app.gated { grid-template-columns: 1fr; }
#app.gated .sidebar, #app.gated .bottombar { display: none; }
#app.gated main { max-width: none; padding: 0; }
.gate { min-height: 100vh; display: grid; place-items: start center; padding: 6vh 16px 40px; background:
  radial-gradient(900px 400px at 10% -10%, var(--accent-soft), transparent 60%), radial-gradient(700px 400px at 110% 10%, var(--gram-soft), transparent 60%); }
.gate-card { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px; box-shadow: var(--shadow); }
.gate-card.wide { max-width: 760px; }
.gate-card h2 { font-size: 26px; margin: 18px 0 6px; }
.brand.big { margin-bottom: 6px; } .brand.big h1 { font-size: 24px; } .brand.big .tag { font-size: 13px; }
.signin-form { display: grid; gap: 10px; margin-top: 16px; }
.signin-form input { padding: 12px 14px; font-size: 16px; }
.lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.fine { font-size: 13px; margin-top: 12px; }
.wstep { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.wstep h3 { display: flex; align-items: center; gap: 10px; }
.stepno { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-family: var(--display); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 14px; color: var(--ink); font-weight: 600; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; }
.choice span { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.choice:disabled { opacity: .5; cursor: not-allowed; }
.choice-row.small .choice { padding: 6px 12px; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.start-opt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); }
.start-opt strong { font-family: var(--display); font-size: 16px; } .start-opt span { font-size: 13px; color: var(--muted); }
.start-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.start-opt.pick { cursor: default; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pref-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.btn.danger { background: var(--red); }
a.btn { text-decoration: none; display: inline-block; }
@media (max-width: 820px) { .gate-card { padding: 22px 18px; border-radius: 16px; } .gate { padding-top: 3vh; } }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.mod-voc { border-top: 3px solid var(--voc); } .card.mod-gram { border-top: 3px solid var(--gram); }
.card.mod-spk { border-top: 3px solid var(--spk); } .card.mod-exam { border-top: 3px solid var(--exam); }
.grid { display: grid; gap: 14px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile h4 { margin-bottom: 4px; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; }
.tile.priority { border-color: var(--accent); background: var(--accent-soft); }
.tile.done { opacity: .55; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill.lvl { background: var(--gram-soft); color: var(--gram); border-color: transparent; }
.pill.review { background: var(--red-soft); color: var(--red); border-color: transparent; }
.pill.weak-spot { background: #FFF1D6; color: #8A5A00; border-color: transparent; }
.pill.new { background: var(--gram-soft); color: var(--gram); border-color: transparent; }
.pill.extra, .pill.unit { background: var(--voc-soft); color: var(--accent-ink); border-color: transparent; }
.pill.KNM, .pill.spice { background: var(--exam-soft); color: var(--exam); border-color: transparent; }
.pill.ok { background: var(--spk-soft); color: var(--spk); border-color: transparent; padding: 6px 10px; }
.pill.voc { background: var(--voc-soft); color: var(--voc); border-color: transparent; } .pill.gram { background: var(--gram-soft); color: var(--gram); border-color: transparent; }
.pill.spk { background: var(--spk-soft); color: var(--spk); border-color: transparent; } .pill.exam { background: var(--exam-soft); color: var(--exam); border-color: transparent; }
.muted { color: var(--muted); }
.good { color: var(--green); font-weight: 600; } .bad { color: var(--red); font-weight: 600; }
.notice { background: #FFF7E6; border: 1px solid #F3D8A0; color: #6B4700; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice { background: #2E2412; border-color: #5B4718; color: #F3D8A0; } }

/* ---------- buttons ---------- */
.btn { background: var(--accent); color: var(--btn-ink); border: none; border-radius: var(--radius); padding: 11px 18px; font-weight: 700; font-family: var(--display); font-size: 15px; letter-spacing: .01em;
  box-shadow: 0 6px 16px -8px rgba(232,98,26,.7); transition: transform .1s ease, filter .1s ease; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.05); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.small { font-size: 12px; padding: 5px 11px; margin-left: 10px; vertical-align: middle; }
.btn.gram, .btn.spk, .btn.exam { color: #fff; } :root[data-skin="stijl"] .btn.exam { color: #141210; }
.btn.gram { background: var(--gram); box-shadow: 0 6px 16px -8px rgba(47,93,138,.7); } .btn.spk { background: var(--spk); box-shadow: 0 6px 16px -8px rgba(30,127,79,.7); }
.btn.exam { background: var(--exam); box-shadow: 0 6px 16px -8px rgba(107,79,187,.7); }
.btn.leveltest { background: var(--pop); color: #fff; box-shadow: 0 6px 16px -8px rgba(224,122,46,.7); }
.btn.leveltest:disabled { opacity: .5; }
.speak-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px 8px; font-size: 14px; line-height: 1; vertical-align: middle; }
.speak-btn:hover { border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- exercise card ---------- */
.exercise { position: relative; }
.q { font-size: 19px; font-weight: 600; margin-bottom: 14px; line-height: 1.4; }
.q .speak-btn { margin-left: 8px; }
.q mark.err { background: var(--red-soft); color: var(--red); padding: 0 3px; border-radius: 3px; text-decoration: underline wavy var(--red); }
.options { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; padding: 12px 16px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; font-size: 16px; color: var(--ink); transition: border-color .1s, background .1s; }
.opt:hover { border-color: var(--accent); background: var(--panel-2); }
.opt.correct { border-color: var(--green); background: var(--spk-soft); } .opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.chosen { border-color: var(--blue); background: var(--gram-soft); }
.answer-input { padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 17px; flex: 1; min-width: 200px; }
.words-pool { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.word-token { padding: 9px 14px; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; user-select: none; font-size: 16px; transition: transform .08s; }
.word-token:hover { transform: translateY(-1px); border-color: var(--accent); }
.word-token.used { opacity: .3; cursor: default; }
.assembled { min-height: 52px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.assembled .word-token { cursor: pointer; background: var(--panel); }
.assembled .word-token:hover { background: var(--red-soft); text-decoration: line-through; border-color: var(--red); }
.feedback { margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: 15px; line-height: 1.5; animation: rise .18s ease-out; }
.feedback.good { background: var(--spk-soft); color: var(--green); } .feedback.bad { background: var(--red-soft); color: var(--red); }
.feedback strong { font-weight: 700; }
.feedback mark { background: rgba(255,255,255,.55); color: inherit; padding: 0 3px; border-radius: 3px; font-weight: 700; }
.fb-examples { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.08); color: var(--ink); }
.fb-examples .ex { margin: 6px 0; } .fb-examples mark { background: var(--voc-soft); color: var(--voc); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.progress-bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #FFA36B); border-radius: 6px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.exercise .modstripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); }

/* ---------- lists & content ---------- */
.topic { border-bottom: 1px solid var(--line); padding: 14px 0; } .topic:last-child { border-bottom: 0; }
.topic h4 { font-size: 16px; margin-bottom: 4px; } .topic .exp { color: var(--ink-2); margin: 0 0 8px; }
.ex { background: var(--panel-2); border-radius: 10px; padding: 9px 12px; margin: 6px 0; }
.ex .nl { font-weight: 600; } .ex .en { color: var(--muted); font-size: 13.5px; }
.wordbank { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.cat-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 10px; font-weight: 600; }
.vocab-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vocab-row:last-child { border-bottom: 0; }
.vocab-row .nl { font-weight: 600; font-size: 16px; } .vocab-row .en { color: var(--muted); font-size: 13.5px; }
.vocab-row.has-ex { cursor: pointer; }
.vocab-row.has-ex .vocab-main .nl::after { content: " ▸"; color: var(--muted); font-size: 12px; } .vocab-row.open .vocab-main .nl::after { content: " ▾"; }
.vocab-row .examples { flex-basis: 100%; margin-top: 8px; padding: 8px 12px; background: var(--panel-2); border-radius: 10px; animation: rise .18s ease-out; }
.vocab-row .examples mark, .learn-ex mark { background: var(--voc-soft); color: var(--voc); padding: 0 3px; border-radius: 3px; font-weight: 600; }
.plan-list { list-style: none; padding: 0; margin: 12px 0 0; }
.plan-list li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; } .plan-list li.done { opacity: .5; text-decoration: line-through; }
.weak-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.mistake-list { padding-left: 18px; font-size: 14px; } .mistake-list li { margin: 4px 0; }
.tips { margin: 8px 0 0; padding-left: 18px; } .tips li { margin: 4px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat .n { font-size: 26px; font-weight: 800; font-family: var(--display); } .stat .l { font-size: 12px; color: var(--muted); }

/* ---------- speaking ---------- */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0; }
.mic-btn { width: 88px; height: 88px; border-radius: 50%; border: none; background: var(--spk); color: #fff; font-size: 34px; box-shadow: 0 10px 28px -10px rgba(30,127,79,.8); transition: transform .1s; }
.mic-btn:hover { transform: scale(1.04); } .mic-btn:disabled { opacity: .5; }
.mic-btn.recording { background: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(194,50,43,.45); } 100% { box-shadow: 0 0 0 18px rgba(194,50,43,0); } }
.target-phrase { font-size: 28px; font-weight: 800; text-align: center; margin: 6px 0; font-family: var(--display); }
.target-phrase.paragraph { font-size: 18px; font-weight: 500; text-align: left; line-height: 1.6; background: var(--panel-2); padding: 14px 16px; border-radius: 12px; font-family: var(--body); }
.target-en { text-align: center; color: var(--muted); margin: 0; }
.target-focus { text-align: center; font-size: 13px; color: var(--spk); margin: 4px 0 0; font-weight: 600; }
.score-ring { font-size: 44px; font-weight: 800; font-family: var(--display); }
.score-detail { display: flex; gap: 20px; justify-content: center; margin: 8px 0 12px; }
.score-detail .n { font-size: 20px; font-weight: 700; font-family: var(--display); } .score-detail .l { font-size: 12px; color: var(--muted); }
.heard { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 8px 0; }
.wordmarks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.wm { padding: 4px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.wm.g { background: var(--spk-soft); color: var(--green); } .wm.m { background: #FFF1D6; color: #8A5A00; } .wm.b { background: var(--red-soft); color: var(--red); }

/* ---------- level & path ---------- */
.readouts { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 820px) { .readouts { grid-template-columns: 1fr; } }
.readout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.readout .l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.readout .big { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.readout .sub { color: var(--muted); font-size: 13px; }
.ring { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--accent) var(--p, 0%), var(--line) 0); }
.ring div { width: 60px; height: 60px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 17px; }
.cmd { display: grid; gap: 7px; margin-top: 8px; }
.cmd .r { display: grid; grid-template-columns: 74px 1fr 40px; gap: 8px; align-items: center; font-size: 12.5px; }
.cmd .bar { height: 8px; background: var(--line); border-radius: 5px; position: relative; overflow: hidden; }
.cmd .bar::after { content: ""; position: absolute; left: 75%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .35; }
.cmd .bar span { display: block; height: 100%; border-radius: 5px; }
.cmd .voc span { background: var(--voc); } .cmd .gram span { background: var(--gram); } .cmd .spk span { background: var(--spk); } .cmd .knm span { background: var(--exam); }
.track { position: relative; margin: 8px 0 4px; padding: 10px 0; overflow-x: auto; }
.track .line { position: absolute; left: 12px; right: 12px; top: 22px; height: 3px; background: var(--line); border-radius: 2px; }
.track .nodes { display: flex; gap: 14px; position: relative; min-width: max-content; padding: 0 4px; }
.node { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; flex: none; font-family: var(--display); }
.node.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.node.cur { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.node.test { border-radius: 8px; border-color: var(--exam); color: var(--exam); } .node.test.done { background: var(--exam); color: #fff; }
.unit-list { display: grid; gap: 8px; }
.unit-row { display: grid; grid-template-columns: 34px 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: var(--ink); }
.unit-row:hover { border-color: var(--accent); }
.unit-row.cur { border-color: var(--accent); background: var(--accent-soft); }
.unit-row.ahead { opacity: .75; }
.unit-row .t { font-weight: 600; } .unit-row .g { color: var(--muted); font-size: 12.5px; }
.unit-row .mini { width: 90px; }
.mini { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; } .mini-fill { height: 100%; background: var(--accent); transition: width .4s; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); position: relative; overflow: hidden; }
.step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.step.voc::before { background: var(--voc); } .step.gram::before { background: var(--gram); } .step.spk::before { background: var(--spk); } .step.exam::before { background: var(--exam); }
.step h4 { margin-bottom: 4px; } .step .s { font-size: 12.5px; color: var(--muted); }
.step .mini { margin: 8px 0; }
.step.done { border-color: var(--spk); } .step.done h4::after { content: " ✓"; color: var(--spk); }
.session-mix { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.summary { text-align: center; padding: 10px 0; }
.summary .big { font-family: var(--display); font-size: 40px; font-weight: 800; }
.summary .lines { display: grid; gap: 4px; margin: 10px 0 16px; color: var(--ink-2); }
.level-track { position: relative; height: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; margin: 26px 0 10px; }
.level-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #FFA36B); border-radius: 8px; transition: width .6s; }
.level-mark { position: absolute; top: -20px; transform: translateX(-100%); font-size: 11px; color: var(--muted); font-weight: 600; }
.level-rows { display: grid; gap: 6px; margin-top: 10px; }
.level-row { display: grid; grid-template-columns: 44px 120px 1fr; gap: 10px; align-items: center; font-size: 12px; }
.level-row.held .pill { background: var(--spk-soft); color: var(--spk); }

/* ---------- exams / study / learn ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; text-align: left; font-weight: 600; color: var(--ink); }
.tab small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.tab.active { border-color: var(--exam); background: var(--exam-soft); }
.exam-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin-bottom: 14px; }
.exam-bar .clock { font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--display); font-size: 17px; } .exam-bar .btn { margin-left: auto; }
.exam-text { background: var(--panel-2); border-left: 3px solid var(--exam); padding: 12px 14px; border-radius: 6px; margin: 10px 0 14px; line-height: 1.6; }
.exam-q { padding: 10px 0; border-top: 1px solid var(--line); } .exam-q.wrong { background: var(--red-soft); margin: 0 -12px; padding: 10px 12px; border-radius: 8px; }
.audio-wrap { margin: 8px 0 14px; }
.learn-word { text-align: center; margin: 10px 0 18px; }
.learn-word .nl { font-size: 38px; font-weight: 800; font-family: var(--display); letter-spacing: -.5px; }
.learn-word .pos { color: var(--muted); font-size: 13px; margin-top: 2px; } .learn-word .en { font-size: 21px; margin-top: 6px; }
.learn-ex { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.ipa { font-family: "Charis SIL", "Doulos SIL", var(--mono); color: var(--muted); font-size: 18px; margin-top: 2px; } .ipa.small { font-size: 14px; margin-bottom: 6px; }
.verb-forms { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 4px 0 12px; }
.vf { background: var(--gram-soft); border-radius: 10px; padding: 8px 12px; display: flex; gap: 8px; align-items: baseline; }
.vf .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .vf .v { font-weight: 700; font-size: 16px; }
.lesson p { line-height: 1.65; } .term { color: var(--accent); font-weight: 600; }
.key-terms { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); } .kt { padding: 5px 0; font-size: 14px; } .kt .nl { font-weight: 600; }
.tip { margin-top: 10px; background: var(--exam-soft); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; } .toc a { color: var(--blue); text-decoration: none; }
.template { white-space: pre-wrap; background: var(--panel-2); border-radius: 10px; padding: 12px; font-family: inherit; font-size: 14px; line-height: 1.5; }
#voice-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } #voice-picker select { flex: 1; min-width: 0; }

.compound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.compound .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.compound .part { background: var(--voc-soft); border-radius: 10px; padding: 6px 12px; }
.compound .pnl { font-weight: 700; } .compound .pen { color: var(--muted); font-size: 13px; }
.compound .plus { color: var(--muted); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.today-h { display: flex; align-items: center; gap: 12px; }
