:root {
  --navy: #061847;
  --primary: #2d5bff;
  --background: #f5f6fa;
  --surface: #ffffff;
  --text: #1b2340;
  --muted: #69718a;
  --line: #e3e6ef;
  --green: #1e9e5a;
  --orange: #e8930c;
  --red: #d64545;
  --shadow: 0 24px 80px rgba(6, 24, 71, .09);
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0%, rgba(45, 91, 255, .08), transparent 34rem),
    var(--background);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.ambient { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; opacity: .45; }
.ambient-one { width: 230px; height: 230px; background: rgba(45,91,255,.08); top: 8%; left: -150px; }
.ambient-two { width: 280px; height: 280px; background: rgba(30,158,90,.06); bottom: 2%; right: -190px; }

.survey-shell { width: min(100%, 660px); min-height: 100vh; margin: 0 auto; padding: 0 28px; position: relative; }
.screen { display: none; min-height: calc(100vh - 80px); padding: 52px 0; animation: rise .35s ease; }
.screen.active { display: flex; flex-direction: column; }
.hidden { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.progress-header { position: sticky; top: 0; z-index: 10; padding: 18px 0 10px; background: rgba(245,246,250,.9); backdrop-filter: blur(16px); }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-value { width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .3s ease; }
.progress-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 9px; font-size: 12px; color: var(--muted); }
.back-button { padding: 5px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-weight: 650; }
.back-button:hover { color: var(--navy); }

.brand-row { display: flex; align-items: center; gap: 11px; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: white; background: var(--navy); font-weight: 850; }
.brand-name { font-size: 17px; font-weight: 850; letter-spacing: .08em; }
.eyebrow { display: block; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); letter-spacing: -.025em; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.65; }

