/*
 * Enquête voor artsen — modern, rustgevend, betrouwbaar.
 * Ontworpen voor een vlot aanvoelende, mooie UI.
 */

:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --card-bg: #ffffff;
  --text: #2d3748;
  --text-muted: #5a6a7a;
  --text-hint: #8b9aaa;
  --border: #e2e9ef;
  --primary: #4a90a4;
  --primary-hover: #3d7a8c;
  --primary-light: #e8f2f5;
  --radius: 12px;
  --radius-sm: 10px;
  --space: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;
  /* Klinisch spacing (8/12/16/24/32 px) */
  --space-8: 0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-28: 1.75rem;
  --space-32: 2rem;
  --space-40: 2.5rem;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --error: #a85c5c;
  --touch-min: 44px;
  --checkbox-size: 1.25rem;
  /* Ruimte tussen control en labeltekst; tussen opties onderling */
  --control-label-gap: 2rem;
  --option-spacing: 1rem;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem calc(1rem + var(--safe-left)) calc(4rem + var(--safe-bottom)) calc(1rem + var(--safe-right));
  padding-top: calc(var(--space-lg) + var(--safe-top));
  min-height: 100vh;
  min-height: 100dvh;
}

/* Progress — duidelijke balk, rustig */
.progress-wrap {
  margin-bottom: var(--space-lg);
}

.progress-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-hint);
  margin: 0;
  font-weight: 500;
}

/* Landing — uitnodigend, één duidelijke CTA, gecentreerd op de pagina */
#step0 {
  min-height: calc(100dvh - 4rem);
  display: flex;
  flex-direction: column;
}
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) var(--space);
}
.landing-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg) var(--space);
  width: 100%;
  max-width: 48rem;
}

.landing-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.landing-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.6;
  font-weight: 400;
}

.info-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.75rem;
  font-size: 0.875rem;
  color: var(--text-hint);
  margin-bottom: var(--space-lg);
  padding: 0.75rem 0;
  font-weight: 500;
}

.info-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.info-bar-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-muted);
}

.info-bar-icon svg {
  display: block;
}

.info-bar span:not(.info-bar-icon) {
  white-space: nowrap;
}

.btn-start {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.5rem;
  min-height: var(--touch-min);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-start:hover {
  background: var(--primary-hover);
}

.btn-start:active {
  transform: scale(0.98);
}

.btn-start:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Tussenpagina per segment — echte fullscreen dia, heel scherm, slideshow-achtig */
.step.section-intro {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  z-index: 20;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: auto;
}
.step.section-intro .section-intro-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
}
.step.section-intro .section-intro-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(74, 144, 164, 0.08) 0%, transparent 55%);
  pointer-events: none;
}
.step.section-intro .section-intro-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
  width: 90%;
  margin: auto;
  padding: var(--space-40) var(--space-32);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
}
.section-intro-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto var(--space-28);
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 50%;
  border: 1px solid rgba(74, 144, 164, 0.2);
}
.section-intro-icon svg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}
.section-intro-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-16);
  letter-spacing: -0.025em;
  line-height: 1.3;
}
.section-intro-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 var(--space-28);
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
}
.step.section-intro .step-nav {
  display: none;
}

/* Steps — inhoud in kaart voor consistentie */
.step {
  display: block;
}

.step[hidden] {
  display: none !important;
}

.step-inner {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space);
  margin-bottom: var(--space-lg);
}

.step-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.step-heading-subtle {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 var(--space);
  font-weight: 400;
  line-height: 1.55;
}

/* Neutrale overgangsregel bovenaan een sectie */
.section-transition {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-24);
  font-weight: 400;
  line-height: 1.55;
}

/* Optioneel open veld — geruststellende helper */
.open-helper {
  font-size: 0.8125rem;
  color: var(--text-hint);
  margin: var(--space-8) 0 0;
  font-weight: 400;
}

/* Tekst tussen haakjes in vragen niet vet */
.paren {
  font-weight: 400;
}

