/* Applicost — "The Rate Sheet". Editorial data-desk system; see /DESIGN.md.
   Ink on white, Newsreader + Public Sans, square geometry, hairline rules, one highlighter mark. */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-Variable.woff2") format("woff2"); font-weight: 400 650; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/PublicSans-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --canvas: #FFFFFF; --canvas-soft: #F5F5F2; --ink: #111111; --ink-2: #45464B; --ink-3: #6B6C70;
  --hairline: #E2E2DE; --rule: #111111; --mark: #FFE14A; --mark-ink: #111111;
  --up: #B3261E; --down: #0B7A3E; --focus: #1D4ED8;
  --q0: #F1F0EB; --q1: #D5D3CA; --q2: #A3A197; --q3: #5E5D57; --q4: #1B1B19;
  --q-ink-light: #111111; --q-ink-dark: #FFFFFF;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #121212; --canvas-soft: #1B1B1A; --ink: #EDEDE8; --ink-2: #B6B6B0; --ink-3: #8F8F89;
    --hairline: #2E2E2C; --rule: #EDEDE8; --up: #FF8A7F; --down: #5BD08A; --focus: #93B4FF;
    --q0: #262624; --q1: #3E3E3B; --q2: #6F6E69; --q3: #ACABA4; --q4: #EDEDE8;
    --q-ink-light: #EDEDE8; --q-ink-dark: #111111;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #121212; --canvas-soft: #1B1B1A; --ink: #EDEDE8; --ink-2: #B6B6B0; --ink-3: #8F8F89;
  --hairline: #2E2E2C; --rule: #EDEDE8; --up: #FF8A7F; --down: #5BD08A; --focus: #93B4FF;
  --q0: #262624; --q1: #3E3E3B; --q2: #6F6E69; --q3: #ACABA4; --q4: #EDEDE8;
  --q-ink-light: #EDEDE8; --q-ink-dark: #111111;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-variant-numeric: lining-nums; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 45%, transparent); transition: background-color .12s, text-decoration-color .12s; }
a:hover { text-decoration-color: var(--ink); background-color: color-mix(in srgb, var(--mark) 55%, transparent); }
:root[data-theme="dark"] a:hover { color: var(--mark-ink); background-color: var(--mark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a:hover { color: var(--mark-ink); background-color: var(--mark); } }
h1, h2, h3 { margin: 0 0 .45em; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.125rem, 1.6rem + 2vw, 3rem); line-height: 1.04; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); line-height: 1.12; }
h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }
mark { background: linear-gradient(176deg, transparent 8%, var(--mark) 8% 90%, transparent 90%); color: var(--mark-ink); padding: 0 .12em; margin: 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-weight: inherit; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .88em; background: var(--canvas-soft); padding: .1em .35em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--mark); color: var(--mark-ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--canvas); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 12px; }
.js .nojs-only { display: none !important; }
html:not(.js) .js-only { display: none !important; }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; vertical-align: -0.2em; }
.icon-sm { width: 16px; height: 16px; vertical-align: -0.15em; }
.muted { color: var(--ink-2); }
.good { color: var(--down); }
.bad { color: var(--up); }

:root { --gutter: 16px; }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1240px) { :root { --gutter: 32px; } }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.narrow-wide { max-width: 980px; }
.section { margin-top: 64px; padding-top: 14px; border-top: 2px solid var(--rule); }
.wrap.section { border-top: 0; position: relative; }
.wrap.section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 2px solid var(--rule); }
.page-grid .section:first-child, .pg-main > .section:first-child { margin-top: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .2em; }
.section-dek { color: var(--ink-2); margin: 4px 0 20px; max-width: 70ch; }
.band { margin-top: 64px; }

