/* Dowding Labs · v1
   Cream paper and RAF slate navy ink. One radar, drawn three ways.
   Signal red, recon blue and instrument amber are kept for verdicts. */

:root {
  --cream: #f2efe7;
  --navy: #1b263b;
  --aluminum: #94a3b8;
  --duck: #779fa1;
  --red: #c83e3b;
  --blue: #2b6cb0;
  --amber: #f29a25;

  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(18px, 4.2vw, 64px);
  --wrap: min(1360px, 100% - 2 * var(--gutter));
  --section: clamp(84px, 9.5vw, 148px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
}

/* Tone tokens: a section says light (cream), dark (navy) or mid (aluminum). */
body, [data-tone="light"] {
  --bg: var(--cream);
  --fg: var(--navy);
  --fg-2: #566075;
  --fg-3: #626c7f;
  --fg-inv: var(--cream);
  --rule: rgba(27, 38, 59, .16);
  --rule-strong: rgba(27, 38, 59, .36);
  --c-red: #b93330;
  --c-blue: var(--blue);
  --c-amber: #9a5a00;
  --btn-hover: var(--blue);
}
[data-tone="dark"] {
  --bg: var(--navy);
  --fg: var(--cream);
  --fg-2: #b6c0cf;
  --fg-3: var(--aluminum);
  --fg-inv: var(--navy);
  --rule: rgba(242, 239, 231, .16);
  --rule-strong: rgba(242, 239, 231, .42);
  --c-red: #ea6c68;
  --c-blue: #9cc3c5;
  --c-amber: var(--amber);
  --btn-hover: #ffffff;
}
[data-tone="mid"] {
  --bg: var(--aluminum);
  --fg: var(--navy);
  --fg-2: #2c3850;
  --fg-3: #3a4760;
  --fg-inv: var(--cream);
  --rule: rgba(27, 38, 59, .26);
  --c-red: #a52a27;
  --c-blue: #1f4f84;
  --c-amber: #7a4700;
  --btn-hover: var(--blue);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
/* page to page: the browser's own crossfade, quick enough to feel instant; the nav stays put across it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: cubic-bezier(.33, 1, .68, 1); }
.nav { view-transition-name: site-nav; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main > section, .footer { background: var(--bg); color: var(--fg); }
img, svg, canvas { display: block; }
::selection { background: var(--navy); color: var(--cream); }
[data-tone="dark"] ::selection { background: var(--cream); color: var(--navy); }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 4px; }
.wrap { width: var(--wrap); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--cream); padding: 10px 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Page to page: a soft radar beam sweeps one page away and the next one in ---------- */
.page-sweep { display: none; position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; contain: strict; }
.ps-sheet { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
.ps-sheet canvas, .ps-solid { position: absolute; top: 0; display: block; height: 100%; }
.ps-solid { background: var(--navy); }
/* the Spitfire: cream body, navy ink, a soft shadow on the page below; only one of the two flies at a time */
.ps-plane { position: absolute; display: none; }
.page-sweep[data-phase="out"] .ps-plane.is-out, .page-sweep[data-phase="in"] .ps-plane.is-in { display: block; }
.page-sweep[data-phase="out"] .ps-band-trail, .page-sweep[data-phase="in"] .ps-band-lead { display: none; }
.ps-plane img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ps-ink { fill: var(--cream); stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ps-fine { fill: none; stroke-width: 1; }
.ps-dot { fill: var(--red); }
/* contrails from the wingtips, fading out behind */
.ps-trail {
  position: absolute; right: 43.1%; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(119, 159, 161, .95) 0 7px, transparent 7px 13px);
  -webkit-mask: linear-gradient(to left, #000, transparent); mask: linear-gradient(to left, #000, transparent);
}
.ps-trail.is-top { top: 3.8%; }
.ps-trail.is-bottom { top: 88.6%; }
html.is-arriving body::before { content: ""; position: fixed; inset: 0; z-index: 89; background: var(--navy); }

/* ---------- One continuous page: sections share one background that glides between tones ---------- */
html.has-morph main > section, html.has-morph .footer { background: transparent; }
/* the other tone, laid over the page and faded by the compositor while the background changes (main.js flow);
   taller than the screen so phone toolbars sliding in and out never uncover its edge */
.page-tint { position: fixed; top: -20vh; bottom: -20vh; left: 0; right: 0; z-index: -1; background: var(--navy); opacity: 0; pointer-events: none; will-change: opacity; }

/* ---------- A quiet halftone of dots, fading out from one corner of a section ---------- */
[data-dots] { position: relative; isolation: isolate; }
.dots { position: absolute; z-index: -1; pointer-events: none; opacity: 0; }
.dots-tr { top: 0; right: 0; }
.dots-tl { top: 0; left: 0; }
.dots-br { bottom: 0; right: 0; }
.dots-bl { bottom: 0; left: 0; }

/* ---------- Wordmark (Kovan's logo as a mask, so it takes any colour) ---------- */
.wordmark {
  display: block;
  width: 108px;
  aspect-ratio: 1054 / 243;
  background-color: currentColor;
  -webkit-mask: url("../brand/wordmark-mask.png") center / contain no-repeat;
          mask: url("../brand/wordmark-mask.png") center / contain no-repeat;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  color: var(--fg);
  transition: color .6s var(--ease-soft);
}
.nav.is-scrolled[data-tone="light"] { background: var(--nav-bg, rgba(242, 239, 231, .95)); }
.nav.is-scrolled[data-tone="dark"]  { background: var(--nav-bg, rgba(27, 38, 59, .95)); }
.nav-brand { color: inherit; padding: 6px 0; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 38px); }
.nav-links a { position: relative; color: inherit; text-decoration: none; font-size: .95rem; white-space: nowrap; }
.nav-links a:not(.nav-cta)::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: currentColor;
  opacity: 0; transform: scale(.2);
  transition: opacity .45s var(--ease-soft), transform .6s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover::before,
.nav-links a[aria-current="page"]::before { opacity: 1; transform: scale(1); }
.nav-cta {
  display: inline-flex; align-items: center; height: 36px; padding: 0 17px;
  border-radius: 999px;
  background: var(--fg); color: var(--fg-inv) !important;
  font-weight: 500;
  transition: background-color .45s var(--ease-soft), color .45s var(--ease-soft);
}
.nav-cta:hover { background: var(--btn-hover); }

/* ---------- Type ---------- */
.display {
  margin: 0 0 clamp(24px, 3vw, 44px);
  max-width: 15ch;
  font-weight: 620;
  font-size: clamp(2.5rem, 5.6vw, 5.6rem);
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.lede {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--fg-2);
  text-wrap: pretty;
}
.lede b { color: var(--fg); font-weight: 600; }
.fine { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--fg-3); }
.tag { margin: 0 0 clamp(14px, 1.6vw, 22px); font-size: 1rem; font-weight: 500; color: var(--fg-2); }

/* Headings rise in line by line. anime.js cuts the lines; this keeps descenders from clipping. */
.js [data-split] { visibility: hidden; }
.js [data-split].is-split { visibility: visible; }
[data-split] span:has(> [data-line]) { padding-bottom: .14em; margin-bottom: -.14em; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 6px 0 20px;
  border: 0; border-radius: 999px;
  background: var(--fg); color: var(--fg-inv);
  font-family: var(--sans); font-size: .96rem; font-weight: 500; letter-spacing: -.005em; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .45s var(--ease-soft), color .45s var(--ease-soft), box-shadow .45s var(--ease-soft);
}
.btn span {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--fg-inv); color: var(--fg);
  font-size: .95rem; line-height: 1;
  transition: transform .55s var(--ease-out), background-color .45s var(--ease-soft), color .45s var(--ease-soft);
}
.btn:hover { background: var(--btn-hover); }
.btn:hover span { transform: rotate(-45deg); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn-ghost span { background: var(--fg); color: var(--fg-inv); }
.btn-ghost:hover { background: var(--fg); color: var(--fg-inv); box-shadow: inset 0 0 0 1px var(--fg); }
.btn-ghost:hover span { background: var(--fg-inv); color: var(--fg); }
.btn-big { gap: 18px; height: 54px; padding: 0 8px 0 26px; font-size: clamp(1rem, 1.25vw, 1.12rem); }
.btn-big span { width: 38px; height: 38px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 0 3px; border: 0;
  color: var(--fg); text-decoration: none; font: inherit; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  cursor: pointer;
  transition: background-size .6s var(--ease-out);
}
.link-arrow::after { content: "→"; transition: transform .5s var(--ease-out); }
.link-arrow.is-again::after { content: "↻"; }
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-arrow:hover::after { transform: translateX(5px); }

/* ---------- Home hero: the radar ---------- */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 100svh; }
.hero-radar { position: absolute; inset: 0; margin: 0; }
.hero-radar canvas { width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; padding-block: 112px 72px; will-change: transform, opacity; }
.hero-title {
  margin: 0;
  max-width: 10.5ch;
  font-weight: 640;
  font-size: clamp(2.8rem, 6.3vw, 6.6rem);
  line-height: .92;
  letter-spacing: -.052em;
  text-wrap: balance;
}
.hero-sub {
  max-width: 31ch;
  margin: clamp(22px, 2.6vw, 34px) 0 0;
  font-size: clamp(1.12rem, 1.5vw, 1.4rem);
  line-height: 1.42;
  color: var(--fg-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 3.2vw, 42px); }

/* ---------- Mission: Chain Home on the left, the statement on the right ---------- */
.mission { padding-block: clamp(24px, 3vw, 48px) clamp(40px, 4vw, 64px); }
.mission-stage { position: relative; }
.masts { margin: 0; }
.masts-canvas { width: 100%; height: clamp(440px, 45vw, 640px); }
.masts.no-webgl { display: none; }
.mission-stage::after {
  content: ""; position: absolute; inset: 0 0 0 34%; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--page-rgb, 242, 239, 231), 0) 0%, rgba(var(--page-rgb, 242, 239, 231), .3) 14%, rgba(var(--page-rgb, 242, 239, 231), .72) 28%, rgba(var(--page-rgb, 242, 239, 231), .94) 42%, rgb(var(--page-rgb, 242, 239, 231)) 58%);
}
.mission-copy {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: flex-end;
  pointer-events: none;
}
.mission-text { width: min(47%, 640px); pointer-events: auto; }
.statement {
  margin: 0;
  font-weight: 580;
  font-size: clamp(1.9rem, 3.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.038em;
  text-wrap: balance;
}
.mission-body {
  margin: clamp(22px, 2.4vw, 34px) 0 0;
  max-width: 36ch;
  font-size: clamp(1.08rem, 1.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--fg-2);
}
.mission-body strong { color: var(--fg); font-weight: 600; }
.masts-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0 auto; font-size: .85rem; color: var(--fg-3); }

