:root {
  --ink: #05274c;
  --ink-soft: #52657a;
  --paper: #f7f5f1;
  --white: #ffffff;
  --line: #e1e5ea;
  --accent: #05274c;
  --accent-dark: #031c37;
  --structure: #e1e5ea;
  --structure-dark: #c9d0d9;
  --gold: #c38b40;
  --danger: #a13d35;
  --shadow: 0 18px 55px rgba(5, 39, 76, 0.08);
  --radius-lg: 10px;
  --radius-md: 7px;
  --content: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 99; background: var(--ink); color: white; padding: .8rem 1rem; }
.skip-link:focus { top: 1rem; }
.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; }

.site-header, .site-footer {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { min-height: 132px; }
.site-footer { width: 100%; padding: 2rem max(calc((100% - var(--content)) / 2), 1rem) 3rem; color: rgba(255,255,255,.68); background: var(--ink); font-size: .86rem; }
.site-footer a { color: white; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 150px; height: auto; }
.footer-logo { display: block; width: 132px; height: auto; }
.footer-meta { display: flex; align-items: center; gap: 1.5rem; }
.header-note { font-size: .78rem; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; }

#app { width: min(calc(100% - 2rem), var(--content)); margin: 1rem auto 4rem; min-height: calc(100vh - 190px); }
.screen { animation: rise .42s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: clamp(1.35rem, 4vw, 4.25rem); }
.hero { min-height: 640px; display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(280px, .58fr); }
.hero-copy { padding: clamp(2rem, 5.2vw, 5.3rem); display: flex; flex-direction: column; justify-content: center; }
.hero-art { position: relative; background: var(--ink); min-height: 310px; overflow: hidden; color: rgba(255,255,255,.28); }
.hero-art-label { position: absolute; top: 3rem; left: 2.5rem; color: white; display: grid; gap: .35rem; font-family: Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.hero-art-label span { color: var(--gold); font-weight: 800; }
.route-map { position: absolute; left: 0; right: 0; bottom: 1.4rem; height: 44%; }
.route-map svg { width: 100%; height: 100%; overflow: visible; }
.route-map path { stroke-linecap: square; stroke-linejoin: miter; }
.route-point { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #8190a1; transform: translate(-50%, -50%); }
.route-point-one { left: 20%; top: 52%; }
.route-point-two { left: 49.4%; top: 53%; }
.route-point-active { left: 80.8%; top: 32%; width: 9px; height: 9px; background: var(--gold); box-shadow: 0 0 0 3px rgba(195,139,64,.16); }
.route-label { position: absolute; color: white; left: 2.5rem; bottom: 10.5rem; width: 220px; font-family: Montserrat, sans-serif; font-size: 1.35rem; font-weight: 700; line-height: 1.18; }
.eyebrow { margin: 0 0 .75rem; color: var(--gold); font-family: Montserrat, sans-serif; font-size: .72rem; letter-spacing: .17em; font-weight: 700; text-transform: uppercase; }
h1, h2, h3 { font-family: Montserrat, sans-serif; }
h1, h2 { margin: 0; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 5.2vw, 4.65rem); max-width: 14ch; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); }
h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-soft); max-width: 67ch; }
.hero .lede { max-width: 54ch; }
.meta-list { display: flex; gap: 1rem; flex-wrap: wrap; padding: 0; margin: 1.5rem 0 2rem; list-style: none; color: var(--ink-soft); font-size: .92rem; }
.meta-list li { display: flex; align-items: center; gap: .45rem; }
.meta-list li::before { content: ""; width: 16px; height: 2px; background: var(--gold); }
.button-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.button { appearance: none; border: 0; border-radius: 4px; padding: .88rem 1.25rem; min-height: 50px; display: inline-flex; justify-content: center; align-items: center; gap: .65rem; font-family: Montserrat, sans-serif; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--ink); box-shadow: none; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { color: var(--ink); background: white; }
.button-quiet { color: var(--ink); background: var(--paper); border: 1px solid var(--line); }

