/*
  AI layoffs tracker — design system.
  Contract: docs/architecture.md, section 7 «Дизайн»: poster / neo-brutalism, white, light only. Owner: F.
  Usage notes: docs/ui.md. Token names from the contract must not change; extra tokens are derived helpers.
  Black type, one hot red, a yellow marker. Hard black borders (--bw), hard shadows (--shadow), no blur, ~no radius.
  Red (#FF2D20) is below AA for small text: red only for big type (≥ 24 px, or ≥ 19 px bold) and fills.
  CSP: no inline styles; dynamic values only through custom properties set via CSSOM.
*/

/* ============ 0. Fonts (self-hosted, variable) ============ */

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-extra-condensed-600-900-normal-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-extra-condensed-600-900-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-400-700-normal-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-400-700-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ 1. Tokens ============ */

:root {
  color-scheme: light;

  /* contract tokens */
  --c-bg: #FFFFFF;
  --c-surface: #FFFFFF;
  --c-ink: #0A0A0A;
  --c-muted: #55595F;
  --c-line: #0A0A0A;
  --c-line-soft: #E6E6E6;
  --c-accent: #FF2D20;
  --c-accent-ink: #FFFFFF;
  --c-accent-weak: #FFE5E2;
  --c-pop: #FFE14D;
  --c-ok: #1F7A4D;
  --bw: 3px;
  --shadow: 6px 6px 0 var(--c-ink);
  --c-map-0: #F4F4F5;   /* no data: lighter and cooler than step 1 */
  --c-map-1: #FFC2BB;   /* steps 1–5 evenly spaced: ΔE (CIELAB) 27 / 27 / 29 / 22 / 26, «no data» → step 1: 27 */
  --c-map-2: #FF8F84;
  --c-map-3: #FF5A4C;
  --c-map-4: #FF2D20;
  --c-map-5: #B3160C;

  /* derived helpers */
  --shadow-sm: 4px 4px 0 var(--c-ink);   /* small buttons, chips, stickers */
  --shadow-lg: 8px 8px 0 var(--c-ink);   /* the big buttons */
  --c-surface-2: #F4F4F4;      /* hover rows */
  --c-field-border: #0A0A0A;   /* form controls: black */
  --c-danger: #B3261E;         /* small error text: AA on white, accent-weak and surface-2 */
  --c-ok-weak: #E3F2EA;
  --c-bar: #0A0A0A;            /* chart bars: black; selected / current: red */
  --c-track: var(--c-line-soft);
  --c-hatch: #8A8A8A;
  --c-skeleton: #ECECEC;
  --c-focus: var(--c-ink);
  --c-accent-hover: #E8180B;

  /* type */
  --font-display: "Sofia Sans Extra Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-xs: 0.8125rem;                                        /* 13 — meta, axis */
  --fs-sm: 0.9375rem;                                        /* 15 — UI, captions */
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);       /* 16 → 17 — body */
  --fs-md: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);       /* 18 → 20 — lede */
  --fs-lg: clamp(2rem, 1.4rem + 3vw, 3.5rem);                /* 32 → 56 — h2 (display) */
  --fs-xl: clamp(3rem, 11vw, 8rem);                          /* 48 → 128 — h1 on product screens */
  --fs-2xl: clamp(3.5rem, 13vw, 10rem);                      /* display */
  --fs-counter: clamp(5rem, 2.5rem + 14vw, 12rem);           /* hero counter */

  --lh-tight: 0.92;
  --lh-snug: 1.25;
  --lh-body: 1.55;

  /* space (4 px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --w-page: 76rem;
  --w-text: 44rem;
  --radius: 2px;
  --radius-lg: 4px;
  --t-fast: 120ms;
}

/* ============ 2. Reset ============ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--c-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;            /* tilted stickers, shadows and the pulse ring never cause sideways scroll */
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, fieldset, table { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

::selection { background: var(--c-pop); color: var(--c-ink); }

/* Visible focus: 3 px black ring. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
}
main:focus, main:focus-visible, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ 3. Typography ============ */

/* Display face: uppercase, heavy, tight. */
h1, h2, h3, .h1, .h2, .h3, .display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1, .h1 { font-size: var(--fs-xl); }
h2, .h2 { font-size: var(--fs-lg); font-weight: 900; }
h3, .h3 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem); font-weight: 800; line-height: 1; }
h4, .h4 { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 700; line-height: var(--lh-snug); }
.display { font-size: var(--fs-2xl); line-height: 0.88; }