/* ---------- What we do: one frame, two panels ---------- */
/* Hairlines only, square corners, and a shared grid (subgrid) so every rule lines up across both panels. */
.doors { --frame: rgba(242, 239, 231, .2); padding-block: clamp(64px, 6.5vw, 104px) var(--section); }
.doors-title { margin: 0 0 clamp(34px, 4.4vw, 64px); font-weight: 640; font-size: clamp(2.8rem, 6.4vw, 6.4rem); line-height: .92; letter-spacing: -.055em; }
.panels {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto;
  border: 1px solid var(--frame);
}
.panel {
  position: relative; grid-row: 1 / span 4;
  display: grid; grid-template-rows: subgrid;
  color: var(--fg); text-decoration: none;
  transition: background-color .6s var(--ease-soft);
}
/* the divider is drawn by the frame, not by a panel border, so both panels are exactly the same width and every rule lines up */
.panels::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--frame); pointer-events: none; }
.panel-for, .panel-copy, .panel-go { padding-inline: clamp(20px, 2.2vw, 32px); }
.panel-for { padding-block: 18px; font-size: .95rem; font-weight: 500; color: var(--fg-2); }
.panel-art { position: relative; aspect-ratio: 16 / 9; border-block: 1px solid var(--frame); overflow: hidden; }
.panel-copy { display: block; padding-block: clamp(26px, 2.8vw, 38px) clamp(30px, 3.2vw, 44px); }
.panel-line { display: block; max-width: 16ch; font-size: clamp(1.75rem, 2.6vw, 2.6rem); font-weight: 620; line-height: 1.02; letter-spacing: -.042em; text-wrap: balance; }
.panel-more { display: block; margin-top: 14px; max-width: 34ch; font-size: clamp(1.02rem, 1.2vw, 1.14rem); line-height: 1.42; color: var(--fg-2); }
.panel-go {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 18px; border-top: 1px solid var(--frame);
  font-size: 1rem; font-weight: 500;
}
.panel-arrow { font-size: 1.15rem; line-height: 1; transition: transform .7s var(--ease-out); }
/* hover: a hairline of light runs along the top of the panel, and the arrow moves on */
.panel::before {
  content: ""; position: absolute; left: -1px; right: 0; top: -1px; height: 2px; z-index: 1;
  background: var(--fg); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .8s var(--ease-out);
}
.panel:hover, .panel:focus-visible { background-color: rgba(242, 239, 231, .03); }
.panel:hover::before, .panel:focus-visible::before { transform: scaleX(1); }
.panel:hover .panel-arrow, .panel:focus-visible .panel-arrow { transform: translateX(8px); }
.panel:focus-visible { outline: none; }
/* registration marks where the frame lines meet, like a technical drawing */
.tick { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; pointer-events: none; }
.tick::before, .tick::after { content: ""; position: absolute; background: rgba(242, 239, 231, .6); }
.tick::before { left: 6px; top: 0; width: 1px; height: 13px; }
.tick::after { top: 6px; left: 0; height: 1px; width: 13px; }
.tick-tl { left: 0; top: 0; } .tick-tm { left: 50%; top: 0; } .tick-tr { left: 100%; top: 0; }
.tick-bl { left: 0; top: 100%; } .tick-bm { left: 50%; top: 100%; } .tick-br { left: 100%; top: 100%; }
/* the drawing area: a faint plotting grid, fading out towards the edges */
/* the faint plotting grid is drawn once onto a canvas by planes.js, its fade baked in
   (a CSS gradient with a mask here was re-rendered on every scroll frame) */