/* Kicker: the uppercase sans label that replaces icon eyebrows */
.kicker, .eyebrow { display: block; font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; line-height: 1.3; }
.kicker a, .eyebrow a { color: inherit; }
.kicker.good { color: var(--down); }
.kicker.bad { color: var(--up); }
h2.kicker, h3.kicker { font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .09em; }
.lede { font-family: var(--serif); font-size: clamp(1.1875rem, 1.1rem + .35vw, 1.3125rem); line-height: 1.45; color: var(--ink-2); max-width: 60ch; }
.byline { font-size: .875rem; color: var(--ink-3); border-top: 1px solid var(--hairline); padding-top: 12px; max-width: 60ch; }
.byline a { color: var(--ink-2); }
.h-small { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 10px; letter-spacing: 0; line-height: 1.35; }
.more { font-weight: 650; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.big-num { font-family: var(--serif); font-size: 2.5rem; font-weight: 500; line-height: 1; margin: 0; font-variant-numeric: tabular-nums lining-nums; }
.big-num small, .sc-num small, .rr-num small, .fig-num small { font-family: var(--sans); font-size: .875rem; color: var(--ink-3); font-weight: 400; margin-left: 3px; letter-spacing: 0; }

/* ---------- Dateline + masthead ---------- */
.dateline { background: #111111; color: #EDEDE8; font-size: .75rem; letter-spacing: .02em; }
:root[data-theme="dark"] .dateline { background: #000; border-bottom: 1px solid var(--hairline); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dateline { background: #000; border-bottom: 1px solid var(--hairline); } }
.dateline-inner { display: flex; gap: 6px 22px; align-items: center; min-height: 32px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.dateline-inner::-webkit-scrollbar { display: none; }
.dateline span:first-child { font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.dateline a { color: inherit; text-decoration: none; }
.dateline a:hover { background: none; text-decoration: underline; color: inherit; }
.dateline strong { color: var(--mark); font-weight: 650; }
:root[data-theme="dark"] .logo-mark { background: linear-gradient(180deg, transparent 58%, #6B5A10 58% 92%, transparent 92%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark { background: linear-gradient(180deg, transparent 58%, #6B5A10 58% 92%, transparent 92%); } }

.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--canvas); border-bottom: 2px solid var(--rule); }
.header-inner { display: flex; align-items: center; height: 100%; gap: 28px; }
.logo { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; line-height: 1; flex: none; }
.logo:hover { background: none; }
.logo-mark { background: linear-gradient(180deg, transparent 58%, var(--mark) 58% 92%, transparent 92%); padding: 0 1px; }
.nav { display: none; gap: 2px; align-self: stretch; }
.nav a { display: flex; align-items: center; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 0 12px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.nav a:hover { background: none; border-bottom-color: var(--ink-3); }
.nav a[aria-current] { font-weight: 700; border-bottom-color: var(--mark); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; list-style: none; }
.icon-btn:hover { background: var(--canvas-soft); }
.icon-btn::-webkit-details-marker { display: none; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; } }
.menu { position: relative; }
.menu summary { cursor: pointer; }
.menu .i-close { display: none; }
.menu[open] .i-open { display: none; }
.menu[open] .i-close { display: block; }
.menu-panel { position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; background: var(--canvas); padding: 8px 16px 24px; display: flex; flex-direction: column; overflow-y: auto; }
.menu-panel a { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline); }
@media (min-width: 960px) { .nav { display: flex; } .menu { display: none; } }

/* ---------- Breadcrumbs ---------- */
.crumbs { margin-top: 18px; font-size: .8125rem; color: var(--ink-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Page layout ---------- */
.page-head { margin: 28px 0 24px; }
.page-head h1 { max-width: 20ch; }
.page-head .lede { margin-top: 12px; }
.narrow .page-head h1, .narrow-wide .page-head h1 { max-width: none; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.pg-side { margin-top: 32px; }
.pg-main { min-width: 0; }
@media (min-width: 960px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; column-gap: 56px; }
  .pg-top, .pg-main { grid-column: 1; }
  .pg-side { grid-column: 2; grid-row: 1 / span 2; margin-top: 28px; }
  .sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 28px; }
}
@media (max-width: 959px) { .sticky { display: grid; gap: 28px; } }
.two-col { display: grid; gap: 32px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col > section { min-width: 0; }

/* Reading text in the main column is set in the serif */
.pg-main .section > p:not(.kicker):not(.muted):not(.section-dek), .prose p, .prose li, .faq-a, .report-dek { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.55; }

/* Generic boxes: square, ink outline, no shadow */
.card, .boxed { background: var(--canvas); border: 1px solid var(--ink); padding: 20px; }
@media (min-width: 640px) { .card, .boxed { padding: 24px; } }

/* ---------- The short answer ---------- */
.answer { border-top: 2px solid var(--rule); padding-top: 12px; }
.answer-lead { font-family: var(--serif); font-size: clamp(1.25rem, 1.15rem + .45vw, 1.5rem); line-height: 1.42; margin-bottom: .55em; max-width: 40em; }
.answer-lead strong { font-weight: 600; }
.answer-basis { font-family: var(--serif); font-size: 1.125rem; color: var(--ink-2); max-width: 46em; }
.answer-basis strong { color: var(--ink); font-weight: 600; }
.answer-source { font-size: .8125rem; color: var(--ink-3); margin: 0; }
.answer-source a { color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: .875rem; font-weight: 600; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); }
.chip:hover { background: var(--mark); color: var(--mark-ink); }
.chip-quiet { border-color: transparent; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.browse { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 20px 0 0; font-size: .9375rem; }
.browse span { font-weight: 700; }

/* ---------- Statement (calculator) ---------- */
.statement, .calc-card { background: var(--canvas); border: 1px solid var(--ink); padding: 0; }
.calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; padding: 12px 18px 10px; border-bottom: 2px solid var(--rule); }
.calc-head h2 { font-size: 1.375rem; margin: 0; }
.calc-rate { font-size: .75rem; color: var(--ink-3); margin: 0; font-variant-numeric: tabular-nums; }
.calc, .statement > .calc, .calc-card > form { display: grid; gap: 14px; padding: 16px 18px 4px; }
.statement form { display: block; }
.statement form > .calc { padding: 16px 18px 4px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1.3fr 1fr; }
.field > label, .field-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hint { color: var(--ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.input-unit { display: flex; align-items: stretch; background: var(--canvas); border: 1px solid var(--ink); min-height: 46px; }
.input-unit:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font: 600 1.0625rem/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; outline: none; }
.input-unit span { display: grid; place-items: center; padding: 0 12px; font-size: .8125rem; color: var(--ink-2); border-left: 1px solid var(--hairline); background: var(--canvas-soft); }
select, input[type=search], input[type=email], input[type=text], textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--canvas); border: 1px solid var(--ink); border-radius: 0; padding: 11px 12px; min-height: 46px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; text-overflow: ellipsis; }
select:focus, input[type=search]:focus, input[type=email]:focus, input[type=text]:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { font: inherit; font-size: .8125rem; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--hairline); padding: 5px 10px; cursor: pointer; min-height: 32px; }
.preset span { color: var(--ink-3); font-weight: 400; margin-left: 2px; font-variant-numeric: tabular-nums; }
.preset:hover { border-color: var(--ink); }
.preset.is-active { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.preset.is-active span { color: color-mix(in srgb, var(--canvas) 75%, transparent); }

/* Ledger: label · dotted leader · figure */
.ledger { margin: 8px 18px 0; display: grid; }
.ledger > div { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.ledger > div + div { border-top: 1px solid var(--hairline); }
.ledger dt { font-size: .875rem; color: var(--ink-2); white-space: nowrap; }
.ledger dd { margin: 0 0 0 auto; font-family: var(--serif); font-size: 1.375rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; order: 2; }
.ledger > div > dt { flex: none; }
.ledger > div::before { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--ink-3); transform: translateY(-4px); min-width: 16px; }
.ledger-main dt { color: var(--ink); font-weight: 700; }
.ledger-main dd { font-size: 2.25rem; font-weight: 500; letter-spacing: -0.01em; }
.results-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .8125rem; color: var(--ink-3); margin: 4px 18px 0; padding-top: 8px; border-top: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.calc-note, .embed-credit { font-size: .75rem; color: var(--ink-3); margin: 10px 18px 16px; }
.statement .btn-block { margin: 14px 18px 0; width: calc(100% - 36px); }
.flash { animation: flash .5s ease-out; }
@keyframes flash { from { background-color: var(--mark); } }

/* Simple calculators keep the tile markup; render it as a ledger too */
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 18px 0; border-top: 1px solid var(--hairline); }
.results-1 { grid-template-columns: 1fr; }
.tile { display: grid; gap: 2px; padding: 12px 10px 12px 0; min-width: 0; }
.tile + .tile { padding-left: 12px; border-left: 1px solid var(--hairline); }
.tile-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.tile-num { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-main .tile-num { background: linear-gradient(176deg, transparent 10%, var(--mark) 10% 90%, transparent 90%); color: var(--mark-ink); justify-self: start; padding: 0 .12em; margin-left: -.12em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .9375rem; text-decoration: none; border-radius: 0; padding: 11px 20px; min-height: 46px; border: 1px solid var(--ink); cursor: pointer; white-space: nowrap; transition: background-color .12s, color .12s; }
.btn-primary { background: var(--ink); color: var(--canvas); }
.btn-primary:hover { background: var(--canvas); color: var(--ink); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--canvas); }
.btn-block { width: 100%; margin-top: 16px; }

.state-pick { display: grid; gap: 10px; }
.state-pick label { margin: 0; }
.state-pick-row { display: flex; gap: 0; }
.state-pick-row select { flex: 1; min-width: 0; border-right: 0; }

/* ---------- Facts ---------- */
.facts { border-top: 2px solid var(--rule); padding-top: 10px; }
.facts dl { margin: 0; display: grid; }
.facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: .875rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--rule); -webkit-overflow-scrolling: touch; margin-top: 8px; }
.table-tall { max-height: 640px; overflow-y: auto; border-bottom: 1px solid var(--ink); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums lining-nums; }
.data-table caption { caption-side: bottom; text-align: left; padding: 10px 0; font-size: .8125rem; color: var(--ink-3); }
.data-table th, .data-table td { padding: 10px 14px 10px 0; text-align: left; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; }
.data-table thead th { position: sticky; top: 0; z-index: 1; background: var(--canvas); font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); border-bottom: 1px solid var(--ink); vertical-align: bottom; white-space: normal; }
.data-table tbody th { font-weight: 600; white-space: normal; }
.data-table tbody th a { color: var(--ink); text-decoration: none; }
.data-table tbody th a:hover { text-decoration: underline; }
.data-table .num { text-align: right; }
.data-table tbody tr:hover > * { background: var(--canvas-soft); }
.data-table tr.is-hl > * { background: color-mix(in srgb, var(--mark) 70%, var(--canvas)) !important; color: var(--mark-ink); }
.data-table tr.is-hl a { color: var(--mark-ink); }
.data-table tr.is-hl th { font-weight: 750; }
.data-table .group-row th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding-top: 22px; border-bottom: 1px solid var(--ink); background: var(--canvas) !important; }
.data-table th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.data-table th button::after { content: "↕"; opacity: .35; font-size: .95em; }
.data-table th button[data-dir="asc"]::after { content: "↑"; opacity: 1; }
.data-table th button[data-dir="desc"]::after { content: "↓"; opacity: 1; }
.data-table th button:focus-visible { outline: 2px solid var(--focus); }
.unit-sfx { color: var(--ink-3); font-size: .85em; }
[data-usage-table] tbody th { white-space: nowrap; }
.cell-sub { display: block; font-weight: 400; font-size: .8125rem; color: var(--ink-3); }
.sort-links { font-size: .875rem; color: var(--ink-2); display: flex; gap: 12px; margin: 0; }
.sort-links a { color: var(--ink-2); text-decoration: none; }
.sort-links a[aria-current] { color: var(--ink); font-weight: 700; background: linear-gradient(180deg, transparent 60%, var(--mark) 60%); }
@media (max-width: 639px) { .hide-sm { display: none; } .data-table th, .data-table td { padding: 9px 10px 9px 0; } }

