/* healthinsurance.market design system ("Calm Decision", docs/ui-spec.md).
   Navy #013967 for headings and the notice bar, teal #0b605d is the only action color, red only for errors.
   One plain stylesheet serves every page (app, privacy, 404, gate), so no inline styles are ever needed (CSP). */

@font-face {
  font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback so text barely moves when the font arrives. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --bg: #f6f8fa; --surface: #ffffff; --surface-2: #eef2f6;
  --ink: #0b1b2b; --ink-2: #3d4c5c; --muted: #56657a;
  --line: #e3e8ee; --line-strong: #c9d2dc; --control: #7d8b9a;
  --brand: #013967; --accent: #0b605d; --accent-hover: #084845; --accent-soft: #e9f4f3;
  --warn-bg: #fff8e6; --warn-line: #d9a514; --warn-ink: #5c4200;
  --err: #b42318; --err-bg: #fdf0ef; --notice-ink: #ffffff;
  --font: "Inter Variable", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(11, 27, 43, .05), 0 1px 1px rgba(11, 27, 43, .03);
  --sh-2: 0 1px 2px rgba(11, 27, 43, .05), 0 6px 16px -4px rgba(11, 27, 43, .08);
  --sh-3: 0 2px 4px rgba(11, 27, 43, .05), 0 16px 32px -8px rgba(11, 27, 43, .12);
  --sh-btn: 0 1px 1px rgba(11, 27, 43, .08), inset 0 1px 0 rgba(255, 255, 255, .10);
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease: cubic-bezier(.4, 0, .2, 1);
  --d1: 120ms; --d2: 180ms; --d3: 220ms;
  /* Calm layout (docs/calm-layout-spec.md 1.1): one spacing rhythm, few type sizes. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --fs-sm: .875rem; --fs-xs: .8125rem;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2 { color: var(--brand); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.25rem + 3.2vw, 2.875rem); font-weight: 650; line-height: 1.08; letter-spacing: -.03em; margin: 0; }
h2 { font-size: 1.375rem; font-weight: 650; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; margin: 0; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
section:focus { outline: none; }
main > section { scroll-margin-top: 16px; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; border-radius: var(--r-md); }
.skip:focus { left: 8px; top: 8px; z-index: 20; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; }
.i16 { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.amt, .fact dd, #count, .calc, #zip, #size, #income { font-variant-numeric: tabular-nums lining-nums; }

/* Notice bar and header */
.notice-bar { background: var(--brand); color: var(--notice-ink); font-size: .75rem; font-weight: 500; line-height: 1.4; padding: 6px 16px; text-align: center; }
.top { position: relative; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-block: 8px; }
.brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand { display: inline-flex; color: var(--brand); text-decoration: none; border-radius: var(--r-sm); }
.brand img { display: block; height: 40px; width: auto; }
.call { margin-left: auto; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--accent); font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap; transition: background-color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.lang-toggle { margin-left: auto; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; font-size: .9375rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap; }
.lang-toggle + .call { margin-left: 0; }
.lang-toggle:hover { color: var(--accent-hover); }
.doc table { border-collapse: collapse; width: 100%; max-width: 32rem; margin: 8px 0 16px; font-size: .9375rem; }
.doc th, .doc td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.doc li { margin: 4px 0; }
.call:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Layout */
main { overflow-x: clip; padding-bottom: 16px; }
#s-zip, #s-route, #s-consent { max-width: 560px; margin-inline: auto; }
#s-plans { max-width: 560px; margin-inline: auto; }
main > section { padding-top: 24px; animation: enter var(--d3) var(--ease-out) both; }
.doc { padding-top: 32px; max-width: 720px; }
.doc h2 { margin-top: 28px; }

/* Stepper */
.progress { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
/* Back links */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 6px; margin: 0 0 4px -6px; border-radius: var(--r-pill); color: var(--accent); font-weight: 600; font-size: .9375rem; text-decoration: none; transition: background-color var(--d1) var(--ease); }
.back:hover { background: var(--accent-soft); text-decoration: none; }

/* Buttons */
.btn { min-height: 48px; padding: 0 20px; border-radius: var(--r-md); background: var(--accent); color: #fff; font: inherit; font-weight: 600; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--sh-btn); text-decoration: none; cursor: pointer; transition: background-color var(--d1) var(--ease), transform var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-outline { background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
form > .btn { width: 100%; margin-top: 20px; }
.link { background: none; border: 0; padding: 10px 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link:hover { text-decoration-thickness: 2px; color: var(--accent-hover); }
.link.back { text-decoration: none; padding: 0 12px 0 6px; }

/* Fields */
label { display: block; font-size: .9375rem; font-weight: 600; margin: 20px 0 6px; }
label:first-child { margin-top: 0; }
input:not([type=checkbox]), select { width: 100%; min-height: 48px; padding: 0 14px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--control); border-radius: var(--r-md); transition: border-color var(--d1) var(--ease); }
input:not([type=checkbox]):hover, select:hover { border-color: var(--muted); }
input:not([type=checkbox]):focus, select:focus { border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--err) !important; }
select { appearance: none; padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2356657a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
.hint { font-size: .875rem; color: var(--muted); margin: 2px 0 8px; max-width: 60ch; }
.err { display: flex; gap: 8px; align-items: flex-start; background: var(--err-bg); color: var(--err); border-radius: var(--r-sm); padding: 8px 12px; margin: 8px 0 0; font-size: .9375rem; font-weight: 600; animation: reveal var(--d2) var(--ease-out) both; }
.err .i { margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 1.125rem; font-weight: 600; color: var(--brand); padding: 0; margin-bottom: 4px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.field-prefix { position: relative; }
.field-prefix .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-prefix input { padding-left: 28px; }
.narrow { max-width: 8rem; }

/* Custom checkbox (native input kept) */
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 10px; margin: 0; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.check:hover { border-color: var(--control); }
.check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 1.5px solid var(--control); border-radius: 6px; background: var(--surface) center / 14px no-repeat; cursor: pointer; transition: background-color var(--d1), border-color var(--d1); }
.check input:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.check.block { border-radius: var(--r-md); align-items: flex-start; padding: 12px 14px; margin-top: 16px; }
.check.block input { margin-top: 2px; }
.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.checks .check, .person .checks .check { margin: 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); margin: 0 0 16px; }
.card-hero { box-shadow: var(--sh-3); padding: 24px; }
.form-card { box-shadow: var(--sh-2); }

/* Step 1: ZIP hero */
#s-zip { position: relative; isolation: isolate; padding-top: 32px; }
#s-zip::before { content: ""; position: absolute; inset: -48px -20% auto; height: 400px; z-index: -1; pointer-events: none; background: radial-gradient(60% 70% at 50% 0%, var(--accent-soft) 0%, rgba(233, 244, 243, 0) 70%); }
#s-zip h1 { max-width: 18ch; margin-top: 4px; }
.lead { font-size: 1.125rem; line-height: 1.55; color: var(--muted); margin: 12px 0 24px; max-width: 34rem; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
#zip { min-height: 56px; font-size: 1.25rem; font-weight: 500; letter-spacing: .06em; }
.row .btn { min-height: 56px; padding: 0 24px; }
#county-wrap { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: reveal var(--d2) var(--ease-out) both; }
#county-go { width: 100%; margin-top: 12px; }

/* Step 2: household, one question per screen (docs/calm-layout-spec.md 3) */
#s-house, #s-house-money, #s-choose { max-width: 560px; margin-inline: auto; }
.q-screen h2 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 var(--s2); }
.q-screen h2 label { display: inline; font: inherit; color: inherit; margin: 0; }
.q-help { font-size: .9375rem; color: var(--ink-2); margin: 0 0 var(--s4); max-width: 36rem; }
.q-form { margin-top: var(--s4); }
.q-form > .btn { width: 100%; min-height: 56px; margin-top: var(--s5); font-size: 1.0625rem; }
input.big { min-height: 56px; font-size: 1.25rem; font-weight: 500; }
fieldset.person { min-width: 0; }
.person { padding: var(--s5) 0 0; margin-top: var(--s5); border-top: 1px solid var(--line); animation: reveal var(--d2) var(--ease-out) both; }
.person:first-child { border-top: 0; padding-top: 0; margin-top: var(--s2); }
.person-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: var(--s3); }
.person-head h3 { font-size: 1.0625rem; color: var(--brand); }
.person-head .link { padding: 0; font-size: .9375rem; }
.person label { margin: var(--s4) 0 var(--s2); }
.person label:first-of-type { margin-top: 0; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s2); border-top: 1px solid var(--line); }
.check-row:last-child { border-bottom: 1px solid var(--line); }
.check-row .check { margin: 0; flex: 1; min-height: 48px; padding: 8px 0; border: 0; border-radius: 0; background: none; }
.check-row .check:has(input:checked) { background: none; }
.check-row .whats-def { margin-top: 0; }
.add { margin-top: var(--s4); text-decoration: none; font-weight: 600; }
.size-row { display: flex; align-items: center; gap: var(--s3); max-width: 18rem; }
.size-row input { flex: 1; min-width: 0; text-align: center; font-size: 1.5rem; -moz-appearance: textfield; }
.size-row input::-webkit-inner-spin-button, .size-row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.size-btn { width: 56px; min-height: 56px; padding: 0; flex: none; font-size: 1.5rem; font-weight: 500; }
.size-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
#consent-form > .btn { min-height: 52px; }
#house-status { text-align: center; font-size: var(--fs-sm); margin: var(--s2) 0 0; }
#income-change { margin-top: var(--s3); }
.privacy-hint { margin: var(--s5) 0 0; font-size: var(--fs-xs); }

