@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #f5f5f7;
  --soft: rgba(245, 245, 247, 0.86);
  --grey-1: rgba(245, 245, 247, 0.6);
  --grey-2: rgba(245, 245, 247, 0.34);
  --hair: rgba(245, 245, 247, 0.1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;

  /* type scale: four steps, far apart */
  --t-display: clamp(36px, 4.4vw, 60px);
  --t-number: clamp(40px, 5vw, 72px);
  --t-body: 17px;
  --t-small: 13px;

  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --globe-cy: 46vh;   /* set from JS */
  --globe-d: 420px;   /* set from JS */
  --nav-top: 18px;
  --nav-bottom: calc(var(--nav-top) + 32px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }

body {
  font-optical-sizing: auto; /* Inter switches to its display cut at large sizes */
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  /* one cursor for the whole sky: every non-control spot drags the planet */
  cursor: grab;
  touch-action: none;
}
body.dragging, body.dragging * { cursor: grabbing !important; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--grey-1); outline-offset: 4px; border-radius: 4px; }

/* ---------- space ---------- */

/* a barely-there pool of light behind the planet, so the black has depth */
.wash {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(
    ellipse 70% 32% at 50% var(--horizon-y, 62vh),
    rgba(60, 110, 170, 0.14) 0,
    rgba(30, 60, 110, 0.05) 50%,
    transparent 75%
  );
}

#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.ready #scene { opacity: 1; }

/* shown only when WebGL is unavailable */
.globe-fallback {
  display: none;
  position: fixed; z-index: 1;
  left: 50%; top: var(--globe-cy);
  width: var(--globe-d); height: var(--globe-d);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(18, 52, 110, 0.9), rgba(6, 18, 44, 0.95) 62%, rgba(2, 6, 16, 1) 100%);
  box-shadow: 0 0 80px rgba(70, 95, 160, 0.15);
}
body.no-webgl .globe-fallback { display: block; }
body.no-webgl #scene { display: none; }

/* ---------- hero ---------- */

.hero {
  /* always clears the views nav (top 18px + ~32px tall) with breathing room */
  position: fixed; top: calc(var(--nav-bottom) + clamp(14px, 3.5vh, 40px)); left: 0; right: 0;
  z-index: 5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.4s var(--ease) 1.2s, transform 1.4s var(--ease) 1.2s;
}
body.ready .hero { opacity: 1; transform: none; }

.eyebrow {
  font-size: var(--t-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--grey-1);
}
.headline {
  transition: opacity 0.35s ease-out;
  margin-top: 6px;
  font-size: var(--t-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--soft);
  text-wrap: balance;
  padding: 0 20px;
}

/* ---------- the featured stat ---------- */

.stats {
  position: fixed; left: 0; right: 0;
  bottom: calc(100% - var(--horizon-y, 62vh) + clamp(40px, 7vh, 72px));
  z-index: 5;
  padding: 0 var(--gutter);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  /* entrance uses opacity; dimming for the panel uses filter, so the two never wait on each other */
  transition: opacity 1.4s var(--ease) 1.8s, transform 1.4s var(--ease) 1.8s, filter 0.3s ease-out;
}
body.ready .stats { opacity: 1; transform: none; }

.feature {
  --num-scale: 1;
  max-width: 900px;
  margin: 0 auto;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s ease;
}
.feature.is-out { opacity: 0; transform: translateY(6px); filter: blur(4px); }

.feature-num {
  font-size: calc(var(--t-number) * var(--num-scale));
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--soft);
}
.feature-unit { font-size: 0.42em; font-weight: 500; letter-spacing: -0.01em; color: var(--grey-2); }
.feature-label { margin-top: 12px; font-size: var(--t-body); color: var(--grey-1); letter-spacing: -0.01em; }

