/* LinuxPULSE – the heartbeat of Linux. A measurement log: quiet ink chrome, colour belongs to the data,
   the one bright mark is the pulse dot in Tux-feet yellow. Tokens and their roles: docs/brand.md. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }

/* ---- design tokens: the one place that sets the look (docs/brand.md) -------------------------------
   Colours are light-dark() pairs: the page follows the system theme, nothing is defined twice.
   Tux gives the palette: plumage #000 → ink, belly #fff → surfaces, feet #ffbc00 → the pulse dot,
   the one bright mark; his world of ice gives the cool data colour. Breakpoints (not tokens – media
   queries cannot read custom properties): phone ≤ 600, tablet ≤ 860, wide ≥ 1120. */
:root {
  color-scheme: light dark;
  /* surfaces and type */
  --page: light-dark(#f6f6f5, #0a0a0a);
  --surface: light-dark(#ffffff, #141414);
  --raised: light-dark(#efefee, #1f1f1f);
  --ink: light-dark(#0a0a0a, #f5f5f4);          /* 19.0 : 1 on surface, both themes */
  --ink-2: light-dark(#4d4d4d, #b5b5b3);        /* 8.4 : 1 / 9.6 : 1 */
  --ink-3: light-dark(#6e6e6e, #8c8c8a);        /* 5.1 : 1 / 5.6 : 1 – the smallest text (stamps) */
  --line: light-dark(rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0.09));
  --grid: light-dark(#ebebea, #262626);
  --axis: light-dark(#cdcdcb, #3a3a3a);
  /* brand: the pulse dot (Tux's feet) and the trace of a link on hover (his beak) */
  --feet: #ffbc00;
  --pulse: var(--feet);
  --beak: #ff942a;
  /* meaning: up and down, measurement bands and artefacts */
  --good: light-dark(#16794a, #4cc38a);
  --bad: light-dark(#c8312f, #e5484d);
  --band: light-dark(rgba(77, 77, 77, 0.10), rgba(181, 181, 179, 0.11));
  --hatch: light-dark(rgba(10, 10, 10, 0.16), rgba(245, 245, 244, 0.16));
  /* data series, fixed per source, validated for colour blindness in this order:
     feet amber, ice blue, beak orange, then aqua, violet, magenta, green, red */
  --s1: light-dark(#d99a00, #c98500); --s2: light-dark(#2f6bd1, #3f7fe0); --s3: light-dark(#d4531a, #d95926);
  --s4: light-dark(#1baf7a, #199e70); --s5: light-dark(#6250d6, #9085e9); --s6: light-dark(#e87ba4, #d55181);
  --s7: #008300; --s8: light-dark(#e34948, #e66767);
  /* pulse zones in plain words (brand.ZONE_*): growth green from light to dark, slow growth grey, losing ground red
     (the colour of loss everywhere). The pulse line itself is drawn in ink over the bands. */
  --z1: #c7e9b4; --z2: #7fcd7b; --z3: #3aa357; --z4: #1d7a3f; --z5: #0b4d2a;
  --z0: light-dark(#d6d6d2, #4a4a47); --zloss: #c8312f;
  /* world map: its own sequential amber scale (shares, not zones) */
  --m0: #fdf3d6; --m1: #fbd978; --m2: #f2b82b; --m3: #cc8a00; --m4: #7a5200;
  --mnone: light-dark(#e6e6e4, #262626); --mline: var(--surface);
  /* type: IBM Plex Sans for text, Plex Mono for readings, stamps and axes (both OFL, local) */
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  /* figures – readings, bpm, key figures – in Plex Sans Condensed SemiBold: tall and compact like a
     training computer's data field; always tabular */
  --figure: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --fs-display: 48px; --fs-h1: 30px; --fs-h2: 22px; --fs-body: 16px; --fs-small: 14px; --fs-meta: 13px; --fs-stamp: 12px;
  /* space on a 4 px grid; the rhythm between blocks is at the end of this file */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;
  /* shape and depth: controls 8, cards and charts 12, notes 14; a shadow only on what floats */
  --r-control: 8px; --r-card: 12px; --r-note: 14px;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.08);
  /* states: hover is a surface step, focus a ring in ink with the pulse colour around it */
  --hover: var(--raised);
  --focus-ring: 0 0 0 5px var(--feet);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }  /* classes like .stamp set display and would undo the attribute */
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--sans); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; transition: text-decoration-color 150ms var(--ease), color 150ms var(--ease); }
a:hover { text-decoration-color: var(--beak); }
a:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; box-shadow: var(--focus-ring); }
::selection { background: var(--feet); color: #0a0a0a; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 30px; letter-spacing: -0.01em; line-height: 1.2; }
@media (max-width: 600px) { h1 { font-size: 26px; } }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0 0 16px; }
strong { font-weight: 500; color: var(--ink); }
code { font: 13px var(--mono); background: var(--raised); border-radius: 4px; padding: 0 4px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.stamp { display: block; font: 400 12px/16px var(--mono); color: var(--ink-3); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 601px) { .wrap { padding: 0 32px; } }

/* service bar above the header: licence, credit, measurement problems, date of the figures */
.service-bar { background: var(--ink); color: var(--page); font-size: var(--fs-meta); }
.service-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.service-bar a { color: var(--page); text-decoration: none; opacity: .85; } .service-bar a:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--feet); }
.sb-updated { margin-left: auto; opacity: .85; }
@media (max-width: 860px) { .sb-licence, .sb-more { display: none; } .sb-updated { margin-left: 0; } }

/* header & footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; }
.brand-logo { display: block; height: 32px; width: auto; }
.brand-logo .lp-tile, .brand-logo .lp-word { fill: var(--ink); }
.brand-logo .lp-trace { stroke: var(--surface); }
.brand-logo .lp-dot, .pulse-icon .lp-dot { fill: var(--pulse); }
@media (max-width: 600px) { .brand-logo { height: 28px; } }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -8px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 8px; border-radius: 8px; font-size: 15px; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.site-nav a:hover { background: var(--raised); color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--feet); border-radius: 0; }
/* phones and tablets: the menu folds into a button (no script) */
.site-menu { display: none; }
.site-menu summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--axis); border-radius: 8px; font-size: var(--fs-small); font-weight: 500; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary { background: var(--raised); }
.site-menu:not([open]) nav { display: none; }
.site-menu nav { display: grid; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 8px 16px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.site-menu nav a { padding: 10px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-menu nav a[aria-current] { font-weight: 600; box-shadow: inset 3px 0 0 var(--feet); padding-left: 10px; }
.site-header { position: relative; }
@media (max-width: 1119px) { .site-nav { display: none; } .site-menu { display: block; } }
/* the pages behind a menu entry, as tabs at the top of each */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 6px 12px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-small); border-radius: 8px 8px 0 0; }
.subnav a:hover { color: var(--ink); background: var(--raised); }
.subnav a[aria-current] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--feet); }
/* language switch on pages with a German translation (legal notice, privacy); English is the site's language */
.lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin: 0 0 var(--sp-2); font-size: var(--fs-small); }
.lang-switch a { padding: 4px 10px; color: var(--ink-2); text-decoration: none; border-radius: 8px 8px 0 0; }
.lang-switch a:hover { color: var(--ink); background: var(--raised); }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--feet); }
main > .subnav + * { margin-top: var(--gap-block); }

main.wrap { padding-top: 40px; padding-bottom: 64px; }
/* footer: the dark brand band – the tile turns light on it, like on any dark ground */
.site-footer { --footer-ink: #f5f5f4; --footer-ink-2: #b5b5b3; --footer-ink-3: #8c8c8a;
  background: light-dark(#0a0a0a, #141414); color: var(--footer-ink-2); border-top: 1px solid var(--line); font-size: var(--fs-small); color-scheme: dark; }
.footer-grid { display: grid; gap: var(--sp-8) var(--sp-8); padding-top: var(--sp-12); padding-bottom: var(--sp-12); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; } }
.site-footer .brand-logo .lp-tile, .site-footer .brand-logo .lp-word { fill: var(--footer-ink); }
.site-footer .brand-logo .lp-trace { stroke: #0a0a0a; }
.footer-claim { margin: var(--sp-3) 0 var(--sp-2); color: var(--footer-ink); font-size: var(--fs-body); }
.footer-motto { display: block; font: 500 var(--fs-meta)/20px var(--mono); color: var(--feet); }
.site-footer .stamp { color: var(--footer-ink-3); }
.footer-col h2 { font-size: var(--fs-meta); font-weight: 500; color: var(--footer-ink); margin: 0 0 var(--sp-3); }
.footer-col p { margin: 0 0 var(--sp-3); }
.footer-col > a { display: block; width: max-content; padding: 2px 0; color: var(--footer-ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--footer-ink); text-decoration: underline; text-decoration-color: var(--feet); }
.site-footer a:focus-visible { outline-color: var(--footer-ink); }
/* sender of the freiversum (umbrella of the independent projects): one quiet line under the grid */
.footer-fv { border-top: 1px solid #2a2a2a; padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
.footer-fv a { display: inline-flex; align-items: center; gap: 8px; color: var(--footer-ink-2); text-decoration: none; }
.footer-fv svg { flex-shrink: 0; }
.footer-fv b { font-weight: 500; color: var(--footer-ink); }
.footer-fv a:hover b { text-decoration: underline; text-decoration-color: var(--feet); }
@media (max-width: 859px) { .footer-fv-tag { display: none; } }
/* the mark on hover: the line draws itself like on the star chart, the stars light up one after
   another and keep breathing, a comet travels the line back and forth, and radar pulses go out from
   the yellow star (LinuxPULSE). Same as on linuxundich.de. Only with a mouse (hover: hover) and
   without "reduce motion"; without :hover nothing moves – no animation, no CPU time. */
.footer-fv-l { stroke-dasharray: 1; transition: stroke .3s; }
.footer-fv-k { opacity: 0; stroke-dasharray: .07 2; stroke-dashoffset: .07; }
.footer-fv-s, .footer-fv-p { transform-box: fill-box; transform-origin: center; }
.footer-fv-p { opacity: 0; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .footer-fv a:hover .footer-fv-l { stroke: #9a9fc8; animation: fv-draw .7s cubic-bezier(.22, 1, .36, 1) both; }
  .footer-fv a:hover .footer-fv-s { animation: fv-twinkle .55s ease-out both, fv-breathe 1.6s ease-in-out .9s infinite alternate; }
  .footer-fv a:hover .footer-fv-s:nth-of-type(2) { animation-delay: .2s, 1.3s; }
  .footer-fv a:hover .footer-fv-s:nth-of-type(3) { animation-delay: .4s, 1.1s; }
  .footer-fv a:hover .footer-fv-s:nth-of-type(4) { animation-delay: .6s, 1.5s; }
  .footer-fv a:hover .footer-fv-k { opacity: .9; animation: fv-comet 2.4s ease-in-out .8s infinite alternate both; }
  .footer-fv a:hover .footer-fv-p { animation: fv-pulse 2.4s ease-out .7s infinite; }
  .footer-fv a:hover .footer-fv-p + .footer-fv-p { animation-delay: 1.9s; }
}
@keyframes fv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fv-twinkle { 40% { transform: scale(1.7) rotate(45deg); } to { transform: none; } }
@keyframes fv-breathe { to { transform: scale(1.2); } }
@keyframes fv-comet { from { stroke-dashoffset: .07; } to { stroke-dashoffset: -.93; } }
@keyframes fv-pulse { from { opacity: .85; transform: scale(.1); } 75%, to { opacity: 0; transform: scale(1); } }

/* hero: the range as the headline, the main chart under it; the readings and the pulse beside it */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (min-width: 1120px) { .hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; } }
.hero-main > * + * { margin-top: var(--sp-6); }
.hero-main > .lede { margin-top: 0; max-width: 44rem; }
.hero-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-content: start; }
@media (min-width: 601px) and (max-width: 1119px) { .hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.one-sentence { border-left: 3px solid var(--feet); padding: 4px 0 4px 18px; }
.one-sentence p { margin: 0; max-width: 46rem; } .one-sentence p:nth-child(2) { font-size: 19px; line-height: 28px; margin: 4px 0; }
.mistakes { margin: 0; padding-left: 20px; display: grid; gap: var(--sp-3); color: var(--ink-2); }
.mistakes strong { color: var(--ink); }
.hero h1 { font-size: clamp(30px, 24px + 1.6vw, 44px); letter-spacing: -0.02em; line-height: 1.06; margin-bottom: 16px; }
/* the one bright mark: the verdict underlined in Tux-feet yellow */
.verdict-mark { background: linear-gradient(transparent 72%, var(--feet) 72%, var(--feet) 92%, transparent 92%); padding: 0 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-main > .stamp { margin-bottom: 12px; }
.lede { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 36rem; }
.section-intro { color: var(--ink-2); max-width: 44rem; }
.page-head { }
.page-head .stamp { margin-bottom: 8px; }
.page-head .stamp a { color: inherit; }

/* readings: label, figure, change, stamp */
.readings { list-style: none; margin: 0; padding: 0 var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.readings li:last-child { border-bottom: 0; }
/* beside the chart the column is narrow: delta under the value, the stamp on its own line */
.hero-side .readings li { grid-template-areas: "name value" "stamp delta"; }
.hero-side .readings .stamp { align-self: start; }
.readings li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "stamp delta"; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.readings .r-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-2); font-size: 15px; }
.readings .r-name a { text-decoration: none; }
.readings .r-name a:hover { text-decoration: underline; }
.readings .r-value { grid-area: value; font: 600 34px/1 var(--figure); text-align: right; font-variant-numeric: tabular-nums; }
.readings .stamp { grid-area: stamp; }
.readings .delta { grid-area: delta; text-align: right; font-size: 13px; }
@media (max-width: 600px) {
  .readings li { grid-template-areas: "name value" "delta delta" "stamp stamp"; }
  .readings .delta { text-align: left; margin-top: 4px; }
}

.delta { font: 500 13px/16px var(--mono); white-space: nowrap; color: var(--ink-2); }
.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }
.delta .vs { font-weight: 400; color: var(--ink-3); }

/* context sources: quieter rows */
/* side by side only while each tile gets 280 px – in the half-width column of the start page they stack otherwise */
.context-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
/* name and value share the first line; change, stamp (with Copy) and note each get a full line of their own,
   so a long change ("→ +0.1 pp vs a year ago") never squeezes the name or the stamp into a narrow column */
.context-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "delta delta" "stamp stamp" "note note";
  align-items: baseline; gap: 4px 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.context-list .c-name { grid-area: name; display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.context-list .c-name a { overflow-wrap: normal; }
.context-list .c-value { grid-area: value; font: 600 26px/1.1 var(--figure); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.context-list .delta { grid-area: delta; justify-self: start; }
.context-list .stamp { grid-area: stamp; }
.context-list .c-note { grid-area: note; font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }

/* ranked list with thin bars (continents) */
.rank { list-style: none; margin: 0; padding: 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.rank li { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 64px minmax(104px, auto); align-items: center; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank .k-name a { text-decoration: none; font-weight: 500; }
.rank .k-name a:hover { text-decoration: underline; }
.rank .k-track { height: 4px; background: var(--raised); border-radius: 2px; }
.rank .k-bar { display: block; height: 4px; border-radius: 2px; background: var(--ink-2); }
.rank .k-value { text-align: right; font: 600 18px/1 var(--figure); font-variant-numeric: tabular-nums; }
.rank .delta { text-align: right; }
@media (max-width: 600px) {
  .rank li { grid-template-columns: 1fr auto; grid-template-areas: "name value" "track delta"; gap: 4px 12px; padding: 12px 0; }
  .rank .k-name { grid-area: name; } .rank .k-track { grid-area: track; } .rank .k-value { grid-area: value; } .rank .delta { grid-area: delta; }
}

/* stat cards (continent pages) */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 4px; align-content: start; }
.stat-label { font-size: 15px; color: var(--ink-2); margin: 0; }
.stat-value { font: 600 40px/1.05 var(--figure); margin: 4px 0; font-variant-numeric: tabular-nums; }

/* series keys */
.key { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.line-key { display: inline-block; width: 16px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 8px; flex: none; }
.band-key { display: inline-block; width: 16px; height: 8px; background: var(--band); border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.span-key { display: inline-block; width: 16px; height: 8px; background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 4px); border: 1px solid var(--line); border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.key-1 { background: var(--s1); } .key-2 { background: var(--s2); } .key-3 { background: var(--s3); } .key-4 { background: var(--s4); }
.key-5 { background: var(--s5); }
.key-6 { background: var(--s6); } .key-7 { background: var(--s7); } .key-8 { background: var(--s8); }
/* the pulse line: ink over the zone bands */
.line-key.key-zoned { height: 3px; background: var(--ink); }

/* charts */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; }
@media (max-width: 600px) { .chart { padding: 16px; } }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 16px; padding: 0; font-size: 13px; line-height: 16px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; }
.chart-area { position: relative; height: var(--h, 320px); }
@media (max-width: 600px) { .chart-area { height: calc(var(--h, 320px) * 0.8); } }
.chart-area svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-area text { font: 12px var(--mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }

.chart-area .lane-label { fill: var(--ink-3); font-size: 12px; }
.chart figcaption { font-size: 13px; line-height: 20px; color: var(--ink-3); margin-top: 16px; max-width: 48rem; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); padding: 8px 12px; font-size: 13px; min-width: 160px; z-index: 2; }
.chart-tip .tip-date { font: 12px var(--mono); color: var(--ink-3); margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; line-height: 20px; }
.chart-tip .tip-row strong { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.chart-tip .tip-row .line-key { margin-right: 0; }
.chart-tip .tip-row span.name { color: var(--ink-2); }
.chart-tip .tip-note { color: var(--ink-3); margin-top: 4px; max-width: 240px; white-space: normal; font-size: 12px; }

.table-view { margin-top: 12px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--ink-3); width: max-content; }
.table-view summary:hover { color: var(--ink); }
.table-view .table-scroll { max-height: 320px; overflow: auto; margin-top: 8px; }

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15px; }
th, td { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 13px; color: var(--ink-2); font-weight: 500; position: sticky; top: 0; background: var(--surface); }
thead th .muted { font-weight: 400; }
.data-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody th { font-weight: 400; }
.data-table tbody th a { text-decoration: none; font-weight: 500; }

/* bars (distributions) */
.bars { list-style: none; margin: 0 0 16px; padding: 12px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; }
.bars li { display: grid; grid-template-columns: minmax(112px, 176px) 1fr 64px; align-items: center; gap: 12px; min-height: 28px; font-size: 14px; }
.bar-label { overflow-wrap: anywhere; color: var(--ink-2); }
.bar-track { height: 8px; }
.bar { display: block; height: 8px; border-radius: 0 4px 4px 0; min-width: 2px; background: var(--ink-2); }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

/* layout helpers */
.split { display: grid; gap: 32px; }
@media (min-width: 1120px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split > * { min-width: 0; }
.more { font-weight: 500; text-decoration: none; }
.more:hover { text-decoration: underline; }
.plain-list { padding-left: 20px; color: var(--ink-2); margin: 0 0 16px; }
.note { border-left: 2px solid var(--feet); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--ink-2); max-width: 56rem; font-size: 15px; }
.prose { max-width: 44rem; }
.prose ul { padding-left: 20px; }
.todo { border: 1px dashed var(--bad); padding: 8px 12px; border-radius: 8px; color: var(--bad); }

/* sources */
.source-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; scroll-margin-top: 16px; }
.source-card h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 12px; }
.source-card dl { display: grid; grid-template-columns: 112px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.source-card dt { color: var(--ink-3); }
.source-card dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 1120px) { main > .hero { padding-top: 16px; } }

/* ticker: reports from other sites */
.ticker { list-style: none; margin: 0; padding: 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ticker li { display: grid; grid-template-columns: 96px 128px 1fr; gap: 4px 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ticker li:last-child { border-bottom: 0; }
.ticker .t-outlet { font-size: 13px; color: var(--ink-2); }
.ticker .t-title { text-decoration: none; font-weight: 500; line-height: 1.4; }
.ticker .t-title:hover { text-decoration: underline; text-decoration-color: var(--beak); }
.split > .ticker { align-self: start; }
@media (max-width: 860px) {
  .ticker li { grid-template-columns: auto 1fr; }
  .ticker .t-title { grid-column: auto; }
}
.ticker .t-body { display: grid; gap: 2px; }
.ticker .t-flag { font: 12px/16px var(--mono); color: var(--ink-3); }
.ticker .t-flag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--feet); margin-right: 6px; vertical-align: 1px; }
.ticker .t-flag a { text-decoration: none; }
.ticker .t-flag a:hover { text-decoration: underline; }
@media (max-width: 860px) { .ticker .t-body { grid-column: 1 / -1; } }
.artefact { border-left: 2px solid var(--feet); padding: 4px 0 4px 16px; margin: 16px 0 24px; }
.artefact h3 { font-size: 17px; }
.artefact ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.artefact li { margin-bottom: 6px; }
/* y labels sit inside the plot on their gridlines; a halo keeps them readable over lines */
.chart-area .y-label { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
/* the pulse graphic: values on the bars, the current year and the value now in ink */
.chart-area .bar-label { font: 400 12px var(--mono); fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart-area .bar-now { font: 600 15px var(--sans); fill: var(--ink); }
.chart-area .bar-value-now { font: 600 22px var(--figure); fill: var(--ink); }
.chart-area .x-now { font-weight: 600; fill: var(--ink); }
.chart-area .end-value { font: 600 26px var(--figure); fill: var(--ink); }
/* detail switches above a chart (render.chart, spec.details): off by default, the clear message first */
.chart-details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--sp-3); border: 0; padding: 0; }
.chart-details legend { float: left; margin-right: 6px; font: 400 var(--fs-stamp) var(--mono); color: var(--ink-3); padding: 0; }
.chart-details label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--axis); border-radius: 999px; font-size: var(--fs-meta); cursor: pointer; background: var(--surface); }
.chart-details label:has(input:checked) { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chart-details input { margin: 0; accent-color: var(--feet); }

/* ads: a calm card on the page's surface, marked Sponsored – no motion, no accent; colour only in the picture */
.hld-note { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px;
  display: grid; gap: 20px; align-items: center; max-width: 56rem; }
.hld-note.has-media { grid-template-columns: minmax(160px, 240px) 1fr; padding: 16px 24px 16px 16px; }
.hld-note-media { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--raised); }
.hld-note-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hld-note-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.hld-note .stamp { color: var(--ink-3); }
.hld-note .hld-note-title { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.35; color: var(--ink); text-wrap: balance; }
.hld-note .hld-note-title a { text-decoration: none; }
.hld-note .hld-note-title a:hover { text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; }
.hld-note .hld-note-text { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.hld-note .hld-note-link { justify-self: start; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.hld-note .hld-note-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .hld-note, .hld-note.has-media { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
}
.ticker .hld-note-row .stamp { color: var(--ink-3); }
/* ticker ad: same rhythm as the reports, a faint tint and a small picture */
.ticker li.hld-note-row { background: var(--page); margin: 0 -12px; padding: 12px; border-radius: 8px; border-bottom-color: transparent; }
.ticker li.hld-note-row.has-media { grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.ticker .hld-note-row .t-text { font-size: 13px; line-height: 1.45; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticker .hld-note-row .t-media { display: block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; }
.ticker .hld-note-row .t-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ticker li.hld-note-row.has-media .t-body { grid-column: auto; gap: 3px; }
.hld-slot[hidden] { display: none; }

/* chart export: one button under each chart and ranking opens the export manager (export.js) */
.export-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; }
.export-row .export-open { font: 500 14px var(--sans); color: var(--surface); background: var(--ink); border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.export-row .export-open:hover { background: color-mix(in srgb, var(--ink) 85%, var(--feet)); }
.export-row a { margin-left: auto; color: var(--ink-3); text-decoration: none; }
.export-row a:hover { text-decoration: underline; }
figure.chart > .export-row { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.export-wrap { min-width: 0; align-self: start; }

/* the export manager: preview left, choices right; full screen on phones */
.export-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }
.export-dialog::backdrop { background: rgba(10, 10, 10, .55); }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; margin: 0; max-height: calc(100vh - 34px); }
.ex-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ex-head h2 { font-size: 18px; margin: 0; }
.ex-close { font-size: 26px; line-height: 1; background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 0 4px; }
.ex-preview { margin: 0; padding: 20px; background: var(--raised); display: grid; place-items: center; align-content: center; gap: 10px; overflow: auto; min-height: 0; }
.ex-img { display: block; max-width: 100%; max-height: calc(100vh - 200px); width: auto; height: auto; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.ex-controls { padding: 16px 20px 20px; border-left: 1px solid var(--line); overflow: auto; display: grid; gap: 16px; align-content: start; }
.ex-controls fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-controls legend { font: 500 var(--fs-stamp) var(--mono); color: var(--ink-3); margin-bottom: 6px; padding: 0; }
.ex-controls fieldset label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.ex-controls fieldset label:has(input:checked) { background: var(--raised); color: var(--ink); }
.ex-controls fieldset label b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.ex-controls fieldset:disabled { opacity: .45; }
.ex-controls input { accent-color: var(--ink); margin: 0; }
.ex-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-actions button, .ex-credit-copy { font: 500 14px var(--sans); border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); }
.ex-actions .ex-download { background: var(--ink); color: var(--surface); border-color: var(--ink); flex: 1; }
.ex-actions button:disabled { opacity: .5; cursor: progress; }
.ex-status:empty { display: none; }
.ex-credit-row { display: flex; gap: 6px; margin-top: 4px; }
.ex-credit-row input { flex: 1; min-width: 0; font: 12px var(--mono); padding: 7px 8px; border: 1px solid var(--axis); border-radius: 6px; background: var(--page); color: var(--ink); }
.ex-credit-copy { padding: 6px 12px; font-size: 13px; }
.ex-more { margin: 0; color: var(--ink-3); }
@media (max-width: 860px) {
  .export-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .ex-grid { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; max-height: 100dvh; overflow: auto; }
  .ex-preview { padding: 12px; } .ex-img { max-height: 46vh; }
  .ex-controls { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}

/* chart generator */
.chartgen { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1120px) { .chartgen { grid-template-columns: 340px 1fr; } }
.cg-controls { display: grid; gap: 16px; }
@media (min-width: 1120px) { .cg-controls { position: sticky; top: 16px; } }
.cg-controls fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px; margin: 0; display: grid; gap: 8px; }
.cg-controls legend { font-weight: 500; padding: 0 4px; }
.cg-controls label { font-size: 14px; color: var(--ink-2); }
.cg-controls input[type=text], .cg-controls input[type=number], .cg-controls select { width: 100%; font: 15px var(--sans); padding: 8px 10px; border: 1px solid var(--axis);
  border-radius: 8px; background: var(--page); color: var(--ink); }
.cg-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cg-format { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--page);
  color: var(--ink); cursor: pointer; font: 14px var(--sans); }
.cg-format:hover { border-color: var(--axis); }
.cg-format[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface); }
.cg-format .cg-ratio { font: 500 15px var(--mono); }
.cg-format .cg-use { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.cg-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.cg-custom .cg-pair { grid-template-columns: auto 1fr auto 1fr; margin-top: 8px; }
.cg-check { display: flex; gap: 8px; align-items: center; }
.cg-size-note { margin: 0; }
.cg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cg-actions button { font: 500 14px var(--sans); padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.cg-actions button.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cg-actions button:disabled { opacity: 0.5; cursor: progress; }
.cg-actions .stamp { flex-basis: 100%; margin: 4px 0 0; }
.cg-preview { display: grid; place-items: center; padding: 24px; background: var(--raised); border-radius: 12px; min-height: 360px; }
.cg-preview img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08); background: #fff; }
.cg-preview.tall img { width: auto; max-width: 100%; }

/* monthly reports: a readable column; tables and the chart may use the full width */
.report .lede { max-width: 44rem; margin-bottom: 32px; }
.report h2 { margin-top: 48px; }
.report .report-section { font-size: 17px; line-height: 28px; }
.report .report-section p { margin: 0 0 16px; }
.report .report-section .stamp { white-space: nowrap; }
.report .chart { margin-top: 32px; }
.report-table { margin-top: 8px; }
.report-table .muted-row th, .report-table .muted-row td { color: var(--ink-3); }
.report-table td { font-variant-numeric: tabular-nums; }
.report-pager { display: flex; justify-content: space-between; gap: 16px; margin: 48px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.report-pager a { text-decoration: none; font-weight: 500; }
.report-list { list-style: none; padding: 0; margin: 0; max-width: 48rem; }
.report-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.report-list li:first-child { padding-top: 0; }
.report-list .t-title, .report-teaser .t-title { font-size: 20px; font-weight: 500; text-decoration: none; line-height: 1.35; }
.report-list p, .report-teaser p { margin: 0; color: var(--ink-2); }
.report-teaser { display: grid; gap: 8px; align-content: start; }

/* skip link, focus for every control, text only for screen readers (QA 2026-11-02) */
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 20; padding: 8px 12px; background: var(--ink); color: var(--surface); border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 8px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: var(--focus-ring); }
main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* "Find a figure" in the header */
.site-search { position: relative; flex: 1 1 220px; max-width: 280px; }
.site-search[hidden] { display: none; }
.site-search input { width: 100%; box-sizing: border-box; font: 14px var(--sans); padding: 6px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--page); color: var(--ink); }
.search-results { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(440px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.search-results [role=option] a { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.search-results [role=option] .stamp { grid-column: 1 / -1; }
.search-results [aria-selected=true] a { background: var(--raised); }
.search-results .sr-value { font-variant-numeric: tabular-nums; }
.search-empty { padding: 8px 10px; color: var(--ink-3); font-size: 14px; }
@media (max-width: 860px) { .site-search { max-width: none; flex-basis: 100%; order: 3; margin-top: 4px; } .search-results { left: 0; right: auto; } }

/* copy a key figure with its source */
.copy-cite { font: 400 12px/16px var(--mono); color: var(--ink-2); background: none; border: 0; padding: 0; margin-left: 8px; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; }
.copy-cite::before { content: "· "; color: var(--ink-3); text-decoration: none; display: inline-block; margin-right: 4px; }
.copy-cite:hover { color: var(--ink); }

/* how a source counts */
.method { font: 500 12px/16px var(--mono); padding: 1px 6px; border: 1px solid var(--axis); border-radius: 4px; margin-right: 4px; }

/* generator: chart picker and series */
.cg-origin { margin: 0; }
.cg-series { display: grid; gap: 4px; }
.cg-series .line-key { margin-right: 0; }
.data-table tr:target > * { background: color-mix(in srgb, var(--feet) 22%, var(--surface)); }


/* press and brand page */
.press-figures { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.press-figures li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.brand-files { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.brand-files-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.brand-file { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.brand-preview { display: grid; place-items: center; min-height: 120px; padding: var(--sp-5); background: var(--raised); }
.brand-preview img { display: block; max-width: 100%; max-height: 72px; width: auto; height: auto; }
.brand-files-wide .brand-preview img { max-height: 200px; }
.brand-on-light { background: #ffffff; } .brand-on-dark { background: #0a0a0a; }
.brand-file p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-small); }
.brand-file p strong { font-weight: 500; flex-basis: 100%; }
.brand-file p .stamp { flex-basis: 100%; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -3px; margin-right: var(--sp-2); }
.palette td { text-align: left; font-family: var(--mono); font-size: var(--fs-meta); }
.palette td:last-child { font-family: var(--sans); font-size: var(--fs-small); }
.profile-texts .bio { white-space: pre-line; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-4); margin-bottom: var(--sp-2); }
.cg-side { display: grid; gap: 16px; min-width: 0; }
.cg-embed { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.cg-embed h2 { font-size: 16px; }
.cg-embed textarea + .stamp { margin-top: var(--sp-2); }
.cg-embed textarea { width: 100%; box-sizing: border-box; font: 12px/1.5 var(--mono); padding: 8px; border: 1px solid var(--axis); border-radius: 8px; background: var(--page); color: var(--ink); resize: vertical; }
.static-links { margin-top: 12px; }
@media (max-width: 1119px) { .cg-side { display: contents; } .cg-preview { order: -1; min-height: 0; padding: 12px; } .cg-embed { order: 1; } }  /* after .cg-side */

/* world map: one amber scale, light to dark; untracked countries quiet */
.map svg.world { display: block; width: 100%; height: auto; }
.map .m { stroke: var(--mline); stroke-width: 0.5; }
.map a:hover .m, .map a:focus-visible .m { stroke: var(--ink); stroke-width: 1.2; }
.m-k0 { fill: var(--m0); background: var(--m0); } .m-k1 { fill: var(--m1); background: var(--m1); } .m-k2 { fill: var(--m2); background: var(--m2); }
.m-k3 { fill: var(--m3); background: var(--m3); } .m-k4 { fill: var(--m4); background: var(--m4); } .m-none { fill: var(--mnone); background: var(--mnone); }
.map-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; border: 1px solid var(--line); }
.legend .legend-title { font-weight: 500; color: var(--ink); }
.map-switch { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.map-switch button { font: 500 14px var(--sans); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.map-switch button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.map-switch:not(.ready) { display: none; }
.stat-meta { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Vertical rhythm (QA 2026-11-02): space only between siblings, in four steps, the same on every page.
   section 64 (48 on phones) – between independent blocks; block 32 (24) – after a page head, a row of
   figures or a note that belongs to what follows; related 12 – a caption or note under a table or chart,
   the map under its switch; inside a block headings and intros keep their own small margins. */
:root { --gap-section: 64px; --gap-block: 32px; --gap-related: 12px; }
@media (max-width: 860px) { :root { --gap-section: 48px; --gap-block: 24px; } }
main > * { margin-top: 0; margin-bottom: 0; }
main > * + * { margin-top: var(--gap-section); }
main > .page-head + *, main > h1 + .lede + *, main > .stats + *, main > .stats + .note + * { margin-top: var(--gap-block); }
main > .note { margin-top: var(--gap-block); }
main > h1 + .lede, main > h1 + p { margin-top: 8px; }
main > p.small, main > .map, main > .chartgen-nojs { margin-top: var(--gap-related); }
.page-head > :last-child { margin-bottom: 0; }
section > h2, .split > div > h2, .split > section > h2 { margin-bottom: 12px; }
section > .section-intro { margin-bottom: 16px; }
section > :last-child, .split > * > :last-child { margin-bottom: 0; }
.bars { margin-bottom: 0; }
.export-wrap > .export-row, .export-wrap + .static-links { margin-top: var(--gap-related); }
section > * + .export-wrap, section > * + .table-scroll, section > * + figure, .split > * > * + .export-wrap { margin-top: 0; }
/* text after a table, chart or picture belongs to it but needs air: one paragraph step (16), never 0 */
:is(section, .split > *) > :is(.table-scroll, .export-wrap, figure) + :is(p, .prose, ul, ol),
:is(section, .split > *) > :is(.table-scroll, .export-wrap, figure) + [hidden] + :is(p, .prose, ul, ol) { margin-top: var(--sp-4); }

/* release marks: a small triangle in the colour of the distribution's line */
.release-key { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--ink-3); vertical-align: middle; margin-right: 8px; }
.release-key.key-1 { border-bottom-color: var(--s1); background: none; } .release-key.key-2 { border-bottom-color: var(--s2); background: none; }
.release-key.key-3 { border-bottom-color: var(--s3); background: none; } .release-key.key-4 { border-bottom-color: var(--s4); background: none; }
.release-key.key-5 { border-bottom-color: var(--s5); background: none; } .release-key.key-6 { border-bottom-color: var(--s6); background: none; }
.release-key.key-7 { border-bottom-color: var(--s7); background: none; } .release-key.key-8 { border-bottom-color: var(--s8); background: none; }
.chart-tip .release-key { margin-right: 6px; }

/* Linux pulse: the module beside the readings on the overview, a link to /pulse/ */
.pulse-readout { display: block; padding: var(--sp-4) var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.pulse-readout:hover { border-color: var(--axis); }
.pr-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); }
.pr-title { display: flex; align-items: center; font-size: var(--fs-small); font-weight: 500; margin: 0; }
.pr-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: var(--sp-2) 0 0; }
.pr-value strong { font: 600 48px/1 var(--figure); font-variant-numeric: tabular-nums; }
.pr-zone { display: inline-flex; align-items: center; font: 500 14px/1 var(--mono); color: var(--ink-2); }
.pr-text { display: block; margin: var(--sp-2) 0 0; font-size: var(--fs-small); color: var(--ink-2); }
.pulse-readout .zone-scale { margin: var(--sp-4) 0 var(--sp-2); }
.pulse-readout .more { display: block; font-size: var(--fs-small); color: var(--link, var(--ink)); text-decoration: underline; text-decoration-color: var(--feet); }
/* the pulse sign (the logo's trace without its tile) stands in front of every pulse reading; it does not move */
.pulse-icon { display: inline-block; vertical-align: -3px; margin-right: 8px; color: var(--ink); flex: none; }
/* /pulse/: the published value beside the question and the sentence to quote */
.pulse-hero { display: grid; gap: var(--sp-6) var(--sp-12); align-items: end; }
@media (min-width: 860px) { .pulse-hero { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.ph-value { margin: var(--sp-2) 0 0; font: 600 clamp(96px, 12vw, 168px)/0.9 var(--figure); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ph-value .unit { font: 400 20px/1 var(--mono); color: var(--ink-2); }
.pulse-word { display: flex; align-items: center; font: 500 16px/1.2 var(--mono); margin: var(--sp-4) 0 0; }
.pulse-hero h1 { font-size: clamp(28px, 22px + 1.6vw, 42px); margin-bottom: var(--sp-3); }
.pulse-hero .lede { max-width: 42rem; }
.ph-quote { border-left: 3px solid var(--feet); padding: 2px 0 2px 14px; margin: var(--sp-4) 0 0; font-style: italic; max-width: 42rem; }
.pulse-formula { font-size: 15px; }
.prose h3 { margin-top: var(--gap-block); }
.read-cards { list-style: none; margin: 0 0 var(--sp-6); padding: 0; display: grid; gap: var(--sp-4); }
@media (min-width: 860px) { .read-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.read-cards li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-5); }
.read-cards h3 { margin: var(--sp-2) 0 var(--sp-1); font-size: 18px; } .read-cards p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
.rc-num { font: 600 40px/1 var(--figure); color: var(--ink-2); } .rc-up { color: var(--good); } .rc-loss { color: var(--bad); }
.pulse-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.ps-row { display: grid; gap: var(--sp-3) var(--sp-6); align-items: center; padding: var(--sp-4) var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
@media (min-width: 860px) { .ps-row { grid-template-columns: 200px minmax(0, 1fr) 240px; } }
.ps-row.mid { border-color: var(--feet); box-shadow: inset 0 0 0 1px var(--feet); }
.ps-name { font-weight: 600; } .ps-name a { color: var(--ink); } .ps-name .stamp, .ps-val .stamp { display: block; font-weight: 400; }
.ps-track { position: relative; height: 12px; background: var(--raised); border-radius: 6px; }
.ps-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--z1), var(--z3) 55%, var(--z5)); }
.ps-rest { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink-2); }
.ps-val strong { font: 600 28px/1 var(--figure); }
.ps-note { margin: var(--sp-3) 0 0; }
.zone-list { display: none; list-style: none; margin: var(--sp-4) 0 0; padding: 0; gap: 6px; font-size: var(--fs-small); }
.zone-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 4px; }
.zone-list li.now { font-weight: 600; }
@container (max-width: 640px) { .zone-scale:not(.compact) .zb-label { display: none; } .zone-list { display: grid; } }
/* pulse scale (brand.zone_scale draws the same for pictures): 30–200 bpm, heart rate above, yearly growth below */
.zone-scale { margin: 16px 0 8px; container-type: inline-size; }
.zone-bar { position: relative; height: 20px; margin: 4px 0; }
.zb { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--surface); border-right: 1px solid var(--surface); border-radius: 4px; }
.zb--1 { background: var(--zloss); }
.zb-0 { background: var(--z0); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.zb-1 { background: var(--z1); } .zb-2 { background: var(--z2); } .zb-3 { background: var(--z3); } .zb-4 { background: var(--z4); } .zb-5 { background: var(--z5); }
.zb-label { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 0 4px; font: 500 12px/1 var(--sans); color: #0a0a0a; white-space: nowrap; }
.zone-scale:not(.compact) .zone-bar { height: 28px; }
.zb-4 .zb-label, .zb-5 .zb-label, .zb--1 .zb-label { color: #ffffff; }
.zone-cell { white-space: nowrap; }
/* the zone the pulse is in: an ink bar under its segment */
.zb.now::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 3px; border-radius: 2px; background: var(--ink); }
.zb-mark { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface); z-index: 1; }
.zone-axis { position: relative; height: 16px; margin: 0; }
.zone-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.zone-axis .loss { transform: none; } .zone-axis span:last-child { transform: translateX(-100%); }
.zone-growth { margin-top: 8px; }
.zone-growth .loss { color: var(--bad); }
/* figures: number large, unit small beside it */
.unit { font: 500 0.5em/1 var(--sans); color: var(--ink-2); margin-left: 0.18em; letter-spacing: 0; }
.rank .k-value .unit, .context-list .c-value .unit { font-size: 0.6em; }
/* the zone's colour as a small square, the key beside its name */
.zone-badge { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.45em; border-radius: 3px; vertical-align: -0.08em; flex: none; }
.zone-badge.zb-0, .zone-badge.zb-1 { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }
.zone-badge::after { content: none; }
/* labels follow the width of the scale, not of the window: in the overview's narrow column the minor ones go */
@container (max-width: 640px) { .zone-axis .minor { display: none; } }

/* events in charts: hairline, numbered badge; the most important ones named above the plot; list below */
.chart-area .ev-line { stroke: var(--axis); stroke-width: 1; }
.chart-area .ev-line.major { stroke: var(--ink-3); }
.chart-area .ev-line.hot { stroke: var(--ink); stroke-width: 2; }
.chart-area .ev-badge circle { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1; }
.chart-area .ev-badge.major circle { fill: var(--ink); stroke: var(--ink); }
.chart-area .ev-badge .ev-num { font: 600 10px var(--mono); fill: var(--ink-2); }
.chart-area .ev-badge.major .ev-num { fill: var(--surface); }
.chart-area .ev-badge.hot circle { fill: var(--feet); stroke: var(--ink); }
.chart-area .ev-badge.hot .ev-num { fill: #0a0a0a; }
.chart-area .lane-label.major { fill: var(--ink); font-weight: 500; }
.event-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.event-list li { display: inline-flex; align-items: baseline; gap: 6px; }
.event-list li.major { color: var(--ink); font-weight: 500; }
.event-list .ev-n { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ink-3); font: 600 10px/1 var(--mono); flex: none; transform: translateY(3px); }
.event-list li.major .ev-n { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.event-list .stamp { display: inline; font-weight: 400; }
.event-list a { color: inherit; }

/* year in review */
.year-figure { margin: 0; max-width: 800px; }
.year-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); }
.year-downloads { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: var(--sp-3); font-size: var(--fs-meta); }
.year-thumb img { display: block; width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); }
.year-events { list-style: none; padding: 0; }
.year-events strong { display: inline-block; min-width: 24px; font-family: var(--mono); }

/* /pulse/: the full monthly chart folds away under the clear graphics */
.pulse-full { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-5); }
.pulse-full > summary { cursor: pointer; font-weight: 500; }
.pulse-full[open] > summary { margin-bottom: var(--sp-4); }
.pulse-graphic > h2 { font-size: clamp(22px, 18px + 1vw, 30px); }

/* a record high, only with a full three-month average */
.pb { margin-left: var(--sp-2); padding: 1px 6px; white-space: nowrap; border-radius: 4px; background: var(--feet); color: #0a0a0a; font: 500 11px/16px var(--mono); }

/* Advertise page (/advertise/): rules, placement screenshots, prices, enquiry form. Neutral class names (hld-…): filter lists hide
   anything called ad-, ads- or sponsor-. Black and white only, no yellow (that belongs to the verdict). */
.hld-button { display: inline-block; font: 500 15px var(--sans); padding: 10px 18px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  text-decoration: none; cursor: pointer; margin: 0 8px 8px 0; }
.hld-button:hover { opacity: .88; }
.hld-button-quiet { background: transparent; color: var(--ink); }
.hld-rules { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.hld-rules > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.hld-rules h3 { font-size: 18px; margin: 0 0 6px; }
.hld-rules p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.hld-offer { display: grid; gap: 32px; margin-top: 24px; }
.hld-offer-slot { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; scroll-margin-top: 88px; }
.hld-offer-slot.hld-offer-text-only { grid-template-columns: minmax(0, 1fr); }
.hld-offer-text h3 { font-size: 20px; margin: 0 0 4px; }
.hld-offer-text p { margin: 8px 0 0; color: var(--ink-2); max-width: 34rem; }
.hld-offer-text .stamp { margin-top: 0; }
.hld-offer-price { color: var(--ink) !important; }
.hld-offer-price strong { font: 600 22px/1.2 var(--figure); font-variant-numeric: tabular-nums; }
.hld-offer-fig { margin: 0; }
.hld-offer-fig figcaption { margin-top: 6px; }
.hld-zoom { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.hld-zoom img { display: block; width: 100%; height: auto; }
.hld-zoom:hover { border-color: var(--axis); }
.hld-lightbox { max-width: min(96vw, 1800px); max-height: 96vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); overflow: auto; }
.hld-lightbox::backdrop { background: rgb(0 0 0 / .72); }
.hld-lightbox img { display: block; width: 100%; height: auto; cursor: zoom-out; }
.hld-lightbox form { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 400 12px var(--mono); color: var(--ink-3); }
.hld-lightbox button { font: 500 14px var(--sans); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); cursor: pointer; }
.hld-form { display: grid; gap: 14px 16px; grid-template-columns: 1fr 1fr; max-width: 52rem; margin-top: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.hld-form label { display: grid; gap: 4px; font: 500 14px var(--sans); }
.hld-form input, .hld-form select, .hld-form textarea { font: 400 15px var(--sans); padding: 9px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--page);
  color: var(--ink); width: 100%; box-sizing: border-box; }
.hld-form textarea { min-height: 8rem; resize: vertical; }
.hld-form-wide { grid-column: 1 / -1; }
.hld-form-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--ink-2); }
.hld-form-check input { width: auto; margin-top: 4px; }
.hld-form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hld-form p { margin: 0; }
.hld-form label > .stamp { display: inline; }
@media (max-width: 720px) {
  .hld-offer-slot { grid-template-columns: minmax(0, 1fr); }
  .hld-form { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}