p, li { text-wrap: pretty; }

.lede {
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--c-ink);
  max-width: 34em;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink);
  line-height: 1.1;
}

/* Yellow marker under a word, and a red word (red only on big type). */
.mark {
  padding-inline: 0.06em;
  background: none;
  color: inherit;
  box-shadow: inset 0 -0.58em 0 var(--c-pop);   /* covers the descender zone + lower part of the letters */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mark--red { color: var(--c-accent); box-shadow: none; padding-inline: 0; }

.small, small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.muted { color: var(--c-muted); }
.num, .tabular {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.nowrap { white-space: nowrap; }
.center { text-align: center; }
strong, b { font-weight: 700; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
}
a:hover { text-decoration-color: var(--c-accent); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }

hr, .divider {
  border: 0;
  border-top: var(--bw) solid var(--c-line);
  margin-block: var(--s-7);
}

/* ============ 4. Layout ============ */

.container {
  width: min(100% - 2 * var(--gutter), var(--w-page));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2 * var(--gutter), var(--w-text)); }

main, .page { flex: 1 0 auto; }
.page { padding-block: clamp(2rem, 1.2rem + 4vw, 4rem) clamp(4rem, 2.5rem + 5vw, 7rem); }

.page-head { margin-bottom: clamp(2rem, 1.4rem + 2.5vw, 3.5rem); }
.page-head > * + * { margin-top: var(--s-4); }
.page-head .eyebrow + h1 { margin-top: var(--s-2); }

.section { margin-block: clamp(3.5rem, 2.2rem + 5vw, 6.5rem); }
.section:first-child { margin-top: 0; }
.section:last-child { margin-bottom: 0; }
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-5);
}
.section__head > p { color: var(--c-muted); font-size: var(--fs-sm); }

.flow > * + * { margin-top: var(--flow, 1em); }
.stack { display: flex; flex-direction: column; gap: var(--stack, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, var(--s-3)); }

.grid {
  --grid-gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  --grid-col-gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: minmax(0, 1fr);
}
/* At most 2 / 3 columns; collapse to one when a column would get narrower than 20rem / 15rem. */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(20rem, (100% - var(--grid-col-gap)) / 2)), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(15rem, (100% - 2 * var(--grid-col-gap)) / 3)), 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) {
  .grid--sidebar { grid-template-columns: 17rem minmax(0, 1fr); }
}

/* ============ 5. Shell: header, footer, skip link ============ */

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: var(--s-3);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border: var(--bw) solid var(--c-ink);
  background: var(--c-pop);
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 10;
  background: var(--c-bg);
  border-bottom: var(--bw) solid var(--c-line);
}

/*
  narrow:  brand · CTA · lang   /  links in one scrollable row
  ≥ 56rem: brand · links … CTA · lang
  no CTA (/report): same without the CTA cell
*/
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "brand cta lang" "nav nav nav";
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding-block: var(--s-3) 0;
}
.site-header__inner.is-no-cta {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand lang" "nav nav";
}
.site-header__inner > .brand { grid-area: brand; }
.site-header__inner > .site-nav { grid-area: nav; }
.site-header__inner > .site-header__cta { grid-area: cta; }
.site-header__inner > .lang-switch { grid-area: lang; justify-self: end; }

@media (min-width: 56rem) {
  .site-header__inner, .site-header__inner.is-no-cta {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "brand nav cta lang";
    column-gap: var(--s-5);
    padding-block: var(--s-4);
  }
  .site-header__inner > .site-nav { justify-self: end; }
}

.brand {
  display: block;
  justify-self: start;
  max-width: 100%;
  min-width: 8ch;              /* reserves room while the dictionary loads */
  min-height: 2.75rem;
  overflow: hidden;
  text-overflow: ellipsis;     /* last resort when a long translated button needs the room */
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  font-weight: 900;
  line-height: 2.75rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-ink);
  text-decoration: none;
}
.brand:hover { color: var(--c-ink); }
.brand::before {               /* the red dot from the favicon */
  content: "";
  display: inline-block;
  margin-inline-end: 0.35em;
  vertical-align: -0.04em;
  width: 0.62em;
  height: 0.62em;
  border: 0.09em solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-accent);
}

