/* TheorieSneltest.nl — stylesheet */
:root {
  --navy: #14304f;
  --navy-2: #1f4a7a;
  --accent: #f2a900;
  --accent-2: #ffd24d;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #18212b;
  --muted: #526173;
  --line: #dde4ee;
  --ok: #0f7a3a;
  --ok-bg: #e6f4ec;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 48, 79, .06), 0 6px 20px rgba(20, 48, 79, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
img, svg { max-width: 100%; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #111; padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; font-weight: 700; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.logo .wm span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: rgba(255, 255, 255, .88); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .93rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .13); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 8px; }
.nav-toggle svg { display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .14); }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: #1a1300; }
.btn-primary:hover { background: var(--accent-2); color: #1a1300; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-sm { padding: 8px 16px; font-size: .92rem; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 56px 0 64px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 1.15rem; max-width: 640px; color: rgba(255, 255, 255, .9); margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 34px; }
.fact { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: 14px 16px; }
.fact b { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--accent); }
.fact span { font-size: .9rem; color: rgba(255, 255, 255, .88); }

/* Sections */
.section { padding: 54px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 8px; font-size: 1.8rem; line-height: 1.2; color: var(--navy); letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--muted); }

/* Exam grid */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.exam-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--navy); }
.exam-card .num { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.exam-card h3 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.exam-card p { margin: 0; font-size: .92rem; color: var(--muted); flex: 1; }
.exam-card .status { font-size: .85rem; font-weight: 700; min-height: 1.4em; }
.status.pass { color: var(--ok); }
.status.fail { color: var(--bad); }
.status.busy { color: var(--navy-2); }

/* Cards, steps, topics */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 10px; }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 22px; padding: 0; margin: 0; list-style: none; }
.topics li { padding: 10px 14px; background: var(--bg); border-radius: 10px; border: 1px solid var(--line); font-weight: 600; color: var(--navy); }
.topics li small { display: block; font-weight: 400; color: var(--muted); }
.note { background: #fff8e1; border: 1px solid #f0d77a; border-left: 5px solid var(--accent); border-radius: 10px; padding: 14px 18px; color: #4a3b00; }
.note strong { color: #2f2400; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--navy-2); }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 20px 18px; color: var(--muted); }

/* Prose pages */
.page-head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 38px 0 34px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -.02em; }
.page-head p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 680px; }
.crumbs { font-size: .88rem; margin-bottom: 10px; color: rgba(255, 255, 255, .75); }
.crumbs a { color: rgba(255, 255, 255, .9); }
.prose { max-width: 780px; padding: 38px 20px 56px; margin: 0 auto; width: 100%; }
.prose h2 { color: var(--navy); font-size: 1.5rem; margin: 34px 0 10px; line-height: 1.25; }
.prose h3 { color: var(--navy); margin: 24px 0 6px; }
.prose p, .prose li { color: #28323d; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .updated { color: var(--muted); font-size: .92rem; }
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .96rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); color: var(--navy); }
tr:last-child td { border-bottom: 0; }
.cta-box { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; margin: 30px 0; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-box h3 { margin: 0 0 4px; color: #fff; }
.cta-box p { margin: 0; color: rgba(255, 255, 255, .85); }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; font-size: .95rem; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; font: inherit; background: var(--bg); color: var(--text); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-2); background: #fff; }
.msg { margin-top: 14px; padding: 12px 16px; border-radius: 10px; display: none; }
.msg.ok { display: block; background: var(--ok-bg); color: var(--ok); }
.msg.err { display: block; background: var(--bad-bg); color: var(--bad); }

/* Exam */
.exam-top { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.exam-top .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; max-width: 1100px; margin: 0 auto; }
.exam-top .title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.exam-top .title a { color: #fff; text-decoration: none; font-weight: 800; white-space: nowrap; }
.exam-top .title a span { color: var(--accent); }
.chip { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.exam-top .right { display: flex; align-items: center; gap: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem; padding: 6px 14px; border-radius: 10px; background: rgba(255, 255, 255, .14); min-width: 86px; text-align: center; }
.timer.warn { background: #b86e00; }
.timer.danger { background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.progress { height: 5px; background: rgba(255, 255, 255, .2); }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.exam-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; width: 100%; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; align-items: start; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.q-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.q-meta .cat { background: var(--bg); padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); }
.q-text { font-size: 1.2rem; font-weight: 700; line-height: 1.4; margin: 0 0 18px; color: var(--text); }
.q-img { display: flex; justify-content: center; margin: 0 0 20px; padding: 14px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.q-img svg { width: auto; max-width: 100%; height: 190px; }
.q-img svg[viewBox="0 0 220 220"] { height: 260px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--text); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover:not([disabled]) { border-color: var(--navy-2); background: #f3f7fc; }
.opt .letter { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--navy); }
.opt[aria-pressed="true"] { border-color: var(--navy-2); background: #eaf1fa; }
.opt[aria-pressed="true"] .letter { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.explain { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border-left: 5px solid var(--navy-2); }
.explain.good { border-left-color: var(--ok); background: var(--ok-bg); }
.explain.bad { border-left-color: var(--bad); background: var(--bad-bg); }
.explain b { display: block; margin-bottom: 2px; }
.q-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.q-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; position: sticky; top: 92px; }
.q-nav h2 { margin: 0 0 10px; font-size: .95rem; color: var(--navy); }
.nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.nav-grid button { padding: 7px 0; border-radius: 8px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--muted); }
.nav-grid button.done { background: #dbe8f7; border-color: #b5cde9; color: var(--navy); }
.nav-grid button.ok { background: var(--ok-bg); border-color: #a9d8bd; color: var(--ok); }
.nav-grid button.no { background: var(--bad-bg); border-color: #efb9b3; color: var(--bad); }
.nav-grid button.cur { border-color: var(--navy); box-shadow: 0 0 0 2px var(--accent); }
.legend { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.start-card { max-width: 640px; width: calc(100% - 40px); margin: 28px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.start-card h1 { margin: 0 0 6px; color: var(--navy); font-size: 1.8rem; }
.rules { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.rules li { padding-left: 28px; position: relative; }
.rules li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.modes { display: grid; gap: 10px; margin: 18px 0; }
.mode { display: flex; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.mode:has(input:checked) { border-color: var(--navy-2); background: #eaf1fa; }
.mode input { margin-top: 5px; accent-color: var(--navy-2); }
.mode b { display: block; }
.mode span { color: var(--muted); font-size: .92rem; }
dialog { border: 0; border-radius: var(--radius); padding: 26px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(10, 20, 35, .55); }
dialog h2 { margin: 0 0 8px; color: var(--navy); font-size: 1.3rem; }
dialog p { margin: 0 0 20px; color: var(--muted); }
dialog .acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Results */
.score-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 24px; text-align: center; }
.ring { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 2.3rem; font-weight: 800; border: 10px solid; line-height: 1; }
.ring small { display: block; font-size: .8rem; font-weight: 600; margin-top: 4px; }
.ring.pass { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.ring.fail { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.verdict { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; }
.verdict.pass { color: var(--ok); }
.verdict.fail { color: var(--bad); }
.score-meta { color: var(--muted); margin: 0 0 20px; }
.stats { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin: 14px 0 22px; }
.stats div b { display: block; font-size: 1.8rem; color: var(--navy); line-height: 1.1; }
.stats div span { color: var(--muted); font-size: .85rem; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bars { display: grid; gap: 12px; margin: 14px 0 0; }
.bar-row .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; font-weight: 600; margin-bottom: 4px; color: var(--navy); }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.bar i.low { background: var(--bad); }
.bar i.mid { background: #d58a00; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.filters button { padding: 7px 16px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.review details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.review summary { cursor: pointer; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; list-style: none; font-weight: 600; }
.review summary::-webkit-details-marker { display: none; }
.badge { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.badge.ok { background: var(--ok); }
.badge.no { background: var(--bad); }
.review .body { padding: 0 16px 16px; }
.review .q-img svg { height: 150px; }
.review .line { margin: 6px 0; }
.review .ok-t { color: var(--ok); font-weight: 700; }
.review .no-t { color: var(--bad); font-weight: 700; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .8); padding: 40px 0 22px; margin-top: auto; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; margin-bottom: 26px; }
.site-footer h2 { color: #fff; font-size: .95rem; margin: 0 0 10px; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { margin: 0 0 8px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 18px; color: rgba(255, 255, 255, .62); font-size: .84rem; }
.footer-legal a { display: inline; color: rgba(255, 255, 255, .85); text-decoration: underline; }
.checked { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }

/* 404 */
.notfound { text-align: center; padding: 80px 20px; }
.notfound .big { font-size: 6rem; font-weight: 900; line-height: 1; color: var(--navy); opacity: .18; }

@media (max-width: 860px) {
  .exam-layout { grid-template-columns: 1fr; }
  .q-nav { position: static; order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px; box-shadow: 0 10px 20px rgba(0, 0, 0, .2); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .hero { padding: 38px 0 44px; }
  .section { padding: 40px 0; }
  .q-card { padding: 18px; }
  .q-text { font-size: 1.08rem; }
  .exam-top .row { padding: 8px 14px; }
  .chip { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle, .exam-top, .btn-row, .filters { display: none !important; }
  body { background: #fff; }
}

.thumb { flex: none; display: inline-flex; }
.thumb svg { height: 38px; width: auto; }
.review summary .txt { flex: 1; }
