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

body {
  background: #c0392b;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  transition: background-color 0.5s ease;
}

/* ── Screens ── */
.screen {
  width: 100%;
  max-width: 480px;
  padding: 56px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  margin: auto;
}

#screen-result {
  max-width: 560px;
  padding: 0 0 80px;
  text-align: left;
  align-items: stretch;
  gap: 0;
}

.result-cols {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
  padding: 24px 16px 32px;
}

.hidden {
  display: none !important;
}

/* ── Start screen ── */
#screen-start {
  min-height: 100dvh;
  justify-content: space-between;
  padding: 52px 24px 40px;
  gap: 0;
  max-width: 640px;
  background: radial-gradient(ellipse at 50% 25%, #e8453c 0%, #c0392b 65%);
}

#screen-start h1 {
  white-space: nowrap;
  font-size: clamp(32px, 8vw, 56px);
}

.start-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 6px 16px;
}

.start-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  width: 100%;
}

h1 {
  font-size: clamp(40px, 10vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
}

p {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.6;
}

.vermogen-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.vpill {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border-radius: 99px;
  padding: 5px 14px;
}

.start-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#btn-start {
  background: #fff;
  color: #c0392b;
  border: none;
  border-radius: 14px;
  padding: 18px 48px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  min-height: 54px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, box-shadow 0.1s;
}

#btn-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}

#btn-start:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

#btn-dashboard {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 14px 48px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 50px;
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}

#btn-dashboard:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ── Question screen ── */
#screen-question {
  min-height: 100dvh;
  justify-content: flex-start;
  padding: 52px 24px 40px;
  gap: 0;
}

.vermogen-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 6px 16px;
  color: #fff;
}

.question-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  width: 100%;
  flex: 1;
}

.stelling {
  font-size: clamp(17px, 4.5vw, 20px);
  font-weight: 700;
  line-height: 1.45;
  max-width: 360px;
}

@media (min-width: 640px) {
  #screen-question {
    max-width: 760px;
  }
  .stelling {
    font-size: 40px;
    max-width: 720px;
  }
}

.score-options {
  display: flex;
  gap: 10px;
}

.score-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 64px;
}

.score-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  text-align: center;
  line-height: 1.3;
}