.landing-screen { justify-content: center; gap: 20px; }
.landing-screen .eyebrow { margin-top: 16px; }
.landing-screen h1 { max-width: 610px; margin-bottom: 0; font-size: clamp(34px, 8vw, 50px); line-height: 1.08; }
.landing-screen .lead { margin-bottom: 2px; }
.benefits { display: grid; gap: 12px; margin: 2px 0 6px; padding: 0; list-style: none; }
.benefits li { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.benefits li::before { content: "✓"; display: grid; place-items: center; width: 23px; height: 23px; flex: none; border-radius: 50%; color: white; background: var(--navy); font-size: 12px; }
.button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; padding: 14px 22px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 750; text-decoration: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.99); }
.button:focus-visible, .answer:focus-visible, input:focus-visible { outline: 3px solid rgba(45,91,255,.35); outline-offset: 3px; }
.button.primary { color: white; background: var(--primary); box-shadow: 0 12px 30px rgba(45,91,255,.23); }
.button.primary:hover { background: #214ce0; }
.button.secondary { color: white; background: var(--navy); }
.button[disabled] { cursor: wait; opacity: .65; transform: none; }
.microcopy { margin: -5px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.disclaimer { color: #949bb0; font-size: 11.5px; line-height: 1.55; }

.question-screen { justify-content: flex-start; padding-top: 52px; }
.question-screen h2 { margin: 10px 0 28px; font-size: clamp(25px, 5vw, 32px); line-height: 1.28; }
.answer-list { display: grid; gap: 12px; }
.answer { width: 100%; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 15px; color: var(--text); background: var(--surface); box-shadow: 0 5px 20px rgba(6,24,71,.03); text-align: left; cursor: pointer; font-weight: 650; transition: border-color .15s, transform .15s, background .15s; }
.answer:hover { border-color: var(--primary); transform: translateY(-1px); }
.answer.selected { border-color: var(--primary); background: #eef2ff; }
.question-help { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.interstitial-screen, .preview-screen, .lead-screen, .error-screen { justify-content: center; }
.notice-card { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.notice-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 18px; border-radius: 50%; color: white; background: var(--primary); font-family: Georgia, serif; font-weight: bold; }
.notice-card h2 { font-size: 25px; }
.notice-card p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.interstitial-screen .button { margin-top: 20px; }

.preview-screen { align-items: center; gap: 18px; text-align: center; }
.score-label { margin: 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.score-number { color: var(--navy); font-size: clamp(68px, 17vw, 90px); font-weight: 850; line-height: .95; letter-spacing: -.06em; }
.score-number small { color: var(--muted); font-size: 20px; letter-spacing: 0; }
.result-chip { padding: 8px 18px; border-radius: 999px; color: white; font-size: 14px; font-weight: 750; }
.focus-card { width: 100%; padding: 19px; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 14px; background: var(--surface); text-align: left; }
.focus-card strong { color: var(--navy); }
.focus-card p { margin: 6px 0 0; line-height: 1.55; }
.report-teaser { width: 100%; padding: 22px; border-radius: 16px; color: white; background: var(--navy); text-align: left; }
.report-teaser h3 { margin-bottom: 8px; color: white; }
.report-teaser p { margin-bottom: 0; color: #c9d2ec; line-height: 1.55; }
.preview-screen .button { width: 100%; }

.lead-screen h2 { margin: 10px 0 8px; font-size: 34px; }
#leadForm { margin-top: 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; color: var(--navy); font-size: 13px; font-weight: 700; }
.field input { width: 100%; padding: 14px 15px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 16px; }
.field input.invalid { border-color: var(--red); }
.privacy-text { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 13.5px; line-height: 1.5; }
.checkbox-row input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); }
#leadForm .button { width: 100%; }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 13px; }

.report-screen { gap: 24px; padding-bottom: 70px; }
.report-header { padding-bottom: 20px; border-bottom: 2px solid var(--navy); }
.report-header h1 { margin: 24px 0 8px; font-size: 32px; }
.report-date { color: var(--muted); font-size: 13px; }
.score-card { display: grid; grid-template-columns: 100px 1fr; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.score-circle { display: grid; width: 96px; height: 96px; place-content: center; border-radius: 50%; color: white; text-align: center; }
.score-circle strong { font-size: 32px; line-height: 1; }
.score-circle span { margin-top: 3px; font-size: 10px; opacity: .85; }
.score-card h2 { margin-bottom: 6px; font-size: 20px; }
.score-card p { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.flag-card { padding: 16px 18px; border: 1px solid #f2cfcf; border-radius: 13px; color: #8c2f2f; background: #fdf3f3; font-size: 13px; line-height: 1.55; }
.report-section h2 { margin-bottom: 14px; font-size: 20px; }
.risk-card { margin-bottom: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.risk-card h3 { margin-bottom: 11px; font-size: 16px; }
.risk-card p { margin-bottom: 8px; font-size: 13.5px; line-height: 1.6; }
.risk-card p:last-child { margin-bottom: 0; }
.risk-card b { color: var(--navy); }
.check-list, .action-list { display: grid; gap: 10px; padding: 0; list-style: none; counter-reset: action; }
.check-list li, .action-list li { display: flex; gap: 11px; align-items: flex-start; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); font-size: 14px; line-height: 1.55; }
.check-list li::before { content: "✓"; display: grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 50%; color: white; background: var(--green); font-size: 11px; }
.action-list li { counter-increment: action; }
.action-list li::before { content: counter(action); display: grid; place-items: center; width: 23px; height: 23px; flex: none; border-radius: 7px; color: white; background: var(--navy); font-size: 11px; font-weight: 750; }
.timeline { margin-left: 6px; border-left: 2px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 19px 21px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; top: 5px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline-date { color: var(--navy); font-size: 13px; font-weight: 750; }
.timeline-tag { margin-left: 7px; padding: 2px 7px; border-radius: 999px; color: var(--navy); background: #eaedf5; font-size: 10px; text-transform: uppercase; }
.timeline-item p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cta-card { padding: 28px 24px; border-radius: 18px; color: white; background: var(--navy); text-align: center; }
.cta-card h2 { margin-bottom: 8px; color: white; }
.cta-card p { color: #c9d2ec; line-height: 1.55; }
.cta-card .button { width: 100%; }
.report-disclaimer { margin-bottom: 0; }

.loading-screen, .error-screen { align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.loader { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-code { color: var(--primary); font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.error-screen h1 { margin: 10px 0; }

@media (max-width: 520px) {
  .survey-shell { padding: 0 20px; }
  .screen { padding: 34px 0; }
  .score-card { grid-template-columns: 82px 1fr; gap: 15px; padding: 18px; }
  .score-circle { width: 80px; height: 80px; }
}

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

@media print {
  body { background: white; }
  .ambient, .progress-header, .no-print { display: none !important; }
  .survey-shell { width: 100%; max-width: none; padding: 0; }
  .screen { display: none !important; }
  .report-screen { display: flex !important; padding: 0; animation: none; }
  .risk-card, .score-card, .check-list li, .action-list li, .cta-card { break-inside: avoid; }
  .cta-card { border: 1px solid var(--navy); color: var(--navy); background: white; }
  .cta-card h2, .cta-card p { color: var(--navy); }
  .cta-card .button { display: none; }
}
