/* Fair Heat — "Accessible & Ethical" design system.
   Light, high-contrast navy and blue; orange only as a small heat accent. Lexend headings,
   Source Sans 3 body. Mobile-first, 44px+ touch targets, visible focus, minimal motion. */

:root {
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9;
  --text: #0f172a; --text-2: #334155; --muted: #475569;
  --border: #e2e8f0; --border-strong: #cbd5e1;
  --primary: #1d4ed8; --primary-hover: #1e40af; --primary-soft: #eff6ff; --primary-text: #1e40af; --on-primary: #ffffff;
  --accent: #c2410c; --accent-soft: #fff7ed;
  --success: #15803d; --success-soft: #f0fdf4; --danger: #b91c1c; --danger-soft: #fef2f2;
  --warn-bg: #fffbeb; --warn-text: #92400e; --ring: #2563eb;
  --foot-bg: #0f172a;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow-md: 0 1px 3px rgb(15 23 42 / .08), 0 6px 16px rgb(15 23 42 / .06);
  --shadow-lg: 0 20px 50px rgb(15 23 42 / .25);
  --font-head: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --dur: 180ms; --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #111827; --surface-2: #1e293b;
    --text: #f1f5f9; --text-2: #cbd5e1; --muted: #94a3b8;
    --border: #1f2a3c; --border-strong: #334155;
    --primary: #2563eb; --primary-hover: #1d4ed8; --primary-soft: #172554; --primary-text: #93c5fd;
    --accent: #fb923c; --accent-soft: #3b1d0c;
    --success: #4ade80; --success-soft: #052e16; --danger: #fca5a5; --danger-soft: #450a0a;
    --warn-bg: #3f2a06; --warn-text: #fde68a; --ring: #60a5fa;
    --foot-bg: #020617;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4); --shadow-md: 0 1px 3px rgb(0 0 0 / .5), 0 6px 16px rgb(0 0 0 / .35); --shadow-lg: 0 20px 50px rgb(0 0 0 / .6);
  }
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; color: var(--text); margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--primary-text); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
svg { display: block; }
code { font: .92em ui-monospace, 'SF Mono', Menlo, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
button, a, select, label, summary { touch-action: manipulation; }

.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 760px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; }
.skip:focus { left: 16px; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kicker { display: flex; align-items: center; gap: 8px; font: 600 .9375rem var(--font-body); color: var(--primary-text); margin: 0 0 10px; }

/* ---------- Header */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--border); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 700 1.2rem var(--font-head); color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.logo { width: 32px; height: 32px; flex: none; }
.site-head nav { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; text-decoration: none; transition: background-color var(--dur), color var(--dur); }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current] { color: var(--primary-text); }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 10px;
  font: 600 1rem/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer; transition: background-color var(--dur), border-color var(--dur), color var(--dur), box-shadow var(--dur);
  background: var(--primary); color: var(--on-primary); }
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary, .btn-quiet { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover, .btn-quiet:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.btn-light { background: #fff; color: #1e40af; }
.btn-light:hover { background: #eff6ff; color: #1e3a8a; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.text-btn, .link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: none; font: 600 .9375rem var(--font-body);
  color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-btn:hover, .link:hover { color: var(--primary); }
.text-btn.quiet { color: var(--muted); }
.text-btn.quiet:hover { color: var(--text); }
.text-btn .i { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; transition: background-color var(--dur), color var(--dur); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Hero: the ZIP search is the main action */
.hero { background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding: 36px 0 44px; }
.hero-inner { display: grid; gap: 32px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; max-width: 17ch; margin-bottom: 14px; }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 56ch; margin-bottom: 26px; }
.search { max-width: 560px; }
.search-label { display: block; font-weight: 700; margin-bottom: 8px; }
.search-row { display: flex; flex-direction: column; gap: 10px; }
.search-field { position: relative; flex: 1; }
.search-field .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; min-height: 56px; padding: 0 16px 0 48px; border: 2px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text);
  font: 600 1.25rem var(--font-body); letter-spacing: .06em; transition: border-color var(--dur), box-shadow var(--dur); }
.search-field input::placeholder { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.search-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 30%, transparent); }
.field-error { color: var(--danger); font-weight: 600; margin: 8px 0 0; min-height: 1.6em; }
.hero-report { margin: 2px 0 0; color: var(--text-2); }
.hero-report .text-btn { font-size: 1rem; padding: 0 2px; }
.trust-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-2); font-size: 1rem; }
.trust-list li { display: inline-flex; align-items: center; gap: 8px; }
.trust-list .i { width: 18px; height: 18px; color: var(--success); stroke-width: 2.5; }

