/* MemoPlan: rustig, overzichtelijk, grote klikvlakken. */
:root {
    --bg: #f6f5fb;
    --surface: #ffffff;
    --surface-2: #f0eef8;
    --border: #e3e0f0;
    --text: #1f1d2b;
    --muted: #6b6880;
    --accent: #6c5ce7;
    --accent-ink: #ffffff;
    --accent-soft: #ece9fd;
    --good: #0f8a5f;
    --good-soft: #e3f6ee;
    --warn: #9a6400;
    --warn-soft: #fff4dc;
    --bad: #c0392b;
    --bad-soft: #fdecea;
    --ready: #00a884;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(31, 29, 43, .04), 0 4px 16px rgba(31, 29, 43, .05);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs: 16px;
    --ls: normal;
    --lh: 1.55;
    --sidebar: 240px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #14131c;
        --surface: #1d1b28;
        --surface-2: #262435;
        --border: #34314a;
        --text: #eceaf6;
        --muted: #a29fb8;
        --accent: #8f82ff;
        --accent-ink: #14131c;
        --accent-soft: #2c2850;
        --good: #3ccf91;
        --good-soft: #173628;
        --warn: #f2b84b;
        --warn-soft: #3a2e14;
        --bad: #ff7b6e;
        --bad-soft: #3d1d1a;
        --ready: #3ccfab;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #14131c;
    --surface: #1d1b28;
    --surface-2: #262435;
    --border: #34314a;
    --text: #eceaf6;
    --muted: #a29fb8;
    --accent: #8f82ff;
    --accent-ink: #14131c;
    --accent-soft: #2c2850;
    --good: #3ccf91;
    --good-soft: #173628;
    --warn: #f2b84b;
    --warn-soft: #3a2e14;
    --bad: #ff7b6e;
    --bad-soft: #3d1d1a;
    --ready: #3ccfab;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
}
:root[data-readable="1"] {
    --fs: 18px;
    --ls: .03em;
    --lh: 1.75;
    --font: Verdana, "Atkinson Hyperlegible", Tahoma, system-ui, sans-serif;
}
:root[data-reduce-motion="1"] *, :root[data-reduce-motion="1"] *::before, :root[data-reduce-motion="1"] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: var(--lh);
    letter-spacing: var(--ls);
    min-height: 100vh;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.1rem; }
.h4 { font-size: 1rem; margin-top: 1em; }
p { margin: 0 0 .8em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
kbd {
    font-family: ui-monospace, monospace; font-size: .7em; border: 1px solid currentColor; border-radius: 5px;
    padding: 0 .35em; margin-left: .5em; opacity: .55;
}
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.grow { flex: 1 1 200px; min-width: 0; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface);
    border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1.25rem .9rem; gap: 1rem; z-index: 20;
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; padding: 0 .5rem; }
.mainnav, .sidebar-bottom { display: flex; flex-direction: column; gap: .2rem; }
.sidebar-bottom { margin-top: auto; }
.mainnav a, .sidebar-bottom > a, .sidebar-bottom .linklike {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: 12px;
    color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; width: 100%;
}
.mainnav a:hover, .sidebar-bottom > a:hover, .sidebar-bottom .linklike:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active, .sidebar-bottom > a.active { background: var(--accent-soft); color: var(--accent); }
.linklike { background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.sidebar-bottom > a.levelbox { display: block; color: var(--text); font-weight: 400; }
.levelbox { display: block; padding: .7rem .8rem; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--text); margin-bottom: .4rem; }
.levelbox-top { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .35rem; }
.levelbox-top span { color: var(--muted); }

main.with-sidebar { margin-left: var(--sidebar); padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; max-width: calc(var(--sidebar) + 1120px); }
main.centered { max-width: 460px; margin: 0 auto; padding: 3rem 1rem; }
main.centered.install { max-width: 720px; }
.mobile-top { display: none; }
.bottomnav { display: none; }