/* Callouts */
.note { display: block; background: var(--warn-bg); border: 1px solid #f0dca8; border-left: 3px solid var(--warn-line); border-radius: var(--r-md); padding: 16px; margin: 0 0 16px; color: var(--ink); font-size: .9375rem; }
.note.note-callout { display: grid; grid-template-columns: 20px 1fr; gap: 12px; }
.note .note-icon { color: var(--warn-ink); margin-top: 3px; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }
/* Required plan-page disclosures: one flat panel, always visible, no box (docs/calm-layout-spec.md 4.1). */
.note.plain { background: none; border: 0; border-left: 3px solid var(--line-strong); border-radius: 0; box-shadow: none; padding: 0 0 0 var(--s4); margin: var(--s5) 0; color: var(--ink-2); max-width: 44rem; }
.note.plain > div + div { margin-top: var(--s4); }
.note.plain h3 { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin: 0 0 var(--s1); letter-spacing: 0; }
.note.plain p { margin: 0 0 6px; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); }
.note.plain p:last-child { margin-bottom: 0; }
.when { font-size: .9375rem; color: var(--ink-2); max-width: 44rem; }

/* One "tap to see more" style everywhere: a full-width row with a chevron. */
.fold { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold + .fold { border-top: 0; }
.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; padding: var(--s3) 0; font-weight: 600; font-size: .9375rem; color: var(--accent); cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--d2) var(--ease); }
.fold[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.fold > summary:hover { color: var(--accent-hover); }
.fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fold-body { padding: 0 0 var(--s4); font-size: var(--fs-sm); color: var(--ink-2); animation: reveal var(--d2) var(--ease-out) both; }
.fold-body > p { margin: 0 0 var(--s2); max-width: 36rem; }
.fold-body > p:last-child { margin-bottom: 0; }
.caution { display: grid; grid-template-columns: 16px 1fr; gap: 8px; background: var(--warn-bg); border-left: 3px solid var(--warn-line); border-radius: var(--r-sm); padding: 10px 12px; margin: 12px 0 0; font-size: .875rem; line-height: 1.5; color: var(--ink); text-align: left; }
.caution .i { color: var(--warn-ink); margin-top: 2px; }
.caution strong { font-weight: 650; }

/* Step 3: plans toolbar: Sort visible, filters behind one fold, then the count. */
.tool label { margin: 0 0 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.tool select { min-height: 48px; }
.filters .fold-body { display: grid; gap: var(--s3); padding-top: var(--s3); }
.type-defs { margin: var(--s1) 0 0; display: grid; gap: var(--s2); font-size: var(--fs-xs); }
.type-defs dt { display: inline; font-weight: 600; color: var(--ink); }
.type-defs dt::after { content: ": "; }
.type-defs dd { display: inline; margin: 0; }
.count { margin: 0; font-size: .875rem; color: var(--muted); }
#plan-list { transition: opacity var(--d1) var(--ease); }
#plan-list.is-stale { opacity: .6; }
#plan-list :is(a, button) { scroll-margin-top: 120px; }

/* Plan card */
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 var(--s4); box-shadow: var(--sh-1); display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); content-visibility: auto; contain-intrinsic-size: auto 480px; transition: border-color var(--d1) var(--ease), box-shadow var(--d2) var(--ease); }
@media (hover: hover) { .plan:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); } }
.plan:focus-within { border-color: var(--accent); }
.plan-head { min-width: 0; }
.plan-more .fold-body { display: grid; gap: var(--s3); }
.plan-more .facts { margin: 0; }
.plan-more h4 { margin: var(--s2) 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.term-line { margin: 0; display: flex; align-items: center; color: var(--ink); font-weight: 500; }
.terms { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0; }
.term, .terms .whats, .term-line .whats, .term .whats { display: contents; }
.terms .whats-def, .term-line .whats-def, .term .whats-def { flex-basis: 100%; }
.terms .term:has(.whats-def:not([hidden])) { flex-basis: 100%; }
/* "What's this?" (plain-language item 1): one small "?" circle, right after its label; 44px tap area. */
.whats { display: inline; }
.whats-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; margin: 0 0 0 6px; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: .75rem; font-weight: 700; line-height: 1; letter-spacing: 0; cursor: pointer; vertical-align: middle; flex: none; }
.whats-btn::before { content: ""; position: absolute; inset: -11px; }
.whats-btn:hover { background: #d9edeb; }
.whats-btn[aria-expanded="true"] { background: var(--accent); color: #fff; }
.whats-def { display: block; margin: 6px 0 8px; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-size: .875rem; font-weight: 400; line-height: 1.5; max-width: 60ch; text-align: left; animation: reveal var(--d2) var(--ease-out) both; }
.words dl { margin: 0; padding: 0 0 var(--s4); display: grid; gap: 10px; }
.words dt { font-weight: 600; font-size: .9375rem; color: var(--ink); }
.words dd { margin: 2px 0 0; color: var(--ink-2); font-size: .9375rem; }
.whats-static { margin: -4px 0 16px; }
.whats-static > summary { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 600; cursor: pointer; list-style: none; }
.whats-static > summary::-webkit-details-marker { display: none; }
.whats-static > p { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface-2); font-size: .875rem; max-width: 60ch; }
.when { margin: 0 0 var(--s4); }
.fact dt { display: flex; flex-wrap: wrap; align-items: center; }
.fact dt .whats { display: contents; }
.fact dt .whats-def { flex-basis: 100%; }

/* Carrier logo box: the same size on every card; logos are scaled to fit, never stretched. */
.carrier { display: flex; align-items: center; height: 32px; margin: 0 0 var(--s3); }
.carrier img { display: block; max-width: 110px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.carrier-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--brand); font-weight: 650; font-size: .8125rem; letter-spacing: .02em; }
.plan h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--brand); overflow-wrap: anywhere; }
.issuer { margin: 2px 0 0; font-size: .875rem; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: var(--s2) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-bronze { background: #a35f22; } .dot-silver { background: #8796a6; } .dot-gold { background: #c9a227; } .dot-platinum { background: #5d6b7c; } .dot-catastrophic { background: #6b5b95; }
.price { margin: 0; }
.amt { font-size: 1.875rem; font-weight: 650; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.per { font-size: .9375rem; color: var(--muted); }
.price strong { font-size: 1.125rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.calc { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
.plan-price .csr { font-size: .8125rem; margin: 8px 0 0; }
/* Fact rows: label left, value right, a hairline between rows; the value wraps under a long label. */
.facts { margin: 0; }
.fact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s1) var(--s3); padding: 10px 0; border-top: 1px solid var(--line); }
.fact dt { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.fact dd { margin: 0 0 0 auto; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.docs { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.docs li { display: flex; flex-wrap: wrap; align-items: center; min-height: 44px; }
.docs li .whats { display: contents; }
.docs li .whats-def { flex-basis: 100%; }
.docs a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.plan-more .muted { margin: 0; }
.plan-cta { width: 100%; min-height: 48px; }
.empty { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 32px 16px; text-align: center; background: var(--surface); }
.empty p { margin: 0 0 12px; }

/* Step 4: consent and route */
.chosen { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); color: var(--ink-2); font-size: .9375rem; margin: 4px 0 16px; }
.consent { background: var(--surface-2); border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 8px; font-size: .9375rem; line-height: 1.65; color: var(--ink); }
.consent p { margin: 8px 0; }
/* Turnstile bot check: invisible unless Cloudflare needs the visitor to act. */
.bot-check { margin-top: 12px; max-width: 100%; }
.bot-check:empty { display: none; }
#sign { min-height: 56px; font-size: 1.25rem; font-weight: 500; letter-spacing: .01em; }
.talk { font-size: .9375rem; color: var(--muted); margin-top: 24px; }
#route-body p { margin: 0 0 16px; }
#route-body p:last-child { margin-bottom: 0; }
a.ext { display: inline-flex; align-items: center; gap: 4px; }

/* Footer */
.foot { margin-top: var(--s7); background: var(--surface); border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }
.foot p { margin: 8px 0; max-width: 72ch; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
#broker:empty { display: none; }

/* Password gate page (server/app.js) */
body.gate { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
body.gate .card { width: min(380px, 100%); }

/* Motion. Everything is off under reduced motion. */
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn[aria-busy="true"]::before { border-top-color: rgba(255, 255, 255, .35); }
}

/* Forced colors (Windows High Contrast) */
@media (forced-colors: active) {
  select { appearance: auto; background-image: none; }
  .check input { appearance: auto; }
    .fold > summary { border: 1px solid CanvasText; padding-inline: 8px; }
  .fold > summary::after { border-color: CanvasText; }
  .whats-btn { border: 1px solid ButtonText; }
}

/* Responsive */
@media (max-width: 520px) {
  .top-in { min-height: 56px; }
  .brand-group { flex-direction: column; align-items: flex-start; gap: 0; }
  .brand img { height: 34px; }
  .call-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 480px) {
  .row { flex-direction: column; }
  .row .btn { width: 100%; }
}
@media (max-width: 359px) {
  .call-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .call { padding: 0; width: 44px; justify-content: center; }
}
@media (min-width: 640px) {
  .wrap { padding-inline: 24px; }
  h2 { font-size: 1.75rem; }
  .card { padding: 24px; }
  .card-hero { padding: 28px; }
  form > .btn { width: auto; }
  #consent-form > .btn, .q-form > .btn { width: 100%; }
  .plan { padding: 24px; }
  .q-screen h2 { font-size: 1.625rem; }
}
@media (min-width: 768px) {
  main > section { padding-top: 40px; }
  /* Household questions sit in one white card on larger screens; the heading and tracker stay above it. */
  .q-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--s6); }
        .foot .wrap { display: grid; grid-template-columns: 1fr auto; column-gap: 48px; }
  .foot .wrap > p { grid-column: 1; }
  .foot .wrap > p.foot-links { grid-column: 2; grid-row: 1; }
}
@media (min-width: 900px) { #s-zip { padding-top: 64px; } }

/* Simple flow (docs/simple-flow-spec.md): built for a shopper who wants a low price without studying anything. */
.progress { margin: 0 0 var(--s2); font-size: .875rem; }
main h1, .q-screen h2, #s-plans h2, #s-consent h2 { font-size: 1.875rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--brand); margin: 0 0 var(--s4); }
#s-zip h1 { font-size: 2.125rem; max-width: none; margin-top: 0; }
#s-zip::before { display: none; }
.lead { margin: 0 0 var(--s5); color: var(--ink-2); }
.row { flex-direction: column; gap: var(--s4); }
.row .btn, #zip { width: 100%; min-height: 60px; }
.row .btn { font-size: 1.1875rem; }
.card-hero { box-shadow: none; }
.top-in .back { margin: 0; }
.q-form > .btn, #consent-form > .btn { width: 100%; min-height: 60px; font-size: 1.1875rem; }
.q-form label { font-size: 1.0625rem; margin: var(--s5) 0 var(--s2); }
.q-form label:first-child { margin-top: 0; }
.q-form .check, .person .check { font-size: 1.0625rem; margin: 0; }
.q-help { margin: 0 0 var(--s2); }
.person { border-top: 0; }
#people .person + .person { border-top: 1px solid var(--line); }
.person > .check-row { margin-top: var(--s4); }
.person > .fold { margin-top: 0; border-top: 0; }
.fold > .check-row:last-child { border-bottom: 0; }
.add { font-size: 1.0625rem; }
.picks { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.pick { display: grid; gap: var(--s1); width: 100%; padding: 18px 20px; border: 1.5px solid var(--accent); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color var(--d1) var(--ease); }
.pick:hover { background: var(--accent-soft); color: var(--ink); }
.pick-call { border-color: var(--line-strong); }
.pick-title { font-size: 1.1875rem; font-weight: 600; color: var(--accent); }
.pick-why { font-size: .9375rem; line-height: 1.4; color: var(--ink-2); }
.silver-note { padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); font-size: .9375rem; line-height: 1.45; }
.silver-note strong { font-weight: 600; }
.sort-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 var(--s3); margin: 0 0 var(--s2); font-size: .9375rem; }
.sort-row strong { flex: 1 1 14rem; font-weight: 600; }
.sort-row .link { font-weight: 600; }
.note.plain { border-left: 0; padding: 0; margin: 0 0 var(--s3); }
.note.plain p { font-size: var(--fs-xs); margin: 0 0 var(--s2); }
.words dl { padding-bottom: 0; }
.words h3 { margin: var(--s4) 0 var(--s2); font-size: var(--fs-sm); color: var(--ink); }
.filters .fold-body { display: grid; gap: var(--s3); padding-top: var(--s2); }
.count { margin: var(--s4) 0 var(--s3); }
.count:focus { outline: none; }
.plan { gap: 14px; contain-intrinsic-size: auto 420px; }
.plan h3 { font-size: 1.0625rem; }
.issuer { margin-top: 2px; }
.plan-price { min-width: 0; }
.amt { font-size: 2.125rem; font-weight: 700; }
.per { font-size: 1rem; color: var(--ink-2); }
.calc { margin-top: var(--s1); font-size: .875rem; color: var(--ink-2); }
.plan-more > summary { justify-content: center; gap: var(--s2); }
.plan-more { border: 0; }
.plan-more .calc { margin: 0; font-size: var(--fs-xs); }
.plan-cta { min-height: 52px; font-size: 1.0625rem; }
.see-all { width: 100%; min-height: 52px; margin-bottom: var(--s2); }
.chosen { border-left: 0; padding: 0; background: none; border: 0; font-size: 1rem; }
.talk { margin-top: var(--s4); text-align: center; color: var(--ink-2); }
@media (min-width: 768px) { .q-form { padding: var(--s5); } }
.q-form .check.block { margin-top: var(--s4); }
.check-row .whats { display: contents; }
.check-row .whats-def { flex-basis: 100%; }
main:focus { outline: none; }
/* With the language button, the phone number makes the header too wide on most phones: show a round call button. */
@media (max-width: 420px) {
  .lang-toggle + .call .call-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lang-toggle + .call { padding: 0; width: 44px; justify-content: center; }
}

/* Guides (2026-11-07): the plain "Quick answers" under the ZIP screen (web/index.html, #learn), the guide links
   in every footer, and the guide pages. Phone first, quiet: the tool stays the main thing on the page. */
/* The app renders header, main and footer inside #root; #learn comes after it in the HTML. On the app page, put
   #learn between the tool and the footer, and show it on the ZIP screen only. */
body[data-step] { display: flex; flex-direction: column; min-height: 100vh; }
body[data-step] > #root { display: contents; }
body[data-step] > #root > *, body[data-step] > #learn { width: 100%; }
body[data-step] .foot { order: 1; }
body[data-step]:not([data-step="zip"]) > #learn { display: none; }
html[lang="es"] #learn { display: none; }
.learn { max-width: 560px; margin-inline: auto; padding-top: var(--s6); color: var(--ink-2); }
.learn h2 { font-size: 1.125rem; font-weight: 650; margin: 0 0 var(--s2); color: var(--brand); }
.learn .learn-h2 { margin-top: var(--s6); }
.learn .fold > summary { color: var(--ink); font-size: 1rem; font-weight: 600; }
.learn .fold > summary:hover { color: var(--accent); }
.learn .fold-body { font-size: .9375rem; }
.guide-list { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.guide-list li { margin: 0; border-bottom: 1px solid var(--line); }
.guide-list li:first-child { border-top: 1px solid var(--line); }
.guide-list a { display: flex; align-items: center; min-height: 48px; padding: var(--s2) 0; text-decoration: none; font-weight: 500; }
.guide-list a:hover { text-decoration: underline; }
.foot-guides { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s4); margin: var(--s2) 0 0; padding-top: var(--s2); border-top: 1px solid var(--line); }
.foot-guides a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-guides-h { flex-basis: 100%; font-weight: 600; color: var(--ink-2); }
@media (min-width: 768px) {
  .foot .wrap > .foot-guides { grid-column: 1 / -1; }
  .foot-guides-h { flex-basis: auto; }
}
/* Guide pages: answers in folds read the same with or without the inner wrapper. */
.doc .fold > p { margin: 0 0 var(--s4); font-size: var(--fs-sm); color: var(--ink-2); max-width: 36rem; }

/* Plan list (owner, 2026-11-07): filter sidebar + full plan cards, in this site's colors. */
body[data-step="plans"] .wrap { max-width: 1240px; }
body[data-step="plans"] #s-plans { max-width: none; }
#s-plans > h2, #s-plans > .when, #s-plans > .note, #plans-body > .note.plain { max-width: 52rem; }
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
.side { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); }
.side.is-open { display: block; }
.side-group { border: 0; margin: 0; padding: 0 0 var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--line); min-width: 0; }
.side-group:last-of-type { border-bottom: 0; }
.side-group legend, .side-group h3 { padding: 0; margin: 0 0 var(--s2); font-size: .9375rem; font-weight: 650; color: var(--ink); }
.side-help p { font-size: var(--fs-sm); color: var(--ink-2); margin: 0 0 var(--s2); }
.f-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 6px 0; font-size: .9375rem; font-weight: 400; line-height: 1.35; cursor: pointer; }
.f-check span { display: inline; }
.f-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); margin: 0 0 var(--s3); }
.toolbar .tool-sort { min-width: 15rem; }
.toolbar .count { margin-left: auto; padding-bottom: 12px; }
.side-toggle { min-height: 48px; }
@media (min-width: 960px) {
  .results { grid-template-columns: 260px minmax(0, 1fr); gap: var(--s6); }
  .side { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
  .side-toggle { display: none; }
}

/* Plan card */
#plan-list .plan { padding: 0; gap: 0; overflow: hidden; contain-intrinsic-size: auto 300px; }
.plan .plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 16px 20px; border-bottom: 1px solid var(--line); }
.plan-title { min-width: 0; }
.plan .plan-head h3 { font-size: 1.0625rem; color: var(--accent); margin: 0 0 4px; }
.plan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.plan-meta .issuer { text-transform: none; letter-spacing: 0; font-weight: 500; }
.metal { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--control); flex: none; }
.dot-bronze { background: #b0702b; } .dot-silver { background: #8f9aa6; } .dot-gold { background: #c99a1e; } .dot-platinum { background: #5f6f84; } .dot-catastrophic { background: #7d8b9a; }
.plan .carrier { margin: 0; height: 40px; width: 130px; justify-content: flex-end; flex: none; }
.plan .carrier img { max-width: 130px; max-height: 40px; }
.plan-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: 20px; }
.plan-body .price { display: flex; align-items: baseline; gap: 4px; }
.plan-body .amt, .plan-ded .big { font-size: 1.875rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-body .price strong { font-size: 1.0625rem; line-height: 1.35; }
.plan-body .calc { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; }
.was { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.was s { color: var(--err); }
.plan-costs .fact { padding: 5px 0; border-top: 0; font-size: .875rem; }
.plan-costs .fact dt { font-weight: 500; }
.plan-body .caution, .plan-body .csr { grid-column: 1 / -1; margin: 0; }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--line); }
.compare { display: inline-flex; margin: 0; font-weight: 500; align-items: center; gap: 8px; font-size: .9375rem; cursor: pointer; min-height: 40px; }
.compare input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.compare.is-full { color: var(--muted); cursor: not-allowed; }
.plan-links { display: flex; flex-wrap: wrap; gap: var(--s4); margin-left: auto; font-size: .9375rem; }
.plan-links .ext { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.plan-foot .btn { min-height: 40px; width: auto; padding-inline: 18px; font-size: .9375rem; }
.plan-more { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.plan-more .facts, .plan-more p, .plan-more h4 { margin: 0; }
@media (min-width: 720px) {
  .plan-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--s5); }
}
@media (max-width: 719px) {
  .plan .carrier { width: 96px; } .plan .carrier img { max-width: 96px; }
  .plan-links { margin-left: 0; width: 100%; }
  .plan-foot .btn { flex: 1 1 auto; }
  .toolbar .count { margin-left: 0; padding-bottom: 0; width: 100%; }
}