/* This week's U.S. averages */
.snapshot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 20px; }
.snap-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.snap-head h2 { font-size: 1.0625rem; margin: 0; }
.snap-week { color: var(--muted); font-size: .9375rem; }
.snap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.snap-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.snap-label { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); }
.fuel-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.fuel-icon .i { width: 20px; height: 20px; }
.snap-price { font: 700 2rem/1.1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 0; }
.snap-price small, .official-price small { font: 400 1rem var(--font-body); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.snap-spark { grid-column: 2; grid-row: 1 / span 3; width: 116px; height: 48px; color: var(--primary); }
.snap-foot { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: .9375rem; color: var(--muted); }
.change { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; color: var(--text-2); }
.change.up { color: var(--danger); }
.change.down { color: var(--success); }
.change .i { width: 16px; height: 16px; stroke-width: 2.5; }

/* ---------- Skeleton loading */
.skel { display: block; position: relative; overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / .45), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-num { width: 150px; height: 36px; }
.skel-line { width: 60%; height: 14px; margin: 6px 0; }
.skel-line.short { width: 35%; }
.skel-big { width: min(240px, 80%); height: 52px; margin: 12px 0; }
.skel-chart { width: 100%; height: 120px; border-radius: var(--radius); }
.skel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }

/* ---------- Results for a ZIP */
.results { padding: 32px 0 56px; scroll-margin-top: 72px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 20px; }
.results-head h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0; }
.results-head .kicker { display: block; margin-bottom: 4px; }

.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-2); font: 600 1rem var(--font-body); cursor: pointer; white-space: nowrap; transition: background-color var(--dur), color var(--dur), box-shadow var(--dur); }
.tabs button:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.count:not(:empty) { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: .8125rem; font-weight: 700; }

.official { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 28px; }
.official-label { font-weight: 700; color: var(--text-2); margin: 0 0 4px; }
.official-price { font: 700 clamp(2.5rem, 7vw, 3.25rem)/1.05 var(--font-head); letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: .9375rem; }
.chip.up { background: var(--danger-soft); color: var(--danger); }
.chip.down { background: var(--success-soft); color: var(--success); }
.chip .i { width: 16px; height: 16px; stroke-width: 2.5; }
.official .meta-text { color: var(--muted); margin: 0; }
.chart { margin: 0; color: var(--primary); }
.chart svg { width: 100%; height: 120px; overflow: visible; }
.chart-dates { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .875rem; color: var(--muted); }
.chart-note { margin: 4px 0 0; font-size: .9375rem; color: var(--text-2); text-align: center; }
.note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-text); }
.note .i { margin-top: 3px; }
.official-info { display: flex; gap: 16px; align-items: flex-start; }
.official-info p { margin: 0 0 6px; }
.official-info p:last-child { margin: 0; }
.icon-tile { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-text); }
.icon-tile .i { width: 24px; height: 24px; }
.icon-tile.warm { background: var(--accent-soft); color: var(--accent); }
.icon-tile.good { background: var(--success-soft); color: var(--success); }

