/* ==========================================================================
   THE COLONY — styles.css
   Palette: regolith black, rust, dust orange, cream. Telemetry mono labels.
   ========================================================================== */

:root {
  --bg: #14100e;
  --bg-2: #1c1512;
  --bg-3: #261c17;
  --cream: #efe3cf;
  --cream-2: #c9bba5;
  --muted: #8f8371;
  --rust: #b8472b;
  --rust-2: #8f321f;
  --rust-3: #5c2014;
  --dust: #d9773a;
  --line: rgba(239, 227, 207, 0.12);
  --line-strong: rgba(239, 227, 207, 0.3);

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Telemetry grid — thin lines across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--dust);
  outline-offset: 3px;
}

::selection { background: var(--rust); color: var(--cream); }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0;
}

h1 { font-size: clamp(3.4rem, 9vw, 7rem); }
h2 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--dust);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--cream-2);
  max-width: 44ch;
}

.muted { color: var(--muted); }
.dust { color: var(--dust); }
.rust { color: var(--rust); }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 3rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .lede { margin: 0; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1.2fr 1fr; }
  .section-head .lede { justify-self: end; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--cream);
  color: var(--cream);
  position: relative;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  overflow: hidden;
  isolation: isolate;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--cream);
  transform: translateX(-101%);
  transition: transform 0.35s var(--ease-out);
  z-index: -1;
}
.btn:hover { color: var(--bg); }
.btn:hover::after { transform: translateX(0); }
.btn svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn-rust { border-color: var(--rust); background: var(--rust); color: var(--cream); }
.btn-rust::after { background: var(--dust); }
.btn-rust:hover { color: var(--bg); border-color: var(--dust); }

.btn-ghost { border-color: var(--line-strong); }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(20, 16, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brand svg { width: 38px; height: 38px; }
.brand .sol-pill {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--dust);
  border: 1px solid var(--rust-2);
  padding: 0.25rem 0.55rem;
  margin-left: 0.5rem;
  display: none;
}
@media (min-width: 640px) { .brand .sol-pill { display: inline-block; } }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--cream-2);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--dust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cream); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links .btn { padding: 0.6rem 1rem; }
.nav-links .btn::after { display: none; }
.nav-links .btn:hover { color: var(--cream); background: var(--rust-2); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  margin-right: -0.5rem;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--gutter) 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 49;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out), opacity 0.25s;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-drawer a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); color: var(--cream-2); }
.nav-drawer a:last-child { border-bottom: 0; }
.nav-open .nav-drawer { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-open .nav { background: var(--bg-2); border-bottom-color: var(--line); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle, .nav-drawer { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 2rem; }
}

.hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.hero-status .live {
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--dust);
}
.hero-status .live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dust);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--dust); }
.hero .lede { margin-bottom: 2.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Orbit signature */
.orbit-wrap {
  position: relative;
  aspect-ratio: 1;
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}
.orbit-wrap svg { width: 100%; height: 100%; overflow: visible; }
.orbit-caption {
  margin-top: 1rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 1.5rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.orbit-caption b { color: var(--cream-2); font-weight: 400; }

/* Telemetry ticker */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track ul {
  display: flex;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-2);
  white-space: nowrap;
  padding: 0.85rem 0;
}
.ticker-track li { padding: 0 1.75rem; border-right: 1px solid var(--line); }
.ticker-track li b { color: var(--dust); font-weight: 500; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-rust {
  background: var(--rust);
  color: var(--cream);
}
.section-rust .eyebrow { color: var(--cream); }
.section-rust .eyebrow::before { background: var(--cream); }
.section-rust .lede { color: var(--cream); }
.section-rust .muted { color: rgba(239, 227, 207, 0.7); }

/* Three layers */
.layers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 760px) { .layers { grid-template-columns: repeat(3, 1fr); } }
.layer {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 300px;
  transition: background 0.3s;
}
.layer:hover { background: var(--bg-2); }
.layer .mono { color: var(--dust); }
.layer h3 { margin-top: 0.25rem; }
.layer p { color: var(--cream-2); font-size: 1rem; margin: 0; }
.layer .glyph {
  width: 56px; height: 56px;
  color: var(--dust);
  margin-bottom: 0.5rem;
}
.layer .glyph svg { width: 100%; height: 100%; }
.layer .role {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Products */
.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) { .products { grid-template-columns: 1fr 1fr; } }

.product {
  border: 1px solid var(--line-strong);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  background: var(--bg);
  transition: transform 0.4s var(--ease-out), border-color 0.3s;
  overflow: hidden;
}
.product:hover { transform: translateY(-4px); border-color: var(--dust); }
.product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.product-top .mono { color: var(--muted); }
.product h3 { font-size: clamp(2.6rem, 5vw, 4rem); }
.product .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  border: 1px solid var(--rust-2);
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}
.product .desc { color: var(--cream-2); margin-bottom: 1.75rem; }
.product .moon {
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid var(--line);
  pointer-events: none;
}
.product .moon::after {
  content: ""; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--dust);
  left: 50%; top: -7px;
  transform-origin: 0 97px;
  animation: moonspin var(--period, 14s) linear infinite;
}
.product.deimos .moon::after { width: 8px; height: 8px; top: -4px; transform-origin: 0 94px; background: var(--cream); }
@keyframes moonspin { to { transform: rotate(360deg); } }

