/* climate.xvn.app — hand-written, no build step. Bump $v in layout.php (and sw.js) after editing. */
@font-face { font-family: Geist; src: url(fonts/Geist-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/GeistMono-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-style: normal; font-display: swap; }

@property --glow { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #05070b; --bg2: #0a0e15; --card: rgb(255 255 255 / .035); --card-2: rgb(255 255 255 / .065); --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .15);
  --ink: #eef1f6; --ink-2: #aab3c2; --ink-3: #79839a; --glass: rgb(6 8 13 / .72);
  --hot: oklch(.68 .2 30); --warm: oklch(.78 .16 62); --ice: oklch(.75 .13 240); --good: oklch(.8 .15 160);
  /* chart series: this year, last year, reference, record-low year, ice, band */
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --s-now: #e5473d; --s-prev: #3987e5; --s-ref: #8b94a6; --s-low: #199e70; --s-ice: #5fb4ff; --s-band: rgb(255 255 255 / .075);
  --shadow: 0 30px 70px -30px rgb(0 0 0 / .8); --r: 22px; --r-s: 14px;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --gut: max(16px, min(4vw, 40px));
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f4ef; --bg2: #fffdf9; --card: rgb(255 255 255 / .7); --card-2: #fff; --line: rgb(20 22 30 / .09); --line-2: rgb(20 22 30 / .17);
  --ink: #12151c; --ink-2: #4c5466; --ink-3: #6c7385; --glass: rgb(246 244 239 / .8);
  --hot: oklch(.56 .2 29); --warm: oklch(.62 .16 55); --ice: oklch(.52 .15 250); --good: oklch(.55 .14 160);
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --s-now: #d42f25; --s-prev: #2a78d6; --s-ref: #6b7385; --s-low: #12936a; --s-ice: #1f6fd1; --s-band: rgb(20 22 30 / .07);
  --shadow: 0 26px 50px -30px rgb(60 40 20 / .35); color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4ef; --bg2: #fffdf9; --card: rgb(255 255 255 / .7); --card-2: #fff; --line: rgb(20 22 30 / .09); --line-2: rgb(20 22 30 / .17);
    --ink: #12151c; --ink-2: #4c5466; --ink-3: #6c7385; --glass: rgb(246 244 239 / .8);
    --hot: oklch(.56 .2 29); --warm: oklch(.62 .16 55); --ice: oklch(.52 .15 250); --good: oklch(.55 .14 160);
    --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --s-now: #d42f25; --s-prev: #2a78d6; --s-ref: #6b7385; --s-low: #12936a; --s-ice: #1f6fd1; --s-band: rgb(20 22 30 / .07);
    --shadow: 0 26px 50px -30px rgb(60 40 20 / .35); color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; interpolate-size: allow-keywords; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in oklab, var(--hot) 40%, transparent); }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
code { font: 500 .88em var(--mono); background: var(--card-2); padding: .12em .4em; border-radius: 6px; }
.prose a, .faq-a a, .src a, .lede a { text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 3px; }
.prose a:hover, .faq-a a:hover, .src a:hover, .lede a:hover { text-decoration-color: currentColor; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); view-transition-name: top; }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mark { width: 30px; height: 30px; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); filter: drop-shadow(0 4px 12px rgb(239 59 44 / .35)); }
.brand:hover .mark { transform: rotate(-20deg) scale(1.06); }
.word { font: 400 25px/1 var(--serif); letter-spacing: -.01em; }
.word em { font-style: italic; color: var(--hot); margin-left: 1px; }
.nav { display: flex; gap: 2px; margin-inline: auto; padding: 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.nav a, .tabs-m a { padding: 7px 14px; border-radius: 99px; font-weight: 500; font-size: 14px; color: var(--ink-2); transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover, .tabs-m a:hover { color: var(--ink); }
.nav a[aria-current], .tabs-m a[aria-current] { color: var(--ink); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.theme-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); flex-shrink: 0; }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .moon { display: none; } .theme-btn .sun { fill: currentColor; }
:root[data-theme="light"] .theme-btn .moon { display: block; fill: currentColor; stroke: none; }
:root[data-theme="light"] .theme-btn .sun, :root[data-theme="light"] .theme-btn .rays { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .moon { display: block; fill: currentColor; stroke: none; }
  :root:not([data-theme="dark"]) .theme-btn .sun, :root:not([data-theme="dark"]) .theme-btn .rays { display: none; }
}
.tabs-m { display: none; }
@media (max-width: 920px) {
  .nav { display: none; }
  .theme-btn { margin-left: auto; }
  .tabs-m { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gut) 10px; scroll-padding-inline: var(--gut); }
  .tabs-m::-webkit-scrollbar { display: none; }
  .tabs-m a { padding: 6px 12px; font-size: 13.5px; border: 1px solid var(--line); }
}