.panel-art .pl-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.panel-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the drawings: cream ink on navy, like a radar scope; red only for what goes wrong */
.panel-art svg { color: var(--fg); }
.pl-ink { fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pl-fill { fill: var(--navy); }
.pl-fine { stroke-width: .75; }
.pl-dash { stroke-dasharray: 2 3; }
.pl-faint { fill: none; stroke: currentColor; stroke-width: 1; opacity: .16; vector-effect: non-scaling-stroke; }
.pl-ring { fill: none; stroke: currentColor; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.pl-sweep { fill: currentColor; }
.pl-name { font-family: var(--sans); font-size: 15px; font-weight: 650; letter-spacing: -.02em; fill: currentColor; }
.pl-tag { font-family: var(--sans); font-size: 11.5px; font-weight: 600; fill: var(--c-red); }
.pl-red { stroke: var(--c-red); }
.pl-head { fill: var(--c-red); }
.pl-plot { fill: currentColor; }
.pl-roundel { fill: var(--c-red); stroke: none; }
.pl-link { stroke-width: 1; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pl-trail { stroke: url(#pl-trail-fade); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }

/* ---------- The name ---------- */
.namesake { padding-block: clamp(48px, 6vw, 88px); }
.namesake .display { max-width: 12ch; }
.namesake .lede { max-width: 40ch; }
/* the heading and its line, centred on the page */
.namesake-body { text-align: center; }
.namesake-body .display, .namesake-body .lede { margin-inline: auto; }
.namesake-body .lede { text-wrap: balance; }
/* the 3D dot portrait (assets/js/portrait.js) is off the page for now; to bring it back, put the text in a
   .namesake-grid beside <figure class="namesake-portrait" data-portrait><canvas></canvas></figure> */
.namesake-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 104px); align-items: center; }
.namesake-portrait { position: relative; margin: 0; justify-self: center; width: min(100%, 470px); aspect-ratio: 200 / 266; }
.namesake-portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Page heads (Enterprise, Research) ---------- */
.phead { padding: clamp(128px, 12.5vw, 184px) 0 clamp(64px, 7vw, 108px); }
.phead-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 104px); align-items: center; }
.phead .lede { margin-bottom: clamp(30px, 3.4vw, 48px); }
.ptitle { margin: 0 0 clamp(18px, 2.2vw, 30px); font-weight: 640; font-size: clamp(3.4rem, 8.5vw, 8.7rem); line-height: .9; letter-spacing: -.055em; }   /* sized so "Research." always fits its column */

/* How ChainHome answers */
.verdicts { margin: 0; padding: 0; list-style: none; }
.verdict { display: grid; grid-template-columns: 10px 4.6rem minmax(0, 1fr); align-items: baseline; column-gap: 16px; padding: 13px 0; }
.verdict i { align-self: center; width: 10px; height: 10px; border-radius: 50%; }
.v-pass i { background: var(--blue); }
.v-hold i { background: var(--amber); }
.v-stop i { background: var(--red); }
.verdict h3 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -.025em; }
.verdict p { margin: 0; font-size: 1.08rem; line-height: 1.4; color: var(--fg-2); }
.verdict h3, .verdict p { transition: opacity .8s var(--ease-soft); }
.verdicts.is-playing .verdict:not(.is-live) h3, .verdicts.is-playing .verdict:not(.is-live) p { opacity: .46; }
.radar { margin: 0; justify-self: end; width: min(100%, 640px); aspect-ratio: 1; }
.radar canvas { width: 100%; height: 100%; }

