/* Utah is Unique — site styles.
   Palette: black and white; colour comes only from the flag and the painting. */

:root {
  --ink: #050505;
  --paper: #fafaf8;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--ink); color: var(--paper); }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
  mix-blend-mode: difference;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-stretch: 125%; font-size: 20px; letter-spacing: .02em; }
.brand svg { width: 18px; height: 20px; }
.nav ul { display: flex; gap: 28px; list-style: none; }
@media (max-width: 640px) { .nav ul li:not(:last-child) { display: none; } }

/* ---------------------------------------------------------------- hero */
.portal { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.55)); }

/* no canvas (artwork failed to load, or no JavaScript — see <noscript>): show the painting plainly */
.portal.no-canvas { background: url(../assets/img/landscape.jpg) center / cover; }
.portal.no-canvas .arrive .w, .portal.no-canvas .def { opacity: 1 !important; transform: none !important; }

/* headline + dictionary entry */
.arrive { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 0 16px; text-align: center; pointer-events: none; }
.arrive h1 {
  font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: .82; letter-spacing: -.02em;
  font-size: clamp(56px, 15vw, 280px);
  /* a subtle dark shadow keeps the white type legible over the bright snow */
  text-shadow: 0 1px 2px rgba(0,0,0,.28), 0 4px 18px rgba(0,0,0,.30), 0 10px 60px rgba(0,0,0,.22);
}
.arrive h1 span { display: block; }
.arrive .def {
  margin: 28px auto 0; max-width: 44ch; font-size: 15px; line-height: 1.55; font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.5), 0 0 24px rgba(0,0,0,.6);
}
.def .hw { font-weight: 800; font-stretch: 112%; letter-spacing: .01em; }
.def .pr { opacity: .85; margin: 0 .35em; }
.def .ps { font-style: italic; opacity: .85; }
.def .sense { display: block; margin-top: 6px; }

/* scroll progress, right edge */
.progress { position: absolute; z-index: 10; right: var(--gutter); top: 50%; transform: translateY(-50%); display: grid; gap: 10px; mix-blend-mode: difference; }
.progress i { display: block; width: 2px; height: 28px; background: rgba(255,255,255,.3); position: relative; }
.progress i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: top; transform: scaleY(var(--p, 0)); }
@media (max-width: 640px) { .progress { display: none; } }

/* ---- the way in, desktop: the flag's own star (positioned over the canvas star by hero.js) */
.starbtn { position: absolute; z-index: 9; padding: 0; border: 0; background: none; cursor: pointer; color: #fff; opacity: 0; visibility: hidden; }
.starbtn svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* idle: the star breathes — a gentle swell and glow (the pulse and glow run on separate layers so hover can take over cleanly) */
.starbtn .pulse { transform-box: fill-box; transform-origin: 50% 55.3%; animation: pulse 2.8s ease-in-out infinite 1.4s; }
.starbtn svg { animation: glow 2.8s ease-in-out infinite 1.4s; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); } 50% { filter: drop-shadow(0 0 10px rgba(255,255,255,.55)); } }
.starbtn:hover .pulse, .starbtn:focus-visible .pulse, .starbtn:hover svg, .starbtn:focus-visible svg { animation: none; }