/* Links: one row; on narrow screens it scrolls sideways without a visible scrollbar. */
.site-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav__list { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s-5); padding-block: 0.125rem; }
.site-nav__list > li { flex: none; }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.125rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: var(--bw) solid transparent;
}
.site-nav__link:hover { border-bottom-color: var(--c-ink); }
.site-nav__link[aria-current="page"] { border-bottom-color: var(--c-accent); }
.site-nav__link:focus-visible { outline-offset: -1px; }  /* stays inside the scroll box */

.site-header__cta { justify-self: end; white-space: nowrap; }
@media (max-width: 29.99rem) {
  /* Long translations («Meldung abgeben», «Заполнить анкету») break into two short lines. */
  .site-header__cta.btn--sm { max-width: 7.5rem; padding: 0.3rem 0.6rem; white-space: normal; line-height: 0.95; }
}
@media (max-width: 22.49rem) {
  /* ~320 px: brand a bit smaller, the button breaks per word, tighter gaps. */
  .site-header__inner { column-gap: var(--s-2); }
  .brand { font-size: 1.3rem; }
  .site-header__cta.btn--sm { width: min-content; max-width: none; padding-inline: 0.5rem; }
  .lang-switch__code { padding-inline: 0.45rem; }
}

/* Language switch: a real <select>; on narrow screens only the code (EN ▾) is shown on top of it. */
.lang-switch { position: relative; display: inline-flex; }
.lang-switch__code {
  display: none;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  padding-inline: 0.55rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-bg);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--c-ink);
  pointer-events: none;
}
.lang-switch__code::after {
  content: "";
  width: 0.32em;
  height: 0.32em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg);
}
@media (max-width: 39.99rem) {
  .lang-switch__code { display: inline-flex; }
  .lang-switch__select {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    opacity: 0;
    font-size: 16px;           /* no zoom on iOS */
    cursor: pointer;
  }
  .lang-switch__select:hover + .lang-switch__code { background: var(--c-pop); }
  .lang-switch__select:focus-visible + .lang-switch__code { outline: 3px solid var(--c-focus); outline-offset: 3px; }
}

.site-footer {
  margin-top: auto;
  border-top: var(--bw) solid var(--c-line);
  color: var(--c-ink);
}
.site-footer__inner { padding-block: var(--s-4); }
.site-footer__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.site-footer__list > li + li::before {
  content: "\00B7";
  content: "\00B7" / "";
  display: inline-block;
  padding-inline: 0.55em;
}
.site-footer__list a { display: inline-block; padding-block: 0.6rem; text-decoration: none; }
.site-footer__list a:hover, .site-footer__list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: var(--bw); }

/* ============ 6. Buttons ============ */

/* Rectangular, uppercase display face, black border, hard shadow; hover lifts, press sinks in. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border: var(--bw) solid var(--c-ink);
  border-radius: 0;
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 1.375rem;           /* ≥ 19 px bold: «large text», so white on red passes AA (3.7:1) */
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--c-ink); }
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--c-ink); }
.btn:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 4px; }

.btn--primary { background: var(--c-accent); color: var(--c-accent-ink); }
.btn--primary:hover { background: var(--c-accent-hover); color: var(--c-accent-ink); }
.btn--secondary { background: var(--c-surface); color: var(--c-ink); }
.btn--secondary:hover { background: var(--c-pop); }
.btn--pop { background: var(--c-pop); color: var(--c-ink); }
.btn--pop:hover { background: var(--c-pop); }

/* Quiet variants: no frame, no shadow. */
.btn--ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn--ghost:hover { transform: none; box-shadow: none; background: var(--c-surface-2); }
.btn--ghost:active { transform: none; background: var(--c-pop); }
.btn--link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
.btn--link:hover, .btn--link:active { transform: none; box-shadow: none; text-decoration-line: underline; text-decoration-color: var(--c-accent); }
.btn--link.small { font-size: var(--fs-sm); }

.btn--sm { min-height: 2.75rem; padding: 0.375rem 0.875rem; font-size: 1.1875rem; box-shadow: var(--shadow-sm); }
.btn--sm:hover { box-shadow: 6px 6px 0 var(--c-ink); }
.btn--sm:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--c-ink); }
.btn--lg { min-height: 3.75rem; padding: 0.75rem 1.75rem; font-size: 1.75rem; }
.btn--block { display: flex; width: 100%; }