.progress-wrap { margin-bottom: 2rem; }
.progress-head { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-soft); font-size: .82rem; margin-bottom: .65rem; }
.progress-track { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--gold); transition: width .35s ease; }
.step-dots { display: flex; gap: .5rem; }
.step-dots span { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--structure-dark); }
.step-dots .done { background: var(--ink); border-color: var(--ink); }
.step-dots .active { background: var(--gold); border-color: var(--gold); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; margin-top: 2rem; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 720; margin-bottom: .45rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"] { width: 100%; border: 1px solid var(--structure-dark); border-radius: 4px; background: white; padding: .88rem 1rem; color: var(--ink); }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(195,139,64,.18); outline: 0; }
.field input[aria-invalid="true"] { border-color: var(--danger); background: #fff9f7; }
.field-help { color: var(--ink-soft); font-size: .82rem; margin: .4rem 0 0; }
.data-context { color: var(--ink-soft); font-size: .9rem; margin: 1rem 0 0; padding: .9rem 1rem; border-left: 3px solid var(--gold); background: var(--paper); }
.error-text { color: var(--danger); font-weight: 680; font-size: .85rem; margin: .35rem 0 0; }
.notice { padding: 1rem 1.1rem; border-radius: 4px; background: var(--paper); border: 1px solid rgba(195,139,64,.7); border-left: 4px solid var(--gold); margin-top: 1rem; }
.notice strong { display: block; }
.notice .button-row { margin-top: .75rem; }
.consent-block { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 2rem; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; align-items: start; margin: 1rem 0; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin-top: .15rem; }
.check span { color: var(--ink-soft); }
.check strong { color: var(--ink); }

.scale-guide { display: grid; grid-template-columns: repeat(5, 1fr); gap: .65rem; margin: 2rem 0; }
.scale-card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1rem; }
.scale-card strong { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--ink); border-radius: 2px; margin-bottom: .75rem; font-family: Montserrat, sans-serif; }
.scale-card p { margin: 0; color: var(--ink-soft); font-size: .87rem; }

.questions { display: grid; gap: 1rem; margin-top: 2rem; }
.question { border: 1px solid var(--line); border-radius: var(--radius-md); padding: clamp(1rem, 2.2vw, 1.55rem); background: white; border-left: 4px solid var(--structure); }
.question.invalid { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(166,60,43,.08); }
.question-code { color: var(--gold); letter-spacing: .12em; font-family: Montserrat, sans-serif; font-weight: 700; font-size: .7rem; }
.question-text { font-size: 1.03rem; font-weight: 680; margin: .35rem 0 1rem; max-width: 80ch; }
.score-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.score-options input { position: absolute; opacity: 0; pointer-events: none; }
.score-options label { min-height: 48px; display: grid; place-items: center; border: 1px solid var(--structure-dark); border-radius: 3px; font-family: Montserrat, sans-serif; font-weight: 800; background: var(--paper); transition: .15s ease; }
.score-options label:hover { border-color: var(--ink); background: var(--structure); }
.score-options input:checked + label { color: var(--ink); border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 2px white; transform: translateY(-2px); }
.score-options input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.score-ends { display: flex; justify-content: space-between; gap: 1rem; margin-top: .45rem; color: var(--ink-soft); font-size: .73rem; }
.score-help { margin: 1.2rem 0 0; }
details.score-help summary { cursor: pointer; font-weight: 750; color: var(--ink-soft); }
details.score-help .scale-guide { margin: 1rem 0 0; }

.review-list, .next-steps { display: grid; gap: .75rem; margin: 2rem 0; }
.review-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.review-row span { color: var(--ink-soft); }
.text-button { border: 0; background: none; color: var(--ink); text-decoration: underline; font-weight: 700; padding: .4rem; }
.next-step { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.next-step:last-child { border-bottom: 0; }
.next-step b { width: 38px; height: 38px; border-radius: 3px; background: var(--gold); display: grid; place-items: center; font-family: Montserrat, sans-serif; }
.next-step p { margin: .25rem 0 0; color: var(--ink-soft); }
.success-card { background: var(--ink); color: white; }
.success-card .card-body { max-width: 800px; }
.success-card .eyebrow { color: var(--gold); }
.success-card .lede, .success-card .next-step p { color: #dce7e4; }
.success-card .next-step { border-color: rgba(255,255,255,.14); }
.success-card .next-step b { color: var(--ink); }
.success-card .button-secondary { background: white; }
.submit-status { display: inline-flex; gap: .65rem; align-items: center; color: var(--ink-soft); font-weight: 700; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 240px; }
  .hero-art-label { top: 1.5rem; left: 1.5rem; }
  .route-label { left: 1.5rem; bottom: 4.5rem; font-size: 1.15rem; }
  .route-map { height: 62%; bottom: -.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .scale-guide { grid-template-columns: 1fr; }
  details.score-help .scale-guide { grid-template-columns: 1fr; }
  .header-note { display: none; }
}

@media (max-width: 520px) {
  #app, .site-header, .site-footer { width: min(calc(100% - 1.1rem), var(--content)); }
  .site-header { min-height: 112px; }
  .brand img { width: 126px; }
  .footer-logo { width: 120px; }
  .site-footer, .footer-meta { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .card { border-radius: 7px; }
  .hero-copy, .card-body { padding: 1.25rem; }
  .hero { min-height: 0; }
  .meta-list { display: grid; gap: .55rem; }
  .button-row { align-items: stretch; }
  .button { width: 100%; }
  .score-options { gap: .35rem; }
  .score-options label { min-height: 50px; }
  .review-row { align-items: flex-start; }
}

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