:root {
  --ink: #10233f;        /* deep statutory navy */
  --ink-soft: #33465f;
  --paper: #f6f7f4;      /* cool paper white */
  --line: #d8dcd4;
  --seal: #b3372c;       /* gazette seal red — risk + stamp */
  --amber: #c98a2d;      /* file-tag amber — warn */
  --green: #2e7d5b;      /* cleared green — good */
  --white: #ffffff;
  --shadow: 0 1px 2px rgba(16,35,63,.08), 0 8px 28px rgba(16,35,63,.09);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; }

.page { max-width: 880px; margin: 0 auto; padding: 0 20px 60px; }

/* masthead */
.masthead {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1.5px solid var(--ink);
  color: var(--ink-soft);
}
.mast-right { color: var(--seal); font-weight: 500; text-align: right; }

/* live countdown — reads as a running clock, not a static day count */
.countdown { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 34px; }
.cd-num {
  font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 21px; font-weight: 500; line-height: 1.05; color: var(--seal);
}
.cd-label {
  font-family: "IBM Plex Mono", monospace; font-size: 8.5px; letter-spacing: .12em;
  color: var(--ink-soft); margin-top: 3px;
}
.cd-sep {
  font-family: "IBM Plex Mono", monospace; font-size: 19px; line-height: 1.05;
  color: var(--seal); opacity: .45; padding-bottom: 14px;
  animation: cdBlink 1s steps(1, end) infinite;
}
@keyframes cdBlink { 0%, 49% { opacity: .5; } 50%, 100% { opacity: .12; } }
.countdown.live { font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .08em; }
.countdown-cap { color: var(--ink-soft); margin-top: 5px; font-size: 9.5px; }
.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 (prefers-reduced-motion: reduce) { .cd-sep { animation: none; opacity: .35; } }
.mast-left { display: flex; flex-direction: column; gap: 2px; }
.firm { font-family: "Spectral", serif; font-weight: 700; font-size: 19px; letter-spacing: .01em; }

.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.btn-outline {
  display: inline-block; border: 1.5px solid rgba(255,255,255,.4); color: var(--white);
  font-size: 13.5px; font-weight: 500; border-radius: 4px; padding: 10px 16px;
  text-decoration: none; transition: border-color .15s ease;
}
.btn-outline:hover { border-color: var(--white); }
.btn-outline:focus-visible { outline: 2.5px solid var(--white); outline-offset: 2px; }

/* views */
.view { display: none; animation: fadeUp .45s ease both; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view, .seal-g, .bar-fill { animation: none !important; transition: none !important; }
}

/* hero */
.hero { padding: 72px 0 40px; max-width: 720px; }
.eyebrow { color: var(--ink-soft); margin-bottom: 18px; }
h1 {
  font-family: "Spectral", serif; font-weight: 600;
  font-size: clamp(34px, 5.4vw, 52px); line-height: 1.12;
  letter-spacing: -.01em; margin-bottom: 22px;
}
h1 em { font-style: italic; color: var(--seal); }
.lede { font-size: 18px; color: var(--ink-soft); margin-bottom: 32px; max-width: 640px; }
.lede strong { color: var(--ink); }
.fineprint { font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; opacity: .85; }
.fineprint.center { text-align: center; margin-top: 28px; }