.score-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.score-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.score-btn.selected {
  background: #fff;
  color: var(--vermogen-kleur, #c0392b);
  border-color: #fff;
}


/* ── Nav footer (pijlen + progress als één geheel) ── */
.nav-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.progress-bar-container {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
}

.progress-bar {
  height: 24px;
  background: #fff;
  border-radius: 99px;
  width: 0%;
  min-width: 72px;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

#progress-num {
  font-size: 12px;
  font-weight: 700;
  padding-right: 10px;
  white-space: nowrap;
}

.nav-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.nav-btn:not(:disabled):hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Results: header ── */
h2 {
  font-size: clamp(22px, 5.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.75;
  font-weight: 700;
  margin-bottom: -4px;
}

/* ── Hero panel ── */
.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 18px;
  padding: 16px;
  height: auto;
  width: 100%;
  flex-shrink: 0;
}

.hero-chart-wrap {
  width: 100%;
  max-width: 100%;
  height: 260px;
  position: relative;
}

#radar-chart {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.hero-score {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.hero-avg {
  font-size: clamp(44px, 11vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.hero-avg-denom {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  opacity: 0.4;
  letter-spacing: 0;
}

.hero-avg-label {
  font-size: 13px;
  opacity: 0.65;
  text-align: left;
  line-height: 1.4;
  font-weight: 500;
}

/* ── Sub-charts grid ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

@media (min-width: 540px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chart-item {
  border-radius: 16px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-item-name {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
  line-height: 1.25;
}

.chart-canvas-wrap {
  height: 220px;
  position: relative;
}

.chart-canvas-wrap canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.chart-item-score {
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 800;
  line-height: 1.1;
}

.chart-item-score-max {
  font-size: 11px;
  opacity: 0.55;
  font-weight: 500;
}

/* ── Actieknoppen (PDF + Delen) ── */
.result-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

#btn-pdf,
#btn-share {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 50px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

#btn-pdf:hover,
#btn-share:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Inlever-modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 36px 28px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  color: #fff;
}

.modal-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.modal-box h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.modal-box p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.55;
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#modal-btn-submit {
  background: #fff;
  color: var(--vermogen-kleur, #c0392b);
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  min-height: 54px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

#modal-btn-submit:hover { opacity: 0.9; }

#modal-btn-back {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 50px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}

#modal-btn-back:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Desktop 2-koloms dashboard ── */
@media (min-width: 900px) {
  #screen-result {
    max-width: 100%;
    padding: 0;
    min-height: 100dvh;
  }

  .result-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'left right';
    gap: 0;
    padding: 0;
    flex: 1;
    min-height: 100dvh;
    padding-bottom: 0;
  }

  .result-left {
    grid-area: left;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
  }

  .result-right {
    grid-area: right;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background: rgba(0, 0, 0, 0.12);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 100dvh;
  }

  .result-right h2 {
    font-size: 22px;
    text-align: center;
    opacity: 0.75;
    font-weight: 700;
    letter-spacing: 0;
    align-self: stretch;
  }

  .hero-panel {
    flex-direction: column;
    flex: 1;
    height: auto;
    background: none;
    padding: 0;
    width: 100%;
    align-items: center;
    gap: 20px;
  }

  .hero-chart-wrap {
    max-width: 100%;
    width: 100%;
    flex: 1;
    height: 0;
    min-height: 220px;
  }

  .hero-score {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .hero-avg {
    font-size: clamp(72px, 9vw, 108px);
    letter-spacing: -4px;
  }

  .hero-avg-label {
    font-size: 13px;
    opacity: 0.6;
    text-align: left;
  }

  .charts-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    flex: 1;
  }

  .chart-item {
    height: 100%;
  }

  .chart-canvas-wrap {
    flex: 1;
    height: 0;
    min-height: 120px;
  }

  .result-actions {
    margin-top: 4px;
  }
}

/* ── Print ── */
@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #c0392b !important;
    display: block;
    min-height: auto;
    overflow: visible;
  }

  #screen-start,
  #screen-question,
  #modal-submit { display: none !important; }

  #screen-result {
    display: block !important;
    max-width: 100%;
    padding: 0;
  }

  /* Enkelvoudige kolom — volledig gebruik van paginabreedte */
  .result-cols {
    display: block !important;
    padding: 32px;
    min-height: auto;
  }

  /* Totaalprofiel bovenaan op volle breedte */
  .result-right {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 28px 32px 24px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .result-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  h2 { color: #fff; font-size: 24px; text-align: center; margin: 0; }

  .section-label {
    color: rgba(255, 255, 255, 0.75);
    opacity: 1;
    font-size: 13px;
    margin-bottom: 0;
  }

  /* Hero radar: groot en goed leesbaar */
  .hero-panel {
    background: none;
    flex-direction: column;
    padding: 0;
    height: auto;
    gap: 16px;
    width: 100%;
  }

  .hero-chart-wrap {
    width: 100%;
    max-width: 100%;
    height: 360px;
    position: relative;
  }

  .hero-score { flex-direction: row; align-items: baseline; gap: 10px; }
  .hero-avg { color: #fff; font-size: 64px; letter-spacing: -2px; }
  .hero-avg-denom { color: rgba(255, 255, 255, 0.45); font-size: 32px; }
  .hero-avg-label { color: rgba(255, 255, 255, 0.65); font-size: 15px; }

  /* Vermogenskaarten: volle breedte zodat spinnenwebben groot zijn */
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .chart-item {
    padding: 24px 28px 20px;
    gap: 14px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .chart-item-name { color: #fff; font-size: 15px; font-weight: 700; }

  .chart-canvas-wrap {
    height: 320px;
    position: relative;
  }

  .chart-item-score { color: #fff; font-size: 26px; }
  .chart-item-score-max { font-size: 13px; }

  /* Verberg actieknoppen */
  .result-actions { display: none !important; }
}
