/* ---------------------------------------------------------------------------
   keep it simple – data visualization, pixel branding
   Brand kit: black on white, a faint dot grid, the pixel hourglass.
   SoLow (pixel display face) for the wordmark, chapter titles and big numbers;
   KMR Melange Grotesk for everything that is read. No colour: marks are black,
   tints are black at lower strength. Corners are square, like the pixels.
   --------------------------------------------------------------------------- */

@font-face { font-family: 'SoLow'; font-weight: 400; font-display: swap; src: url(fonts/solow-regular.woff2) format('woff2'); }
@font-face { font-family: 'KMR Melange Grotesk'; font-weight: 400 500; font-style: normal; font-display: swap; src: url(fonts/kmr-melange-grotesk-regular.woff2) format('woff2'); }
@font-face { font-family: 'KMR Melange Grotesk'; font-weight: 400 500; font-style: italic; font-display: swap; src: url(fonts/kmr-melange-grotesk-italic.woff2) format('woff2'); }
@font-face { font-family: 'KMR Melange Grotesk'; font-weight: 600 800; font-style: normal; font-display: swap; src: url(fonts/kmr-melange-grotesk-bold.woff2) format('woff2'); }

:root {
  --mark: #000000;     /* all data marks */
  --ink: #000000;
  --soft: #555555;     /* secondary text, 7.6:1 on white */
  --muted: #888888;    /* axis labels, large/non-essential only */
  --paper: #ffffff;
  --rule: #d9d9d9;
  --land: #e6e6e6;
  --tint: #efefef;     /* hover/selected wash */
  --mark-rgb: 0, 0, 0; /* mark colour as rgb, for the grey tints */
  --inv-soft: #c9c5be; /* secondary text on an inverted block (chapter 06, tooltip) */
  --inv-rule: #6b6862;
  --inv-hover: #2a2a2a;
  color-scheme: light;
  --font: 'KMR Melange Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --shell: 84rem;
  --bar-h: 3.5rem;
  --pixel: 'SoLow', 'KMR Melange Grotesk', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
/* scale the whole page up on big touch displays */
html { font-size: clamp(16px, 0.5vw + 11px, 26px); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1rem); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* --- hero ---------------------------------------------------------------- */
.hero { position: relative; background-color: var(--paper); color: var(--ink); height: 100vh; height: 100svh; min-height: 30rem; display: flex;
  background-image: radial-gradient(circle, rgba(var(--mark-rgb), .2) 0.8px, transparent 1.1px); background-size: 10px 10px; }
.hero__in { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(1rem, 3vh, 3rem); padding-block: clamp(1.25rem, 4vh, 4rem); min-height: 0; }
.hero__top { flex: none; }
.hero__mark { margin: 0; font-family: var(--pixel); font-weight: 400; text-transform: uppercase; line-height: .9; letter-spacing: 0; font-size: clamp(2.4rem, min(13.2vw, 17vh), 17rem); white-space: nowrap; }
.hero__sub { margin: .5rem 0 0; font-family: var(--pixel); text-transform: uppercase; font-size: clamp(1rem, min(3.6vw, 4.5vh), 3.2rem); line-height: 1; }
.hero__glass { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.hero__glass svg { height: 100%; max-height: 32rem; width: auto; }
.hero__text { max-width: 44rem; background: var(--paper); }
.hero__lead { margin: 0 0 .75rem; font-size: clamp(1.15rem, .9rem + 1vw, 1.9rem); line-height: 1.2; font-weight: 700; letter-spacing: -.005em; }
.hero__note { margin: 0 0 1.1rem; max-width: 36rem; }
.hero__go { display: inline-block; padding: .8rem 1.4rem; background: var(--ink); color: var(--paper); font-family: var(--pixel); text-transform: uppercase; font-size: 1.15rem; letter-spacing: .02em; text-decoration: none; min-height: 2.75rem; line-height: 1.2; }
.hero__go:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.hero__go:focus-visible { outline-color: var(--ink); }

/* --- sticky selection bar -------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
/* constant height: the bar never grows, so nothing below it shifts */
.bar__in { display: flex; align-items: center; gap: 1rem 1.5rem; height: var(--bar-h); flex-wrap: nowrap; }
.bar__count { margin: 0; font-weight: 500; flex: none; white-space: nowrap; }
.bar__count b { font-weight: 700; }
.bar__chips { display: flex; flex-wrap: nowrap; gap: .4rem; list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar__chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: .5rem; flex: none; white-space: nowrap; min-height: 2.25rem; padding: .2rem .7rem; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; font-size: .9rem; }
.chip:hover { background: var(--tint); }
.chip::after { content: '×'; font-weight: 700; line-height: 1; }
.bar__reset { flex: none; min-height: 2.25rem; padding: .2rem .9rem; border: 0; background: var(--ink); color: var(--paper); border-radius: 0; cursor: pointer; font-weight: 500; }
/* overlay strip under the bar: appears without moving the page */
.bar__warn { position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: .6rem var(--gutter); background: var(--ink); color: var(--paper); font-size: .9rem; font-weight: 500; }

/* --- chapters ------------------------------------------------------------ */
.chapter { padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--rule); }
.chapter:first-of-type { border-top: 0; }
.chapter__head { display: flex; align-items: baseline; gap: clamp(1rem, 4vw, 3rem); margin-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.chapter__nr { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.chapter__title { margin: 0; font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.lede { margin: 0 0 clamp(1.75rem, 4vw, 3rem); max-width: 34ch; font-size: clamp(1.6rem, 1rem + 2.2vw, 3rem); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.lede span { display: block; margin-top: .15em; color: var(--soft); font-weight: 500; }
/* both map-mode texts share one grid cell, so the lede height (and the map below) never changes */
.lede--swap { display: grid; max-width: none; }
.lede--swap .lede__v { grid-area: 1 / 1; max-width: 34ch; }
.lede--swap .lede__v.is-off { visibility: hidden; }
.minor--list { margin-top: 1.5rem; }
.minor { margin: 0 0 1rem; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.minor__hint { margin-left: .5rem; font-weight: 400; color: var(--soft); font-size: .9rem; }
.footnote { margin: 1.5rem 0 0; max-width: 60ch; color: var(--soft); font-size: .9rem; }

/* --- toggles ------------------------------------------------------------- */
.seg-toggle { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 0; overflow: hidden; }
.seg-toggle__btn { min-height: 2.75rem; padding: .4rem 1.1rem; border: 0; background: transparent; cursor: pointer; font-weight: 500; }
.seg-toggle__btn + .seg-toggle__btn { border-left: 1.5px solid var(--ink); }
.seg-toggle__btn.is-on { background: var(--ink); color: var(--paper); }
.seg-toggle__btn:not(.is-on):hover { background: var(--tint); }
.seg-toggle--dark { border-color: var(--paper); }
.seg-toggle--dark .seg-toggle__btn + .seg-toggle__btn { border-left-color: var(--paper); }
.seg-toggle--dark .seg-toggle__btn.is-on { background: var(--paper); color: var(--ink); }
.seg-toggle--dark .seg-toggle__btn:not(.is-on):hover { background: var(--inv-hover); }
.seg-toggle--dark :focus-visible { outline-color: var(--paper); }

/* --- map ----------------------------------------------------------------- */
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.legend { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--soft); }
.legend__ramp { width: 8rem; height: .5rem; background: linear-gradient(90deg, rgba(var(--mark-rgb), .28), rgba(var(--mark-rgb), 1)); border-radius: 0; }
.map { position: relative; }
.map--wide { width: 100%; max-width: 150rem; margin-inline: auto; padding-inline: clamp(.25rem, 1.5vw, 2rem); }
.map svg { display: block; width: 100%; height: auto; }
.map .land { fill: var(--land); stroke: var(--paper); stroke-width: .6; }
.map .has { fill: var(--mark); cursor: pointer; transition: fill-opacity .3s; }
.map .has:hover, .map .has:focus-visible { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.map .has.is-sel { stroke: var(--ink); stroke-width: 2.25; }
.map .dot { fill: var(--mark); stroke: var(--paper); stroke-width: 2; cursor: pointer; transition: fill-opacity .3s; }
.map .dot.is-sel { stroke: var(--ink); }
.map .hit { fill: transparent; cursor: pointer; }
.map .off { fill: var(--land); cursor: default; }

/* --- horizontal rows (filters) -------------------------------------------- */
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { width: 100%; display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr 2.6rem; align-items: center; gap: .9rem; min-height: 2.75rem; padding: .15rem .6rem .15rem .5rem; border: 0; border-left: 4px solid transparent; background: transparent; text-align: left; cursor: pointer; border-radius: 0; }
.row:hover { background: var(--tint); }
.row.is-on { background: var(--tint); border-left-color: var(--ink); }
.row.is-on .row__label { font-weight: 700; }
.row__label { font-size: .95rem; line-height: 1.2; }
.row__track { display: block; height: 1.1rem; }
.row__bar { display: block; height: 100%; width: 0; background: var(--mark); border-radius: 0; transition: width .35s ease; min-width: 0; }
.row__val { font-size: .95rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.row__val.is-hidden { font-weight: 400; color: var(--soft); }
.what__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); }
.rows--2col { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(7, auto); grid-auto-flow: column; column-gap: clamp(2rem, 5vw, 4.5rem); }
.rows--4 { grid-template-rows: repeat(4, auto); }

/* --- role segments ------------------------------------------------------- */
.seg { display: flex; flex-direction: column; gap: .6rem; }
.seg__bar { display: flex; gap: 2px; height: 2.5rem; }
.seg__piece { flex: 0 0 auto; min-width: 0; height: 100%; border: 0; padding: 0; background: var(--mark); cursor: pointer; transition: flex-basis .35s ease; }
.seg__piece[data-k="freelancer"] { background: rgba(var(--mark-rgb), .55); }
.seg__piece[data-k="none"] { background: rgba(var(--mark-rgb), .22); }
.seg__piece:first-child { border-radius: 0; }
.seg__piece:last-child { border-radius: 0; }
.seg__piece.is-dim { background: var(--land) !important; }
.seg__piece:hover { background: var(--ink) !important; }
.seg { max-width: 56rem; }
.seg__legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.seg__sw { display: inline-block; width: .9rem; height: .9rem; margin-right: .5rem; vertical-align: -.1em; background: var(--mark); }
.seg__item[data-k="freelancer"] .seg__sw { background: rgba(var(--mark-rgb), .55); }
.seg__item[data-k="none"] .seg__sw { background: rgba(var(--mark-rgb), .22); }
.seg__item { display: block; width: 100%; text-align: left; border: 0; border-top: 3px solid transparent; background: transparent; padding: .5rem .25rem .25rem; cursor: pointer; min-height: 2.75rem; }
.seg__item:hover { background: var(--tint); }
.seg__item.is-on { border-top-color: var(--ink); background: var(--tint); }
.seg__n { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.seg__l { display: block; font-size: .9rem; color: var(--soft); }

/* --- waffle: every square is 10 projects ------------------------------------ */
.fig { margin: 0; }
.fig--full { max-width: 70rem; }
.key { display: flex; flex-wrap: wrap; gap: .5rem 2rem; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.key b { font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-right: .25rem; }
.sw { display: inline-block; width: 1rem; height: 1rem; margin-right: .6rem; vertical-align: -.1em; border-radius: 0; }
.sw--yes { background: var(--mark); }
.sw--no { box-shadow: inset 0 0 0 2px var(--mark); }
.waffle { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; transition: opacity .25s; }
.sq { aspect-ratio: 1; border-radius: 0; }
.sq--yes { background: var(--mark); }
.sq--no { box-shadow: inset 0 0 0 2px var(--mark); }

/* --- stats --------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(2.25rem, 5vw, 4rem); }
.stat__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; }
.stat__label { font-weight: 500; }
.stat__num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__track { height: 1rem; background: var(--land); border-radius: 0; }
.stat__fill { height: 100%; width: 0; background: var(--mark); border-radius: 0; transition: width .35s ease; }
.stat__sub { margin: .4rem 0 0; font-size: .9rem; color: var(--soft); }

/* --- company wall -------------------------------------------------------- */
.wall { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1.1rem; line-height: 1.15; }
.wall__n { letter-spacing: -.02em; }
.wall__n--3 { font-weight: 700; color: var(--ink); }
.wall__n--2 { font-weight: 500; color: var(--ink); }
.wall__n--1 { font-weight: 400; color: var(--soft); }

/* --- said (dark chapter) --------------------------------------------------- */
.said { background: var(--ink); color: var(--paper); padding-block: clamp(3.5rem, 8vw, 7rem); }
.said .chapter__head { margin-bottom: 1.5rem; }
.said__tools { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.quote { margin: 0; min-height: 15rem; max-width: 46rem; }
.quote p { margin: 0; white-space: pre-line; font-weight: 500; line-height: 1.12; letter-spacing: -.02em; text-wrap: pretty; }
.quote p.q-s { font-size: clamp(2rem, 1.2rem + 3.2vw, 4.25rem); letter-spacing: -.03em; }
.quote p.q-m { font-size: clamp(1.6rem, 1rem + 2.1vw, 2.9rem); }
.quote p.q-l { font-size: clamp(1.25rem, .9rem + 1.3vw, 1.9rem); line-height: 1.25; letter-spacing: -.01em; }
.said__nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.nav-btn { min-height: 2.75rem; padding: .4rem 1.3rem; border: 1.5px solid var(--paper); background: transparent; color: var(--paper); border-radius: 0; cursor: pointer; font-weight: 500; }
.nav-btn:hover { background: var(--paper); color: var(--ink); }
.nav-btn--ghost { border-color: var(--inv-rule); margin-left: auto; }
.nav-btn:focus-visible { outline-color: var(--paper); }
.said__count { color: var(--inv-soft); font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: center; }
.said__note { margin: 2rem 0 0; color: var(--inv-soft); font-size: .9rem; max-width: 52ch; }

/* --- footer, table, tooltip ----------------------------------------------- */
.foot { padding-block: 2.5rem 3rem; background: var(--paper); font-size: .9rem; color: var(--soft); }
.foot__in p { margin: 0 0 .6rem; max-width: 70ch; }
.table { margin-top: 1.75rem; font-size: .9rem; }
.table summary { cursor: pointer; display: inline-block; padding: .5rem 0; font-weight: 500; text-decoration: underline; text-underline-offset: .22em; min-height: 2.75rem; }
.table table { border-collapse: collapse; margin-top: .5rem; min-width: min(100%, 28rem); }
.table th, .table td { padding: .35rem 1.25rem .35rem 0; text-align: left; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; vertical-align: top; }
.table th { font-weight: 700; }
.table td:not(:first-child), .table th:not(:first-child) { text-align: right; }
.table .scroll { max-height: 22rem; overflow: auto; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--paper); padding: .55rem .8rem; border-radius: 0; font-size: .9rem; line-height: 1.3; max-width: 16rem; }
.tip b { display: block; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.1; }
.tip span { color: var(--inv-soft); }

.is-muted { opacity: .22; transition: opacity .25s; pointer-events: none; }
.stats, .lede { transition: opacity .25s; }

/* --- narrow screens ------------------------------------------------------ */
@media (max-width: 56rem) {
  .stats { grid-template-columns: 1fr; }
  .waffle { grid-template-columns: repeat(20, 1fr); }
  .rows--2col { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .row { grid-template-columns: minmax(6rem, 10rem) 1fr 2.4rem; gap: .6rem; }
}
@media (max-width: 36rem) {
  .bar__in { gap: .75rem; }
  .row { grid-template-columns: 1fr 2.4rem; grid-template-areas: 'l v' 't t'; row-gap: .1rem; padding-block: .4rem; }
  .row__label { grid-area: l; } .row__val { grid-area: v; } .row__track { grid-area: t; height: .8rem; }
  .seg__n { font-size: 1.5rem; }
  .nav-btn--ghost { margin-left: 0; }
}

/* things below the group-size limit are visible but not selectable */
.row.is-locked { cursor: default; }
.row.is-locked:hover { background: transparent; }
.map .has.is-lock, .map .dot.is-lock { cursor: default; }
.seg__piece.is-lock, .seg__item.is-lock { cursor: default; }
.seg__item.is-lock:hover { background: transparent; }

/* exhibit screens (4K and up): use the width */
@media (min-width: 2400px) { :root { --shell: 128rem; } }

/* --- pixel branding: type + details ----------------------------------------- */
body { font-weight: 400; }
.chapter__nr, .chapter__title { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0; line-height: 1; }
.chapter__nr { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.chapter__title { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.lede { letter-spacing: -.01em; font-weight: 700; }
.lede span { font-weight: 400; }
.seg__n, .key b, .stat__num, .tip b { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; }
.seg__n { font-size: 2.1rem; line-height: 1; }
.key b { font-size: 1.7rem; }
.stat__num { font-size: 1.2rem; }
.tip b { font-size: 1.6rem; }
.minor, .stat__label, .row.is-on .row__label, .seg-toggle__btn, .bar__count, .bar__reset, .nav-btn { font-weight: 700; }
.row__val { font-family: var(--pixel); font-weight: 400; font-size: 1.05rem; }
.row__val.is-hidden { font-family: var(--font); }
.seg-toggle__btn, .bar__reset, .nav-btn, .chip { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
.seg-toggle__btn { font-size: 1.05rem; }
.chip { font-size: 1rem; }
.bar__count { font-family: var(--font); text-transform: none; }
.bar__brand { display: inline-flex; align-items: center; flex: none; margin-right: .25rem; }
.bar__brand svg { display: block; height: 1.9rem; width: 1.9rem; }
.chip { border-width: 2px; }
.chip::after { content: '×'; font-family: var(--font); font-weight: 700; }
.minor__hint { font-weight: 400; }
.wall__n--3, .wall__n--2 { font-weight: 700; }
.wall__n--2 { font-weight: 400; color: var(--ink); }

/* interaction on solid-black marks: outlines instead of colour changes */
.seg__piece:hover { background: inherit !important; outline: 3px solid var(--ink); outline-offset: 2px; }
.seg__piece.is-dim:hover { background: var(--land) !important; }
.map .has { stroke: var(--paper); stroke-width: .6; }
.map .has:hover, .map .has:focus-visible { stroke: var(--ink); stroke-width: 2; }
.map .has.is-sel { fill-opacity: 1 !important; stroke: var(--ink); stroke-width: 2.5; }
.map .dot { stroke: var(--paper); }
.map .dot.is-sel { stroke: var(--ink); fill-opacity: 1 !important; }
.row.is-on { border-left-width: 6px; }
.stat__track, .row__track { background-image: none; }
.sq { border-radius: 0; }
.said .quote p { font-family: var(--font); font-weight: 400; text-transform: none; }
.said__count { font-family: var(--pixel); }
.foot { border-top: 2px solid var(--ink); }
.foot__logo { display: block; height: clamp(2.5rem, 4vw, 4rem); width: auto; margin-bottom: 1.5rem; }
.foot__logo svg { height: 100%; width: auto; display: block; }


/* --- dark mode: the same black and white, swapped ---------------------------
   Follows the system setting; the toggle (or ?theme=dark / ?theme=light) overrides it. */
:root[data-theme="dark"] {
  --mark: #ffffff; --ink: #ffffff; --soft: #b3b3b3; --muted: #8a8a8a; --paper: #000000;
  --rule: #333333; --land: #262626; --tint: #1a1a1a; --mark-rgb: 255, 255, 255;
  --inv-soft: #444444; --inv-rule: #999999; --inv-hover: #e0e0e0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --mark: #ffffff; --ink: #ffffff; --soft: #b3b3b3; --muted: #8a8a8a; --paper: #000000;
  --rule: #333333; --land: #262626; --tint: #1a1a1a; --mark-rgb: 255, 255, 255;
  --inv-soft: #444444; --inv-rule: #999999; --inv-hover: #e0e0e0;
  color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }

/* theme toggle: pixel sun / moon icon button, shows the mode a click switches to */
.theme { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; cursor: pointer; }
.theme:hover { background: var(--ink); color: var(--paper); }
.theme .ic { display: block; width: 1.5rem; height: 1.5rem; }
.theme .ic-day, .theme[data-state="light"] .ic-day { display: none; }
.theme[data-state="dark"] .ic-day { display: block; }
.theme[data-state="dark"] .ic-night { display: none; }
.theme--hero { position: absolute; top: clamp(1rem, 2vw, 2rem); right: var(--gutter); z-index: 2; }

/* no browser-coloured focus rectangle or selection after a click on the map; keyboard focus keeps its stroke */
html { -webkit-tap-highlight-color: transparent; }
.map svg, .map svg * { outline: none !important; -webkit-user-select: none; user-select: none; }
.map [tabindex]:focus { outline: none !important; }
::selection { background: var(--ink); color: var(--paper); }
.said ::selection { background: var(--paper); color: var(--ink); }

/* --- kiosk loop (only with ?kiosk) -------------------------------------------- */
html.kiosk, html.kiosk body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
.kiosk-hint { position: fixed; left: 50%; bottom: clamp(1.25rem, 4vh, 3rem); transform: translateX(-50%); z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem; background: var(--ink); color: var(--paper);
  font-family: var(--pixel); text-transform: uppercase; font-size: clamp(1rem, 1.6vw, 1.6rem); line-height: 1; white-space: nowrap; }
.kiosk-hint i { width: .9em; height: .9em; background: var(--paper); animation: kiosk-blink 1.2s steps(1) infinite; }
@keyframes kiosk-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kiosk-hint i { animation: none; } }
html.kiosk { scroll-behavior: auto; }

/* --- animated fact slides (kiosk loop) --------------------------------------- */
html.kiosk--slides { overflow: hidden; }
.slides { position: fixed; inset: 0; z-index: 55; display: none; background: var(--paper); color: var(--ink); overflow: hidden; }
.slides.is-on { display: block; }
.slides__stage, .slide { position: absolute; inset: 0; }
.slides__wipe { position: absolute; inset: 0; pointer-events: none; }
.slide { display: flex; flex-direction: column; padding: clamp(1.5rem, 4vw, 5rem) var(--gutter) clamp(5.5rem, 13vh, 9rem); }
.slide--inv { background: var(--ink); color: var(--paper); justify-content: center; }
.slide--dots { background-image: radial-gradient(circle, rgba(var(--mark-rgb), .2) 0.8px, transparent 1.1px); background-size: 10px 10px; }
.slide--split { flex-direction: row; align-items: stretch; gap: 5vw; }
.slide__col { flex: 0 0 44%; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.slide__fig { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.slide__head { display: flex; align-items: flex-end; gap: 3vw; flex: none; }
.slide__head--row { justify-content: space-between; align-items: flex-start; }
.num { font-family: var(--pixel); font-weight: 400; line-height: .85; font-size: min(22vw, 38vh); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num--m { font-size: min(11vw, 20vh); }
.num--hollow { color: var(--soft); }
.big-txt { margin: 0; font-size: clamp(1.6rem, 3.2vw, 4.4rem); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; }
.big-txt--m { font-size: clamp(1.3rem, 2.2vw, 3rem); }
.big-txt .soft { color: var(--soft); font-weight: 400; }
.slide__col .big-txt { margin-top: 2vh; }
.pair { display: flex; align-items: flex-end; gap: 2vw; }
.block { display: flex; flex-direction: column; justify-content: center; flex: 1 1 0; min-height: 0; gap: 3vh; }
.block__top { display: flex; align-items: flex-end; gap: 2.5vw; }
.rowbar { width: 100%; }
.wf { display: grid; justify-content: center; align-content: center; }
.sq2 { display: block; background: var(--mark); }
.sq2--mid { background: rgba(var(--mark-rgb), .5); }
.sq2--no { background: transparent; box-shadow: inset 0 0 0 max(1.5px, .12em) var(--mark); }
.wf .sq2--no { box-shadow: inset 0 0 0 2px var(--mark); }
.key2 { list-style: none; margin: 3vh 0 0; padding: 0; display: grid; gap: 1.2vh; font-size: clamp(1.1rem, 1.7vw, 2.2rem); }
.key2 li { display: flex; align-items: center; gap: 1rem; }
.key2 .sq2 { width: 1.1em; height: 1.1em; flex: none; display: inline-block; }
.key2 b { font-family: var(--pixel); font-weight: 400; font-size: 1.15em; min-width: 2.2ch; }
.note { margin: 1.5vh 0 0; font-size: clamp(.95rem, 1.2vw, 1.5rem); color: var(--soft); }
.big-title { margin: 0; font-family: var(--pixel); font-weight: 400; text-transform: uppercase; line-height: .9; font-size: clamp(3rem, min(12.5vw, 20vh), 20rem); white-space: nowrap; }
.big-title--s { font-size: clamp(3rem, min(15vw, 26vh), 22rem); }
.bt-ch { display: inline-block; animation: bt-in .3s steps(3, end) both; }
@keyframes bt-in { from { opacity: 0; transform: translateY(-.25em); } to { opacity: 1; transform: none; } }
.sub-pixel { margin: .8rem 0 0; font-family: var(--pixel); text-transform: uppercase; font-size: clamp(1rem, 3.4vw, 3.4rem); line-height: 1; }
.sub-pixel--s { font-size: clamp(1rem, 1.8vw, 2rem); margin: 0 0 4vh; color: var(--inv-soft); }
.lead { margin: 0; max-width: 40ch; font-size: clamp(1.4rem, 2.6vw, 3.4rem); line-height: 1.12; font-weight: 500; letter-spacing: -.01em; }
.lead .w, .quote2__t .w { display: inline-block; }
.slide > .lead { position: absolute; left: var(--gutter); bottom: clamp(5.5rem, 13vh, 9rem); }
.glass-box { position: absolute; right: 8vw; top: 50%; transform: translateY(-50%); height: min(62vh, 36vw); }
.glass-box svg { height: 100%; width: auto; display: block; color: var(--ink); }
.glass-box--flip svg { animation: flip 2.6s steps(6, end) .8s both; }
@keyframes flip { to { transform: rotate(180deg); } }
.worldcv { display: block; margin: 0 auto; }
.bars { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; margin-top: 3vh; }
.bar2 { display: grid; grid-template-columns: minmax(12ch, 24%) 1fr 5ch; align-items: center; gap: 2vw; font-size: clamp(1.1rem, 1.8vw, 2.4rem); }
.bar2__t { display: block; height: clamp(1.4rem, 3.2vh, 3rem); }
.bar2__f { display: block; height: 100%; background: var(--mark); transform-origin: left; }
.bar2__v { font-family: var(--pixel); text-align: right; font-size: 1.2em; }
.wall2 { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-wrap: wrap; align-content: center; gap: .15em 1.1em; margin-top: 3vh; line-height: 1.15; }
.wall2__n { color: var(--soft); white-space: nowrap; }
.wall2__n--m { color: var(--ink); font-weight: 500; }
.quote2 { max-width: 24ch; min-height: 6em; }
.quote2__t { margin: 0; font-size: clamp(2.2rem, 5.4vw, 7.5rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 400; }
.slides__prog { position: absolute; left: var(--gutter); bottom: clamp(1.4rem, 4.2vh, 3rem); display: flex; gap: 6px; }
.slides__prog i { display: block; width: clamp(8px, .9vw, 14px); height: clamp(8px, .9vw, 14px); box-shadow: inset 0 0 0 2px var(--ink); }
.slides__prog i.on { background: var(--ink); }
.slides.is-inv .slides__prog i { box-shadow: inset 0 0 0 2px var(--paper); }
.slides.is-inv .slides__prog i.on { background: var(--paper); }
@media (prefers-reduced-motion: reduce) { .bt-ch { animation: none; } .glass-box--flip svg { animation: none; } }

.kiosk-hint { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }

/* layout fixes after the first review */
.slide--map .num { font-size: min(13vw, 21vh); }
.slide--cols { flex-direction: row; gap: 5vw; align-items: stretch; }
.blockc { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.blockc .slide__fig { margin-top: 3vh; }
.num--l { font-size: min(14vw, 24vh); }
.blockc .big-txt { margin-top: 2vh; }
.quote2 { max-width: 88%; min-height: 0; }
.glass-box { top: auto; bottom: clamp(5.5rem, 13vh, 9rem); transform: none; height: min(44vh, 30vw); right: 6vw; }
.bar2 { font-size: clamp(1.2rem, 2.1vw, 2.8rem); }
.big-txt { font-size: clamp(1.7rem, 3.5vw, 4.8rem); }
.wall2 { gap: .1em 1em; align-content: flex-start; }

.note--abs { position: absolute; left: var(--gutter); bottom: clamp(3.2rem, 8.5vh, 5.5rem); margin: 0; }
.slide__head--row .pair { flex: 1 1 0; min-width: 0; }
.slide__head--row { gap: 4vw; margin-bottom: 2vh; }
.slide__head--row .big-txt--m br + .soft, .slide__head--row .big-txt--m { white-space: normal; }
.slide__head--row .pair { flex-direction: column; align-items: flex-start; gap: 1.2vh; }
.slide__head--row .num--m { font-size: min(9vw, 17vh); }