/* ---------- Charts ---------- */
.figure { margin: 16px 0; }
.chart { width: 100%; height: auto; display: block; font-family: var(--sans); }
.ch-grid { stroke: var(--hairline); stroke-width: 1; }
.ch-label { fill: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ch-value { fill: var(--ink); font: 650 13px var(--sans); }
.ch-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line-lg { stroke-width: 2.5; }
.ch-line-us { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.ch-area { fill: var(--mark); opacity: .35; }
.ch-dot { fill: var(--mark); stroke: var(--ink); stroke-width: 2; }
.spark { display: block; flex: none; }
.spark .ch-area { opacity: .55; }
.chart-legend { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-2); margin-top: 8px; padding-left: 48px; }
.lg { display: inline-block; width: 20px; height: 0; margin-right: -12px; vertical-align: middle; }
.lg-a { border-top: 2.5px solid var(--ink); }
.lg-b { border-top: 1.5px dashed var(--ink-3); }
rect.q0 { fill: var(--q0); } rect.q1 { fill: var(--q1); } rect.q2 { fill: var(--q2); } rect.q3 { fill: var(--q3); } rect.q4 { fill: var(--q4); }
.tile-abbr { font: 700 14px var(--sans); letter-spacing: .02em; }
.tile-val { font: 500 11.5px var(--sans); font-variant-numeric: tabular-nums; }
text.q0, text.q1, text.q2 { fill: var(--q-ink-light); }
text.q3, text.q4 { fill: var(--q-ink-dark); }
:root[data-theme="dark"] text.q0, :root[data-theme="dark"] text.q1, :root[data-theme="dark"] text.q2 { fill: var(--ink); }
:root[data-theme="dark"] text.q3, :root[data-theme="dark"] text.q4 { fill: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) text.q0, :root:not([data-theme="light"]) text.q1, :root:not([data-theme="light"]) text.q2 { fill: var(--ink); } :root:not([data-theme="light"]) text.q3, :root:not([data-theme="light"]) text.q4 { fill: #111; } }
.tilemap a, .tilemap .tile-link:hover { text-decoration: none; background: none; }
.tilemap .tile-link:hover rect.tile, .tilemap .tile-link:focus rect.tile { fill: var(--mark); }
.tilemap .tile-link:hover text, .tilemap .tile-link:focus text { fill: #111; }
rect.tile.is-hl { fill: var(--mark); stroke: var(--ink); stroke-width: 2; }
.tile-link:has(rect.is-hl) text { fill: #111; }
.map-grid { display: grid; gap: 28px; margin-top: 8px; }
.map-fig { margin: 0; }
.rank-lists { display: grid; gap: 28px; align-content: start; }
@media (min-width: 960px) { .map-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } }
@media (min-width: 640px) and (max-width: 959px) { .rank-lists { grid-template-columns: 1fr 1fr; } }
.rank-card { border-top: 2px solid var(--rule); padding-top: 10px; }
.rank-card ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank-card li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: .9375rem; counter-increment: r; }
.rank-card li::before { content: counter(r); color: var(--ink-3); font-size: .8125rem; width: 1.2em; font-variant-numeric: tabular-nums; }
.rank-card li a { flex: 1; color: var(--ink); text-decoration: none; }
.rank-card li a:hover { text-decoration: underline; }
.rank-card li span { font-weight: 650; font-variant-numeric: tabular-nums; }
.trend-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.trend .trend-row p { margin: 0; }

/* ---------- KPIs / figures ---------- */
.kpis, .stat-row, .figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--hairline); }
@media (min-width: 720px) { .kpis, .stat-row, .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi, .stat, .figure-cell { display: grid; gap: 4px; align-content: start; padding: 14px 16px 16px 0; min-width: 0; color: var(--ink); text-decoration: none; }
.kpi + .kpi, .stat + .stat, .figure-cell + .figure-cell { padding-left: 16px; border-left: 1px solid var(--hairline); }
@media (max-width: 719px) {
  .kpi:nth-child(3), .stat:nth-child(3), .figure-cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .kpi:nth-child(n+3), .stat:nth-child(n+3), .figure-cell:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
.kpi-label, .stat-label, .fig-label { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-2); }
.kpi-num, .stat-num, .fig-num { font-family: var(--serif); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; }
.stat-num { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); }
.kpi-sub, .fig-sub { font-size: .8125rem; color: var(--ink-3); }
.fig-sub.good, .fig-sub.bad { font-weight: 600; }
.good.fig-sub { color: var(--down); } .bad.fig-sub { color: var(--up); }
.kpi-main .kpi-num, .stat-hl .stat-num { background: linear-gradient(176deg, transparent 10%, var(--mark) 10% 90%, transparent 90%); color: var(--mark-ink); justify-self: start; padding: 0 .1em; margin-left: -.1em; }
a.figure-cell:hover { background: var(--canvas-soft); }
a.figure-cell:hover .fig-sub { color: var(--ink); text-decoration: underline; }
.figure-cell .spark { margin-top: 6px; }