.btn-primary {
  display: inline-block; background: var(--ink); color: var(--white);
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 16px;
  border: none; border-radius: 4px; padding: 14px 30px; cursor: pointer;
  text-decoration: none; transition: background .15s ease, transform .1s ease;
}
.btn-primary:hover { background: #1b3457; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--seal); outline-offset: 2px;
}
.btn-ghost {
  background: none; border: 1.5px solid var(--line); color: var(--ink-soft);
  font-weight: 600; font-size: 15px; border-radius: 4px; padding: 13px 24px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

/* hero section index — reads like a statute contents table */
.hero-sections {
  border-top: 1.5px solid var(--ink);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hero-sec {
  border-bottom: 1px solid var(--line); padding: 16px 14px 16px 0;
}
.hero-sec .mono { color: var(--seal); display: block; margin-bottom: 4px; }
.hero-sec span:last-child { font-size: 14px; font-weight: 500; }

/* quiz */
#view-quiz { padding-top: 46px; }
.progress-track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--ink); transition: width .35s ease; }
.progress-label { margin: 12px 0 8px; color: var(--seal); }
.q-section-title {
  font-family: "Spectral", serif; font-weight: 600; font-size: 28px; margin: 6px 0 26px;
}
.q-item { border-top: 1px solid var(--line); padding: 22px 0; }
.q-text { font-size: 16.5px; font-weight: 500; margin-bottom: 14px; max-width: 700px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.q-opt {
  border: 1.5px solid var(--line); background: var(--white); border-radius: 4px;
  padding: 9px 18px; font-size: 14.5px; font-weight: 500; cursor: pointer;
  color: var(--ink-soft); transition: all .12s ease;
}
.q-opt:hover { border-color: var(--ink-soft); color: var(--ink); }
.q-opt.sel { background: var(--ink); border-color: var(--ink); color: var(--white); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 34px; }

/* lead form */
#view-lead { padding-top: 56px; }
.lead-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow); padding: 42px; max-width: 720px; margin: 0 auto;
}
.lead-card h2 { font-family: "Spectral", serif; font-size: 30px; font-weight: 600; margin: 10px 0 8px; }
.lede-sm { color: var(--ink-soft); margin-bottom: 26px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 20px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
input, select {
  font-family: "Inter", sans-serif; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 4px; padding: 11px 12px; background: var(--paper);
}
input:focus, select:focus { border-color: var(--ink); }
.error { color: var(--seal); font-size: 14px; font-weight: 500; min-height: 20px; margin-bottom: 8px; }

/* consent */
.consent-box {
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  background: var(--white); border-radius: 4px;
  padding: 20px 22px; margin-bottom: 26px; max-width: 640px;
}
.lead-card .consent-box { max-width: none; background: var(--paper); margin-bottom: 18px; }
.consent-hd { color: var(--seal); margin-bottom: 8px; }
.consent-notice { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.consent-item {
  display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start;
  font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.consent-item + .consent-item { margin-top: 14px; }
.consent-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 19px; height: 19px; flex: none; margin-top: 2px;
  border: 1.5px solid var(--ink-soft); border-radius: 3px; background: var(--white);
  cursor: pointer; position: relative; padding: 0;
}
.consent-item input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
.consent-item input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5.5px; top: 1.5px;
  width: 5px; height: 10px; border: solid var(--white);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.consent-item input[type="checkbox"]:focus-visible { outline: 2.5px solid var(--seal); outline-offset: 2px; }
.consent-optional {
  display: inline-block; background: var(--line); color: var(--ink-soft);
  border-radius: 3px; padding: 1px 6px; margin-right: 8px; font-size: 10px; vertical-align: 1px;
}
.consent-box .error { margin: 10px 0 0; min-height: 0; }
.consent-box .error:empty { display: none; }
.consent-box .fineprint { margin-top: 14px; }

/* results */
#view-results { padding-top: 52px; }
.results-head h2 { font-family: "Spectral", serif; font-size: 32px; font-weight: 600; margin-top: 8px; }
.results-grid {
  display: grid; grid-template-columns: 300px 1fr; gap: 44px;
  margin-top: 36px; align-items: start;
}
.seal-wrap { text-align: center; }
#seal { width: 220px; height: 220px; }
.seal-g { transform-origin: 110px 110px; animation: stamp .5s cubic-bezier(.2,1.6,.4,1) both .2s; }
@keyframes stamp { from { opacity: 0; transform: scale(1.35) rotate(-8deg); } to { opacity: 1; transform: none; } }
.band-name {
  font-family: "Spectral", serif; font-size: 26px; font-weight: 700; margin-top: 14px;
}
.band-blurb { font-size: 14px; color: var(--ink-soft); margin-top: 8px; text-align: left; }

.section-hd { color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.gaps-hd { margin-top: 30px; }
.res-row { display: grid; grid-template-columns: 1fr 120px 44px; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }
.res-row .nm { font-size: 14.5px; font-weight: 500; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; width: 0; transition: width .7s ease .3s; }
.res-row .pc { font-family: "IBM Plex Mono", monospace; font-size: 13px; text-align: right; }
#res-gaps { padding-left: 20px; margin-top: 10px; }
#res-gaps li { font-size: 15px; padding: 6px 0; }
#res-gaps li strong { font-weight: 600; }

.cta-band {
  margin-top: 48px; background: var(--ink); color: var(--white); border-radius: 6px;
  padding: 36px 40px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
}
.cta-band h3 { font-family: "Spectral", serif; font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.cta-band p { font-size: 14.5px; opacity: .85; max-width: 520px; }
.cta-band .btn-primary { background: var(--white); color: var(--ink); white-space: nowrap; }
.cta-band .btn-primary:hover { background: var(--paper); }

.foot {
  display: flex; justify-content: space-between; margin-top: 70px;
  padding-top: 16px; border-top: 1.5px solid var(--ink); color: var(--ink-soft);
}

@media (max-width: 720px) {
  .hero { padding-top: 44px; }
  .hero-sections { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .lead-card { padding: 26px 20px; }
  .results-grid { grid-template-columns: 1fr; }
  .seal-wrap { max-width: 300px; margin: 0 auto; }
  .cta-band { grid-template-columns: 1fr; padding: 26px 22px; }
  .masthead { flex-direction: column; gap: 10px; align-items: flex-start; }
  .mast-right { text-align: left; }
  .countdown { justify-content: flex-start; }
  .cd-cell { min-width: 30px; }
  .cd-num { font-size: 19px; }
}