.alloc { display: grid; gap: 0.7rem; }
.alloc-row {
  display: grid;
  grid-template-columns: 104px 1fr 48px;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.alloc-row .name { color: var(--cream); }
.alloc-row .name small { display: block; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; }
.alloc-row .bar { height: 10px; background: var(--bg-3); position: relative; overflow: hidden; }
.alloc-row .bar i {
  position: absolute; inset: 0;
  width: var(--w);
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-out);
}
.alloc-row.meme .bar i { background: var(--dust); }
.alloc-row.stock .bar i {
  background:
    repeating-linear-gradient(135deg, var(--rust) 0 6px, var(--rust-2) 6px 8px);
}
.in .alloc-row .bar i { transform: scaleX(1); }
.alloc-row .pct { text-align: right; color: var(--cream-2); }
.alloc-note { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.legend { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend i { width: 18px; height: 8px; display: inline-block; }
.legend .l-meme i { background: var(--dust); }
.legend .l-stock i { background: repeating-linear-gradient(135deg, var(--rust) 0 6px, var(--rust-2) 6px 8px); }

/* Flow (mint / ascent) */
.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
  counter-reset: step;
}
@media (min-width: 760px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.step {
  padding: 1.75rem 1.5rem 1.75rem 0;
  position: relative;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .step { padding-right: 2rem; } }
.step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  height: 1px; width: 100%;
  background: var(--dust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i) * 0.18s);
}
.in .step::before { transform: scaleX(1); }
.step .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--dust);
  margin-bottom: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.step .num::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--dust);
  background: transparent;
  transition: background 0.3s;
  transition-delay: calc(var(--i) * 0.18s + 0.5s);
}
.in .step .num::after { background: var(--dust); }
.step h3 { margin-bottom: 0.6rem; }
.step p { color: var(--cream-2); font-size: 0.95rem; margin: 0; }

.flow-aside {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) { .flow-aside { grid-template-columns: 1fr 1fr; } }
.panel {
  border: 1px solid var(--line-strong);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--bg-2);
}
.panel .eyebrow { margin-bottom: 1rem; }
.panel p { color: var(--cream-2); font-size: 0.95rem; }
.panel p:last-child { margin-bottom: 0; }

