:root {
  --bg: #0d1014;
  --surface: #161b22;
  --surface-2: #1f2630;
  --text: #f3f1ec;
  --muted: #a3aab4;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e8643c;
  --adapt: #3fb68b;
  --adapt-ink: #08241a;
  --radius: 18px;
  --topbar-h: 60px;
  --chips-h: 48px;

  --heat: #f0663a;
  --flood: #3d8bfd;
  --fire: #ff9a2e;
  --drought: #c9a24b;
  --storm: #8f7cf6;
  --sea: #22b5c9;
  --ice: #9fd6f2;
  --eco: #59c27a;
  --other: #8a929c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(13, 16, 20, 0.95), rgba(13, 16, 20, 0.75));
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 100, 60, 0.25);
}
.search {
  flex: 1;
  max-width: 520px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 15px;
}
.tracked-btn {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-weight: 600;
}
.tracked-btn svg { width: 16px; height: 16px; fill: var(--accent); }

/* ---------- Chips ---------- */
.chips {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  height: var(--chips-h);
  display: flex;
  gap: 8px;
  padding: 4px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 20;
  background: rgba(13, 16, 20, 0.75);
  backdrop-filter: blur(12px);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px; font-weight: 500;
  color: var(--muted);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--other)); }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--c, var(--text)); background: var(--surface-2); }

/* ---------- Feed (vertical snap scroll) ---------- */
.feed {
  position: fixed;
  inset: calc(var(--topbar-h) + var(--chips-h)) 0 0 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 28px;
  overflow: hidden;
}
.card-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.card-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(13,16,20,1) 0%, rgba(13,16,20,0.92) 38%, rgba(13,16,20,0.55) 70%, rgba(13,16,20,0.35) 100%);
}
.card-bg.noimg {
  background: radial-gradient(120% 80% at 70% 10%, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%), var(--bg);
  transform: none;
}

.card-inner {
  position: relative;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c);
  font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
}
.source { display: inline-flex; align-items: center; gap: 6px; }
.source img { width: 16px; height: 16px; border-radius: 4px; }

