:root {
  --bg: #E5EBF2;
  --bg-2: #D8DFE8;
  --card: #E5EBF2;
  --card-border: rgba(1, 77, 137, 0.18);
  --primary: #014D89;
  --primary-soft: #014D89;
  --text: #014D89;
  --muted: #4A7FA5;
  --danger: #d94456;
  --amber: #c97b00;
  --green: #0d9f6e;
  --red: #d94456;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: #E5EBF2;
  height: 100vh;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

body.in-iframe {
  height: auto;
  overflow: visible;
}

body.in-iframe .hero,
body.in-iframe .card {
  height: auto;
  min-height: unset;
  overflow: visible;
}

.background-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(1, 77, 137, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 77, 137, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 90%);
  opacity: 0.5;
}

.app-shell {
  width: 100%;
  height: 100%;
  margin: 0;
  display: block;
  position: relative;
  z-index: 1;
}

.hero,
.card {
  border: none;
  background: var(--card);
  border-radius: 0;
  padding: 40px 64px;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Gate and lead form — center vertically + horizontally */
#gateSection,
#leadSection {
  justify-content: safe center;
  align-items: center;
}

#leadSection > * {
  width: 100%;
  max-width: 600px;
}

/* Hero vertically + horizontally centered */
.hero { justify-content: safe center; align-items: center; }

/* Question section: horizontally + vertically centered */
#questionnaireSection {
  justify-content: safe center;
  align-items: center;
}

#questionnaireSection > * {
  width: 100%;
  max-width: 720px;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 10px 0 12px;
  font-family: "Orbitron", sans-serif;
}

h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
}

p {
  line-height: 1.55;
}

.hero-problem,
.hero-promise,
.hero-proof {
  margin: 8px 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.hero-badges span {
  border: 1px solid rgba(1, 77, 137, 0.25);
  background: rgba(1, 77, 137, 0.08);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.87rem;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(1, 77, 137, 0.3);
}

.btn-ghost {
  color: var(--text);
  background: rgba(1, 77, 137, 0.06);
  border: 1px solid rgba(1, 77, 137, 0.25);
}

#startScanBtn { min-width: 220px; padding: 15px 32px; font-size: 1rem; }
@media (max-width: 600px) { #startScanBtn { width: 100%; } }

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.hidden {
  display: none;
}

.progress-wrap {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(1, 77, 137, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #40e7a2, #6dceff);
  transition: width 0.35s ease;
}

.pillar {
  display: none;
}

.answer-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.answer-option {
  border: 1px solid rgba(1, 77, 137, 0.18);
  background: rgba(1, 77, 137, 0.04);
  color: var(--text);
  text-align: left;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.02rem;
  line-height: 1.45;
}

.answer-option[aria-checked="true"] {
  border-color: var(--primary-soft);
  background: rgba(1, 77, 137, 0.12);
  box-shadow: inset 0 0 0 1px rgba(1, 77, 137, 0.2);
}

.question-head h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.4;
  margin: 0;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .question-head h2 { font-size: 1.05rem; }
  .answer-grid { gap: 8px; margin: 14px 0; }
  .answer-option { padding: 10px 12px; font-size: 0.88rem; gap: 9px; }
  .answer-label { width: 23px; height: 23px; font-size: 0.58rem; }
}

#gateSection {
  align-items: center;
}

#gateSection > * {
  width: 100%;
  max-width: 560px;
}

.preview-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 28px;
}

.preview-list li {
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid rgba(1,77,137,0.15);
  border-radius: 10px;
  background: rgba(1,77,137,0.04);
  font-size: 0.95rem;
  color: var(--muted);
}

.preview-list li::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 700;
}

#toLeadFormBtn {
  width: 100%;
  max-width: 560px;
  padding: 15px 32px;
  font-size: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid rgba(1, 77, 137, 0.25);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
}

select option {
  background: #ffffff;
  color: #014D89;
}