/* ---------- Content blocks ---------- */
.tips { list-style: none; padding: 0; margin: 16px 0 0; counter-reset: tip; }
.tips li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-family: var(--serif); font-size: 1.125rem; line-height: 1.5; counter-increment: tip; }
.tips li::before { content: counter(tip, decimal-leading-zero); font-family: var(--sans); font-size: .75rem; font-weight: 700; color: var(--ink-3); flex: none; width: 1.6em; font-variant-numeric: tabular-nums; }
/* Ad slot (AdSense manual unit): labelled, hairline-ruled, space reserved so the page doesn't jump */
.ad { margin: 48px 0 0; padding-top: 8px; border-top: 1px solid var(--hairline); min-height: 288px; }
.ad-label { font: 600 .6875rem/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.ad .adsbygoogle { min-height: 250px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
@media print { .ad { display: none; } }

.affiliate, .callout, .email-card { display: grid; gap: 14px 24px; margin-top: 48px; align-items: center; }
@media (min-width: 720px) { .affiliate, .callout { grid-template-columns: 1fr auto; } }
.aff-body p, .callout p, .email-card p { margin: 0; }
.aff-title, .callout-title { font-family: var(--serif); font-weight: 500; font-size: 1.375rem; line-height: 1.2; margin: 0 0 4px !important; color: var(--ink); }
.aff-text, .callout p:not(.kicker):not(.callout-title), .email-card p:not(.kicker):not(.callout-title) { color: var(--ink-2); font-size: .9375rem; }
.aff-tag { font-size: .6875rem; font-weight: 600; letter-spacing: .04em; border: 1px solid var(--ink-3); padding: 1px 6px; margin-left: 8px; color: var(--ink-3); }
.email-card .kicker { margin-bottom: 6px; }
.email-form { display: flex; gap: 0; flex-wrap: wrap; }
.email-form input { flex: 1 1 200px; border-right: 0; }
.pg-side .email-card { margin-top: 0; }

.faq { margin-top: 64px; }
.faq-list { border-top: 1px solid var(--ink); margin-top: 16px; }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-item summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 16px 0; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin: 0; line-height: 1.3; }
.faq-item summary:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.faq-sign { position: relative; flex: none; width: 14px; height: 14px; }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--ink); }
.faq-sign::after { transform: rotate(90deg); transition: transform .15s; }
.faq-item[open] .faq-sign::after { transform: rotate(0deg); }
.faq-a { padding: 0 0 18px; color: var(--ink-2); max-width: 44em; }
.faq-a p { margin: 0; }