/* ---------- Type ---------- */
.display { font: 400 clamp(42px, 6.6vw, 96px)/.98 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
.h1 { font: 400 clamp(38px, 5.4vw, 76px)/1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.h2 { font: 400 clamp(30px, 3.8vw, 52px)/1.04 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.h3 { font: 600 20px/1.3 var(--sans); letter-spacing: -.01em; }
.kicker { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--warm); margin-bottom: 14px; }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 64ch; margin-top: 14px; text-wrap: pretty; }
.src { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.src time { white-space: nowrap; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-s); }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 99px; font-weight: 600; font-size: 15px; border: 1px solid var(--line-2); background: var(--card); backdrop-filter: blur(8px); transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.btn-hot { background: linear-gradient(120deg, oklch(.62 .22 28), oklch(.72 .18 48)); color: #fff; border-color: transparent; box-shadow: 0 12px 30px -12px oklch(.62 .22 28 / .8); }
.btn-hot:hover { border-color: transparent; box-shadow: 0 16px 36px -12px oklch(.62 .22 28 / .95); }
.chip { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--mono); padding: 6px 9px; border-radius: 99px; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.chip.up::before { content: "▲"; font-size: 9px; color: var(--hot); }
.chip.down::before { content: "▼"; font-size: 9px; color: var(--ice); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); display: inline-block; box-shadow: 0 0 0 0 color-mix(in oklab, var(--hot) 60%, transparent); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(92svh, 880px); display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 70px 0 110px; }
.hero-stripes { position: absolute; inset: 0; z-index: -2; }
.stripes { display: block; width: 100%; height: 100%; }
.hero-stripes .stripes { animation: unroll 2.4s cubic-bezier(.65, 0, .2, 1) both; }
@keyframes unroll { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero-veil { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, color-mix(in oklab, var(--bg) 92%, transparent) 0%, color-mix(in oklab, var(--bg) 78%, transparent) 42%, color-mix(in oklab, var(--bg) 10%, transparent) 78%, transparent),
  linear-gradient(0deg, var(--bg) 0%, transparent 32%); }
.hero-in { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--ink-2); padding: 8px 14px 8px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--glass); backdrop-filter: blur(10px); margin-bottom: 26px; }
.hero .display { max-width: 15ch; }
.hotnum { font-style: italic; white-space: nowrap; background: linear-gradient(100deg, oklch(.7 .21 30), oklch(.82 .16 65) var(--glow), oklch(.7 .21 30)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: glow 5s ease-in-out infinite alternate; padding-right: .06em; }
@keyframes glow { from { --glow: 20%; } to { --glow: 85%; } }
.hero-lede { max-width: 56ch; margin-top: 24px; font-size: clamp(16px, 1.45vw, 19px); color: var(--ink-2); text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ticker { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 2px; margin-top: 46px; width: fit-content; max-width: 100%; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line-2); background: var(--line); backdrop-filter: blur(14px); }
.ticker div { padding: 14px 20px; background: var(--glass); }
.ticker dt { font: 500 11.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ticker dd { font: 500 20px/1.3 var(--mono); margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticker small { font-size: 12px; color: var(--ink-3); }
.flag-rec { display: inline-block; vertical-align: 3px; font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--hot); padding: 4px 6px; border-radius: 6px; margin-left: 4px; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 99px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 3px; background: var(--ink-2); translate: -50% 0; animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(12px); opacity: .2; } }
@media (max-width: 760px) {
  .hero { min-height: auto; padding: 48px 0 70px; }
  .hero-veil { background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 70%, transparent), color-mix(in oklab, var(--bg) 88%, transparent) 40%, var(--bg)); }
  .ticker { grid-template-columns: 1fr 1fr; width: 100%; }
  .ticker div { padding: 12px 14px; }
  .ticker dd { font-size: 17px; white-space: normal; }
  .scroll-hint { display: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.phero { position: relative; padding: 70px 0 40px; isolation: isolate; overflow: hidden; }
.phero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1; background: radial-gradient(60% 60% at 20% 30%, color-mix(in oklab, var(--tone, var(--hot)) 22%, transparent), transparent 70%); filter: blur(10px); }
.phero .lede { font-size: clamp(18px, 1.7vw, 21px); max-width: 60ch; }
.phero .stripes.thin { height: 8px; width: 100%; border-radius: 8px; margin-top: 34px; }
.answer { margin-top: 26px; padding: 20px 22px; border-left: 3px solid var(--tone, var(--hot)); background: var(--card); border-radius: 0 var(--r-s) var(--r-s) 0; max-width: 72ch; font-size: 17px; color: var(--ink); }
.answer b { color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.toc a { font-size: 14px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--card); }
.toc a:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- Blocks ---------- */
.block { padding-block: clamp(60px, 9vw, 120px) 0; }
.sh { margin-bottom: 34px; max-width: 820px; }
.panel { background: linear-gradient(180deg, var(--card), transparent 120%); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 2.6vw, 30px); box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-h h3 { font: 600 18px/1.3 var(--sans); }
.panel-h .big { font: 400 34px/1 var(--serif); }