@media (max-width: 900px) {
    .sidebar { display: none; }
    main.with-sidebar { margin-left: 0; padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
    .mobile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
    .mobile-top a { color: var(--muted); }
    .bottomnav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border);
        padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); z-index: 20; justify-content: space-around;
    }
    .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .7rem; color: var(--muted); text-decoration: none; padding: .3rem .5rem; border-radius: 10px; min-width: 56px; }
    .bottomnav a.active { color: var(--accent); background: var(--accent-soft); }
    h1 { font-size: 1.5rem; }
}

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .2rem; }
.page-head .muted { margin: 0; }
.eyebrow { text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin: 0 0 .25rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

/* ---------- Cards / grids ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; display: block; color: inherit;
}
a.card { text-decoration: none; transition: transform .15s, border-color .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.three { grid-template-columns: 1fr 2fr; gap: .75rem; }
.grid.three .span2 { grid-column: span 1; }
form.grid.two { align-items: start; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.narrow { max-width: 720px; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.center-row { justify-content: center; }
.empty { text-align: center; padding: 2.5rem 1.5rem; }
.empty p { max-width: 460px; margin-left: auto; margin-right: auto; }
.empty-icon { font-size: 2.6rem; line-height: 1; margin-bottom: .6rem; }
.notice { background: var(--warn-soft); border-color: transparent; }
.notice p { margin-bottom: .6rem; }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; font-size: .92rem; }
input, select, textarea {
    font: inherit; font-size: 1rem; letter-spacing: inherit; color: var(--text); background: var(--surface);
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; width: 100%; min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--accent); flex: none; }
input[type="range"] { padding: 0; accent-color: var(--accent); border: 0; }
input[type="file"] { padding: .45rem; }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 400; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 500; font-size: .92rem; margin-bottom: .4rem; padding: 0; }
.w-code { width: 90px; flex: none; }
.w-num { width: 100px; flex: none; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .95rem;
    padding: .6rem 1.1rem; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
    cursor: pointer; text-decoration: none; min-height: 44px; transition: background .15s, transform .1s, border-color .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.small { padding: .35rem .8rem; min-height: 36px; font-size: .875rem; }
.btn.big { padding: .85rem 1.5rem; font-size: 1.05rem; min-height: 52px; }
.iconbtn {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
    color: var(--muted); text-decoration: none; cursor: pointer; list-style: none; border: 0; background: none;
}
.iconbtn::-webkit-details-marker { display: none; }
.iconbtn:hover { background: var(--surface-2); color: var(--accent); }
.chip {
    font: inherit; font-size: .875rem; font-weight: 600; padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer; min-height: 38px;
}
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { width: 100%; }
.chip-radio { flex-direction: row; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { padding: .4rem 1rem; border-radius: 999px; border: 1.5px solid var(--border); cursor: pointer; font-weight: 600; font-size: .9rem; }
.chip-radio input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* Flash */
.flash { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 500; background: var(--accent-soft); animation: slidein .3s ease; }
.flash-success { background: var(--good-soft); color: var(--good); }
.flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-warning { background: var(--warn-soft); color: var(--warn); }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }

/* Progress bars */
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.bar.small { height: 6px; margin: 0; }
.bar > span { display: block; height: 100%; background: var(--plan, var(--accent)); border-radius: 999px; transition: width .6s ease; min-width: 0; }
.bar.ready > span { background: var(--ready); }
.track { font-weight: 700; }
.track-ok { color: var(--good); }
.track-warn { color: var(--warn); }
.track-behind { color: var(--bad); }