/* Compare */
.compare-bar { position: fixed; z-index: 30; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--sh-3); font-size: .9375rem; }
.compare-bar > span { flex: 1 1 12rem; }
.compare-bar .btn { min-height: 44px; width: auto; }
.compare-panel { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-lg); padding: 16px 20px; margin: 0 0 var(--s4); box-shadow: var(--sh-2); }
.compare-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.compare-top h3 { color: var(--brand); font-size: 1.0625rem; }
.compare-scroll { overflow-x: auto; }
/* Wide data tables (state and county pages) scroll sideways on phones instead of being cut off by main's overflow clip. */
.doc .table-scroll { overflow-x: auto; max-width: 100%; }
.doc .table-scroll table { margin-top: 0; }
.doc .table-scroll:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.compare-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9375rem; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-weight: 650; color: var(--ink); }
.compare-table tbody th { font-weight: 500; color: var(--muted); width: 11rem; }
.compare-issuer { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--muted); }
.compare-actions { display: grid; gap: 8px; justify-items: start; }
.compare-actions .btn { width: auto; min-height: 40px; }
.check-line { display: flex; flex-wrap: wrap; align-items: center; }
.check-line .whats { display: contents; }
.check-line .whats-def { flex-basis: 100%; }
@media (min-width: 340px) and (max-width: 719px) {
  .plan-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plan-costs { grid-column: 1 / -1; }
  .plan-body .amt, .plan-ded .big { font-size: 1.5rem; }
}
.plan-body .price { flex-wrap: wrap; column-gap: 4px; }
.plan-body .per { white-space: nowrap; }
.guide-list { margin: 0 0 var(--s5); padding-left: 1.1rem; display: grid; gap: 10px; }
.guide-list a { font-weight: 600; }

/* Carrier renewal pages (tools/carrier-pages.js): two calls to action and a call button that stays on screen on phones. */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.btn-ghost { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.sticky-call { display: none; }
@media (max-width: 719px) {
  .sticky-call { display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; min-height: 52px; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--sh-btn); }
  .sticky-call:hover, .sticky-call:focus-visible { background: var(--accent-hover); color: #fff; }
  body:has(.sticky-call) footer { padding-bottom: 88px; }
}