/* ---------- The invoice scene ---------- */
/* One 3D scene sits behind the whole section; the stage is just the space kept clear for it. */
.invoice { position: relative; padding-block: clamp(84px, 7.4vw, 112px) clamp(64px, 5.6vw, 88px); }
.inv-scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.inv-scene canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.inv-labels { position: absolute; inset: 0; }
.inv { position: relative; z-index: 1; }
.inv-top {
  display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px); min-height: clamp(430px, 57vh, 620px);
}
.inv-copy { display: flex; flex-direction: column; }
.invoice .display { margin: 0 0 clamp(18px, 2vw, 28px); font-size: clamp(2.3rem, 4.05vw, 4.2rem); }
.inv-ticker {
  margin: auto 0 0; padding-top: 28px; min-height: 2.6em; max-width: 21ch;
  font-size: clamp(1.25rem, 1.85vw, 1.7rem); font-weight: 520; line-height: 1.22; letter-spacing: -.02em;
}
.inv-stage { min-height: 100%; }
.inv-label {
  position: absolute; left: 0; top: 0; margin: 0; opacity: 0; white-space: nowrap; text-align: center;
  font-size: .95rem; font-weight: 500; line-height: 1.2; color: var(--fg-2); will-change: transform, opacity;
  text-shadow: 0 0 5px var(--navy), 0 0 12px var(--navy), 0 0 20px var(--navy);
}
.inv-label.is-bad { color: var(--c-red); }
.inv-label small { display: block; margin-top: 3px; font-size: .84rem; font-weight: 500; color: var(--fg-3); }
.inv-label small.is-bad { color: var(--c-red); }
.inv-label.is-zone, .inv-label.is-monitor { color: var(--fg-3); }
.inv-label.is-monitor { color: var(--c-amber); }
.inv-label.is-ch { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 650; letter-spacing: -.035em; line-height: 1; color: var(--fg); }
.inv-label.is-speech { font-size: 1.02rem; color: var(--fg); }
.inv-label.is-speech.is-struck { color: var(--c-red); text-decoration: line-through; }
.inv-label.is-tag { font-size: .95rem; font-weight: 650; }
.inv-label.is-log { color: var(--c-amber); }
.inv-label.is-amt { font-size: clamp(1.7rem, 2.9vw, 2.7rem); font-weight: 640; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.inv-label.is-good { color: var(--c-blue); }
.inv-outcomes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px);
  margin: clamp(14px, 1.8vw, 24px) 0 0; padding: clamp(18px, 2vw, 26px) 0 0;
  list-style: none; border-top: 1px solid var(--rule);
}
.inv-outcomes li { transition: opacity .7s var(--ease-soft); }
.inv.is-playing .inv-outcomes li:not(.is-on) { opacity: .4; }
.inv-outcomes span { display: block; font-size: 1.02rem; font-weight: 500; color: var(--fg-2); }
.inv-outcomes b {
  display: block; margin-top: 8px; white-space: nowrap;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem); font-weight: 620; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--fg-3);
}
.inv-outcomes .is-lost b { color: var(--c-red); }
.inv-outcomes .is-safe b { color: var(--c-blue); }
.inv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding-top: 22px; }

