/* Galactiscale. One stylesheet, no inline styles (the CSP forbids them). */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #04050b;
  --ink-2: #0a0c17;
  --panel: rgba(10, 13, 26, 0.72);
  --panel-solid: #0b0e1b;
  --line: rgba(160, 180, 255, 0.14);
  --line-strong: rgba(160, 180, 255, 0.42);
  --text: #e9ecf5;
  --muted: #9aa3ba;
  --ion: #7fe7ff;
  --core: #ffd9a0;
  --nova: #ff7aa8;
  --ok: #7dffb2;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

/* overscroll-behavior: the easter egg's swipe-down must not trigger pull-to-refresh. */
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: contain; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Shown only when WebGL is unavailable. */
body.no-webgl {
  background:
    radial-gradient(60rem 30rem at 72% 28%, rgba(255, 217, 160, 0.16), transparent 60%),
    radial-gradient(80rem 50rem at 70% 30%, rgba(90, 120, 255, 0.2), transparent 65%),
    var(--ink);
  background-attachment: fixed;
}
/* The easter egg's relocated palette, for the fallback too. */
body.no-webgl.relocated {
  background:
    radial-gradient(60rem 30rem at 72% 28%, rgba(125, 255, 178, 0.16), transparent 60%),
    radial-gradient(80rem 50rem at 70% 30%, rgba(255, 122, 168, 0.2), transparent 65%),
    var(--ink);
  background-attachment: fixed;
}

#galaxy {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
body.galaxy-ready #galaxy { opacity: 1; }
body.galaxy-ready[data-galaxy="ambient"] #galaxy { opacity: 0.62; }
body.no-webgl #galaxy { display: none; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 11, 0.55) 0, transparent 22%, transparent 70%, rgba(4, 5, 11, 0.6) 100%);
}
body[data-galaxy="ambient"] .scrim {
  background:
    linear-gradient(90deg, rgba(4, 5, 11, 0.86) 0, rgba(4, 5, 11, 0.55) 45%, rgba(4, 5, 11, 0.1) 100%),
    linear-gradient(180deg, rgba(4, 5, 11, 0.5) 0, transparent 30%);
}

body.galaxy-grabbable { cursor: grab; }
body.galaxy-node-hover { cursor: pointer; }
body.galaxy-dragging { cursor: grabbing; user-select: none; }
body.galaxy-explore #galaxy { opacity: 1; touch-action: none; }
body.galaxy-explore .scrim { opacity: 0.18; }
body.galaxy-explore .site-header,
body.galaxy-explore main,
body.galaxy-explore .site-footer {
  opacity: 0;
  pointer-events: none;
}

.site-header, main, .site-footer { position: relative; z-index: 1; transition: opacity 0.25s ease; }
.scrim { transition: opacity 0.25s ease; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }

a { color: var(--ion); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ion); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.5rem + 4vw, 5.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.25; }
h4 { font-size: 1.05rem; letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
sup { font-size: 0.65em; line-height: 0; }
sup a { text-decoration: none; }
sup a.fn-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 1.5rem;
  min-block-size: 1.5rem;
  margin: -0.45rem -0.35rem;
  padding: 0.2rem;
  border-radius: 4px;
}
strong { font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }

.eyebrow {
  font: 500 0.78rem/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion);
  margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 1px; background: currentColor; vertical-align: middle; margin-right: 0.8rem; }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; color: #cfd5e6; max-width: 40rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(4, 5, 11, 0.62); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font: 600 1.05rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.logo svg { color: var(--ion); }
.logo-core { fill: var(--core); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  color: #c6ccdd;
  text-decoration: underline 1px solid transparent;
  text-underline-offset: 0.45em;
  font-size: 0.93rem;
  padding: 0.4rem 0;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.site-nav li a:hover { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.35); }
.site-nav li a[aria-current="page"] { color: #fff; text-decoration-color: var(--ion); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font: 500 0.85rem var(--mono);
  padding: 0.5rem 0.85rem;
  min-block-size: 2.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, scale 0.15s;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--ion); color: #fff; }
.nav-toggle:active { scale: 0.97; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--text); color: var(--ink);
  font: 600 0.98rem/1 var(--body); text-decoration: none;
  padding: 0.95rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, scale 0.15s;
}
.btn:hover { background: var(--ion); color: var(--ink); transform: translateY(-1px); }
.btn:active { scale: 0.97; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }
.btn-small { padding: 0.62rem 1rem; font-size: 0.86rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* Hero */
.hero { min-height: calc(100svh - 4.25rem); display: flex; flex-direction: column; justify-content: center; padding: 5rem 0 3rem; }
.hero h1 { max-width: 13ch; }
.hero .lede { max-width: 34rem; }
.hint { font: 400 0.78rem var(--mono); color: var(--muted); letter-spacing: 0.08em; margin-top: 3.5rem; }
.hint span { color: var(--ion); }

.page-head { padding: clamp(4rem, 10vw, 8rem) 0 clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); max-width: 18ch; }

