/* Styling gebaseerd op vcn.nl: navy #336, lichtblauw #1fa4d0 / #7ccef4 / #c9e8f5, accent #e73926,
   lettertype ff-tisa-sans-web-pro (Adobe Fonts, licentie VCN) met Fira Sans als vrije vervanger. */
:root {
  --navy: #333366;
  --navy-dark: #24244d;
  --blue: #1fa4d0;
  --blue-text: #13799b;
  --sky: #7ccef4;
  --ice: #c9e8f5;
  --ice-soft: #eef8fd;
  --red: #e73926;
  --grey: #e5e5e5;
  --text: #2b2b4a;
  --muted: #5d5d7a;
  --bg: #f5f9fc;
  --white: #fff;
  --radius: 16px;
  --pill: 50px;
  --font: "ff-tisa-sans-web-pro", "Fira Sans", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(51, 51, 102, .08);
}

* { 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);
}
h1, h2, h3 { font-weight: 500; line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Header ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 50% 0%, #3f3f7a 0%, var(--navy) 55%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 20px 16px 96px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -60px;
  height: 120px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.topbar {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}
.brand img { display: block; height: 46px; width: auto; }
.hero-text { padding: 44px 0 0; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); font-weight: 600; letter-spacing: -.01em; }
.hero-text p { font-size: clamp(18px, 3vw, 24px); font-weight: 300; margin: 8px 0 0; color: var(--ice); }

/* ---------- Voortgang ---------- */
.progress {
  position: sticky; top: 0; z-index: 10;
  height: 6px;
  background: var(--ice);
}
.progress > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  border-radius: 0 6px 6px 0;
  transition: width .35s ease;
}

/* ---------- Kaart ---------- */
.wrap {
  max-width: 860px;
  margin: -40px auto 0;
  padding: 0 16px 48px;
  position: relative;
  z-index: 2;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 48px);
  animation: in .3s ease;
}
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .progress > div { transition: none; } }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue-text);
  margin-bottom: 10px;
}
.eyebrow .count { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.card h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  color: var(--navy);
  margin-bottom: 12px;
  outline: none;
}
.intro h2 { color: var(--blue); font-size: clamp(26px, 4.4vw, 38px); }
.lead { font-size: 1.12em; color: var(--navy); }
.help { color: var(--muted); margin-bottom: 24px; }
.qbody { margin-top: 24px; }

.facts {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.facts li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ice-soft);
  color: var(--navy);
  border-radius: var(--pill);
  padding: 8px 16px;
  font-size: 15px;
}
.facts svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Knoppen ---------- */
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--grey);
}
.btn {
  border: 2px solid transparent;
  border-radius: var(--pill);
  padding: 12px 28px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--blue-text); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-primary::after { content: " →"; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--ice-soft); }
.intro .btn-primary, .done .btn-primary { background: var(--red); }
.intro .btn-primary:hover { background: #c92c1b; }

.error {
  margin: 20px 0 0;
  padding: 12px 16px;
  border-left: 4px solid var(--red);
  background: #fdeeec;
  color: #a3220f;
  border-radius: 8px;
  font-weight: 500;
}

/* ---------- Enkelvoudige keuze ---------- */
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--grey);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option:hover { border-color: var(--sky); background: var(--ice-soft); }
.option input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); flex: none; }
.option:has(input:checked) { border-color: var(--navy); background: var(--ice-soft); color: var(--navy); font-weight: 500; }
.option:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Schaal 0–10 ---------- */
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.scale-opt { position: relative; cursor: pointer; }
.scale-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale-opt span {
  display: flex; align-items: center; justify-content: center;
  height: 52px;
  border: 2px solid var(--grey);
  border-radius: 10px;
  font-weight: 600;
  color: var(--navy);
  transition: all .15s;
}
.scale-opt:hover span { border-color: var(--sky); background: var(--ice-soft); }
.scale-opt input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.scale-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.scale-anchors {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 12px; font-size: 15px; color: var(--muted);
}
.scale-anchors span:last-child { text-align: right; }
.scale-anchors b { color: var(--navy); }