/* ---------- Auth ---------- */
.auth-card { margin-top: 2rem; padding: 2rem; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; margin-bottom: .5rem; }
.auth-brand h1 { margin: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.checks .nok { color: var(--warn); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.checkin { text-align: center; }
.energy-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.energy {
    display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: 1.8rem; background: var(--surface-2);
    border: 2px solid transparent; border-radius: 16px; padding: .7rem 1.2rem; cursor: pointer; min-width: 110px; color: var(--text);
}
.energy span { font-size: .85rem; font-weight: 600; }
.energy:hover { border-color: var(--accent); }
@media (max-width: 520px) { .energy-row { flex-wrap: nowrap; gap: .5rem; } .energy { min-width: 0; flex: 1 1 0; padding: .6rem .3rem; font-size: 1.5rem; } }
.nextstep { border: 2px solid var(--plan, var(--accent)); padding: 1.75rem; position: relative; overflow: hidden; }
.nextstep::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--plan, var(--accent)); }
.next-title { font-size: 1.5rem; margin: .3rem 0 .4rem; }
.next-actions { margin-top: 1rem; }
.starter { margin: 1rem 0 0; }
.celebrate { text-align: center; padding: 2rem; }
.countdown { display: flex; gap: 1rem; align-items: center; border-left: 5px solid var(--plan, var(--accent)); }
.countdown-num { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.countdown-num strong { font-size: 2.4rem; line-height: 1; color: var(--plan, var(--accent)); }
.countdown-num span { font-size: .75rem; color: var(--muted); text-align: center; }
.countdown-info { flex: 1; min-width: 0; }
.countdown-info h3 { margin: 0; font-size: 1rem; }
.countdown-info p { margin: 0; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.mini { display: flex; flex-direction: column; align-items: flex-start; margin: 0; padding: .9rem 1rem; text-decoration: none; }
.mini strong { font-size: 1.25rem; }
.mini-icon { font-size: 1.2rem; }
.parklist { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .3rem; }
.parklist label { flex-direction: row; align-items: flex-start; gap: .5rem; font-weight: 400; cursor: pointer; }
.parklist input { margin-top: .25rem; }
.park-form input { min-height: 40px; }

/* ---------- Tasks ---------- */
.tasklist, .topiclist, .simple-list, .cardlist { list-style: none; margin: 0; padding: 0; }
.task, .topic { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.task:last-child, .topic:last-child { border-bottom: 0; }
.task-check { position: relative; flex: none; cursor: pointer; display: block; }
.task-check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.checkmark {
    width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
    color: transparent; transition: all .15s;
}
.task-check:hover .checkmark { border-color: var(--plan, var(--accent)); }
.task-check input:checked + .checkmark { background: var(--good); border-color: var(--good); color: #fff; animation: pop .3s ease; }
.task-check input:focus-visible + .checkmark { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes pop { 50% { transform: scale(1.2); } }
.task-body, .topic-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task-title, .topic-title { font-weight: 500; overflow-wrap: anywhere; }
.task-meta { font-size: .8rem; color: var(--muted); }
.task.done .task-title, .topic.done .topic-title { text-decoration: line-through; color: var(--muted); }
.task-actions { display: flex; gap: .1rem; }
.type-icon { display: inline-block; width: 1.4em; }
.code { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Topics */
.domain { padding: 0; overflow: hidden; }
.domain > summary { list-style: none; cursor: pointer; padding: 1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.domain > summary::-webkit-details-marker { display: none; }
.domain-head h3 { margin: 0; }
.domain-ready { display: flex; align-items: center; gap: .6rem; min-width: 180px; }
.domain-ready .bar { flex: 1; margin: 0; }
.topiclist { padding: 0 1.25rem; }
.topic { flex-wrap: wrap; }
.confidence { display: flex; gap: 4px; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); background: transparent; cursor: pointer; padding: 0; }
.dot.on { background: var(--ready); border-color: var(--ready); }
.dot:hover { border-color: var(--ready); }
.topic-edit { position: relative; }
.topic-edit[open] { flex-basis: 100%; }
.topic-edit[open] > summary { position: absolute; right: 0; top: -40px; }
.edit-form { background: var(--surface-2); padding: 1rem; border-radius: 12px; margin-top: .5rem; }
.add-inline { padding: .75rem 1.25rem; background: var(--surface-2); flex-wrap: wrap; }
.add-inline input { min-height: 40px; }
.add-inline input[name="title"] { flex: 1 1 200px; }
.domain-edit { padding: .5rem 1.25rem 1rem; }
.domain-edit summary { cursor: pointer; margin-bottom: .5rem; }
.add-domain summary, details.card > summary { cursor: pointer; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
details.card[open] > summary { margin-bottom: 1rem; }
.quick-links { margin-bottom: 1.5rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; margin: 0; }
.stat strong { font-size: 1.6rem; line-height: 1.2; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* Plan cards & wizard */
.plan-card { border-top: 5px solid var(--plan, var(--accent)); }
.plan-card.archived { opacity: .65; }
.plan-card-top { display: flex; justify-content: space-between; gap: .5rem; }
.plan-card p { margin-bottom: .3rem; }
.step h2 { display: flex; align-items: center; gap: .6rem; }
.stepnum { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); align-items: center; justify-content: center; font-size: .9rem; flex: none; }
.step > label { margin-top: 1rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .75rem; }
.choice { flex-direction: row; align-items: flex-start; gap: .75rem; padding: 1rem; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: .2rem; }
.choice-body { display: flex; flex-direction: column; gap: .2rem; }
.days { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.days legend { width: 100%; }
.day-toggle { flex-direction: row; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span { display: flex; align-items: center; justify-content: center; width: 48px; height: 44px; border-radius: 12px; border: 2px solid var(--border); font-weight: 700; cursor: pointer; }
.day-toggle input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-toggle input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.colors { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.colors legend { width: 100%; }
.color-dot { flex-direction: row; }
.color-dot input { position: absolute; opacity: 0; pointer-events: none; }
.color-dot span { width: 34px; height: 34px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--border); }
.color-dot input:checked + span { box-shadow: 0 0 0 3px var(--text); }
.feasibility { margin-top: 1rem; padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.feasibility:empty { display: none; }
.feasibility.ok { background: var(--good-soft); }
.feasibility.tight { background: var(--warn-soft); }
.danger-zone { border-color: var(--bad-soft); }

/* Agenda */
.week-head { font-size: 1rem; margin: 1.75rem 0 .75rem; color: var(--muted); }
.day.today { border: 2px solid var(--accent); }
.day.past { opacity: .75; }
.exam-day { background: var(--accent-soft); border-color: transparent; }

/* ---------- Focus ---------- */
.focus-wrap { max-width: 760px; margin: 0 auto; }
.focus-task { font-size: 1.4rem; }
.timer { position: relative; width: min(320px, 78vw); aspect-ratio: 1; margin: 1.5rem auto; }
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.focus-wrap.on-break .ring-fg { stroke: var(--good); }
.timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-time { font-size: clamp(3rem, 12vw, 4.5rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.presets { margin: 1rem 0 2rem; }
.focus-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.focus-extras .card { margin: 0; }
.focus-extras label.small { margin-top: .75rem; }
.notes { white-space: normal; font-size: .95rem; }
body.zen .sidebar, body.zen .bottomnav, body.zen .mobile-top, body.zen .focus-extras, body.zen .presets, body.zen .flash { display: none !important; }
body.zen main.with-sidebar { margin-left: 0; max-width: none; }
body.zen .timer { width: min(440px, 80vw); }
.modal { border: 0; border-radius: 20px; padding: 2rem; background: var(--surface); color: var(--text); max-width: 460px; width: calc(100% - 2rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(20, 19, 28, .55); }
.big-check { justify-content: center; font-weight: 600; }

/* ---------- Flashcards ---------- */
.deck-nums { display: flex; gap: 1rem; font-size: .85rem; color: var(--muted); margin-top: .5rem; flex-wrap: wrap; }
.deck-nums strong { color: var(--text); font-size: 1.05rem; }
.deck-card h2 a { color: inherit; text-decoration: none; }
.deck-card .row { margin-top: .75rem; }
.review, .quiz { max-width: 720px; margin: 0 auto; }
.review-progress { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.review-progress .bar { flex: 1; }
.flashcard {
    background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); min-height: 280px;
    padding: 2rem; display: flex; flex-direction: column; justify-content: center; text-align: center; cursor: pointer; gap: 1rem;
}
.fc-front { font-size: 1.5rem; font-weight: 600; overflow-wrap: anywhere; }
.fc-back { font-size: 1.15rem; border-top: 2px dashed var(--border); padding-top: 1rem; white-space: pre-line; overflow-wrap: anywhere; animation: slidein .25s ease; }
.review-actions { margin-top: 1.25rem; display: flex; justify-content: center; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; width: 100%; }
.grade { font: inherit; font-weight: 700; padding: .85rem .4rem; border-radius: 14px; border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--text); }
.grade kbd { margin: .2rem 0 0; }
.g1 { background: var(--bad-soft); } .g1:hover { border-color: var(--bad); }
.g2 { background: var(--warn-soft); } .g2:hover { border-color: var(--warn); }
.g3 { background: var(--good-soft); } .g3:hover { border-color: var(--good); }
.g4 { background: var(--accent-soft); } .g4:hover { border-color: var(--accent); }
.review-done { margin-top: 1rem; }
.cardlist li { border-bottom: 1px solid var(--border); }
.cardlist li:last-child { border-bottom: 0; }
.cardlist summary { display: flex; gap: 1rem; align-items: center; padding: .7rem 0; cursor: pointer; list-style: none; }
.cardlist summary::-webkit-details-marker { display: none; }
.cl-front { flex: 1; font-weight: 500; overflow-wrap: anywhere; }
.cl-back { flex: 1; font-size: .875rem; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cl-back { display: none; } }

/* ---------- Quiz ---------- */
.question { font-size: 1.25rem; margin-bottom: 1.25rem; }
.options { display: grid; gap: .6rem; }
.option {
    font: inherit; text-align: left; padding: .9rem 1rem; border: 2px solid var(--border); border-radius: 14px; background: var(--surface);
    color: var(--text); cursor: pointer; display: flex; gap: .75rem; align-items: flex-start; min-height: 52px;
}
.option:hover:not(:disabled) { border-color: var(--accent); }
.option .letter { font-weight: 700; color: var(--muted); flex: none; width: 1.4em; }
.option.correct { border-color: var(--good); background: var(--good-soft); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option.chosen { border-color: var(--accent); background: var(--accent-soft); }
.option:disabled { cursor: default; }
.explain { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: var(--surface-2); }
.question-card .row.end { margin-top: 1rem; }
.review-list { text-align: left; margin: 1rem 0; display: grid; gap: .5rem; }
.review-item { padding: .75rem 1rem; border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.review-item.bad { border-left: 4px solid var(--bad); }
.review-item.good { border-left: 4px solid var(--good); }
.option-edit input[type="radio"] { margin: 0 .25rem; }

/* ---------- Stats ---------- */
.level-card { display: flex; gap: 1.25rem; align-items: center; }
.level-badge { width: 84px; height: 84px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.level-badge span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.level-badge strong { font-size: 2rem; line-height: 1; }
.barchart { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 1.5rem; margin: .5rem 0; border-bottom: 1px solid var(--border); }
.bc-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.bc-bar { width: min(100%, 28px); background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; transition: height .6s ease; }
.bc-col:hover .bc-bar { filter: brightness(1.15); }
.bc-col.today .bc-bar { background: var(--ready); }
.bc-val { font-size: .7rem; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.bc-label { position: absolute; bottom: -2.4rem; font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.2; }
.barchart + details { margin-top: 3rem; }
.heatmap { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; overflow-x: auto; padding: .5rem 0; }
.hm { width: 14px; height: 14px; border-radius: 4px; display: inline-block; background: var(--surface-2); }
.hm.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.hm.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.hm.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--surface-2)); }
.hm.l4 { background: var(--accent); }
.hm.today { outline: 2px solid var(--text); outline-offset: 1px; }
.hm-legend { display: flex; align-items: center; gap: 4px; }
.readiness { display: grid; gap: .6rem; }
.rd-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 2fr 48px; gap: .75rem; align-items: center; }
.rd-row .bar { margin: 0; }
.rd-name { font-size: .9rem; }
.rd-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .rd-row { grid-template-columns: 1fr 48px; } .rd-row .bar { grid-column: 1 / -1; grid-row: 2; } }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.table-wrap { overflow-x: auto; }
.table td.row { display: flex; }

/* Toast & confetti */
.toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--text); color: var(--bg); padding: .75rem 1.25rem;
    border-radius: 14px; font-weight: 600; z-index: 100; transition: transform .3s ease, opacity .3s ease, visibility .3s; max-width: calc(100% - 2rem); text-align: center; pointer-events: none;
    opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
@media (max-width: 900px) { .toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }
.confetti-piece { position: fixed; width: 9px; height: 14px; top: -20px; z-index: 200; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); opacity: .9; } }
.debug { white-space: pre-wrap; font-size: .75rem; overflow: auto; max-height: 50vh; background: var(--surface-2); padding: 1rem; border-radius: 8px; }

/* ---------- Nieuw plan / import ---------- */
.start-choice { margin-bottom: 1.5rem; }
.choice-card { display: flex; flex-direction: column; gap: .35rem; margin: 0; border-width: 2px; }
.choice-card.active { border-color: var(--accent); }
.choice-card .empty-icon { font-size: 2rem; margin: 0; }
.dropzone {
    align-items: center; text-align: center; gap: .4rem; padding: 2rem 1rem; border: 2px dashed var(--border);
    border-radius: var(--radius); background: var(--surface-2); cursor: pointer;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); }
.dropzone .empty-icon { margin: 0; }
.dropzone input[type="file"] { max-width: 360px; background: var(--surface); }
.import-preview { margin-top: 1rem; }
.import-preview summary { cursor: pointer; font-weight: 600; }
.import-preview ul { margin: .25rem 0 .75rem; padding-left: 1.25rem; }
.grid.three-eq { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .75rem; }
.plan-desc summary { cursor: pointer; }
.plan-desc p { margin: .75rem 0 0; }
.doc { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.6; overflow-x: auto; }

/* ---------- Samenvattingen ---------- */
.filter-row { margin: 0 0 1rem; }
.filter-row select { flex: 0 1 280px; }
.summary { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.summary:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-body { overflow-wrap: anywhere; }
.summary-meta { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-top: .4rem; }
.summary-meta details { flex: 1 1 100%; }
.summary-meta details > summary { cursor: pointer; display: inline; }
.summary-meta details[open] { margin-top: .25rem; }
.summary-prompt { text-align: left; }
.print-only { display: none; }

@media print {
    body { background: #fff; color: #000; }
    .sidebar, .bottomnav, .mobile-top, .flash, .toast, .no-print, .page-head .row { display: none !important; }
    main.with-sidebar { margin: 0; padding: 0; max-width: none; }
    .card { box-shadow: none; border: 0; padding: 0; margin-bottom: 1.25rem; break-inside: avoid; }
    .print-only { display: block; }
    a { color: inherit; text-decoration: none; }
}

/* ---------- Oefenexamens ---------- */
.exams-section { margin-bottom: 1.5rem; }
.exams-section > h2 { margin-bottom: .75rem; }
.small-empty { padding: 1.5rem; }
.exam-card { display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.exam-card h3 { margin: 0; }
.exam-card p { margin: 0; }
.exam-card .bar { margin: .2rem 0; }
.exam-manage { margin-top: .25rem; }
.exam-manage > summary { cursor: pointer; }
.quiz.exam-mode { max-width: 860px; }
.quiz-title { margin: 0; }
.quiz-top { margin-bottom: .75rem; align-items: flex-end; }
.timer-pill { font-variant-numeric: tabular-nums; font-weight: 700; padding: .35rem .8rem; border-radius: 999px; background: var(--surface-2); }
.timer-pill.low { background: var(--warn-soft); color: var(--warn); }
.q-head { margin-bottom: .5rem; align-items: center; }
.q-nav { margin-top: 1.25rem; }
.flag-btn.active { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.choose-hint { font-weight: 700; color: var(--accent); margin: -.5rem 0 1rem; }
.option.multi .letter::before { content: "☐ "; font-weight: 400; }
.option.multi.chosen .letter::before { content: "☑ "; }
.question { white-space: pre-line; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-bottom: .75rem; }
.qcell {
    font: inherit; font-size: .85rem; font-weight: 600; height: 40px; border-radius: 10px; cursor: pointer;
    border: 2px solid var(--border); background: var(--surface); color: var(--muted); position: relative;
}
.qcell.answered { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--text); }
.qcell.flagged::after { content: "🚩"; position: absolute; top: -8px; right: -6px; font-size: .7rem; }
.qcell.current { border-color: var(--accent); color: var(--accent); }

.result-hero { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; border-width: 2px; }
.result-hero.passed { border-color: var(--good); }
.result-hero.failed { border-color: var(--warn); }
.result-score { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.result-score strong { font-size: 3rem; line-height: 1; }
.result-score span { font-size: .85rem; color: var(--muted); }
.result-info { flex: 1 1 280px; }
.result-info h2 { margin-bottom: .25rem; }
.pass-mark { position: relative; height: 18px; font-size: .7rem; color: var(--muted); }
.pass-mark::before { content: ""; position: absolute; left: var(--pass); top: -14px; height: 16px; border-left: 2px dashed var(--text); }
.pass-mark span { position: absolute; left: var(--pass); transform: translateX(-50%); white-space: nowrap; }
.bar.weak > span { background: var(--warn); }
.next-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.next-steps li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.attempts { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: .5rem; }
.attempt { flex: 0 1 44px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; text-decoration: none; color: var(--muted); gap: 2px; }
.attempt-bar { width: 100%; max-width: 28px; background: var(--warn); border-radius: 4px 4px 0 0; }
.attempt-bar.ok { background: var(--good); }
.attempt.current span.small { color: var(--text); font-weight: 700; }
.answer-review { padding-left: 1.25rem; display: grid; gap: 1rem; margin: 0; }
.answer-review > li { padding: .75rem 1rem; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--bad); }
.answer-review > li.good { border-left-color: var(--good); }
.answer-review p { margin: 0 0 .4rem; }
.ar-question { font-weight: 600; white-space: pre-line; }
.ar-options { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .25rem; }
.ar-options li { display: flex; gap: .5rem; padding: .3rem .5rem; border-radius: 8px; }
.ar-options li.right { background: var(--good-soft); }
.ar-options li.mine-wrong { background: var(--bad-soft); }
.ar-mark { width: 1em; font-weight: 700; flex: none; }
.answer-review .explain { margin-top: .4rem; }
.add-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.option .letter { width: auto; min-width: 1.4em; white-space: nowrap; }

/* ---------- Datumkiezer (Nederlands) ---------- */
.datepick { position: relative; display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-weight: 400; }
.datepick-btn {
    font: inherit; font-size: 1rem; text-align: left; color: var(--text); background: var(--surface);
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; min-height: 44px;
    width: 100%; cursor: pointer; display: flex; gap: .5rem; align-items: center;
}
.datepick-btn:hover, .datepick-btn[aria-expanded="true"] { border-color: var(--accent); }
.datepick-btn.empty .dp-text { color: var(--muted); }
.datepick-btn.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.datepick-btn .dp-text::first-letter { text-transform: uppercase; }
.datepick-hint { font-size: .8rem; color: var(--muted); min-height: 1em; }
.datepick-hint:empty { display: none; }
.datepick-pop {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    padding: .75rem; width: min(320px, calc(100vw - 2rem));
}
.dp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.dp-head strong { text-transform: capitalize; }
.dp-nav, .dp-link { font: inherit; background: none; border: 0; cursor: pointer; color: var(--accent); border-radius: 8px; }
.dp-nav { font-size: 1.4rem; width: 40px; height: 40px; }
.dp-nav:hover, .dp-link:hover { background: var(--accent-soft); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-dow { font-size: .72rem; font-weight: 700; color: var(--muted); padding: .25rem 0; }
.dp-day { font: inherit; font-size: .9rem; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
.dp-day:hover:not(:disabled) { background: var(--accent-soft); }
.dp-day:disabled { color: var(--border); cursor: default; }
/* Vandaag altijd herkenbaar: dik cijfer met een ring, ook als je vandaag niet kunt kiezen. */
.dp-day.today { font-weight: 800; font-size: 1.02rem; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.dp-day.today:disabled { color: var(--muted); box-shadow: inset 0 0 0 2px var(--muted); }
.dp-day.sel { background: var(--accent); color: var(--accent-ink); }
.dp-day.today.sel { box-shadow: inset 0 0 0 2px var(--accent-ink); }
.dp-foot { display: flex; justify-content: space-between; margin-top: .5rem; }
.dp-link { padding: .35rem .6rem; font-weight: 600; font-size: .9rem; }
.row .datepick { flex: 0 1 260px; }

/* Voorkom dat velden de pagina breder maken dan het scherm (o.a. iOS) */
input, select, textarea, .datepick-btn { min-width: 0; max-width: 100%; }
.grid > *, .stack > * { min-width: 0; }

/* ---------- E-mailinstellingen ---------- */
.mail-option { padding: .75rem 1rem; border-radius: 12px; background: var(--surface-2); }
.mail-option p { margin: .2rem 0 .5rem 1.75rem; }
.mail-option label.inline { flex-direction: row; align-items: center; gap: .5rem; margin-left: 1.75rem; font-weight: 400; flex-wrap: wrap; }
.mail-option .row label.inline { margin-left: 0; }
.mail-option .row { margin-left: 1.75rem; }
.mail-option select { width: auto; min-height: 38px; padding: .3rem .6rem; }
.mail-preview-row { margin-top: 1rem; }
.mail-preview-row select { width: auto; min-height: 36px; padding: .25rem .5rem; }

/* ---------- Updates en back-ups ---------- */
.nav-badge { margin-left: auto; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; line-height: 1.4rem; }
.update-banner { display: flex; flex-direction: column; gap: .2rem; border: 2px solid var(--accent); background: var(--accent-soft); }
.update-banner h2 { margin: 0; }
.update-status { padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); margin-bottom: 1rem; }
.update-status.ok { background: var(--good-soft); }
.update-status.avail { background: var(--accent-soft); }
.update-status.err { background: var(--bad-soft); }
.update-status ul { margin: .4rem 0; padding-left: 1.25rem; }
.update-actions { margin-bottom: 1rem; }
.update-settings { margin: 1rem 0; }
.update-settings > summary { cursor: pointer; margin-bottom: .75rem; }
.rollback { padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.backups-table td { vertical-align: top; }
details.restore { position: relative; }
details.restore > summary { list-style: none; }
details.restore > summary::-webkit-details-marker { display: none; }
details.restore[open] .edit-form { position: absolute; right: 0; z-index: 10; width: min(320px, 85vw); box-shadow: var(--shadow); border: 1px solid var(--border); }
.backup-extra { margin-top: 1.5rem; }

/* ---------- Externe resultaten ---------- */
.preset-row { margin: .25rem 0 1rem; }
.ext-entry { border: 2px solid var(--accent-soft); }
.ext-card { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.ext-card h3 { margin: 0; }
.ext-card p { margin: 0; }
.ext-card .bar { margin: .1rem 0; }
.ext-metric { display: flex; justify-content: space-between; align-items: baseline; margin-top: .4rem; }
.ext-metric span { font-size: .85rem; color: var(--muted); }
.ext-metric strong { font-size: 1.3rem; }
.ext-metric .up { color: var(--good); }
.ext-metric .down { color: var(--bad); }
.mini-chart { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 2px 0; border-bottom: 1px solid var(--border); margin-top: .3rem; }
.mini-bar { flex: 1 1 0; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--warn); }
.mini-bar.ok { background: var(--good); }
.mini-pass { position: absolute; left: 0; right: 0; bottom: var(--pass); border-top: 2px dashed var(--muted); opacity: .6; pointer-events: none; }
.mini-legend { font-size: .72rem; }
.ext-card .row { margin-top: .5rem; }
.ext-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ext-summary li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.ext-name { font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.ext-val { display: flex; align-items: center; gap: .5rem; flex: none; }
.ext-val .bar { width: 70px; }
.ext-dash-empty { display: block; color: var(--muted); }
.ext-dash-empty strong { color: var(--accent); }
.ext-table td { vertical-align: top; }
.ext-table .up { color: var(--good); }
.ext-table .down { color: var(--bad); }
.grid.score-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.grid.score-row input { font-variant-numeric: tabular-nums; }
.grid.score-row input[name="score"] { font-size: 1.15rem; font-weight: 600; }
.score-hint { margin: .3rem 0 0; }
.more-fields > summary { cursor: pointer; padding: .3rem 0; }
.more-fields[open] > summary { margin-bottom: .6rem; }
@media (max-width: 520px) { .grid.score-row { grid-template-columns: 1fr 1fr; } .grid.score-row label:first-child { grid-column: 1 / -1; } }
.ext-verdict { font-weight: 600; font-size: .95rem; margin: 0; }
.ext-entry .ext-verdict { padding: .55rem .8rem; border-radius: 10px; }
.ext-verdict.good { color: var(--good); }
.ext-verdict.bad { color: var(--bad); }
.ext-entry .ext-verdict.good { background: var(--good-soft); }
.ext-entry .ext-verdict.bad { background: var(--bad-soft); }

.grid.date-time { grid-template-columns: minmax(0, 1fr) 96px; gap: .6rem; align-items: start; }
.grid.date-time input[name="time"] { text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Meer-menu, onderdelen, bewerkmodus ---------- */
.menu-list { display: grid; gap: .6rem; }
.menu-item { display: flex; align-items: center; gap: .9rem; margin: 0; padding: 1rem 1.1rem; color: var(--text); }
.menu-item > span:last-child { display: flex; flex-direction: column; gap: .1rem; }
.menu-icon { font-size: 1.5rem; width: 2rem; text-align: center; flex: none; }
.menu-foot { margin: 1rem 0; }
.menu-logout { margin-top: .5rem; }
.feature-list { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature-toggle { display: flex; flex-direction: row; align-items: flex-start; gap: .7rem; padding: .8rem .9rem; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; font-weight: 400; }
.feature-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.feature-toggle input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.feature-toggle > span:last-child { display: flex; flex-direction: column; gap: .15rem; }
.feature-emoji { font-size: 1.3rem; flex: none; }
.edit-bar { border: 2px dashed var(--accent); }
.edit-bar p { margin: 0 0 .6rem; }
.stat form { margin-top: .4rem; }

/* ---------- Lesplannen als eigen omgeving ---------- */
.plan-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--plan, var(--accent)); flex: none; display: inline-block; }
.plan-switch { font-size: .85rem; color: var(--muted); text-decoration: none; padding: 0 .8rem; margin-bottom: -.5rem; }
.plan-switch:hover { color: var(--accent); }
.plan-badge {
    display: flex; align-items: center; gap: .7rem; padding: .75rem .8rem; border-radius: 14px; text-decoration: none; color: var(--text);
    background: var(--surface-2); border-left: 4px solid var(--plan, var(--accent));
}
.plan-badge > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.plan-badge strong { overflow-wrap: anywhere; line-height: 1.25; }
.plan-badge .plan-dot { display: none; }
.mainnav a.nav-plan { padding-left: 1.4rem; font-size: .92rem; }
.mainnav a.nav-plan .plan-dot { margin: 0 .15rem; }
.mainnav a.nav-new { color: var(--accent); }
.mobile-plan { display: flex; align-items: center; gap: .5rem; text-decoration: none; min-width: 0; color: var(--text) !important; }
.mobile-plan strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; }
.mobile-back { font-size: 1.6rem; line-height: 1; color: var(--muted); margin-right: .1rem; }
.section-title { font-size: 1.1rem; margin: 2rem 0 .75rem; }

.island-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.island {
    display: flex; flex-direction: column; gap: .75rem; margin: 0; text-decoration: none; color: var(--text);
    border-top: 6px solid var(--plan, var(--accent)); padding: 1.25rem 1.25rem 1.1rem;
}
.island:hover { border-color: var(--plan, var(--accent)); transform: translateY(-2px); }
.island h2 { margin: 0; }
.island p { margin: 0; }
.island-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.island-count { display: flex; flex-direction: column; align-items: center; flex: none; line-height: 1; }
.island-count strong { font-size: 1.8rem; color: var(--plan, var(--accent)); }
.island-count span { font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.island-today { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .85rem; border-radius: 12px; background: var(--surface-2); }
.island-today strong { font-weight: 600; overflow-wrap: anywhere; }
.island-foot { display: flex; justify-content: space-between; gap: .5rem; }
.island-open { align-self: flex-start; pointer-events: none; }