/* Big call to action: ≥ 72 px tall, full width below 40rem. */
.btn--xl {
  min-height: 4.5rem;
  padding: 1rem 2.5rem;
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem);
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}
.btn--xl:hover { box-shadow: 11px 11px 0 var(--c-ink); transform: translate(-3px, -3px); }
.btn--xl:active { transform: translate(8px, 8px); box-shadow: 0 0 0 var(--c-ink); }
@media (max-width: 39.99rem) {
  .btn--xl { display: flex; width: 100%; padding-inline: 1.25rem; }
}

.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; box-shadow: none; transform: none; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* Buttons inside tables (admin) stay flat: no shadow on every row. */
td .btn, th .btn { box-shadow: none; }
td .btn:hover, th .btn:hover, td .btn:active, th .btn:active { transform: none; box-shadow: none; }
td .btn:hover, th .btn:hover { background: var(--c-pop); }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }

/* The round red button — main call to action on the home page. */
.btn-round {
  --d: clamp(13rem, 62vw, 18rem);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: var(--d);
  height: var(--d);
  padding: 1.75rem;
  border: 4px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
.btn-round__main {
  display: block;
  font-size: calc(var(--d) * 0.165);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.btn-round__sub {
  display: block;
  font-size: max(1.1875rem, calc(var(--d) * 0.08));   /* never below 19 px bold: AA on red */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.04em;
}
.btn-round:hover { color: var(--c-accent-ink); background: var(--c-accent-hover); transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--c-ink); }
.btn-round:active { transform: translate(8px, 8px); box-shadow: 0 0 0 var(--c-ink); }
.btn-round:focus-visible { outline: 4px solid var(--c-ink); outline-offset: 6px; }
/* Slow pulse ring. */
.btn-round::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 4px solid var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  animation: round-pulse 2.6s ease-out infinite;
}
.btn-round:hover::after, .btn-round:active::after { animation: none; opacity: 0; }
@keyframes round-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.22); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-round::after { display: none; }
  .btn-round:hover, .btn-round:active { transform: none; }
}

/* ============ 7. Forms ============ */

.form > * + * { margin-top: var(--s-6); }

.field { display: grid; gap: var(--s-2); min-width: 0; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
legend.field__label { padding: 0; margin-bottom: var(--s-2); }
.field__label, .choices__legend {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.field__hint { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.45; }
.field__error {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-danger);
  line-height: 1.45;
}
.field__error:empty { display: none; }

.tag {
  display: inline-block;
  margin-inline-start: 0.4em;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-muted);
  vertical-align: 0.15em;
}

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.625rem 0.875rem;
  border: var(--bw) solid var(--c-field-border);
  border-radius: 0;
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  transition: box-shadow var(--t-fast) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--c-muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { box-shadow: var(--shadow-sm); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  box-shadow: var(--shadow-sm);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.75rem;
  text-overflow: ellipsis;
  /* One bold black chevron as an SVG data-URI (img-src allows data:). Drawn as a single path,
     so it stays clean at fractional widths, unlike the former two-gradient arrow. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%230A0A0A' stroke-width='3' stroke-linecap='square'/%3E%3C/svg%3E");
  background-position: right 0.85rem center;
  background-size: 0.875rem 0.5625rem;
  background-repeat: no-repeat;
  cursor: pointer;
}
.select--compact {
  width: auto;
  min-height: 2.75rem;
  padding-block: 0.25rem;
  padding-inline: 0.625rem 2.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.textarea { min-height: 6rem; resize: vertical; }

.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--c-danger);
  background-color: var(--c-accent-weak);
}
.field.is-invalid .field__label { color: var(--c-danger); }

.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }

/* Radio / checkbox rows: black frame each; the checked row turns yellow. */
.choices { border: 0; padding: 0; min-width: 0; }
.choices__legend { padding: 0; margin-bottom: var(--s-3); }
.choices__hint { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--s-3); }
.choices__list { display: grid; gap: var(--s-2); }
.choices--inline .choices__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }

.choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  padding: 0.75rem 0.875rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-bg);
  cursor: pointer;
  transition: background-color var(--t-fast) ease;
}
.choice:hover { background: var(--c-surface-2); }
.choice:has(input:checked) { background: var(--c-pop); }
.choice:has(input:disabled) { opacity: 0.45; cursor: not-allowed; background: var(--c-bg); }
.choice:has(input:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 3px; }