section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.band { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(4, 5, 11, 0.78), rgba(4, 5, 11, 0.6)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; margin: 0; }
.stats > div { padding: 1.6rem 1.5rem; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font: 500 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.stats dd { margin: 0; font: 500 clamp(1.7rem, 3vw, 2.5rem)/1 var(--display); letter-spacing: -0.03em; }
.stats dd small { display: block; font: 400 0.82rem/1.4 var(--body); letter-spacing: 0; color: var(--muted); margin-top: 0.6rem; }

/* Cards */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card p { color: #c2c8da; font-size: 0.98rem; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color 0.2s, transform 0.2s, background 0.2s, scale 0.15s; }
a.card:hover { border-color: var(--ion); transform: translateY(-3px); background: rgba(14, 19, 38, 0.86); }
a.card:active { scale: 0.99; }
.card .num { font: 500 0.75rem var(--mono); color: var(--ion); letter-spacing: 0.14em; display: block; margin-bottom: 1.1rem; }
.card .more { font: 500 0.82rem var(--mono); color: var(--ion); }
.card .more::after { content: " \2192"; content: " \2192" / ""; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split.narrow-left { grid-template-columns: 0.8fr 1.2fr; }
.split .stats { grid-template-columns: repeat(2, 1fr); }
.split .stats > div:nth-child(odd) { border-left: 0; }
.split .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--ion); }

/* Quote */
.quote { margin: 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--core); }
.panel + .quote { margin-top: 2rem; }
.quote blockquote { margin: 0; }
.quote p { font: 400 clamp(1.3rem, 2.4vw, 1.9rem)/1.3 var(--display); letter-spacing: -0.015em; color: #fff; }
.quote footer,
.quote figcaption { font: 400 0.82rem var(--mono); color: var(--muted); letter-spacing: 0.06em; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.table-scroll + p { margin-top: 0.9rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; padding: 1.1rem 1.3rem 0; font: 500 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
th, td { text-align: left; padding: 0.95rem 1.3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 500 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 500; color: #fff; }
td.num, th.num { font-family: var(--mono); font-size: 0.9rem; white-space: nowrap; }
td.us { color: var(--ion); }

/* Badges */
.badge { display: inline-block; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.38rem 0.6rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(125, 255, 178, 0.4); }
.badge.ion { color: var(--ion); border-color: rgba(127, 231, 255, 0.4); }
.badge.core { color: var(--core); border-color: rgba(255, 217, 160, 0.4); }
.badge.nova { color: var(--nova); border-color: rgba(255, 122, 168, 0.4); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5.4rem; top: 0.6rem; bottom: 0.6rem; width: 1px; background: linear-gradient(var(--ion), var(--core), var(--nova)); opacity: 0.5; }
.timeline > li { display: grid; grid-template-columns: 5.4rem 1fr; gap: 0 2.2rem; padding: 0 0 2.2rem; position: relative; }
.timeline > li::before { content: ""; position: absolute; left: calc(5.4rem - 4px); top: 0.55rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ion); }
.timeline > li.done::before { background: var(--ion); }
.timeline .when { font: 500 1.25rem/1.4 var(--display); color: #fff; }
.timeline .when small { display: block; font: 400 0.72rem var(--mono); color: var(--muted); letter-spacing: 0.08em; }
.timeline h3 { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.timeline p { color: #c2c8da; margin-bottom: 0.5em; max-width: 44rem; }

/* Charts */
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.9rem; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.chart .series { fill: none; stroke: var(--ion); stroke-width: 2.5; stroke-linecap: round; }
.chart .series-dash { fill: none; stroke: var(--core); stroke-width: 2; stroke-dasharray: 6 6; stroke-linecap: round; }
.chart .limit { stroke: var(--nova); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .dot { fill: var(--ink); stroke: var(--ion); stroke-width: 2; }
.chart .dot-now { fill: var(--ion); }
.chart text { font: 400 11px var(--mono); fill: var(--muted); }
.chart text.lbl { fill: var(--text); }
.chart text.limit-lbl { fill: var(--nova); }

/* Lists of things */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { border-bottom: 1px solid var(--line); padding: 1.5rem 0; display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 2rem; align-items: baseline; }
.rows h3 { margin: 0; }
.rows .meta { font: 400 0.8rem var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.rows p { grid-column: 1 / -1; color: #c2c8da; margin: 0.4rem 0 0; max-width: 50rem; }

.release { border-top: 1px solid var(--line); padding: 2.6rem 0; }
.release:first-of-type { border-top: 0; padding-top: 0; }
.release .dateline { font: 500 0.75rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ion); margin-bottom: 0.9rem; }
.release h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); max-width: 28ch; }
.release p { max-width: 46rem; color: #cdd2e2; }
.boilerplate { font-size: 0.88rem; color: var(--muted); }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.person .avatar { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; font: 500 1rem var(--display); color: var(--ink); background: linear-gradient(135deg, var(--ion), var(--core)); margin-bottom: 1.1rem; }
.person h3 { margin-bottom: 0.2rem; }
.person .role { font: 400 0.78rem var(--mono); color: var(--ion); letter-spacing: 0.05em; margin-bottom: 0.9rem; }

.footnotes { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.4rem; font-size: 0.83rem; color: var(--muted); max-width: 52rem; }
.footnotes ol { margin: 0; padding-left: 1.2rem; }
.footnotes li { margin-bottom: 0.5em; }

.cta { text-align: center; padding: clamp(4rem, 9vw, 7rem) 0; }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta p { max-width: 36rem; margin-inline: auto; color: #c2c8da; }
.cta .actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(4, 5, 11, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 4rem 0 2.5rem; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }
.footer-brand { font: 600 1rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem; }
.site-footer h2 { font: 500 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer li a { color: #c6ccdd; text-decoration: none; }
.site-footer li a:hover { color: #fff; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.6rem; max-width: 60rem; }
.footer-legal p { margin-bottom: 0.7em; }

/* Galaxy node label, positioned by galaxy.js */
.galaxy-label {
  position: fixed; left: 0; top: 0; z-index: 14; pointer-events: none;
  min-width: 14rem; max-width: 19rem;
  background: rgba(6, 9, 20, 0.94); border: 1px solid rgba(127, 231, 255, 0.55); border-radius: 12px;
  padding: 0.85rem 1rem; font-size: 0.84rem; line-height: 1.45;
  opacity: 0; visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.galaxy-label.on { opacity: 1; visibility: visible; }
.galaxy-label.pinned { pointer-events: auto; border-color: var(--ion); }
.galaxy-label-head { display: flex; align-items: start; justify-content: space-between; gap: 0.6rem; }
.galaxy-label b { display: block; font: 500 0.8rem var(--mono); color: var(--ion); letter-spacing: 0.04em; }
.galaxy-label i { display: block; font-style: normal; font-weight: 500; color: #fff; margin: 0.2rem 0 0.35rem; }
.galaxy-label p { margin: 0; color: #c2c8da; }
.galaxy-label-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  margin-top: 0.55rem; padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font: 400 0.74rem var(--mono); color: var(--muted);
}
.galaxy-label-actions {
  display: none; align-items: center; justify-content: space-between; gap: 0.6rem;
  margin-top: 0.65rem; padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font: 500 0.76rem var(--mono);
}
.galaxy-label.pinned .galaxy-label-actions { display: flex; }
.galaxy-label-close {
  display: none;
  align-items: center; justify-content: center;
  min-inline-size: 1.75rem; min-block-size: 1.75rem;
  margin: -0.25rem -0.35rem 0 0;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font: 500 1rem/1 var(--mono);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.galaxy-label.pinned .galaxy-label-close { display: inline-flex; }
.galaxy-label-close:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); }

/* Galaxy interactive HUD */
.galaxy-hud {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(6, 9, 20, 0.86);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.48);
}
.galaxy-hud button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-block-size: 2.25rem;
  min-inline-size: 2.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: 500 0.76rem/1 var(--mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, scale 0.12s;
}
.galaxy-hud button:hover { background: rgba(127, 231, 255, 0.14); color: #fff; border-color: rgba(127, 231, 255, 0.4); }
.galaxy-hud button:active { scale: 0.96; }
.galaxy-hud button[aria-pressed="true"] { background: rgba(127, 231, 255, 0.2); color: var(--ion); border-color: var(--ion); }
.galaxy-hud .hud-sep { width: 1px; height: 1.2rem; background: var(--line); }
.galaxy-hud .hud-region {
  font: 500 0.74rem/1 var(--mono);
  color: var(--ion);
  padding: 0 0.35rem;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.galaxy-hud .hud-reset[hidden] { display: none; }

/* Easter egg console (konami.js). Sits clear of the HUD, which is bottom right. */
.egg {
  position: fixed; inset: auto auto 1rem 1rem; margin: 0; padding: 0; z-index: 16;
  width: min(27rem, calc(100vw - 2rem));
  background: rgba(6, 9, 20, 0.95); border: 1px solid rgba(127, 231, 255, 0.55); border-radius: 12px;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 400 0.8rem/1.5 var(--mono); color: #c2c8da;
  opacity: 1;
  transition: opacity 0.18s ease, display 0.18s ease, overlay 0.18s ease;
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    .egg:popover-open { opacity: 0; }
  }
}
.egg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.45rem 0.5rem 0.45rem 0.9rem; border-bottom: 1px solid var(--line);
}
.egg-title { font-weight: 500; color: var(--ion); letter-spacing: 0.04em; }
.egg-close {
  display: inline-grid; place-items: center; min-inline-size: 2rem; min-block-size: 2rem; padding: 0.25rem;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--muted); font: 400 1.2rem/1 var(--body); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, scale 0.12s;
}
.egg-close:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); }
.egg-close:active { scale: 0.96; }
.egg-log { padding: 0.7rem 0.9rem 0.85rem; max-height: min(22rem, 55vh); overflow-y: auto; }
.egg-log p { margin: 0 0 0.35rem; }
.egg-log p:last-child { margin-bottom: 0; }
.egg-cmd { color: #fff; }
.egg-dim { color: var(--muted); font-variant-numeric: tabular-nums; }
.egg-ok { color: var(--ok); }
.egg-warn { color: var(--nova); }
.egg-log .egg-answer { font: 600 2rem/1.2 var(--display); color: var(--core); margin: 0.3rem 0 0.45rem; }
/* In large, friendly letters. */
.egg-log .egg-panic {
  font: 700 clamp(2rem, 1.2rem + 4vw, 2.9rem)/1.05 var(--display); color: var(--core);
  letter-spacing: 0.01em; margin: 0.15rem 0 0.6rem;
}
.egg-quote { font: 400 0.9rem/1.55 var(--body); color: var(--text); border-left: 2px solid var(--nova); padding-left: 0.75rem; }
.egg-ack {
  margin-top: 0.8rem; padding: 0.45rem 0.95rem; min-block-size: 2.25rem;
  background: rgba(127, 231, 255, 0.12); border: 1px solid rgba(127, 231, 255, 0.5); border-radius: 999px;
  color: var(--ion); font: 500 0.8rem var(--mono); cursor: pointer;
  transition: background 0.15s, color 0.15s, scale 0.12s;
}
.egg-ack:hover { background: rgba(127, 231, 255, 0.22); color: #fff; }
.egg-ack:active { scale: 0.96; }

@media (pointer: coarse) {
  .egg-close, .egg-ack { min-block-size: 2.75rem; min-inline-size: 2.75rem; }
  .galaxy-hud button { min-block-size: 2.75rem; min-inline-size: 2.75rem; }
  .galaxy-label-close { min-inline-size: 2.5rem; min-block-size: 2.5rem; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.2rem 1.5rem 1.6rem; background: var(--ink); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0.2rem; }
  .site-nav li a { display: block; padding: 0.6rem 0; font-size: 1.05rem; }
  .site-nav .btn { justify-content: center; }
  .grid-3, .people { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(odd) { border-left: 0; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .split, .split.narrow-left { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  body[data-galaxy="ambient"] .scrim { background: rgba(4, 5, 11, 0.6); }
  body[data-galaxy="hero"] .scrim { background: rgba(4, 5, 11, 0.42); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { width: min(var(--wrap), 100% - 2.2rem); }
  .grid-2, .grid-3, .people { grid-template-columns: 1fr; }
  .timeline::before { left: 4px; }
  .timeline > li { grid-template-columns: 1fr; padding-left: 1.6rem; }
  .timeline > li::before { left: 0; }
  .rows > li { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .galaxy-hud { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; justify-content: center; border-radius: 16px; }
  .egg { inset: auto 0.75rem 7.25rem 0.75rem; width: auto; }
  .egg-log { max-height: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover, a.card:hover, .btn:active, a.card:active, .nav-toggle:active, .galaxy-hud button:active, .egg-close:active, .egg-ack:active {
    transform: none;
    scale: none;
  }
  .btn, a.card, .nav-toggle, .galaxy-hud button, .egg-close, .egg-ack {
    transition-property: color, background-color, border-color;
  }
  .egg { transition: none; }
}

@media (forced-colors: active) {
  #galaxy, .scrim { display: none; }
  .card, .panel, .stats, .table-scroll, .galaxy-hud, .galaxy-label, .egg, .btn, .nav-toggle {
    border: 1px solid CanvasText;
  }
  .btn { forced-color-adjust: auto; }
  :focus-visible { outline: 2px solid Highlight; outline-offset: 3px; }
}
