:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #8a8984;
  --grid: #e6e5e1;
  --rule: #d8d7d2;
  --solar: #eb6834;
  --gas: #2a78d6;
  --coal: #1baf7a;
  --series4: #eda100;
  --cross: #0b0b0b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #1a1a19;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #8f8e88;
    --grid: #2e2e2c;
    --rule: #3a3a37;
    --solar: #d95926;
    --gas: #3987e5;
    --coal: #199e70;
    --series4: #c98500;
    --cross: #f0efec;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #1a1a19;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #8f8e88;
  --grid: #2e2e2c;
  --rule: #3a3a37;
  --solar: #d95926;
  --gas: #3987e5;
  --coal: #199e70;
  --series4: #c98500;
  --cross: #f0efec;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 860px; margin: 0 auto; padding: 32px 16px 48px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
.lede { color: var(--text-2); margin: 0 0 8px; max-width: 70ch; }
a { color: inherit; }

.chart { border-top: 1px solid var(--rule); margin-top: 36px; padding-top: 24px; }
.chart h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 6px; }
.sub { color: var(--text-2); font-size: 0.92rem; margin: 0 0 14px; max-width: 75ch; }
.canvas { position: relative; height: 380px; }
.note { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
details { margin-top: 10px; font-size: 0.88rem; color: var(--text-2); }
summary { cursor: pointer; }
.tablewrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 3px 12px 3px 0; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 600; color: var(--text); }

footer { border-top: 1px solid var(--rule); margin-top: 40px; padding-top: 20px; font-size: 0.88rem; color: var(--text-2); }
footer h2 { font-size: 1rem; color: var(--text); margin: 0 0 6px; }
footer h3 { font-size: 0.95rem; color: var(--text); margin: 18px 0 6px; }
footer ul { padding-left: 18px; margin: 0; }
footer li { margin-bottom: 4px; }
.method { margin-top: 18px; }

@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .canvas { height: 300px; }
}

/* Hero: the answer first, the charts below the fold. */
:root { --good: #0ca30c; --warn: #fab219; --bad: #d03b3b; --card: #f3f2ef; --track: #e6e5e1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card: #232322; --track: #333331; } }
:root[data-theme="dark"] { --card: #232322; --track: #333331; }

.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 16px 24px; max-width: 860px; margin: 0 auto;
}
.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero h1 {
  font-size: clamp(1.1rem, 2.6vw, 1.4rem); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); margin: 0;
}
.answer {
  font-size: clamp(4rem, 15vw, 8.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  margin: 8px 0 24px; color: var(--solar);
}
.bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; max-width: 520px; }
.seg { height: 14px; border-radius: 4px; background: var(--track); }
.seg.on { background: var(--solar); }
.seg.part { background: repeating-linear-gradient(135deg, var(--solar) 0 5px, var(--track) 5px 10px); }
.scope { color: var(--muted); font-size: 0.86rem; margin: -10px 0 18px; }
.score { font-weight: 600; margin: 10px 0 18px; }
.hero .lede { margin-bottom: 22px; }
.tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.test {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px;
  background: var(--card); text-decoration: none; color: var(--text); border: 1px solid transparent;
}
.test:hover { border-color: var(--rule); }
.test strong { font-size: 0.98rem; line-height: 1.3; }
.test .detail { font-size: 0.86rem; color: var(--text-2); }
.status { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status.good { color: var(--good); }
.status.warn { color: var(--text); }
.status.warn span { color: var(--warn); }
.status.bad { color: var(--bad); }
.hero-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.next-link { color: var(--solar); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.scroll {
  align-self: center; color: var(--text-2); text-decoration: none; font-size: 0.92rem;
}
.scroll span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .scroll span { animation: none; } }
main { padding-top: 0; }
@media (max-width: 860px) { .tests { grid-template-columns: 1fr; } }

/* Region switcher and comparison row. */
.regions { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.regions button, .compare button {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--rule); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
.regions button { font-size: 1rem; font-weight: 600; }
.regions button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.compare { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: 0.86rem; color: var(--text-2); }
.compare::before { content: "Every region:"; align-self: center; margin-right: 2px; }
.compare button { font-size: 0.86rem; padding: 4px 10px; }
.compare button.current { border-color: var(--text-2); }
.canvas.short { height: 440px; }
.group { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 56px 0 -16px; }

/* "And then what?" page. */
.back { color: var(--text-2); text-decoration: none; font-size: 0.92rem; margin-bottom: 28px; }
.next-answer { font-size: clamp(2.8rem, 8vw, 5.2rem); line-height: 1.02; }
.toc { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; font-size: 0.95rem; }
.toc li { margin-bottom: 8px; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule); }
.toc a:hover { border-color: var(--solar); }
.essay section { border-top: 1px solid var(--rule); padding-top: 28px; margin-top: 40px; }
.essay h2 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 18px; }
.essay p { max-width: 68ch; }
.kicker { color: var(--solar); font-weight: 800; font-size: 0.95rem; margin: 0 0 4px; }
.stat { display: flex; gap: 18px; align-items: baseline; margin: 0 0 18px; flex-wrap: wrap; }
.stat .big { font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 800; letter-spacing: -0.03em; color: var(--solar); line-height: 1; }
.stat .what { flex: 1 1 260px; color: var(--text-2); font-size: 0.98rem; }
.src { color: var(--muted); font-size: 0.82rem; }
.essay .wrap h2 { font-size: 1.3rem; }
@media (max-width: 620px) { .toc { columns: 1; } }