.choice input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.05em 0 0;
  border: var(--bw) solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-bg);
  cursor: pointer;
}
.choice input[type="checkbox"] { border-radius: 0; }
.choice input::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--c-ink);
  transform: scale(0);
  transition: transform 100ms ease;
}
.choice input[type="checkbox"]::before {
  width: 0.7rem;
  height: 0.4rem;
  border-radius: 0;
  background: transparent;
  border-left: 3px solid var(--c-bg);
  border-bottom: 3px solid var(--c-bg);
  transform: rotate(-45deg) scale(0);
  margin-top: -0.15rem;
}
.choice input:checked::before { transform: scale(1); }
.choice input[type="checkbox"]:checked { background: var(--c-ink); }
.choice input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.choice input:focus-visible { outline: none; }    /* the whole row gets the ring */

.choice__body { display: block; min-width: 0; }
.choice__title { display: block; font-weight: 600; line-height: var(--lh-snug); }
.choice:has(input:checked) .choice__title { font-weight: 700; }
.choice__hint { display: block; margin-top: 0.15rem; font-size: var(--fs-sm); color: var(--c-ink); line-height: 1.4; }

.choices.is-invalid .choice, .choices[aria-invalid="true"] .choice { border-color: var(--c-danger); }
.choices.is-invalid .choices__legend { color: var(--c-danger); }

/* Honeypot: hidden from people; aria-hidden="true" on the wrapper, tabindex="-1" on the input. */
.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.disclosure > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  list-style: none;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before {
  content: "+";
  display: inline-grid;
  place-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-inline-end: 0.5rem;
  border: var(--bw) solid var(--c-ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}
.disclosure[open] > summary::before { content: "\2212"; background: var(--c-pop); }

/* ============ 8. Alerts, notes, empty, skeletons ============ */

.alert {
  padding: 0.875rem 1rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-surface);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert > * + * { margin-top: var(--s-1); }
.alert__title { font-weight: 700; }
.alert--error { background: var(--c-accent-weak); box-shadow: var(--shadow-sm); }
.alert--error .alert__title { color: var(--c-danger); }
.alert--ok { background: var(--c-ok-weak); box-shadow: var(--shadow-sm); }
.alert--info { background: var(--c-surface-2); }

/* Caveat line: small text. The accent variant is a yellow plate (e.g. «Not enough reports»). */
.note { font-size: var(--fs-sm); line-height: 1.5; color: var(--c-muted); }
.note > * + * { margin-top: var(--s-1); }
.note__title { font-weight: 700; color: var(--c-ink); }
.note a { color: var(--c-ink); }
.note--accent {
  padding: 0.75rem 1rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-pop);
  color: var(--c-ink);
  font-weight: 600;
}
.note--quiet { font-size: var(--fs-xs); }

.empty {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: clamp(2rem, 1.5rem + 4vw, 4.5rem) var(--s-4);
  border: var(--bw) dashed var(--c-ink);
  text-align: center;
}
.empty__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  font-weight: 900;
  line-height: var(--lh-tight);
  text-transform: uppercase;
}
.empty__text { max-width: 30em; color: var(--c-muted); }
.empty__actions { margin-top: var(--s-3); }

.chart-empty {
  padding: var(--s-5) var(--s-4);
  border: 2px dashed var(--c-ink);
  color: var(--c-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
}

.skeleton {
  display: block;
  background: var(--c-skeleton);
  animation: skeleton-pulse 1.4s steps(2, jump-none) infinite;
}
.skeleton--text { height: 0.85em; margin-block: 0.4em; }
.skeleton--title { height: 1.6em; width: 55%; }
.skeleton--metric { height: 3rem; width: 7rem; max-width: 100%; }
.skeleton--bar { height: 0.75rem; }
.skeleton--block { height: 12rem; }
.skeleton--w25 { width: 25%; }
.skeleton--w50 { width: 50%; }
.skeleton--w75 { width: 75%; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============ 9. Cards, link cards, metrics, steps ============ */

.card {
  min-width: 0;
  padding: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  border: var(--bw) solid var(--c-ink);
  background: var(--c-surface);
  box-shadow: var(--shadow);
}
.card--plain { box-shadow: none; }                     /* long rows of cards (statistics) */
.card--flat { padding: 0; border: 0; box-shadow: none; background: none; }
.card--outside { border-style: dashed; box-shadow: none; background: var(--c-surface); }
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  margin-bottom: var(--s-4);
}
.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.card__meta {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.card__body > * + * { margin-top: var(--s-3); }
.card__foot {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line-soft);
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

/* Big link plate with a title and an arrow (home → /punch, /talk). */
.linkcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title arrow" "text arrow";
  align-items: center;
  gap: var(--s-1) var(--s-4);
  min-height: 7rem;
  padding: clamp(1rem, 0.8rem + 1vw, 1.5rem) clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border: var(--bw) solid var(--c-ink);
  background: var(--c-surface);
  box-shadow: var(--shadow);
  color: var(--c-ink);
  text-decoration: none;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
.linkcard:hover { background: var(--c-pop); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--c-ink); }
.linkcard:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--c-ink); }
.linkcard__title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}
.linkcard__text { grid-area: text; font-size: var(--fs-sm); font-weight: 500; }
.linkcard__arrow {
  grid-area: arrow;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  transition: transform var(--t-fast) ease;
}
.linkcard:hover .linkcard__arrow { transform: translateX(4px); }
.linkcard--pop { background: var(--c-pop); }
.linkcard--pop:hover { background: var(--c-surface); }