/* ——— Dagelijkse realiteit: reflectie-instrument (geen matrix) ——— */
.dagelijks-reflectie .section-transition {
  margin-bottom: var(--space-16);
}
.dagelijks-reflectie .dagelijks-anchor {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-24);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  line-height: 1.5;
}
.dagelijks-reflectie .dagelijks-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}
.dagelijks-reflectie .dagelijks-task-block {
  padding-bottom: var(--space-40);
  border-bottom: 1px solid var(--border);
}
.dagelijks-reflectie .dagelijks-task-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.dagelijks-reflectie .dagelijks-task-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-12);
  line-height: 1.45;
}
.dagelijks-reflectie .dagelijks-task-clarify {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-16);
  line-height: 1.5;
}
/* Schaal 0–5: onder de taak, sober */
.dagelijks-reflectie .dagelijks-scale {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 22rem;
  margin-top: var(--space-12);
}
.dagelijks-reflectie .dagelijks-opt {
  flex: 1;
  min-width: 0;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.dagelijks-reflectie .dagelijks-opt:hover {
  border-color: var(--text-hint);
  background: rgba(0, 0, 0, 0.04);
}
.dagelijks-reflectie .dagelijks-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--text);
}
.dagelijks-reflectie .dagelijks-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.dagelijks-reflectie .dagelijks-opt:focus-within {
  box-shadow: 0 0 0 2px var(--primary-light);
}
.dagelijks-reflectie .dagelijks-num {
  font-size: 0.9375rem;
  font-weight: 500;
  color: inherit;
}
.dagelijks-reflectie .dagelijks-opt:has(input:checked) .dagelijks-num {
  font-weight: 600;
}
/* Frequentie Zelden · Soms · Regelmatig · Vaak: sober, geen sterke knoppen */
.dagelijks-reflectie .dagelijks-freq {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-12);
}
.dagelijks-reflectie .dagelijks-freq-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.dagelijks-reflectie .dagelijks-freq-opt:hover {
  border-color: var(--text-hint);
  background: rgba(0, 0, 0, 0.04);
}
.dagelijks-reflectie .dagelijks-freq-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--text);
}
.dagelijks-reflectie .dagelijks-freq-opt input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.dagelijks-reflectie .dagelijks-freq-opt .dagelijks-freq-label {
  transform: translateY(-0.1em);
}
.dagelijks-reflectie .dagelijks-freq-opt:focus-within {
  box-shadow: 0 0 0 2px var(--primary-light);
}
/* Andere taken: eerst alleen tekstveld, frequentie na invoer */
.dagelijks-reflectie .dagelijks-andere .andere-taken-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}
.dagelijks-reflectie .andere-taak-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  align-items: stretch;
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--border);
}
.dagelijks-reflectie .andere-taak-row:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
}
.dagelijks-reflectie .andere-taak-tekst {
  width: 100%;
  max-width: 28rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dagelijks-reflectie .andere-taak-tekst:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.dagelijks-reflectie .andere-taak-freq {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-8);
}
.dagelijks-reflectie .andere-taak-freq[hidden] {
  display: none !important;
}
.dagelijks-reflectie .andere-taken-actions {
  margin-top: var(--space-32);
  margin-bottom: var(--space-24);
  padding-top: var(--space-24);
  border-top: 1px solid var(--border);
}
.dagelijks-reflectie .btn-add-taak {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 0.875rem;
  min-height: auto;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.dagelijks-reflectie .btn-add-taak:hover {
  color: var(--primary);
  border-color: var(--text-hint);
  background: rgba(0, 0, 0, 0.02);
}
.dagelijks-reflectie .btn-add-taak:focus {
  box-shadow: 0 0 0 2px var(--primary-light);
}
@media (max-width: 480px) {
  .dagelijks-reflectie .dagelijks-scale {
    max-width: 100%;
  }
  .dagelijks-reflectie .dagelijks-opt {
    min-width: 2.25rem;
  }
  .dagelijks-reflectie .dagelijks-freq {
    margin-top: var(--space-16);
  }
}

/* ——— Reflectie-blokken (Wat is belangrijk, Waar streeft u naar, Zorgen, Essentieel) ——— */
/* Eén verbale 5-puntsschaal, rustige radio’s, verticale layout */
.reflectie-block .section-transition {
  margin-bottom: var(--space-12);
}
.reflectie-block .scale-anchor {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-20);
  font-weight: 500;
}
.reflectie-block .reflectie-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}
.reflectie-block .reflectie-task-block {
  padding-bottom: var(--space-40);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.reflectie-block .reflectie-task-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.reflectie-block .reflectie-task-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-12) 0;
  line-height: 1.4;
}
.reflectie-block .verbal-scale-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-top: var(--space-12);
  max-width: 22rem;
}
.reflectie-block .verbal-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.reflectie-block .verbal-opt:hover {
  border-color: var(--text-hint);
  background: rgba(0, 0, 0, 0.04);
}
.reflectie-block .verbal-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--text);
}
.reflectie-block .verbal-opt input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.reflectie-block .verbal-opt .verbal-label {
  transform: translateY(-0.1em);
}
.reflectie-block .verbal-opt:focus-within {
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Frequentie-keuze (Zelden / Soms / Regelmatig / Vaak) — gelijk uitgelijnd */
.frequency-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}
.frequency-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
}
.frequency-row .task-label {
  flex: 1 1 100%;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-8);
  line-height: 1.5;
}
.frequency-row .options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}
@media (min-width: 640px) {
  .frequency-row {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: var(--space-16);
    align-items: center;
  }
  .frequency-row .task-label {
    flex: none;
    margin: 0;
    min-width: 0;
  }
}
.frequency-row .options label {
  display: flex;
  align-items: center;
  gap: var(--control-label-gap);
  min-height: var(--touch-min);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: var(--checkbox-size);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.frequency-row .options label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.frequency-row .options input {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  min-width: var(--checkbox-size);
  min-height: var(--checkbox-size);
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.frequency-row .options input[type="checkbox"] {
  border-radius: 0.25rem;
}
.frequency-row .options label .option-text {
  display: inline-block;
  transform: translateY(-0.14em);
  padding-left: 0.5rem;
}
.frequency-row .options label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.frequency-row .options label:focus-within {
  box-shadow: 0 0 0 2px var(--primary);
}

/* Andere taken: zelfde grid als frequency-rijen, optie-cards uitgelijnd */
.frequency-group-andere {
  margin-top: var(--space-8);
  padding-top: var(--space-16);
  border-top: 1px solid var(--border);
}
.frequency-row--andere {
  margin-bottom: var(--space-12);
}
@media (min-width: 640px) {
  .frequency-row--andere .task-label {
    grid-column: 1 / -1;
  }
}
.andere-taken-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.andere-taak-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.andere-taak-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
}
.andere-taak-inputs .andere-taak-tekst,
.andere-taak-inputs input[type="text"] {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.andere-taak-inputs .andere-taak-tekst:focus,
.andere-taak-inputs input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
@media (min-width: 640px) {
  .andere-taak-inputs {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: var(--space-16);
    align-items: center;
  }
  .andere-taak-inputs .andere-taak-tekst,
  .andere-taak-inputs input[type="text"] {
    flex: none;
    min-width: 0;
  }
}
/* Zelfde card-stijl als frequency-rijen (Zelden, Soms, etc.) */
.andere-taak-row .options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  flex: 0 0 auto;
}
.andere-taak-row .options label {
  display: flex;
  align-items: center;
  gap: var(--control-label-gap);
  min-height: var(--touch-min);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: var(--checkbox-size);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.andere-taak-row .options label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.andere-taak-row .options input {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  min-width: var(--checkbox-size);
  min-height: var(--checkbox-size);
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.andere-taak-row .options input[type="checkbox"] {
  border-radius: 0.25rem;
}
.andere-taak-row .options label .option-text {
  display: inline-block;
  transform: translateY(-0.14em);
  padding-left: 0.5rem;
}
.andere-taak-row .options label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.andere-taak-row .options label:focus-within {
  box-shadow: 0 0 0 2px var(--primary);
}
.andere-taken-actions {
  margin-top: var(--space-16);
}
.btn-secondary {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  min-height: var(--touch-min);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}
.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Formulieren — ruime velden, duidelijke focus; duidelijke scheiding tussen vragen */
.field {
  margin-bottom: var(--space-xl);
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--option-spacing);
}

.radio-group.radio-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--option-spacing);
}