.fee-math {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  font-family: var(--font-mono);
  margin: 0.5rem 0 1rem;
}
.fee-math > div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}
.fee-math > div:last-child { border-bottom: 0; }
.fee-math .k { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fee-math .v { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; text-transform: uppercase; }
.fee-math .v.dust { color: var(--dust); }

/* Exit types */
.exits { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 760px) { .exits { grid-template-columns: 1fr 1fr; } }
.exit {
  border: 1px solid var(--line);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}
.exit .badge {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--dust);
  color: var(--dust);
  line-height: 1;
  white-space: nowrap;
}
.exit.abort .badge { border-color: var(--rust); color: var(--rust); }
.exit h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.35rem; margin: 0 0 0.4rem; font-weight: 700; }
.exit p { margin: 0; color: var(--cream-2); font-size: 0.95rem; }

/* Life support / fork disclosure */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.split > * { min-width: 0; }
.big-stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.9;
  white-space: nowrap;
  text-transform: uppercase;
}
.big-stat small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.75rem;
  color: rgba(239, 227, 207, 0.75);
}
.stat-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .stat-row { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.ship-list { border-top: 1px solid rgba(239, 227, 207, 0.35); }
.ship-list li {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(239, 227, 207, 0.35);
  font-size: 0.95rem;
}
.ship-list .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.3rem;
}
.ship-list .yes .k { color: var(--cream); }
.ship-list .no .k { color: rgba(239, 227, 207, 0.55); }
.ship-list .no { color: rgba(239, 227, 207, 0.7); }
.section-rust .ship-list b { font-weight: 500; }

/* Flight rules (risk register) */
.rules { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 760px) { .rules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rules { grid-template-columns: repeat(3, 1fr); } }
.rule { background: var(--bg); padding: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; transition: background 0.3s; }
.rule:hover { background: var(--bg-2); }
.rule .sev {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted);
}
.rule .sev::before { content: ""; width: 10px; height: 10px; background: var(--muted); }
.rule .sev.high { color: var(--rust); }
.rule .sev.high::before { background: var(--rust); }
.rule .sev.medium { color: var(--dust); }
.rule .sev.medium::before { background: var(--dust); }
.rule h3 { font-size: 1.5rem; }
.rule p { margin: 0; color: var(--cream-2); font-size: 0.95rem; }
.rule .mit { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.rule .mit b { color: var(--cream-2); font-weight: 500; }

/* Mission phases (roadmap) */
.phases { position: relative; }
.phase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  position: relative;
}
@media (min-width: 760px) { .phase { grid-template-columns: 140px 220px 1fr; align-items: start; } }
.phase:last-child { border-bottom: 1px solid var(--line); }
.phase .ph-num { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--dust); text-transform: uppercase; }
.phase .ph-status {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted);
}
.phase .ph-status::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; }
.phase .ph-status.built { color: var(--cream); }
.phase .ph-status.built::before { background: var(--cream); }
.phase .ph-status.next { color: var(--dust); }
.phase .ph-status.next::before { background: var(--dust); animation: blink 1.6s ease-in-out infinite; }
.phase .ph-status.locked { color: var(--muted); }
.phase h3 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.phase p { margin: 0; color: var(--cream-2); font-size: 0.95rem; max-width: 62ch; }
.phase-note { margin-top: 1.5rem; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }

/* Crew CTA */
.crew { text-align: center; padding-block: var(--section-y); }
.crew h2 { margin-bottom: 1.25rem; }
.crew .lede { margin: 0 auto 2rem; }
.crew .hero-cta { justify-content: center; }
.crew-patch { width: 120px; margin: 0 auto 2rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; font-size: 0.875rem; color: var(--muted); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer h5 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dust); margin: 0 0 0.9rem; font-weight: 400; }
.footer ul li { margin-bottom: 0.5rem; }
.footer a { color: var(--cream-2); transition: color 0.2s; }
.footer a:hover { color: var(--dust); }
.footer .disclaimer { max-width: 60ch; line-height: 1.6; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Docs page
   -------------------------------------------------------------------------- */

.docs-layout {
  padding-top: calc(var(--nav-h) + 2.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1000px) {
  .docs-layout { grid-template-columns: 250px 1fr; gap: 4rem; }
}

.docs-side { position: relative; }
@media (min-width: 1000px) {
  .docs-side { position: sticky; top: calc(var(--nav-h) + 2rem); max-height: calc(100vh - var(--nav-h) - 3rem); overflow: auto; }
}
.docs-side .eyebrow { margin-bottom: 0.9rem; }
.toc { border-left: 1px solid var(--line); }
.toc a {
  display: block;
  padding: 0.45rem 0 0.45rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: relative;
  transition: color 0.2s;
  margin-left: -1px;
  border-left: 1px solid transparent;
}
.toc a:hover { color: var(--cream); }
.toc a.active { color: var(--dust); border-left-color: var(--dust); }
.toc-group { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-2); padding: 1rem 0 0.35rem 1rem; }
.toc-group:first-child { padding-top: 0; }

.docs-side-mobile { display: block; }
.docs-side-mobile select {
  width: 100%;
  background: var(--bg-2);
  color: var(--cream);
  border: 1px solid var(--line-strong);
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23d9773a' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
@media (min-width: 1000px) { .docs-side-mobile { display: none; } .toc-desktop { display: block; } }
@media (max-width: 999px) { .toc-desktop { display: none; } }

.docs-main { min-width: 0; max-width: 78ch; }
.doc-section { padding: 2.5rem 0 3rem; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.doc-section:first-child { padding-top: 0; }
.doc-section h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1.25rem; }
.doc-section h3 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.doc-section p, .doc-section li { color: var(--cream-2); }
.doc-section ul, .doc-section ol { margin: 0 0 1rem 1.25rem; list-style: disc; }
.doc-section ol { list-style: decimal; }
.doc-section li { margin-bottom: 0.4rem; }
.doc-section li::marker { color: var(--dust); }
.doc-section strong { color: var(--cream); font-weight: 500; }
.doc-section a.inl { color: var(--dust); border-bottom: 1px solid var(--rust-2); }
.doc-section a.inl:hover { border-bottom-color: var(--dust); }

.doc-intro { padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.doc-intro h1 { font-size: clamp(3rem, 7vw, 5.5rem); margin-bottom: 1.25rem; }

.tbl-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; border: 1px solid var(--line-strong); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dust); background: var(--bg-2); font-weight: 400; }
tr:last-child td { border-bottom: 0; }
td.mono, th.mono { font-family: var(--font-mono); font-size: 0.8rem; }
td .pill {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--line-strong); padding: 0.2rem 0.5rem; color: var(--cream-2); white-space: nowrap;
}
td .pill.ok { border-color: var(--dust); color: var(--dust); }
td .pill.warn { border-color: var(--rust); color: var(--rust); }
td .pill.off { color: var(--muted); }

.formula {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--dust);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.25rem;
  overflow-x: auto;
  color: var(--cream);
  line-height: 1.8;
}
.formula .c { color: var(--muted); }

.callout {
  border: 1px solid var(--rust);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(184, 71, 43, 0.08);
}
.callout .eyebrow { margin-bottom: 0.6rem; }
.callout p { margin: 0; color: var(--cream); }
.callout.info { border-color: var(--line-strong); background: var(--bg-2); }
.callout.info .eyebrow { color: var(--cream-2); }
.callout.info .eyebrow::before { background: var(--cream-2); }

.glossary { display: grid; gap: 0; border-top: 1px solid var(--line); }
.glossary div { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--dust); padding-top: 0.15rem; }
.glossary dd { margin: 0; color: var(--cream-2); font-size: 0.95rem; }

.doc-nav-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 2.5rem 0 4rem; }

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.hero .reveal { transition-duration: 1s; }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--nav-h) var(--gutter) 3rem; }
.notfound h1 { font-size: clamp(5rem, 22vw, 16rem); color: var(--rust); line-height: 0.85; }
.notfound .lede { margin: 1rem auto 2rem; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .alloc-row .bar i { transform: scaleX(1); }
  .step::before { transform: scaleX(1); }
  .ticker-track { animation: none; }
}