/* Metrics: a hard-framed strip of big numbers. */
.metrics {
  display: flex;               /* flex + grow: a wrapped last row stretches, no empty black cell */
  flex-wrap: wrap;
  gap: var(--bw);
  border: var(--bw) solid var(--c-ink);
  background: var(--c-ink);   /* the gap shows as black dividers */
}
.metric {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
  background: var(--c-surface);
}
.metrics > .metric { flex: 1 1 6rem; padding: var(--s-3) var(--s-4) var(--s-4); }
.metric__value {
  order: 2;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--c-ink);
}
.metric__label {
  order: 1;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.metric__note { order: 3; font-size: var(--fs-xs); color: var(--c-muted); }

.metric--hero { gap: var(--s-2); background: none; }
.metric--hero .metric__value {
  order: 1;
  font-size: var(--fs-counter);
  line-height: 0.85;
  color: var(--c-accent);       /* huge type: red is fine */
}
.metric--hero .metric__label { order: 2; font-size: clamp(1.25rem, 1rem + 1vw, 2rem); }

.steps { display: grid; gap: var(--s-5); counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.steps > li { counter-increment: step; padding-top: var(--s-3); border-top: var(--bw) solid var(--c-ink); }
.steps > li::before {
  content: counter(step);
  display: block;
  margin-bottom: var(--s-2);
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 0.85;
  color: var(--c-accent);
  font-variant-numeric: lining-nums;
}
.steps__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1; text-transform: uppercase; }
.steps__text { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }

/* ============ 10. Ticker, stickers ============ */

/*
  <div class="ticker"><div class="ticker__track">
    <span class="ticker__item">…</span> … (the same items once more with aria-hidden="true")
  </div></div>
  The track moves by -50%, so the second half must repeat the first exactly.
*/
.ticker {
  --ticker-duration: 30s;
  overflow: hidden;
  border-block: var(--bw) solid var(--c-ink);
  background: var(--c-pop);
  color: var(--c-ink);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-move var(--ticker-duration) linear infinite;
}
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__item {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding-block: 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ticker__item::after {        /* separator dot; padding (not gap) keeps both halves equal */
  content: "";
  width: 0.4em;
  height: 0.4em;
  margin-inline: 0.9em;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid var(--c-ink);
}
@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { width: auto; flex-wrap: wrap; animation: none; transform: none; padding-inline: var(--gutter); }
  .ticker__item[aria-hidden="true"] { display: none; }
}

.sticker {
  display: inline-block;
  padding: 0.3rem 0.7rem 0.25rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sticker--tilt-l { transform: rotate(-3deg); }
.sticker--tilt-r { transform: rotate(3deg); }
.sticker--pop { background: var(--c-pop); }

/* ============ 11. Filter chips ============ */

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.chips__label { font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; text-transform: uppercase; margin-inline-end: var(--s-1); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.125rem 0.125rem 0.125rem 0.75rem;
  border: var(--bw) solid var(--c-ink);
  background: var(--c-pop);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
}
.chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip__field { font-weight: 500; }
.chip__remove {
  flex: none;
  display: inline-grid;
  place-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
}
.chip__remove:hover { background: var(--c-ink); color: var(--c-pop); }

/* ============ 12. Charts: barList ============ */

.barlist { container-type: inline-size; min-width: 0; }
.barlist__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.125rem; }
.barlist__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label value" "track track";
  column-gap: var(--s-3);
  row-gap: 0.3rem;
  align-items: baseline;
  width: 100%;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: var(--lh-snug);
  text-align: start;
}
.barlist--selectable .barlist__row { padding-inline: 0.5rem; }
button.barlist__row { cursor: pointer; }
button.barlist__row:hover { background: var(--c-surface-2); }
button.barlist__row:focus-visible { outline-offset: 0; }
.barlist__label { grid-area: label; min-width: 0; overflow-wrap: anywhere; }
.barlist__value {
  grid-area: value;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: end;
  white-space: nowrap;
}
.barlist__track {
  grid-area: track;
  display: block;
  height: 0.75rem;
  background: var(--c-track);
  overflow: hidden;
}
.barlist__bar {
  display: block;
  height: 100%;
  width: calc(var(--w, 0) * 100%);
  background: var(--c-bar);
}
.barlist__bar.has-value { min-width: 3px; }
button.barlist__row:hover .barlist__bar { background: var(--c-accent); }
.barlist__row.is-selected { background: var(--c-pop); }
.barlist__row.is-selected .barlist__label { font-weight: 700; }
.barlist__row.is-selected .barlist__bar { background: var(--c-accent); }
/* Red on grey/yellow is < 3:1 — the selected row gets a white track with a black outline (red on white 3.7:1). */
.barlist__row.is-selected .barlist__track { background: var(--c-bg); box-shadow: inset 0 0 0 1px var(--c-ink); }
.barlist__row.is-static .barlist__label { color: var(--c-muted); }   /* selectable: false (e.g. «_other») */
.barlist__row.is-low .barlist__value { color: var(--c-muted); }
.barlist__row.is-low .barlist__track {
  background: repeating-linear-gradient(-45deg, var(--c-hatch) 0 1px, transparent 1px 5px);
}