.link-grid { display: grid; gap: 32px; margin-top: 56px; }
@media (min-width: 720px) { .link-grid { grid-template-columns: 1fr 1fr; } }
.link-block { min-width: 0; border-top: 2px solid var(--rule); padding-top: 10px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--hairline); }
.link-list a { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; text-decoration: none; color: var(--ink); font-size: .9375rem; }
.link-list a > span:first-child { flex: 1; min-width: 0; }
.link-list a:hover > span:first-child { text-decoration: underline; }
.link-list .meta { font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.link-list a::after { content: "→"; color: var(--ink-3); transition: transform .12s; }
.link-list a:hover::after { color: var(--ink); transform: translateX(3px); }

.sources { margin-top: 64px; padding-top: 12px; border-top: 1px solid var(--ink); font-size: .8125rem; color: var(--ink-2); }
.sources ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.sources a { color: var(--ink-2); }
.cite-box { border-left: 3px solid var(--mark); padding: 6px 0 6px 16px; margin-top: 40px; font-size: .9375rem; color: var(--ink-2); }

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; padding: 32px 0 120px; }
.hero-grid { position: relative; }

/* Hero backdrop: real EIA price histories as faint chart-recorder traces */
.hero-bg { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 45%, #000 75%); mask-image: linear-gradient(to bottom, transparent 45%, #000 75%); }
.hero-trace { display: block; width: 100%; height: 100%; }
.hb-grid { stroke: var(--hairline); stroke-width: 1; }
.hb-label { fill: var(--ink-3); font: 500 13px var(--sans); }
.hb-state, .hb-us { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hb-state { stroke: var(--ink-3); stroke-width: 1; opacity: .3; animation: hb-draw 2.8s cubic-bezier(.3, .6, .2, 1) var(--d, 0s) backwards; }
.hb-us { stroke: var(--ink); stroke-width: 2.25; animation: hb-draw 3s cubic-bezier(.3, .6, .2, 1) .9s backwards; }
.hb-end { fill: var(--mark); stroke: var(--ink); stroke-width: 2; animation: hb-fade .5s ease-out 3.7s backwards; }
.hb-cursor { offset-rotate: 0deg; offset-distance: 0%; animation: hb-read 28s linear 4.2s infinite both; }
.hb-cursor line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 5; opacity: .45; }
.hb-cursor rect { fill: var(--mark); stroke: var(--ink); stroke-width: 1.5; }
@keyframes hb-draw { from { stroke-dashoffset: 1; } }
@keyframes hb-fade { from { opacity: 0; } }
@keyframes hb-read { 0% { offset-distance: 0%; opacity: 0; } 3% { opacity: 1; } 94% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hb-cursor { display: none; } }
@media (max-width: 959px) {
  .hb-state { opacity: .2; }
}
.hero-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 960px) { .hero { padding-top: 56px; padding-bottom: 150px; } .hero-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; } }
.display { font-size: clamp(2.5rem, 1.7rem + 3.4vw, 4.25rem); line-height: 1; letter-spacing: -0.03em; max-width: 13ch; margin-bottom: .35em; }
.hero-copy .lede { margin-bottom: 22px; }
.hero-calc { align-self: start; }
.figures-band { margin-top: 8px; }
.figures-band .kicker { margin-bottom: 0; }
.figures { margin-top: 10px; }
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; border-top: 1px solid var(--ink); }
@media (min-width: 640px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-card { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.app-card:hover { background: none; }
.app-card:hover .app-name { text-decoration: underline; text-underline-offset: 3px; }
.app-card:hover .app-meta { background: var(--mark); color: var(--mark-ink); }
.app-name { font-weight: 600; font-size: 1rem; }
.app-meta { font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 2px; }
.app-card[hidden] { display: none; }
.report-card { display: grid; gap: 8px; padding: 0; text-decoration: none; color: var(--ink); max-width: 46em; }
.report-card:hover { background: none; }
.report-card:hover .report-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.report-title { font-family: var(--serif); font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
.report-dek { color: var(--ink-2); }
.report-arrow { color: var(--ink-3); }
.section > .report-card { margin-top: 4px; }
.trust-grid { display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; }
.trust { padding: 14px 0 20px; border-top: 1px solid var(--ink); }
.trust h3, .trust h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.trust p { color: var(--ink-2); font-size: .9375rem; margin: 0; }
.trust-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- State + compare + reports ---------- */
.state-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 16px 0; border-top: 1px solid var(--ink); }
.state-card { display: grid; gap: 2px; padding: 12px 16px 14px 0; border-bottom: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.state-card:hover { background: var(--canvas-soft); }
.sc-name { font-size: .875rem; font-weight: 700; }
.sc-num { font-family: var(--serif); font-size: 1.75rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.sc-sub { font-size: .8125rem; }
.versus { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 720px) { .versus { grid-template-columns: 1fr 1fr; gap: 40px; } }
.vs-card { position: relative; border: 0; border-top: 2px solid var(--rule); padding: 12px 0 0; }
.vs-card.is-winner { border-top-color: var(--rule); }
.badge { display: inline-block; background: var(--mark); color: var(--mark-ink); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; margin-bottom: 8px; }
.vs-name { font-size: 1.75rem; margin-bottom: 8px; }
.vs-stats { margin: 0 0 16px; display: grid; }
.vs-stats > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: .9375rem; }
.vs-stats dt { color: var(--ink-2); }
.vs-stats dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.vs-stats .vs-big { font-family: var(--serif); font-size: 1.75rem; font-weight: 500; line-height: 1; }
.is-winner .vs-big { background: linear-gradient(176deg, transparent 10%, var(--mark) 10% 90%, transparent 90%); color: var(--mark-ink); padding: 0 .1em; }
.compare-grid { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); border-top: 1px solid var(--ink); }
.compare-card { display: grid; gap: 8px; padding: 16px 0 18px; border: 0; border-bottom: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.compare-card:hover { background: none; }
.compare-card:hover .cc-title { text-decoration: underline; }
.cc-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.cc-bar { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: .8125rem; }
.cc-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-track { height: 10px; background: var(--canvas-soft); }
.cc-track span { display: block; height: 100%; background: var(--ink); }
.cc-val { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.mover-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: m; }
.mover-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: .9375rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.mover-list li > span { font-size: .875rem; color: var(--ink-2); }
.mover-list li > span strong { color: var(--ink); }
.mover-list li > span:last-child { font-weight: 700; min-width: 4.5em; text-align: right; }
.mover-list li > span.bad { color: var(--up); } .mover-list li > span.good { color: var(--down); }
.mover-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.mover-list a:hover { text-decoration: underline; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 56px; padding-top: 14px; border-top: 2px solid var(--rule); }
.pager a { font-weight: 650; text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.report-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--rule); }
.report-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 24px; align-items: baseline; text-decoration: none; color: var(--ink); padding: 14px 0; border: 0; border-bottom: 1px solid var(--hairline); }
.report-row:hover { background: none; }
.report-row:hover .rr-title { text-decoration: underline; }
.rr-title { font-family: var(--serif); font-size: 1.375rem; font-weight: 500; }
.rr-num { font-weight: 650; font-variant-numeric: tabular-nums; }
.rr-chg { font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .report-row { grid-template-columns: 1fr auto; } .rr-chg, .report-row > span[aria-hidden] { display: none; } }

/* ---------- Calculators, embed, data ---------- */
.calc-list { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); border-top: 2px solid var(--rule); }
.calc-link { display: flex; gap: 16px; align-items: baseline; padding: 16px 0 18px; border: 0; border-bottom: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.calc-link:hover { background: none; }
.calc-link:hover .cl-name { text-decoration: underline; }
.calc-link > span:first-child { display: grid; gap: 4px; flex: 1; font-size: .9375rem; }
.cl-name { font-family: var(--serif); font-weight: 500; font-size: 1.375rem; line-height: 1.2; }
.bill { margin-top: 24px; padding: 0 0 18px; }
.bill > *:not(.table-wrap):not(.calc-head) { margin-left: 18px; margin-right: 18px; }
.bill .table-wrap { margin: 0 18px; border-top-width: 1px; }
.bill-head { display: grid; gap: 16px; margin: 16px 18px 20px; align-items: end; }
@media (min-width: 720px) { .bill-head { grid-template-columns: 1fr 180px 1fr; } }
.bill-total { display: grid; gap: 2px; }
.bill-total .tile-num { font-size: 2.25rem; background: linear-gradient(176deg, transparent 10%, var(--mark) 10% 90%, transparent 90%); color: var(--mark-ink); justify-self: start; padding: 0 .12em; }
.bill-table input { width: 84px; font: 600 .875rem var(--sans); font-variant-numeric: tabular-nums; padding: 6px 8px; border: 1px solid var(--ink); background: var(--canvas); color: var(--ink); text-align: right; }
.bill-table .rm { all: unset; cursor: pointer; color: var(--ink-3); display: grid; place-items: center; width: 32px; height: 32px; }
.bill-table .rm:hover { color: var(--up); }
.bill-table .use-unit { color: var(--ink-3); font-size: .75rem; margin-left: 4px; }
.bill-add { margin-top: 12px; max-width: 360px; }
.embed-builder { display: grid; gap: 14px; }
.code { font: .8125rem/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.embed-preview iframe { border: 0; background: transparent; display: block; }
.download-grid { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 8px 0 32px; border-top: 2px solid var(--rule); }
.dl { display: block; padding: 14px 0 16px; border: 0; border-bottom: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.dl:hover { background: none; }
.dl:hover strong { text-decoration: underline; }
.dl > span { display: grid; gap: 2px; font-size: .9375rem; }
.dl strong { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.filter { position: relative; max-width: 360px; margin-top: 20px; }
.filter .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.filter input { padding-left: 38px; }
.owner { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 32px; }
.owner img { border-radius: 50%; object-fit: cover; }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; }
.prose h2 { margin-top: 1.8em; padding-top: 12px; border-top: 2px solid var(--rule); }
.prose .page-head + h2, .prose > h2:first-child { margin-top: 0; }
.section.prose > h2:first-child, .prose.section > h2:first-child, .prose h2.kicker { border-top: 0; padding-top: 0; }
.prose h2.kicker { margin-top: 0; font-size: .75rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose .tips { padding-left: 0; }
.prose .table-wrap { margin: 16px 0; }
.formula { font: 500 1.0625rem/1.5 var(--serif); font-style: normal; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 0; overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 112px; background: #111111; color: #EDEDE8; padding: 56px 0 32px; font-size: .9375rem; }
:root[data-theme="dark"] .site-footer { background: #000; border-top: 1px solid var(--hairline); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #000; border-top: 1px solid var(--hairline); } }
.site-footer a { color: #EDEDE8; text-decoration: none; }
.site-footer a:hover { color: #111; background: var(--mark); }
.site-footer .logo { color: #fff; }
.site-footer .logo:hover { background: none; color: #fff; }
.site-footer .logo-mark { background: linear-gradient(180deg, transparent 58%, #6B5A10 58% 92%, transparent 92%); }
.footer-top { display: grid; gap: 40px; }
@media (min-width: 960px) { .footer-top { grid-template-columns: 300px 1fr; gap: 64px; } }
.footer-brand p { color: #B6B6B0; margin: 14px 0 0; }
.footer-stamp { font-size: .8125rem; }
.footer-cols { display: grid; gap: 32px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.fcol h2 { font-family: var(--sans); font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #EDEDE8; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #3A3A38; }
.fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 48px; padding-top: 18px; border-top: 1px solid #3A3A38; display: grid; gap: 8px; font-size: .8125rem; color: #9C9C96; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { color: #B6B6B0; text-decoration: underline; text-decoration-color: #555; }

/* ---------- Embed ---------- */
body.embed { background: transparent; padding: 2px; }

/* ---------- HTML comparison bars ---------- */
.hbars { display: grid; gap: 10px; border-top: 1px solid var(--ink); padding-top: 14px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 12px; align-items: center; font-size: .9375rem; }
.hbar-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-label a { color: inherit; text-decoration: none; }
.hbar-label a:hover { text-decoration: underline; }
.hbar-track { height: 12px; background: var(--canvas-soft); }
.hbar-fill { display: block; height: 100%; background: var(--q2); }
.hbar-val { font-weight: 650; min-width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }
.hbar.is-hl .hbar-label { color: var(--ink); font-weight: 700; }
.hbar.is-hl .hbar-fill { background: var(--ink); }
.hbar.is-hl .hbar-val { background: var(--mark); color: var(--mark-ink); padding: 0 4px; }
@media (max-width: 559px) { .hbar { grid-template-columns: 1fr auto; row-gap: 4px; } .hbar-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Small screens ---------- */
@media (max-width: 479px) {
  .field-row { grid-template-columns: 1fr; }
  .ledger-main dd { font-size: 2rem; }
  .logo { font-size: 1.5rem; }
}

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .dateline, .site-footer, .pg-side, .affiliate, .callout, .email-card, .link-grid { display: none !important; }
  body { background: #fff; color: #000; }
  mark { background: none; font-weight: 700; }
}
