:root {
  --blue-50: #f2f9fd;
  --blue-100: #dff1fa;
  --blue-300: #65b7de;
  --blue-500: #2386b7;
  --blue-700: #126083;
  --ink: #173545;
  --muted: #4c6470;
  --border: #c9e4f1;
  --white: #ffffff;
  --warning-bg: #fff7e6;
  --warning-border: #d18b00;
  --success-bg: #eefbf3;
  --success-border: #2c9a5f;
  --shadow: 0 16px 35px rgba(18, 96, 131, 0.12);
  --radius: 1.25rem;
  --focus: #102a3a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-50) 0%, #ffffff 45%, var(--blue-50) 100%);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-700); font-weight: 700; }
a:hover { color: var(--ink); }

.wrap {
  width: min(100% - 2rem, 1040px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: .75rem 1rem;
  border-radius: .75rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  padding: 1.75rem 0 2.5rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, .16), transparent 32%),
    linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 100%);
  color: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .eyebrow,
.site-header .hero-copy p:last-child {
  color: var(--white);
}

.site-header .hero-copy p:last-child {
  opacity: .96;
}

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--blue-700);
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 .75rem;
}

h1 { font-size: clamp(2rem, 8vw, 4.25rem); max-width: 900px; }
h2 { font-size: clamp(1.55rem, 5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 4vw, 1.6rem); }

.hero-copy p:last-child { max-width: 760px; font-size: 1.05rem; color: var(--muted); }

.page-shell {
  padding: 1.25rem 0 3rem;
}

.notice-card,
.quiz-card,
.results-card,
.send-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice-card {
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: .45rem solid var(--blue-500);
}
.notice-card p { margin-bottom: 0; color: var(--muted); }

.quiz-card,
.results-card {
  padding: 1rem;
}

.quiz-topline {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.progress-wrap {
  min-width: min(100%, 280px);
  font-weight: 800;
  color: var(--blue-700);
}

.progress-track {
  height: .65rem;
  margin-top: .5rem;
  background: var(--blue-100);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  width: 16.666%;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-300));
  transition: width .25s ease;
}

.step { display: none; }
.step.is-active { display: block; }

.help-text { margin: -.25rem 0 1rem; color: var(--muted); }

.option-grid {
  display: grid;
  gap: .75rem;
}

.check-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  padding: .9rem;
  min-height: 54px;
  border: 2px solid var(--border);
  border-radius: 1rem;
  background: var(--blue-50);
  cursor: pointer;
  font-weight: 700;
}

.check-card:hover { border-color: var(--blue-500); background: #ffffff; }
.check-card:has(input:checked) { border-color: var(--blue-700); background: var(--blue-100); }

input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--blue-700);
  margin-top: .1rem;
}

input[type="text"], input[type="tel"], input[type="email"] {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .85rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: .8rem;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.form-alert {
  padding: .85rem 1rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: .8rem;
  font-weight: 700;
}

.quiz-controls {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.25rem;
}

.button {
  appearance: none;
  border: 2px solid var(--blue-700);
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  padding: .9rem 1.15rem;
  min-height: 48px;
  cursor: pointer;
  text-align: center;
}

.button:hover { background: var(--ink); border-color: var(--ink); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-secondary { background: var(--white); color: var(--blue-700); }
.button-secondary:hover { color: var(--white); }

.results-card {
  margin-top: 1.25rem;
}

.result-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

#resultLead { color: var(--muted); font-size: 1.05rem; }

.result-details {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.kit-panel,
.review-panel,
.summary-box,
.next-steps {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--blue-50);
}

.review-panel {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.kit-panel h3,
.review-panel h3,
.next-steps h3,
.send-card h3 { margin-bottom: .45rem; }

.kit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .85rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--blue-700);
  font-weight: 800;
  font-size: .88rem;
}

.summary-box {
  margin: 1rem 0;
  color: var(--muted);
}
.summary-box ul { margin: .5rem 0 0; padding-left: 1.2rem; }

.next-steps {
  background: #ffffff;
  margin: 1rem 0;
}
.next-steps li + li { margin-top: .5rem; }

.send-card {
  margin-top: 1rem;
  padding: 1rem;
}

.field-grid {
  display: grid;
  gap: .9rem;
  margin: 1rem 0;
}

.field-grid label,
.consent-line {
  font-weight: 800;
}

.field label {
  display: block;
}

.field-error {
  margin: .35rem 0 0;
  color: #8a1f11;
  font-size: .92rem;
  font-weight: 800;
}

.field-error:empty {
  display: none;
}

input[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .16);
}

.consent-wrapper {
  margin: 1rem 0;
}

.consent-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .65rem;
  align-items: start;
  margin: 0;
}

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.send-status {
  margin: .85rem 0 0;
  font-weight: 800;
}
.send-status.success,
.send-status.error {
  padding: .8rem 1rem;
  border-radius: .8rem;
}
.send-status.success {
  color: #155c36;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}
.send-status.error {
  color: #8a1f11;
  background: #fff1ef;
  border: 1px solid #b42318;
}
.send-status:empty { display: none; }

.restart-button { margin-top: 1rem; }

.site-footer {
  padding: 1.5rem 0;
  background: var(--ink);
  color: var(--white);
}
.site-footer a { color: #ffffff; }
.site-footer p { margin: 0; }

@media (min-width: 640px) {
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-controls { flex-direction: row; justify-content: space-between; }
  .field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .site-header { padding: 2.25rem 0 3.25rem; }
  .page-shell { padding-top: 2rem; }
  .notice-card, .quiz-card, .results-card, .send-card { padding: 1.4rem; }
  .quiz-topline { grid-template-columns: 1fr auto; align-items: center; }
  .option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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