
:root {
  --bg: #0B0F14;
  --surface: #1E232B;
  --surface-2: #2E3440;
  --muted: #9CA3AF;
  --accent: #60A5FA;
  --accent-rgb: 96, 165, 250;
  --text: #E5E7EB;
  --line: #2E3440;

  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Type roles, named for the job rather than the value. The stylesheet had
     thirteen unrelated fixed sizes (10 through 22px, several a single pixel
     apart) and eight unrelated clamp ramps, which is a pile of values rather
     than a scale. These are the roles this site actually needs. */
  --t-display: clamp(52px, 7vw, 88px);   /* home hero only */
  --t-title:   clamp(38px, 5vw, 56px);   /* page h1 */
  --t-section: clamp(26px, 3.4vw, 38px); /* h2 */
  --t-sub:     20px;                     /* h3 */
  --t-lead:    18px;                     /* intro prose */
  --t-body:    16px;                     /* default prose */
  --t-small:   14px;                     /* secondary prose, captions */
  --t-label:   12px;                     /* mono tracked labels */
  --t-data:    40px;                     /* stat numerals */

  /* Measure caps. Craft floor wants running prose at 65-75ch; lead-in
     paragraphs sit deliberately narrower so they read as an entry, not body. */
  --measure:      70ch;
  --measure-lead: 50ch;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  /* There was no base size or leading here, so any text whose own rule omitted
     line-height fell back to `normal` (~1.2) — far too tight for light copy on
     a dark ground. */
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--t-lead);
}
.brand img { height: 40px; width: auto; }
.brand .num { color: var(--accent); font-family: var(--font-mono); font-size: var(--t-label); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  border-color: var(--accent);
}
.nav-social {
  display: flex;
  gap: 14px;
}
.nav-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  transition: background .15s, color .15s;
}
.nav-social a:hover { background: var(--accent); color: var(--bg); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    padding: 8px 32px 20px;
    display: none;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .nav-social { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-small);
  padding: 14px 26px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s, color .15s, filter .15s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-dark { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-dark:hover { filter: brightness(1.2); }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 15% 30%, rgba(var(--accent-rgb),0.12), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
  padding: 76px 0 84px;
}
.hero-media-wrap { min-height: 460px; }
.hero-media { height: 100%; }
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  margin: 18px 0 22px;
}
.hero p.lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 28px;
}
.hero-facts span {
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .04em;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 3px;
}
.hero-media-wrap { position: relative; }
.hero-media-wrap::before {
  content: '';
  position: absolute;
  inset: -22px;
  background: radial-gradient(60% 60% at 30% 25%, rgba(var(--accent-rgb),0.18), transparent 70%);
  filter: blur(8px);
  z-index: 0;
}
.hero-media {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.hero-media::after {
  content: '';
  position: absolute; inset: 10px;
  pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 2px 18px no-repeat;
  opacity: 0.8;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media .tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  background: rgba(11,15,20,0.75);
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 5px 10px;
  border-radius: 3px;
}
.hero-media .tag-alt {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  background: rgba(11,15,20,0.75);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 3px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding: 48px 0 56px; gap: 32px; }
}