/* hover: the star turns — a fifth of a turn lands it back on itself — and "go" appears at its centre */
.starbtn .star { fill: #fff; transform-box: fill-box; transform-origin: 50% 55.3%; transition: transform .7s var(--ease-out); }
.starbtn:hover .star, .starbtn:focus-visible .star { transform: scale(1.12) rotate(72deg); }
.starbtn .go {
  fill: #000; font-family: var(--font); font-size: 15px; font-weight: 800; font-stretch: 112%; letter-spacing: .5px;
  opacity: 0; transition: opacity .35s ease;
}
.starbtn:hover .go, .starbtn:focus-visible .go { opacity: 1; transition-delay: .2s; }
.starbtn:focus-visible { outline: none; }

/* ---- the way in, phones: a falling line, centred */
.enter { position: absolute; z-index: 10; left: 50%; bottom: clamp(24px, 5vh, 48px); transform: translateX(-50%); }
.cueline { display: none; width: 1px; height: 64px; background: rgba(255,255,255,.3); position: relative; overflow: hidden; }
.cueline::after { content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: #fff; animation: fall 1.8s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes fall { to { top: 100%; } }

@media (max-width: 640px) {
  .starbtn { display: none; }
  .cueline { display: block; }
}

/* ---------------------------------------------------------------- after the hero */
.after { position: relative; z-index: 2; background: var(--paper); color: var(--ink); }

.lede { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(64px, 10vh, 120px); }
.lede .k { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.lede h2 { font-weight: 800; font-stretch: 112%; font-size: clamp(36px, 5vw, 80px); line-height: .96; letter-spacing: -.02em; }
.lede h2 span { font-weight: 300; font-stretch: 100%; }
@media (max-width: 760px) { .lede { grid-template-columns: 1fr; } }

.hexes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); padding: 0 var(--gutter) clamp(96px, 16vh, 160px); }
.hexes figure { display: grid; gap: 16px; }
.hexes .hx {
  aspect-ratio: .866; background: url(../assets/img/landscape.jpg) center / cover;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: grayscale(1) contrast(1.05); transition: filter .6s, transform .6s var(--ease-out);
}
.hexes figure:hover .hx { filter: none; transform: scale(1.02); }
.hexes figcaption { font-size: 14px; line-height: 1.6; max-width: 34ch; }
.hexes figcaption b { display: block; margin-bottom: 6px; font-weight: 800; font-stretch: 118%; font-size: 22px; text-transform: uppercase; }
@media (max-width: 760px) { .hexes { grid-template-columns: 1fr; } .hexes .hx { max-width: 360px; } }

.closer { padding: clamp(80px, 14vh, 160px) var(--gutter); text-align: center; background: var(--ink); color: var(--paper); }
.closer h3 { font-weight: 900; font-stretch: 125%; font-size: clamp(48px, 10vw, 180px); line-height: .85; text-transform: uppercase; letter-spacing: -.02em; }
.closer a { display: inline-block; margin-top: 40px; padding-bottom: 6px; border-bottom: 1px solid; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }

.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter); border-top: 1px solid rgba(255,255,255,.12);
  background: var(--ink); color: rgba(255,255,255,.5);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
}

/* ================================================================ the story, below the hero
   Chapters, each a short argument with its evidence piling up beside it, and a tally that counts the
   evidence as it goes by. Data: js/story/data.js (generated); words: js/story/reasons.js and story.js. */

