:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1d2733;
  --muted: #6b7785;
  --line: #dde3ea;
  --accent: #0f6e8c;
  --accent-soft: #e3f2f7;
  --warn-bg: #fff6e0;
  --warn-line: #e8c46a;
  --ok: #1f7a4d;
  --bad: #a33a3a;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header { background: var(--accent); color: #fff; padding: 22px 0 18px; margin-bottom: 24px; }
header h1 { margin: 0 0 4px; font-size: 22px; }
header p { margin: 0; opacity: .85; font-size: 14px; }

.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.step-head h2 { margin: 0; font-size: 19px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
h3 { font-size: 16px; margin: 22px 0 8px; }
h4 { font-size: 14px; margin: 18px 0 6px; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.help { color: var(--muted); margin: 4px 0 12px; }
.muted { color: var(--muted); font-weight: normal; }
.todo { color: var(--bad); font-weight: 600; margin: 14px 0 0; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* step 1 */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.site { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; color: inherit; }
.site:hover { border-color: var(--accent); }
.site.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.site-name { font-weight: 700; }
.site-nl { color: var(--muted); font-size: 13px; }
.site-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.checks { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent-soft); border-color: var(--accent); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check em { color: var(--muted); font-style: normal; font-size: 13px; }
.check.lvl1 { font-weight: 600; }
.children { margin: 6px 0 4px 28px; display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--line); padding-left: 12px; }
.children .check { font-weight: normal; }

/* segmented buttons */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font: inherit; cursor: pointer; border-right: 1px solid var(--line); color: var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--accent-soft); }
.seg button.on { background: var(--accent); color: #fff; }
.seg.small button { padding: 6px 14px; min-width: 56px; }

/* step 2 */
.nopts { display: flex; flex-direction: column; gap: 6px; }
.nopt { display: grid; grid-template-columns: auto 52px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nopt:hover { border-color: var(--accent); }
.nopt.on { background: var(--accent-soft); border-color: var(--accent); }
.nopt input { margin-top: 4px; accent-color: var(--accent); }
.ncode { font-weight: 700; font-size: 16px; }
.persides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; color: inherit; }
.stack button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.stack button b { display: inline-block; min-width: 34px; }

.note { background: var(--accent-soft); border: 1px solid #b9dce8; border-radius: 8px; padding: 10px 14px; margin: 14px 0; font-size: 14px; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.note ul { margin: 6px 0; padding-left: 20px; }

/* step 3 */
.q { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.q.unanswered { border-color: var(--warn-line); background: #fffcf3; }
.q-src { font-size: 12.5px; color: var(--muted); font-style: italic; margin-top: 2px; }
.q-hint { font-size: 13px; color: var(--accent); margin-top: 4px; }
.autos { margin-top: 12px; font-size: 13.5px; }
.autos summary { cursor: pointer; color: var(--muted); }
.autos ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; color: #fff; }
.pill.yes { background: var(--ok); }
.pill.no { background: #8a96a3; }

.res-title { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-card { border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; }
.result-card.pending { border-style: dashed; border-color: var(--warn-line); }
.result-card h3 { margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.chip { background: var(--accent); color: #fff; font-weight: 700; font-size: 20px; padding: 6px 14px; border-radius: 8px; font-family: Georgia, "Times New Roman", serif; cursor: help; }
.none { color: var(--muted); font-style: italic; align-self: center; }
.why { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.why li { padding-left: 10px; border-left: 3px solid var(--line); }
.why li.add { border-color: var(--ok); }
.why li.omit { border-color: var(--bad); }
.why li.excl { color: var(--muted); }
.why li.n { border-color: var(--accent); }
.reason summary { cursor: pointer; list-style: none; }
.reason summary::-webkit-details-marker { display: none; }
.reason summary::after { content: " ▸ waarom?"; color: var(--accent); font-size: 12px; }
.reason[open] summary::after { content: " ▾"; }
.reason-body { margin: 6px 0 4px; padding: 8px 10px; background: #f7f9fb; border-radius: 6px; color: var(--ink); }
.reason-body .src { margin: 4px 0 8px; font-style: italic; }
.reason-body ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 4px; }
.pill.open { background: var(--warn-line); }

.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 8px; font: inherit; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--accent); }

.ref { margin-top: 24px; }
.ref summary { cursor: pointer; font-weight: 600; }
.caption { margin: 12px 0 8px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { background: #eef2f6; }
tr.active td { background: #fff3c4; font-weight: 600; }
.fns { list-style: none; padding: 0; font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.fns li { margin-bottom: 3px; }
sup { font-size: 70%; color: var(--accent); }
.chip sup, th sup { color: inherit; }

.disclaimer { color: var(--muted); font-size: 12.5px; text-align: center; margin: 10px 0 40px; }

@media (max-width: 700px) {
  .result-grid, .persides { grid-template-columns: 1fr; }
  .q { flex-direction: column; }
}

@media print {
  header { background: none; color: var(--ink); }
  #step1 .sites, .actions, .autos { display: none; }
  .step { break-inside: avoid; }
}
.why .reason-body li { border-left: 0; padding-left: 0; }
