:root {
  --bg: #06131f;
  --panel: rgba(8, 26, 39, 0.9);
  --panel-border: rgba(151, 199, 255, 0.16);
  --text: #f6fbff;
  --muted: #bdd2e1;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --warm: #fbbf24;
  --danger: #fb7185;
  --ok: #86efac;
  --violet: #c084fc;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 22%),
    linear-gradient(180deg, #071522 0%, #030a11 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 84% 62%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px),
    radial-gradient(circle at 35% 74%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px);
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.95;
  font-weight: 400;
}

h2 {
  margin: 0;
  font-size: 1.2rem;
}

.lede,
.mission,
.toolbar-copy,
.section-copy {
  color: var(--muted);
  line-height: 1.65;
}

.hero-card,
.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.panel {
  border-radius: 28px;
  padding: 24px;
}

.panel h2 {
  margin-bottom: 14px;
}

.hero-card {
  border-radius: 24px;
  padding: 24px;
}

.hero-card-label,
.fact-label {
  display: block;
  margin-bottom: 10px;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.hero-card-text {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.55;
}

.controls-copy {
  max-width: 34ch;
}

.toolbar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.toolbar-copy {
  margin: 8px 0 0;
}

.view-modes,
.orbit-key,
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.view-mode-button,
.ghost-button,
.scenario-card {
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: var(--text);
  background: rgba(125, 211, 252, 0.08);
  font: inherit;
}

.view-mode-button,
.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.view-mode-button:hover,
.ghost-button:hover,
.scenario-card:hover {
  transform: translateY(-1px);
  background: rgba(125, 211, 252, 0.14);
  border-color: rgba(125, 211, 252, 0.4);
}

.view-mode-button.active,
.scenario-card.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(125, 211, 252, 0.55);
}

.stats-grid,
.grid {
  display: grid;
  gap: 24px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.fact-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.fact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.main-grid {
  grid-template-columns: 350px 1fr;
  align-items: start;
}

.results-stack {
  display: grid;
  gap: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
}

.scenario-cards {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.scenario-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.scenario-card strong,
.metric strong,
.runaway-step strong,
.method-list strong,
.stakeholder-columns strong {
  font-size: 1rem;
}

.scenario-card span,
.control-help,
.metric-label,
.narrative,
.highlights,
.audience-bullets,
.band-meta,
.sources-list,
.method-list p,
.stakeholder-columns p,
.runaway-step p {
  color: var(--muted);
  line-height: 1.6;
}

#impactNarrative {
  color: var(--muted);
  min-height: 2.8rem;
}

.control {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.control-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.control-heading strong {
  font-size: 1.15rem;
}

.control-help {
  margin: 0;
  font-size: 0.92rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
}

.status-pill {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(134, 239, 172, 0.22);
  background: rgba(134, 239, 172, 0.12);
  color: var(--ok);
  font-size: 0.88rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric {
  border: 1px solid rgba(151, 199, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.metric strong {
  font-size: 1.45rem;
}

.chart-wrap,
.orbit-visual-wrap {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 31, 46, 0.9), rgba(5, 14, 24, 0.95));
  border: 1px solid rgba(151, 199, 255, 0.12);
}

#orbitChart,
#orbitVisual {
  width: 100%;
  height: auto;
  display: block;
}

.orbit-visual-shell {
  position: relative;
}

.legend {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend-line {
  display: inline-block;
  width: 22px;
  height: 3px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 999px;
}

.debris-line {
  background: var(--danger);
}

.satellite-line {
  background: var(--accent);
}

.score-line {
  background: var(--warm);
}

.collision-line {
  background: var(--violet);
}

.derelict-fill {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.9), rgba(192, 132, 252, 0.85));
}

.orbit-key {
  padding: 12px 16px 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.orbit-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 8px;
}

.active-dot {
  background: var(--accent);
}

.debris-dot {
  background: var(--danger);
}

.removal-dot {
  background: var(--warm);
}

.derelict-dot {
  background: var(--warm);
}

.ring-dot {
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid var(--warm);
}

.orbit-band {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 3px solid;
  margin-right: 8px;
  vertical-align: middle;
}

.band-one {
  border-color: rgba(224, 224, 232, 0.95);
}

.band-two {
  border-color: rgba(196, 196, 206, 0.95);
}

.band-three {
  border-color: rgba(168, 168, 180, 0.95);
}

.band-four {
  border-color: rgba(140, 140, 154, 0.95);
}

.band-five {
  border-color: rgba(112, 112, 126, 0.95);
}

.orbit-tooltip {
  position: absolute;
  max-width: 250px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(6, 19, 31, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color: var(--text);
  pointer-events: none;
  z-index: 5;
}

.orbit-tooltip strong,
.orbit-tooltip span,
.orbit-tooltip p,
.orbit-tooltip a {
  display: block;
}

.orbit-tooltip strong {
  margin-bottom: 4px;
}

.orbit-tooltip span,
.orbit-tooltip p {
  color: var(--muted);
  line-height: 1.5;
}

.orbit-tooltip p {
  margin: 8px 0;
}

.orbit-tooltip a {
  color: var(--accent);
}

.lower-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
}

.band-cards,
.audience-bullets,
.glossary-list,
.sources-list,
.method-list,
.stakeholder-columns,
.runaway-grid,
.highlights {
  display: grid;
  gap: 12px;
}

.intro-grid {
  margin-top: 24px;
}

.band-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.band-card {
  border: 1px solid rgba(151, 199, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.band-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.band-risk {
  font-size: 0.82rem;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.band-meters {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.meter-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.meter-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
}

.sat-fill {
  background: var(--accent);
}

.debris-fill {
  background: var(--danger);
}

.runaway-grid {
  grid-template-columns: 1fr;
  margin: 16px 0;
}

.runaway-step,
.highlight,
.source-item {
  border: 1px solid rgba(151, 199, 255, 0.1);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.highlight strong,
.source-item strong {
  display: block;
  margin-bottom: 6px;
}

.highlight {
  min-height: 100%;
}

.audience-bullets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stakeholder-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stakeholder-columns article {
  border: 1px solid rgba(151, 199, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.method-list article {
  border: 1px solid rgba(151, 199, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.full-width-panel {
  grid-column: 1 / -1;
}

.sources-list a {
  color: var(--accent);
}

.site-footer {
  padding: 22px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.two-column-sources {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#glossaryPanel.general-glossary {
  border-color: rgba(251, 191, 36, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(251, 191, 36, 0.08) inset;
}

@media (max-width: 1100px) {
  .stats-grid,
  .metrics,
  .audience-bullets,
  .stakeholder-columns,
  .two-column-sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .hero,
  .main-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 28px;
  }

  .panel,
  .hero-card {
    border-radius: 22px;
    padding: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  .stats-grid,
  .metrics,
  .band-cards,
  .audience-bullets,
  .stakeholder-columns,
  .two-column-sources {
    grid-template-columns: 1fr;
  }
}