.list-head { margin-bottom: 12px; }
.list-head h3 { font-size: 1.375rem; margin: 0 0 2px; }
.list-head p { margin: 0; color: var(--muted); }
.listings { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "price" "actions"; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; transition: border-color var(--dur), box-shadow var(--dur); }
.row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.row.is-lowest { border: 2px solid var(--success); padding: 17px; }
.who { grid-area: who; min-width: 0; }
.who h4 { font-size: 1.1875rem; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.who p { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 999px; font: 700 .8125rem var(--font-body); }
.badge .i { width: 14px; height: 14px; stroke-width: 2.5; }
.badge-verified { background: var(--primary-soft); color: var(--primary-text); }
.badge-lowest { background: var(--success-soft); color: var(--success); }
.meta-line { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.meta-line .i { width: 16px; height: 16px; color: var(--muted); }
.source-line { color: var(--muted); font-size: .9375rem; margin-top: 2px !important; }
.discounts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.discounts li { display: inline-flex; align-items: flex-start; gap: 6px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: .9375rem; }
.discounts .i { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.newer { margin-top: 10px !important; font-size: .9375rem; color: var(--text-2); }
.price-box { grid-area: price; display: block; }
.price-box .badge { display: flex; width: fit-content; margin-bottom: 6px; }
.price-box .per { margin-left: 8px; }
.price-box .extra { display: inline-block; margin-right: 12px; }
.amount { font: 700 1.875rem/1.05 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-box .per { color: var(--muted); }
.price-box .extra { color: var(--text-2); font-size: .9375rem; }
.actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.actions .spacer { flex: 1; }
.empty { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 32px 20px; background: var(--surface); border: 2px dashed var(--border-strong); border-radius: 14px; }
.empty h4 { font-size: 1.25rem; margin: 10px 0 4px; }
.empty p { color: var(--text-2); max-width: 46ch; }
.list-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.notice { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.notice .i { margin-top: 2px; }

/* ---------- Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); margin-bottom: 10px; }
.section-head p { color: var(--text-2); font-size: 1.125rem; margin: 0; }
.feature-grid { display: grid; gap: 16px; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.feature .icon-tile { margin-bottom: 16px; }
.feature h3 { font-size: 1.25rem; }
.feature p { color: var(--text-2); margin: 0; }
.rule-callout { display: flex; gap: 16px; align-items: flex-start; margin-top: 20px; padding: 24px; border-radius: 14px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.rule-callout h3 { font-size: 1.25rem; margin: 0 0 6px; }
.rule-callout p { color: var(--text-2); margin: 0; }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--text-2); font-size: .9375rem; font-weight: 700; }
th:not(:first-child), td { text-align: right; }
tbody th { font-weight: 600; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr.is-you { background: var(--primary-soft); }
tbody tr.is-you th::after { content: ' · your state'; font-weight: 600; color: var(--primary-text); }
.table-card.collapsed tbody tr:nth-child(n+13):not(.is-you) { display: none; }
.table-more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--border); }
.table-source { margin: 12px 0 0; color: var(--muted); font-size: .9375rem; }

.cta-band { padding: 0 0 64px; }
.cta-inner { display: flex; flex-direction: column; gap: 20px; padding: 32px 24px; border-radius: 20px; background: #1d4ed8; color: #fff; }
.cta-inner h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.cta-inner p { color: rgb(255 255 255 / .9); margin: 0; max-width: 58ch; }

/* ---------- Footer */
.site-foot { background: var(--foot-bg); color: #cbd5e1; padding: 48px 0 24px; }
.foot-grid { display: grid; gap: 28px; }
.site-foot .brand { color: #fff; margin-bottom: 8px; }
.site-foot h3 { font-size: 1rem; color: #fff; margin: 0 0 8px; }
.site-foot p { margin: 0; }
.site-foot nav { display: grid; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 40px; color: #e2e8f0; text-decoration: none; }
.site-foot nav a:hover { color: #fff; text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #1e293b; color: #94a3b8; font-size: .9375rem; }

/* ---------- Content pages */
.page-head { background: linear-gradient(180deg, var(--primary-soft), var(--bg)); border-bottom: 1px solid var(--border); padding: 36px 0 40px; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 700; letter-spacing: -.025em; max-width: 22ch; margin-bottom: 12px; }
.page-head .lede { margin: 0; }
.page { padding: 40px 0 64px; }
.page h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
.page h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; scroll-margin-top: 88px; }
.prose > h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); max-width: 70ch; }
.prose li { margin-bottom: .5rem; }
.prose strong { color: var(--text); }
.doc { display: grid; gap: 28px; padding: 36px 0 64px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc p { display: none; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 600; text-decoration: none; }
.toc a:hover { border-color: var(--primary); color: var(--primary-text); }
.split { display: grid; gap: 28px; padding: 36px 0 64px; }
.perks { display: grid; gap: 18px; align-content: start; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk .icon-tile { width: 40px; height: 40px; border-radius: 10px; }
.perk .icon-tile .i { width: 20px; height: 20px; }
.perk p { margin: 6px 0 0; color: var(--text-2); }
.verify { margin: 4px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--primary-soft); color: var(--text); }

/* ---------- Panels and forms */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin: 0 0 20px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 1.375rem; margin: 0 0 16px; }
.form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.panel-sub { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 2px; margin: 0 0 16px; }
.panel-sub legend { padding: 0 6px; font-family: var(--font-head); font-weight: 600; }
.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field label, legend { font-weight: 700; color: var(--text); }
.opt { font-weight: 400; color: var(--muted); }
.field-row { display: grid; gap: 0 16px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text);
  font: 400 1.0625rem var(--font-body); transition: border-color var(--dur), box-shadow var(--dur); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 28%, transparent); }
select { appearance: none; padding-right: 42px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
textarea { min-height: 110px; resize: vertical; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.money input { padding-left: 30px; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0 0 8px; font-weight: 400; cursor: pointer; }
.check input, .choice input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--primary); box-shadow: none; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; margin: 0 0 10px; border: 1.5px solid var(--border-strong); border-radius: 10px; cursor: pointer; transition: border-color var(--dur), background-color var(--dur); }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.hint { color: var(--muted); font-size: .9375rem; margin: 0 0 12px; }
.field .hint { margin: 0; }
.status { min-height: 1.6em; margin: 12px 0; font-weight: 600; }
.status.error { color: var(--danger); }
.status.ok { color: var(--success); }
.flash { padding: 12px 16px; margin: 16px 0; border-radius: 10px; background: var(--success-soft); color: var(--success); font-weight: 600; }
.flash.bad { background: var(--warn-bg); color: var(--warn-text); }
.flash.info { background: var(--primary-soft); color: var(--text); font-weight: 400; }
.discount-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.discount-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.inline { display: inline; }
.done { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.done h2 { margin-top: 10px; }

/* ---------- Dialogs (bottom sheet on phones) */
dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog[open] { animation: sheet 220ms var(--ease); }
dialog::backdrop { background: rgb(15 23 42 / .55); }
@keyframes sheet { from { opacity: 0; transform: translateY(24px); } }
dialog form { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 1.375rem; margin: 0 0 4px; }
.dialog-head p { margin: 0; }
.dialog-head .icon-btn { margin: -8px -8px 0 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.dialog-actions .btn { flex: 1; }
.ts { margin: 4px 0; }

/* ---------- Larger screens */
@media (min-width: 560px) {
  .search-row { flex-direction: row; }
  .field-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (min-width: 640px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who price" "actions actions"; gap: 12px 24px; padding: 20px 22px; }
  .row.is-lowest { padding: 19px 21px; }
  .price-box { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
  .price-box .per { margin-left: 0; }
  .price-box .extra { margin-right: 0; }
  .amount { font-size: 2.125rem; }
  dialog { width: min(100% - 32px, 560px); margin: auto; border-radius: var(--radius-lg); }
  dialog[open] { animation: pop 200ms var(--ease); }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
  dialog form { padding: 28px; }
  .dialog-actions { justify-content: flex-end; }
  .dialog-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 768px) {
  .official { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 28px; }
  .official > .note { grid-column: 1 / -1; }
  .official.official-info { display: flex; }
  .tabs { display: inline-flex; }
  .tabs button { flex: 0 0 auto; padding: 0 20px; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding: 40px 48px; }
  .foot-grid { grid-template-columns: 1.4fr .8fr 1.2fr; gap: 40px; }
  .panel { padding: 30px; }
}
@media (min-width: 1024px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 56px; }
  .snapshot { padding: 24px; }
  .section { padding: 80px 0; }
  .results { padding: 48px 0 72px; }
  .doc { grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 48px 0 80px; }
  .toc { position: sticky; top: 88px; align-self: start; flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .toc p { display: block; font-weight: 700; color: var(--text); margin: 0 0 8px; }
  .toc a { min-height: 40px; border: 0; border-left: 3px solid var(--border); border-radius: 0; padding: 0 14px; background: none; }
  .toc a:hover { border-color: var(--primary); }
  .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; padding: 48px 0 80px; align-items: start; }
  .perks { position: sticky; top: 88px; }
}
@media (max-width: 479px) {
  .nav-link.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Common questions */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--dur), background-color var(--dur); }
.faq details[open] { background: var(--surface); border-color: var(--border-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 18px; list-style: none; cursor: pointer; font: 600 1.0625rem var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 20px; height: 20px; flex: none; transition: transform var(--dur);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 20px no-repeat; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 18px 18px; color: var(--text-2); max-width: 70ch; }

/* ---------- Trust labels on each price */
.trust { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .875rem; font-weight: 600; }
.trust .i { width: 16px; height: 16px; }
.trust-strong { background: var(--success-soft); color: var(--success); }
.trust-good { background: var(--primary-soft); color: var(--primary-text); }
.trust-weak { background: var(--surface-2); color: var(--muted); font-weight: 400; }
input[type="file"] { padding: 9px 12px; cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--text); font: 600 .9375rem var(--font-body); cursor: pointer; }

/* ---------- Call for a price */
.call-for { margin-top: 32px; }
.row.row-compact { grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "actions"; }
.row-compact .actions { padding-top: 12px; }

/* ---------- Help paying for heat */
.help-card { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.help-card h3 { font-size: 1.2rem; margin: 0 0 6px; }
.help-card p { margin: 0; color: var(--text-2); }
.help-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 0 !important; }
.help-page section { margin-bottom: 40px; }
.help-page h2 { margin-top: 0; }
.state-pick { max-width: 340px; }
.help-result { margin-top: 8px; }
.help-result h3 { font-size: 1.25rem; }
.help-grid { display: grid; gap: 16px; }
.help-status { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); font-weight: 600; font-size: .875rem; }
.prose-list { padding-left: 1.2em; color: var(--text-2); max-width: 70ch; }
.prose-list li { margin-bottom: .5rem; }
@media (min-width: 768px) { .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