/* ---------- Matrix ---------- */
.matrix-head, .matrix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(var(--cols), minmax(44px, 72px));
  align-items: center;
  gap: 4px;
}
.matrix-head {
  position: sticky; top: 6px; z-index: 1;
  background: var(--white);
  padding: 8px 0;
  border-bottom: 2px solid var(--ice);
  font-size: 13px; font-weight: 600; color: var(--navy);
  text-align: center; line-height: 1.25;
}
.matrix-head small { display: block; font-weight: 400; color: var(--muted); }
.matrix-row {
  padding: 12px 8px;
  border-bottom: 1px solid var(--grey);
  border-radius: 8px;
  transition: background .15s;
}
.matrix-row:hover { background: var(--ice-soft); }
.matrix-row.missing { background: #fdeeec; box-shadow: inset 4px 0 0 var(--red); }
.matrix-label { padding-right: 16px; }
.tag {
  display: inline-block; font-style: normal; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--blue-text); background: var(--ice-soft);
  border-radius: var(--pill); padding: 1px 8px; margin-left: 4px; vertical-align: 2px;
}
.matrix-opts { display: contents; }
.mopt { display: flex; justify-content: center; align-items: center; min-height: 44px; cursor: pointer; }
.mopt input { width: 22px; height: 22px; margin: 0; accent-color: var(--navy); cursor: pointer; }
.mlabel {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Punten verdelen ---------- */
.points { display: grid; gap: 4px; }
.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey);
}
.plabel { font-weight: 500; color: var(--navy); }
.plabel small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.pctrl { display: flex; align-items: center; gap: 12px; }
.stepper {
  display: inline-flex; align-items: center;
  border: 2px solid var(--grey); border-radius: var(--pill);
  overflow: hidden; flex: none;
}
.stepper:focus-within { border-color: var(--navy); }
.stepper button {
  width: 40px; height: 44px; border: 0; background: var(--ice-soft);
  color: var(--navy); font-size: 20px; font-weight: 600; cursor: pointer;
}
.stepper button:hover { background: var(--ice); }
.stepper input {
  width: 56px; height: 44px; border: 0; text-align: center; font-weight: 600;
  color: var(--navy); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.pbar { flex: 1; height: 8px; background: var(--grey); border-radius: 8px; overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 8px; transition: width .2s; }
.ptotal {
  position: sticky; bottom: 12px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 20px;
  border-radius: var(--pill);
  background: var(--navy); color: var(--white);
  box-shadow: var(--shadow);
}
.ptotal.ok { background: #1d7a4a; }
.ptotal.over { background: var(--red); }

/* ---------- Verdeling 2 opties ---------- */
.split-fields { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.split-field { display: grid; gap: 6px; font-weight: 500; color: var(--navy); max-width: 45%; }
.split-field.right { text-align: right; justify-items: end; }
.pct { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 600; }
.pct input {
  width: 80px; height: 52px; text-align: center; font-size: 22px; font-weight: 600; color: var(--navy);
  border: 2px solid var(--grey); border-radius: 12px; -moz-appearance: textfield; appearance: textfield;
}
.pct input:focus { border-color: var(--navy); outline: none; }
.pct input::-webkit-outer-spin-button, .pct input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.split-range {
  --v: 50%;
  width: 100%; height: 14px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--blue) 0 var(--v), var(--navy) var(--v) 100%);
  cursor: pointer;
}
.split-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.split-range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.split.untouched .split-range { background: var(--grey); }
.split.untouched .split-range::-webkit-slider-thumb { border-color: var(--sky); }
.hint { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* ---------- Open vraag ---------- */
.open textarea {
  width: 100%; min-height: 160px; resize: vertical;
  padding: 14px 16px;
  border: 2px solid var(--grey); border-radius: 12px; line-height: 1.5;
}
.open textarea:focus { border-color: var(--navy); outline: none; }
.counter { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- Afronding ---------- */
.done { text-align: center; }
.done .check {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--ice-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231fa4d0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 6'/%3E%3C/svg%3E") center / 36px no-repeat;
}
.done h2 { color: var(--blue); }
.devbox {
  margin-top: 32px; padding: 20px; text-align: left;
  border: 2px dashed var(--sky); border-radius: 12px; background: var(--ice-soft); font-size: 15px;
}
.devbox .nav { margin-top: 12px; padding-top: 0; border: 0; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 8px 16px 40px; color: var(--muted); font-size: 15px; }
.footer .small { font-size: 13px; color: var(--navy); font-weight: 500; }

/* ---------- Mobiel ---------- */
@media (max-width: 719px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 80px; }
  .hero-text { padding-top: 32px; }
  .scale { grid-template-columns: repeat(6, 1fr); }
  .scale-opt span { height: 48px; }

  .matrix-head { display: none; }
  .matrix-row { display: block; padding: 16px 12px; }
  .matrix-label { padding: 0 0 10px; font-weight: 500; color: var(--navy); }
  .matrix-opts { display: flex; flex-wrap: wrap; gap: 8px; }
  .mopt {
    position: relative;
    border: 2px solid var(--grey); border-radius: var(--pill);
    padding: 6px 14px; min-height: 44px; gap: 8px; font-size: 15px;
  }
  .mopt input { width: 18px; height: 18px; }
  .mopt:has(input:checked) { border-color: var(--navy); background: var(--ice-soft); font-weight: 600; }
  .mlabel { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

  .prow { grid-template-columns: 1fr; gap: 10px; }
  .ptotal { border-radius: 14px; }
  .split-field { max-width: 48%; font-size: 15px; }
  .nav .btn { padding: 12px 20px; }
}

/* ---------- Persoonlijke link en afronding ---------- */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.final-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); text-align: right; }
.gate { text-align: center; }
.gate h2 { color: var(--navy); }
.gate-used h2 { color: var(--blue); }
.gate-loading { min-height: 180px; }

/* ---------- Inloggen dashboard ---------- */
.login { max-width: 520px; margin: 0 auto; }
.login .error { margin: 0 0 16px; }
.login-field { display: block; font-weight: 500; color: var(--navy); margin: 8px 0 6px; }
.login-input { width: 100%; padding: 12px 16px; border: 2px solid var(--grey); border-radius: 12px; font-size: 17px; }
.login-input:focus { border-color: var(--navy); outline: none; }

/* ---------- Startpagina zonder link ---------- */
.landing h3 { font-size: 17px; color: var(--navy); margin-bottom: 6px; font-weight: 600; }
.landing a { color: var(--blue-text); }
.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--grey); }
.landing-grid p { font-size: 15px; margin: 0; color: var(--muted); }
@media (max-width: 719px) { .landing-grid { grid-template-columns: 1fr; gap: 18px; } }
