:root {
  color-scheme: light;
  --ink: #20312f;
  --muted: #63706d;
  --teal-900: #173f3d;
  --teal-700: #285e59;
  --teal-100: #e5efec;
  --paper: #fffefb;
  --stone: #f4f1ea;
  --line: #d9dfda;
  --green: #4f7d60;
  --green-soft: #e6efe8;
  --amber: #b77b1f;
  --amber-soft: #f7ecd7;
  --coral: #c66145;
  --coral-soft: #f7e6e0;
  --blue: #477f9f;
  --violet: #725f95;
  --shadow: 0 22px 70px rgba(26, 56, 52, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 10%, rgba(79, 125, 96, 0.11), transparent 28rem),
    linear-gradient(180deg, #f8faf7 0%, #fffefb 48%, #f5f3ed 100%);
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.58;
}

button, input { font: inherit; }

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(40, 94, 89, 0.35);
  outline-offset: 4px;
}

.page-shell { min-height: 100vh; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(176px, 18vw, 220px);
  height: auto;
}

.pilot-pill {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.screen { display: none; }
.screen.active { display: block; animation: enter 420ms ease both; }

@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-screen {
  min-height: calc(100vh - 90px);
  padding: clamp(48px, 8vh, 94px) 0 80px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(52px, 8vw, 110px);
}

.intro-screen.active { display: grid; }

.eyebrow,
.section-label {
  display: block;
  margin: 0 0 11px;
  color: var(--coral);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h1 { font-size: clamp(43px, 6vw, 72px); margin-bottom: 24px; }
h2 { font-size: clamp(31px, 4vw, 46px); margin-bottom: 18px; }
h3 { font-size: 26px; margin-bottom: 12px; }

.lead { max-width: 720px; color: #44514f; font-size: clamp(18px, 2vw, 21px); }

.intro-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 650px;
  margin: 34px 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-points div { padding-right: 20px; }
.intro-points strong { display: block; color: var(--teal-700); font-family: Georgia, serif; font-size: 30px; }
.intro-points span { display: block; color: var(--muted); font-size: 14px; line-height: 1.3; }

.button {
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: 0.42; transform: none; }
.button.primary { color: white; background: var(--teal-900); box-shadow: 0 12px 26px rgba(23, 63, 61, 0.18); }
.button.primary:hover { background: #0f3230; }
.button.secondary { border-color: var(--line); color: var(--teal-900); background: white; }
.button.secondary:hover { border-color: var(--teal-700); }

.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

.intro-map {
  position: relative;
  width: min(42vw, 470px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.map-orbit {
  position: absolute;
  border: 1px solid rgba(40, 94, 89, 0.24);
  border-radius: 50%;
  inset: 8%;
}

.orbit-two { inset: 24%; border-style: dashed; transform: rotate(18deg); }
.map-centre {
  position: absolute;
  inset: 34%;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-900);
  box-shadow: var(--shadow);
}
.map-centre span { font-size: 12px; letter-spacing: .14em; }
.map-centre strong { font-family: Georgia, serif; font-size: 33px; line-height: 1; }
.map-centre small { color: #c9ddd6; font-size: 12px; }

.orbit-label {
  position: absolute;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.94);
  box-shadow: 0 7px 22px rgba(26, 56, 52, 0.07);
  font-size: 14px;
  font-weight: 800;
}
.label-one { top: 1%; left: 37%; }
.label-two { top: 26%; right: 0; }
.label-three { right: 3%; bottom: 15%; }
.label-four { bottom: 15%; left: 3%; }
.label-five { top: 30%; left: 0; }

.quiz-screen { min-height: calc(100vh - 90px); padding: 52px 0 80px; }
.quiz-screen.active { display: block; }
.quiz-topline { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 14px; }
.text-button { padding: 4px; border: 0; color: var(--teal-700); background: transparent; cursor: pointer; font-weight: 800; }
.progress-track { width: 100%; height: 8px; margin: 14px 0 44px; overflow: hidden; border-radius: 99px; background: #e5e9e5; }
.progress-track span { display: block; width: 6.66%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-700), var(--coral)); transition: width 260ms ease; }

.question-card {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(35, 75, 74, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.87);
  box-shadow: var(--shadow);
}

.question-card h2 { max-width: 740px; }
.answer-list { display: grid; gap: 11px; margin: 32px 0 26px; padding: 0; border: 0; }
.answer-option { position: relative; display: block; }
.answer-option input { position: absolute; opacity: 0; pointer-events: none; }
.answer-option span {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  font-weight: 700;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}
.answer-option span::before {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border: 2px solid #9aa6a1;
  border-radius: 50%;
  content: "";
}
.answer-option input:checked + span { border-color: var(--teal-700); background: var(--teal-100); transform: translateX(3px); }
.answer-option input:checked + span::before { border: 6px solid var(--teal-700); }
.answer-option input:focus-visible + span { outline: 3px solid rgba(40, 94, 89, 0.35); outline-offset: 3px; }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 28px; }
.question-actions p { margin: 0; color: var(--muted); font-size: 14px; }

.results-screen { padding: 54px 0 90px; }
.results-screen.active { display: block; }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; margin-bottom: 36px; }
.results-heading > div:first-child { max-width: 760px; }
.results-heading h1 { font-size: clamp(39px, 5vw, 60px); }
.results-heading p { color: var(--muted); font-size: 18px; }
.results-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.overall-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding: clamp(26px, 5vw, 50px);
  border-radius: var(--radius-lg);
  color: white;
  background: var(--teal-900);
  box-shadow: var(--shadow);
}
.overall-panel .section-label { color: #d9b786; }
.overall-panel h2 { margin-bottom: 12px; font-size: clamp(35px, 5vw, 54px); }
.overall-panel p { max-width: 760px; margin-bottom: 0; color: #dbe9e5; }
.overall-score { min-width: 130px; padding-left: 34px; border-left: 1px solid rgba(255,255,255,.24); text-align: center; }
.overall-score strong { display: block; font-family: Georgia, serif; font-size: 47px; line-height: 1; }
.overall-score span { color: #c0d5ce; font-size: 14px; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 34px; margin: 34px 0; }
.radar-panel, .score-list { border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.85); }
.radar-panel { display: grid; place-items: center; min-height: 510px; padding: 22px; }
.radar-chart { width: min(100%, 500px); height: auto; overflow: visible; }
.radar-chart .grid-ring { fill: none; stroke: #d7dfda; stroke-width: 1; }
.radar-chart .axis-line { stroke: #d7dfda; stroke-width: 1; }
#radarShape { fill: rgba(40, 94, 89, .19); stroke: var(--teal-700); stroke-width: 4; }
.radar-point { stroke: white; stroke-width: 3; }
.radar-label { fill: var(--ink); font-family: Inter, Aptos, sans-serif; font-size: 15px; font-weight: 800; }
.radar-value { fill: var(--muted); font-family: Inter, Aptos, sans-serif; font-size: 13px; }

.score-list { display: grid; align-content: center; padding: 23px; }
.score-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 13px; align-items: center; padding: 17px 5px; border-bottom: 1px solid var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--area-colour); }
.score-name { display: block; font-weight: 800; }
.score-band { display: block; color: var(--muted); font-size: 14px; }
.score-number { font-family: Georgia, serif; font-size: 24px; font-weight: 700; }

.signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.signal-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.signal-card h3 { margin-bottom: 9px; }
.signal-card p { margin-bottom: 0; color: #485653; }
.foundation-card { background: var(--green-soft); }
.foundation-card .section-label { color: var(--green); }
.pressure-card { background: var(--amber-soft); }
.pressure-card .section-label { color: #8b5e19; }

.safeguard-message { margin-top: 20px; padding: 20px 24px; border-left: 5px solid var(--coral); background: var(--coral-soft); font-weight: 700; }

.detail-section { margin-top: 78px; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 24px; }
.section-heading-row h2 { margin: 0; }
.section-heading-row > p { max-width: 360px; margin-bottom: 8px; color: var(--muted); }
.result-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.result-card { --area-colour: var(--teal-700); position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; }
.result-card::before { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--area-colour); content: ""; }
.result-card-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.result-card h3 { margin-bottom: 5px; }
.area-score { min-width: 76px; text-align: right; font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.band-badge { display: inline-flex; margin-bottom: 20px; padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.band-strong { color: #315e42; background: var(--green-soft); }
.band-watch { color: #7c5519; background: var(--amber-soft); }
.band-needs { color: #8c3d2b; background: var(--coral-soft); }
.result-card p { color: #465450; }
.result-card p:last-child { margin-bottom: 0; }
.result-card strong { color: var(--teal-900); }

.next-move, .reflection-flags, .pilot-feedback { margin-top: 34px; padding: clamp(27px, 5vw, 46px); border-radius: var(--radius-lg); }
.next-move { color: white; background: linear-gradient(135deg, var(--teal-900), #2d6963); box-shadow: var(--shadow); }
.next-move .section-label { color: #e4bb80; }
.next-move h2 { font-size: clamp(32px, 4vw, 45px); }
.next-move p { color: #dfeae7; }
.next-move .pathway { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.22); font-weight: 800; }
.reflection-flags { border: 1px solid #ecc0b3; background: var(--coral-soft); }
.reflection-flags ul { margin-bottom: 0; padding-left: 22px; }
.reflection-flags li { margin: 8px 0; }
.pilot-feedback { border: 1px solid var(--line); background: white; }
.pilot-feedback p { max-width: 800px; }
.restart-row { display: flex; justify-content: center; margin-top: 34px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  z-index: 20;
  padding: 11px 16px;
  border-radius: 99px;
  color: white;
  background: var(--teal-900);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.print-profile { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .intro-screen.active { grid-template-columns: 1fr; }
  .intro-map { width: min(88vw, 460px); order: -1; }
  .map-layout { grid-template-columns: 1fr; }
  .radar-panel { min-height: 420px; }
  .results-heading, .section-heading-row { align-items: flex-start; flex-direction: column; }
  .results-actions { justify-content: flex-start; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  main, .site-header { width: min(100% - 28px, 1180px); }
  .site-header { padding-top: 16px; }
  .brand-logo { width: 160px; }
  .intro-screen { padding-top: 28px; }
  .intro-map { width: min(84vw, 360px); }
  .orbit-label { font-size: 12px; padding: 5px 8px; }
  .intro-points { gap: 10px; }
  .intro-points div { padding-right: 0; }
  .question-card { padding: 26px 20px; border-radius: 20px; }
  .question-actions { align-items: stretch; flex-direction: column; }
  .question-actions .button { width: 100%; }
  .overall-panel { grid-template-columns: 1fr; gap: 24px; }
  .overall-score { padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,.24); border-left: 0; text-align: left; }
  .signal-grid, .result-cards { grid-template-columns: 1fr; }
  .radar-panel { min-height: auto; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@page { size: A4 portrait; margin: 12mm; }

@media print {
  body { background: white; color: #1e302d; font-size: 10.5pt; }
  .site-header, .screen, .toast, .no-print { display: none !important; }
  main { width: 100%; margin: 0; }
  .print-profile { display: block !important; }
  .print-header { display: grid; grid-template-columns: 1fr 68mm; gap: 10mm; align-items: end; padding-bottom: 5mm; border-bottom: 2px solid #234b4a; }
  .print-logo { display: block; width: 40mm; height: auto; margin-bottom: 1.5mm; }
  .print-header h1 { margin: 0; color: #173f3d; font-size: 27pt; }
  .print-header p { margin: 1mm 0 0; color: #63706d; font-size: 8.5pt; }
  .print-overall { padding: 5mm; color: white; background: #173f3d !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-overall span, .print-overall strong, .print-overall small { display: block; }
  .print-overall span { color: #d9b786; font-size: 8pt; font-weight: 800; text-transform: uppercase; }
  .print-overall strong { margin: 1mm 0; font-family: Georgia, serif; font-size: 17pt; line-height: 1.05; }
  .print-overall small { color: #dbe9e5; font-size: 8.5pt; }
  .print-intro { margin: 5mm 0; font-size: 10pt; }
  .print-overall-summary { margin: -2mm 0 5mm; color: #44514f; font-size: 9pt; line-height: 1.4; }
  .print-grid { display: grid; grid-template-columns: 102mm 1fr; gap: 7mm; align-items: center; }
  .print-map-wrap .radar-chart { width: 102mm; }
  .print-scores { border: 1px solid #d9dfda; }
  .print-score-row { display: grid; grid-template-columns: 1fr auto; gap: 3mm; padding: 2.4mm 3mm; border-bottom: 1px solid #d9dfda; }
  .print-score-row:last-child { border-bottom: 0; }
  .print-score-row strong { font-size: 9.5pt; }
  .print-score-row span { color: #63706d; font-size: 8.5pt; }
  .print-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin: 5mm 0; }
  .print-signals div { padding: 3.5mm; border: 1px solid #d9dfda; background: #f4f1ea !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-signals span, .print-signals strong { display: block; }
  .print-signals span, .print-action span { color: #63706d; font-size: 8pt; font-weight: 800; text-transform: uppercase; }
  .print-signals strong { margin-top: 1mm; color: #173f3d; font-family: Georgia, serif; font-size: 14pt; }
  .print-signals p { margin: 1.5mm 0 0; color: #44514f; font-size: 8pt; line-height: 1.3; }
  .print-action { padding: 4mm 5mm; color: white; background: #173f3d !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-action span { color: #d9b786; }
  .print-action strong { display: block; margin: 1mm 0; font-family: Georgia, serif; font-size: 14pt; }
  .print-action p { margin: 0; color: #e4efeb; font-size: 9pt; line-height: 1.35; }
  .print-pathway { margin: 2.5mm 0 0; color: #63706d; font-size: 8.5pt; line-height: 1.35; }
  .print-safeguard { margin: 3mm 0 0; padding: 3mm 4mm; border-left: 3px solid #c66145; background: #f7e6e0 !important; font-size: 9pt; line-height: 1.35; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-details { break-before: page; page-break-before: always; }
  .print-details h2, .print-flags h2 { margin: 0 0 4mm; color: #173f3d; font-size: 21pt; }
  .print-area-details { display: grid; gap: 3mm; }
  .print-area-card { padding: 3.5mm 4mm; border: 1px solid #d9dfda; border-left: 3px solid #285e59; break-inside: avoid; page-break-inside: avoid; }
  .print-area-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 4mm; margin-bottom: 1.5mm; }
  .print-area-heading h3 { margin: 0; color: #173f3d; font-size: 14pt; }
  .print-area-heading > strong { color: #63706d; font-size: 8.5pt; }
  .print-area-card p { margin: 1mm 0 0; font-size: 8.5pt; line-height: 1.35; }
  .print-flags { margin-top: 5mm; padding: 4mm 5mm; border: 1px solid #e2c6bd; background: #fff8f5 !important; break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-flags h2 { margin-bottom: 2mm; font-size: 16pt; }
  .print-flags p, .print-flags li { font-size: 8.5pt; line-height: 1.35; }
  .print-flags p { margin-bottom: 2mm; }
  .print-flags ul { margin: 0; padding-left: 5mm; }
  .print-note { margin: 4mm 0 0; color: #63706d; font-size: 7.5pt; line-height: 1.3; }
}