/* Control + label: gap alleen, geen margin; rustige, klinische uitstraling */
.radio-option {
  display: flex;
  align-items: center;
  gap: var(--control-label-gap);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: var(--checkbox-size);
  color: var(--text);
  cursor: pointer;
  padding: 0.75rem 0.85rem;
  min-height: var(--touch-min);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.radio-option:hover {
  background: var(--primary-light);
}

.radio-option:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
}

.radio-option input {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  min-width: var(--checkbox-size);
  min-height: var(--checkbox-size);
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* Radiobuttons:zelfde stijl als rest van de site (grootte, kleur, cursor) */
.radio-option input[type="radio"] {
  cursor: pointer;
}

/* Zelfde checkbox-stijl overal als bij Uitdagingen (card + controle) */
.radio-option input[type="checkbox"] {
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Tekst uitlijnen met exact het midden van de radiobutton/checkbox */
.radio-option .option-text {
  display: inline-block;
  transform: translateY(-0.14em);
  padding-left: 0.5rem;
}

.radio-option input:focus {
  outline: none;
}

.radio-option:focus-within {
  box-shadow: 0 0 0 2px var(--primary);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  min-height: var(--touch-min);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-hint);
}

.field input:hover,
.field textarea:hover {
  border-color: var(--text-hint);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.step-d .field textarea {
  min-height: 120px;
}

.conditional[hidden] {
  display: none !important;
}

.conditional {
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
}

/* Likert — klinisch reflectie-instrument (0–5), geen enquêtegevoel */

/* Eén vraag per scherm (indien gebruikt) */
.likert-screen {
  padding: var(--space) 0;
}
.likert-screen .step-inner {
  padding: var(--space-lg);
}
.likert-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.45;
}
.likert-legend {
  font-size: 0.8125rem;
  color: var(--text-hint);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

/* ——— Reflectieblok (meerdere taken per stap) ——— */
.likert-block {
  margin-top: var(--space);
}
.likert-block .likert-row {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.likert-block .likert-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Taaktekst visueel dominant */
.likert-block .likert-task {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space);
  line-height: 1.5;
}

/* Één interpretatieregel per blok */
.likert-interpretation {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: var(--space) 0 0;
  padding-top: var(--space);
  border-top: 1px solid var(--border);
  font-weight: 500;
}
.likert-interpretation--top {
  margin: 0 0 var(--space);
  padding-top: 0;
  border-top: none;
  padding-bottom: var(--space);
  border-bottom: 1px solid var(--border);
}

/* Schaal 0–5: horizontaal, zelfde stijltaal als overige formulierelementen */
.likert-scale {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  max-width: 24rem;
  margin-top: 0;
}
.likert-block .likert-row .likert-scale {
  margin-top: 0;
}

/* Afgestemd op .radio-option en .field input: radius, border 2px, focus 3px primary-light */
.likert-opt {
  flex: 1;
  min-width: 0;
  min-height: var(--touch-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.likert-opt:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.likert-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.likert-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.likert-opt input:focus {
  outline: none;
}
.likert-opt:focus-within {
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Custom cirkel: zelfde border-weight en transitions als rest van formulier */
.likert-opt .likert-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.9375rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.likert-opt:has(input:checked) .likert-num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
/* Referentiepunten 0 en 5 sterker, 1–4 subtieler */
.likert-opt .likert-num {
  color: var(--text-muted);
  font-weight: 500;
}
.likert-opt:first-child .likert-num,
.likert-opt:last-child .likert-num {
  color: var(--text);
  font-weight: 600;
}
.likert-opt:first-child:has(input:checked) .likert-num,
.likert-opt:last-child:has(input:checked) .likert-num {
  color: #fff;
}

/* Zelfde regels als radiobuttons: gap, uitlijning tekst op midden control, ruimte naast control */
.checkbox-group-max2 {
  display: flex;
  flex-direction: column;
  gap: var(--option-spacing);
}
.checkbox-group-max2 .radio-option {
  display: flex;
  align-items: center;
  gap: var(--control-label-gap);
}
.checkbox-group-max2 .radio-option .option-text {
  display: inline-block;
  transform: translateY(-0.14em);
  padding-left: 0.5rem;
}
.checkbox-group-max2 .hint {
  font-size: 0.8125rem;
  color: var(--text-hint);
  margin-top: 0.25rem;
}

/* Sectie C — kaarten met subtiele schaduw */
.step-c .step-inner {
  padding: 0;
  overflow: hidden;
}

.step-c .card {
  background: var(--card-bg);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-lg);
  margin: 0;
  box-shadow: none;
}

.step-c .card:last-child {
  border-bottom: none;
}

.step-c .card:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.step-c .card:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.step-c .card:only-child {
  border-radius: var(--radius);
}

.card-question {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.step-c .likert-legend {
  margin-bottom: 1rem;
}

.step-d .field {
  margin-bottom: var(--space-lg);
}

.step-d .field label {
  font-size: 1rem;
}

/* Sectie F —zelfde kaartstijl */
.step-f-inner {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}

.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.field-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.35rem 0 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.field-checkbox input:focus {
  outline: none;
}

.field-checkbox label {
  margin-bottom: 0;
  font-weight: 500;
  cursor: pointer;
}

/* Navigatie — vloeiende knoppen */
/* Geen Terug op eerste formulierstap (Praktijkprofiel) */
#step1 .btn-back {
  display: none;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.75rem;
  padding-top: var(--space);
  margin-top: 0;
  flex-wrap: wrap;
}

.btn {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  min-height: var(--touch-min);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-back {
  background: var(--surface);
  color: var(--text-muted);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  border-color: var(--text-hint);
  color: var(--text);
  background: var(--bg);
}

.btn-back:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-next,
.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
  background: var(--primary-hover);
}

.btn-next:active,
.btn-submit:active {
  transform: scale(0.98);
}

.btn-next:focus,
.btn-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-submit {
  padding: 0.85rem 1.75rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--error);
  font-weight: 500;
}

/* Bedankpagina — kaart gecentreerd in het midden van de pagina */
.page-bedankt .app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--space-xl) + var(--safe-top)) calc(1rem + var(--safe-left)) calc(4rem + var(--safe-bottom)) calc(1rem + var(--safe-right));
  max-width: 960px;
}
.page-bedankt .landing-card {
  width: 100%;
  max-width: 36rem;
  text-align: center;
}

