/* FAIR Confirm design system, v2 (2026-10-09)
   Voice: a letter from the agency, not an app. Paper-tone page, one white sheet, serif questions, sans data.
   Type: questions in the system serif (New York / Iowan / Georgia) 34/42 desktop, 27/34 phone; body 20/30 (18/28);
   data lines 24/32 bold tabular; small 16/24. Measure 600 px. Rhythm on 5 px: 10 / 20 / 30 / 40 / 60.
   Targets: buttons 60 px, inputs 60 px, boxes 32 px in 56 px rows. Contrast: ink #1f2a37 on white 14:1, muted #5b6470 6.5:1,
   navy #14407a on white 9:1. Focus: 3 px gold ring. Motion: progress fill only, none under reduced motion. */
:root {
  --paper: #f5f1ea; --sheet: #ffffff; --inset: #f8f5ef; --ink: #1f2a37; --muted: #5b6470; --rule: #e3ddd2; --rule-strong: #c9c2b5;
  --navy: #14407a; --navy-dark: #0e2f5b; --navy-tint: #eaf0f9; --green: #1f6f43; --green-tint: #e9f3ec; --red: #b4231a; --gold: #f2c14e;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: 20px; --body-lh: 30px; --small: 16px; --small-lh: 24px; --h1: 34px; --h1-lh: 42px; --data: 24px; --data-lh: 32px; --amt: 44px; --amt-lh: 50px;
  --btn: 20px; --btn-h: 60px; --measure: 600px; --pad: 40px; --gutter: 16px;
}
@media (max-width: 640px) { :root { --body: 18px; --body-lh: 28px; --h1: 27px; --h1-lh: 34px; --data: 21px; --data-lh: 29px; --amt: 36px; --amt-lh: 42px; --btn: 18px; --pad: 22px; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body)/var(--body-lh) var(--sans); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: var(--gold); padding: 10px; z-index: 10; }

/* page: one sheet */
.top, main, .foot { max-width: calc(var(--measure) + 2 * var(--pad)); margin: 0 auto; }
.top { padding: 28px var(--pad) 0; }
main { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 10px var(--pad) var(--pad); margin-top: 16px; box-shadow: 0 1px 0 rgba(31, 42, 55, 0.04); }
@media (max-width: 640px) { .top, main, .foot { margin-left: var(--gutter); margin-right: var(--gutter); } .top { padding-left: 4px; padding-right: 4px; } }
main:focus { outline: none; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 14px/1 var(--sans); letter-spacing: 0.04em; }
.agency { font: 600 15px/20px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* progress */
.sections { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 8px; padding: 0; list-style: none; font-size: var(--small); line-height: var(--small-lh); color: var(--muted); counter-reset: s; }
.sections li { white-space: nowrap; }
.sections li.now { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--navy); }
.sections li.done { color: var(--green); }
.sections li.done::before { content: "\2713\00a0"; }
.bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--navy); border-radius: 3px; transition: width 150ms ease-out; }
@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }
.step { font-size: var(--small); line-height: var(--small-lh); color: var(--muted); margin: 8px 0 0; }
.saving { display: inline-block; margin-left: 12px; color: var(--green); opacity: 0; transition: opacity 150ms; }
.saving.on { opacity: 1; }
.saving::before { content: "\2713\00a0"; }

/* screen */
.back { display: inline-block; margin: 14px 0 0; font: var(--small)/var(--small-lh) var(--sans); color: var(--muted); background: none; border: 0; padding: 10px 0; cursor: pointer; min-height: 44px; }
.back::before { content: "\2190\00a0"; }
.back:hover { color: var(--ink); }
.eyebrow { margin: 20px 0 0; font: 600 14px/20px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); }
h1 { font: 600 var(--h1)/var(--h1-lh) var(--serif); margin: 8px 0 0; letter-spacing: -0.005em; color: var(--ink); }
main > h1:first-child, .back + h1 { margin-top: 30px; }
h2, .h2 { font: 600 24px/32px var(--serif); margin: 40px 0 10px; }
p { margin: 20px 0 0; }
p.lead { font-size: 22px; line-height: 34px; }
@media (max-width: 640px) { p.lead { font-size: 19px; line-height: 30px; } }
.small, .muted { font-size: var(--small); line-height: var(--small-lh); color: var(--muted); }
.small { margin: 15px 0 0; }

/* the card: what we hold */
.card { margin: 25px 0 0; padding: 22px 26px 24px; background: var(--inset); border: 1px solid var(--rule); border-radius: 12px; }
.tag { margin: 0 0 12px; font: 600 13px/18px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lines { margin: 0; padding: 0; list-style: none; }
.lines li { padding: 8px 0; border-top: 1px solid var(--rule); }
.lines li:first-child { border-top: 0; padding-top: 0; }
.lines .t { display: block; font: 700 var(--data)/var(--data-lh) var(--sans); overflow-wrap: anywhere; }
.lines .s { display: block; color: var(--muted); font-size: var(--small); line-height: var(--small-lh); margin-top: 2px; }
.card .sub { margin: 12px 0 0; color: var(--muted); font-size: var(--small); line-height: var(--small-lh); }

/* actions */
.actions { margin: 30px 0 0; display: flex; flex-direction: column; gap: 12px; }
.btn { display: block; width: 100%; min-height: var(--btn-h); padding: 15px 20px; font: 600 var(--btn)/1.3 var(--sans); border-radius: 10px; cursor: pointer; text-align: center; border: 2px solid var(--navy); background: var(--navy); color: #fff; }
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: var(--navy-tint); }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; min-height: 48px; }
.btn.quiet:hover { color: var(--ink); background: none; }
.btn:focus-visible, .back:focus-visible, input:focus-visible, textarea:focus-visible, .choice:focus-within, .check:focus-within, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