:root { --gold: #FFB81E; --ember: #E47914; --rock: #BD3411; --plum: #5E1B45; --navy: #35214F; --dim: rgba(5,5,5,.13); }

.band-k { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 18px;
  border-bottom: 1px solid currentColor; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.band-k > span:last-child { opacity: .55; }
.ink { background: var(--ink); color: var(--paper); }
.ink .band-k { border-color: rgba(255,255,255,.2); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------------------------------------------------------------- (01) the wall of firsts */
.firsts { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 72px);
  padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(96px, 14vh, 160px); }
.firsts .side { position: sticky; top: 88px; align-self: start; }
.firsts .k { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.tally { margin-top: 28px; font-weight: 900; font-stretch: 125%; font-size: clamp(96px, 13vw, 232px); line-height: .78;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.tally-l { margin-top: 18px; max-width: 17ch; font-size: 13px; font-weight: 700; line-height: 1.35; letter-spacing: .12em; text-transform: uppercase; }
.tally-s { margin-top: 14px; max-width: 30ch; font-size: 14px; line-height: 1.55; opacity: .6; }
.to-evidence { display: inline-block; margin-top: 18px; padding-bottom: 4px; border-bottom: 1px solid; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.wall { font-weight: 800; font-stretch: 112%; font-size: clamp(30px, 4.3vw, 76px); line-height: 1.04; letter-spacing: -.025em; }
.wall .f { display: inline; color: var(--dim); transition: color .35s ease; }
.wall .f.on { color: var(--ink); }
.wall .f sup { font-size: .26em; font-weight: 600; font-stretch: 100%; letter-spacing: .02em; vertical-align: top; position: relative; top: .5em;
  margin: 0 .5em 0 .15em; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .35s ease .1s; }
.wall .f.on sup { opacity: .55; }
.wall .f:hover .w, .wall .f:focus-visible .w { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
.wall .more { color: var(--dim); font-weight: 300; font-stretch: 100%; }
@media (max-width: 760px) {
  .firsts { grid-template-columns: 1fr; }
  .firsts { padding-top: 48px; row-gap: 20px; }
  .firsts .side { position: sticky; top: 0; z-index: 3; margin: 0 calc(-1 * var(--gutter)); padding: 70px var(--gutter) 12px;
    background: var(--paper); border-bottom: 1px solid rgba(5,5,5,.12);
    display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 14px; }
  .firsts .k { grid-column: 1 / -1; margin-bottom: 10px; }
  .tally { margin-top: 0; font-size: 72px; }
  .tally-l { margin-top: 0; padding-bottom: 4px; }
  .tally-s { display: none; }
}

/* ---------------------------------------------------------------- (03) the hive */
.hive-band { padding: clamp(72px, 12vh, 140px) var(--gutter); border-top: 1px solid rgba(255,255,255,.08); }
.hive-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-top: clamp(28px, 5vh, 56px); }
.hive-top h2 { font-weight: 800; font-stretch: 112%; font-size: clamp(32px, 4.2vw, 68px); line-height: .96; letter-spacing: -.02em; max-width: 16ch; }
.hive-top h2 span { font-weight: 300; font-stretch: 100%; }
.themes { display: flex; flex-wrap: wrap; gap: 6px; }
.themes button { padding: 9px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: .06em; color: rgba(255,255,255,.7); transition: background .2s, color .2s, border-color .2s; }
.themes button i { font-style: normal; opacity: .55; margin-left: 6px; font-variant-numeric: tabular-nums; }
.themes button:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.themes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hive { position: relative; margin: clamp(28px, 5vh, 56px) auto 0; }
.cell { position: absolute; display: grid; place-content: center; justify-items: center; gap: 3px; text-align: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); color: var(--paper);
  transform: scale(0); opacity: 0; transition: transform .6s var(--ease-out), opacity .4s ease, filter .3s; }
.hive.in .cell { transform: scale(.94); opacity: 1; }
.hive.in .cell:hover, .hive.in .cell:focus-visible { transform: scale(1.02); z-index: 2; outline: none; filter: brightness(1.12); }
.cell.dim { opacity: .14 !important; }
.cell .rk { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.cell .v { font-weight: 900; font-stretch: 112%; font-size: calc(var(--w) * .165); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell .l { max-width: calc(var(--w) * .74); font-size: 10.5px; font-weight: 600; line-height: 1.15; }
.cell.r1, .ev-rk.r1 { background: var(--gold); color: var(--ink); }
.cell.r2, .ev-rk.r2 { background: var(--ember); color: var(--ink); }
.cell.r3, .ev-rk.r3 { background: var(--rock); }
.cell.r4, .ev-rk.r4 { background: var(--plum); }
.cell.r5, .ev-rk.r5 { background: var(--navy); }
/* 1st, but not counted among the firsts: of a subset of states, of cities, or an old edition */
.cell.rq, .ev-rk.rq { background: repeating-linear-gradient(-45deg, var(--gold) 0 6px, #ffd672 6px 12px); color: var(--ink); }
.hive.small .cell .l, .hive.small .cell .rk { display: none; }
.hive-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: clamp(28px, 5vh, 56px); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { width: 12px; height: 14px; }
.hive-foot small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .5; }

.closer .n { margin-top: 28px; font-size: clamp(16px, 1.6vw, 22px); font-weight: 500; }
.closer .n b { color: var(--gold); font-weight: 800; }
.site-footer .method { flex-basis: 100%; order: 3; opacity: .8; }

/* ---------------------------------------------------------------- the drawer: any measure, in full */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); padding: 26px 28px 40px; transform: translateX(100%); transition: transform .45s var(--ease-out); }
.open .scrim { opacity: 1; visibility: visible; }
.open .drawer { transform: none; }
.dw-x { position: absolute; top: 16px; right: 18px; width: 36px; height: 36px; font-size: 22px; line-height: 1; }
.dw-k { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .6; padding-right: 40px; }
.dw-rank { margin-top: 26px; font-weight: 900; font-stretch: 125%; font-size: 92px; line-height: .8; letter-spacing: -.04em; }
.dw-rank sup { font-size: .3em; letter-spacing: 0; vertical-align: top; position: relative; top: .2em; }
.dw-rank small { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.dw-h { margin-top: 22px; font-size: 20px; font-weight: 800; font-stretch: 108%; line-height: 1.15; }
.dw-bars { margin-top: 22px; display: grid; gap: 8px; }
.dw-bar { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.dw-bar span:first-child { font-weight: 600; letter-spacing: .04em; }
.dw-bar i { display: block; height: 10px; background: rgba(5,5,5,.22); }
.dw-bar.ut i { background: var(--gold); }
.dw-bar.ut { font-weight: 800; }
.dw-bars small { font-size: 10.5px; opacity: .55; line-height: 1.4; }
.dw-rs { list-style: none; margin-top: 24px; border-top: 1px solid var(--ink); }
.dw-rs li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(5,5,5,.14); font-size: 15px; line-height: 1.4; }
.dw-rs em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; padding-top: 4px; font-variant-numeric: tabular-nums; }
.dw-claim { margin-top: 22px; font-size: 14px; line-height: 1.55; }
.dw-cav { margin-top: 10px; font-size: 12.5px; line-height: 1.55; opacity: .6; }
.dw-src { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(5,5,5,.14); font-size: 12px; line-height: 1.5; }
.dw-src b { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }
.dw-src a { border-bottom: 1px solid; }
.dw-link { display: inline-block; margin-top: 18px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid; padding-bottom: 3px; }
@media (max-width: 640px) {
  .drawer { top: auto; left: 0; width: 100vw; max-height: 86svh; border-radius: 14px 14px 0 0; transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .wall .f, .wall .f sup, .cell, .drawer { transition: none; }
}

/* ---------------------------------------------------------------- prologue */
.prologue { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 72px);
  padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(96px, 16vh, 180px); }
.prologue .k { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.prologue h2 { font-weight: 800; font-stretch: 112%; font-size: clamp(40px, 5.6vw, 96px); line-height: .95; letter-spacing: -.025em; }
.prologue h2 span { font-weight: 300; font-stretch: 100%; }
.prologue p { margin-top: clamp(24px, 4vh, 40px); max-width: 44ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.prologue p b { font-weight: 800; }
.toc { list-style: none; margin-top: clamp(32px, 6vh, 64px); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--ink); }
.toc a { display: grid; gap: 4px; padding: 14px 12px 16px 0; border-bottom: 1px solid rgba(5,5,5,.14); }
.toc a:hover span:last-child { text-decoration: underline; text-underline-offset: .15em; }
.toc span:first-child { font-size: 10px; font-weight: 700; letter-spacing: .16em; opacity: .5; }
.toc span:last-child { font-weight: 800; font-stretch: 112%; font-size: 17px; }
@media (max-width: 760px) { .prologue { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- a chapter: the opener */
.ch-open { position: relative; padding: clamp(72px, 12vh, 140px) var(--gutter) clamp(72px, 12vh, 140px); overflow: hidden; }
.ch-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 96px); align-items: center; margin-top: clamp(36px, 7vh, 80px); }
.ch-dek { font-size: clamp(16px, 1.4vw, 20px); font-weight: 500; opacity: .6; }
.ch-t { margin-top: 14px; font-weight: 900; font-stretch: 125%; font-size: clamp(48px, 8vw, 144px); line-height: .86; letter-spacing: -.03em; text-transform: uppercase; }
.ch-stat { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: end; margin-top: clamp(32px, 6vh, 64px); }
.ch-stat b { font-weight: 900; font-stretch: 125%; font-size: clamp(64px, 9vw, 160px); line-height: .78; letter-spacing: -.04em; color: var(--gold); font-variant-numeric: tabular-nums; }
.ch-stat span { max-width: 26ch; padding-bottom: .2em; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.4; font-weight: 500; }
.ch-img { aspect-ratio: .866; width: 100%; max-width: 440px; justify-self: end; background-size: cover;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: grayscale(1) contrast(1.05) brightness(.8); transform: scale(.92); transition: filter 1.6s ease, transform 1.6s var(--ease-out); }
.ch-open.in .ch-img { filter: none; transform: none; }
.ch-open .ch-t, .ch-open .ch-dek, .ch-open .ch-stat { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s var(--ease-out); }
.ch-open .ch-t { transition-delay: .12s; }
.ch-open .ch-stat { transition-delay: .3s; }
.ch-open.in .ch-t, .ch-open.in .ch-dek, .ch-open.in .ch-stat { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .ch-grid { grid-template-columns: 1fr; }
  .ch-img { order: -1; max-width: 200px; justify-self: start; }
  .ch-stat { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------------------------------------------------------------- a chapter: the story, and the evidence beside it */
.ch-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start;
  padding: clamp(72px, 12vh, 140px) var(--gutter) clamp(96px, 14vh, 160px); }
.story { position: sticky; top: 104px; }
.story p { font-size: clamp(22px, 2vw, 32px); line-height: 1.24; font-weight: 300; letter-spacing: -.01em; }
.story p + p { margin-top: .75em; }
.story p b { font-weight: 800; font-stretch: 108%; }
.story p { opacity: .16; transition: opacity .5s ease; }
.story p.on { opacity: 1; }
.proof-k { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--ink);
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.proof-k span:last-child { opacity: .55; }
.proof .hive { margin: clamp(28px, 5vh, 48px) auto 0; }
/* a chapter with more measures than its hive shows: the rest, on the evidence page */
.ch-more { display: grid; gap: 6px; margin-top: clamp(24px, 4vh, 40px); padding: 14px 0; border-top: 1px solid rgba(5,5,5,.14); }
.ch-more span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.ch-more span:last-child { font-size: 14px; line-height: 1.45; opacity: .6; }
.ch-more:hover span:first-child { text-decoration: underline; text-underline-offset: .2em; }
.ch-more + .all { margin-top: 0; }
/* every reason in the chapter, folded away under the hive */
.all { margin-top: clamp(36px, 6vh, 64px); border-top: 1px solid var(--ink); }
.all summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none;
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.all summary::-webkit-details-marker { display: none; }
.all summary::after { content: "+"; font-size: 20px; font-weight: 400; line-height: 1; letter-spacing: 0; transition: transform .3s var(--ease-out); }
.all[open] summary::after { transform: rotate(45deg); }
.all summary:hover span { text-decoration: underline; text-underline-offset: .2em; }
.cards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(5,5,5,.14); }
.cards li { border-bottom: 1px solid rgba(5,5,5,.14); }
.cards li:nth-child(odd) { border-right: 1px solid rgba(5,5,5,.14); }
.cards button { display: grid; gap: 12px; align-content: start; width: 100%; height: 100%; padding: 22px 20px 24px 0; }
.cards li:nth-child(even) button { padding-left: 20px; padding-right: 0; }
.cards button:hover .tx { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.cards .no { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.cards .no svg { width: 10px; height: 12px; }
.cards .tx { font-size: 17px; line-height: 1.4; font-weight: 500; }
.cards .tx b { font-weight: 800; }
@media (max-width: 900px) {
  .ch-body { grid-template-columns: 1fr; }
  .story { position: static; }
  .story p { opacity: 1; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .cards li:nth-child(odd) { border-right: 0; }
  .cards li:nth-child(even) button { padding-left: 0; }
}

/* ---------------------------------------------------------------- epilogue */
.epilogue-h { padding: clamp(96px, 16vh, 180px) var(--gutter) 0; }
.epilogue-h h2 { margin-top: clamp(28px, 5vh, 56px); font-weight: 900; font-stretch: 125%; font-size: clamp(48px, 8vw, 144px); line-height: .86; letter-spacing: -.03em; text-transform: uppercase; }
.epilogue-h p { margin-top: 24px; max-width: 46ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.epilogue .firsts { padding-top: clamp(48px, 8vh, 96px); }

/* ---------------------------------------------------------------- the tally: the evidence, counted as it goes by */
/* bottom-left: under the sticky story, where the page is empty, not over the evidence */
.hud { position: fixed; z-index: 45; left: var(--gutter); bottom: 20px; display: grid; gap: 10px; min-width: 250px;
  padding: 14px 16px 14px; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 1px rgba(255,255,255,.14);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .5s ease, transform .5s var(--ease-out); }
.hud.show { opacity: 1; transform: none; }
.hud-ch { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.hud-ch span:last-child { opacity: .55; }
.hud-n { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hud-n div { display: grid; }
.hud-n b { font-weight: 900; font-stretch: 125%; font-size: 34px; line-height: .9; letter-spacing: -.03em; color: var(--gold); font-variant-numeric: tabular-nums; transition: transform .2s; transform-origin: left bottom; }
.hud-n b.bump { transform: scale(1.12); }
.hud-n span { margin-top: 6px; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.hud-bar { display: grid; gap: 3px; } /* one column per chapter, set by page.js */
.hud-bar i { height: 3px; background: rgba(255,255,255,.2); position: relative; overflow: hidden; }
.hud-bar i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s; }
@media (max-width: 640px) {
  .hud { left: 0; right: 0; bottom: 0; min-width: 0; grid-template-columns: 1fr auto; align-items: center; padding: 10px var(--gutter) 12px; }
  .hud-ch { flex-direction: column; gap: 3px; }
  .hud-n { gap: 14px; }
  .hud-n b { font-size: 24px; }
  .hud-n span { margin-top: 3px; font-size: 9px; }
  .hud-bar { grid-column: 1 / -1; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-img, .ch-open .ch-t, .ch-open .ch-dek, .ch-open .ch-stat, .all summary::after, .story p, .hud, .hud-n b { transition: none; }
}

/* ---------------------------------------------------------------- the evidence page: every measure, in one list */
.evidence-page { background: var(--paper); }
.ev { min-height: 100vh; padding: clamp(96px, 14vh, 150px) var(--gutter) clamp(72px, 10vh, 120px); }
.ev-head h1 { margin-top: clamp(28px, 5vh, 56px); font-weight: 800; font-stretch: 112%; font-size: clamp(40px, 5.6vw, 96px); line-height: .95; letter-spacing: -.025em; }
.ev-head h1 span { font-weight: 300; font-stretch: 100%; }
.ev-head p { margin-top: 22px; max-width: 62ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; }
.ev-tools { display: grid; gap: 14px; margin-top: clamp(36px, 6vh, 64px); }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chips button { padding: 8px 13px; border: 1px solid rgba(5,5,5,.22); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.ev-chips button i { font-style: normal; margin-left: 6px; opacity: .5; font-variant-numeric: tabular-nums; }
.ev-chips button:hover { border-color: var(--ink); }
.ev-chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.ev-search { flex: 1 1 260px; }
.ev-search input { width: 100%; padding: 11px 16px; border: 1px solid rgba(5,5,5,.22); border-radius: 999px; background: #fff; color: inherit; font: inherit; font-size: 15px; }
.ev-search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.ev-check, .ev-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ev-check input { width: 16px; height: 16px; accent-color: var(--ink); }
.ev-sort span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.ev-sort select { padding: 8px 10px; border: 1px solid rgba(5,5,5,.22); border-radius: 8px; background: #fff; color: inherit; font: inherit; font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ev-count { margin-top: 28px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .6; }
.ev-list { list-style: none; margin-top: 12px; border-top: 1px solid var(--ink); }
.ev-it { border-bottom: 1px solid rgba(5,5,5,.14); scroll-margin-top: 96px; transition: background .6s; }
.ev-it.hit { background: rgba(255,184,30,.2); }
.ev-it > button { display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 2fr) minmax(0, 3fr); gap: 18px; align-items: center; width: 100%; padding: 12px 0; }
.ev-it > button:hover .ev-name b { text-decoration: underline; text-underline-offset: .15em; }
.ev-rk { display: grid; place-items: center; width: 52px; height: 60px; color: var(--paper); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.ev-rk b { font-size: 12px; font-weight: 800; font-stretch: 108%; }
.ev-name b { display: block; font-size: 17px; font-weight: 800; font-stretch: 108%; line-height: 1.2; }
.ev-name small, .ev-meta small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.35; opacity: .6; }
.ev-val { font-size: 17px; font-weight: 800; font-stretch: 108%; font-variant-numeric: tabular-nums; }
.ev-meta { font-size: 13px; font-weight: 600; }
.ev-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); margin-top: clamp(64px, 10vh, 120px);
  padding-top: 24px; border-top: 1px solid var(--ink); }
.ev-notes h2 { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.ev-notes p { margin-top: 10px; font-size: 14px; line-height: 1.5; opacity: .7; }
.ev-left, .ev-read { list-style: none; display: grid; gap: 12px; margin-top: 14px; font-size: 14px; line-height: 1.5; }
.ev-left b { display: block; font-weight: 700; }
.ev-left span { opacity: .7; }
.site-footer a:hover { color: var(--paper); }
@media (max-width: 640px) {
  /* one row of chapters that scrolls sideways, so the list starts on the first screen */
  .ev-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; scrollbar-width: none; }
  .ev-chips::-webkit-scrollbar { display: none; }
  .ev-chips button { flex: none; }
  .ev-it > button { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
  .ev-rk { width: 42px; height: 48px; }
  .ev-rk b { font-size: 10.5px; }
  .ev-meta { grid-column: 2 / -1; }
}
@media (max-width: 760px) { .ev-notes { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 96px var(--gutter); }
.lost svg { width: 56px; height: 62px; margin-bottom: 28px; }
.lost h1 { font-weight: 900; font-stretch: 125%; font-size: clamp(48px, 10vw, 140px); line-height: .85; text-transform: uppercase; letter-spacing: -.02em; }
.lost p { margin: 20px auto 36px; max-width: 36ch; line-height: 1.6; opacity: .7; }
.lost a { display: inline-block; padding-bottom: 6px; border-bottom: 1px solid; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }

/* ---------------------------------------------------------------- motion preferences */
@media (prefers-reduced-motion: reduce) {
  .starbtn .pulse, .starbtn svg, .cueline::after { animation: none; }
  .starbtn .star { transition: none; }
}
