/* ============================================================
   SCORP Cost Calculator — styles (v8)
   Palette sampled pixel-by-pixel from the official SCORP logo:
     navy   #00084D   (wordmark)
     rose   #E4285C → coral #EA5545 → orange #FA8A2C   (the S mark gradient)
   All text colours below were checked against WCAG AA (4.5:1).
   ============================================================ */
:root {
  --ink: #00084D;            /* brand navy — header, dark panels            */
  --ink-2: #00084D;          /* headline text on white                      */
  --ink-deep: #00051F;       /* deeper navy for gradient depth              */
  --rose: #E4285C;           /* gradient start — selected states            */
  --coral: #EA5545;          /* gradient midpoint                           */
  --orange: #FA8A2C;         /* gradient end — highlights on navy           */
  --grad: linear-gradient(100deg, #E4285C 0%, #EA5545 50%, #FA8A2C 100%);
  --grad-soft: linear-gradient(100deg, rgba(228,40,92,.12) 0%, rgba(250,138,44,.12) 100%);
  --coral-light: #FFB067;    /* warm highlight on navy                      */
  --coral-text: #C21F52;     /* rose for text on white — 5.8:1 AA           */
  --coral-soft: rgba(228, 40, 92, .07);
  --coral-line: rgba(228, 40, 92, .38);
  --paper: #F6F5F9;
  --surface: #FFFFFF;
  --line: rgba(0, 8, 77, .10);
  --line-strong: rgba(0, 8, 77, .22);
  --text: #131538;
  --muted: rgba(19, 21, 56, .74);     /* 6.9:1 AA */
  --faint: rgba(19, 21, 56, .62);     /* 4.6:1 AA — was .46 / 2.9:1 (fail)  */
  --on-dark: rgba(255, 255, 255, .78);
  --on-dark-faint: rgba(255, 255, 255, .60);  /* 5.6:1 on navy — was .45    */
  --green: #16693A; --green-soft: rgba(22, 105, 58, .12);
  --amber: #8A5A0A; --amber-soft: rgba(200, 127, 27, .18);
  --red: #C62828;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Montserrat', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(0, 8, 77, .06), 0 6px 20px rgba(0, 8, 77, .08);
  --tap: 44px;
  --bar-h: 76px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid rgba(228, 40, 92, .6); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -.01em; color: var(--ink-2); }
h2 { font-size: 21px; font-weight: 700; }
h2:focus { outline: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.mt { margin-top: var(--sp-8); }
.center { text-align: center; }
.coral { color: var(--coral-text); }
.anchor { height: 1px; }
.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; }

/* boot skeleton — replaced when React mounts (never the LCP element) */
.boot { padding: 40px 16px 64px; max-width: 1080px; margin: 0 auto; color: var(--faint); font-size: 13px; }
.boot-bar { height: 4px; border-radius: 4px; background: rgba(0, 8, 77, .08); overflow: hidden; margin-bottom: 14px; }
.boot-bar span { display: block; height: 100%; width: 40%; border-radius: 4px; background: var(--grad); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .boot-bar span { animation: none; width: 100%; } }

/* ── header / hero ───────────────────────────────────────── */
.hdr { background: var(--ink); color: #fff; background-image: radial-gradient(120% 90% at 100% 0%, rgba(228, 40, 92, .30), transparent 55%), radial-gradient(80% 70% at 0% 100%, rgba(250, 138, 44, .16), transparent 60%); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-lockup { height: 34px; width: auto; max-width: 170px; object-fit: contain; display: block; }
.hero { padding: 14px 16px 22px; }
.eyebrow { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--orange); font-weight: 600; }
.hero h1 { font-size: 26px; font-weight: 800; margin-top: 6px; color: #fff; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 8px; color: var(--on-dark); font-size: 13.5px; max-width: 520px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 22px; margin-top: 16px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { color: var(--orange); font-size: 17px; font-weight: 700; white-space: nowrap; }
.hero-stats span { font-size: 11px; color: var(--on-dark-faint); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-trust li { font-size: 11.5px; font-weight: 600; color: var(--coral-light); border: 1px solid rgba(255, 176, 103, .38); border-radius: var(--r-pill); padding: 4px 11px; }

/* ── progress ────────────────────────────────────────────── */
.progress { display: flex; gap: 6px; padding-top: 14px; }
.prog { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; border-bottom: 3px solid var(--line); color: var(--faint); font-size: 12px; font-weight: 600; text-align: left; }
.prog-n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line); font-size: 11px; flex-shrink: 0; }
.prog.is-current { border-bottom-color: var(--rose); color: var(--ink-2); }
.prog.is-current .prog-n { background: var(--grad); color: #fff; }
.prog.is-done { border-bottom-color: rgba(228, 40, 92, .45); color: var(--muted); cursor: pointer; }
.prog.is-done .prog-n { background: var(--green-soft); color: var(--green); }
.prog:disabled { cursor: default; }
@media (max-width: 420px) { .prog:not(.is-current) .prog-t { display: none; } .prog:not(.is-current) { flex: 0 0 auto; padding-right: 8px; } }

/* ── layout ──────────────────────────────────────────────── */
.main { padding-top: 22px; padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); display: grid; gap: 24px; }
.main.is-quote { padding-bottom: 40px; }
.content { min-width: 0; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .content { animation: none; } }
.sub { color: var(--muted); font-size: 14px; margin-top: 6px; margin-bottom: 16px; max-width: 560px; }
.block { margin-top: 32px; }
.stack { display: grid; gap: 10px; }
.label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 8px; }
.fine { font-size: 12px; color: var(--faint); margin-top: 8px; line-height: 1.5; }
.fine svg { vertical-align: -2px; margin-right: 3px; }
.link { color: var(--coral-text); font-weight: 600; font-size: 13px; padding: 10px 0; }
.summary { display: none; }

/* ── buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .08s ease, background .15s ease, opacity .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(228, 40, 92, .28); }
.btn-primary:disabled { background: var(--line-strong); box-shadow: none; color: #fff; opacity: .75; }
.btn-outline { border: 1.5px solid var(--coral-line); color: var(--ink-2); background: var(--surface); }
.btn-outline:disabled { opacity: .45; }
.btn-ghost { border: 1.5px solid var(--line-strong); color: var(--ink); background: transparent; }
.hdr .btn-ghost { border-color: rgba(255, 176, 103, .55); color: var(--coral-light); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1 1 auto; }
.nav { display: none; }

/* ── segmented control ───────────────────────────────────── */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(0, 8, 77, .06); border-radius: var(--r-sm); padding: 4px; gap: 4px; }
.seg-btn { min-height: 40px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg-btn.is-on { background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); }
.seg-tag { font-size: 13px; color: var(--muted); margin: 10px 0 12px; }

/* ── zone cards ──────────────────────────────────────────── */
.zones { display: grid; gap: 10px; }
.zone { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px 52px 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s ease, box-shadow .15s ease; }
.zone.is-on { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose), var(--shadow); background: #FFF8FA; }
.zone-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.zone-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink-2); }
.zone-from { font-size: 12px; color: var(--coral-text); font-weight: 700; white-space: nowrap; }
.zone-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.zone-tag { align-self: flex-start; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); background: rgba(0, 8, 77, .07); padding: 3px 8px; border-radius: var(--r-pill); }
.zone-check { position: absolute; right: 14px; top: 14px; }

/* ── checkbox ────────────────────────────────────────────── */
.checkbox { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; transition: background .12s ease, border-color .12s ease; }
.checkbox.is-on { background: var(--grad); border-color: var(--rose); }