/* fields */
.field { margin: 22px 0 0; }
.field label, .field .legend { display: block; font-weight: 600; margin: 0 0 6px; }
.field .hint { color: var(--muted); font-size: var(--small); line-height: var(--small-lh); margin: -2px 0 8px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea { width: 100%; min-height: var(--btn-h); padding: 12px 16px; font: var(--body)/var(--body-lh) var(--sans); color: var(--ink); border: 2px solid var(--rule-strong); border-radius: 8px; background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--navy); }
.field textarea { min-height: 110px; resize: vertical; }
.field input.short { max-width: 240px; }
.error { border-left: 4px solid var(--red); padding-left: 14px; }
.error input, .error textarea { border-color: var(--red); }
.err { color: var(--red); font-weight: 700; margin: 0 0 8px; }
.choices { margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.choice, .check { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; border: 2px solid var(--rule-strong); border-radius: 10px; cursor: pointer; background: #fff; }
.field .choice, .field .check { display: flex; font-weight: 400; margin: 0; }
.choice input, .check input { width: 30px; height: 30px; margin: 0; flex: 0 0 30px; accent-color: var(--navy); cursor: pointer; }
.choice.on, .check.on { border-color: var(--navy); background: var(--navy-tint); }
.check.none { margin-top: 6px; border-style: dashed; }
.check.none.on { border-style: solid; }
.choice span, .check span { flex: 1; }
.fixpanel { margin: 26px 0 0; padding: 0 0 0 20px; border-left: 4px solid var(--navy); }
.fixpanel h2 { font-size: 24px; line-height: 32px; margin: 0; }
.fixpanel .check { margin-top: 16px; }

/* disclosure and lists */
.facts { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: f; }
.facts li { position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--rule); counter-increment: f; }
.facts li::before { content: counter(f); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 15px/30px var(--sans); text-align: center; }
.facts li:last-child { border-bottom: 1px solid var(--rule); }

/* review */
.review { margin: 10px 0 0; }
.row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .k { flex: 0 0 40%; color: var(--muted); font-size: var(--small); line-height: var(--small-lh); }
.row .v { flex: 1; overflow-wrap: anywhere; }
.ok { color: var(--green); font-weight: 600; }
.row .chg button { background: none; border: 0; padding: 8px 0; min-height: 44px; font: var(--small)/var(--small-lh) var(--sans); color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 640px) { .row { flex-wrap: wrap; } .row .k { flex-basis: 100%; } }

/* done */
.donehead { margin-top: 30px; }
.tick { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green-tint); color: var(--green); font: 700 26px/1 var(--sans); margin-bottom: 14px; }
.quote .amt { font: 700 var(--amt)/var(--amt-lh) var(--sans); margin: 4px 0 0; letter-spacing: -0.01em; }
.quote .amt span { display: block; font: 400 var(--body)/var(--body-lh) var(--sans); color: var(--muted); margin: 2px 0 0; }
.nowrap { white-space: nowrap; }
.quote .cmp { margin: 12px 0 0; font-size: var(--small); line-height: var(--small-lh); color: var(--muted); }
.foot { padding: 22px var(--pad) 50px; font-size: var(--small); line-height: var(--small-lh); color: var(--muted); }
.foot b { color: var(--ink); }

/* sign-off */
.sign { margin: 25px 0 0; font: 600 var(--body)/var(--body-lh) var(--serif); }
.sign span { display: block; font: var(--small)/var(--small-lh) var(--sans); color: var(--muted); font-weight: 400; }

/* The page is a letter on paper: it stays light in dark mode on purpose (older readers, print-like contrast). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #f5f1ea; --sheet: #ffffff; --ink: #1f2a37; } }
:root[data-theme="dark"] { --paper: #f5f1ea; --sheet: #ffffff; --ink: #1f2a37; }

/* waiting for the carriers */
.wait { margin-top: 30px; }
.spin { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--rule-strong); border-top-color: var(--navy); border-radius: 50%; animation: spin 900ms linear infinite; vertical-align: middle; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.quote .diff { margin: 10px 0 0; font-weight: 600; color: var(--green); }
.quote .diff.more { color: var(--ink); }
.letter { margin-top: 10px; }
.letter p:first-child { margin-top: 20px; }

.progress { list-style: none; padding: 0; margin: 10px 0 14px; }
.progress li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule, #e3ddd2); font-size: 15px; }
.progress li:last-child { border-bottom: 0; }
.progress .pstate { color: var(--muted, #5b6470); }
.progress .pstate.running { color: var(--navy, #14407a); font-weight: 600; }
.progress .pstate.done { color: var(--green, #1f6f43); font-weight: 600; }
