:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-2: #111c33;
  --surface: rgba(248, 250, 252, 0.075);
  --surface-strong: rgba(248, 250, 252, 0.12);
  --text: #f8fafc;
  --muted: #b8c3d8;
  --faint: #7f8da6;
  --line: rgba(248, 250, 252, 0.16);
  --accent: #f59e0b;
  --accent-strong: #fbbf24;
  --danger: #f87171;
  --ok: #34d399;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding-block: 88px;
}

.section-bleed {
  position: relative;
  overflow: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 8px;
  color: var(--accent-strong);
  font-weight: 900;
}

.brand--hero {
  margin-bottom: 56px;
}

.hero {
  min-height: 720px;
  padding-block: 44px 84px;
}

.hero__background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.46) 100%),
    url("/assets/hero-civic-records.png") right center / cover no-repeat;
  opacity: 0.95;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: end;
  min-height: 590px;
}

.hero__copy {
  min-width: 0;
}

.hero h1,
.page-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.hero__lede,
.page-hero p {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.hero__actions,
.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.mobile-break {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 20px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

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

.button--primary {
  background: var(--accent);
  color: #111827;
}

.button--ghost {
  border-color: var(--line);
  background: rgba(248, 250, 252, 0.04);
  color: var(--text);
}

.button--small {
  min-height: 42px;
  padding-inline: 14px;
}

.quiz-preview {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quiz-preview__topline,
.footer,
.simple-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.quiz-preview__topline {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.quiz-preview__question {
  margin-top: 34px;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.15;
}

.quiz-preview__paths {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.quiz-preview__paths span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.quiz-preview__meter {
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.1);
}

.quiz-preview__meter span {
  display: block;
  width: 64%;
  height: 100%;
  background: var(--accent);
}

.quiz-preview p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: -36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  position: relative;
  z-index: 2;
}

.trust-item {
  display: flex;
  min-height: 98px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-2);
  color: var(--text);
  font-weight: 800;
}

.trust-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 76px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.split p,
.final-cta p,
.timeline p,
.info-band p,
.legal-page p {
  color: var(--muted);
}

.path-list {
  display: grid;
  gap: 14px;
}

.path-list article,
.step-grid article,
.info-band,
.quiz-card,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.path-list article {
  padding: 22px;
}

.path-list p,
.step-grid p {
  margin-bottom: 0;
}

.section--muted {
  background: rgba(248, 250, 252, 0.035);
  border-block: 1px solid rgba(248, 250, 252, 0.08);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.step-grid article {
  min-height: 220px;
  padding: 22px;
}

.step-grid span,
.timeline span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-strong);
  font-weight: 900;
}

.final-cta {
  text-align: center;
}

.final-cta p {
  max-width: 620px;
  margin: 18px auto 0;
}

.final-cta .button {
  margin-top: 28px;
}

.footer {
  min-height: 96px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}

.footer nav {
  display: flex;
  gap: 18px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.simple-header {
  min-height: 84px;
}

.page {
  padding-block: 52px 88px;
}

.page-hero {
  padding-block: 44px 56px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  margin-bottom: 0;
}

.timeline h2 {
  font-size: 26px;
}

.info-band {
  margin-top: 40px;
  padding: 28px;
}

.admin-page {
  padding-top: 34px;
}

.admin-hero {
  padding-bottom: 34px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-card {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.admin-card h2,
.admin-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.admin-card p,
.admin-panel p,
.metric-list span {
  margin: 0;
  color: var(--muted);
}

.admin-panel {
  margin-top: 18px;
  padding: 26px;
}

.admin-panel--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.metric-list {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding-left: 22px;
}

.metric-list li {
  padding-left: 8px;
}

.metric-list strong,
.metric-list span {
  display: block;
}

.metric-list strong {
  color: var(--text);
}

.legal-page {
  max-width: 760px;
  padding-block: 54px 90px;
}

.legal-page h1 {
  margin: 0 0 28px;
  font-size: 48px;
  line-height: 1;
}

.quiz-shell {
  display: grid;
  width: min(860px, calc(100% - 40px));
  min-height: calc(100vh - 180px);
  align-items: start;
  margin: 0 auto;
  padding: 28px 0 70px;
}

.quiz-card,
.result-panel {
  padding: clamp(22px, 5vw, 42px);
  box-shadow: var(--shadow);
}

.quiz-card__intro p:first-child {
  margin-top: 0;
  color: var(--muted);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.12);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.progress-text,
.field-note {
  color: var(--faint);
  font-size: 14px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-step {
  display: none;
}

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

legend {
  margin-bottom: 18px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

label,
.question {
  display: block;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 850;
  line-height: 1.08;
}

input,
select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 15px;
  background: rgba(2, 6, 23, 0.44);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.35);
  outline-offset: 3px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.choice-grid--wide {
  grid-template-columns: repeat(3, 1fr);
}

.choice-grid label,
.check-row {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: rgba(248, 250, 252, 0.05);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.choice-grid input,
.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.form-error {
  min-height: 24px;
  color: var(--danger);
  font-weight: 800;
}

.result-panel {
  margin-top: 22px;
}

.result-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.result-panel p,
.result-panel li {
  color: var(--muted);
}

.sync-status {
  margin-top: 18px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--text) !important;
  font-weight: 800;
}

.result-tag {
  display: inline-flex;
  margin-bottom: 20px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .shell {
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
  }

  .hero {
    min-height: auto;
    padding-block: 28px 70px;
  }

  .hero__background {
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.94) 54%, #0f172a 100%),
      url("/assets/hero-civic-records.png") center top / cover no-repeat;
  }

  .brand--hero {
    margin-bottom: 88px;
  }

  .hero__grid,
  .split,
  .step-grid,
  .admin-grid,
  .admin-panel--split {
    grid-template-columns: 1fr;
  }

  .hero__grid {
    min-height: auto;
    gap: 32px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 9.4vw, 44px);
    line-height: 1.04;
  }

  .hero__copy {
    width: 320px;
    max-width: 320px;
  }

  .mobile-break {
    display: block;
  }

  .hero__lede {
    max-width: 320px;
    font-size: 18px;
  }

  .hero__actions {
    width: 320px;
    max-width: 320px;
  }

  .hero__actions .button {
    flex: 1 1 100%;
    width: 100%;
  }

  .quiz-preview {
    display: none;
  }

  .trust-strip,
  .choice-grid,
  .choice-grid--wide {
    grid-template-columns: 1fr;
  }

  .trust-item {
    min-height: 74px;
  }

  .section {
    padding-block: 62px;
  }

  .section-heading,
  .footer,
  .simple-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .simple-header {
    justify-content: center;
  }

  .footer {
    justify-content: center;
    padding-block: 22px;
  }

  .timeline article {
    grid-template-columns: 1fr;
  }
}
