/* Cyberveilig-check – huisstijl afgeleid van de oranje "Cyber Resilience"-achtergrond */

:root {
  --accent: #f5a623;
  --accent-strong: #b35c00;
  --accent-soft: #fff1d6;
  --bg: #fbf8f3;
  --surface: #ffffff;
  --text: #1f1a14;
  --muted: #6b6257;
  --border: #e8dfd2;
  --goed: #1e8e4e;
  --goed-soft: #e3f5ea;
  --redelijk: #6aa121;
  --matig: #d97a00;
  --matig-soft: #fff1dc;
  --slecht: #c62f2f;
  --slecht-soft: #fde7e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(60,40,10,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #f7b043;
    --accent-strong: #ffc46b;
    --accent-soft: #3a2a10;
    --bg: #15120e;
    --surface: #211c16;
    --text: #f3ede4;
    --muted: #b3a898;
    --border: #3a3128;
    --goed: #4cc47e;
    --goed-soft: #173523;
    --redelijk: #9ccc4c;
    --matig: #f2a33a;
    --matig-soft: #3a2a12;
    --slecht: #f06b6b;
    --slecht-soft: #3d1a1a;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg, iframe { max-width: 100%; }
a { color: var(--accent-strong); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1:focus { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.mt { margin-top: 24px; }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.brand-icon { font-size: 1.4rem; }
.brand-text strong { color: var(--accent-strong); }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.topnav a:hover { background: var(--accent-soft); }
.progress { height: 4px; background: var(--border); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }

main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; border: 2px solid transparent;
  transition: transform .1s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1f1a14; }
.btn-primary:hover { background: #e8951a; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-danger { background: transparent; color: var(--slecht); border-color: var(--slecht); }
.btn-danger:hover { background: var(--slecht-soft); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .88rem; }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.section-title { margin: 32px 0 14px; font-size: 1.4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent-strong); margin: 0 0 4px; }

/* ---- Hero ---- */
.hero {
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255,240,215,.94) 0%, rgba(255,236,200,.75) 55%, rgba(255,230,190,.2) 100%), url("../img/hero.jpg") center / cover no-repeat;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px);
  margin-bottom: 28px;
  color: #1f1a14;
}
.hero .eyebrow { color: #8a4600; }
.hero-inner { max-width: 620px; }
.hero .lead { font-size: 1.15rem; margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { color: #1f1a14; border-color: rgba(31,26,20,.35); background: rgba(255,255,255,.5); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step-icon { font-size: 1.8rem; }
.step h3 { margin: 6px 0 4px; }
.step p { font-size: .95rem; color: var(--muted); }
.step-nr { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #1f1a14; font-size: .8rem; margin-right: 4px; }
.privacy-card { background: var(--accent-soft); border-color: transparent; }

/* ---- Topic grid ---- */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.topic-tile { position: relative; display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.topic-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile-icon { font-size: 2rem; line-height: 1; }
.tile-body { display: flex; flex-direction: column; }
.topic-tile:has(.badge) .tile-body { padding-right: 54px; }
.tile-code { font-size: .75rem; font-weight: 700; color: var(--accent-strong); }
.tile-title { font-weight: 700; }
.tile-kern { font-size: .88rem; color: var(--muted); }
.badge { position: absolute; top: 12px; right: 12px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-strong); }
.badge-done { background: var(--goed-soft); color: var(--goed); }

/* ---- Topic page ---- */
.page-head { margin-bottom: 20px; }
.crumbs { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: .95rem; }
.crumbs a { text-decoration: none; font-weight: 600; }
.topic-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.topic-icon { font-size: 3.2rem; line-height: 1; flex: none; width: 76px; height: 76px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 20px; }
.topic-head h1 { margin-bottom: 4px; }
.kern { font-size: 1.1rem; font-style: italic; color: var(--muted); margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.two-col .card { margin-bottom: 20px; }

.bronnen { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bron { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.bron-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bron-icon { font-size: 1.5rem; }
.bron-text { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; }
.bron-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.bron-titel { font-weight: 600; }
.bron-actions { display: flex; gap: 8px; }
.video { margin-top: 12px; position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Quiz ---- */
.quiz { border: 2px solid var(--accent); }
.vraag { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.vraag legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.vraag-nr { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong); margin-bottom: 2px; }
.opties { display: grid; gap: 10px; }
.optie {
  font: inherit; text-align: left; cursor: pointer; color: var(--text);
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
  padding: 12px 14px 12px 44px; position: relative; transition: border-color .15s, background .15s;
}
.optie::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 50%; }
.optie:hover { border-color: var(--accent); }
.optie.gekozen { border-color: var(--accent); background: var(--accent-soft); }
.optie.gekozen::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.feedback { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 10px; border-left: 5px solid; }
.feedback.toon { display: block; animation: in .25s ease; }
.feedback.goed { background: var(--goed-soft); border-color: var(--goed); }
.feedback.matig { background: var(--matig-soft); border-color: var(--matig); }
.feedback.slecht { background: var(--slecht-soft); border-color: var(--slecht); }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---- Result ---- */
.notice { background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; }
.score-card { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; border-width: 2px; }
.score-card.niveau-goed { border-color: var(--goed); }
.score-card.niveau-redelijk { border-color: var(--redelijk); }
.score-card.niveau-matig { border-color: var(--matig); }
.score-card.niveau-slecht { border-color: var(--slecht); }
.score-text { flex: 1 1 280px; }
.niveau-naam { font-size: 1.8rem; }
.ring { position: relative; width: 160px; height: 160px; flex: none; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--border); }
.ring-fg { stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-fg.goed { stroke: var(--goed); }
.ring-fg.redelijk { stroke: var(--redelijk); }
.ring-fg.matig { stroke: var(--matig); }
.ring-fg.slecht { stroke: var(--slecht); }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 800; }
.ring-pct small { font-size: 1.1rem; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 280px) 1fr 48px; gap: 12px; align-items: center; }
.bar-label { text-decoration: none; color: var(--text); font-size: .95rem; }
.bar-label:hover { color: var(--accent-strong); }
.bar-track { height: 12px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .8s ease; }
.bar-fill.goed { background: var(--goed); }
.bar-fill.redelijk { background: var(--redelijk); }
.bar-fill.matig { background: var(--matig); }
.bar-fill.slecht { background: var(--slecht); }
.bar-pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--goed-soft); color: var(--text); padding: 6px 12px; border-radius: 99px; font-size: .92rem; }

.advies { border-left: 6px solid var(--border); }
.advies.slecht { border-left-color: var(--slecht); }
.advies.matig { border-left-color: var(--matig); }
.advies.redelijk { border-left-color: var(--redelijk); }
.advies.goed { border-left-color: var(--goed); }
.advies-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.advies-head > div { flex: 1; }
.advies-head h3 { margin: 0; }
.small-icon { width: 52px; height: 52px; font-size: 2rem; border-radius: 14px; }
.kern-small { font-style: italic; color: var(--muted); }
.advies h4 { margin: 12px 0 6px; }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 6px; }
.checklist li::before { content: "☐"; position: absolute; left: 4px; color: var(--accent-strong); font-weight: 700; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
.antwoorden { padding-left: 18px; }
.antwoorden li { margin: 10px 0; }
.tip { display: inline-block; margin-top: 4px; }

.hulp { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.hulp li { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }

.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 24px 16px; max-width: 1040px; margin: 0 auto; font-size: .88rem; color: var(--muted); }

/* ---- Small screens ---- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-text { font-size: 1rem; }
  .topnav a { padding: 6px; font-size: .85rem; }
  .topic-head { align-items: flex-start; }
  .topic-icon { width: 60px; height: 60px; font-size: 2.4rem; }
  .bar-row { grid-template-columns: 1fr 48px; }
  .bar-label { grid-column: 1 / -1; }
  .bar-track { grid-column: 1; }
  .pager .btn { flex: 1 1 100%; }
  .bron-actions { width: 100%; }
  .bron-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Print: alleen het resultaat ---- */
@media print {
  .topbar, .footer, .result-actions, .skip, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .card { box-shadow: none; break-inside: avoid; }
  details { display: block; }
  details > * { display: block; }
}
.hero .btn-danger { color: #a51f1f; border-color: #a51f1f; background: rgba(255,255,255,.5); }
.nav-reset { font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; color: var(--slecht); background: transparent; border: 1.5px solid var(--slecht); border-radius: 8px; padding: 4px 10px; margin-left: 6px; }
.nav-reset:hover { background: var(--slecht-soft); }
.nav-reset-short { display: none; }
@media (max-width: 600px) {
  .nav-reset { font-size: .85rem; padding: 4px 8px; margin-left: 2px; }
  .nav-reset-text { display: none; }
  .nav-reset-short { display: inline; }
  .brand-text { display: none; }
}
@media print { .nav-reset { display: none; } }
.ring-wrap { flex: none; width: 170px; margin: 0 auto; text-align: center; }
.ring-fg.leeg { stroke: var(--muted); }
.score-card.niveau-leeg { border-color: var(--border); border-style: dashed; }
.ring-caption { font-size: .85rem; color: var(--muted); margin: 8px 0 4px; }
.dekking { display: block; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.dekking-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.voorlopig { font-size: 1rem; font-weight: 600; color: var(--muted); }
.score-text .btn { margin-top: 12px; }

/* ---- Voorpagina: Studio Cyber Resilience ---- */
body.intro-modus { background: #f5a623 url("../img/intro-bg.jpg") center top / cover no-repeat; }
body.intro-modus .topbar { display: none; }
body.intro-modus .footer { color: #3d2f1c; border-top-color: rgba(31,26,20,.2); }
body.intro-modus .footer a { color: #6b3500; }
.intro { color: #1f1a14; }
.intro-logo { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-weight: 700; font-size: 1.35rem; margin-bottom: 16px; }
.intro-logo img { width: 46px; height: auto; }
.intro-lead { font-size: clamp(1.05rem, 2.1vw, 1.3rem); max-width: 60em; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin-top: 32px; }
.intro-projecten h2 { font-size: clamp(1.05rem, 2.1vw, 1.3rem); font-weight: 400; }
.intro-projecten ul { margin: 0; padding-left: 1.3em; font-size: clamp(1rem, 1.9vw, 1.2rem); }
.intro-projecten li { margin-bottom: 4px; }
.intro-preview { display: block; text-decoration: none; color: #1f1a14; border: 3px solid #2b3a44; border-radius: var(--radius); overflow: hidden; background: #fff1d6; box-shadow: 0 8px 28px rgba(60,40,10,.25); transition: transform .15s ease, box-shadow .15s ease; }
.intro-preview:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(60,40,10,.35); }
.intro-preview:focus-visible { outline: 4px solid #1f1a14; outline-offset: 4px; }
.intro-preview-card { display: block; margin: 0; border-radius: 0; padding: clamp(22px, 4vw, 40px) clamp(18px, 3vw, 32px); }
.intro-preview-card .eyebrow, .intro-preview-card .lead { display: block; }
.intro-preview-card .lead { font-size: .95rem; margin-bottom: 18px; }
.intro-preview-title { display: block; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.intro-preview-card .btn { padding: 8px 14px; font-size: .9rem; }
.intro-preview-cta { display: block; background: #1f1a14; color: #fff; text-align: center; font-weight: 700; padding: 12px 16px; font-size: 1.05rem; }
.intro-preview:hover .intro-preview-cta { background: #b35c00; }
@media (max-width: 800px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-preview { order: -1; }
}

/* ---- Logo (zwart, transparant) ---- */
.brand-logo { width: 30px; height: auto; display: block; }
@media (prefers-color-scheme: dark) { .brand-logo { filter: invert(1); } }
