/* Maak werk beter — gedeelde stijl voor site en scans */
:root {
  --paper: #f5f2ea;
  --paper-2: #ece7da;
  --surface: #fffdf8;
  --line: #ddd5c3;
  --ink: #1b2420;
  --ink-2: #4d5852;
  --ink-3: #6f7a73;
  --primary: #1d5c48;
  --primary-ink: #ffffff;
  --primary-hover: #154736;
  --primary-soft: #dcebe3;
  --accent: #d9822b;
  --accent-soft: #f7e6d2;
  --focus-red: #a8402a;
  --focus-soft: #f6e1da;
  --ok: #2e6b3f;
  --ok-soft: #dfeee2;

  --font-display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --t-xs: clamp(0.78rem, 0.74rem + 0.2vw, 0.875rem);
  --t-sm: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --t-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --t-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --t-xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --t-2xl: clamp(2.2rem, 1.6rem + 3vw, 4rem);

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --shadow: 0 1px 0 rgba(27, 36, 32, .04), 0 6px 24px -12px rgba(27, 36, 32, .18);
  --ease: 180ms cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100dvh; background: var(--paper); color: var(--ink);
  font: var(--t-base)/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: var(--primary); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.shell { max-width: 1080px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.shell-narrow { max-width: 820px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.3; }
.nav { display: flex; gap: 1.4rem; align-items: center; font-size: var(--t-sm); }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; font-size: var(--t-xs); color: var(--ink-3); }
.site-footer .shell { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: var(--r-md); border: 1.5px solid var(--primary);
  background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: var(--t-sm);
  text-decoration: none; transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding-inline: 1.8rem; font-size: var(--t-base); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn-sm { min-height: 40px; padding: .45rem 1rem; }

.eyebrow { font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; }
.muted { color: var(--ink-2); }

/* ---------------- scan: intro ---------------- */
.scan-intro { padding-block: clamp(2.5rem, 7vw, 5rem) 3rem; }
.scan-intro h1 { font-size: var(--t-xl); font-weight: 800; max-width: 22ch; }
.scan-intro .lead { margin-top: 1.2rem; color: var(--ink-2); font-size: var(--t-lg); max-width: 58ch; line-height: 1.5; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 620px) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem 1.3rem; }
.fact-title { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); color: var(--primary); }
.fact p { font-size: var(--t-sm); color: var(--ink-2); margin-top: .25rem; }
.privacy-note { margin-block: 2rem; font-size: var(--t-sm); color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 1.2rem; max-width: 70ch; }

/* ---------------- scan: wizard ---------------- */
.wizard { padding-block: 2rem 4rem; }
.progress { display: flex; gap: .4rem; margin-bottom: .6rem; }
.progress-seg { flex: 1; height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.progress-seg span { display: block; height: 100%; width: 0; background: var(--primary); transition: width 300ms ease; }
.progress-label { font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: var(--shadow); }
.card h2 { font-size: var(--t-xl); font-weight: 800; margin-bottom: .5rem; }
.card h2:focus { outline: none; }
.step-intro { color: var(--ink-2); font-size: var(--t-sm); max-width: 64ch; margin-bottom: .6rem; }
.step-text { font-size: var(--t-sm); color: var(--ink-2); }
.card > .step-intro:last-of-type { margin-bottom: 1.8rem; }

.field { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
legend, .field > label { display: block; font-weight: 700; font-size: var(--t-base); margin-bottom: .7rem; padding: 0; line-height: 1.35; }
.req { color: var(--accent); margin-left: .15em; }
.hint { font-size: var(--t-xs); color: var(--ink-3); margin: -.35rem 0 .7rem; }
.field input[type=text] + .hint, .field input[type=email] + .hint { margin: .45rem 0 0; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .55rem; }
.choice {
  position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .55rem;
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: .8rem 1rem; min-height: 50px;
  font-size: var(--t-sm); font-weight: 500; background: var(--surface); cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.choice:hover { border-color: var(--primary); }
.choice > input[type=radio], .choice > input[type=checkbox] { accent-color: var(--primary); width: 18px; height: 18px; margin-top: .15em; flex: none; }
.choice-label { flex: 1; min-width: 0; }
.choice:has(> input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice:has(> input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-other:has(> input:checked) { grid-column: 1 / -1; }
.other-input { display: none; flex-basis: 100%; }
.choice-other:has(> input:checked) .other-input { display: block; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--t-sm); transition: border-color var(--ease);
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }

.check-row { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--r-md); margin-bottom: .7rem; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; margin-top: .15em; }
.check-row label { font-size: var(--t-sm); font-weight: 500; margin: 0; }
.check-row:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* matrix */
.answered-count { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: .4rem; position: sticky; top: 64px; background: var(--surface); padding-block: .5rem; z-index: 1; }
.proc-row { padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.proc-row:last-child { border-bottom: 0; }
.proc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.proc-name { font-weight: 700; }
.proc-desc { font-size: var(--t-sm); color: var(--ink-2); }
.na { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; cursor: pointer; padding: .3rem 0; }
.na input { accent-color: var(--primary); width: 16px; height: 16px; }
.proc-row.is-na .slider-pair { opacity: .35; pointer-events: none; }
.slider-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 620px) { .slider-pair { grid-template-columns: 1fr; gap: .6rem; } .proc-head { flex-direction: column; gap: .3rem; } }
.slider-block label { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.slider-block output { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); text-transform: none; letter-spacing: 0; min-width: 1.5ch; text-align: right; }
.scale-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: -6px; }
input[type=range] { width: 100%; height: 40px; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--primary) 0 var(--fill, 0%), var(--paper-2) var(--fill, 0%) 100%); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--paper-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--primary); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
input[type=range].slider-unset::-webkit-slider-runnable-track { background: var(--paper-2); }
input[type=range].slider-unset::-webkit-slider-thumb { border-color: var(--ink-3); border-style: dashed; }
input[type=range].slider-unset::-moz-range-progress { background: transparent; }
input[type=range].slider-unset::-moz-range-thumb { border-color: var(--ink-3); border-style: dashed; }