@container (min-width: 32rem) {
  .barlist__row {
    grid-template-columns: minmax(8rem, 34%) minmax(0, 1fr) minmax(3.5rem, auto);
    grid-template-areas: "label track value";
    align-items: center;
    padding-block: 0.3rem;
  }
  .barlist__track { height: 1rem; }
}

/* ============ 13. Charts: timeline ============ */

.timeline { --plot-h: clamp(9rem, 6rem + 14vw, 14rem); --axis-w: 2.75rem; --gap: 2px; min-width: 0; }
.timeline__readout {
  min-height: 1.2em;
  margin-bottom: var(--s-2);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.timeline__chart { padding-inline-end: var(--axis-w); padding-top: var(--s-3); }
.timeline__chart.is-dense { --gap: 1px; }
.timeline__plot { position: relative; height: var(--plot-h); }
.timeline__grid {
  position: absolute;
  inset: 0 calc(-1 * var(--axis-w)) 0 0;
  pointer-events: none;
}
.timeline__gridline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--y, 0) * 100%);
  border-top: 1px solid var(--c-line-soft);
}
.timeline__gridline.is-zero { border-top: var(--bw) solid var(--c-ink); z-index: 1; }
.timeline__gridlabel {
  position: absolute;
  right: 0;
  bottom: 3px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--c-muted);
}
.timeline__bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr));
  column-gap: var(--gap);
  height: 100%;
}
.timeline__col { display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0; }
.timeline__bar {
  display: block;
  width: 100%;
  max-width: 3.5rem;
  height: calc(var(--h, 0) * 100%);
  background: var(--c-bar);
}
.timeline__col.is-current .timeline__bar,
.timeline__col.is-hover .timeline__bar { background: var(--c-accent); }
.timeline__bars:hover .timeline__col.is-current:not(.is-hover) .timeline__bar { background: var(--c-bar); }
.timeline__col.is-low .timeline__bar,
.timeline__bars:hover .timeline__col.is-low.is-current:not(.is-hover) .timeline__bar {
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--c-hatch) 0 1px, transparent 1px 5px);
}
.timeline__col.is-low.is-hover .timeline__bar,
.timeline__col.is-low.is-current .timeline__bar {
  background: repeating-linear-gradient(-45deg, var(--c-accent) 0 2px, transparent 2px 5px);
}
.timeline__ticks {
  display: grid;
  grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-muted);
}
/* Cells may overlap by a column (centred on their bar); an explicit row keeps them on one line. */
.timeline__tick { grid-row: 1; display: flex; justify-content: center; min-width: 0; white-space: nowrap; }
.timeline__tick.is-start { justify-content: flex-start; }
.timeline__tick.is-end { justify-content: flex-end; }
.timeline__ticklabel { flex: none; font-variant-numeric: tabular-nums; }
.timeline__legend {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-ink);
}
.timeline__swatch {
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--c-ink);
  background: repeating-linear-gradient(-45deg, var(--c-hatch) 0 1px, transparent 1px 4px);
}