.check {
  margin-top: 14px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.form-error {
  color: var(--danger);
  margin-top: 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.tab {
  background: rgba(1, 77, 137, 0.06);
  color: var(--text);
  border: 1px solid rgba(1, 77, 137, 0.18);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.tab.is-active {
  border-color: #0d9f6e;
  background: rgba(0, 160, 100, 0.12);
  color: #065f46;
}

.level-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.level-1 {
  background: rgba(220, 50, 50, 0.12);
  color: #9b1c1c;
}

.level-2 {
  background: rgba(200, 140, 0, 0.14);
  color: #7a4f00;
}

.level-3 {
  background: rgba(0, 160, 100, 0.12);
  color: #065f46;
}

.level-4 {
  background: rgba(1, 77, 137, 0.12);
  color: #014D89;
}

.level-5 {
  background: rgba(100, 50, 200, 0.12);
  color: #4c1d95;
}

.maturity-dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.dimension {
  background: rgba(1, 77, 137, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
}

.dimension strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.dimension p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .maturity-dimensions {
    grid-template-columns: 1fr;
  }
  .hero, .card { padding: 28px 20px; min-height: unset; }
}

.pillar-detail {
  margin-bottom: 14px;
}

.pillar-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.pillar-detail-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.pillar-score {
  font-size: 0.85rem;
  color: var(--muted);
}

.pillar-bar-track {
  height: 6px;
  background: rgba(1, 77, 137, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.pillar-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-soft), #8a5aff);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.next-steps {
  padding-left: 1.2rem;
  line-height: 2;
}

/* ── Maturity Staircase ── */
.maturity-staircase {
  margin: 28px 0;
}

.staircase-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.staircase-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: 44px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.staircase-bars .stair-col {
  flex: 0 0 18%;
  min-width: 140px;
}

.stair-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stair-bar-wrap {
  position: relative;
  width: 100%;
}

.stair-you-arrow {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(78, 90, 255, 0.95);
  border-radius: 999px;
  padding: 4px 12px;
  pointer-events: none;
  z-index: 2;
}

.stair-step-arrow {
  position: absolute;
  top: 8px;
  right: -14px;
  width: 22px;
  height: 22px;
  background: rgba(210, 60, 40, 0.9);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.stair-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 5px 8px;
  gap: 2px;
  transition: box-shadow 0.3s ease;
}

.stair-past .stair-bar {
  opacity: 0.45;
}

.stair-num {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.stair-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  padding: 0 2px;
  flex-shrink: 0;
}

.stair-dims {
  width: 100%;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stair-dim {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px 4px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 4px;
}

.dim-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.dim-val {
  font-size: 0.68rem;
  line-height: 1.3;
  opacity: 0.9;
}

.stair-footer-label {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.reflections-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 8px;
}

.voorop-block {
  background: rgba(1, 77, 137, 0.04);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--primary-soft);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.voorop-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
}

.reflections-heading {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.reflections-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.reflections-list li {
  background: rgba(1, 77, 137, 0.04);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--primary-soft);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.strengths-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.strengths-list li {
  font-size: 0.9rem;
  color: var(--green);
}

.strengths-list li::before {
  content: "✓ ";
  font-weight: 700;
}

.result-cta-wrap {
  margin-top: 18px;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(1, 77, 137, 0.12);
  padding: 10px;
  font-size: 0.88rem;
}

.raw-wrap {
  margin-top: 16px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  background: rgba(1, 77, 137, 0.05);
  border: 1px solid rgba(1, 77, 137, 0.2);
  border-radius: 10px;
  padding: 10px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.card {
  animation: riseIn 0.45s ease;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(980px, 95vw);
    margin-top: 18px;
  }

  .hero,
  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .question-actions {
    flex-direction: column-reverse;
  }

  .question-actions .btn {
    width: 100%;
  }
}

/* ── Hero two-column grid ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 1100px;
}

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { display: none; }
}

/* ── Hero tiles (optie 2) ── */
.hero-tiles {
  display: flex;
  gap: 10px;
  margin: 22px 0 28px;
  flex-wrap: wrap;
}

.hero-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(1,77,137,0.06);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  flex: 1;
  min-width: 80px;
}

@media (max-width: 480px) {
  .hero-tile { flex: 1 1 100%; }
}

.hero-tile svg { flex-shrink: 0; stroke: var(--primary-soft); }
.hero-tile strong { display: block; font-size: 0.88rem; color: var(--text); line-height: 1.2; }
.hero-tile span { display: block; font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ── Pillar chips (optie 1) ── */
.pillar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.pillar-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(78,90,255,0.1);
  border: 1px solid rgba(78,90,255,0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.pillar-chip svg { stroke: var(--primary-soft); flex-shrink: 0; }

/* ── Preview card (optie 6) ── */
.preview-card {
  position: relative;
  background: rgba(1,77,137,0.05);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  overflow: hidden;
  user-select: none;
}

.preview-caption {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}

.preview-level-pill {
  display: inline-block;
  background: rgba(45,209,155,0.22);
  color: #d4fff0;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
  filter: blur(4px);
}

.preview-score {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 4px 0 14px;
  color: var(--text);
  filter: blur(6px);
  pointer-events: none;
}

.preview-score span { font-size: 1.2rem; opacity: 0.7; }

.preview-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  filter: blur(2.5px);
}

.preview-bar-row { display: flex; align-items: center; gap: 10px; }
.preview-bar-row > span { font-size: 0.68rem; color: var(--muted); width: 82px; flex-shrink: 0; }

.preview-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(1,77,137,0.12);
  border-radius: 999px;
  overflow: hidden;
}

.preview-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-soft), #8a5aff);
  border-radius: 999px;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(to bottom, rgba(229,235,242,0.25), rgba(229,235,242,0.82));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: default;
}

.preview-overlay svg { stroke: var(--primary-soft); }

/* ── Question dots (optie 4) ── */
.question-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-bottom: 18px;
}

.qdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(1,77,137,0.12);
  border: 1.5px solid rgba(1,77,137,0.25);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  flex-shrink: 0;
}

.qdot-done { background: var(--primary-soft); border-color: var(--primary-soft); }

.qdot-current {
  background: transparent;
  border-color: var(--primary-soft);
  box-shadow: 0 0 7px rgba(78,90,255,0.7);
  transform: scale(1.4);
}

/* ── Answer labels A/B/C/D (optie 3) ── */
.answer-option { display: flex; align-items: flex-start; gap: 12px; }

.answer-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(1,77,137,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-top: 1px;
}

.answer-option[aria-checked="true"] .answer-label {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  color: #fff;
}

.answer-text { flex: 1; line-height: 1.45; }

/* ── Preview card v2 – staircase ── */
.preview-staircase-mini {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding-top: 24px;
  margin-bottom: 0;
}

.psm-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.psm-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: rgba(1,77,137,0.12);
  border: 1px solid rgba(1,77,137,0.22);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
  transition: box-shadow 0.3s;
}

.psm-h1 { height: 36px; }
.psm-h2 { height: 56px; }
.psm-h3 { height: 76px; }
.psm-h4 { height: 96px; }
.psm-h5 { height: 116px; }

.psm-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(1,77,137,0.5);
}

.psm-active .psm-bar {
  background: rgba(1,77,137,0.28);
  border-color: var(--primary-soft);
  box-shadow: 0 0 16px rgba(1,77,137,0.2);
}

.psm-active .psm-label { color: var(--primary); }

.psm-you {
  font-size: 0.6rem;
  color: var(--primary-soft);
  font-weight: 700;
  white-space: nowrap;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.preview-divider {
  height: 1px;
  background: rgba(1,77,137,0.12);
  margin: 12px 0;
}

.preview-audit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.73rem;
  font-weight: 700;
}

.pill-advanced { background: rgba(0,160,100,0.12);  color: #065f46; }
.pill-mid      { background: rgba(1,77,137,0.12);   color: #014D89; }

.preview-audit-score {
  font-family: "Orbitron", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  filter: blur(6px);
  pointer-events: none;
  line-height: 1;
}

.preview-audit-score sup { font-size: 0.9rem; opacity: 0.7; }
