:root {
  color-scheme: dark;
  --night: #080c0f;
  --panel: #10171b;
  --panel-2: #151d21;
  --paper: #e7e0d3;
  --muted: #919a98;
  --line: rgba(231, 224, 211, 0.14);
  --amber: #f0a143;
  --amber-dim: #9f642d;
  --red: #ec5549;
  --cyan: #6fc9d2;
  --petrol: #245b61;
  --max: 1200px;
  --reading: 720px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 76% 8%, rgba(36, 91, 97, 0.18), transparent 34rem),
    var(--night);
  color: var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(231, 224, 211, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 224, 211, 0.027) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

a { color: inherit; text-decoration-color: var(--amber-dim); text-underline-offset: 0.22em; }
a:hover { color: #fff; text-decoration-color: var(--amber); }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 99;
  padding: 0.65rem 0.85rem;
  background: var(--paper);
  color: var(--night);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand, .site-nav a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand::before {
  width: 0.58rem;
  height: 0.58rem;
  content: "";
  background: var(--amber);
  box-shadow: 0 0 18px rgba(240, 161, 67, 0.75);
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); }
.site-nav a[aria-current="page"] { color: var(--amber); }

.pixel-rail {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
  width: min(19rem, 38vw);
}
.pixel-rail i { aspect-ratio: 1; background: rgba(231, 224, 211, 0.1); }
.pixel-rail i:nth-child(-n+5), .pixel-rail i:nth-child(n+19) { background: var(--red); }
.pixel-rail i:nth-child(n+6):nth-child(-n+18) { background: rgba(240, 161, 67, 0.52); }
.motion-ready .pixel-rail i { opacity: 0; transform: scale(0.55); }
.motion-ready .pixel-rail.is-revealed i { opacity: 1; transform: scale(1); transition: opacity 220ms ease, transform 220ms ease; }
.motion-ready .pixel-rail.is-revealed i:nth-child(2n) { transition-delay: 40ms; }
.motion-ready .pixel-rail.is-revealed i:nth-child(3n) { transition-delay: 80ms; }