/* the per-second rate is a detail: revealed on hover */
.feature-rate {
  margin-top: 4px;
  font-size: var(--t-small);
  color: var(--grey-2);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.feature:hover .feature-rate { opacity: 1; }

.meta {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.where {
  min-width: 190px;
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  font-size: var(--t-small);
}
.cat-name { color: var(--soft); font-weight: 500; }
.pos { color: var(--grey-2); font-variant-numeric: tabular-nums; }

.nav-btn {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  color: var(--grey-1);
  background: rgba(245, 245, 247, 0.05);
  transition: color 0.2s ease-out, background 0.2s ease-out;
}
.nav-btn:hover { color: var(--white); background: rgba(245, 245, 247, 0.12); }
.play, .share { margin-left: 6px; }
.share + .play { margin-left: 0; }
.stat-actions { margin-top: 18px; }
.play .i-play { display: none; }
.play.is-paused .i-play { display: block; }
.play.is-paused .i-pause { display: none; }

/* countdown to the next stat */
.progress {
  width: 120px; height: 1px; margin: 14px auto 0;
  background: var(--hair);
  overflow: hidden;
}
.progress i { display: block; height: 100%; background: var(--grey-1); transform-origin: left; transform: scaleX(0); }

/* ---------- "All stats": a corner menu, after earth.nullschool.net ---------- */

.corner {
  position: fixed; z-index: 7;
  left: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 12px; border-radius: 999px;
  font-size: var(--t-small);
  color: var(--soft);
  background: rgba(20, 22, 30, 0.55);
  border: 1px solid var(--hair);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  /* invisible and untouchable until its entrance: hidden elements get no hover or clicks */
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s var(--ease) 2.2s, visibility 0s linear 2.2s, background 0.2s ease-out, border-color 0.2s ease-out;
}
body.ready .corner { opacity: 1; visibility: visible; }
.corner:hover, .corner[aria-expanded="true"] { background: rgba(36, 40, 54, 0.7); border-color: rgba(245, 245, 247, 0.18); }

.index {
  cursor: default;
  touch-action: auto;
  position: fixed; z-index: 8;
  left: var(--gutter); bottom: calc(72px + env(safe-area-inset-bottom));
  width: min(760px, calc(100vw - 2 * var(--gutter)));
  height: min(520px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  border-radius: 20px;
  background: rgba(12, 14, 20, 0.88);
  border: 1px solid rgba(245, 245, 247, 0.09);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  opacity: 0; transform: translateY(8px) scale(0.985); transform-origin: bottom left;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  user-select: text;
}
.index[hidden] { display: none; } /* display:flex above would otherwise keep the closed panel catching the mouse */
.index.is-open { opacity: 1; transform: none; }
/* while browsing, the featured stat steps back so the panel has the stage */
body.index-open .stats { filter: opacity(0.12); }

.index-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--hair);
}
.search input { cursor: text; }
.index-row, .index-cat { cursor: pointer; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--grey-2); }
.search input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 15px; color: var(--white);
  background: none; border: 0; outline: none;
}
.search input::placeholder { color: var(--grey-2); }
.search input::-webkit-search-cancel-button { display: none; }

.index-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px 1fr; }

.index-cats {
  padding: 10px; border-right: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
.index-cat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  font-size: 14px; color: var(--grey-1); text-align: left;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}
.index-cat:hover { background: rgba(245, 245, 247, 0.05); color: var(--soft); }
.index-cat[aria-current="true"] { background: rgba(245, 245, 247, 0.09); color: var(--white); }
.index-cat .count { font-size: 12px; color: var(--grey-2); font-variant-numeric: tabular-nums; }