/* ---------- Vital cards ---------- */
.vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.vital { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto auto; gap: 10px; padding: 22px 22px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; container-type: inline-size; }
.vital::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--tone), transparent); opacity: .8; }
.vital::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -110px; border-radius: 50%; background: var(--tone); opacity: .1; filter: blur(50px); transition: opacity .3s; }
.vital:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.vital:hover::after { opacity: .2; }
.v-label { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.v-num { display: flex; align-items: baseline; gap: 8px; }
.v-num b { font: 400 clamp(48px, 17cqi, 66px)/.9 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.v-num small { font: 500 15px/1 var(--mono); color: var(--ink-2); }
.vital .chip { justify-self: start; }
.v-spark { height: 48px; color: var(--tone); }
.v-note { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.v-src { font: 500 11px/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.spark { width: 100%; height: 100%; overflow: visible; }
.spark .l { fill: none; stroke: currentColor; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .a { fill: currentColor; opacity: .1; }
.spark .z { stroke: var(--line-2); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.pa { position: relative; height: var(--h); margin: 12px 10px 30px 46px; touch-action: pan-y; }
.pa > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pa .g { stroke: var(--line); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.pa .g.z { stroke: var(--line-2); }
.pa .ln { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.pa .ln.dash { stroke-dasharray: 5 5; }
.pa .ln.faint { opacity: .55; }
.pa .area { opacity: .1; }
.pa .yr { fill: none; stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: .4; }
:root[data-theme="light"] .pa .yr { opacity: .5; }
.pa rect { shape-rendering: crispEdges; }
.yt, .xt { position: absolute; font: 500 11px/1 var(--mono); color: var(--ink-3); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.yt { right: calc(100% + 9px); transform: translateY(-50%); }
.xt { top: calc(100% + 10px); transform: translateX(-50%); }
.dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--c); transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--bg), 0 0 16px var(--c); pointer-events: none; }
.lab { position: absolute; transform: translate(12px, -50%); font: 600 12.5px/1 var(--mono); color: var(--ink); background: var(--glass); border: 1px solid var(--c); padding: 5px 7px; border-radius: 7px; white-space: nowrap; pointer-events: none; backdrop-filter: blur(6px); }
.lab.l { transform: translate(calc(-100% - 12px), -50%); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.legend i.d { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.legend i.b { height: 10px; border-radius: 3px; }
.legend b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
figcaption { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; max-width: 80ch; }
.xh { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink-3); pointer-events: none; opacity: 0; transition: opacity .15s; }
.hp { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--c); transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--bg); pointer-events: none; opacity: 0; }
.pa.on .xh, .pa.on .hp { opacity: 1; }
.tip { position: fixed; z-index: 60; left: 0; top: 0; min-width: 160px; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); font-size: 13px; pointer-events: none; }
.tip h4 { font: 600 12px/1.2 var(--mono); color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.tip p { display: flex; align-items: center; gap: 8px; justify-content: space-between; line-height: 1.7; }
.tip p span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.tip p span i { width: 10px; height: 3px; border-radius: 2px; background: var(--c); }
.tip p b { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; }
.dt { margin-top: 10px; font-size: 13.5px; }
.dt summary { cursor: pointer; color: var(--ink-3); width: fit-content; }
.dt summary:hover { color: var(--ink); }
.dt-scroll { max-height: 320px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.dt table { border-collapse: collapse; width: 100%; font: 13px var(--mono); }
.dt th, .dt td { padding: 6px 12px; text-align: right; border-bottom: 1px solid var(--line); font-weight: 400; }
.dt th[scope="row"], .dt thead th:first-child { text-align: left; }
.dt thead th { position: sticky; top: 0; background: var(--bg2); color: var(--ink-2); font-family: var(--sans); font-weight: 600; }
@media (max-width: 640px) {
  .pa { margin-left: 36px; margin-right: 4px; }
  .lab { font-size: 11px; }
  .xt:nth-of-type(even) { visibility: hidden; }
}
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.seg label { padding: 6px 13px; font-size: 13px; font-weight: 500; border-radius: 99px; color: var(--ink-2); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--warm); }
.ranged .rg { display: none; }
.ranged:has(input[value="a"]:checked) .rg-a, .ranged:has(input[value="b"]:checked) .rg-b { display: block; }

/* Stacked bar */
.stack { display: flex; gap: 2px; height: 34px; border-radius: 10px; overflow: hidden; margin: 6px 0 14px; }
.stack span { display: grid; place-items: center; background: var(--c); min-width: 3px; font: 600 12px var(--mono); color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.stack span:first-child { border-radius: 10px 0 0 10px; } .stack span:last-child { border-radius: 0 10px 10px 0; }

/* ---------- Spiral ---------- */
.spiral-sec { position: relative; }
.spiral-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 70px); align-items: center; }
.spiral-box { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--hot) 12%, transparent), transparent); }
.spiral { width: 100%; height: 100%; }
.spiral-year { position: absolute; inset: 0; display: grid; place-items: center; font: 400 clamp(32px, 5vw, 58px)/1 var(--serif); color: var(--ink); pointer-events: none; font-variant-numeric: tabular-nums; }
.rings { display: grid; gap: 8px; margin: 22px 0; font-size: 14.5px; color: var(--ink-2); }
.rings li { display: flex; gap: 10px; align-items: center; }
.rings i { width: 22px; height: 0; border-top: 2px dashed var(--c); }
@media (max-width: 860px) { .spiral-grid { grid-template-columns: 1fr; } }

/* ---------- Explainers ---------- */
.explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ex { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 26px 22px; min-height: 340px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); overflow: hidden; transition: transform .3s, border-color .3s; isolation: isolate; }
.ex::before { content: ""; position: absolute; inset: auto -30% -50% -30%; height: 90%; z-index: -1; background: radial-gradient(closest-side, color-mix(in oklab, var(--tone) 30%, transparent), transparent); opacity: .6; transition: opacity .4s, transform .6s; }
.ex:hover { transform: translateY(-4px); border-color: var(--line-2); }
.ex:hover::before { opacity: 1; transform: translateY(-8%); }
.ex-k { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.ex-num { font: 400 clamp(56px, 6vw, 84px)/1 var(--serif); margin-top: auto; color: var(--tone); letter-spacing: -.02em; }
.ex-cap { font-size: 14px; color: var(--ink-2); }
.ex-t { font-size: 17px; font-weight: 500; margin-top: 16px; text-wrap: pretty; }
.ex-go { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.ex:hover .ex-go { color: var(--ink); }
@media (max-width: 860px) { .explain { grid-template-columns: 1fr; } .ex { min-height: 0; } .ex-num { margin-top: 20px; } }

/* ---------- Map ---------- */
.map-wrap { position: relative; }
.map { width: 100%; height: auto; }
.map .sphere { fill: color-mix(in oklab, var(--ice) 6%, transparent); stroke: var(--line); }
.map .c { fill: var(--card-2); stroke: var(--bg); stroke-width: .5; transition: opacity .2s; }
.map .c.nd { fill: color-mix(in oklab, var(--ink-3) 25%, transparent); }
.map a:hover .c, .map a:focus-visible .c, .map .c.hl { stroke: var(--ink); stroke-width: 1.2; }
.map .c.focus { fill: var(--hot) !important; stroke: var(--ink); stroke-width: .8; }
.map-teaser { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.top-em h3 { font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 14px; }
.top-em ol { display: grid; gap: 4px; margin-bottom: 20px; }
.top-em .btn { white-space: nowrap; }
.top-em a { display: grid; grid-template-columns: 9.5em 1fr 3.4em; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; transition: background .2s; }
.top-em a:hover { background: var(--card-2); }
.te-n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.te-bar { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.te-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--warm), var(--hot)); }
.te-v { font: 600 13.5px var(--mono); text-align: right; }
.map-legend { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.map-legend .ramp { width: 200px; height: 8px; border-radius: 4px; }
@media (max-width: 860px) { .map-teaser { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { padding-block: clamp(60px, 9vw, 120px) 0; }
.faq-list { margin-top: 26px; border-top: 1px solid var(--line); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font: 500 clamp(17px, 1.5vw, 19px)/1.4 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .35s, content-visibility .35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq-a { padding: 0 0 22px; color: var(--ink-2); max-width: 75ch; }
.faq-a p + p { margin-top: 10px; }

/* ---------- Prose / explainers ---------- */
.prose { max-width: 70ch; color: var(--ink-2); font-size: 17px; }
.prose p + p { margin-top: 14px; }
.prose h3 { font: 600 20px/1.3 var(--sans); color: var(--ink); margin: 30px 0 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 30px; }
.fact { padding: 22px; border-radius: var(--r-s); background: var(--card); border: 1px solid var(--line); }
.fact b { display: block; font: 400 clamp(38px, 4vw, 52px)/1 var(--serif); color: var(--tone, var(--hot)); letter-spacing: -.02em; margin-bottom: 10px; }
.fact span { font-size: 15px; color: var(--ink-2); display: block; }
.fact small { display: block; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.diagram { width: 100%; height: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp thead th { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cmp td:nth-child(2) { color: var(--warm); } .cmp td:nth-child(3) { color: var(--hot); }
.cmp-wrap { overflow-x: auto; }
.bars { display: grid; gap: 6px; }
.bars a, .bars div.row { display: grid; grid-template-columns: minmax(7em, 11em) 1fr 4.6em; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 9px; }
.bars a:hover { background: var(--card-2); }
.bars .bn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.bars .bb { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.bars .bb i { display: block; height: 100%; border-radius: 5px; background: var(--c, linear-gradient(90deg, var(--warm), var(--hot))); }
.bars .bv { font: 600 13.5px var(--mono); text-align: right; white-space: nowrap; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.act { padding: 22px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); }
.act .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in oklab, var(--good) 16%, transparent); color: var(--good); margin-bottom: 14px; }
.act .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act h3 { font: 600 17px/1.3 var(--sans); margin-bottom: 6px; }
.act p { font-size: 14.5px; color: var(--ink-2); }
.act .imp { display: inline-block; margin-top: 12px; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 5px 8px; border-radius: 6px; background: var(--card-2); color: var(--ink-2); }
.cite { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* ---------- Countries ---------- */
.ctools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search input { width: 100%; height: 46px; padding: 0 16px 0 44px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; }
.search input:focus { outline: none; border-color: var(--warm); box-shadow: 0 0 0 4px color-mix(in oklab, var(--warm) 20%, transparent); }
.search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2; }
.search kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; }
.ctable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); }
.ctable { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.ctable th, .ctable td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ctable th:first-child, .ctable td:first-child { text-align: left; }
.ctable thead th { position: sticky; top: 0; background: var(--bg2); font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ctable thead button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; display: inline-flex; gap: 4px; align-items: center; }
.ctable thead th[aria-sort] button { color: var(--ink); }
.ctable thead th[aria-sort="descending"] button::after { content: "↓"; }
.ctable thead th[aria-sort="ascending"] button::after { content: "↑"; }
.ctable td { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ctable td:first-child { font-family: var(--sans); font-size: 14.5px; font-weight: 500; }
.ctable td:first-child a { display: inline-flex; gap: 10px; align-items: center; }
.ctable td:first-child a:hover { color: var(--warm); }
.ctable tbody tr:hover { background: var(--card-2); }
.ctable .neg { color: var(--good); } .ctable .pos { color: var(--hot); }
.ctable .mute { color: var(--ink-3); }
.flag { font-size: 1.2em; line-height: 1; }
.regions-f { display: flex; flex-wrap: wrap; gap: 6px; }
.regions-f button { font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); background: var(--card); }
.regions-f button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink-3); background: var(--card-2); }
.cstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-top: 30px; }
.cstat { padding: 20px; border-radius: var(--r-s); background: var(--card); border: 1px solid var(--line); }
.cstat dt { font: 600 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cstat dd { font: 400 40px/1.05 var(--serif); margin-top: 10px; letter-spacing: -.01em; }
.cstat dd small { font: 500 13px var(--mono); color: var(--ink-2); margin-left: 4px; }
.cstat p { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.chead { display: flex; align-items: center; gap: 18px; }
.chead .flag { font-size: clamp(44px, 6vw, 72px); }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a:hover { color: var(--ink); }
.near { display: flex; flex-wrap: wrap; gap: 8px; }
.near a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.near a:hover { border-color: var(--ink-3); }

/* ---------- About ---------- */
.srcs { display: grid; gap: 10px; }
.srcs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; padding: 18px 20px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); }
.srcs h3 { font: 600 16px/1.3 var(--sans); }
.srcs p { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); }
.srcs .when { font: 500 12px var(--mono); color: var(--ink-3); text-align: right; }
pre.api { font: 13px/1.6 var(--mono); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 18px; overflow-x: auto; color: var(--ink-2); }

/* ---------- 404 ---------- */
.nf { padding: 120px 0; text-align: center; }
.nf .h1 { margin: 10px 0 20px; }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); background: var(--bg2); }
.foot-stripes { width: 100%; height: 12px; }
.foot-in { display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; padding-block: 50px 30px; }
.foot-brand p { color: var(--ink-2); font-size: 14.5px; max-width: 40ch; margin-top: 14px; }
.foot-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-nav h2 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 14px; }
.foot-nav a { display: block; font-size: 14.5px; color: var(--ink-2); padding: 4px 0; }
.foot-nav a:hover { color: var(--ink); }
.foot-legal { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px 34px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.foot-legal p:first-child { max-width: 90ch; }
@media (max-width: 860px) { .foot-in { grid-template-columns: 1fr; } .foot-legal { flex-direction: column; } }
@media (max-width: 520px) { .foot-nav { grid-template-columns: 1fr 1fr; } }

/* ---------- Motion ---------- */
@keyframes rv { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
  .hero-stripes { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  @keyframes drift { to { transform: scale(1.12) translateY(-4%); filter: saturate(1.3); } }
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .2s ease-in both; }
::view-transition-new(root) { animation: vt-in .36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
@media (forced-colors: active) { .stripes, .foot-stripes { forced-color-adjust: none; } }