/* Beyond-price scorecard: one table per test, all three regions. */
#scorecard h3 { font-size: 1rem; margin: 26px 0 2px; }
table.scorecard { width: 100%; }
table.scorecard td { white-space: normal; text-align: left; vertical-align: top; padding: 8px 12px 8px 0; font-size: 0.9rem; }
table.scorecard td:nth-child(1), table.scorecard td:nth-child(2) { white-space: nowrap; }
table.scorecard td.val { min-width: 8em; }
table.scorecard td.val { font-weight: 600; }
table.scorecard tr.current { background: color-mix(in srgb, var(--text) 6%, transparent); }
table.scorecard .srcs { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
table.scorecard .srcs a { color: inherit; }
@media (max-width: 620px) {
  table.scorecard, table.scorecard tbody { display: block; width: 100%; }
  table.scorecard tr { display: grid; grid-template-columns: auto auto 1fr; column-gap: 10px; border-bottom: 1px solid var(--grid); }
  table.scorecard td { border: 0; padding: 6px 0 0; }
  table.scorecard td:nth-child(4) { grid-column: 1 / -1; padding-bottom: 8px; }
}

/* Hero: a plain verdict sentence, then the eight tests as two numbered steps. */
.summary { font-size: clamp(1.1rem, 2.4vw, 1.35rem); font-weight: 600; line-height: 1.35; margin: 0 0 14px; max-width: 40ch; }
.hero .compare { margin: 0 0 22px; }
.step { margin-bottom: 18px; }
.step-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline;
  font-weight: 700; font-size: 0.95rem; padding: 0 0 6px; border-bottom: 2px solid var(--text); }
.step-score { font-weight: 600; color: var(--text-2); font-size: 0.88rem; }
.row { display: grid; grid-template-columns: 2rem 1fr auto; gap: 12px; align-items: center; padding: 10px 4px;
  border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--text); }
.row:hover { background: var(--card); }
.num { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--card); border: 1px solid var(--rule);
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.what { display: flex; flex-direction: column; min-width: 0; }
.what strong { font-size: 1rem; line-height: 1.3; }
.fig { font-size: 0.86rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.row .status { white-space: nowrap; font-size: 0.85rem; }
.howto { color: var(--text-2); font-size: 0.88rem; margin: 4px 0 12px; }
.chart .kicker { color: var(--solar); font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px; }
.pricetests { padding-left: 0; list-style: none; margin: 16px 0 0; font-size: 0.9rem; color: var(--text-2); }
.pricetests li { margin-bottom: 10px; scroll-margin-top: 16px; }
.pricetests strong { color: var(--text); }
#scorecard h3 { scroll-margin-top: 16px; }