/* ---------- Early results: the live sort ---------- */
.results { padding-block: var(--section); }
.results-head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 104px); align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.results-head .display { margin-bottom: 20px; }
.results-note { margin-top: clamp(26px, 3vw, 40px); }
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: clamp(28px, 4.5vw, 72px); margin: 0; }
.stats dt { font-size: .95rem; color: var(--fg-2); }
.stats dd { margin: 8px 0 0; white-space: nowrap; font-size: clamp(1.9rem, 3.4vw, 3.3rem); font-weight: 620; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.sorter { position: relative; margin: 0; }
.sorter-svg { display: block; overflow: visible; }
.sorter-dot { fill: var(--fg-3); }
.sorter-dot.is-real { fill: var(--blue); }
.sorter-dot.is-fake { fill: var(--red); }
.sorter-slot { fill: none; stroke: var(--rule); stroke-width: 1; }
.sorter-slot.is-queue { stroke-dasharray: 1.5 3; }
.sorter-ring { fill: none; stroke: var(--fg); stroke-width: 1.4; }
.sorter-ring.is-inner { stroke: var(--rule); stroke-width: 1; }
.sorter-beam { stroke: var(--fg); stroke-width: 1.2; opacity: .75; }
.sorter-svg text { font-family: var(--sans); font-size: 15px; font-weight: 500; fill: var(--fg-2); font-variant-numeric: tabular-nums; }
.sorter-svg .is-strong { fill: var(--fg); font-weight: 600; }

/* ---------- Research: the index radar ---------- */
/* the radar always fits the first screen: never wider than its column, never taller than the window allows */
.index-radar { position: relative; margin: 0; justify-self: center; width: min(100%, 640px, max(380px, 100vh - 220px)); aspect-ratio: 1; }
@supports (height: 100svh) { .index-radar { width: min(100%, 640px, max(380px, 100svh - 220px)); } }
.index-radar canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact-link {
  position: absolute; left: 0; top: 0;
  display: block; padding: 10px 14px 10px 20px; margin: 0;
  color: var(--fg); text-decoration: none; white-space: nowrap;
  transform: translate(0, -50%);
}
.contact-link[data-side="left"] { padding: 10px 20px 10px 14px; text-align: right; transform: translate(-100%, -50%); }
.contact-link b, .contact-link span { width: fit-content; text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg), 0 0 10px var(--bg); }
.contact-link[data-side="left"] b, .contact-link[data-side="left"] span { margin-left: auto; }
/* a small radar keeps just the names, so they never run into each other */
.index-radar.is-compact .contact-link span { display: none; }
.contact-link b { display: block; font-size: clamp(1.15rem, 1.7vw, 1.55rem); font-weight: 620; letter-spacing: -.03em; line-height: 1.1; }
.contact-link span { display: block; margin-top: 3px; font-size: .92rem; color: var(--fg-2); }
.contact-link b::after { content: " →"; display: inline-block; opacity: 0; transform: translateX(-6px); transition: opacity .4s var(--ease-soft), transform .5s var(--ease-out); }
.contact-link:hover b::after, .contact-link:focus-visible b::after { opacity: 1; transform: translateX(4px); }