/* split */
.split-list { display: grid; gap: .5rem; }
.split-row { display: grid; grid-template-columns: 1fr auto 120px; gap: 1rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.split-row label { font-size: var(--t-sm); font-weight: 500; }
@media (max-width: 620px) { .split-row { grid-template-columns: 1fr auto; } .split-bar { display: none; } }
.stepper { display: flex; align-items: center; gap: .3rem; }
.stepper input { width: 4.2rem; text-align: center; min-height: 42px; padding: .4rem; }
.step-btn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); font-size: 1.2rem; line-height: 1; }
.step-btn:hover { border-color: var(--primary); }
.split-bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.split-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 200ms ease; }
.split-total { margin-top: 1rem; font-size: var(--t-sm); padding: .7rem 1rem; border-radius: var(--r-md); background: var(--paper-2); position: sticky; bottom: .75rem; }
.split-total.ok { background: var(--ok-soft); color: var(--ok); }
.split-total.over { background: var(--focus-soft); color: var(--focus-red); }

.top-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.top-row label { font-weight: 700; width: 1.5rem; }

.nav-row { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.5rem; flex-wrap: wrap; }
.error-msg { display: none; margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--focus-soft); color: var(--focus-red); font-size: var(--t-sm); }
.error-msg.show { display: block; }
.divider { border: 0; border-top: 1px solid var(--line); margin-block: 1.5rem; }

/* ---------------- scan: report ---------------- */
.report { padding-block: 2.5rem 4rem; display: grid; gap: 1.25rem; }
.report > h2 { font-size: var(--t-xl); font-weight: 800; }
.report > h2:focus { outline: none; }
.report-sub { color: var(--ink-2); max-width: 62ch; margin-bottom: .5rem; }
.report-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 820px) { .report-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.1rem, 3vw, 1.6rem); }
.panel h3 { font-size: var(--t-lg); font-weight: 700; margin-bottom: 1rem; }
.quad-wrap { max-width: 440px; margin-inline: auto; }
.quad-note { font-size: var(--t-xs); color: var(--ink-3); margin-top: .6rem; }
.q-bg { fill: var(--paper); }
.q-focus { fill: var(--focus-soft); }
.q-line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }
.q-lab { font: 700 13px var(--font-body); fill: var(--ink-3); }
.q-lab-focus { fill: var(--focus-red); }
.q-tick { font: 12px var(--font-body); fill: var(--ink-3); }
.q-axis { font: 600 13px var(--font-body); fill: var(--ink-2); }
.dot circle { fill: var(--ink-3); stroke: var(--surface); stroke-width: 2; }
.dot-top circle { fill: var(--focus-red); }
.dot text { font: 700 12px var(--font-body); fill: #fff; }

.score-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.score-table th { text-align: left; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 0 .6rem .5rem 0; border-bottom: 2px solid var(--line); font-weight: 700; }
.score-table th:not(:first-child), .score-table td.num { text-align: right; padding-right: 0; padding-left: .6rem; }
.score-table td { padding: .6rem .6rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.score-table tr:last-child td { border-bottom: 0; }
.score-table .num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.proc-cell { display: flex; align-items: center; gap: .55rem; }
.rank-dot { display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--focus-red); color: #fff; font-size: 12px; font-weight: 700; }
.rank-dot.empty { background: transparent; }
.table-note { font-size: var(--t-xs); color: var(--ink-3); margin-top: .8rem; }

.priority-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.priority-item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.priority-rank { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--focus-red); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.priority-item h4 { font-size: var(--t-base); margin-bottom: .2rem; }
.priority-item p { font-size: var(--t-sm); color: var(--ink-2); max-width: 66ch; }
.callout { margin-top: 1.3rem; padding: .9rem 1.1rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: var(--t-sm); }

.bars { list-style: none; padding: 0; display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr 3rem; gap: .8rem; align-items: center; font-size: var(--t-sm); }
.bar { height: 12px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bars li { grid-template-columns: 1fr 3rem; } .bar { grid-column: 1 / -1; grid-row: 2; } }

.anchors { list-style: none; padding: 0; }
.anchors li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .6rem; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.anchors li:last-child { border-bottom: 0; }
.anchors .q { color: var(--ink-2); }
.anchors .a { font-weight: 700; text-align: right; flex: none; max-width: 45%; }
.cta-panel { background: var(--ink); color: #f5f2ea; border-color: var(--ink); }
.cta-panel p { color: #d8d3c6; max-width: 66ch; font-size: var(--t-sm); }
.cta-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-block: 1.3rem 1rem; }
.cta-panel .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.cta-panel .btn:hover { background: #e8953f; }
.cta-panel .btn-secondary { background: transparent; color: #f5f2ea; border-color: #5d6a63; }
.cta-panel .btn-secondary:hover { background: #26322d; }
.report-note { font-size: var(--t-xs) !important; color: #b9b3a5 !important; margin-top: .4rem; }
.report-note strong { color: #f5f2ea; }
.step-intro + .field, .step-intro + fieldset.field { margin-top: 1.6rem; }
.report > *, .report-grid > * { min-width: 0; }
@media (max-width: 480px) { .score-table th { letter-spacing: 0; font-size: 11px; } }