.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-xs); font-weight: 600; }
.legend__item { display: inline-flex; align-items: center; gap: var(--s-2); }

/* ============ 14. Prose (text pages) and tables ============ */

/* Text pages: Onest text, display headings clearly smaller than on product screens. */
.prose { max-width: var(--w-text); }
.prose > * + * { margin-top: 1em; }
.prose h1 { font-size: clamp(2.75rem, 1.8rem + 4.5vw, 5rem); margin-bottom: 0.4em; }
.prose h2 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem); margin-top: 1.6em; line-height: 0.95; }
.prose h3 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); margin-top: 1.5em; }
.prose h4 { margin-top: 1.4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-inline-start: 1.35em; }
.prose li + li { margin-top: 0.45em; }
.prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose ul > li::marker { color: var(--c-accent); }
.prose ol > li::marker { font-family: var(--font-display); font-weight: 900; font-variant-numeric: tabular-nums; }
.prose dt { font-weight: 700; }
.prose dd { margin: 0.2em 0 0.8em; }
.prose blockquote { padding-inline-start: 1em; border-inline-start: var(--bw) solid var(--c-ink); }
.prose code { padding: 0.1em 0.3em; background: var(--c-surface-2); overflow-wrap: anywhere; }
.prose pre { padding: var(--s-4); overflow-x: auto; border: var(--bw) solid var(--c-ink); line-height: 1.5; }
.prose pre code { padding: 0; background: none; }
.prose .lede { margin-bottom: 1.5em; }

.table-wrap { max-width: 100%; overflow-x: auto; }
.table, .prose table {
  width: 100%;
  font-size: var(--fs-sm);
  line-height: 1.45;
  font-variant-numeric: tabular-nums lining-nums;
}
.table caption, .prose table caption { caption-side: top; text-align: start; padding-bottom: var(--s-2); font-size: var(--fs-xs); font-weight: 600; color: var(--c-muted); }
.table th, .table td, .prose th, .prose td {
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--c-line-soft);
  text-align: start;
  vertical-align: top;
}
.table thead th, .prose thead th {
  border-bottom: var(--bw) solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-ink);
  vertical-align: bottom;
}
.table .is-num, .prose td.is-num, .prose th.is-num { text-align: end; }

/* ============ 15. Utilities ============ */

.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s-2) !important; }
.mt-4 { margin-top: var(--s-4) !important; }
.mt-6 { margin-top: var(--s-6) !important; }
.mb-0 { margin-bottom: 0 !important; }
.w-full { width: 100%; }
.measure { max-width: var(--w-text); }

/* ============ 16. Forced colors and print ============ */

@media (forced-colors: active) {
  .barlist__bar, .timeline__bar, .brand::before, .ticker__item::after { forced-color-adjust: none; background: CanvasText; }
  .barlist__row.is-selected .barlist__bar, .timeline__col.is-current .timeline__bar { background: Highlight; }
  .barlist__track { border: 1px solid CanvasText; }
  .timeline__col.is-low .timeline__bar, .barlist__row.is-low .barlist__track, .timeline__swatch { forced-color-adjust: auto; background: Canvas; border: 1px dashed CanvasText; }
  .choice input { appearance: auto; -webkit-appearance: auto; }
  .choice input::before { display: none; }
  .select { appearance: auto; -webkit-appearance: auto; background-image: none; padding-inline-end: 0.5rem; }
  .btn, .btn-round, .card, .linkcard, .sticker { box-shadow: none; }
  .skeleton { border: 1px solid CanvasText; }
  .lang-switch__select { opacity: 1; position: static; }
  .lang-switch__code { display: none !important; }
}

@media print {
  .skip-link, .lang-switch, .site-nav, .site-header__cta, .chip__remove, .ticker { display: none !important; }
  .btn, .card, .linkcard, .sticker, .btn-round { box-shadow: none !important; }
  .barlist__bar, .timeline__bar, .metric--hero .metric__value { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