.page-header { position: relative; z-index: 1; padding: 64px 0 56px; max-width: 640px; }
.page-header h1 { font-size: clamp(34px, 4.6vw, 52px); margin: 16px 0 16px; }
.page-header p.lead { font-size: var(--t-lead); line-height: 1.65; color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-alt {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-dark { background: var(--bg); color: var(--text); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}
.split img { border-radius: 6px; border: 1px solid var(--line); }
.split h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 18px; }
.split p { color: var(--muted); line-height: 1.7; font-size: var(--t-body); }

/* This is a sentence, not a label: it was set at label size (11px) and ran to
   80ch. Prose gets the body family and the small role. */
.split .viewer-note {
  font-family: var(--font-body);
  font-size: var(--t-small);
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
  margin-top: 18px;
}

.media-frame { position: relative; }
.media-frame::before {
  content: '';
  position: absolute;
  inset: -18px;
  background: radial-gradient(60% 60% at 25% 20%, rgba(var(--accent-rgb),0.16), transparent 70%);
  filter: blur(6px);
  z-index: 0;
}
.media-frame img, .media-frame .media-tag { position: relative; z-index: 1; }
.media-tag {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.08em;
  background: rgba(11,15,20,0.75); border: 1px solid var(--line); color: var(--accent);
  padding: 5px 10px; border-radius: 3px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag-row span {
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.04em;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 3px;
}

.quote-block {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 26px;
  font-family: var(--font-head);
  font-size: var(--t-sub);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
  margin-top: 20px;
}

/* ---------- Stat / highlight band ---------- */
.stat-band {
  background: transparent;
  color: var(--text);
  padding: 60px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-band .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.stat { border-left: 1px solid var(--line); padding-left: 22px; }
.stat .num { font-family: var(--font-head); font-size: var(--t-data); font-weight: 700; color: var(--accent); }
.stat .label { color: var(--muted); font-size: var(--t-small); margin-top: 6px; }
@media (max-width: 700px) {
  .stat-band .wrap { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px;
}
.card .k { font-family: var(--font-mono); font-size: var(--t-label); color: var(--accent); letter-spacing: .08em; }
.card h3 { font-size: var(--t-sub); margin: 10px 0 8px; }
.card p { color: var(--muted); font-size: var(--t-small); line-height: 1.6; margin: 0; }
.card-photo {
  display: block;
  width: calc(100% + 52px);
  margin: -26px -26px 18px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Photo strip ---------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.photo-strip figure {
  margin: 0;
}
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.photo-strip figcaption {
  margin-top: 10px;
  font-size: var(--t-label);
  color: var(--muted);
}
@media (max-width: 780px) {
  .photo-strip { grid-template-columns: 1fr; }
}

/* ---------- Timeline (Outreach) ---------- */
.timeline { position: relative; margin-top: 48px; }
.timeline::before {
  content: '';
  position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-left: 40px; margin-bottom: 40px; }
.tl-item::before {
  content: '';
  position: absolute; left: 2px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-date { font-family: var(--font-mono); font-size: var(--t-label); color: var(--accent); letter-spacing: .06em; }
.tl-item h3 { margin: 6px 0 8px; font-size: var(--t-sub); }
/* Ran to 120ch unconstrained — the longest measure on the site. */
.tl-item p { color: var(--muted); line-height: 1.6; margin: 0; max-width: var(--measure); }

/* ---------- Sponsors ---------- */
.sponsor-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Nine sponsors, so three columns divide evenly and nothing is left
     stranded on a row of its own. */
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sponsor-grid > li { margin: 0; }
.sponsor-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 20px 18px 16px;
  text-decoration: none;
  transition: transform .18s ease;
}
a.sponsor-tile:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .sponsor-tile { transition: none; }
  a.sponsor-tile:hover { transform: none; }
}
/* A soft blue-tinted bubble behind each logo. Eight of the nine are dark ink
   drawn for white paper, so they need something light to sit on, but a flat
   white slab fights the dark page — this reads as a decorative plate instead.
   Fixed height keeps nine very differently-shaped logos on one baseline. */
.sponsor-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 92px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, #F4F7FB 0%, #DCE4F0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 0 0 1px rgba(var(--accent-rgb), .12),
    0 8px 22px rgba(0, 0, 0, .28);
  transition: box-shadow .18s ease;
}
a.sponsor-tile:hover .sponsor-mark {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 0 0 1px rgba(var(--accent-rgb), .45),
    0 10px 26px rgba(0, 0, 0, .34);
}
/* LISD supplied a white knockout logo — 85% of its ink is near-white, so on a
   light bubble it would vanish. It keeps a dark bubble until a colour version
   of that logo turns up. */
.sponsor-mark--dark {
  background: linear-gradient(160deg, #39424F 0%, #262D38 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px rgba(var(--accent-rgb), .12),
    0 8px 22px rgba(0, 0, 0, .28);
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-mark { transition: none; }
}
.sponsor-mark img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.sponsor-name {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .04em;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
a.sponsor-tile:hover .sponsor-name { color: var(--text); }
@media (max-width: 700px) {
  .sponsor-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sponsor-mark { height: 66px; padding: 10px; }
  .sponsor-tile { padding: 16px 12px 14px; }
}

/* ---------- Donate ---------- */
/* Was a span styled as an eyebrow; it is the section's actual heading, and
   donate.html had no h2 between its h1 and the footer h3s. Same appearance,
   correct outline. */
/* Sized as a real heading, not a label. Set at label size it left donate.html
   with h2 (12px) below its own body text (14px) — an inverted hierarchy the
   detector reads as flat. At --t-sub the steps are h1 > h2 > body. */
.donate-step-title {
  font-family: var(--font-head);
  font-size: var(--t-sub);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 20px;
  text-align: center;
}
.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.amount-chip {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .03em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.amount-chip:hover { border-color: var(--accent); color: var(--accent); }
.amount-chip--custom { color: var(--muted); }
.amount-chip.is-selected {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
}

.donate-panel { max-width: 640px; margin: 0 auto; }
[hidden] { display: none !important; }

.donate-custom { margin-top: 22px; }
.donate-custom label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.custom-input {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  margin: 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
}
.custom-input:focus-within { border-color: var(--accent); }
.custom-input span {
  font-family: var(--font-mono);
  font-size: var(--t-body);
  color: var(--muted);
}
.custom-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--t-body);
  padding: 12px 0;
}

.donate-error {
  margin-top: 18px;
  font-size: var(--t-small);
  line-height: 1.5;
  color: #F87171;
}
.donate-thanks {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--t-small);
  line-height: 1.7;
}

#checkout { min-height: 320px; }
.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: none;
  transform: none;
}
/* Reassurance copy under the donate button: 12px mono at 89ch with no
   line-height of its own, so it inherited ~1.2. It is a sentence people read
   before paying, so it gets prose treatment and a capped measure. */
.donate-note {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: var(--t-small);
  letter-spacing: 0;
  line-height: 1.6;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

/* ---------- Browser surfaces ---------- */
::selection { background: rgba(var(--accent-rgb), 0.3); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- Outreach reach stepper ---------- */
/* Without JS the six programs render as a plain list; js/outreach-steps.js adds
   .reach--on and collapses them into one-at-a-time. */
.reach-title { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 10px; }
.reach-sub { color: var(--muted); font-size: var(--t-body); line-height: 1.7; margin: 0; max-width: 58ch; }

.reach {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 40px;
}
.reach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
.reach--on .reach-list,
.globe--on .reach-list { display: block; }
.reach--on .reach-step,
.globe--on .reach-step { display: none; }
.reach--on .reach-step.is-active,
.globe--on .reach-step.is-active { display: grid; }

/* ---------- Scroll-pinned globe ---------- */
/* The sticky stage only appears once JS confirms WebGL. Without it the
   chapters below are an ordinary illustrated article. */
.globe-sticky { display: none; }
.globe--on .globe-sticky {
  display: block;
  position: sticky;
  top: 76px;                      /* clears the sticky site nav */
  height: calc(100vh - 76px);
  z-index: 0;
}
.globe-sticky canvas { width: 100%; height: 100%; display: block; }

.globe-chapters { list-style: none; margin: 0; padding: 0; }
/* The list and its chapters sit above the pinned canvas, so both must be
   pointer-transparent or they swallow every drag meant for the globe. Only
   the panels opt back in. */
.globe--on .globe-chapters {
  position: relative;
  z-index: 1;
  margin-top: calc(-100vh + 76px);
  pointer-events: none;
}

.globe-chapter { padding: 88px 0; }
.globe--on .globe-chapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 12vh 0;
  /* The chapter is only a scroll spacer once enhanced. Without this it sits on
     top of the pinned canvas and swallows every drag and click meant for the
     globe; the panel below opts back in. */
  pointer-events: none;
}
.globe--on .globe-panel { pointer-events: auto; }
.globe-panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}
.globe--on .globe-panel {
  max-width: 560px;
  margin: 0 32px 0 auto;
  padding: 36px;
  background: rgba(20, 25, 32, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.globe--on .globe-panel--wide { max-width: 760px; }
/* Keep the explore panel narrow so there is real globe left to grab. */
.globe--on .globe-chapter--explore .globe-panel { max-width: 420px; }

.globe-place {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.globe-figure { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.globe-figure strong {
  font-family: var(--font-mono);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.globe-figure span {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.globe-panel h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 14px; }
.globe-panel > p { color: var(--muted); font-size: var(--t-body); line-height: 1.7; margin: 0 0 18px; max-width: 62ch; }
.globe-panel > img { border-radius: 4px; border: 1px solid var(--line); margin-top: 8px; }
.globe-sub {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 14px;
}
.globe-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.globe-media--three { grid-template-columns: repeat(3, 1fr); }
.globe-media figure { margin: 0; }
.globe-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--line);
}
.globe-media figcaption { margin-top: 8px; font-size: var(--t-label); line-height: 1.5; color: var(--muted); }
.globe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

/* Drag the globe, click a marker */
.globe-sticky canvas { user-select: none; -webkit-user-select: none; }
/* While a drag is in flight, stop the pointer sweeping a text selection
   across the panel copy behind the globe. */
.is-globe-dragging, .is-globe-dragging * { user-select: none !important; -webkit-user-select: none !important; }
.is-globe-dragging { cursor: grabbing; }
.globe-sticky canvas.is-grabbable { cursor: grab; }
.globe-sticky canvas.is-grabbable:active { cursor: grabbing; }
.globe-sticky canvas.is-over-marker { cursor: pointer; }

.globe-readout {
  margin-top: 24px;
  padding: 20px 22px;
  min-height: 132px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.globe-readout-hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--muted);
}
.globe-readout-place {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.globe-readout .globe-figure { margin-bottom: 8px; }
.globe-readout .globe-figure strong { font-size: clamp(38px, 5vw, 56px); }
.globe-readout-line { margin: 0; color: var(--text); font-size: var(--t-body); line-height: 1.5; }

.globe-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.globe-pick {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.globe-pick:hover { border-color: var(--accent); color: var(--accent); }
.globe-pick.is-active { border-color: var(--accent); color: var(--bg); background: var(--accent); }

/* Progress rail, pinned inside the stage */
.globe-rail { display: none; }
.globe--on .globe-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  /* The container is a 174px-wide block over the globe's left edge; only the
     buttons themselves should catch the pointer. */
  pointer-events: none;
}
.globe-rail-dot { pointer-events: auto; }
.globe-rail-dot {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; padding: 8px 0;
  cursor: pointer; color: var(--muted);
  font-family: var(--font-mono); font-size: var(--t-label);
  letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s;
}
.globe-rail-dot::before {
  content: ''; display: block;
  width: 22px; height: 2px; border-radius: 1px;
  background: var(--surface-2); transition: background .25s, width .25s;
}
.globe-rail-dot:hover { color: var(--text); }
.globe-rail-dot.is-active { color: var(--accent); }
.globe-rail-dot.is-active::before { background: var(--accent); width: 40px; }

@media (max-width: 900px) {
  .globe--on .globe-panel { margin: 0 auto; max-width: 100%; padding: 26px 22px; }
  .globe--on .globe-panel--wide { max-width: 100%; }
  .globe--on .globe-chapter { padding: 8vh 24px; }
  .globe-media--three { grid-template-columns: 1fr; }
  .globe--on .globe-rail { display: none; }
}
.globe-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  transition: opacity .3s ease;
}
.globe-loading .bar { width: 200px; height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.globe-loading .bar > span { display: block; height: 100%; width: 0%; background: var(--accent); transition: width .25s; }
.globe-play { margin-right: auto; }
.globe--on .reach-controls { flex: 1; justify-content: flex-end; }

@media (max-width: 760px) {
  .globe--on .globe-stage { height: 300px; margin-bottom: 24px; }
  .globe-play { margin-right: 0; width: 100%; justify-content: center; }
  .globe--on .reach-controls { flex-wrap: wrap; gap: 14px; }
}

.reach-step {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 36px;
  align-items: start;
}
.reach-figure { display: flex; flex-direction: column; gap: 6px; }
.reach-num {
  font-family: var(--font-mono);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.reach-unit {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.reach-place {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.reach-body h3 { font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 12px; }
.reach-body p { color: var(--muted); font-size: var(--t-body); line-height: 1.7; margin: 0; max-width: 62ch; }

.reach-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.reach-track { display: flex; gap: 8px; flex: 1; }
.reach-dot {
  flex: 1;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.reach-dot::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-2);
  transition: background .2s;
}
.reach-dot:hover::after { background: var(--muted); }
.reach-dot.is-active::after { background: var(--accent); }

.reach-controls { display: flex; align-items: center; gap: 12px; }
.reach-readout {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: .06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.reach-arrow {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, color .15s, opacity .15s;
}
.reach-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.reach-arrow:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 760px) {
  .reach { padding: 28px 22px; }
  .reach-step { grid-template-columns: 1fr; gap: 20px; }
  .reach-nav { flex-direction: column; align-items: stretch; gap: 18px; }
  .reach-controls { justify-content: space-between; }
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--bg);
  color: var(--muted);
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer-grid h3 {
  color: var(--text);
  font-family: var(--font-head);
  font-size: var(--t-small);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid p, .footer-grid a { font-size: var(--t-small); line-height: 1.9; color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: var(--t-label); color: var(--muted); flex-wrap: wrap; gap: 12px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Team leadership ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 24px;
  margin-top: 40px;
}
.team-card .avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--t-body);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.team-card h3 { font-size: var(--t-lead); margin: 0 0 4px; }
.team-card .role { font-family: var(--font-mono); font-size: var(--t-label); color: var(--accent); letter-spacing: .03em; }

/* ---------- Subsystem jump-to highlight ---------- */
@keyframes subsystemGlowPulse {
  0% { box-shadow: inset 0 0 0 rgba(var(--accent-rgb), 0); background-color: rgba(var(--accent-rgb), 0); }
  12% { box-shadow: inset 0 0 110px rgba(var(--accent-rgb), 0.35); background-color: rgba(var(--accent-rgb), 0.08); }
  100% { box-shadow: inset 0 0 0 rgba(var(--accent-rgb), 0); background-color: rgba(var(--accent-rgb), 0); }
}
.subsystem-flash { animation: subsystemGlowPulse 1.8s ease-out; }

/* ---------- Robot CAD viewer ---------- */
/* Self-contained scroll zone: hovering over the box and scrolling drives the
   explode (page scroll is blocked while hovered); it does not react to the
   page's own scroll position at all. */
.viewer-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.viewer-full { max-width: 50%; margin: 0 auto; padding: 0 24px 40px; }
.viewer-canvas-wrap { position: relative; width: 100%; height: 72vh; }
.viewer-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

/* Smaller viewer meant to sit inline as one column of a .split layout,
   rather than the full-width hero viewer. */
.viewer-shell--inline { width: 100%; }
.viewer-shell--inline .viewer-canvas-wrap { height: 440px; }
@media (max-width: 700px) {
  .viewer-shell--inline .viewer-canvas-wrap { height: 300px; }
}
.viewer-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: var(--t-label); color: var(--accent);
  background: rgba(11,15,20,0.7); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 3px; letter-spacing: .04em;
}
.viewer-hint {
  position: absolute; bottom: 16px; right: 16px;
  font-family: var(--font-mono); font-size: var(--t-label); color: var(--muted);
  background: rgba(11,15,20,0.7); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 3px; letter-spacing: .04em;
}
.viewer-caption {
  margin-top: 14px; text-align: right;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .04em;
  color: var(--muted);
}
.viewer-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--muted); font-family: var(--font-mono); font-size: var(--t-label); background: var(--surface);
  transition: opacity .3s ease;
}
.viewer-loading .bar { width: 220px; height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.viewer-loading .bar > span { display: block; height: 100%; width: 0%; background: var(--accent); transition: width .2s; }

/* ---------- CAD part callouts ---------- */
.cad-annot-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.cad-annot-line { stroke: var(--accent); stroke-width: 1.2; opacity: 0.85; }
.cad-annot-dot { fill: var(--accent); }
.cad-annot-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .04em;
  color: var(--accent); white-space: nowrap;
  background: rgba(11,15,20,0.8); border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 3px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.cad-annot-label:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .viewer-full { max-width: 100%; }
}
@media (max-width: 700px) {
  .viewer-canvas-wrap { height: 380px; }
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.spec-grid .card h3 { font-size: var(--t-body); }

/* ---------- Cursor glow ---------- */
.cursor-cloud {
  position: fixed;
  top: 0;
  left: 0;
  width: 70px;
  height: 70px;
  margin-left: -35px;
  margin-top: -35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.30) 0%, rgba(var(--accent-rgb),0.16) 45%, transparent 72%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .4s ease;
}
.cursor-cloud.visible { opacity: 1; }

/* ---------- Side gears ---------- */
.side-gear {
  color: var(--surface-2);
  opacity: 0.55;
  overflow: visible;
  transition: opacity .3s ease;
}
@media (max-width: 1700px) {
  .side-gear { display: none; }
}