.landing {
  display: grid;
  min-height: calc(100svh - 77px);
  grid-template-rows: 1fr auto;
  padding-block: clamp(3rem, 9vh, 8rem) 2rem;
}
.landing__main { display: grid; align-content: center; position: relative; }
.kicker, .meta-line, .signal-label, .figure__eyebrow, .source-type {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.kicker { color: var(--amber); }
.landing h1, .archive-hero h1 {
  margin: 1rem 0;
  font-size: clamp(4.1rem, 13vw, 11rem);
  font-weight: 560;
  letter-spacing: -0.075em;
  line-height: 0.78;
  text-transform: uppercase;
}
.landing h1 span { display: block; color: transparent; -webkit-text-stroke: 1px var(--paper); margin-left: 0.12em; }
.landing__statement { max-width: 25rem; margin-left: min(47vw, 34rem); font-size: clamp(1.1rem, 2vw, 1.7rem); line-height: 1.25; }
.landing__footer { display: flex; justify-content: space-between; color: var(--muted); }

.signal-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  margin-top: clamp(4rem, 10vh, 8rem);
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.signal-entry strong { display: block; margin-top: 0.5rem; font-size: clamp(1.15rem, 2vw, 1.65rem); font-weight: 500; }
.signal-entry__arrow { color: var(--amber); font-size: 1.8rem; transition: transform 180ms ease; }
.signal-entry:hover .signal-entry__arrow { transform: translateX(0.35rem); }

.archive-hero { padding: clamp(4rem, 12vh, 9rem) 0 clamp(3rem, 8vh, 6rem); }
.archive-hero h1 { font-size: clamp(4rem, 14vw, 12rem); }
.archive-intro { max-width: 42rem; font-size: clamp(1.15rem, 2.1vw, 1.7rem); line-height: 1.42; color: #c9c5bb; }

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(22rem, 0.88fr);
  min-height: 36rem;
  margin-bottom: 6rem;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  text-decoration: none;
}
.featured-card__image { position: relative; min-height: 26rem; overflow: hidden; }
.featured-card__image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.72) contrast(1.06); transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 400ms ease; }
.featured-card:hover img { transform: scale(1.025); filter: saturate(0.9) contrast(1.08); }
.featured-card__image::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, transparent 70%, var(--panel)); }
.featured-card__body { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 4vw, 3.5rem); }
.featured-card__body { min-width: 0; }
.featured-card h2 {
  margin: 1rem 0;
  max-width: 100%;
  font-size: clamp(2rem, 3.35vw, 3.65rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
  overflow-wrap: break-word;
  hyphens: auto;
}
.featured-card p { color: #bbb9b2; line-height: 1.6; }

.article-hero { padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.article-hero__copy { width: min(calc(100% - 2rem), 980px); margin: clamp(4rem, 12vh, 9rem) auto 3rem; }
.article-hero h1 { margin: 1rem 0 1.4rem; max-width: 920px; font-size: clamp(2.8rem, 7.5vw, 7rem); font-weight: 570; letter-spacing: -0.06em; line-height: 0.94; }
.article-hero__dek { max-width: 780px; margin: 0; color: #c5c3bc; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.46; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; margin-top: 2.2rem; color: var(--muted); }
.article-hero__media { position: relative; width: min(calc(100% - 2rem), 1440px); margin-inline: auto; overflow: hidden; border: 1px solid var(--line); background: #050708; }
.article-hero__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.article-hero__media::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(to top, rgba(8, 12, 15, 0.54), transparent 42%); }
.hero-signal { position: absolute; right: 2rem; bottom: 1.5rem; z-index: 2; }

.article-layout { width: min(calc(100% - 2rem), var(--reading)); margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) 0 8rem; }
.article { min-width: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 1.55vw, 1.22rem); line-height: 1.76; }
.article p { margin: 0 0 1.55em; }
.article > p:first-of-type::first-letter { float: left; margin: 0.08em 0.12em 0 0; color: var(--amber); font-family: ui-sans-serif, sans-serif; font-size: 4.7em; font-weight: 620; line-height: 0.72; }
.article h2 { margin: 3.5em 0 0.85em; font-family: ui-sans-serif, sans-serif; font-size: clamp(1.8rem, 4vw, 3.1rem); font-weight: 580; letter-spacing: -0.045em; line-height: 1.02; }
.article strong { color: #fff4df; }
.article-note { margin-block: 2.2rem; padding: 1.2rem 1.4rem; border-left: 2px solid var(--amber); background: rgba(240, 161, 67, 0.055); color: #c9c4b9; font-family: ui-sans-serif, sans-serif; font-size: 0.9rem; line-height: 1.55; }

.data-figure { width: min(100%, 980px); margin: 4rem 0; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); background: linear-gradient(145deg, #12191d, #0c1114); font-family: ui-sans-serif, sans-serif; }
.data-figure figcaption { margin-bottom: 2rem; }
.data-figure h3 { margin: 0.55rem 0 0; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 560; letter-spacing: -0.035em; }
.figure__eyebrow { color: var(--amber); }
.pixel-chart { display: grid; gap: 1.5rem; }
.pixel-row { display: grid; grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 2fr); gap: 1rem; align-items: center; }
.pixel-row__label strong { display: block; font-size: 1.05rem; }
.pixel-row__label span { color: var(--muted); font-size: 0.78rem; }
.pixel-cells { display: grid; grid-template-columns: repeat(24, 1fr); gap: clamp(2px, 0.35vw, 5px); }
.pixel-cells i { aspect-ratio: 1; background: rgba(231, 224, 211, 0.08); border: 1px solid rgba(231, 224, 211, 0.035); }
.pixel-cells i.active { background: var(--amber); box-shadow: 0 0 12px rgba(240, 161, 67, 0.25); }
.pixel-row--red .pixel-cells i.active { background: var(--red); box-shadow: 0 0 12px rgba(236, 85, 73, 0.25); }
.motion-ready .data-figure:not(.is-revealed) .pixel-cells i.active { background: rgba(231, 224, 211, 0.08); box-shadow: none; }
.motion-ready .data-figure.is-revealed .pixel-cells i.active { transition: background 250ms ease, box-shadow 250ms ease; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(2) { transition-delay: 32ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(3) { transition-delay: 64ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(4) { transition-delay: 96ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(5) { transition-delay: 128ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(6) { transition-delay: 160ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(7) { transition-delay: 192ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(8) { transition-delay: 224ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(9) { transition-delay: 256ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(10) { transition-delay: 288ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(11) { transition-delay: 320ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(12) { transition-delay: 352ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(13) { transition-delay: 384ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(14) { transition-delay: 416ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(15) { transition-delay: 448ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(16) { transition-delay: 480ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(17) { transition-delay: 512ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(18) { transition-delay: 544ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(19) { transition-delay: 576ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(20) { transition-delay: 608ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(21) { transition-delay: 640ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(22) { transition-delay: 672ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(23) { transition-delay: 704ms; }
.motion-ready .data-figure.is-revealed .pixel-cells i:nth-child(24) { transition-delay: 736ms; }
.figure-note { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.completion-bars { display: grid; gap: 1rem; }
.completion-bar { display: grid; grid-template-columns: 9rem 1fr 4rem; align-items: center; gap: 0.85rem; }
.completion-bar__track { height: 16px; background: rgba(231, 224, 211, 0.08); overflow: hidden; }
.completion-bar__fill { display: block; height: 100%; transform-origin: left; background: repeating-linear-gradient(90deg, var(--cyan) 0 12px, transparent 12px 16px); }
.completion-bar__fill--548 { width: 54.8%; }
.completion-bar__fill--206 { width: 20.6%; }
.completion-bar--full .completion-bar__fill { background: repeating-linear-gradient(90deg, var(--amber) 0 12px, transparent 12px 16px); }
.motion-ready .data-figure:not(.is-revealed) .completion-bar__fill { transform: scaleX(0); }
.motion-ready .data-figure.is-revealed .completion-bar__fill { transform: scaleX(1); transition: transform 900ms cubic-bezier(.2,.75,.15,1); }
.completion-bar strong { font-variant-numeric: tabular-nums; text-align: right; }

.process-diagram { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.65rem; }
.process-diagram::before { position: absolute; top: 1.25rem; left: 7%; right: 7%; height: 1px; content: ""; background: var(--line); }
.process-node { position: relative; z-index: 1; text-align: center; }
.process-node__light { width: 2.5rem; height: 2.5rem; margin: 0 auto 0.75rem; border: 1px solid var(--line); background: var(--panel-2); box-shadow: inset 0 0 0 0.45rem var(--night); }
.process-node span { color: var(--muted); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.motion-ready .data-figure:not(.is-revealed) .process-node__light { background: var(--panel-2); }
.motion-ready .data-figure.is-revealed .process-node__light { background: var(--amber); transition: background 260ms ease, box-shadow 260ms ease; }
.motion-ready .data-figure.is-revealed .process-node:nth-child(2) .process-node__light { transition-delay: 150ms; }
.motion-ready .data-figure.is-revealed .process-node:nth-child(3) .process-node__light { transition-delay: 300ms; }
.motion-ready .data-figure.is-revealed .process-node:nth-child(4) .process-node__light { transition-delay: 450ms; }
.motion-ready .data-figure.is-revealed .process-node:nth-child(5) .process-node__light { transition-delay: 600ms; }
.motion-ready .data-figure.is-revealed .process-node:nth-child(6) .process-node__light { transition-delay: 750ms; }
.motion-ready .data-figure.is-revealed .process-node:last-child .process-node__light { background: var(--red); box-shadow: inset 0 0 0 0.45rem var(--night), 0 0 20px rgba(236,85,73,.26); }

.pullquote { margin: 4rem 0; padding: 2rem 0 2rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #f3bc73; font-family: ui-sans-serif, sans-serif; font-size: clamp(1.5rem, 4vw, 2.8rem); letter-spacing: -0.04em; line-height: 1.08; }

.sources { margin-top: 5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.sources ol { padding-left: 1.2rem; }
.sources li { margin-bottom: 1rem; color: #b4b1aa; font-family: ui-sans-serif, sans-serif; font-size: 0.9rem; line-height: 1.55; }
.source-type { color: var(--amber); font-size: 0.62rem; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }

.motion-ready .reveal { opacity: 0; transform: translateY(22px); }
.motion-ready .reveal.is-revealed { opacity: 1; transform: translateY(0); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.7,.2,1); }

@media (max-width: 820px) {
  .pixel-rail { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__image { min-height: 21rem; }
  .featured-card__image::after { background: linear-gradient(to bottom, transparent 70%, var(--panel)); }
  .process-diagram { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 0.5rem; }
  .process-diagram::before { display: none; }
}

@media (max-width: 560px) {
  .site-header { min-height: 66px; }
  .site-nav { gap: 1rem; }
  .site-nav .hide-mobile { display: none; }
  .landing { min-height: calc(100svh - 67px); }
  .landing__statement { margin-left: 18vw; }
  .landing__footer { gap: 1rem; font-size: 0.75rem; }
  .article-hero__copy { margin-top: 3rem; }
  .article-hero__media { width: 100%; border-inline: 0; }
  .article-hero__media img { height: auto; aspect-ratio: auto; object-fit: contain; object-position: center; }
  .hero-signal { right: 1rem; bottom: 1rem; }
  .pixel-row { grid-template-columns: 1fr; }
  .completion-bar { grid-template-columns: 1fr 3.5rem; }
  .completion-bar > span:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