.card h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(26px, 4.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.card p.summary {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #d9dce0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-weight: 600; font-size: 15px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--adapt); color: var(--adapt-ink); border-color: transparent; }
.btn.primary:hover { background: #4fc89c; }
.btn.ghost:hover { background: #29313d; }
.btn.tracked svg { fill: var(--accent); stroke: var(--accent); }

.counter {
  position: absolute;
  right: 16px; top: 16px;
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Status cards (loading / empty / error) */
.card.status .card-inner { align-items: center; text-align: center; margin: auto 0; }
.card.status { align-items: center; }
.card.status h2 { font-size: 26px; }
.card.status p { color: var(--muted); margin: 0; max-width: 46ch; line-height: 1.5; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); opacity: 0.7;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, -4px); } }

/* ---------- Sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0, 0, 0, 0.55);
  animation: fade 0.2s ease;
}
.sheet {
  position: fixed; z-index: 31;
  left: 50%; bottom: 0;
  width: min(760px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  transform: translateX(-50%);
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 10px 24px 40px;
  animation: rise 0.28s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translate(-50%, 40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-close {
  position: absolute; right: 14px; top: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--surface-2);
  font-size: 22px; line-height: 1;
}
.sheet-kicker {
  margin: 8px 0 4px;
  color: var(--adapt);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.sheet h2 {
  margin: 0 40px 16px 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px; line-height: 1.2;
}
.sheet-body { font-size: 16px; line-height: 1.6; color: #dfe2e6; }
.sheet-body h3, .sheet-body h4 { font-size: 15px; margin: 20px 0 6px; color: var(--text); }
.sheet-body ul { padding-left: 20px; margin: 6px 0 12px; }
.sheet-body li { margin: 6px 0; }
.sheet-body li::marker { color: var(--adapt); }
.sheet-body strong { color: var(--text); }
.sheet-body a { color: var(--adapt); }
.sheet-body .loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 20px 0; }
.citations { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.citations h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.citations ol { margin: 0; padding-left: 20px; font-size: 14px; }
.citations li { margin: 4px 0; }
.citations a { color: var(--muted); }
.error { color: #ff8b7a; }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed; z-index: 31;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 16px;
  overflow-y: auto;
  animation: slide 0.25s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { position: relative; margin-bottom: 12px; }
.drawer-head h2 { margin: 6px 0; font-size: 20px; }
.drawer-head .sheet-close { top: 0; right: 0; }
.tracked-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tracked-list li {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex; flex-direction: column; gap: 6px;
}
.tracked-list a { font-weight: 600; text-decoration: none; line-height: 1.3; }
.tracked-list a:hover { text-decoration: underline; }
.tracked-list .row { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tracked-list .row button { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; }
.tracked-list .row button.adapt-link { margin-left: 0; color: var(--adapt); }
.empty-note { color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 640px) {
  .brand span:last-child { display: none; }
  .tracked-btn { padding: 0 12px; }
  .card { padding-bottom: 36px; }
  .card p.summary { font-size: 15px; -webkit-line-clamp: 7; }
  .btn { height: 44px; padding: 0 16px; font-size: 14px; }
  .sheet { padding: 10px 18px 32px; }
}

/* ---------- Cost comparison ---------- */
:root { --loss: #f0663a; }
.section-h {
  margin: 28px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--adapt);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cost-body .loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 12px 0; }
.cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cost-tile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border-top: 3px solid var(--c);
}
.cost-tile.loss { --c: var(--loss); }
.cost-tile.adapt { --c: var(--adapt); }
.cost-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.cost-num { font-family: "Fraunces", Georgia, serif; font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.cost-sub { font-size: 12px; color: var(--muted); }

.cost-bars { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 84px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar-row em { font-style: normal; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 14px; border-radius: 4px; background: rgba(255,255,255,0.05); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; position: relative; overflow: hidden; }
.bar i.loss { background: color-mix(in srgb, var(--loss) 45%, transparent); }
.bar i.loss b { position: absolute; inset: 0 auto 0 0; background: var(--loss); }
.bar i.adapt { background: var(--adapt); }
.bar-key { margin: 2px 0 0 94px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.bar-key i { width: 10px; height: 10px; border-radius: 2px; background: var(--loss); }

.verdict { margin: 14px 0; font-size: 16px; line-height: 1.5; }
.verdict strong { color: var(--adapt); }

.breakdown { border-top: 1px solid var(--line); padding: 10px 0; }
.breakdown summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.breakdown table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.breakdown td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.breakdown td:last-child { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.breakdown td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.breakdown ul { margin: 8px 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.basis { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.conf { font-weight: 600; }
.conf-high { color: var(--adapt); }
.conf-medium { color: var(--drought); }
.conf-low { color: var(--loss); }

@media (max-width: 640px) {
  .cost-num { font-size: 26px; }
  .bar-row { grid-template-columns: 70px 1fr 54px; }
  .bar-key { margin-left: 80px; }
}

/* ---------- Cost teaser on cards ---------- */
.tease {
  display: flex; align-items: center; gap: 18px;
  width: fit-content; max-width: 100%;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 27, 34, 0.72);
  backdrop-filter: blur(8px);
  text-align: left;
  transition: border-color 0.15s ease;
}
.tease:hover { border-color: rgba(255, 255, 255, 0.25); }
.tease-part { display: flex; flex-direction: column; gap: 1px; }
.tease small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.tease b {
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px; line-height: 1.15;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}
.tease b.loss { color: var(--loss); }
.tease b.adapt { color: var(--adapt); }
.tease-roi:empty { display: none; }
.tease-roi {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--adapt) 18%, transparent);
  color: var(--adapt);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.tease-part + .tease-part { padding-left: 18px; border-left: 1px solid var(--line); }

/* idle/loading: shimmering placeholders where the numbers will land */
.tease[data-state="idle"] b, .tease[data-state="loading"] b {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0.06) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
  min-width: 4.5ch;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.tease[data-state="ready"] b, .tease[data-state="ready"] .tease-roi { animation: pop 0.4s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.tease[data-state="error"] { display: none; }

@media (max-width: 640px) {
  .tease { gap: 12px; padding: 8px 12px; }
  .tease b { font-size: 20px; }
  .tease-part + .tease-part { padding-left: 12px; }
}

/* ---------- Event photos ---------- */
.card-bg.loaded { animation: photoIn 0.6s ease; }
@keyframes photoIn { from { opacity: 0; } }
.photo-credit {
  position: absolute; left: 16px; top: 14px; z-index: 1;
  max-width: 70%;
  font-size: 11px; color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.photo-credit:hover { color: #fff; text-decoration: underline; }

/* ---------- Database-backed feed additions ---------- */
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.attr {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  color: var(--muted);
}
.attr-study { color: var(--adapt); border-color: color-mix(in srgb, var(--adapt) 45%, transparent); }
.attr-trend { color: var(--drought); border-color: color-mix(in srgb, var(--drought) 45%, transparent); }
.attribution-note {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px; line-height: 1.5; color: #d9dce0;
}
.attribution-note .source-links { margin: 6px 0 0; }
.pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  vertical-align: 1px;
}
.precedent { color: var(--adapt) !important; opacity: 0.85; }
.source-links { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.source-links a { color: var(--muted); }
.source-links a:hover { color: var(--text); }
.full-link { margin-top: 20px; }

/* ---------- Event pages ---------- */
html.page { overflow: auto; height: auto; }
html.page body { overflow: visible; height: auto; }
.page-bar { position: sticky; justify-content: space-between; }
.page-bar .brand { color: inherit; text-decoration: none; }
.back-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.back-link:hover { color: var(--text); }

.hero {
  position: relative;
  min-height: min(68vh, 640px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 80px 16px 32px;
  overflow: hidden;
}
.hero-inner { position: relative; width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.hero h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero .summary { margin: 0; font-size: 18px; line-height: 1.55; color: #d9dce0; max-width: 62ch; }
.toll { margin: 0; font-weight: 600; color: var(--loss); }

.page-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 80px; }
.block { padding: 28px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; }
.block h2 {
  margin: 0 0 14px;
  font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.block h1 { font-family: "Fraunces", Georgia, serif; }
.block p { line-height: 1.6; }
.block a { color: var(--adapt); }
.attribution .attribution-label { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.attribution-study .attribution-label { color: var(--adapt); }
.attribution-trend .attribution-label { color: var(--drought); }
.attribution-uncertain .attribution-label { color: var(--muted); }

.cost-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cost-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost-table td:last-child { text-align: right; padding-left: 16px; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.cost-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.plain-list { margin: 0; padding-left: 20px; line-height: 1.6; }
.plain-list li { margin: 6px 0; }
.coverage span, .source-list span { color: var(--muted); font-size: 13px; }
.source-list { margin: 0; padding-left: 24px; line-height: 1.6; }
.source-list li { margin: 6px 0; }

@media (max-width: 640px) {
  .hero { min-height: 60vh; padding-top: 72px; }
  .hero .summary { font-size: 16px; }
}

/* ---------- Methodology v2: returns, recurrence, protection ---------- */
:root { --return: #f2c94c; }
.cost-grid.three { grid-template-columns: repeat(3, 1fr); }
.cost-tile.return { --c: var(--return); }
.attr-often { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.protect-none, .protect-planned_not_built, .protect-in_place_failed { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, transparent); }
.protect-partial { color: var(--drought); border-color: color-mix(in srgb, var(--drought) 45%, transparent); }
.protect-in_place_worked { color: var(--adapt); border-color: color-mix(in srgb, var(--adapt) 45%, transparent); }
.attribution-note.protect-none, .attribution-note.protect-planned_not_built, .attribution-note.protect-in_place_failed,
.attribution-note.protect-partial, .attribution-note.protect-in_place_worked { color: #d9dce0; border-left: 3px solid currentColor; }
.attribution-note.protect-none strong, .attribution-note.protect-planned_not_built strong, .attribution-note.protect-in_place_failed strong { color: var(--loss); }
.attribution-note.protect-partial strong { color: var(--drought); }
.attribution-note.protect-in_place_worked strong { color: var(--adapt); }
.protection .attribution-label { color: var(--loss); }
.protection.protect-partial .attribution-label { color: var(--drought); }
.protection.protect-in_place_worked .attribution-label { color: var(--adapt); }

.history-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history-list li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; }
.history-list.compact { margin: 8px 0 4px; gap: 4px; }
.history-list.compact li { grid-template-columns: 76px 1fr; font-size: 13px; }
.history-date { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.history-list small { color: var(--muted); }
.related { font-size: 14px; color: var(--muted); }
.lead { font-size: 17px; line-height: 1.6; color: #e3e5e8; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cost-table.measures { min-width: 560px; }
.cost-table thead th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 0 8px 12px; border-bottom: 1px solid var(--line); }
.cost-table thead th:first-child { text-align: left; padding-left: 0; }
.cost-table.measures td + td { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table.measures td:nth-child(n+3) { font-weight: 500; color: var(--muted); }

/* Header links */
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-link:hover { color: var(--text); }
.page-nav { display: flex; gap: 18px; }
.page-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.page-nav a:hover { color: var(--text); }

/* Methodology page */
.prose { padding-top: 24px; }
.prose h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; margin: 4px 0 14px; }
.prose h3 { margin: 22px 0 8px; font-size: 16px; }
.prose ol, .prose ul { line-height: 1.6; padding-left: 22px; }
.prose li { margin: 6px 0; }
.kicker { margin: 0; color: var(--adapt); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.toc { font-size: 14px; line-height: 1.9; color: var(--muted); }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); }
.formula { margin: 12px 0; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); }
.formula p { margin: 6px 0; }
.formula .formula-note { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.block[id] { scroll-margin-top: 80px; }

@media (max-width: 640px) {
  .cost-grid.three { grid-template-columns: 1fr 1fr; }
  .cost-grid.three .return { grid-column: span 2; }
  .nav-link { display: none; }
  .history-list li { grid-template-columns: 72px 1fr; }
}