/* ── rows (stepper, toggle) ──────────────────────────────── */
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; text-align: left; width: 100%; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; font-size: 15px; }
.row-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-price { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.toggle.is-on { border-color: var(--rose); background: #FFF8FA; }
.row.is-disabled { opacity: .5; }
.stepper-ctl { display: flex; align-items: center; gap: 6px; }
.stepper-btn { width: var(--tap); height: var(--tap); border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); font-size: 22px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.stepper-btn.is-primary { background: var(--grad); border-color: transparent; color: #fff; }
.stepper-btn:disabled { opacity: .35; }
.stepper-val { width: 34px; text-align: center; font-size: 20px; font-weight: 700; }

/* ── chips / pills ───────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 6px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: 14px; font-weight: 600; background: var(--surface); }
.chip.is-on { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.picked { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border-radius: var(--r-pill); background: var(--coral-soft); border: 1.5px solid var(--coral-line); font-size: 13px; font-weight: 600; text-align: left; }
.pill > svg:first-child { color: var(--coral-text); }
.pill > svg:last-child { color: var(--faint); }
.picked-count { font-size: 12px; color: var(--faint); font-weight: 700; margin-left: 4px; }

/* ── search & results ────────────────────────────────────── */
.search { position: relative; }
.search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; min-height: 52px; padding: 12px 44px 12px 42px; border-radius: var(--r-md); border: 1.5px solid var(--coral-line); background: var(--surface); font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.results { margin-top: 12px; display: grid; gap: 8px; }
.results-n { font-size: 12px; color: var(--faint); }
.act { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.act.is-selected { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.act.is-disabled { opacity: .45; }
.act.is-alt { border-style: dashed; border-color: var(--coral-line); background: #FFFDFD; }
.act.is-alt .act-main { padding: 10px 14px; }
.act.is-alt .act-name { font-size: 14px; }
.act-main { display: flex; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; align-items: flex-start; }
.act-main .checkbox { margin-top: 1px; }
.act.is-alt .checkbox { display: none; }
.act-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.act-name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.act-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 11.5px; color: var(--faint); align-items: center; }
.act-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.act-flag { font-size: 12px; color: var(--coral-text); font-weight: 600; line-height: 1.4; }
.act-flag-soft { color: var(--muted); font-weight: 500; }
.act-switch { font-size: 12.5px; color: var(--coral-text); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; }
.act-more { display: block; width: 100%; text-align: left; padding: 6px 14px 10px 50px; font-size: 12.5px; color: var(--coral-text); font-weight: 600; }
.badge { padding: 2px 8px; border-radius: var(--r-pill); font-weight: 700; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; }
.badge-red { background: var(--red); color: #fff; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-ink { background: var(--ink); color: #fff; }
.alts { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.alt-group { margin-top: 10px; display: grid; gap: 8px; }
.alt-zone { font-size: 12px; font-weight: 800; color: var(--coral-text); text-transform: uppercase; letter-spacing: .06em; }
.custom { display: flex; gap: 8px; margin-top: 14px; }
.custom input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 16px; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat { text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.cat small { font-weight: 500; font-size: 11.5px; color: var(--coral-text); }
.cat.is-on { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }

/* ── notices, details ────────────────────────────────────── */
.notice { border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; line-height: 1.55; margin: 12px 0; }
.notice p + p { margin-top: 6px; }
.notice-coral { background: var(--coral-soft); border: 1px solid var(--coral-line); }
.notice-muted { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.notice-green { background: var(--green-soft); border: 1px solid rgba(22, 105, 58, .3); color: var(--green); }
.notice-title { font-weight: 700; margin-bottom: 4px; }
.notice-list { padding-left: 18px; list-style: disc; display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.notice .btn { margin-top: 10px; }
.details { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm); margin: 12px 0; }
.details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 600; font-size: 14px; min-height: var(--tap); }
.details summary::-webkit-details-marker { display: none; }
.details-chev { transform: rotate(90deg); color: var(--faint); transition: transform .15s ease; }
.details[open] .details-chev { transform: rotate(-90deg); }
.details-body { padding: 0 14px 14px; }
.tl { display: grid; gap: 6px; font-size: 13px; }
.tl li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.tl b { color: var(--coral-text); white-space: nowrap; }

/* ── form ────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; margin-top: 14px; }
.form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.field i { color: var(--coral-text); font-style: normal; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 16px; -webkit-appearance: none; appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2300084D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.field input:focus, .field select:focus, .search input:focus, .custom input:focus { border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px var(--coral-soft); }
.field .is-err { border-color: var(--red); }
.err { font-size: 12px; color: var(--red); font-style: normal; }
.phone { display: grid; grid-template-columns: 128px 1fr; gap: 8px; }
.trust { font-size: 12px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ── quote ───────────────────────────────────────────────── */
.quote { display: grid; gap: 14px; }
.quote .card { margin-top: 0; }
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.quote-head .sub { margin-bottom: 0; }
.serial { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); border: 1.5px solid var(--coral-line); white-space: nowrap; }
.lines { display: grid; }
.lines li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lines li span { color: var(--muted); }
.lines li b { white-space: nowrap; font-weight: 600; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 4px; border-top: 2px solid var(--ink-2); }
.total-row span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.total-row b { font-size: 22px; color: var(--ink-2); font-weight: 800; }
.acts li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.acts b { color: var(--faint); font-weight: 500; font-size: 12px; }
.compare { display: grid; gap: 8px; }
.cmp { text-align: left; background: var(--surface); border: 1.5px solid var(--coral-line); border-radius: var(--r-md); padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.cmp-zone { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--coral-text); }
.cmp b { font-size: 17px; grid-row: span 2; }
.cmp-hint { font-size: 11.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 2px; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink-2); }
.card-desc { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.ticks { display: grid; gap: 6px; margin-top: 10px; }
.ticks li { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); }
.ticks svg { color: var(--coral-text); flex-shrink: 0; margin-top: 3px; }
.card-ink { background: var(--ink); color: #fff; border-color: transparent; }
.card-ink .card-title { color: var(--orange); }
.card-ink .card-desc { color: var(--on-dark); }
.docs { counter-reset: d; display: grid; gap: 10px; margin: 14px 0 16px; }
.docs li { counter-increment: d; display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; }
.docs li::before { content: counter(d, decimal-leading-zero); color: var(--orange); font-weight: 700; font-size: 12px; grid-row: span 2; padding-top: 2px; }
.docs b { font-size: 13.5px; }
.docs span { font-size: 12px; color: var(--on-dark-faint); }

/* ── mobile sticky bar & sheet ───────────────────────────── */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0, 8, 77, .10); display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); min-height: var(--bar-h); }
.bar-total { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; line-height: 1.2; }
.bar-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.bar-total b { font-size: 16px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-total:disabled b { font-size: 14px; color: var(--muted); font-weight: 600; }
.bar-hint { font-size: 11px; color: var(--coral-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .btn { flex: 0 0 auto; padding-left: 20px; padding-right: 16px; }
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0, 8, 77, .48); display: flex; align-items: flex-end; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-height: 80vh; max-height: 80dvh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease; }
@keyframes up { from { transform: translateY(24px); } to { transform: none; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 14px; }
.summary-lines { display: grid; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-lines li span { color: var(--muted); }
.summary-lines li b { white-space: nowrap; font-weight: 600; color: var(--faint); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 4px; }
.summary-total span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.summary-total b { font-size: 20px; color: var(--ink-2); font-weight: 800; }
.locked { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.summary .locked { color: var(--orange); }
.summary-empty { font-size: 13px; color: var(--faint); padding: 12px 0; }
.sheet .btn { margin-top: 12px; }

/* ── desktop ─────────────────────────────────────────────── */
@media (min-width: 760px) {
  body { font-size: 15px; }
  .hero { padding: 36px 16px 40px; }
  .hero h1 { font-size: 40px; max-width: 640px; }
  .hero-sub { font-size: 16px; }
  .hero-stats b { font-size: 22px; }
  .main { grid-template-columns: minmax(0, 1fr) 320px; padding-bottom: 60px; align-items: start; }
  .main.is-quote { grid-template-columns: minmax(0, 1fr); max-width: 800px; }
  h2 { font-size: 24px; }
  .zones { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .compare { grid-template-columns: repeat(3, 1fr); }
  .cmp { grid-template-columns: 1fr; }
  .cmp b { grid-row: auto; margin-top: 4px; }
  .card { padding: 22px; }
  .bar, .sheet-bg { display: none; }
  .nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
  .summary { display: block; position: sticky; top: 20px; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 20px; }
  .summary .label { color: var(--orange); }
  .summary-lines li { border-bottom-color: rgba(255, 255, 255, .12); }
  .summary-lines li span { color: var(--on-dark); }
  .summary-lines li b { color: var(--on-dark-faint); }
  .summary-total { border-top: 1px solid rgba(250, 138, 44, .35); }
  .summary-total span { color: var(--on-dark-faint); }
  .summary-total b { color: var(--orange); }
  .summary .fine { color: var(--on-dark-faint); }
  .summary-empty { color: var(--on-dark-faint); }
  .actions .btn { flex: 0 1 auto; }
}

/* ── print (fallback when the PDF library cannot load) ───── */
@media print {
  .no-print, .hdr, .bar, .sheet-bg, .summary, .actions, .compare { display: none !important; }
  body { background: #fff; }
  .card { border-color: #ddd; break-inside: avoid; }
}

/* ── v9: cross-zone search (the calculator's core feature) ──────────────── */
.search-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.results-n { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--faint); }
.results-jump { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--coral-text); background: var(--coral-soft); border: 1px solid var(--coral-line); border-radius: var(--r-pill); padding: 5px 10px; min-height: 32px; }
.results-jump svg { transform: rotate(90deg); }
.results-load { font-style: italic; }
.alts { scroll-margin-top: 12px; }
.alts-sub { font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; }

/* ── v9: captcha ───────────────────────────────────────────────────────── */
.captcha { display: flex; flex-direction: column; gap: 6px; }
.captcha-box:not(:empty) { margin: 2px 0 4px; min-height: 65px; }
.captcha .err { font-size: 12px; }