.index-list { list-style: none; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.index-row {
  width: 100%;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 12px; border-radius: 10px;
  text-align: left;
  transition: background 0.15s ease-out;
}
.index-row:hover { background: rgba(245, 245, 247, 0.05); }
.index-row[aria-current="true"] { background: rgba(245, 245, 247, 0.08); }
.row-label { font-size: 14px; color: var(--grey-1); line-height: 1.35; }
.index-row:hover .row-label, .index-row[aria-current="true"] .row-label { color: var(--white); }
.row-cat { display: block; font-size: 12px; color: var(--grey-2); margin-top: 2px; }
.row-num { flex: none; font-size: 14px; font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-unit { color: var(--grey-2); font-weight: 400; }
.empty { padding: 24px 12px; font-size: 14px; color: var(--grey-2); }

.hint {
  position: fixed; right: var(--gutter);
  bottom: calc(33px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  font-size: var(--t-small);
  color: var(--grey-2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease) 2.6s;
}
body.ready .hint { opacity: 1; }
body.ready .hint.is-gone { opacity: 0; transition: opacity 0.6s ease-out; }

/* ---------- views ---------- */

.views-nav {
  position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 9;
  height: 32px; align-items: center;
  display: flex; justify-content: center; gap: 28px;
  font-size: var(--t-small);
  opacity: 0; transition: opacity 1.4s var(--ease) 1.2s;
}
body.ready .views-nav { opacity: 1; }
.views-nav a { color: var(--grey-2); text-decoration: none; padding: 6px 0; cursor: pointer; transition: color 0.2s ease-out; }
.views-nav a:hover { color: var(--grey-1); }
.views-nav a[aria-current] { color: var(--white); }
.headline.is-out { opacity: 0; }

/* each view owns its own pieces; the others step out of the way */
/* after the first entrance, coming back to Live is quick: no entrance delays */
body.settled .stats { transition: opacity 0.6s var(--ease) 0.25s, transform 0.6s var(--ease) 0.25s, filter 0.3s ease-out; }
body.settled .corner, body.settled .hint { transition: opacity 0.6s var(--ease) 0.25s, visibility 0s 0.25s, background 0.2s ease-out, border-color 0.2s ease-out; }
body:not([data-view="live"]) .stats,
body:not([data-view="live"]) .corner,
body:not([data-view="live"]) .hint,
body:not([data-view="live"]) .index { opacity: 0 !important; visibility: hidden !important; transition: opacity 0.4s ease-out, visibility 0s 0.4s !important; }

.view-you {
  position: fixed; left: 0; right: 0; z-index: 5;
  bottom: calc(100% - var(--horizon-y, 62vh) + clamp(36px, 6vh, 64px));
  padding: 0 var(--gutter);
  text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
body[data-view="you"] .view-you { opacity: 1; visibility: visible; transform: none; transition: opacity 0.7s var(--ease) 0.25s, transform 0.7s var(--ease) 0.25s, visibility 0s; }

/* buttons */
.primary {
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: #0a0b10; background: var(--soft);
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}
.primary:hover { background: var(--white); }
.primary:active { transform: scale(0.98); }
.ghost { padding: 11px 16px; border-radius: 999px; font-size: 14px; color: var(--grey-1); transition: color 0.2s ease-out; }
.ghost:hover { color: var(--white); }
.nav-btn:disabled { opacity: 0.3; pointer-events: none; }

/* Your Earth: the question */
.ask { transition: opacity 0.3s ease-out; }
.ask.is-out { opacity: 0; }
.ask-label { display: block; font-size: var(--t-body); color: var(--grey-1); margin-bottom: 16px; }
.ask-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ask input[type="date"] {
  font: inherit; font-size: 16px; color: var(--white);
  padding: 10px 16px; border-radius: 999px;
  background: rgba(245, 245, 247, 0.06);
  border: 1px solid var(--hair);
  color-scheme: dark;
  cursor: text;
}
.ask input[type="date"]:focus { outline: none; border-color: rgba(245, 245, 247, 0.3); }
.ask-note { margin-top: 14px; font-size: var(--t-small); color: var(--grey-2); }
.ask-note.is-error { color: #fda4af; }

/* Your Earth: the story */
.story-bars { display: flex; gap: 4px; justify-content: center; margin-bottom: 26px; }
.story-bars i { width: 28px; height: 2px; border-radius: 1px; background: var(--hair); transition: background 0.4s ease-out; }
.story-bars i.done { background: var(--soft); }
.story-card { transition: opacity 0.38s ease-out, transform 0.38s ease-out, filter 0.38s ease-out; }
.story-card.is-out { opacity: 0; transform: translateY(6px); filter: blur(4px); }
.story-kicker { font-size: var(--t-small); color: var(--grey-2); margin-bottom: 10px; }
.story-num {
  font-size: clamp(36px, 4.6vw, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--soft); white-space: nowrap;
}
.story-unit { font-size: 0.42em; font-weight: 500; letter-spacing: -0.01em; color: var(--grey-2); }
.story-text { margin: 14px auto 0; max-width: 46ch; font-size: var(--t-body); line-height: 1.45; color: var(--grey-1); text-wrap: balance; }
.story-actions { margin-top: 26px; display: flex; gap: 10px; justify-content: center; align-items: center; }

/* share sheet: previews of the Instagram story and post */
.sheet {
  position: fixed; z-index: 20; inset: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.25s ease-out;
  cursor: default;
}
.sheet[hidden] { display: none; }
.sheet.is-open { opacity: 1; }
.sheet > * { max-width: 92vw; }
.sheet-head, .sheet-options, .sheet-copy, .sheet-tip { width: 520px; }
.sheet {
  grid-template-rows: auto auto auto auto; align-content: center; gap: 18px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-title { font-size: var(--t-body); font-weight: 500; color: var(--white); }
.sheet-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.sheet-option {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px;
  background: rgba(245, 245, 247, 0.04);
  border: 1px solid var(--hair);
  transition: background 0.2s ease-out, border-color 0.2s ease-out, transform 0.2s ease-out;
}
.sheet-option:hover { background: rgba(245, 245, 247, 0.08); border-color: rgba(245, 245, 247, 0.2); }
.sheet-option:active { transform: scale(0.985); }
.sheet-option[aria-busy="true"] { pointer-events: none; }
.sheet-preview { display: block; width: 100%; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(245,245,247,0.06); }
.sheet-preview.story { aspect-ratio: 9 / 16; width: 78%; }
.sheet-preview.post { aspect-ratio: 4 / 5; }
.sheet-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-label { font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.sheet-copy { justify-self: center; width: auto; }
.sheet-tip { text-align: center; font-size: var(--t-small); color: var(--grey-2); min-height: 1.4em; }
@media (max-height: 760px) { .sheet-preview.story { width: 62%; } }
/* shorter windows: the story is anchored to the horizon and grows upward, so tighten it */
@media (max-height: 820px) {
  .view-you { bottom: calc(100% - var(--horizon-y, 62vh) + 22px); }
  .story-bars { margin-bottom: 14px; }
  .story-kicker { margin-bottom: 6px; }
  .story-num { font-size: clamp(32px, 3.8vw, 52px); }
  .story-text { margin-top: 10px; font-size: 15px; }
  .story-actions { margin-top: 16px; }
}

/* the source line under every featured stat */
.feature-source { margin-top: 6px; font-size: 12px; color: var(--grey-2); }
.feature-source a { color: var(--grey-1); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; cursor: pointer; transition: color 0.2s ease-out; }
.feature-source a:hover { color: var(--white); }
.method { margin-left: 8px; padding: 1px 7px; border-radius: 99px; font-size: 11px; color: var(--grey-1); background: rgba(245, 245, 247, 0.07); white-space: nowrap; }

/* Sources view: a quiet reading panel over the planet */
.view-sources {
  position: fixed; z-index: 5; left: 0; right: 0;
  top: calc(var(--hero-bottom, 220px) + 20px); bottom: 20px; /* --hero-bottom is measured, so a wrapping headline never collides */
  display: flex; justify-content: center;
  padding: 0 var(--gutter);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
body[data-view="sources"] .view-sources { opacity: 1; visibility: visible; transform: none; transition: opacity 0.7s var(--ease) 0.25s, transform 0.7s var(--ease) 0.25s, visibility 0s; }
.reading {
  width: min(760px, 100%); overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 32px 40px; border-radius: 20px;
  background: rgba(8, 10, 16, 0.86); border: 1px solid var(--hair);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 15px; line-height: 1.6; color: var(--grey-1);
  user-select: text; cursor: auto; touch-action: auto;
  scrollbar-width: thin; scrollbar-color: rgba(245,245,247,0.15) transparent;
}
.reading:focus { outline: none; }
.reading h2 { margin: 36px 0 12px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--white); scroll-margin-top: 64px; }
.reading h2:first-of-type { margin-top: 8px; }
.reading h3 { margin: 24px 0 8px; font-size: 13px; font-weight: 600; color: var(--soft); }
.reading p, .reading ul { margin-bottom: 12px; max-width: 68ch; }
.reading ul { padding-left: 18px; }
.reading li { margin-bottom: 6px; }
.reading strong { color: var(--soft); font-weight: 500; }
.reading a { color: var(--soft); text-decoration: underline; text-decoration-color: rgba(245,245,247,0.25); text-underline-offset: 3px; cursor: pointer; }
.reading a:hover { color: var(--white); }
.reading-toc {
  /* pinned to the top of the panel while the text scrolls underneath */
  position: sticky; top: -28px; z-index: 1;
  margin: -28px -32px 8px; padding: 26px 32px 14px;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 13px;
  background: #0a0c12;
  border-bottom: 1px solid var(--hair);
}
.reading-toc a { text-decoration: none; color: var(--grey-2); transition: color 0.2s ease-out; }
.reading-toc a:hover { color: var(--soft); }
.reading-toc a[aria-current="true"] { color: var(--white); }
.src-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 20px; padding: 10px 0; border-top: 1px solid rgba(245,245,247,0.06); font-size: 13.5px; }
.src-row dt { color: var(--soft); }
.src-row dd { color: var(--grey-1); }
.src-row .method { margin-left: 6px; }
.src-row .m-rough { color: #fcd9a8; background: rgba(252, 217, 168, 0.08); }
.src-row .note { display: block; margin-top: 4px; font-size: 12.5px; color: var(--grey-2); line-height: 1.5; }
.contact { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--hair); }
@media (max-width: 600px) {
  .view-sources { top: calc(var(--hero-bottom, 200px) + 14px); bottom: 12px; padding: 0 12px; }
  .reading { padding: 20px 18px 32px; }
  .reading-toc { top: -20px; margin: -20px -18px 8px; padding: 18px 18px 12px; gap: 6px 14px; }
  .src-row { grid-template-columns: 1fr; }
}

/* a stat's own page */
.view-stat {
  position: fixed; left: 0; right: 0; z-index: 5;
  /* starts just under the measured headline, so the two never collide */
  top: calc(var(--hero-bottom, 200px) + clamp(20px, 4vh, 44px));
  padding: 0 var(--gutter);
  text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
body[data-view="stat"] .view-stat { opacity: 1; visibility: visible; transform: none; transition: opacity 0.7s var(--ease) 0.25s, transform 0.7s var(--ease) 0.25s, visibility 0s; }
.stat-cat { font-size: var(--t-small); color: var(--grey-2); margin-bottom: 10px; }
.stat-num {
  font-size: clamp(36px, 4.8vw, 68px); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--soft); white-space: nowrap;
}
.stat-about { margin: 16px auto 0; max-width: 58ch; font-size: 16px; line-height: 1.5; color: var(--grey-1); text-wrap: pretty; }
.stat-related { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stat-related a {
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--grey-1); text-decoration: none;
  background: rgba(245, 245, 247, 0.05); border: 1px solid var(--hair);
  cursor: pointer; transition: color 0.2s ease-out, background 0.2s ease-out;
}
.stat-related a:hover { color: var(--white); background: rgba(245, 245, 247, 0.1); }
.stat-related a.all { color: var(--soft); }
.stat-link { color: inherit; text-decoration: none; cursor: pointer; border-bottom: 1px solid transparent; transition: border-color 0.2s ease-out, color 0.2s ease-out; }
.stat-link:hover { color: var(--white); border-bottom-color: var(--grey-2); }
.src-row dt a { color: inherit; text-decoration: none; }
.src-row dt a:hover { color: var(--white); }
@media (max-width: 600px) {
  .stat-num { font-size: 30px; }
  .stat-about { font-size: 14px; }
  .stat-related a:nth-child(n+3):not(.all) { display: none; }
}
@media (max-height: 860px) { .stat-related a:nth-child(n+3):not(.all) { display: none; } .stat-about { margin-top: 12px; } .stat-actions { margin-top: 14px; } .stat-related { margin-top: 12px; } }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; color: var(--grey-1); font-size: var(--t-small); }

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  :root { --t-body: 15px; }
  .where { min-width: 0; }
  :root { --nav-top: 12px; }
  .views-nav { gap: 18px; }
  .story-num { font-size: 30px; }
  .hint { display: none; }
  .corner { left: 50%; transform: translateX(-50%); }
  .index { left: 12px; right: 12px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); height: min(560px, calc(100vh - 120px)); transform-origin: bottom center; }
  .index-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .index-cats { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--hair); scrollbar-width: none; }
  .index-cat { flex: none; gap: 6px; }
}

/* short windows: tighten the vertical rhythm so nothing collides */
@media (max-height: 700px) {
  .hero { top: calc(var(--nav-bottom) + 10px); }
  :root { --t-display: clamp(28px, 3.4vw, 44px); --t-number: clamp(32px, 4vw, 52px); }
  .meta { margin-top: 14px; }
}
@media (max-height: 520px) {
  .eyebrow, .feature-label { display: none; }
  :root { --t-display: 24px; --t-number: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01s !important; animation: none !important; }
}