.page-bedankt h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
}

.page-bedankt p {
  color: var(--text-muted);
  margin: 0;
  max-width: 36em;
  line-height: 1.6;
  font-weight: 400;
}

/* ——— Mobile: kleine telefoons (320px–479px) ——— */
@media (max-width: 479px) {
  .app {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .landing-card {
    padding: var(--space) 1rem;
  }
  .landing-title {
    font-size: 1.25rem;
  }
  .landing-subtitle {
    font-size: 0.9375rem;
  }
  .info-bar {
    gap: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
  .step-inner {
    padding: 1rem;
  }
  .step-heading {
    font-size: 1.125rem;
  }
  .step-intro {
    font-size: 0.875rem;
  }
  .likert-question,
  .likert-task,
  .card-question {
    font-size: 1rem;
  }
  .likert-block .likert-row {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
  }
  .step-nav {
    flex-direction: column-reverse;
  }
  .step-nav .btn {
    width: 100%;
    justify-content: center;
  }
  .step-nav .btn-next,
  .step-nav .btn-submit {
    margin-left: 0;
  }
}

/* ——— Grotere mobiel / kleine tablet (480px+) ——— */
@media (min-width: 480px) {
  .app {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .likert-scale {
    gap: 0.35rem;
  }
}

/* ——— Tablet en groter (600px+) ——— */
@media (min-width: 600px) {
  .app {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .landing {
    padding: var(--space-xl) 0;
  }
  .landing-card {
    padding: var(--space-xl) var(--space-lg);
  }
  .landing-title {
    font-size: 1.625rem;
  }
  .step-inner {
    padding: var(--space-lg);
  }
  .step-heading {
    font-size: 1.3125rem;
  }
  .likert-scale {
    gap: 0.5rem;
    max-width: 24rem;
  }
}

/* ——— Desktop (768px+) ——— */
@media (min-width: 768px) {
  .landing-title {
    font-size: 1.75rem;
  }
  .step-heading {
    font-size: 1.375rem;
  }
}

/* ——— Grote desktop (960px+) ——— */
@media (min-width: 960px) {
  .app {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}
