:root {
  --bg: #ffffff;
  --bg-soft: #f4f7f6;
  --bg-tint: #e9f3f1;
  --ink: #15302b;
  --ink-soft: #3f5a54;
  --brand: #0e7c66;
  --brand-dark: #0a5e4d;
  --brand-ink: #06382e;
  --accent: #f0a830;
  --line: #d7e3df;
  --yes: #0e7c66;
  --no: #b4541a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(12, 60, 50, 0.10);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.15; color: var(--brand-ink); margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-dark); }

/* Accessibility helpers */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--brand-ink); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 2px solid transparent; padding: 12px 22px;
  min-height: 48px; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; min-height: 54px; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: .95rem; }

/* Disclosure bar */
.disclosure {
  background: var(--brand-ink); color: #dff1ec; font-size: .82rem;
}
.disclosure p { margin: 0; max-width: var(--maxw); margin: 0 auto; padding: 8px 20px; }
.disclosure a { color: #fff; font-weight: 650; white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-ink); font-weight: 800; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: inline-block; }
.brand-name { font-size: 1.15rem; letter-spacing: -.01em; }
.brand-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--ink-soft); padding: 2px 6px; border-radius: 5px; margin-left: 6px; vertical-align: middle; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.site-header nav a.btn { color: #fff; }
.site-header nav a:not(.btn):hover { color: var(--brand-ink); }
@media (max-width: 640px) { .site-header nav a:not(.btn) { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-tint), var(--bg) 75%); padding: clamp(36px, 6vw, 72px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 800; color: var(--brand-dark); margin: 0 0 .6rem; }
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 24px; }
.proof { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; }
.proof li { font-size: .95rem; color: var(--ink-soft); }
.proof strong { color: var(--brand-ink); display: block; font-size: 1.25rem; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.trust-badges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.badge { font-size: .72rem; font-weight: 700; letter-spacing: .03em; color: var(--brand-dark); background: var(--bg-tint); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }
.hero-card-quote { font-size: 1.2rem; color: var(--brand-ink); font-weight: 600; margin-bottom: 8px; }
.hero-card-by { color: var(--ink-soft); font-size: .9rem; margin: 0; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-card { display: none; } }

/* Eligibility check */
.check { padding: clamp(40px, 6vw, 72px) 0; background: var(--bg-soft); }
.check-head { text-align: center; max-width: 56ch; margin: 0 auto 28px; }
.check-head p { color: var(--ink-soft); }
.check-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); max-width: 720px; margin: 0 auto; box-shadow: var(--shadow); }
.steps { list-style: none; display: flex; justify-content: center; gap: 0; padding: 0; margin: 0 0 26px; }
.step { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--ink-soft); background: var(--bg-tint); border: 2px solid var(--line); position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: 50%; width: 46px; height: 2px; background: var(--line); }
.step.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.step.done { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.q { border: 0; padding: 0; margin: 0 0 22px; }
.q legend { font-weight: 700; font-size: 1.1rem; color: var(--brand-ink); margin-bottom: 12px; padding: 0; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.opt:hover { border-color: var(--brand); background: var(--bg-tint); }
.opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.opt:has(input:checked) { border-color: var(--brand); background: var(--bg-tint); }
select { width: 100%; font: inherit; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-height: 52px; }
select:hover { border-color: var(--brand); }
.check-actions { margin-top: 26px; text-align: center; }
.check-actions .btn { width: 100%; max-width: 360px; }

/* Result */
.result { max-width: 720px; margin: 22px auto 0; border-radius: var(--radius); padding: 24px clamp(20px, 4vw, 32px); border: 2px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.result.fit { border-color: var(--brand); background: linear-gradient(180deg, var(--bg-tint), #fff); }
.result.nofit { border-color: var(--no); background: #fdf3ec; }
.result h3 { font-size: 1.4rem; margin-bottom: 8px; }
.result .copay { font-size: 1.05rem; color: var(--ink-soft); }
.result .result-cta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.result ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); }

/* How */
.how { padding: clamp(40px, 6vw, 72px) 0; }
.how h2 { text-align: center; margin-bottom: 32px; }
.how-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: none; }
.how-grid li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.how-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }
.how-grid p { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) { .how-grid { grid-template-columns: 1fr; } }

/* Coverage */
.coverage { padding: clamp(40px, 6vw, 72px) 0; background: var(--bg-tint); }
.cov-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; }
.cov-lede { color: var(--ink-soft); font-size: 1.1rem; }
.cov-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cov-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 14px 48px; position: relative; font-weight: 550; }
.cov-list li::before { position: absolute; left: 16px; top: 13px; font-weight: 800; font-size: 1.1rem; }
.cov-list .yes::before { content: "\2713"; color: var(--yes); }
.cov-list .no::before { content: "\2715"; color: var(--no); }
@media (max-width: 760px) { .cov-grid { grid-template-columns: 1fr; gap: 18px; } }

/* Rationale */
.rationale { padding: clamp(40px, 6vw, 80px) 0; background: var(--brand-ink); color: #dff1ec; }
.rationale h2 { color: #fff; }
.rationale h3 { color: #fff; }
.rat-intro { max-width: 70ch; color: #c5e4dc; font-size: 1.1rem; }
.rat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; }
.rat-grid article { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 22px; }
.rat-grid p { color: #c5e4dc; margin: 0; font-size: .96rem; }
.rat-foot { color: #9fc6bc; font-size: .92rem; max-width: 70ch; }
.rationale a { color: #fff; }
@media (max-width: 860px) { .rat-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #cdd9d5; padding: 28px 0 90px; }
.crisis { color: #fff; }
.crisis a { color: #fff; font-weight: 800; }
.footer-meta { font-size: .85rem; color: #9fb0ab; margin: 0; }

/* Sticky mobile CTA */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: none; }
.mobile-cta .btn { width: 100%; }
@media (max-width: 640px) { .mobile-cta { display: block; } .site-footer { padding-bottom: 110px; } }

/* Events panel */
.events-toggle { position: fixed; left: 14px; bottom: 14px; z-index: 70; background: var(--brand-ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 650; cursor: pointer; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 8px; }
.events-toggle span[aria-hidden] { color: var(--accent); }
.events-count { background: var(--accent); color: var(--brand-ink); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; padding: 0 6px; }
.events-panel { position: fixed; left: 14px; bottom: 64px; z-index: 70; width: min(360px, calc(100vw - 28px)); max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.events-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.events-clear { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.events-note { font-size: .82rem; color: var(--ink-soft); margin: 0 0 12px; }
.events-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.events-log li { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.events-log .ev-name { color: var(--brand-dark); font-weight: 700; }
.events-log .ev-params { color: var(--ink-soft); display: block; margin-top: 2px; }
.events-log .ev-time { color: #93a8a2; float: right; }
@media (max-width: 640px) { .events-toggle { bottom: auto; top: 14px; left: auto; right: 14px; } .events-panel { bottom: auto; top: 60px; left: auto; right: 14px; } }