/* ---------- Research: one scene per study ---------- */
.scene { padding-block: clamp(84px, 9vw, 140px); }
.scene-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.scene-grid.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.scene-grid.is-flipped .scene-copy { order: 2; }
.scene .lede { margin-bottom: 18px; }
.scene-authors { margin: 0 0 28px; max-width: 46ch; font-size: .9rem; line-height: 1.55; color: var(--fg-3); }
.scene-links { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 0; }
.scene-fig { margin: 0; aspect-ratio: 10 / 8; }
.scene-fig canvas { width: 100%; height: 100%; }
.scene-fig.sorter { aspect-ratio: auto; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding-block: clamp(104px, 12.5vw, 190px) clamp(88px, 10vw, 150px); }
.contact .wrap { position: relative; }
.contact-title { margin: 0 0 clamp(20px, 2.6vw, 36px); font-weight: 640; font-size: clamp(4rem, 13vw, 13rem); line-height: .88; letter-spacing: -.06em; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 34px; margin-top: clamp(32px, 4vw, 52px); }
.rings {
  position: absolute; top: 50%; right: -14%;
  height: min(100%, 74vw, 900px); width: auto; aspect-ratio: 1;   /* never taller than the section: no cut edges */
  transform: translateY(-50%);
  pointer-events: none;
  opacity: var(--fit, 1);   /* fades in with the navy (main.js flow) */
}
.rings circle { fill: none; stroke: rgba(242, 239, 231, .16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rings .sweep { transform-box: view-box; transform-origin: 300px 300px; }
.rings .sweep line { stroke: rgba(242, 239, 231, .34); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rings .sweep path { fill: url(#sweepFade); }

/* ---------- Footer ---------- */
.footer { padding: 36px 0 48px; border-top: 1px solid var(--rule); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; }
.footer p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--fg-2); }
.footer-copy { color: var(--fg-3) !important; }
.wordmark-foot { width: 96px; margin-top: 4px; color: var(--fg); }

/* ---------- Motion states (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .js [data-split] { visibility: visible; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  body { font-size: 17px; }
  .phead-grid, .results-head, .scene-grid, .scene-grid.is-flipped, .namesake-grid { grid-template-columns: 1fr; }
  .namesake-portrait { justify-self: start; width: min(100%, 380px); }
  .results-head { align-items: start; }
  .scene-grid.is-flipped .scene-copy { order: 0; }
  /* phones and tablets: the statement first, then the masts, so they don't run straight on from the hero radar */
  .mission { padding-top: clamp(56px, 13vw, 96px); }
  .mission-stage { display: flex; flex-direction: column; }
  .mission-stage::after { display: none; }
  .masts-canvas { height: clamp(260px, 62vw, 420px); }
  .mission-copy { position: static; display: block; order: -1; margin: 0 auto clamp(20px, 6vw, 40px); }
  .mission-text { width: auto; }
  .masts-caption { position: static; margin-top: 10px; }
  .radar, .index-radar { justify-self: center; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .rings { right: -40%; height: min(100%, 120vw); opacity: calc(.7 * var(--fit, 1)); }
  .inv-top { display: block; min-height: 0; }
  .inv-ticker { margin-top: 22px; padding-top: 0; max-width: none; }
  .inv-stage { min-height: 0; height: min(126vw, 560px); }
}
@media (max-width: 760px) {
  .nav { padding-block: 14px; gap: 12px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .86rem; }
  .nav-links a:not(.nav-cta)::before { display: none; }
  .nav-links a[aria-current="page"] { font-weight: 650; }
  .nav-cta { height: 33px; padding: 0 13px; }
  .wordmark { width: 80px; }
  .hero { align-items: flex-start; min-height: 0; padding-bottom: 92vw; }
  .hero-copy { padding-block: 104px 0; }
  .stats { column-gap: 30px; }
  .inv-outcomes { grid-template-columns: 1fr; gap: 0; }
  .inv-outcomes li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; }
  .inv-outcomes b { margin: 0; font-size: 1.45rem; }
  .inv-label { font-size: .8rem; }
  .inv-label small { font-size: .74rem; }
  .inv-label.is-speech { font-size: .84rem; }
  .inv-label.is-tag { font-size: .82rem; }
  .sorter-svg text { font-size: 13px; }
  .stats dd { font-size: 1.7rem; }
  .verdict { grid-template-columns: 10px 3.8rem minmax(0, 1fr); column-gap: 12px; }
  .contact-link span { display: none; }
  .panels { grid-template-columns: 1fr; grid-template-rows: none; }
  .panel { grid-row: auto; grid-template-rows: auto auto auto auto; }
  .panels::after { display: none; }
  .panel + .panel { border-top: 1px solid var(--frame); }
  .tick-tm, .tick-bm { display: none; }
}
