@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("../fonts/material-symbols-outlined.woff2") format("woff2");
}

.g-icon {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal;
  font-style: normal;
  font-size: 14px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  vertical-align: -1.5px;
  pointer-events: none;
  beyond-orbit-right: 3px;
}

.g-icon.icon-alone {
  beyond-orbit-right: 0;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  /* Design System v2 tokens (from styles/BEYOND-ORBIT-design-system.html) */
  --bg-0: #07090c;
  --bg-1: #0c0f13;
  --bg-2: #12161b;
  --bg-3: #191e25;
  --scrim: rgba(4, 6, 8, 0.78);
  --line-1: #1c2229;
  --line-2: #2a323b;
  --line-3: #434d58;
  --text-1: #e9ecef;
  --text-2: #9ba4ae;
  --text-3: #646e79;
  --accent: #5b9bff;
  --accent-dim: rgba(91, 155, 255, 0.1);
  --ok: #5fcf9b;
  --ok-dim: rgba(95, 207, 155, 0.1);
  --warn: #edb04e;
  --warn-dim: rgba(237, 176, 78, 0.1);
  --crit: #ee6a55;
  --crit-dim: rgba(238, 106, 85, 0.1);
  --font-display:
    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui:
    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --r-0: 0;
  --r-1: 2px;
  --r-2: 4px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --h-control: 36px;
  --h-control-lg: 44px;
  --h-row: 48px;
  --shadow-overlay: 0 24px 64px rgba(0, 0, 0, 0.6);

  /* Legacy mappings (zero layout changes) */
  --void: var(--bg-0);
  --panel: var(--bg-1);
  --panel-2: var(--bg-2);
  --hairline: var(--line-1);
  --nasa-blue: #0b3d91;
  --blue-lift: var(--accent);
  --nasa-red: var(--crit);
  --nasa-titanium: var(--text-2);
  --deep-space-black: var(--bg-0);
  --red: var(--crit);
  --phosphor: var(--ok);
  --amber: var(--warn);
  --bone: var(--text-1);
  --dim: var(--text-2);
  --dimmer: var(--text-3);
  --blueprint: rgba(91, 155, 255, 0.03);
  --glow-blue: transparent;
  --glow-red: transparent;
  --mono: var(--font-data);
  --sans: var(--font-ui);
  --disp: var(--font-display);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

:root:not([data-theme="light"]) {
  color-scheme: dark;
}

/* BEYOND-ORBIT is intentionally dark-only; the deep-space token remains stable at #050A14. */
:root[data-theme="dark"],
:root[data-theme="light"] {
  --void: #050a14;
  --panel: #0a101b;
  --bone: #e7ecf2;
}

* {
  box-sizing: border-box;
  beyond-orbit: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
}
input,
textarea,
[contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--blueprint) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 40%,
    #000 20%,
    transparent 78%
  );
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

#app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── top bar ─────────────────────────────── */
#topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  height: 46px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(
    180deg,
    rgba(11, 15, 24, 0.94),
    rgba(5, 7, 13, 0.88)
  );
  backdrop-filter: blur(8px);
}

#topbar .mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 14px;
}

#topbar .mark i {
  font-style: normal;
  color: var(--gold, #ffb84d);
}

#steps {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.step {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--dimmer);
  padding: 3px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.step.done {
  color: var(--dim);
}

.step.on {
  color: var(--phosphor);
  border-color: rgba(94, 246, 160, 0.32);
  background: rgba(94, 246, 160, 0.06);
}

.step .sep {
  color: var(--hairline);
  beyond-orbit: 0 2px;
}

.tb-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  padding: 4px 8px;
  border: 1px solid var(--hairline);
}

.tb-btn:hover {
  color: var(--bone);
  border-color: var(--dimmer);
}

.tb-btn[aria-pressed="true"] {
  color: var(--phosphor);
  border-color: rgba(94, 246, 160, 0.4);
}

/* ── screen ──────────────────────────────── */
/* ── Global Aerospace Scrollbar System (eliminates native white/grey sliders) ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 155, 255, 0.28) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 155, 255, 0.5) !important;
  box-shadow: 0 0 8px rgba(91, 155, 255, 0.4) !important;
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

#screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  position: relative;
  scrollbar-width: thin;
}

.wrap {
  max-width: 1360px;
  beyond-orbit: 0 auto;
  padding: 22px 18px 28px;
}

/* ── panels ──────────────────────────────── */
.panel {
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  position: relative;
}

.panel > h3 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
  padding: 8px 11px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel > h3 .code {
  color: var(--dimmer);
}

.pad {
  padding: 12px;
}

.hint {
  color: var(--dim);
  font-size: 12.5px;
}

.bracket {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--blue-lift);
  opacity: 0.55;
}

.bracket.tl {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.bracket.br {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

h1,
h2 {
  font-family: var(--disp);
  font-weight: 700;
  line-height: 1.05;
}

h1 {
  font-size: clamp(32px, 7vw, 68px);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 22px;
  letter-spacing: 0.01em;
}

/* ── buttons ─────────────────────────────── */
.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 10px 20px;
  border: 1px solid var(--dimmer);
  color: var(--bone);
  transition:
    background 0.14s var(--ease),
    border-color 0.14s var(--ease),
    color 0.14s var(--ease);
}

.btn:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
  background: rgba(94, 246, 160, 0.07);
}

.btn.primary {
  border-color: var(--phosphor);
  color: var(--phosphor);
  background: rgba(94, 246, 160, 0.1);
}

.btn.primary:hover {
  background: rgba(94, 246, 160, 0.2);
}

.btn.danger {
  border-color: var(--red);
  color: var(--red);
}

.btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  border-color: var(--hairline);
  color: var(--dimmer);
  background: none;
}

.btn.ghost {
  border-color: var(--hairline);
  color: var(--dim);
}

.btn.ghost:hover {
  border-color: var(--dimmer);
  color: var(--bone);
  background: none;
}

/* ── info / provenance ───────────────────── */
.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border: 1px solid var(--dimmer);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  color: var(--dim);
  cursor: help;
  vertical-align: 1px;
  beyond-orbit-left: 5px;
  flex: 0 0 auto;
}

.info:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

#tip {
  position: fixed;
  z-index: 90;
  max-width: 330px;
  padding: 10px 12px;
  border: 1px solid var(--blue-lift);
  background: #070b14;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--bone);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 0.12s,
    transform 0.12s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

#tip.on {
  opacity: 1;
  transform: none;
}

#tip b {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--phosphor);
  beyond-orbit-bottom: 5px;
}

#tip .src {
  display: block;
  beyond-orbit-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--hairline);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  word-break: break-all;
}

#tip .simp {
  display: block;
  beyond-orbit-top: 5px;
  color: var(--amber);
  font-size: 10.5px;
}

/* ── HUD rails ───────────────────────────── */
#hud {
  flex: 0 0 auto;
  border-top: 1px solid rgba(75, 130, 215, 0.2);
  background: rgba(7, 10, 18, 0.96);
  backdrop-filter: blur(8px);
}

#hud.hidden {
  display: none;
}

.rails {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--hairline);
}

.rail {
  background: var(--panel);
  padding: 8px 12px 9px;
  cursor: pointer;
  position: relative;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}

.rail:hover {
  background: var(--panel-2);
}

.rail .rl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rail .nm {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
  font-weight: 600;
}

.rail .status-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rail .sig {
  position: static;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 600;
}

.rail.caution .sig {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.14);
}

.rail.over .sig {
  color: var(--red);
  background: rgba(255, 92, 92, 0.18);
}

.rail:not(.caution):not(.over) .sig {
  color: var(--phosphor);
  background: rgba(94, 246, 160, 0.1);
}

.rail .mg {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.rail.caution .mg {
  color: var(--amber);
}

.rail.over .mg {
  color: var(--red);
}

.rail .vl {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 500;
  beyond-orbit: 3px 0 5px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.rail .vl small {
  font-size: 11px;
  color: var(--dim);
  font-weight: 400;
}

.rail .vl .delta-ghost {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0;
}

.delta-ghost.ghost-better {
  color: var(--phosphor);
  background: rgba(94, 246, 160, 0.16);
}

.delta-ghost.ghost-worse {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.16);
}

.delta-ghost.ghost-crit {
  color: var(--red);
  background: rgba(255, 92, 92, 0.22);
}

.bar {
  height: 4px;
  background: #121925;
  position: relative;
  overflow: hidden;
}

.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--phosphor);
  transition:
    width 0.42s var(--ease),
    background 0.3s;
}

.rail.caution .bar i {
  background: var(--amber);
}

.rail.caution .mg {
  color: var(--amber);
}

.rail.over .bar i {
  background: var(--red);
}

.rail.over .mg,
.rail.over .vl {
  color: var(--red);
}

.rail.flash {
  animation: railflash 0.5s var(--ease);
}

@keyframes railflash {
  0% {
    background: rgba(94, 246, 160, 0.16);
  }

  100% {
    background: var(--panel);
  }
}

.rail.shake {
  animation: shake 0.32s var(--ease);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }

  80% {
    transform: translateX(-2px);
  }
}

.rail.caution .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  opacity: 0;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 0.16;
  }
}

/* ── telemetry strip ─────────────────────── */
#telem {
  flex: 0 0 auto;
  height: 24px;
  border-top: 1px solid var(--hairline);
  background: #04060b;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.telem-btn {
  position: relative;
  z-index: 3;
  height: 100%;
  background: #090d16;
  color: var(--dim);
  border: none;
  border-right: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.telem-btn:hover {
  color: var(--bone);
  background: rgba(75, 130, 215, 0.2);
}

.telem-btn.paused {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.12);
}

#telem.ticker-hidden .run {
  display: none;
}

#telem .run {
  position: absolute;
  left: 70px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dimmer);
  line-height: 24px;
  animation: scroll 70s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

#telem .run b {
  color: var(--phosphor);
  font-weight: 400;
}

/* ── title screen ────────────────────────── */
.title-screen {
  display: grid;
  place-items: center;
  min-height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.title-screen .mark-lg {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(46px, 12vw, 132px);
  letter-spacing: 0.14em;
  beyond-orbit-left: 0.14em;
}

.underscore {
  height: 3px;
  background: var(--hairline);
  beyond-orbit: 6px auto 0;
  width: min(560px, 80vw);
  position: relative;
  overflow: hidden;
}

.underscore i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--phosphor);
  width: 0;
  animation: fill 2.1s var(--ease) 0.35s forwards;
}

@keyframes fill {
  to {
    width: 78%;
  }
}

.tagline {
  font-family: var(--mono);
  font-size: clamp(10px, 2.4vw, 13px);
  letter-spacing: 0.34em;
  color: var(--dim);
  beyond-orbit-top: 16px;
}

.title-screen p.lede {
  max-width: 52ch;
  beyond-orbit: 26px auto 0;
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.65;
  text-align: left;
}

.dsn {
  beyond-orbit-top: 30px;
  border: 1px solid var(--hairline);
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
  animation: blink 2.4s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

.modes {
  display: flex;
  gap: 10px;
  justify-content: center;
  beyond-orbit-top: 30px;
  flex-wrap: wrap;
}

/* ── mission select ──────────────────────── */
.lvgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  beyond-orbit-top: 16px;
}

.lvcard {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.16s;
}

.lvcard:hover {
  border-color: var(--blue-lift);
}

.lvcard .top {
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--hairline);
}

.lvcard .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dimmer);
}

.lvcard h3 {
  font-family: var(--disp);
  font-size: 19px;
  beyond-orbit: 5px 0 3px;
}

.lvcard .sub {
  font-size: 12px;
  color: var(--dim);
}

.lvcard .bot {
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.lvcard .new {
  display: block;
  beyond-orbit-top: 9px;
  font-size: 11.5px;
  color: var(--phosphor);
  line-height: 1.4;
}

.lvcard .grade {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--disp);
  font-size: 24px;
  color: var(--phosphor);
}

.lvcard.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── briefing ────────────────────────────── */
.brief {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}

.obj {
  display: flex;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--hairline);
  beyond-orbit-bottom: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition:
    border-color 0.14s,
    background 0.14s;
}

.obj:hover {
  border-color: var(--dimmer);
}

.obj.sel {
  border-color: var(--phosphor);
  background: rgba(94, 246, 160, 0.07);
}

.obj.req {
  border-left: 2px solid var(--amber);
}

.obj .box {
  width: 13px;
  height: 13px;
  border: 1px solid var(--dimmer);
  flex: 0 0 auto;
  beyond-orbit-top: 2px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-family: var(--mono);
}

.obj.sel .box {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.obj .t {
  font-weight: 500;
  font-size: 13px;
}

.obj .d {
  font-size: 11.5px;
  color: var(--dim);
  beyond-orbit-top: 2px;
}

.obj .need {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dimmer);
  beyond-orbit-top: 4px;
}

/* ── build bay ───────────────────────────── */
.bay {
  display: grid;
  grid-template-columns: 270px 1fr 290px;
  gap: 14px;
  align-items: start;
}

.cat {
  max-height: calc(100vh - 260px);
  overflow: auto;
  scrollbar-width: thin;
}

.cat::-webkit-scrollbar {
  width: 5px;
}

.cat::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.catgrp {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--dimmer);
  padding: 10px 11px 5px;
  border-bottom: 1px solid var(--hairline);
}

.part {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 0.13s;
  position: relative;
}

.part:hover {
  background: var(--panel-2);
}

.part.on {
  background: rgba(11, 61, 145, 0.2);
  box-shadow: inset 2px 0 0 var(--phosphor);
}

.part .pn {
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.part .ps {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  beyond-orbit-top: 3px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.part .ps b {
  color: var(--dimmer);
  font-weight: 400;
}

.part.dis {
  opacity: 0.36;
  cursor: not-allowed;
}

.tag {
  font-family: var(--mono);
  font-size: 9px;
  padding: 1px 4px;
  border: 1px solid var(--hairline);
  color: var(--dimmer);
}

#bayCanvas {
  display: block;
  width: 100%;
  height: auto;
  background: radial-gradient(ellipse at 50% 45%, #0c1322 0%, #05070d 72%);
}

.detail dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  font-size: 12px;
  beyond-orbit-top: 2px;
}

.detail dt {
  color: var(--dim);
}

.detail dd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.heritage {
  beyond-orbit-top: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--nasa-blue);
  background: rgba(11, 61, 145, 0.12);
  font-size: 11.5px;
  color: var(--dim);
}

.ghost-note {
  beyond-orbit-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--amber);
  line-height: 1.6;
}

/* cascade overlay */
#cascade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 120px;
  z-index: 70;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.casc {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  background: #070b14;
  opacity: 0;
  transform: translateY(7px);
  animation: cascin 0.34s var(--ease) forwards;
  display: flex;
  gap: 10px;
  align-items: center;
}

.casc .k {
  color: var(--dim);
  letter-spacing: 0.14em;
  min-width: 74px;
}

.casc.up {
  border-color: rgba(252, 61, 33, 0.5);
}

.casc.up .v {
  color: var(--red);
}

.casc.dn {
  border-color: rgba(94, 246, 160, 0.4);
}

.casc.dn .v {
  color: var(--phosphor);
}

.casc.warn {
  border-color: rgba(255, 176, 0, 0.55);
}

.casc.warn .v {
  color: var(--amber);
}

@keyframes cascin {
  to {
    opacity: 1;
    transform: none;
  }
}

.casc.out {
  animation: cascout 0.3s var(--ease) forwards;
}

@keyframes cascout {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ── launch ──────────────────────────────── */
.launchgrid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 14px;
  align-items: start;
}

#pork {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  background: #04060b;
}

.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border-top: 1px solid var(--hairline);
}

.readout div {
  background: var(--panel);
  padding: 8px 11px;
}

.readout .k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dimmer);
}

.readout .v {
  font-family: var(--mono);
  font-size: 15px;
  beyond-orbit-top: 3px;
  font-variant-numeric: tabular-nums;
}

.lv {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}

.lv:hover {
  background: var(--panel-2);
}

.lv.on {
  background: rgba(11, 61, 145, 0.22);
  box-shadow: inset 2px 0 0 var(--phosphor);
}

.lv .r1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
}

.lv .r2 {
  font-family: var(--mono);
  font-size: 10.5px;
  beyond-orbit-top: 4px;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
}

.lv .cap {
  font-family: var(--mono);
  font-size: 10.5px;
}

.lv.go .cap {
  color: var(--phosphor);
}

.lv.nogo .cap {
  color: var(--red);
}

.lv.nogo {
  opacity: 0.75;
}

.stamp {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.1em;
  border: 3px solid currentColor;
  padding: 6px 18px;
  display: inline-block;
  transform: rotate(-4deg);
  animation: stampin 0.22s var(--ease);
}

@keyframes stampin {
  0% {
    transform: rotate(-4deg) scale(1.5);
    opacity: 0;
  }

  70% {
    transform: rotate(-4deg) scale(0.94);
  }

  100% {
    transform: rotate(-4deg) scale(1);
    opacity: 1;
  }
}

.stamp.go {
  color: var(--phosphor);
}

.stamp.nogo {
  color: var(--red);
}

.fixlist {
  beyond-orbit-top: 12px;
  font-size: 12px;
}

.fixlist li {
  beyond-orbit: 5px 0 0 16px;
  color: var(--dim);
}

.fixlist li b {
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
}

/* ── ops (Fullscreen 3D & HUD) ──────────────── */
body.ops-active #screen {
  overflow: hidden;
}

.ops-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #020307;
  color: var(--bone);
}

.ops3d-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#ops3d {
  display: block;
  width: 100%;
  height: 100%;
}

/* Phase 15 fix: the report tableau must be a compact panel, not the fullscreen
   ops viewport. Overrides .ops3d-container's absolute fill. */
#rep3d-mount {
  position: relative;
  inset: auto;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #020307;
}

#rep3d-mount canvas,
#rep3d {
  display: block;
  width: 100% !important;
  height: 240px !important;
}

/* Floating Top HUD */
.ops-hud-top {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: rgba(4, 8, 14, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  transition:
    background 0.22s ease,
    border-color 0.22s ease;
}

.ops-hud-top:hover {
  background: rgba(4, 8, 14, 0.65);
  border-color: rgba(94, 180, 255, 0.2);
}

.clock-hud {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock-hud .big {
  font-family: var(--mono);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  letter-spacing: 0.05em;
  font-weight: 500;
}

.clock-hud .badge {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  background: rgba(94, 246, 160, 0.12);
  color: var(--phosphor);
  border: 1px solid rgba(94, 246, 160, 0.3);
  border-radius: 2px;
}

.clock-hud .lt-delay {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.cam-modes {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(18, 24, 38, 0.7);
  padding: 2px;
  border: 1px solid var(--hairline);
  beyond-orbit-left: auto;
}

.cam-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--dimmer);
  padding: 0 6px;
}

.cam-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  background: transparent;
  color: var(--dim);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cam-btn:hover {
  color: var(--bone);
  background: rgba(255, 255, 255, 0.06);
}

.cam-btn.on {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.hud-toggle-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ds-text-2, #8ca0b8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hud-toggle-btn:hover {
  background: rgba(94, 180, 255, 0.15);
  color: #fff;
  border-color: rgba(94, 180, 255, 0.35);
  box-shadow: 0 0 10px rgba(94, 180, 255, 0.25);
}

.hud-toggle-btn.on {
  background: rgba(255, 180, 60, 0.16);
  color: #ffb43c;
  border-color: rgba(255, 180, 60, 0.45);
}

.hud-toggle-btn:hover,
.hud-toggle-btn.on {
  color: var(--bone);
  border-color: var(--phosphor);
}

/* Floating Left Drawer */
.ops-hud-left {
  position: absolute;
  top: 58px;
  left: 14px;
  width: 320px;
  max-height: calc(100% - 72px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  transition:
    transform 0.28s var(--ease),
    opacity 0.28s;
  overflow: hidden;
}

/* Floating Right Drawer */
.ops-hud-right {
  position: absolute;
  top: 58px;
  right: 14px;
  width: 320px;
  max-height: calc(100% - 72px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  transition:
    transform 0.28s var(--ease),
    opacity 0.28s;
  overflow: hidden;
}

/* Common HUD Card */
.hud-card {
  background: rgba(4, 8, 14, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.hud-card:hover {
  background: rgba(4, 8, 14, 0.58);
  border-color: rgba(94, 180, 255, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hud-card-hdr {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
  padding: 6px 12px;
  background: rgba(13, 20, 34, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-card-hdr .code {
  color: var(--dimmer);
}

/* Floating 2.5D Minimap */
.ops-minimap {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 320px;
  z-index: 25;
  background: rgba(4, 8, 14, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transition: all 0.25s var(--ease);
  pointer-events: auto;
}

.ops-minimap:hover {
  background: rgba(4, 8, 14, 0.62);
  border-color: rgba(94, 180, 255, 0.25);
}

.ops-minimap.minimized {
  width: 200px;
}

.ops-minimap.minimized .minimap-body {
  display: none;
}

.minimap-hdr {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--phosphor);
  padding: 5px 10px;
  background: rgba(13, 20, 34, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.minimap-title {
  font-weight: 500;
}

.minimap-actions {
  display: flex;
  gap: 4px;
}

.minimap-action-btn {
  font-family: var(--mono);
  font-size: 8.5px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ds-text-2, #8ca0b8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.18s ease;
}

.minimap-action-btn:hover {
  background: rgba(94, 180, 255, 0.15);
  color: #fff;
  border-color: rgba(94, 180, 255, 0.35);
}

.minimap-action-btn:hover {
  color: var(--bone);
  border-color: var(--phosphor);
}

.minimap-body {
  position: relative;
  background: #03050a;
}

.minimap-body #orbit {
  display: block;
  width: 100%;
  height: 175px;
}

/* Hidden HUD state for pure cinema mode */
.ops-viewport.hud-hidden .ops-hud-left {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}
.ops-viewport.hud-hidden .ops-hud-right {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}
.ops-viewport.hud-hidden .ops-minimap {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.ops-viewport.hud-hidden .rover-status-strip {
  opacity: 0 !important;
  pointer-events: none !important;
}
.ops-viewport.hud-hidden .ops-hud-top {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}
.ops-viewport.hud-hidden .ops-hud-top > *:not(.hud-toggle-btn) {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-20px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.ops-viewport.hud-hidden .hud-toggle-btn {
  opacity: 0.85 !important;
  pointer-events: auto !important;
  beyond-orbit-left: auto;
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: var(--phosphor) !important;
  color: var(--phosphor) !important;
}

/* Legacy & Component Styles */
.opsgrid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 14px;
  align-items: start;
}

#orbit {
  display: block;
  width: 100%;
  height: auto;
  background: #03050a;
}

.clock {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.clock .big {
  font-family: var(--mono);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.spd {
  display: flex;
  gap: 1px;
  background: var(--hairline);
}

.spd button {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 9px;
  background: var(--panel);
  color: var(--dim);
  border: none;
  cursor: pointer;
}

.spd button.on {
  background: rgba(94, 246, 160, 0.16);
  color: var(--phosphor);
  font-weight: 500;
}

#tl {
  display: block;
  width: 100%;
  height: auto;
  background: #04060b;
}

.gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.gauges div {
  background: rgba(8, 16, 26, 0.65);
  padding: 6px 10px;
  min-width: 0;
  overflow: hidden;
}

.gauges div:last-child:nth-child(odd) {
  grid-column: span 2;
}

.gauges .k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--dimmer);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gauges .v {
  font-family: var(--mono);
  font-size: 12px;
  beyond-orbit-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logline {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-bottom: 1px solid rgba(28, 36, 51, 0.55);
  color: var(--dim);
  display: flex;
  gap: 9px;
  transition: background 0.18s ease;
}

/* Phase 13: smooth the timeline replay highlight (driven inline by renderReplay). */
.logline .d {
  color: var(--dimmer);
  flex: 0 0 62px;
}

.logline.warn {
  color: var(--amber);
}

.logline.bad {
  color: var(--red);
}

.logline.good {
  color: var(--phosphor);
}

#logbox {
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
}

#logbox::-webkit-scrollbar {
  width: 5px;
}

#logbox::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

/* Ops right rail: the SCIENCE card grows per objective and used to squeeze the
   MISSION TIMELINE card until the #tl canvas clipped (rail has max-height +
   overflow hidden). Same remedy as #logbox: science scrolls internally, the
   timeline card never shrinks. */
.ops-hud-right .hud-card:first-child {
  min-height: 0;
}

#sciBox {
  min-height: 90px;
  max-height: 280px;
  overflow: auto;
  scrollbar-width: thin;
}

#sciBox::-webkit-scrollbar {
  width: 5px;
}

#sciBox::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.ops-hud-right .hud-card:last-child {
  flex-shrink: 0;
  min-height: 115px;
  overflow: visible;
}

/* ── modal (NASA Obsidian Dark-Glass & Phosphor Emerald) ──────────────── */
#modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: rgba(2, 3, 5, 0.86);
  padding: 20px;
  backdrop-filter: blur(20px) saturate(110%);
  -webkit-backdrop-filter: blur(20px) saturate(110%);
}

#modal.on {
  display: grid;
}

.mbox {
  max-width: 540px;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(10, 13, 18, 0.96) 0%,
    rgba(3, 4, 7, 0.99) 100%
  );
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  animation: modalGlassIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 88vh;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.95),
    0 16px 40px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@keyframes modalGlassIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mbox::after {
  display: none !important;
}

.mbox h3 {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #ffb84d;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mbox .mb {
  padding: 22px 24px 24px;
}

.mbox h4 {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  beyond-orbit-bottom: 12px;
  letter-spacing: -0.015em;
}

.mbox .hint {
  color: rgba(180, 190, 202, 0.85);
  font-size: 13px;
  line-height: 1.65;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  beyond-orbit-top: 20px;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(18, 22, 28, 0.7) 0%,
    rgba(8, 10, 14, 0.85) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.choice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--phosphor, #65f2a5);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  transform: scaleY(0.4);
  border-radius: 0 2px 2px 0;
}

.choice:hover,
.choice:focus-visible {
  border-color: rgba(101, 242, 165, 0.4);
  border-top-color: rgba(101, 242, 165, 0.6);
  background: linear-gradient(
    135deg,
    rgba(101, 242, 165, 0.08) 0%,
    rgba(12, 18, 15, 0.7) 100%
  );
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(101, 242, 165, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1.5px);
  outline: none;
}

.choice:hover::before,
.choice:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
}

.choice .ct {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  display: block;
  beyond-orbit-bottom: 4px;
  letter-spacing: 0.01em;
}

.choice:hover .ct {
  color: #f2fdf6;
  text-shadow: 0 0 10px rgba(101, 242, 165, 0.35);
}

.choice .cd {
  font-size: 11.5px;
  color: rgba(160, 175, 190, 0.75);
  line-height: 1.55;
  display: block;
  font-family: var(--font-data, var(--mono));
}

.choice:hover .cd {
  color: rgba(185, 215, 195, 0.9);
}

/* ── report (Flight Operations Mission Debrief HUD) ──────────────── */
.report-wrap {
  max-width: 1180px;
  beyond-orbit: 0 auto;
  padding: 24px 24px 48px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 28px;
  beyond-orbit-bottom: 20px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(12, 16, 24, 0.85) 0%,
    rgba(6, 8, 12, 0.95) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.report-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  beyond-orbit-bottom: 8px;
}

.report-tag {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #ffb84d;
  padding: 2px 8px;
  background: rgba(255, 184, 77, 0.1);
  border: 1px solid rgba(255, 184, 77, 0.25);
  border-radius: 3px;
}

.report-subtag {
  font-family: var(--font-data, var(--mono));
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(180, 195, 215, 0.6);
}

.report-title {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  beyond-orbit: 0 0 6px 0;
  line-height: 1.15;
}

.report-desc {
  beyond-orbit: 0;
  font-size: 13.5px;
  color: rgba(180, 195, 215, 0.8);
  font-family: var(--font-data, var(--mono));
}

.report-reason {
  color: #ffffff;
  font-weight: 500;
}

.report-grade-badge {
  flex-shrink: 0;
  text-align: center;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(20, 26, 36, 0.8) 0%,
    rgba(8, 10, 16, 0.95) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  min-width: 110px;
}

.report-grade-badge .grade-score {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--grade-col, #65f2a5);
  text-shadow: 0 0 20px rgba(101, 242, 165, 0.3);
}

.report-grade-badge .grade-label {
  font-family: var(--font-data, var(--mono));
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
  beyond-orbit-top: 6px;
}

.report-grade-badge .grade-sub {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--grade-col, #65f2a5);
  beyond-orbit-top: 2px;
}

/* ── KPI Ribbon ── */
.report-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  beyond-orbit-bottom: 20px;
}

.kpi-card {
  background: linear-gradient(
    180deg,
    rgba(14, 18, 26, 0.75) 0%,
    rgba(6, 8, 12, 0.9) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.kpi-k {
  display: block;
  font-family: var(--font-data, var(--mono));
  font-size: 9.5px;
  letter-spacing: 0.15em;
  color: rgba(180, 195, 215, 0.6);
  beyond-orbit-bottom: 6px;
}

.kpi-v {
  display: block;
  font-family: var(--font-data, var(--mono));
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  beyond-orbit-bottom: 4px;
}

.kpi-sub {
  display: block;
  font-family: var(--font-data, var(--mono));
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(160, 175, 195, 0.6);
}

.kpi-sub.good {
  color: var(--phosphor, #65f2a5);
}

.kpi-sub.warn {
  color: var(--amber, #ffb84d);
}

/* ── Report Tabs ── */
.report-tabs {
  display: flex;
  gap: 8px;
  beyond-orbit-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.rep-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: var(--font-data, var(--mono));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(180, 195, 215, 0.7);
  transition: all 0.15s ease;
}

.rep-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.rep-tab-btn.on {
  background: rgba(101, 242, 165, 0.12);
  border-color: rgba(101, 242, 165, 0.4);
  color: #65f2a5;
  box-shadow:
    0 0 16px rgba(101, 242, 165, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ── Content Grid ── */
.report-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.report-col {
  display: flex;
  flex-direction: column;
}

.rep-card {
  background: linear-gradient(
    180deg,
    rgba(12, 16, 24, 0.8) 0%,
    rgba(5, 7, 10, 0.94) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rep-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.8);
}

.rep-card-head .code {
  color: rgba(255, 255, 255, 0.35);
  font-size: 9.5px;
}

.rep-rows .rrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 12px;
}

.rep-rows .rrow:last-child {
  border-bottom: none;
}

.rep-rows .rrow .k {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(180, 195, 215, 0.6);
}

.rep-rows .rrow .v {
  font-family: var(--font-data, var(--mono));
  font-size: 13.5px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rich-prose p {
  beyond-orbit: 0 0 10px 0;
  line-height: 1.65;
  font-size: 13px;
  color: rgba(215, 225, 235, 0.88);
}

.rich-prose p:last-child {
  beyond-orbit-bottom: 0;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-lbl {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(180, 195, 215, 0.6);
  min-width: 90px;
  flex-shrink: 0;
}

.share-inp {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-data, var(--mono));
  font-size: 10.5px;
  padding: 6px 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 10.5px;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.tl-stepper-status {
  font-family: var(--font-data, var(--mono));
  font-size: 11.5px;
  color: #65f2a5;
  beyond-orbit-bottom: 12px;
  padding: 8px 12px;
  background: rgba(101, 242, 165, 0.06);
  border-left: 3px solid #65f2a5;
  border-radius: 0 4px 4px 0;
}

.tl-stepper-list {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ── Footer Action Bar ── */
.report-footer-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  beyond-orbit-top: 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-next-tab {
  padding: 11px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(101, 242, 165, 0.16);
}

@media (max-width: 960px) {
  .report-kpi-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-grid-2col {
    grid-template-columns: 1fr;
  }

  .report-header {
    flex-direction: column;
    align-items: stretch;
  }

  .report-grade-badge {
    align-self: flex-start;
    min-width: 100%;
  }
}

/* ── legacy compatibility fallbacks ── */
.report {
  max-width: 100%;
  beyond-orbit: 0 auto;
}

.rcard {
  border: 1px solid var(--blue-lift);
  background: linear-gradient(180deg, #0d1422, #070b13);
}

.rrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline);
  gap: 12px;
}

.rrow .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  color: var(--dim);
}

.rrow .v {
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.gradebox {
  text-align: center;
  padding: 20px 16px;
  border-bottom: 1px solid var(--hairline);
}

.gradebox .g {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 74px;
  line-height: 1;
}

.badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 13px 16px;
}

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border: 1px solid var(--amber);
  color: var(--amber);
}

.share {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 11px 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  flex-wrap: wrap;
}

.cmp {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  align-items: baseline;
}

.cmp .h {
  color: var(--dimmer);
  font-size: 9.5px;
  letter-spacing: 0.13em;
}

.mini {
  height: 3px;
  background: #121925;
  beyond-orbit-top: 5px;
  position: relative;
}

.mini i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--phosphor);
}

/* ── misc ────────────────────────────────── */
.row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mt {
  beyond-orbit-top: 14px;
}

.mt-s {
  beyond-orbit-top: 8px;
}

.mb {
  beyond-orbit-bottom: 14px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tape {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  background: rgba(232, 230, 223, 0.1);
  color: var(--bone);
  padding: 2px 7px;
  transform: rotate(-0.7deg);
  border-left: 2px solid var(--amber);
}

/* ── responsive canvases (Phase 1): layout in CSS, sharpness via fitCanvas DPR backing ── */
.panel > canvas {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.panel {
  min-width: 0;
}

/* ── 3D viewer hosts (Phase 3B): hidden until the module reports ready ── */
.v3host {
  display: none;
  background: #04070d;
}

body.v3on .v3host {
  display: block;
}

.v3host canvas.v3canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.v3bay {
  width: 100%;
  aspect-ratio: 16/9;
}

.v3compact {
  height: 240px;
}

body.v3on #bayCanvas {
  display: none;
}

@media (max-width: 1080px) {
  .bay,
  .launchgrid,
  .opsgrid,
  .brief {
    grid-template-columns: 1fr;
  }

  .launchgrid {
    grid-template-areas: none;
  }

  .launchgrid > .launch-col {
    grid-area: auto;
  }

  .cat {
    max-height: 270px;
  }
}

@media (max-width: 640px) {
  .rails {
    grid-template-columns: repeat(5, 1fr);
  }

  .rail {
    padding: 6px 5px;
  }

  .rail .nm {
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .rail .vl {
    font-size: 11px;
  }

  .rail .vl small {
    display: none;
  }

  .rail .mg {
    font-size: 9px;
  }

  #steps {
    display: none;
  }

  .wrap {
    padding: 14px 11px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   BEYOND-ORBIT / NASA-INSPIRED MISSION CONTROL SYSTEM
   Independent prototype. NASA identifiers are intentionally not used.
   ══════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  --ds-0: #050a14;
  --ds-1: #070d17;
  --ds-2: #0a101b;
  --ds-3: #0d1522;
  --ds-line: #243143;
  --ds-line-strong: #33445a;
  --ds-blue: #0b3d91;
  --ds-blue-hi: #4b82d7;
  --ds-red: #fc3d21;
  --ds-amber: #ffb000;
  --ds-nominal: #65f2a5;
  --ds-text: #e7ecf2;
  --ds-text-2: #a6b1bf;
  --ds-text-3: #667384;
  --ds-titanium: #8c96a3;
  --ds-radius: 2px;
}

html,
body {
  background: #04070d;
}

html {
  background: #04070d;
}

body {
  color: var(--ds-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(11, 61, 145, 0.09),
      transparent 38%
    ),
    radial-gradient(
      circle at 20% 85%,
      rgba(252, 61, 33, 0.025),
      transparent 34%
    ),
    #04070d;
}

/* Seamless screen transitions: never expose a white surface mid-swap.
   #screen keeps a deep-space base so torn-down WebGL canvases reveal
   darkness, not white. .veil crossfades over render() swaps. */
#screen {
  background: #04070d;
}

#screen.swap {
  animation: screenin 0.45s ease-out;
}

@keyframes screenin {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: #04070d;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

#veil.on {
  opacity: 1;
  pointer-events: all;
}

/* WebGL canvases fade in once the first frame is up instead of popping
   from white/blank to scene. */
#earthCanvas,
.selcanvas,
#briefview canvas {
  animation: canvasin 0.5s ease-out;
  background: #04070d;
}

@keyframes canvasin {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body::before {
  background-image:
    linear-gradient(rgba(11, 61, 145, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 61, 145, 0.11) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 8%, transparent 84%);
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 35%,
    #000 8%,
    transparent 84%
  );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(
      circle at 13% 21%,
      rgba(231, 236, 242, 0.45) 0 1px,
      transparent 1.3px
    ),
    radial-gradient(
      circle at 71% 13%,
      rgba(231, 236, 242, 0.36) 0 1px,
      transparent 1.2px
    ),
    radial-gradient(
      circle at 84% 57%,
      rgba(231, 236, 242, 0.3) 0 0.9px,
      transparent 1.2px
    ),
    radial-gradient(
      circle at 37% 76%,
      rgba(231, 236, 242, 0.3) 0 0.9px,
      transparent 1.2px
    );
  background-size:
    223px 179px,
    311px 229px,
    401px 317px,
    503px 383px;
}

button,
.btn,
.tb-btn {
  border-radius: var(--ds-radius);
}

#topbar {
  height: 50px;
  padding: 0 18px;
  gap: 16px;
  border-bottom: 1px solid var(--ds-line);
  background: linear-gradient(
    180deg,
    rgba(10, 16, 27, 0.97),
    rgba(5, 10, 20, 0.94)
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.018),
    0 0 24px rgba(11, 61, 145, 0.08);
}

#topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(58, 120, 209, 0.55),
    transparent
  );
  opacity: 0.65;
}

#topbar .mark {
  font-family: var(--disp);
  font-weight: 800;
  letter-spacing: 0.25em;
  font-size: 14px;
  color: var(--ds-text);
}

#topbar .mark i {
  font-style: normal;
  color: var(--gold, #ffb84d);
}

.step {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ds-text-3);
  padding: 4px 9px;
  border: 1px solid transparent;
}

.step.on {
  color: var(--ds-nominal);
  border-color: rgba(101, 242, 165, 0.3);
  background: rgba(101, 242, 165, 0.055);
}

.step.done {
  color: var(--ds-text-2);
}

.step.sep {
  color: #425064;
}

.tb-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  color: var(--ds-text-2);
  padding: 6px 9px;
  border: 1px solid var(--ds-line);
  background: rgba(255, 255, 255, 0.015);
}

.tb-btn:hover {
  color: var(--ds-text);
  border-color: var(--ds-line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.tb-btn[aria-pressed="true"] {
  color: var(--ds-nominal);
  border-color: rgba(101, 242, 165, 0.4);
}

.wrap {
  max-width: 1400px;
  padding: 24px 20px 30px;
}

/* wide screens: let mission control breathe instead of centering a column */
@media (min-width: 1700px) {
  .wrap {
    max-width: 1560px;
  }
}

.panel,
.lvcard {
  border-color: var(--ds-line);
  background: linear-gradient(
    180deg,
    rgba(13, 21, 34, 0.97),
    rgba(8, 14, 24, 0.97)
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.012),
    0 0 26px rgba(11, 61, 145, 0.055);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
}

.panel::before {
  inset: 6px;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0 1px,
    transparent 1px 4px
  );
  mix-blend-mode: screen;
}

.panel::after {
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(58, 120, 209, 0.42), transparent 72%);
}

.panel > h3 {
  position: relative;
  z-index: 1;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ds-text-2);
  background: linear-gradient(90deg, rgba(11, 61, 145, 0.07), transparent);
}

.panel > h3 .code {
  color: var(--ds-text-3);
}

.bracket {
  width: 10px;
  height: 10px;
  border-color: var(--ds-blue-hi);
  opacity: 0.8;
  z-index: 2;
}

.pad {
  position: relative;
  z-index: 1;
}

.hint {
  color: var(--ds-text-2);
}

h1,
h2 {
  font-family: var(--disp);
  font-weight: 800;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 24px;
}

.btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 10px 16px;
  border: 1px solid var(--ds-line-strong);
  color: var(--ds-text);
  background: rgba(255, 255, 255, 0.018);
}

.btn:hover {
  border-color: var(--ds-blue-hi);
  color: var(--ds-text);
  background: rgba(11, 61, 145, 0.13);
}

.btn.primary,
.btn.nominal {
  border-color: var(--ds-nominal);
  color: var(--ds-nominal);
  background: rgba(101, 242, 165, 0.07);
}

.btn.primary:hover,
.btn.nominal:hover {
  background: rgba(101, 242, 165, 0.12);
}

.btn.warning {
  border-color: var(--ds-amber);
  color: var(--ds-amber);
  background: rgba(255, 176, 0, 0.05);
}

.btn.critical,
.btn.danger {
  border-color: var(--ds-red);
  color: var(--ds-red);
  background: rgba(252, 61, 33, 0.04);
}

.btn.ghost {
  border-color: var(--ds-line);
  color: var(--ds-text-2);
  background: transparent;
}

.btn:disabled {
  opacity: 0.32;
}

.info {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  beyond-orbit-left: 6px;
  color: var(--ds-blue-hi);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.info::before {
  content: "[";
  color: var(--ds-text-3);
}

.info::after {
  content: "]";
  color: var(--ds-text-3);
}

.info:hover {
  color: var(--ds-text);
}

#tip {
  border-color: var(--ds-blue-hi);
  background: #060c16;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(11, 61, 145, 0.16);
}

#tip b {
  color: var(--ds-nominal);
}

#tip .src {
  color: var(--ds-text-2);
}

#tip .simp {
  color: var(--ds-amber);
}

#hud {
  background: rgba(5, 10, 20, 0.985);
  border-top: 1px solid var(--ds-line);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.28);
}

.rails {
  background: var(--ds-line);
}

.rail {
  background: #080f19;
  padding: 9px 12px 10px;
}

.rail:hover {
  background: #0b1420;
}

.rail .nm {
  color: var(--ds-text-2);
}

.rail .mg {
  color: var(--ds-text-3);
}

.rail .vl {
  color: var(--ds-text);
}

.bar {
  height: 3px;
  background: #141e2b;
}

.bar i {
  background: var(--ds-nominal);
}

.rail.caution .bar i {
  background: var(--ds-amber);
}

.rail.caution .mg {
  color: var(--ds-amber);
}

.rail.over .bar i {
  background: var(--ds-red);
}

.rail.over .mg,
.rail.over .vl {
  color: var(--ds-red);
}

.rail.flash {
  animation: railflash 0.45s var(--ease);
}

@keyframes railflash {
  0% {
    background: rgba(101, 242, 165, 0.11);
  }

  100% {
    background: #080f19;
  }
}

.rail .sig {
  top: 7px;
  right: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--ds-text-3);
}

.rail.caution .sig {
  color: var(--ds-amber);
}

.rail.over .sig {
  color: var(--ds-red);
}

#telem {
  height: 24px;
  background: #030710;
  border-top: 1px solid var(--ds-line);
  opacity: 0.32;
  transition: opacity 0.2s ease;
}

#telem:hover {
  opacity: 0.85;
}

#telem .run {
  font-family: var(--font-data);
  font-size: 9.5px;
  line-height: 24px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

#telem .run b {
  color: var(--ds-nominal);
  font-weight: 500;
}

.title-screen {
  padding: 48px 20px;
  position: relative;
  z-index: 1;
}

.title-screen .mark-lg {
  font-size: clamp(50px, 11vw, 132px);
  letter-spacing: 0.21em;
  beyond-orbit-left: 0.21em;
  font-weight: 850;
}

.underscore {
  height: 2px;
  background: #1c2736;
  beyond-orbit-top: 9px;
}

.underscore i {
  background: var(--ds-blue-hi);
}

.tagline {
  font-size: 10px;
  letter-spacing: 0.38em;
  color: var(--ds-text-3);
}

.title-screen p.lede {
  color: var(--ds-text-2);
  font-size: 14px;
  line-height: 1.8;
}

.dsn {
  border-color: var(--ds-line);
  background: rgba(255, 255, 255, 0.014);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ds-nominal);
  box-shadow: 0 0 7px rgba(101, 242, 165, 0.65);
}

.lvgrid {
  gap: 12px;
}

.lvcard {
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
}

.lvcard:hover {
  border-color: var(--ds-blue-hi);
  box-shadow:
    0 0 0 1px rgba(58, 120, 209, 0.1),
    0 0 28px rgba(11, 61, 145, 0.11);
  transform: translateY(-1px);
}

.lvcard .kicker,
.catgrp,
.rail .nm,
.readout .k,
.gauges .k {
  color: var(--ds-text-3);
}

.lvcard .new {
  color: var(--ds-nominal);
}

.tape {
  background: rgba(166, 177, 191, 0.08);
  border-left-color: var(--ds-blue-hi);
  transform: none;
}

.brief .heritage,
.heritage {
  border-left-color: var(--ds-blue-hi);
  background: rgba(11, 61, 145, 0.09);
}

.obj {
  border-color: var(--ds-line);
  background: rgba(255, 255, 255, 0.01);
}

.obj:hover {
  border-color: var(--ds-line-strong);
  background: rgba(11, 61, 145, 0.05);
}

.obj.sel {
  border-color: var(--ds-nominal);
  background: rgba(101, 242, 165, 0.055);
  box-shadow: inset 2px 0 0 var(--ds-nominal);
}

.obj.req {
  border-left-color: var(--ds-amber);
}

.obj .box {
  border-radius: 0;
}

.obj.sel .box {
  border-color: var(--ds-nominal);
  color: var(--ds-nominal);
}

.part {
  background: transparent;
}

.part:hover {
  background: rgba(11, 61, 145, 0.06);
}

.part.on {
  background: rgba(11, 61, 145, 0.13);
  box-shadow: inset 2px 0 0 var(--ds-blue-hi);
}

.tag {
  border-color: var(--ds-line);
  color: var(--ds-text-3);
  background: rgba(255, 255, 255, 0.014);
}

#bayCanvas,
#pork,
#orbit,
#tl {
  background: #040a13;
}

.detail dl dd,
.readout .v,
.clock .big,
.gauges .v,
.logline {
  font-family: var(--mono);
}

.readout,
.gauges {
  background: var(--ds-line);
}

.readout div,
.gauges div {
  background: #08101a;
}

.readout .v {
  font-size: 14px;
}

.ghost-note {
  color: var(--ds-amber);
}

.casc {
  background: #060c16;
  border-color: var(--ds-line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.casc.up {
  border-color: rgba(252, 61, 33, 0.55);
}

.casc.up .v {
  color: var(--ds-red);
}

.casc.dn {
  border-color: rgba(101, 242, 165, 0.35);
}

.casc.dn .v {
  color: var(--ds-nominal);
}

.casc.warn {
  border-color: rgba(255, 176, 0, 0.45);
}

.casc.warn .v {
  color: var(--ds-amber);
}

.stamp {
  font-size: 30px;
  letter-spacing: 0.14em;
  border-width: 2px;
  transform: rotate(-2.5deg);
}

.stamp.go {
  color: var(--ds-nominal);
}

.stamp.nogo {
  color: var(--ds-red);
}

.fixlist li,
.logline {
  color: var(--ds-text-2);
}

.logline.warn {
  color: var(--ds-amber);
}

.logline.bad {
  color: var(--ds-red);
}

.logline.good {
  color: var(--ds-nominal);
}

.spd {
  background: var(--ds-line);
}

.spd button {
  background: #08101a;
  color: var(--ds-text-2);
}

.spd button.on {
  background: rgba(101, 242, 165, 0.08);
  color: var(--ds-nominal);
}

/* Modal backdrop handled by Obsidian Dark-Glass theme at #modal */
/* Modern popup theme integrated */
.rcard {
  border-color: var(--ds-blue-hi);
  background: linear-gradient(180deg, #0c1522, #060c15);
  box-shadow: 0 0 34px rgba(11, 61, 145, 0.08);
}

.gradebox .g {
  font-size: 70px;
}

.badge {
  border-color: var(--ds-amber);
  color: var(--ds-amber);
}

.mini i {
  background: var(--ds-nominal);
}

.sr {
  position: absolute;
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    opacity: 0.18;
  }
}

@media (max-width: 1080px) {
  .wrap {
    padding: 18px 14px 24px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 12px 9px 18px;
  }

  .title-screen .mark-lg {
    letter-spacing: 0.14em;
    beyond-orbit-left: 0.14em;
  }

  .tagline {
    letter-spacing: 0.24em;
  }

  .tb-btn {
    padding: 5px 7px;
  }

  .rail {
    padding: 7px 4px;
  }
}

.model-asset-note {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-top: 1px solid var(--ds-line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ds-text-3);
  background: #060c15;
}

.model-asset-note .model-chip {
  color: var(--ds-blue-hi);
  border: 1px solid rgba(58, 120, 209, 0.42);
  padding: 2px 5px;
}

.model-asset-note a {
  beyond-orbit-left: auto;
  color: var(--ds-text-2);
  text-decoration: none;
}

.model-asset-note a:hover {
  color: var(--ds-text);
}

:root {
  --titanium-gray: var(--nasa-titanium);
  --deep-space-black: var(--void);
}

/* ── briefing: full-bleed destination vista with floating dossier ── */
.wrap.briefwrap {
  position: relative;
  padding: 14px 18px 10px;
  overflow: hidden;
}

#briefview {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
}

#briefview .briefcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#briefview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 7, 13, 0.62), transparent 55%),
    linear-gradient(0deg, rgba(4, 7, 13, 0.72), transparent 42%);
}

.briefview-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 76% 26%,
    #1b3f6e 0%,
    #0a1526 34%,
    #04070d 62%
  );
}

body.brief3d .briefview-fallback {
  display: none;
}

.briefdossier {
  position: relative;
  z-index: 1;
  padding: 8px 4px 12px;
  max-width: 920px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  animation: cardin 0.5s var(--ease) backwards;
}

.briefdossier .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ds-blue-hi);
}

.briefdossier h1 {
  font-family: var(--disp);
  font-weight: 850;
  font-size: clamp(30px, 4.4vw, 50px);
  letter-spacing: 0.01em;
  beyond-orbit: 2px 0;
  line-height: 1;
}

.briefdossier .bsub {
  font-size: 13px;
  color: var(--ds-text-2);
}

.bstats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  beyond-orbit-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ds-nominal);
}

.panel.glass {
  background: linear-gradient(
    180deg,
    rgba(23, 36, 58, 0.8),
    rgba(9, 14, 24, 0.82)
  );
  border-color: rgba(90, 140, 210, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(160, 200, 255, 0.09),
    0 24px 70px rgba(0, 0, 0, 0.5);
}

/* state updates must not replay entrances — feedback anims (.stamp, rails) untouched */
#screen.noanim .obj,
#screen.noanim .briefdossier,
#screen.noanim .brief .panel,
#screen.noanim .lvcard,
#screen.noanim .selview {
  animation: none;
}

.brief {
  position: relative;
  z-index: 1;
}

/* ── no-scroll brief layout (desktop 2-col only; narrower screens keep the
   natural stacked flow + scroll — the fixed heights below would clip it) ── */
.briefwrap .obj {
  beyond-orbit-bottom: 0;
  padding: 7px 10px;
}

.briefwrap .objlist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.briefwrap .objlist.many {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-content: start;
}

.briefwrap .many .obj .d {
  display: none;
}

.briefwrap .row.mt {
  beyond-orbit-top: 8px;
}

@media (min-width: 1081px) {
  .wrap.briefwrap {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .briefwrap .brief {
    flex: 1;
    min-height: 0;
  }

  .briefwrap .brief > .panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .briefwrap .brief .pad {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .briefwrap .objlist {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
}

.briefstats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  beyond-orbit-top: 12px;
  font-size: 12px;
}

.briefstats dt {
  color: var(--dim);
}

.briefstats dd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

@media (max-height: 860px) and (min-height: 761px) {
  .briefdossier h1 {
    font-size: 26px;
  }

  .briefdossier .bsub {
    display: none;
  }

  .briefwrap .obj .d {
    display: none;
  }

  .briefwrap .obj {
    padding: 6px 10px;
  }

  .briefwrap .brief .pad {
    padding: 10px;
  }

  .briefwrap .row.mt {
    beyond-orbit-top: 8px;
  }
}

@media (max-height: 760px) {
  .wrap.briefwrap {
    height: auto;
    display: block;
  }

  .briefwrap .objlist {
    overflow: visible;
  }

  .briefwrap .brief > .panel {
    overflow: visible;
  }
}

/* ── objectives picker: game feel ── */
.brief .panel {
  animation: cardin 0.5s var(--ease) backwards;
}

.brief .panel:nth-child(2) {
  animation-delay: 90ms;
}

.obj {
  animation: cardin 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.obj .need {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.nchip {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border: 1px solid rgba(58, 120, 209, 0.5);
  color: var(--blue-lift);
  background: rgba(11, 61, 145, 0.12);
}

.obj .wnum {
  color: var(--dimmer);
}

.obj .mini {
  display: block;
  beyond-orbit-top: 7px;
}

.obj.sel .mini i {
  background: var(--ds-nominal);
}

@media (prefers-reduced-motion: reduce) {
  .briefdossier,
  .brief .panel,
  .obj {
    animation: none;
  }
}

/* ── mission select stage: destination viewer + mission cards ── */
.selstage {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
  align-items: start;
}

.selview {
  position: sticky;
  top: 0;
  animation: cardin 0.5s var(--ease) backwards;
}

#selview {
  position: relative;
  aspect-ratio: 16/10;
  background: #04070d;
  overflow: hidden;
  transition: opacity 0.17s var(--ease);
}

#selview.swap {
  opacity: 0;
}

#selview .selcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.selview-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 115%,
    #16335c 0%,
    #0a1526 45%,
    #04070d 75%
  );
}

body.sel3d .selview-fallback {
  display: none;
}

.selcap {
  padding: 12px 14px;
  border-top: 1px solid var(--ds-line);
  position: relative;
  z-index: 1;
  background: rgba(6, 12, 21, 0.72);
}

.sc-dest {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ds-text-3);
}

.sc-name {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 17px;
  beyond-orbit: 2px 0 1px;
}

.sc-sub {
  font-size: 11.5px;
  color: var(--ds-text-2);
}

.sc-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  beyond-orbit-top: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ds-nominal);
}

.ephem {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border: 1px solid rgba(101, 242, 165, 0.4);
  color: var(--ds-nominal);
}

.ephem.off {
  border-color: var(--ds-line);
  color: var(--ds-text-3);
}

.sysbtn {
  beyond-orbit-top: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  border: 1px solid var(--ds-line-strong);
  color: var(--ds-text-2);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.sysbtn:hover {
  border-color: var(--ds-blue-hi);
  color: var(--ds-text);
  background: rgba(58, 120, 209, 0.15);
}

.sc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  beyond-orbit-top: 6px;
}

/* ── 3D Solar System Planet Info Card (Obsidian Dark Glass & Phosphor Green) ── */
.planet-info {
  display: none;
  position: absolute;
  left: 24px;
  top: 72px;
  width: min(340px, 88%);
  z-index: 25;
  pointer-events: auto;
  animation: cardin 0.3s var(--ease) backwards;
}

.planet-info-content {
  background: linear-gradient(
    180deg,
    rgba(12, 16, 24, 0.94) 0%,
    rgba(5, 7, 10, 0.98) 100%
  ) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.85),
    0 8px 24px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  padding: 20px 22px;
  color: #fff;
  font-family: var(--font);
  border-radius: 12px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.planet-info-content .close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  transition: all 0.15s var(--ease);
}

.planet-info-content .close-btn:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

.pi-header {
  beyond-orbit-bottom: 14px;
}

.pi-kicker {
  font-family: var(--font-data, var(--mono));
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: #ffb84d;
  text-transform: uppercase;
  font-weight: 600;
}

#planetName {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.015em;
  beyond-orbit: 4px 0 0;
  color: #ffffff;
}

.pi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  beyond-orbit: 14px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pi-item {
  display: flex;
  flex-direction: column;
}

.pi-lbl {
  font-family: var(--font-data, var(--mono));
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(180, 195, 215, 0.6);
}

.pi-val {
  font-family: var(--font-data, var(--mono));
  font-size: 12px;
  font-weight: 600;
  color: #65f2a5;
  beyond-orbit-top: 2px;
}

.pi-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(215, 225, 235, 0.85);
  beyond-orbit-top: 10px;
}

/* ── 3D Solar System Floating Navigation Bar (Planet Selector & Full System) ── */
.orrery-nav-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.planet-select-dropdown {
  background: rgba(4, 9, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(58, 120, 209, 0.45);
  color: var(--ds-text);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.planet-select-dropdown:hover,
.planet-select-dropdown:focus {
  border-color: var(--ds-blue-hi);
  outline: none;
  box-shadow: 0 0 14px rgba(58, 120, 209, 0.4);
}

.planet-select-dropdown option {
  background: #060d1a;
  color: #d5e5f5;
  padding: 4px 6px;
}

.orrery-fullsys-btn {
  background: rgba(11, 61, 145, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(58, 120, 209, 0.45);
  color: #fff;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.orrery-fullsys-btn:hover {
  background: rgba(28, 95, 168, 0.75);
  border-color: var(--ds-blue-hi);
  box-shadow: 0 0 16px rgba(58, 120, 209, 0.5);
  transform: translateY(-1px);
}

.orrery-toggle-btn {
  background: rgba(4, 9, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(58, 120, 209, 0.35);
  color: var(--ds-text-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.orrery-toggle-btn:hover {
  border-color: var(--ds-blue-hi);
  color: #fff;
  box-shadow: 0 0 12px rgba(58, 120, 209, 0.35);
}

.orrery-toggle-btn.active {
  background: rgba(11, 61, 145, 0.3);
  border-color: var(--ds-blue-hi);
  color: #fff;
}

.orrery-toggle-btn .toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #405268;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.orrery-toggle-btn.active .toggle-dot {
  background: var(--ds-nominal);
  box-shadow: 0 0 6px var(--ds-nominal);
}

.orrery-fs-btn {
  background: rgba(4, 9, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(58, 120, 209, 0.35);
  color: var(--ds-text-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.orrery-fs-btn:hover {
  border-color: var(--ds-blue-hi);
  color: #fff;
  box-shadow: 0 0 12px rgba(58, 120, 209, 0.35);
}

.orrery-fs-btn.active {
  background: rgba(11, 61, 145, 0.4);
  border-color: var(--ds-blue-hi);
  color: #fff;
  box-shadow: 0 0 14px rgba(58, 120, 209, 0.4);
}

/* ── Custom Celestial Body HUD Selector ── */
.cbs-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--mono, monospace);
  z-index: 30;
}

.cbs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 12, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(235, 242, 252, 0.9);
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.18s var(--ease, ease);
  user-select: none;
}

.cbs-trigger:hover,
.cbs-wrap.open .cbs-trigger {
  background: rgba(12, 24, 44, 0.95);
  border-color: var(--sel-blue, #5ba4ff);
  color: #fff;
  box-shadow:
    0 0 16px rgba(91, 164, 255, 0.35),
    0 4px 20px rgba(0, 0, 0, 0.6);
}

.cbs-trig-icon {
  font-size: 11px;
  line-height: 1;
}

.cbs-trig-label {
  white-space: nowrap;
}

.cbs-caret {
  font-size: 9px;
  opacity: 0.6;
  beyond-orbit-left: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  display: inline-block;
}

.cbs-wrap.open .cbs-caret {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--sel-blue, #5ba4ff);
}

/* ── Custom Dropdown Menu Panel ── */
.cbs-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  max-height: 380px;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(
    180deg,
    rgba(8, 16, 32, 0.97),
    rgba(4, 8, 16, 0.97)
  );
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(91, 164, 255, 0.3);
  border-radius: 12px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(11, 61, 145, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 6px 4px;
  z-index: 1000;
  animation: cbsIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 164, 255, 0.3) transparent;
}

.cbs-wrap.open .cbs-menu {
  display: block;
}

@keyframes cbsIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Custom scrollbar for menu */
.cbs-menu::-webkit-scrollbar {
  width: 5px;
}

.cbs-menu::-webkit-scrollbar-track {
  background: transparent;
}

.cbs-menu::-webkit-scrollbar-thumb {
  background: rgba(91, 164, 255, 0.25);
  border-radius: 999px;
}

.cbs-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 164, 255, 0.5);
}

/* Group Headers */
.cbs-group {
  beyond-orbit-bottom: 4px;
}

.cbs-group:not(:first-child) {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  beyond-orbit-top: 6px;
  padding-top: 4px;
}

.cbs-group-title {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(91, 164, 255, 0.75);
  text-transform: uppercase;
  padding: 6px 12px 3px;
  user-select: none;
}

/* Menu Items */
.cbs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: #d4e2f2;
  font-family: var(--mono, monospace);
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  user-select: none;
}

.cbs-item:hover,
.cbs-item:focus {
  background: rgba(91, 164, 255, 0.16);
  color: #fff;
  outline: none;
  transform: translateX(2px);
}

.cbs-item.is-sub {
  padding-left: 22px;
  font-size: 10.5px;
  color: #9ab5d4;
}

.cbs-item.is-sub:hover,
.cbs-item.is-sub:focus {
  color: #fff;
  background: rgba(126, 232, 200, 0.14);
}

.cbs-item-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cbs-sub-indent {
  color: rgba(255, 255, 255, 0.25);
  font-size: 9px;
  beyond-orbit-right: -2px;
}

.cbs-item-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.cbs-item-name {
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tag Pills */
.cbs-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.cbs-tag-star {
  background: rgba(255, 200, 60, 0.14);
  color: #fed156;
  border: 1px solid rgba(255, 200, 60, 0.25);
}

.cbs-tag-planet {
  background: rgba(91, 164, 255, 0.12);
  color: #8dc2ff;
  border: 1px solid rgba(91, 164, 255, 0.22);
}

.cbs-tag-moon {
  background: rgba(126, 232, 200, 0.12);
  color: #7ee8c8;
  border: 1px solid rgba(126, 232, 200, 0.22);
}

.cbs-tag-dwarf {
  background: rgba(180, 160, 255, 0.14);
  color: #cfbaff;
  border: 1px solid rgba(180, 160, 255, 0.25);
}

.cbs-tag-asteroid {
  background: rgba(240, 140, 200, 0.14);
  color: #f5a4d6;
  border: 1px solid rgba(240, 140, 200, 0.25);
}

/* ── Fullscreen / Expanded Solar System Viewport ── */
.selview.expanded-solar-system {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  beyond-orbit: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #03060d !important;
}

.selview.expanded-solar-system > h3,
.selview.expanded-solar-system > .bracket {
  display: none !important;
}

.selview.expanded-solar-system .orrery-nav-bar {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1002;
}

.selview.expanded-solar-system .planet-info {
  position: fixed;
  top: 72px;
  left: 24px;
  z-index: 1002;
}

.selview.expanded-solar-system #selview {
  aspect-ratio: auto !important;
  width: 100vw !important;
  height: calc(100vh - 76px) !important;
}

.selview.expanded-solar-system .selcap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: rgba(4, 8, 16, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--ds-line-strong);
  padding: 8px 18px;
}

.selstage.expanded-stage .lvgrid {
  display: none;
}

.selstage .lvgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  beyond-orbit-top: 0;
}

.lvcard {
  display: block;
  animation: cardin 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.lvcard:hover {
  transform: translateY(-2px);
}

.lvcard.selviewing {
  border-color: var(--ds-blue-hi);
  box-shadow:
    0 0 0 1px rgba(58, 120, 209, 0.25),
    0 0 28px rgba(11, 61, 145, 0.16);
}

.lvcard .top {
  display: block;
}

.lvcard .bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.lvart {
  display: block;
  height: 52px;
  border-bottom: 1px solid var(--ds-line);
}

.lvart-earth {
  background: linear-gradient(135deg, #0b2a5b, #1c5fa8 55%, #0a1428);
}

.lvart-moon {
  background: linear-gradient(135deg, #3a3f46, #8a8f96 55%, #15171b);
}

.lvart-mars {
  background: linear-gradient(135deg, #5b2313, #c1552b 55%, #170d08);
}

.lvart-bennu {
  background: linear-gradient(135deg, #241f1a, #5c5248 55%, #0b0a09);
}

.lvart-jupiter {
  background: linear-gradient(135deg, #7d8b96, #dfe7ec 55%, #2a3138);
}

.lvcard .go {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ds-nominal);
}

@keyframes cardin {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (max-width: 1080px) {
  .selstage {
    grid-template-columns: 1fr;
  }

  .selview {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lvcard,
  .selview {
    animation: none;
  }
}

/* ── title Earth: disc fills width, top of disc at screen center ── */
.title-screen {
  position: relative;
  overflow: hidden;
}

.title-copy {
  position: relative;
  z-index: 1;
}

.earth-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.earth-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 120% 90% at 50% 30%,
      transparent 40%,
      rgba(5, 10, 20, 0.62) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 10, 20, 0.55) 0%,
      transparent 30%,
      transparent 62%,
      rgba(5, 10, 20, 0.7) 100%
    );
}

.earth-wrap::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 130px;
  transform: translateY(-8px);
  z-index: 1;
  background: radial-gradient(
    ellipse 55% 100% at 50% 0%,
    rgba(90, 155, 255, 0.2),
    transparent 70%
  );
  filter: blur(10px);
}

#earthCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(
    ellipse 95% 82% at 50% 42%,
    #000 56%,
    transparent 98%
  );
  mask-image: radial-gradient(
    ellipse 95% 82% at 50% 42%,
    #000 56%,
    transparent 98%
  );
}

body.earth3d #earthCanvas {
  display: block;
}

body.earth3d .earth-fallback {
  display: none;
}

/* file:// + no-WebGL fallback: CSS planet arc in the same framing */
.earth-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 208%;
  aspect-ratio: 1/1;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0.45;
  background: radial-gradient(
    circle at 50% 32%,
    #1c3a63 0%,
    #0d1d36 30%,
    #060b15 58%,
    #04070d 72%
  );
  box-shadow:
    0 -8px 90px rgba(90, 155, 255, 0.28),
    0 -2px 26px rgba(101, 242, 165, 0.08),
    inset 0 18px 60px rgba(90, 155, 255, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   BEYOND-ORBIT CINEMATIC MISSION CONTROL — REV 02 HYBRID
   Outer Wilds restraint + Alien CRT weight + Destiny Director order.
   UI-ONLY override: append-only, no IDs/classes renamed, no JS touched.
   Rule: viewport is the hero; chrome stays quiet until needed.
   ══════════════════════════════════════════════════════════════ */
:root {
  --gold: #d4ac63;
  --teal-calm: #5eead4;
  --ink-visor: #f2f5f1;
  --navy-director: #0e1a2b;
  --crt-green: #57ff73;
}

/* readable prose + balanced display (frontend-design: <80ch, no widows) */
.title-screen p.lede,
.briefdossier .bsub,
.lvcard .sub,
.obj .d,
.pi-desc {
  max-width: 68ch;
  text-wrap: pretty;
}

h1,
h2,
.sc-name,
#planetName {
  text-wrap: balance;
}

/* numbers stay tabular; labels keep NASA tracked-caps vernacular (brief wins) */
.num,
.rail .vl,
.readout .v,
.gauges .v,
.clock-hud .big {
  font-variant-numeric: tabular-nums;
}

/* touch + safe-area + scroll hygiene (web-interface-guidelines) */
button,
.btn,
.tb-btn,
.rail,
.lvcard,
.part,
.lv,
.choice {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(101, 242, 165, 0.18);
}

#topbar {
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}

#hud {
  padding-bottom: env(safe-area-inset-bottom);
}

#modal,
.ops-hud-left,
.ops-hud-right,
.ops-minimap,
.planet-info-content {
  overscroll-behavior: contain;
}

#screen {
  overscroll-behavior-y: auto;
}

/* ── Director topbar: quiet steps, one current, gold done ── */
#topbar {
  height: 48px;
}

.step {
  opacity: 0.72;
}

.step.on {
  opacity: 1;
  color: var(--ink-visor);
  border-color: rgba(242, 245, 241, 0.55);
  background: rgba(242, 245, 241, 0.07);
}

.step.done {
  opacity: 0.9;
}

.step.done::after {
  content: "✓";
  color: var(--gold);
  beyond-orbit-left: 6px;
  font-size: 9px;
}

/* ── Rails: single-encode, nominal stays silent ── */
.rail {
  min-height: 56px;
}

.rail .mg {
  display: none;
}

.rail.caution .mg,
.rail.over .mg {
  display: inline;
  color: inherit;
}

.rail.caution .sig,
.rail.over .sig {
  display: inline;
}

.rail .sig {
  display: none;
}

.bar {
  height: 2px;
}

.rail.caution .bar::after {
  animation: none;
}

.rail.caution .mg {
  color: var(--amber);
}

.rail .vl small {
  opacity: 0.75;
}

/* ── Panels: flat for density, glass only on overlays ── */
.panel::before {
  opacity: 0;
}

.panel.glass,
.planet-info-content {
  background: linear-gradient(
    180deg,
    rgba(14, 26, 43, 0.92),
    rgba(6, 12, 21, 0.9)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.panel > h3 {
  letter-spacing: 0.18em;
}

/* ── Buttons: 44px targets, hover raises contrast, focus always visible ── */
.btn,
.tb-btn,
.cam-btn,
.hud-toggle-btn,
.minimap-action-btn,
.sysbtn {
  min-height: 36px;
}

.btn {
  min-height: 44px;
}

.btn:hover,
.tb-btn:hover,
.cam-btn:hover,
.hud-toggle-btn:hover,
.minimap-action-btn:hover,
.sysbtn:hover {
  filter: brightness(1.18);
}

.btn:disabled {
  opacity: 0.35;
}

button:focus-visible,
.btn:focus-visible,
.tb-btn:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--teal-calm);
  outline-offset: 2px;
}

/* ── Mission cards: glint sweep, gold grade, clamp long text ── */
.lvcard .top {
  min-width: 0;
}

.lvcard h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lvcard .sub,
.lvcard .new {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lvcard {
  position: relative;
}

.lvcard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-12%);
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(242, 245, 241, 0.09) 50%,
    transparent 60%
  );
  transition:
    opacity 0.18s ease,
    transform 0.45s ease;
}

.lvcard:hover::after {
  opacity: 1;
  transform: translateX(12%);
}

.lvcard .grade {
  color: var(--gold);
}

/* ── Aerospace Modal Design System v2 (Obsidian Dark-Glass overrides) ── */
.mbox {
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 14, 0.94) 0%,
    rgba(2, 3, 5, 0.98) 100%
  ) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.92),
    0 12px 36px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.mbox::after {
  display: none !important;
}

/* ── NASA hardware provenance dossier ── */
.prov-head {
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--hairline);
}

.prov-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.prov-badge {
  border-color: var(--nasa-blue);
  color: var(--blue-lift);
  padding: 2px 7px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.prov-title {
  beyond-orbit: 8px 0 3px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prov-sub {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--phosphor);
}

/* ── Judge / demo quick jump ── */
.quickjump-intro {
  beyond-orbit: 0 0 16px;
  color: var(--bone);
  font-size: 12.5px;
  line-height: 1.55;
}

.quickjump-label {
  beyond-orbit: 0 0 7px;
}

.quickjump-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  beyond-orbit: 0 0 16px;
}

.quickjump-grid .btn {
  width: 100%;
  min-width: 0;
  padding: 9px 4px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-align: center;
}

@media (max-width: 520px) {
  .quickjump-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .quickjump-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Mission-select preload ── */
.sel-preload {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at 50% 45%,
    rgba(9, 14, 22, 0.96),
    rgba(2, 3, 5, 0.985) 70%
  );
  transition: opacity 0.28s ease;
}

.sel-preload.done {
  opacity: 0;
  pointer-events: none;
}

.sel-preload-card {
  width: min(380px, 78vw);
  text-align: center;
}

.sel-preload-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  beyond-orbit-bottom: 8px;
}

.sel-preload-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  beyond-orbit-bottom: 14px;
}

.sel-preload-bar {
  display: block;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.sel-preload-bar i {
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  animation: selPreload 1.15s ease-in-out infinite;
}

.sel-preload-note {
  display: block;
  beyond-orbit-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

@keyframes selPreload {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(360%);
  }
}

#modal.on .mbox {
  animation: min 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.mbox h3 {
  color: var(--warn, #edb04e);
}

/* ── Ops: viewport first, drawers quiet until hover/focus ── */
.ops-hud-left,
.ops-hud-right {
  width: 300px;
}

.ops-minimap {
  width: 280px;
}

@media (min-width: 1081px) {
  .ops-hud-left,
  .ops-hud-right {
    opacity: 0.75;
    transition:
      opacity 0.25s ease,
      transform 0.28s var(--ease);
  }

  .ops-hud-left:hover,
  .ops-hud-left:focus-within,
  .ops-hud-right:hover,
  .ops-hud-right:focus-within {
    opacity: 1;
  }
}

.ops-viewport.hud-hidden .ops-minimap,
.ops-viewport.hud-hidden .rover-status-strip,
.ops-viewport.hud-hidden .ops-hud-top > *:not(.hud-toggle-btn) {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(16px);
}

/* ── Orrery nav: dim cluster until needed, scrim for legibility ── */
.orrery-nav-bar {
  opacity: 0.88;
  transition: opacity 0.18s ease;
  background: rgba(6, 10, 18, 0.75);
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.orrery-nav-bar:hover,
.orrery-nav-bar:focus-within {
  opacity: 1;
}

.planet-select-dropdown,
.orrery-toggle-btn,
.orrery-fullsys-btn,
.orrery-fs-btn {
  font-size: 10px;
  border-radius: 999px !important;
}

select.planet-select-dropdown {
  background-color: #060d1a;
  color: #d5e5f5;
}

/* ── Cascade + ticker: smaller, capped, pausable ── */
#cascade {
  bottom: calc(120px + env(safe-area-inset-bottom));
  align-items: center;
}

.casc {
  max-width: min(420px, 90vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#telem .run {
  animation-duration: 90s;
  opacity: 0.8;
}

#telem:hover .run {
  animation-play-state: paused;
}

/* ── Report: gold achievement, one primary CTA ── */
.gradebox .g {
  color: var(--ink-visor);
}

.badge {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Select stage: sticky viewer respects focus ── */
.selview {
  scroll-beyond-orbit-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .lvcard::after,
  #telem .run,
  .underscore i,
  .dot {
    animation: none !important;
    transition: none !important;
  }

  #modal.on .mbox {
    animation: none;
  }
}

/* ── Ground launch phase: full-screen Saturn V ascent overlay ── */
#launchOverlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #04070d;
  display: flex;
  flex-direction: column;
  animation: launchOverlayFadeIn 0.3s ease forwards;
}

@keyframes launchOverlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.launch3d-head {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ds-line);
}

.launch3d-head .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ds-nominal);
}

.launch3d-head .hint {
  font-size: 11.5px;
  color: var(--ds-text-2);
}

.launch3d-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.launch3d-mount {
  position: absolute;
  inset: 0;
}

.launch3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.launch-hud {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  min-width: min(400px, 86vw);
  background: rgba(6, 12, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  padding: 10px 14px;
  font-family: var(--mono);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  pointer-events: auto;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.launch-hud:hover {
  background: rgba(6, 12, 22, 0.78);
  border-color: rgba(94, 180, 255, 0.25);
}

.launch-hud .lh-top {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.launch-hud .lh-t {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-visor, #5eb4ff);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.launch-hud .lh-header {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.launch-hud .lh-phase-block {
  flex: 1;
  min-width: 0;
}

.launch-hud .lh-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ds-nominal, #40e090);
  text-transform: uppercase;
}

.launch-hud .lh-sub {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ds-text-2, #8ca0b8);
  beyond-orbit-top: 2px;
}

.launch-hud .lh-subhead {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--ds-text-3, #6a7d94);
  beyond-orbit-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.launch-hud .lh-stages-bar {
  display: flex;
  gap: 6px;
  beyond-orbit: 4px 0 8px;
  padding: 2px 0;
}

.launch-hud .lh-stage-badge {
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 5px;
  letter-spacing: 0.09em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.launch-hud .badge-dot {
  font-size: 7px;
  opacity: 0.5;
}

.launch-hud .lh-stage-badge.badge-on {
  background: rgba(64, 224, 144, 0.18);
  color: #5affb0;
  border-color: rgba(64, 224, 144, 0.5);
  box-shadow: 0 0 8px rgba(64, 224, 144, 0.25);
}

.launch-hud .lh-stage-badge.badge-on .badge-dot {
  color: #40e090;
  opacity: 1;
}

.launch-hud .lh-milestones-track {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 5px 8px;
  border-radius: 6px;
  beyond-orbit-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.launch-hud .lh-ms-item {
  flex: 1;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  padding: 2px 0;
  color: var(--ds-text-3, #6a7d94);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.launch-hud .lh-ms-item.passed {
  color: #5eb4ff;
  font-weight: 700;
  background: rgba(94, 180, 255, 0.12);
  border-bottom: 2px solid #5eb4ff;
}

.launch-hud .lh-tele-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: 8px;
  beyond-orbit: 6px 0;
}

.launch-hud .lh-tele-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.launch-hud .lh-tele-cell .lh-label {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--ds-text-3, #6a7d94);
}

.launch-hud .lh-tele-cell b {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.launch-hud .lh-tele {
  display: flex;
  gap: 16px;
  beyond-orbit-top: 6px;
  font-size: 11px;
  color: var(--ds-text-2);
}

.launch-hud .lh-tele b {
  color: var(--ds-text);
  font-variant-numeric: tabular-nums;
}

.launch-hud .lh-note {
  beyond-orbit-top: 6px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--ds-text-3);
  max-width: 64ch;
}

.launch-hud .lh-ctrl-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  beyond-orbit-top: 8px;
}

.launch-hud .lh-speed-bar {
  display: flex;
  gap: 3px;
  align-items: center;
}

.launch-hud .lh-speed-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ds-text-3);
  beyond-orbit-right: 2px;
}

.launch-hud .lh-spd-btn {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ds-text-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
}

.launch-hud .lh-spd-btn.on {
  background: rgba(64, 224, 144, 0.2);
  color: #40e090;
  border-color: rgba(64, 224, 144, 0.5);
}

.launch-hud .lh-skip {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  font-size: 9.5px;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid rgba(94, 180, 255, 0.28);
  color: var(--ds-text, #e6edf5);
  background: linear-gradient(
    135deg,
    rgba(20, 40, 70, 0.45),
    rgba(10, 22, 40, 0.65)
  );
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.launch-hud .lh-skip:hover {
  background: linear-gradient(
    135deg,
    rgba(35, 65, 110, 0.75),
    rgba(20, 38, 68, 0.85)
  );
  color: #ffffff;
  border-color: rgba(94, 180, 255, 0.65);
  box-shadow:
    0 0 14px rgba(94, 180, 255, 0.32),
    0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.launch-hud .lh-skip:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Phase-adaptive HUD during powered descent */
.ops-viewport.in-descent .ops-hud-right {
  display: none !important;
}

.ops-viewport.in-descent .ops-hud-left .hud-card {
  border-color: rgba(255, 176, 0, 0.4);
  box-shadow: 0 0 16px rgba(255, 176, 0, 0.1);
}

/* .hud-card unified in main HUD section */

/* Phase-4 descent illusion overlay (DOM over the live scene; ?no3d-safe) */
.dz-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.dz-tape {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  padding: 8px 18px;
  background: rgba(4, 6, 12, 0.92);
  border: 1px solid rgba(255, 176, 0, 0.5);
  border-radius: 4px;
  font-family: var(--mono);
  backdrop-filter: blur(8px);
  z-index: 42;
}

.dz-tape .dz-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dz-tape span {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.dz-tape b {
  font-size: 16px;
  color: var(--amber);
}

.dz-glow {
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: 120vmin;
  height: 60vmin;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(255, 150, 60, 0.55),
    rgba(255, 120, 40, 0.18) 55%,
    transparent 75%
  );
  opacity: 0;
  pointer-events: none;
}

.dz-dust {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 110%,
    rgba(180, 175, 165, 0.6),
    rgba(140, 135, 125, 0.25) 50%,
    transparent 80%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s linear;
}

.dz-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 45;
  pointer-events: auto;
}

.dz-divert-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--amber);
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.45);
  border-radius: 3px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dz-divert-btn:hover {
  background: rgba(255, 176, 0, 0.22);
  border-color: var(--amber);
  color: #fff;
}

.dz-divert-btn.diverted {
  background: rgba(64, 224, 144, 0.2);
  border-color: #40e090;
  color: #40e090;
}

.dz-skip {
  pointer-events: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--bone);
  background: rgba(4, 6, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dz-skip:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.ops-viewport.dz-shake #ops3d-mount {
  animation: dzshake 0.18s linear infinite;
}

@keyframes dzshake {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(
      calc(var(--dzAmp, 1) * 2px),
      calc(var(--dzAmp, 1) * -1px)
    );
  }

  50% {
    transform: translate(
      calc(var(--dzAmp, 1) * -2px),
      calc(var(--dzAmp, 1) * 1px)
    );
  }

  75% {
    transform: translate(
      calc(var(--dzAmp, 1) * 1px),
      calc(var(--dzAmp, 1) * 2px)
    );
  }

  100% {
    transform: translate(0, 0);
  }
}

/* ── title: transparent chrome + cinematic hero (UI-only, title screen only) ── */
body.title-active #app {
  position: relative;
}

body.title-active #topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.title-active #topbar::after {
  display: none;
}

body.title-active #topbar .mark {
  display: none;
}

body.title-active #steps {
  visibility: hidden;
}

body.title-active .tb-btn {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 36px;
  color: rgba(231, 236, 242, 0.72);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

body.title-active .tb-btn:hover {
  color: #fff;
  background: transparent;
  border: 0;
  filter: none;
}

.title-screen.cinematic {
  min-height: 100%;
  padding: 64px 20px 40px;
  align-content: center;
}

.title-screen.cinematic .title-copy {
  max-width: 760px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}

/* all-caps display has no descenders: tighten the built-in leading so the tagline sits close */
.title-screen.cinematic .mark-lg {
  line-height: 1;
}

.title-screen.cinematic .tagline {
  beyond-orbit-top: 8px;
}

/* difference blend on the tagline: light over dark space, dark over bright clouds */
.title-screen.cinematic .tagline {
  color: #c3ccd6;
  mix-blend-mode: difference;
}

.title-screen.cinematic .modes {
  beyond-orbit-top: 26px;
}

.title-screen.cinematic .title-foot {
  beyond-orbit-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.title-screen.cinematic .tlink {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}

.title-screen.cinematic .tlink:hover {
  color: var(--bone);
  border-bottom-color: var(--dimmer);
}

.title-screen.cinematic .tsep {
  color: var(--dimmer);
  opacity: 0.6;
}

.title-screen.cinematic .dsn-mini {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  opacity: 0.85;
}

.title-screen.cinematic .proto {
  beyond-orbit-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--dimmer);
  opacity: 0.75;
}

/* title-only topbar links: hidden on every other screen */
#topbar .title-only {
  display: none;
}

body.title-active #topbar .title-only {
  display: inline-block;
}

/* single hero CTA: centered, cinematic */
.title-screen.cinematic .modes.hero {
  display: flex;
  justify-content: center;
  beyond-orbit-top: 20px;
}

.title-screen.cinematic .hero-start {
  padding: 14px 44px;
  font-size: 13px;
  letter-spacing: 0.22em;
}

/* hero CTA: brand green on a dark fill over the scrim — readable on any pass */
.title-screen.cinematic .hero-start {
  color: var(--phosphor);
  border-color: rgba(101, 242, 165, 0.75);
  background: rgba(3, 8, 14, 0.55);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.title-screen.cinematic .hero-start:hover {
  background: rgba(101, 242, 165, 0.14);
  color: var(--phosphor);
}

@media (max-width: 640px) {
  body.title-active #topbar {
    gap: 8px;
  }

  body.title-active .tb-btn {
    padding: 5px 4px;
    font-size: 9px;
  }
}

/* ── select: fullscreen solar-system stage + floating UI (no blocking panels) ── */
body.select-active #screen {
  overflow: hidden;
}

/* same chrome treatment as the title: transparent overlay bar, text-only buttons */
body.select-active #app {
  position: relative;
}

body.select-active #topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-left: max(3%, env(safe-area-inset-left));
  padding-right: max(3%, env(safe-area-inset-right));
}

body.select-active #topbar::after {
  display: none;
}

body.select-active #steps {
  visibility: hidden;
}

body.select-active .tb-btn {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 36px;
  color: rgba(231, 236, 242, 0.72);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

body.select-active .tb-btn:hover {
  color: #fff;
  background: transparent;
  border: 0;
  filter: none;
}

body.select-active #topbar .title-only {
  display: inline-block;
}

#topbar .select-only {
  display: none;
}

body.select-active #topbar .select-only {
  display: inline-block;
}

/* full-system mode: mission UI clears; exit paths stay (planet card RETURN,
   nav RETURN, Escape). Class is owned by select-viewer (toggle/stop). */
body.select-active.sysview .sel-bottom {
  display: none !important;
}

body.select-active.sysview .sel-title,
body.select-active.sysview .sel-tools {
  display: none !important;
}

body.select-active.sysview .selcap-chip,
body.sysview .selcap-chip {
  display: none !important;
}

body.select-active.sysview .selcap-chip-stale {
  display: none !important;
}

.sel-full .planet-info-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(91, 164, 255, 0.6),
    transparent
  );
}

.sel-full .planet-info-content .close-btn {
  top: 16px;
  right: 18px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  line-height: 1;
  transition: color 0.15s ease;
}

.sel-full .planet-info-content .close-btn:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.planet-info .pi-actions,
.sel-full .planet-info .pi-actions {
  beyond-orbit-top: 14px;
}

.planet-info .sysbtn,
.sel-full .planet-info .sysbtn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 16px;
  min-height: 0;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.15s ease;
  display: block;
  text-align: center;
}

.planet-info .sysbtn:hover,
.sel-full .planet-info .sysbtn:hover {
  border-color: var(--sel-blue);
  color: #fff;
  background: rgba(91, 164, 255, 0.18);
  box-shadow: 0 0 14px rgba(91, 164, 255, 0.25);
  filter: none;
}

.sel-full .planet-select-dropdown,
.sel-full .cbs-trigger {
  background: rgba(4, 9, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  border-radius: 999px !important;
}

.sel-full .cbs-trigger:hover,
.sel-full .cbs-wrap.open .cbs-trigger {
  background: rgba(12, 24, 44, 0.95);
  border-color: var(--sel-blue);
  color: #fff;
}

.sel-full .orrery-toggle-btn,
.sel-full .orrery-fullsys-btn,
.sel-full .orrery-fs-btn {
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  color: rgba(231, 236, 242, 0.72);
}

.sel-full .orrery-toggle-btn:hover,
.sel-full .orrery-fullsys-btn:hover,
.sel-full .orrery-fs-btn:hover {
  color: #fff !important;
}

/* floating header: text floats over the system, only controls take clicks */
.sel-top {
  position: absolute;
  top: 58px;
  left: 3%;
  right: 3%;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.sel-top .tape,
.sel-top .orrery-nav-bar {
  pointer-events: auto;
}

#selcontrols {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.sel-top .orrery-nav-bar,
#selcontrols .orrery-nav-bar {
  position: static !important;
  top: auto !important;
  right: auto !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  beyond-orbit: 0 !important;
  pointer-events: auto !important;
}

.sel-title h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text-1);
  beyond-orbit: 0;
}

.sel-title .hint {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: -0.005em;
  color: var(--text-2);
  beyond-orbit-top: 4px;
  line-height: 1.4;
}

/* stacked header rows: 5-button orrery row top, 3-button mode tools row below */
.sel-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

#selcontrols {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
}

.sel-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  pointer-events: auto;
}

/* fixed height (border-box): tape can never delevel */
.sel-tools .tape {
  height: 32px;
}

/* mock pill: mint mode tag */
.sel-tools .tape {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: none;
  border: 1px solid rgba(95, 207, 155, 0.35);
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ok);
  padding: 5px 14px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 500;
  box-shadow: 0 0 14px rgba(95, 207, 155, 0.12);
}

.sel-tools button.btn {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 18, 32, 0.45);
  color: rgba(255, 255, 255, 0.6);
  min-height: 0;
  height: 26px;
  display: inline-flex;
  align-items: center;
}

.sel-tools button.btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
}

.sel-tools .tape::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sel-mint);
  box-shadow: 0 0 6px var(--sel-mint);
}

/* bottom stack: timeline label + filmstrip (dossier lives under the header) */
.sel-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* The floating bars are pointer-events:none so drags and scrolls reach the
   orrery behind them; every real control inside them must opt back in
   (same pattern as .sel-top .tape / .strip-wrap). Without this, HISTORY
   (.sel-tools) and RESUME LAST DESIGN (.sel-bottom) render but never take a
   click — the hit test falls through to the viewer behind the bar. */
.sel-top .btn,
.sel-bottom .btn {
  pointer-events: auto;
}

/* destination dossier: tucked under the header (never mid-screen),
   free height on tall viewports, capped only to protect the strip below */
.selcap-chip {
  position: absolute;
  left: 3%;
  top: 136px;
  z-index: 10;
  beyond-orbit: 0;
  overflow: hidden;
  width: min(340px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  background:
    radial-gradient(
        circle 750px at var(--sun-pos-x, 100%) var(--sun-pos-y, 50%),
        rgba(28, 46, 78, calc(0.28 * var(--sun-intensity, 0.75) + 0.18)) 0%,
        rgba(14, 24, 40, 0.72) 45%,
        rgba(8, 14, 24, 0.88) 90%
      )
      padding-box,
    radial-gradient(
        circle 600px at var(--sun-pos-x, 100%) var(--sun-pos-y, 50%),
        rgba(215, 235, 255, calc(0.42 * var(--sun-intensity, 0.75) + 0.18)) 0%,
        rgba(115, 175, 255, calc(0.3 * var(--sun-intensity, 0.75) + 0.12)) 30%,
        rgba(91, 155, 255, 0.12) 60%,
        rgba(255, 255, 255, 0.06) 100%
      )
      border-box;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    calc(var(--sun-dx, -0.7) * -18px) calc(var(--sun-dy, 0.7) * 18px) 48px
      rgba(0, 0, 0, 0.6),
    0 12px 32px rgba(0, 0, 0, 0.4),
    calc(var(--sun-dx, -0.7) * 8px) calc(var(--sun-dy, 0.7) * -8px) 36px
      rgba(91, 155, 255, calc(0.12 * var(--sun-intensity, 0.75)));
}

.selcap-chip .sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.selcap-chip .sc-dest {
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.selcap-chip .sc-target-badge {
  font-family: var(--font-data);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(91, 155, 255, 0.3);
  color: var(--accent);
  background: rgba(91, 155, 255, 0.1);
}

.selcap-chip .sc-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text-1);
  beyond-orbit-top: 4px;
}

.selcap-chip .sc-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  beyond-orbit-top: 3px;
}

.selcap-chip .sc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  beyond-orbit-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.selcap-chip .sc-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selcap-chip .sc-stat-item b {
  font-family: var(--font-data);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
}

.selcap-chip .sc-stat-item em {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 500;
  font-style: normal;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.selcap-chip .sc-debug {
  beyond-orbit-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-data);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
}

.selcap-chip .sc-debug summary {
  cursor: pointer;
  user-select: none;
  outline: none;
  letter-spacing: 0.08em;
}

.selcap-chip .sc-debug summary:hover {
  color: rgba(255, 255, 255, 0.6);
}

.selcap-chip .sc-debug-body {
  beyond-orbit-top: 4px;
  padding: 4px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}

.selcap-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle 480px at var(--sun-pos-x, 100%) var(--sun-pos-y, 50%),
    rgba(120, 180, 255, calc(0.12 * var(--sun-intensity, 0.75))) 0%,
    rgba(91, 164, 255, calc(0.06 * var(--sun-intensity, 0.75))) 40%,
    transparent 75%
  );
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: 0.6;
}

/* filmstrip header row (mock timeline label) */
.strip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 3%;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.strip-head i {
  flex: 1;
  max-width: 240px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

/* mission grid: all 6 cards fit the available width, 3% headroom each side */
.strip-wrap {
  position: relative;
  pointer-events: auto;
}

.strip-wrap::before,
.strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
}

.strip-wrap::before {
  width: 80px;
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(4, 7, 13, 0.92) 0%,
    rgba(4, 7, 13, 0.6) 45%,
    transparent 100%
  );
}

.strip-wrap::after {
  width: 80px;
  right: 0;
  background: linear-gradient(
    -90deg,
    rgba(4, 7, 13, 0.92) 0%,
    rgba(4, 7, 13, 0.6) 45%,
    transparent 100%
  );
}

.lvstrip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  gap: 24px;
  padding: 24px 38vw calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(4, 7, 13, 0.65) 40%,
    rgba(2, 4, 8, 0.9) 100%
  );
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scroll-behavior: auto;
  touch-action: pan-y;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.lvstrip.is-snapping {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.lvstrip.is-dragging {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  cursor: grabbing !important;
}

.lvstrip::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.sel-full .lvstrip .lvcard {
  flex: 0 0 256px;
  height: auto;
  scroll-snap-align: center;
  cursor: pointer;
}

.sel-full .lvcard {
  min-width: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    180deg,
    rgba(12, 17, 26, 0.7) 0%,
    rgba(6, 9, 15, 0.86) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: left;
  opacity: 0.35;
  transform: scale(0.8);
  transform-origin: center center;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s ease,
    box-shadow 0.32s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.sel-full .lvcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle 320px at 50% 0%,
    rgba(101, 242, 165, 0.08) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* ── Incremental Hierarchical Scale & Opacity Levels ── */
/* Nearest adjacent cards (1 step away from center) */
.sel-full .lvcard.pos-dist-1 {
  opacity: 0.65;
  transform: scale(0.92);
  z-index: 4;
  border-color: rgba(255, 255, 255, 0.11);
}

/* Cards 2 steps away from center */
.sel-full .lvcard.pos-dist-2 {
  opacity: 0.42;
  transform: scale(0.84);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.06);
}

/* Cards 3+ steps away */
.sel-full .lvcard.pos-dist-far {
  opacity: 0.25;
  transform: scale(0.76);
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.03);
}

.sel-full .lvcard:hover {
  opacity: 0.85;
  transform: scale(0.95);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    180deg,
    rgba(16, 23, 36, 0.85) 0%,
    rgba(8, 12, 20, 0.95) 100%
  );
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.sel-full .lvcard:hover::before {
  opacity: 0.5;
}

/* Center Active Selected Card */
.sel-full .lvcard.selviewing {
  opacity: 1 !important;
  transform: scale(1.1) translateY(-6px) !important;
  z-index: 10;
  border-color: rgba(101, 242, 165, 0.55);
  border-top-color: rgba(101, 242, 165, 0.85);
  background: linear-gradient(
    180deg,
    rgba(18, 28, 42, 0.94) 0%,
    rgba(8, 14, 22, 0.98) 100%
  );
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.88),
    0 0 36px rgba(101, 242, 165, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 20px rgba(101, 242, 165, 0.08);
}

.sel-full .lvcard.selviewing::before {
  opacity: 0.9;
  filter: blur(14px);
  background: radial-gradient(
    circle 360px at 50% 0%,
    rgba(101, 242, 165, 0.2) 0%,
    transparent 70%
  );
}

.sel-full .lvcard .top {
  padding: 12px 14px 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.sel-full .lvcard .krow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}

.sel-full .lvcard .num {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.38);
  font-variant-numeric: tabular-nums;
}

.selviewing .num,
.sel-full .lvcard.selviewing .num {
  color: var(--accent);
}

.sel-full .lvcard .destpill {
  font-family: var(--font-data);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 2px 8px;
}

.sel-full .lvcard.selviewing .destpill {
  border-color: rgba(91, 164, 255, 0.4);
  background: rgba(91, 164, 255, 0.15);
  color: var(--accent);
}

.sel-full .lvcard h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  beyond-orbit: 6px 0 0;
  color: var(--text-1);
  overflow: visible;
  white-space: normal;
  flex-shrink: 0;
}

.sel-full .lvcard:hover h3,
.sel-full .lvcard.selviewing h3 {
  color: #fff;
}

.sel-full .lvcard .sub {
  beyond-orbit-top: 3px;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.32;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.sel-full .lvcard:hover .sub {
  color: rgba(255, 255, 255, 0.75);
}

.sel-full .lvcard .newpill {
  beyond-orbit-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  max-width: 100%;
  border: 1px solid rgba(95, 207, 155, 0.22);
  background: var(--ok-dim);
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ok);
  flex-shrink: 0;
}

.sel-full .lvcard .newpill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}

.sel-full .lvcard .newpill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  display: block;
  line-height: 1.25;
}

.sel-full .lvcard .bot {
  beyond-orbit-top: auto;
  padding: 8px 14px 10px;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sel-full .lvcard .brow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sel-full .lvcard .env {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sel-full .lvcard .bot .spec {
  font-family: var(--font-data);
  color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sel-full .lvcard:hover .bot .spec {
  color: rgba(255, 255, 255, 0.5);
}

.sel-full .lvcard .grade {
  position: static;
  beyond-orbit-left: auto;
  color: var(--gold);
  font-size: 15px;
}

.sel-full .lvcard .go {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sel-full .lvcard .go b {
  font-weight: 400;
  transition: transform 0.15s var(--ease);
}

.sel-full .lvcard:hover .go {
  color: rgba(255, 255, 255, 0.8);
}

.sel-full .lvcard:hover .go b,
.sel-full .lvcard.selviewing .go b {
  transform: translateX(2px);
}

.sel-full .lvcard.selviewing .go {
  color: #fff;
}

@media (max-width: 640px) {
  body.select-active .tb-btn {
    padding: 5px 4px;
    font-size: 9px;
  }

  body.select-active #topbar .title-only {
    display: none;
  }

  .sel-title h2 {
    font-size: 19px;
  }

  .sel-title .hint {
    display: none;
  }

  .sel-controls {
    justify-content: flex-start;
    gap: 10px;
  }

  .selcap-chip {
    padding: 16px;
    top: 150px;
  }

  body.select-active.sysview .selcap-chip {
    display: none !important;
  }

  .sel-full .planet-info {
    left: 3%;
    right: 3%;
    top: auto;
    bottom: 36%;
    transform: none;
    max-width: none;
  }

  body.select-active.sysview .sel-full .planet-info {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 3%;
    right: 3%;
  }

  .strip-head {
    padding: 0 3%;
  }

  .sel-full .lvstrip .lvcard {
    flex-basis: 212px;
    height: auto;
    min-height: 208px;
  }

  .sel-tools .tape {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   MISSION COCKPIT — brief / build / launch.
   Unified aerospace stage layout: transparent chrome, frosted glass panels,
   balanced grid distributions, zero outer-page scroll, internal column scrolling.
   Optimized for F11 fullscreen mode and widescreen displays.
   ══════════════════════════════════════════════════════════════ */
body.brief-active #screen,
body.build-active #screen,
body.launch-active #screen {
  overflow: hidden;
}

body.brief-active #app,
body.build-active #app,
body.launch-active #app {
  position: relative;
}

body.brief-active #topbar,
body.build-active #topbar,
body.launch-active #topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 48px;
  background: linear-gradient(
    180deg,
    rgba(5, 9, 16, 0.96) 0%,
    rgba(5, 9, 16, 0.88) 75%,
    transparent 100%
  ) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: none;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  padding-left: max(2.5%, env(safe-area-inset-left));
  padding-right: max(2.5%, env(safe-area-inset-right));
}

body.brief-active #topbar::after,
body.build-active #topbar::after,
body.launch-active #topbar::after {
  display: none;
}

body.brief-active .tb-btn,
body.build-active .tb-btn,
body.launch-active .tb-btn {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 36px;
  color: rgba(231, 236, 242, 0.75);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

body.brief-active .tb-btn:hover,
body.build-active .tb-btn:hover,
body.launch-active .tb-btn:hover {
  color: #fff;
  background: transparent;
  border: 0;
  filter: none;
}

/* cockpit shell: full-height flex, clears the floating bar, full-bleed */
body.brief-active .wrap,
body.build-active .wrap,
body.launch-active .wrap {
  height: 100%;
  max-width: none;
  padding: 52px 2.5% 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
  gap: 12px;
}

/* panels → sleek aerospace glass */
body.brief-active .panel,
body.build-active .panel,
body.launch-active .panel {
  border-radius: 12px;
  border: 1px solid rgba(75, 130, 215, 0.22);
  background: linear-gradient(
    180deg,
    rgba(11, 20, 35, 0.84),
    rgba(6, 12, 22, 0.88)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(160, 200, 255, 0.07),
    0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Launch is a full-frame operations console; the layout columns provide the
   structure, so the large outer cards should not sit as opaque slabs behind it. */
body.launch-active .launchgrid > .panel,
body.launch-active .launchgrid > .launch-col > .panel {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

body.launch-active .launchgrid > .launch-col > .panel::before,
body.launch-active .launchgrid > .launch-col > .panel::after {
  display: none;
}

body.brief-active .panel.glass {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.brief-active .bracket,
body.build-active .bracket,
body.launch-active .bracket {
  display: none;
}

/* Sharp aerospace button geometry (replaces pill capsules) */
body.brief-active .btn,
body.build-active .btn,
body.launch-active .btn {
  border-radius: 3px !important;
}

body.brief-active .spd button,
body.build-active .spd button,
body.launch-active .spd button {
  border-radius: 999px;
}

/* build tabs header */
.build-tabs {
  border-radius: 10px;
  flex: 0 0 auto;
}

.build-tabs .pad {
  padding: 8px 14px;
}

/* ── BRIEFING ── */
body.brief-active .briefdossier {
  padding: 2px 4px 6px;
  flex: 0 0 auto;
}

body.brief-active .briefdossier h1 {
  font-size: clamp(24px, 3.2vw, 36px);
}

body.brief-active .briefdossier .bstats {
  beyond-orbit-top: 6px;
}

body.brief-active .brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

body.brief-active .brief > .brief-col {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.brief-active .brief > .brief-col::-webkit-scrollbar {
  width: 6px;
}

body.brief-active .brief > .brief-col::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

body.brief-active .briefwrap .objlist {
  overflow: visible;
  max-height: none;
}

body.brief-active .panel-foot {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(
    180deg,
    rgba(11, 20, 35, 0.6),
    rgba(6, 12, 22, 0.85)
  );
  border-radius: 0 0 12px 12px;
}

/* ── BUILD BAY (PAYLOAD, SYSTEMS, REVIEW) ── */
/* Payload step: 2-column balanced integration facility */
.bay-payload {
  display: grid;
  grid-template-columns: minmax(380px, 460px) 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

.bay-payload .bay-cat-col {
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}

.bay-payload .bay-cat-col .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.bay-payload .bay-cat-col .cat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  max-height: none !important;
}

.bay-payload .bay-cat-col .cat::-webkit-scrollbar {
  width: 6px;
}

.bay-payload .bay-cat-col .cat::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.bay-payload .bay-preview-col {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bay-payload .bay-preview-col::-webkit-scrollbar {
  width: 6px;
}

.bay-payload .bay-preview-col::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.bay-payload #v3payload {
  width: 100% !important;
  height: 380px;
  min-height: 300px;
  aspect-ratio: auto !important;
  border-radius: 8px;
  overflow: hidden;
}

/* Systems step: 3-column symmetrical CAD workstation */
.bay-systems {
  display: grid;
  grid-template-columns: minmax(280px, 330px) 1fr minmax(280px, 330px);
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

.bay-systems > .bay-col {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bay-systems > .bay-col::-webkit-scrollbar {
  width: 6px;
}

.bay-systems > .bay-col::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.bay-systems .bay-center-col #v3systems {
  aspect-ratio: 16/9;
  min-height: 300px;
  max-height: 450px;
  border-radius: 8px;
  overflow: hidden;
}

/* Review step: 2-column Flight Readiness Review Console */
.revgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

.revgrid > .rev-col {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.revgrid > .rev-col::-webkit-scrollbar {
  width: 6px;
}

.revgrid > .rev-col::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

.revgrid #v3review {
  height: 240px;
  min-height: 180px;
  border-radius: 8px;
  overflow: hidden;
}

.revgrid .panel {
  beyond-orbit-top: 0 !important;
}

.revgrid .site-matrix-table {
  beyond-orbit-top: 4px;
  font-size: 11px;
}

.revgrid .site-matrix-table th {
  padding: 3px 6px;
  font-size: 10px;
}

.revgrid .site-matrix-table td {
  padding: 4px 6px;
}

.revgrid .pad {
  padding: 10px 14px !important;
}

.revgrid .model-asset-note {
  padding: 4px 10px;
  beyond-orbit-top: 4px;
}

/* Sticky action bars inside scrolling bay columns */
.bay-actions,
.rev-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  beyond-orbit-top: auto;
  padding: 10px 4px 6px;
  background: linear-gradient(180deg, transparent, rgba(6, 12, 22, 0.96) 35%);
}

/* ── LAUNCH CONSOLE ── */
.launchgrid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 0.85fr) minmax(280px, 1.3fr) minmax(
      330px,
      0.85fr
    );
  grid-template-areas: "ops . review";
  gap: 24px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  align-items: stretch;
}

.launch-ops-col {
  grid-area: ops;
  position: relative;
  z-index: 10;
  background: rgba(4, 8, 14, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.launch-model-col {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  beyond-orbit: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.launch-traj-col {
  grid-area: review;
  position: relative;
  z-index: 10;
  background: rgba(4, 8, 14, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.launchgrid > .launch-col {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.launchgrid > .launch-col::-webkit-scrollbar {
  width: 6px;
}

.launchgrid > .launch-col::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

/* Selected-vehicle 3D stage: full column height, model is the panel content */
.launch-model-col {
  overflow: hidden !important;
}

.launch-model-col .lv3-stage,
.launch-model-col .lv3host {
  pointer-events: auto;
}

/* No 3D layer (file://, ?no3d, no WebGL): collapse the stage so the decision
   columns keep their width. */
body.launch-active.lv3-off .launch-model-col {
  display: none;
}

body.launch-active.lv3-off .launchgrid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas: "ops review";
}

/* FRR panel: the review body scrolls, but the GO/NO-GO roll call and the
   commit stamp stay pinned inside the panel, so the decision controls are
   always reachable without scrolling the column. The floor keeps the panel
   from collapsing (and its pinned footer from being clipped) when a very
   short viewport cannot give it room; the column then scrolls as before. */
#goBox {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 296px;
}

/* the panels above the review keep their natural height; only the review
   shrinks, so its pinned footer is the only thing that ever gives way */
.launchgrid > .launch-col > .panel:not(#goBox) {
  flex: 0 0 auto;
}

/* The readiness console is content-sized; only the 3D stage should claim the
   full launch-row height. */
.launchgrid > .launch-traj-col {
  align-self: stretch;
  height: auto;
  max-height: 100%;
  overflow: visible;
}

.launchgrid > .launch-traj-col > #goBox {
  flex: 1 1 auto;
  height: 100% !important;
  align-self: stretch;
}

#goBox > .frr-pad {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 10px 6px;
}

/* Keep the readiness decision in one viewport: supporting economics share the
   top band, while the checks and roll call remain permanently visible. */
.frr-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-right: 1px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: space-between;
  gap: 14px 12px;
}

.frr-body > .frr-sec:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.frr-body > .frr-sec:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.frr-body > .frr-sec:nth-child(3) {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
}

.frr-body .frr-sec {
  gap: 6px;
}

.frr-body .frr-h {
  font-size: 8.5px;
}

.frr-body .frr-line {
  padding: 5px 0;
  font-size: 11px;
}

.frr-body .frr-line em {
  font-size: 10px;
}

.frr-body .frr-line .num {
  font-size: 11.5px;
}

.frr-body .frr-total {
  beyond-orbit-top: 6px;
  padding-top: 6px;
  gap: 5px;
}

.frr-body .frr-total .k {
  font-size: 8px;
}

.frr-body .frr-total .v {
  font-size: 20px;
}

.frr-body .frr-total .u {
  font-size: 9px;
}

.frr-body .frr-bars {
  grid-template-columns: 1fr;
  gap: 0;
}

.frr-body .frr-bars .budget-bar-wrap {
  padding: 7px 0;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.frr-body .budget-bar-head {
  align-items: baseline;
}

.frr-body .budget-bar-head em {
  display: block;
  beyond-orbit-left: 3px;
  font-style: normal;
  font-size: 8px;
  color: var(--dim);
  font-weight: 400;
}

.frr-body .budget-bar-track {
  height: 3px;
}

.frr-body .frr-checks {
  min-height: 0;
  gap: 3px;
}

.frr-body .frr-check {
  gap: 7px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.15;
}

.frr-body .frr-check .n {
  font-size: 9.5px;
}

.frr-body .hint {
  beyond-orbit: 2px 0 0 !important;
  font-size: 9px !important;
  line-height: 1.2;
}

.frr-body .frr-sec:nth-child(3) {
  align-self: stretch;
}

.frr-body .frr-sec:nth-child(3) .frr-checks {
  height: 100%;
}

.frr-body .frr-sec:nth-child(3) .frr-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  grid-template-areas: "t n g";
  align-items: center;
  flex: 1 1 0;
  min-height: 0;
  padding: 9px 13px;
  gap: 10px;
}

.frr-body .frr-sec:nth-child(3) .frr-check .g {
  grid-area: g;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(95, 207, 155, 0.42);
  border-radius: 2px;
  background: rgba(95, 207, 155, 0.08);
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.frr-body .frr-sec:nth-child(3) .frr-check .t {
  grid-area: t;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.25;
  text-align: left;
  color: var(--ds-text-2);
}

.frr-body .frr-sec:nth-child(3) .frr-check .n {
  grid-area: n;
  font-size: 10px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.frr-body::-webkit-scrollbar {
  width: 0;
}

.frr-foot {
  flex: 0 0 auto;
  beyond-orbit-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, transparent, rgba(6, 12, 22, 0.92) 38%);
}

.frr-foot .tr-head {
  beyond-orbit-bottom: 5px;
  font-size: 8.5px;
}

.frr-foot .tr-seats {
  gap: 5px;
}

.frr-foot .tr-seat {
  padding: 6px 7px;
  font-size: 9px;
}

.frr-foot .tr-seat b {
  font-size: 10px;
  beyond-orbit: 2px 0 0;
}

.frr-foot .team-roll .hint {
  font-size: 9px !important;
  beyond-orbit-top: 4px !important;
}

.frr-decision {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  beyond-orbit: 7px auto 0;
  padding: 6px 12px;
  max-width: 260px;
  border: 1px solid rgba(95, 207, 155, 0.4);
  border-radius: 4px;
  background: rgba(95, 207, 155, 0.08);
  color: var(--phosphor);
}

.frr-decision.nogo {
  border-color: rgba(238, 106, 85, 0.45);
  background: rgba(238, 106, 85, 0.08);
  color: var(--red);
}

.frr-decision-mark {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.frr-decision b {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.frr-decision small {
  display: block;
  beyond-orbit-top: 2px;
  color: var(--dim);
  font-size: 9px;
}

.frr-foot .team-roll {
  beyond-orbit-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Roll call - make it look like actual buttons */
.team-roll {
  beyond-orbit-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, transparent, rgba(6, 12, 22, 0.8) 45%);
}

.tr-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  text-transform: uppercase;
  beyond-orbit-bottom: 8px;
}

.tr-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.tr-seat {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "id name state";
  align-items: center;
  gap: 0 10px;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #34465c;
  background: #182536;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
  cursor: pointer;
  text-align: left;
}

.tr-seat:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

.tr-seat:active {
  transform: translateY(1px);
}

.tr-seat-id {
  grid-area: id;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--dim);
  white-space: nowrap;
}

.tr-seat-name {
  grid-area: name;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--bone);
  white-space: nowrap;
}

.tr-seat:hover {
  background: #22344a;
  border-color: #7893b3;
}

.tr-seat.go {
  border-color: #4d866f;
  background: #1a302b;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
}

.tr-seat.go .b {
  color: var(--seat);
}

.tr-seat b {
  grid-area: state;
  display: grid;
  place-items: center;
  min-width: 64px;
  padding: 7px 8px;
  border: 1px solid #c35b52;
  border-radius: 2px;
  background: #9d3f39;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #fff1ef;
  beyond-orbit: 0;
}

.tr-seat.go b {
  border-color: #5b967b;
  background: #32634f;
  color: #d9eee4;
}

.tr-seat span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.frr-stamp {
  text-align: center;
  beyond-orbit: 4px 0 2px;
}

.frr-stamp .stamp {
  font-size: 18px;
  border-width: 2px;
  padding: 2px 12px;
}

/* ── FRR card: sectioned, full-height review ─────────────────── */
.frr-body {
  justify-content: space-between;
}

.frr-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.frr-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.frr-h::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.frr-h b {
  color: var(--bone);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.frr-lines {
  display: flex;
  flex-direction: column;
}

.frr-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 0;
}

.frr-line > span:first-child {
  min-width: 0;
  color: var(--ds-text);
}

.frr-line em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--dim);
  beyond-orbit-left: 2px;
}

.frr-line .num {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  font-size: 13.5px;
}

.frr-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  beyond-orbit-top: 8px;
  padding-top: 8px;
  border-top: 0;
}

.frr-total .k {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.frr-total .v {
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vh, 26px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.frr-total .u {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.frr-util {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  beyond-orbit-top: 9px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.frr-util b {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--bone);
}

.frr-util-track {
  height: 3px;
  beyond-orbit-top: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: 2px;
}

.frr-util-track i {
  display: block;
  height: 100%;
  background: var(--amber);
  border-radius: inherit;
}

.frr-bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.frr-bars .budget-bar-wrap {
  padding: 7px 0;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.frr-checks {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
}

.frr-check {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px;
  background: var(--panel);
  font-size: 13px;
}

.frr-check .g {
  flex: 0 0 12px;
  font-family: var(--mono);
  text-align: center;
}

.frr-check .t {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ds-text);
}

.frr-check .n {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.frr-check.ok .g {
  color: var(--phosphor);
}

.frr-check.bad .g {
  color: var(--red);
}

.frr-check.bad .t {
  color: var(--red);
}

/* ── Trajectory context strip (ORBIT SELECTION / TLI) ────────── */
/* only the fleet list may give up height; the strips and the flight profile
   keep their natural size and the column scrolls if the (pork) plot is large */
.launch-ops-col > * {
  flex: 0 0 auto;
}

.launch-ops-col > .lv-list-panel {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 196px;
  overflow: hidden;
}

.lv-list-panel > #lvList {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  direction: rtl !important;
  padding-left: 4px !important;
  padding-right: 8px !important;
}

.lv-list-panel > #lvList > * {
  direction: ltr !important;
}

.lv-list-panel > #lvList::-webkit-scrollbar {
  width: 6px;
}

.lv-list-panel > #lvList::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.22);
  border-radius: 999px;
}

/* the trajectory block and the flight profile sit at the bottom of the left
   column; spare height goes to the fleet list, never between them */
.trj-block {
  beyond-orbit-top: auto;
  flex: 0 0 auto;
}

.trj-strip {
  flex: 0 0 auto;
}

.trj-strip .readout {
  grid-template-columns: repeat(var(--cells, 4), minmax(0, 1fr));
}

.trj-strip .readout > div {
  padding: 7px 10px;
}

.trj-strip .readout .k {
  font-size: 9px;
  letter-spacing: 0.13em;
}

.trj-strip .readout .v {
  font-size: 13.5px;
  beyond-orbit-top: 2px;
}

.trj-strip .readout .v .u {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.06em;
  beyond-orbit-left: 4px;
}

.panel .trj-cap {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--dim);
  padding: 8px 12px 10px;
  beyond-orbit: 0;
}

.panel .trj-cap b {
  color: var(--ds-text-2);
}

/* ── FLT-01: one milestone at a time, cross-faded ────────────── */
.launch-ops-col > #acc-milestones {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.launch-ops-col > #acc-milestones .accordion-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 0;
  padding-right: 0;
}

.launch-ops-col > #acc-milestones .accordion-content {
  padding-left: 0;
  padding-right: 0;
}

.launch-ops-col > #acc-milestones .accordion-header {
  padding: 6px 10px;
  font-size: 10px;
  line-height: 1.15;
}

.launch-ops-col > #acc-milestones .accordion-content {
  padding: 3px 8px;
}

.flight-profile-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  beyond-orbit: 0 0 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.flight-profile-rail i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-lift);
  box-shadow: 0 0 8px rgba(91, 155, 255, 0.8);
}

.flight-profile-rail span {
  flex: 1;
}

.flight-profile-rail b {
  font-weight: 500;
  color: var(--ds-text-2);
}

.flight-milestones.cyc {
  position: relative;
  height: 24px;
  display: block;
  beyond-orbit: 0;
  padding: 0;
  overflow: hidden;
}

.flight-milestones.cyc .f-ms {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 24px;
  box-sizing: border-box;
  opacity: 0;
  animation: fltcyc calc(var(--n, 4) * 3.4s) linear infinite;
  animation-delay: calc(var(--i, 0) * 3.4s);
}

.flight-milestones.cyc .f-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 10px;
}

.flight-milestones.cyc .f-time {
  font-size: 9px;
  color: var(--phosphor);
}

.flight-milestones.cyc .f-dot {
  box-shadow: 0 0 8px rgba(91, 155, 255, 0.75);
}

@keyframes fltcyc {
  0% {
    opacity: 0;
    transform: translateY(3px);
  }

  3% {
    opacity: 1;
    transform: none;
  }

  20% {
    opacity: 1;
    transform: none;
  }

  23% {
    opacity: 0;
    transform: translateY(-3px);
  }

  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flight-milestones.cyc {
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .flight-milestones.cyc .f-ms {
    position: static;
    height: auto;
    opacity: 1;
    animation: none;
    transform: none;
  }

  .flight-milestones.cyc .f-desc {
    white-space: normal;
    overflow: visible;
  }
}

.lv3-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  beyond-orbit: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  position: relative;
}

.lv3-panel > h3 {
  display: none;
}

.lv3-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  beyond-orbit: 0;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent !important;
}

.lv3-stage::after {
  display: none;
}

.lv3host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lv3host canvas.lv3canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.lv3-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.lv3-placeholder em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(140, 165, 195, 0.6);
}

.lv3-cap {
  position: absolute;
  left: calc(380px + 4vw);
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  font-family: var(--mono);
  z-index: 2;
}

.lv3-name {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--bone);
}

.lv3-sub {
  font-size: 9.5px;
  letter-spacing: 0.09em;
  color: rgba(150, 175, 205, 0.72);
}

.lv3-shot {
  beyond-orbit-top: 4px;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(120, 190, 255, 0.72);
  align-self: flex-start;
  padding: 2px 6px;
  border: 1px solid rgba(75, 130, 215, 0.26);
  border-radius: 2px;
  background: rgba(8, 20, 38, 0.55);
}

.lv3-shot:empty {
  display: none;
}

.lv3-foot {
  position: absolute;
  z-index: 2;
  bottom: 8px;
  left: 0;
  right: 0;
  beyond-orbit: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  line-height: 1.5;
  color: var(--dim);
  padding: 0 12px 10px;
  text-align: center;
  pointer-events: none;
}

/* COMMIT hand-off: the live preview expands to fill the viewport below the
   launch overlay (z 1200), which then covers it and takes over the scene. */
.lv3-takeover {
  position: fixed;
  z-index: 1190;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% 22%, #12233c, #04070d 68%);
  transition:
    left 0.78s cubic-bezier(0.22, 0.85, 0.2, 1),
    top 0.78s cubic-bezier(0.22, 0.85, 0.2, 1),
    width 0.78s cubic-bezier(0.22, 0.85, 0.2, 1),
    height 0.78s cubic-bezier(0.22, 0.85, 0.2, 1),
    border-radius 0.5s;
}

.lv3-takeover.on {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0;
}

.lv3-takeover .lv3-canvas-host,
.lv3-takeover canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.lv3-takeover .lv3-cap {
  top: 24px;
  bottom: auto;
  left: 26px;
  right: auto;
  align-items: flex-start;
}

.lv3-takeover .lv3-name {
  font-size: 13px;
  letter-spacing: 0.16em;
}

/* Flight milestones sequence */
.flight-milestones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  beyond-orbit-top: 6px;
  padding: 2px 0;
}

.f-ms {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.015);
  border-left: 2px solid rgba(75, 130, 215, 0.35);
  transition:
    background 0.14s,
    border-left-color 0.14s;
}

.f-ms:hover {
  background: rgba(75, 130, 215, 0.08);
  border-left-color: var(--ds-blue-hi);
}

.f-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ds-nominal);
  min-width: 68px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.f-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-blue-hi);
  box-shadow: 0 0 6px rgba(75, 130, 215, 0.6);
  flex-shrink: 0;
}

.f-desc {
  color: var(--ds-text);
  font-size: 12px;
  line-height: 1.4;
}

.f-desc b {
  color: var(--bone);
  letter-spacing: 0.04em;
}

/* High-density parts cards */
.bay-payload .part {
  padding: 10px 12px;
  beyond-orbit-bottom: 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(8, 16, 28, 0.6);
  transition:
    background 0.13s,
    border-color 0.13s;
}

.bay-payload .part:hover {
  background: rgba(14, 28, 48, 0.8);
  border-color: rgba(91, 164, 255, 0.3);
}

.bay-payload .part.on {
  background: rgba(11, 61, 145, 0.25);
  border-color: rgba(101, 242, 165, 0.4);
  box-shadow: inset 3px 0 0 var(--ds-nominal);
}

.bay-payload .part .ps span {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Responsive fallback: narrow screens keep natural single column and scroll */
@media (max-width: 1080px) {
  body.brief-active #screen,
  body.build-active #screen,
  body.launch-active #screen {
    overflow: auto;
  }

  body.brief-active .wrap,
  body.build-active .wrap,
  body.launch-active .wrap {
    height: auto;
    min-height: 100%;
    padding: 60px 14px 20px;
  }

  .brief,
  .bay-payload,
  .bay-systems,
  .revgrid,
  .launchgrid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .brief > .brief-col,
  .bay-payload > .bay-col,
  .bay-systems > .bay-col,
  .revgrid > .rev-col,
  .launchgrid > .launch-col {
    overflow: visible !important;
    max-height: none !important;
  }

  .launchgrid > .launch-model-col {
    overflow: hidden !important;
    height: 420px;
    max-height: 420px !important;
    min-height: 420px;
  }

  .bay-payload #v3payload,
  .revgrid #v3review {
    height: 280px;
  }
}

/* Three-column launch console needs a little more width; below this the model
   column drops under the two decision columns instead of squeezing the list. */
@media (max-width: 1320px) and (min-width: 1081px) {
  .launchgrid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .launch-model-col {
    grid-column: 1 / -1;
    height: 360px;
    max-height: 360px;
  }
}

/* Short viewports: give the 3D band a share of the height instead of a fixed
   360 px, so the decision columns keep enough room for the pinned FRR footer. */
@media (max-width: 1320px) and (min-width: 1081px) and (max-height: 900px) {
  .launch-model-col {
    height: min(360px, 30vh);
    max-height: min(360px, 30vh);
  }
}

/* ══════════════════════════════════════════════════════════════
   ACTION DOCK (Unified Sticky Footer)
   ══════════════════════════════════════════════════════════════ */
#dock {
  flex: 0 0 auto;
  min-height: 52px;
  background: linear-gradient(180deg, #0a101d, #050811);
  border-top: 1px solid rgba(75, 130, 215, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 45;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

#dock.hidden {
  display: none;
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}

.dock-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ds-dim);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0 12px;
}

.dock-center b {
  color: var(--bone);
  font-weight: 600;
}

.dock-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.dock-status-chip.pending {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dock-status-chip.warn {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.1);
  border: 1px solid rgba(255, 183, 77, 0.3);
}

.dock-status-chip.crit {
  color: var(--red);
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.35);
}

.dock-status-chip.ready {
  color: var(--phosphor);
  background: rgba(101, 242, 165, 0.1);
  border: 1px solid rgba(101, 242, 165, 0.35);
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
  justify-content: flex-end;
}

.dock-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bone);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.dock-btn-back:hover {
  background: rgba(75, 130, 215, 0.2);
  border-color: var(--ds-blue-hi);
  color: #fff;
}

.dock-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  font-family: var(--disp);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.18s;
  cursor: pointer;
}

.dock-btn-primary:not(:disabled) {
  background: var(--phosphor);
  color: #040810;
  border: 1px solid var(--phosphor);
  box-shadow: 0 0 18px rgba(101, 242, 165, 0.45);
}

.dock-btn-primary:not(:disabled):hover {
  background: #7effb9;
  box-shadow: 0 0 26px rgba(101, 242, 165, 0.7);
  transform: translateY(-1px);
}

.dock-btn-primary:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  box-shadow: none;
}

/* ── ACCORDION PANELS (Build Systems) ────── */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(8, 14, 24, 0.7);
  overflow: hidden;
  transition: border-color 0.15s;
}

.accordion-item.open {
  border-color: rgba(75, 130, 215, 0.4);
  background: rgba(10, 18, 32, 0.85);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.accordion-header:hover {
  background: rgba(75, 130, 215, 0.1);
}

.accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-title {
  font-family: var(--disp);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bone);
}

.accordion-badge {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--phosphor);
  background: rgba(101, 242, 165, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(101, 242, 165, 0.25);
}

.accordion-badge.warn {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.12);
  border-color: rgba(255, 183, 77, 0.35);
}

.accordion-chevron {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ds-dim);
  transition: transform 0.2s;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
  color: var(--ds-blue-hi);
}

.accordion-content {
  display: none;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* ── VISUAL BUDGET BARS (Delta-V, BEYOND-ORBITs) ── */
.budget-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(8, 16, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.budget-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--bone);
}

.budget-bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.budget-bar-fill.nominal {
  background: var(--phosphor);
}

.budget-bar-fill.warn {
  background: var(--amber);
}

.budget-bar-fill.crit {
  background: var(--red);
}

/* ── SITE COMPARISON MATRIX (Formulate) ── */
.site-matrix-table {
  width: 100%;
  border-collapse: collapse;
  beyond-orbit-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
}

.site-matrix-table th {
  text-align: left;
  color: var(--ds-dim);
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-matrix-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--bone);
}

/* ── ROVER STATUS STRIP (Surface Ops) ── */
.rover-status-strip.hidden {
  display: none !important;
}

.rover-status-strip {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 18px;
  border-radius: 4px;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid rgba(75, 130, 215, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--bone);
}

.rover-status-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.rover-status-item .lbl {
  font-size: 10.5px;
  color: var(--ds-dim);
  letter-spacing: 0.1em;
}

.rover-status-item .val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rover-status-item.warn .val {
  color: var(--amber);
}

.rover-status-item.crit .val {
  color: var(--red);
}

/* ══════════════════════════════════════════════════════════════
   PHASE 2 — TEAM MODE (hot-seat)
   DOM only. The 3D layer, the Canvas2D fallbacks and the surface
   renderer never read these rules, so `?no3d` and `file://` are
   unaffected by construction.
   ══════════════════════════════════════════════════════════════ */
.team-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  beyond-orbit-left: 8px;
}

.team-badge[hidden] {
  display: none;
}

.tbb-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.tbb-seat {
  --seat: #5ef6a0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: none;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 18px;
  cursor: pointer;
  transition:
    border-color 0.12s var(--ease),
    color 0.12s var(--ease),
    background 0.12s var(--ease);
}

.tbb-seat:hover {
  border-color: var(--seat);
  color: var(--bone);
}

.tbb-seat.on {
  border-color: var(--seat);
  background: var(--seat);
  color: #04070d;
  font-weight: 700;
}

.tbb-role {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--bone);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 2px 5px;
}

/* Override prompt. pointer-events:none is deliberate: the second click must
   land on the control that was refused, never on this banner. */
#teamhint {
  position: fixed;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  z-index: 78;
  max-width: min(680px, 92vw);
  padding: 9px 14px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: rgba(20, 14, 4, 0.95);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

#teamhint[hidden] {
  display: none;
}

/* Hand-off overlay: one card, always dismissible, never traps a dialog (R-04). */
#teamhand {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 10, 0.74);
  backdrop-filter: blur(2px);
}

#teamhand[hidden] {
  display: none;
}

.th-card {
  width: min(460px, 94vw);
  padding: 22px 22px 18px;
  border: 1px solid var(--dimmer);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(12, 20, 34, 0.98),
    rgba(6, 10, 18, 0.99)
  );
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.th-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--phosphor);
}

.th-card h3 {
  font-family: var(--disp);
  font-size: 16px;
  letter-spacing: 0.16em;
  beyond-orbit: 7px 0 9px;
  color: var(--bone);
}

#thbody {
  font-size: 13px;
  line-height: 1.65;
  color: var(--bone);
}

.th-why {
  display: block;
  beyond-orbit-top: 8px;
  color: var(--dim);
  font-size: 12px;
}

.th-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  beyond-orbit: 14px 0 16px;
}

.th-chip {
  --seat: #5ef6a0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--dim);
}

.th-chip.on {
  border-color: var(--seat);
  color: var(--seat);
}

/* GO/NO-GO roll call */
.team-roll {
  beyond-orbit-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.tr-head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.tr-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
  beyond-orbit-top: 8px;
}

.tr-seat {
  --seat: #5ef6a0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "id name state";
  align-items: center;
  gap: 0 10px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #34465c;
  border-radius: 3px;
  background: #182536;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition:
    border-color 0.12s var(--ease),
    color 0.12s var(--ease),
    background 0.12s ease;
}

.tr-seat b {
  grid-area: state;
  display: grid;
  place-items: center;
  min-width: 64px;
  padding: 7px 8px;
  border: 1px solid #c35b52;
  border-radius: 2px;
  background: #9d3f39;
  color: #fff1ef;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.tr-seat:hover {
  border-color: #7893b3;
  background: #22344a;
  color: var(--bone);
}

.tr-seat.go {
  border-color: #4d866f;
  color: var(--seat);
  background: #1a302b;
}

.tr-seat.go b {
  border-color: #5b967b;
  background: #32634f;
  color: #d9eee4;
}

/* Limited-width selector + roll-call treatment from the narrow-rail design handoff. */
.lv-list-panel #lvList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  direction: rtl;
}

.lv-list-panel #lvList > * {
  direction: ltr;
}

.lv-list-panel .lv {
  width: 100%;
  max-width: none;
  beyond-orbit: 0;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  overflow: hidden;
}

.lv-list-panel .lv:hover {
  background: var(--panel-2);
  border-color: var(--line-3);
}

.lv-list-panel .lv.on {
  border-color: var(--phosphor);
  background: rgba(95, 207, 155, 0.1);
  box-shadow: inset 3px 0 0 var(--phosphor);
}

.lv-list-panel .lv .r1,
.lv-list-panel .lv .r2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.lv-list-panel .lv .r1 > span:first-child {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lv-list-panel .lv .r1 .cap,
.lv-list-panel .lv .r2 .cap {
  flex: 0 0 auto;
  white-space: nowrap;
}

.lv-list-panel .lv .r2 {
  flex-wrap: wrap;
  beyond-orbit: 8px 0;
  font-size: 10px;
}

.lv-list-panel .lv .budget-bar-track {
  height: 4px !important;
}

.lv-list-panel .lv .budget-bar-track + .cap {
  color: var(--phosphor);
}

.tr-seats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.tr-seat {
  min-height: 48px;
  border-color: rgba(95, 207, 155, 0.35);
  background: rgba(95, 207, 155, 0.1);
  color: var(--phosphor);
}

.tr-seat:hover {
  border-color: #345a3d;
  background: #223a28;
  color: #d1fae5;
}

.tr-seat b {
  min-width: 64px;
  border-color: rgba(95, 207, 155, 0.35);
  background: transparent;
  color: var(--phosphor);
}

.tr-seat.go {
  border-color: var(--phosphor);
  background: var(--phosphor);
  color: var(--void);
}

.tr-seat.go b {
  border-color: var(--phosphor);
  background: var(--phosphor);
  color: var(--void);
}

.tr-seat {
  width: 100%;
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 8px 10px;
  border-color: rgba(95, 207, 155, 0.45);
  background: rgba(95, 207, 155, 0.1);
  color: var(--phosphor);
}

.tr-seat .tr-seat-id,
.tr-seat .tr-seat-name {
  color: inherit;
}

.tr-seat b {
  min-width: 72px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(95, 207, 155, 0.55);
  border-radius: 3px;
  background: transparent;
  color: var(--phosphor);
  font-size: 10px;
}

.tr-seat:hover {
  border-color: var(--phosphor);
  background: rgba(95, 207, 155, 0.2);
  color: var(--bone);
}

.tr-seat.go {
  border-color: var(--phosphor);
  background: var(--phosphor);
  color: var(--void);
  box-shadow: 0 0 12px rgba(95, 207, 155, 0.25);
}

.tr-seat.go b {
  border-color: var(--phosphor);
  background: transparent;
  color: var(--void);
}

.tr-seat.go:hover {
  background: #e9ecef;
  border-color: #e9ecef;
  color: var(--void);
}

.tr-seat.go:hover b {
  border-color: var(--void);
  color: var(--void);
}

/* Report team card (derived data only; the score is never touched) */
.team-card {
  beyond-orbit: 14px 16px 0;
  padding: 12px 12px 10px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.tc-head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
  beyond-orbit-bottom: 6px;
}

.tc-row {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.tc-seat {
  --seat: #5ef6a0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--seat);
}

.tc-name {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--bone);
}

.tc-long {
  color: var(--dim);
  letter-spacing: 0.04em;
}

.tc-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.tc-foot {
  beyond-orbit-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

@media (max-width: 720px) {
  .team-badge .tbb-label,
  .team-badge .tbb-role {
    display: none;
  }

  #teamhint {
    bottom: 96px;
    font-size: 11px;
  }
}

/* Sleek NASA telemetry resume action chips */
.sel-resume-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 max(24px, 3%);
  beyond-orbit-bottom: 8px;
  pointer-events: auto;
}
.sel-resume-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(12px);
  color: var(--bone);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.16s var(--ease);
}
.sel-resume-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(101, 242, 165, 0.5);
  background: rgba(16, 28, 48, 0.92);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(101, 242, 165, 0.15);
}
.sel-resume-chip.active-flight {
  border-color: rgba(101, 242, 165, 0.35);
  background: rgba(10, 26, 20, 0.85);
}
.sel-resume-chip.active-flight:hover {
  border-color: var(--phosphor);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(101, 242, 165, 0.25);
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.chip-dot.blue {
  background: var(--blue-lift, #60a5fa);
  box-shadow: 0 0 8px #60a5fa;
}
.chip-dot.green {
  background: var(--phosphor, #65f2a5);
  box-shadow: 0 0 8px #65f2a5;
}
.chip-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim, #94a3b8);
}
.chip-val {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bone, #f1f5f9);
}
.chip-detail {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dimmer, #64748b);
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.chip-arr {
  font-size: 11px;
  color: var(--phosphor);
  transition: transform 0.14s var(--ease);
}
.sel-resume-chip:hover .chip-arr {
  transform: translateX(2px);
}

/* Cohesive top-bar button styles */
.sel-tools .btn.ghost {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 18, 32, 0.65);
  backdrop-filter: blur(12px);
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

.sel-tools .btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(18, 30, 52, 0.85);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM CARD-LESS BRIEFING SYSTEM (5-STEP REFINED AEROSPACE HIERARCHY)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Step 1: Soft dark wash behind the content & Moon calming ── */
#briefview {
  opacity: 0.4 !important;
}

#briefview .briefcanvas,
.briefview-fallback {
  opacity: 0.4 !important;
}

#briefview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 100%
  ) !important;
}

.wrap.briefwrap {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  beyond-orbit: 0 auto;
  padding: 70px 48px 24px !important;
}

.wrap.briefwrap::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 100%
  );
}

/* ── Step 2: Space between sections, not around boxes (48px gaps) ── */
.briefdossier {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  beyond-orbit-top: 0 !important;
  beyond-orbit-bottom: 0 !important;
  max-width: 920px;
}

/* Align top of right column with left column header */
body.brief-active .brief-col:last-child > .panel:first-child > h3 {
  border-top: none !important;
  padding-top: 0 !important;
  beyond-orbit-top: 0 !important;
  line-height: 1.4;
}

body.brief-active .brief {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 40px;
  align-items: start;
}

body.brief-active .brief-col {
  display: flex;
  flex-direction: column;
  gap: 36px !important;
  padding-right: 24px !important;
  padding-left: 2px !important;
  min-height: 0;
  overflow-y: auto;
}

body.brief-active .brief-col:first-child {
  direction: rtl !important;
  padding-right: 2px !important;
  padding-left: 24px !important;
}

body.brief-active .brief-col:first-child > * {
  direction: ltr !important;
}

body.brief-active .brief .panel {
  beyond-orbit-top: 0 !important;
  beyond-orbit-bottom: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.brief-active .brief .panel::before,
body.brief-active .brief .panel::after,
body.brief-active .brief .panel .bracket {
  display: none !important;
}

body.brief-active .brief .panel .pad {
  padding: 0 !important;
}

/* ── Step 3: Replace card borders with hairlines ── */
/* 1px line at top of sections */
body.brief-active .brief .panel > h3 {
  background: transparent !important;
  border-bottom: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 12px 0 0 0 !important;
  beyond-orbit-bottom: 16px !important;
  font-family: var(--font-data, var(--mono));
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-2, #9ba4ae);
}

/* Orbit options: remove dark pills, use left 2px blue line + 12px indent */
.orbit-card {
  font-family: var(--font-data, var(--mono));
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.orbit-card > div > div > div {
  background: transparent !important;
  border: none !important;
  border-left: 2px solid var(--accent, #5b9bff) !important;
  border-radius: 0 !important;
  padding: 4px 0 4px 12px !important;
  beyond-orbit-bottom: 12px !important;
  box-shadow: none !important;
  transition: border-left-color 0.15s ease;
}

.orbit-card > div > div > div:hover {
  background: transparent !important;
  border-left-color: #fff !important;
}

/* ── Selector Cards: Science Objectives & Landing Sites ── */
.briefwrap .objlist.many {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px !important;
  align-content: start;
}

.briefwrap .obj {
  display: flex;
  gap: 10px;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  position: relative;
  beyond-orbit-bottom: 0 !important;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border: 1px solid transparent !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(24, 38, 60, calc(0.2 * var(--sun-intensity, 0.5) + 0.12)) 0%,
        rgba(13, 20, 32, 0.75) 50%,
        rgba(8, 13, 22, 0.9) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.16 * var(--sun-intensity, 0.5) + 0.06)) 0%,
        rgba(130, 180, 240, calc(0.1 * var(--sun-intensity, 0.5) + 0.04)) 35%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(255, 255, 255, 0.03) 100%
      )
      border-box !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  transition:
    transform 0.16s var(--ease),
    border-color 0.16s,
    background 0.16s,
    box-shadow 0.16s !important;
}

.briefwrap .obj:hover {
  transform: translateY(-1.5px) !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(30, 46, 72, calc(0.25 * var(--sun-intensity, 0.5) + 0.16)) 0%,
        rgba(16, 26, 42, 0.82) 50%,
        rgba(9, 16, 26, 0.94) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.25 * var(--sun-intensity, 0.5) + 0.1)) 0%,
        rgba(140, 195, 255, calc(0.18 * var(--sun-intensity, 0.5) + 0.06)) 35%,
        rgba(255, 255, 255, 0.08) 70%,
        rgba(255, 255, 255, 0.04) 100%
      )
      border-box !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}

.briefwrap .obj.sel {
  transform: translateY(-2px) !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(22, 46, 60, calc(0.28 * var(--sun-intensity, 0.5) + 0.18)) 0%,
        rgba(12, 28, 38, 0.85) 48%,
        rgba(7, 18, 26, 0.95) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(180, 250, 220, calc(0.4 * var(--sun-intensity, 0.5) + 0.16)) 0%,
        rgba(101, 242, 165, calc(0.28 * var(--sun-intensity, 0.5) + 0.1)) 30%,
        rgba(91, 195, 255, 0.15) 60%,
        rgba(255, 255, 255, 0.06) 100%
      )
      border-box !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(101, 242, 165, 0.15) !important;
}

.briefwrap .obj.req {
  border-left: 3px solid var(--warn, #edb04e) !important;
}

.briefwrap .obj .box {
  width: 15px;
  height: 15px;
  font-size: 10px;
  beyond-orbit-top: 1px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
  beyond-orbit-top: 2px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--font-data, var(--mono));
  color: transparent;
  transition: all 0.16s ease;
}

.briefwrap .obj:hover .box {
  border-color: rgba(255, 255, 255, 0.45);
}

.briefwrap .obj.sel .box {
  border-color: #65f2a5 !important;
  background: rgba(101, 242, 165, 0.22) !important;
  color: #65f2a5 !important;
  box-shadow: 0 0 8px rgba(101, 242, 165, 0.35);
}

/* Landing site selector card */
.briefwrap .obj.site {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0 !important;
  padding: 13px 16px !important;
  border-radius: 8px !important;
  position: relative;
  beyond-orbit-bottom: 8px !important;
  border: 1px solid transparent !important;
  border-left: 3px solid rgba(255, 255, 255, 0.12) !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(24, 38, 60, calc(0.2 * var(--sun-intensity, 0.5) + 0.12)) 0%,
        rgba(13, 20, 32, 0.75) 50%,
        rgba(8, 13, 22, 0.9) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.16 * var(--sun-intensity, 0.5) + 0.06)) 0%,
        rgba(130, 180, 240, calc(0.1 * var(--sun-intensity, 0.5) + 0.04)) 35%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(255, 255, 255, 0.03) 100%
      )
      border-box !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  transition:
    transform 0.16s var(--ease),
    border-color 0.16s,
    background 0.16s,
    box-shadow 0.16s,
    border-left-color 0.16s !important;
}

.briefwrap .obj.site:hover {
  transform: translateY(-1.5px) !important;
  border-left-color: rgba(91, 195, 255, 0.5) !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(30, 46, 72, calc(0.25 * var(--sun-intensity, 0.5) + 0.16)) 0%,
        rgba(16, 26, 42, 0.82) 50%,
        rgba(9, 16, 26, 0.94) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.25 * var(--sun-intensity, 0.5) + 0.1)) 0%,
        rgba(140, 195, 255, calc(0.18 * var(--sun-intensity, 0.5) + 0.06)) 35%,
        rgba(255, 255, 255, 0.08) 70%,
        rgba(255, 255, 255, 0.04) 100%
      )
      border-box !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}

.briefwrap .obj.site.sel {
  transform: translateY(-2px) !important;
  border-left: 3px solid #65f2a5 !important;
  background:
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(22, 46, 60, calc(0.28 * var(--sun-intensity, 0.5) + 0.18)) 0%,
        rgba(12, 28, 38, 0.85) 48%,
        rgba(7, 18, 26, 0.95) 95%
      )
      padding-box,
    radial-gradient(
        circle 700px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(180, 250, 220, calc(0.4 * var(--sun-intensity, 0.5) + 0.16)) 0%,
        rgba(101, 242, 165, calc(0.28 * var(--sun-intensity, 0.5) + 0.1)) 30%,
        rgba(91, 195, 255, 0.15) 60%,
        rgba(255, 255, 255, 0.06) 100%
      )
      border-box !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(101, 242, 165, 0.18) !important;
}

.briefwrap .obj.site .box {
  display: none !important;
}

.site-badge {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2.5px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.16s ease;
}

.site-badge.sel {
  border-color: #65f2a5 !important;
  color: #65f2a5 !important;
  background: rgba(101, 242, 165, 0.15) !important;
  box-shadow: 0 0 10px rgba(101, 242, 165, 0.25) !important;
}

.briefwrap .obj.site:hover .site-badge:not(.sel) {
  border-color: rgba(91, 195, 255, 0.4);
  color: rgba(91, 195, 255, 0.9);
  background: rgba(91, 195, 255, 0.08);
}

/* ── Step 4: Fix typography & hierarchy ── */
.brief .panel p {
  max-width: 65ch !important;
  line-height: 1.7 !important;
}

.briefstats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  beyond-orbit-top: 18px;
  font-size: 12.5px;
}

.briefstats dt,
.briefstats dt.hint {
  color: rgba(255, 255, 255, 0.6) !important;
}

.briefstats dd,
.briefstats dd.num {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-family: var(--font-data, var(--mono));
}

.brief .panel > h3 .code {
  font-size: 10px !important;
  opacity: 0.4 !important;
  color: rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 0.12em !important;
  font-weight: 400 !important;
}

/* ── Step 5: Calm the right side ── */
/* Equal height & common baseline */
.briefwrap .objlist.many .obj {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  height: 100%;
}

.briefwrap .objlist.many .obj > span:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80px;
}

.briefwrap .obj .t {
  font-family: var(--font-header, var(--sans));
  font-weight: 600;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--bone);
}

.briefwrap .obj.sel .t {
  color: #fff;
}

.briefwrap .obj .need {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  beyond-orbit-top: 4px;
}

.briefwrap .obj .need .nchip {
  font-family: var(--font-data, var(--mono));
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(91, 155, 255, 0.1);
  border: 1px solid rgba(91, 155, 255, 0.2);
  color: #8bc2ff;
}

.briefwrap .obj .wnum {
  font-family: var(--font-data, var(--mono));
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
}

/* Dim scoring weight bars to 50% until hover/selected */
.briefwrap .obj .mini {
  display: block;
  beyond-orbit-top: 4px !important;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  opacity: 0.5 !important;
  transition: opacity 0.2s ease;
}

.briefwrap .obj .mini i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(91, 155, 255, 0.4),
    rgba(91, 155, 255, 0.65)
  );
  transition: width 0.3s ease;
}

.briefwrap .obj .bar-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  beyond-orbit-top: 4px !important;
  font-size: 9px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.briefwrap .obj:hover .mini,
.briefwrap .obj.sel .mini {
  opacity: 1 !important;
}

.briefwrap .obj:hover .bar-legend,
.briefwrap .obj.sel .bar-legend {
  opacity: 1;
}

.briefwrap .obj.sel .mini i {
  background: linear-gradient(
    90deg,
    rgba(56, 211, 159, 0.7),
    #65f2a5
  ) !important;
  box-shadow: 0 0 6px rgba(101, 242, 165, 0.35);
}

/* ── Build Bay: Panels & Instruments (.part) ──────────────────── */
.bay-col .panel {
  border-radius: 12px;
  position: relative;
  border: 1px solid transparent !important;
  background:
    radial-gradient(
        circle 900px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(20, 30, 48, calc(0.18 * var(--sun-intensity, 0.5) + 0.1)) 0%,
        rgba(10, 17, 28, 0.82) 50%,
        rgba(6, 10, 17, 0.94) 95%
      )
      padding-box,
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.15 * var(--sun-intensity, 0.5) + 0.04)) 0%,
        rgba(130, 180, 240, calc(0.08 * var(--sun-intensity, 0.5) + 0.03)) 35%,
        rgba(255, 255, 255, 0.03) 70%,
        rgba(255, 255, 255, 0.02) 100%
      )
      border-box !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.bay-payload .part,
.bay-systems .part,
.cat .part {
  padding: 12px 14px !important;
  beyond-orbit-bottom: 6px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background:
    radial-gradient(
        circle 900px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(20, 30, 46, calc(0.16 * var(--sun-intensity, 0.5) + 0.1)) 0%,
        rgba(10, 16, 26, 0.72) 50%,
        rgba(6, 10, 18, 0.88) 95%
      )
      padding-box,
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.14 * var(--sun-intensity, 0.5) + 0.04)) 0%,
        rgba(130, 180, 240, calc(0.08 * var(--sun-intensity, 0.5) + 0.03)) 35%,
        rgba(255, 255, 255, 0.03) 70%,
        rgba(255, 255, 255, 0.02) 100%
      )
      border-box !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.16s var(--ease),
    border-color 0.16s,
    background 0.16s,
    box-shadow 0.16s;
  width: 100%;
  cursor: pointer;
}

.bay-payload .part:hover,
.bay-systems .part:hover,
.cat .part:hover {
  transform: translateY(-1.5px);
  background:
    radial-gradient(
        circle 900px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(26, 38, 58, calc(0.2 * var(--sun-intensity, 0.5) + 0.14)) 0%,
        rgba(13, 20, 32, 0.78) 50%,
        rgba(8, 13, 22, 0.92) 95%
      )
      padding-box,
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(255, 255, 255, calc(0.22 * var(--sun-intensity, 0.5) + 0.08)) 0%,
        rgba(150, 200, 255, calc(0.14 * var(--sun-intensity, 0.5) + 0.05)) 35%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(255, 255, 255, 0.03) 100%
      )
      border-box !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.4);
}

.bay-payload .part.on,
.bay-systems .part.on,
.cat .part.on {
  transform: translateY(-1px);
  background:
    radial-gradient(
        circle 900px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(16, 26, 42, calc(0.2 * var(--sun-intensity, 0.5) + 0.12)) 0%,
        rgba(10, 16, 26, 0.78) 48%,
        rgba(6, 10, 18, 0.92) 95%
      )
      padding-box,
    radial-gradient(
        circle 800px at var(--sun-pos-x, 80%) var(--sun-pos-y, 20%),
        rgba(101, 242, 165, calc(0.4 * var(--sun-intensity, 0.5) + 0.18)) 0%,
        rgba(91, 164, 255, calc(0.24 * var(--sun-intensity, 0.5) + 0.1)) 35%,
        rgba(101, 242, 165, 0.12) 65%,
        rgba(255, 255, 255, 0.04) 100%
      )
      border-box !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(101, 242, 165, 0.08) !important;
  position: relative !important;
}

.bay-payload .part.on::before,
.bay-systems .part.on::before,
.cat .part.on::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 3px;
  background: #65f2a5;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(101, 242, 165, 0.6);
  pointer-events: none;
}

.bay-systems .part .pn,
.bay-payload .part .pn,
.cat .part .pn {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
}

.bay-systems .part .pn > span:first-child,
.bay-payload .part .pn > span:first-child,
.cat .part .pn > span:first-child {
  font-family: var(--font-ui, var(--sans)) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  color: var(--text-1, #e9ecef) !important;
  line-height: 1.35 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  word-break: break-word !important;
}

.bay-systems .part .pn > span:last-child {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  beyond-orbit-left: auto !important;
  padding-top: 1px !important;
}

.part-sel-pill {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  color: #65f2a5 !important;
  background: rgba(101, 242, 165, 0.1) !important;
  border: 1px solid rgba(101, 242, 165, 0.4) !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  box-shadow: 0 0 8px rgba(101, 242, 165, 0.18) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.bay-payload .part .ps span,
.cat .part .ps span {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  background: rgba(15, 24, 40, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 3px 7px !important;
  border-radius: 4px !important;
  color: var(--bone);
}

.bay-payload .part .ps span b,
.cat .part .ps span b {
  color: rgba(255, 255, 255, 0.45);
  beyond-orbit-right: 3px;
  font-weight: 500;
}

.bay-payload .part.on .ps span,
.cat .part.on .ps span {
  border-color: rgba(101, 242, 165, 0.3) !important;
  background: rgba(10, 30, 25, 0.4) !important;
}

.part-add-btn {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 9px !important;
  border-radius: 4px !important;
  transition: all 0.15s ease;
}

.part-add-btn:not(.mounted) {
  border: 1px solid rgba(91, 155, 255, 0.35) !important;
  background: rgba(91, 155, 255, 0.1) !important;
  color: #9ac7ff !important;
}

.part:hover .part-add-btn:not(.mounted) {
  border-color: rgba(91, 155, 255, 0.7) !important;
  background: rgba(91, 155, 255, 0.22) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(91, 155, 255, 0.4);
}

.part-add-btn.mounted {
  border: 1px solid #65f2a5 !important;
  background: rgba(101, 242, 165, 0.2) !important;
  color: #65f2a5 !important;
  box-shadow: 0 0 10px rgba(101, 242, 165, 0.35);
}

/* ── Screen 03: Card-less Outer Hierarchy & Compact Aerospace Controls ── */
body.build-active .buildwrap .panel,
body.build-active .bay-col .panel,
.build-tabs {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.build-active .bay-col .panel::before,
body.build-active .bay-col .panel::after,
body.build-active .bay-col .panel .bracket {
  display: none !important;
}

/* Section headers on right preview column */
.bay-preview-col .panel > h3 {
  background: transparent !important;
  border-bottom: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 10px 0 0 0 !important;
  beyond-orbit-bottom: 10px !important;
  font-family: var(--font-data, var(--mono));
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-2, #9ba4ae);
}

.bay-preview-col .panel:first-child > h3 {
  border-top: none !important;
  padding-top: 0 !important;
}

.bay-preview-col .panel .pad {
  padding: 0 !important;
}

/* Breathing room for scrollable columns */
.bay-payload .bay-preview-col {
  padding-right: 14px !important;
}

.bay-payload .bay-cat-col .cat {
  padding-right: 14px !important;
}

/* Sleek FILTER: USEFUL ONLY Button */
.btn-filter-useful {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  min-height: 0 !important;
  padding: 0 10px;
  border-radius: 4px;
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.65);
}

.btn-filter-useful:hover {
  border-color: rgba(91, 155, 255, 0.45);
  color: #fff;
  background: rgba(91, 155, 255, 0.08);
}

.btn-filter-useful.active {
  border-color: var(--accent, #5b9bff);
  color: #fff;
  background: rgba(91, 155, 255, 0.22);
  box-shadow: 0 0 10px rgba(91, 155, 255, 0.3);
}

.btn-filter-useful .filter-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.btn-filter-useful.active .filter-dot {
  background: #65f2a5;
  box-shadow: 0 0 6px #65f2a5;
}

/* Category group dividers */
.catgrp {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  color: rgba(255, 255, 255, 0.45) !important;
  padding: 14px 2px 6px 2px !important;
  border-bottom: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  beyond-orbit-top: 4px;
}

.catgrp:first-child {
  border-top: none !important;
  padding-top: 4px !important;
  beyond-orbit-top: 0 !important;
}

/* Sleek aerospace segmented tabs */
.build-tabs .spd,
.spd {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 3px 4px !important;
  border-radius: 6px !important;
  background: rgba(10, 18, 32, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.build-tabs .spd button,
.spd button {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  padding: 4px 11px !important;
  border-radius: 4px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.55) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 0 !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.build-tabs .spd button:hover:not(:disabled),
.spd button:hover:not(:disabled) {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.build-tabs .spd button.on,
.spd button.on {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.22) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 4px !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  font-weight: 600 !important;
}

.build-tabs .spd button:disabled,
.spd button:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

/* ── Screen 03 (Systems): Cardless Accordions & Center CAD Layout ── */
.bay-systems .accordion-item {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  beyond-orbit-bottom: 12px;
}

.bay-systems .accordion-item.open {
  border-color: transparent !important;
  background: transparent !important;
}

.bay-systems .accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 !important;
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: none !important;
  cursor: pointer;
  user-select: none;
}

.bay-systems .accordion-item:first-child .accordion-header {
  border-top: none !important;
  padding-top: 0 !important;
}

.bay-systems .accordion-header:hover {
  background: transparent !important;
}

.bay-systems .accordion-header:hover .accordion-title {
  color: #fff;
}

.bay-systems .accordion-title {
  font-family: var(--font-display, var(--disp));
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text-1, #e9ecef);
}

.bay-systems .accordion-title .code {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  beyond-orbit-left: 6px;
}

.bay-systems .accordion-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.bay-systems .accordion-badge {
  font-family: var(--font-data, var(--mono));
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--phosphor);
  background: rgba(101, 242, 165, 0.1);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(101, 242, 165, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bay-systems .accordion-badge.warn {
  color: var(--amber);
  background: rgba(255, 183, 77, 0.12);
  border-color: rgba(255, 183, 77, 0.35);
}

.bay-systems .accordion-content {
  display: none;
  padding: 8px 0 0 0 !important;
  border-top: none !important;
}

.bay-systems .accordion-item.open .accordion-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Systems scrollable side columns breathing room */
.bay-systems > .bay-col:not(.bay-center-col) {
  padding-right: 14px !important;
}

/* ── Systems Center CAD: Eliminate Vertical Slider ── */
.bay-systems .bay-center-col {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
}

.bay-systems .bay-center-col .panel {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.bay-systems .bay-center-col .panel > h3 {
  border-top: none !important;
  padding-top: 0 !important;
  beyond-orbit-bottom: 8px !important;
  font-family: var(--font-data, var(--mono));
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-2, #9ba4ae);
}

.bay-systems .bay-center-col #v3systems {
  flex: 1 1 auto !important;
  min-height: 180px !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(12, 22, 38, 0.5) 0%,
    rgba(4, 8, 16, 0.85) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bay-systems .bay-center-col .readout {
  beyond-orbit-top: 8px;
  position: static !important;
  background: rgba(10, 16, 26, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  backdrop-filter: blur(10px);
}

/* ── Sleek Action Dock & Button Refinement ── */
#dock {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 24px !important;
  background: rgba(8, 14, 24, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.45) !important;
}

.dock-btn-back {
  height: 28px !important;
  min-height: 0 !important;
  padding: 0 14px !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  border-radius: 4px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  transition: all 0.15s ease !important;
}

.dock-btn-back:hover {
  background: rgba(91, 155, 255, 0.12) !important;
  border-color: rgba(91, 155, 255, 0.45) !important;
  color: #fff !important;
}

.dock-btn-primary {
  height: 30px !important;
  min-height: 0 !important;
  padding: 0 18px !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
  text-transform: uppercase !important;
}

.dock-btn-primary:not(:disabled) {
  background: linear-gradient(180deg, #65f2a5 0%, #46d888 100%) !important;
  color: #040a12 !important;
  border: 1px solid #7effb9 !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 0 10px rgba(101, 242, 165, 0.25) !important;
}

.dock-btn-primary:not(:disabled):hover {
  background: #7effb9 !important;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(101, 242, 165, 0.4) !important;
  transform: translateY(-0.5px) !important;
}

/* Launch telemetry glass: the scene remains visible through the dock and
   rails, allowing the stage's warm/cool light to read behind the controls. */
body.launch-active #hud {
  background: rgba(5, 10, 18, 0.68) !important;
  backdrop-filter: blur(16px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(125%) !important;
  box-shadow:
    0 -10px 30px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.launch-active #hud .rails {
  gap: 1px;
  background: rgba(170, 195, 220, 0.16);
}

body.launch-active #hud .rail {
  background: linear-gradient(
    115deg,
    rgba(12, 24, 38, 0.66),
    rgba(6, 12, 22, 0.48)
  ) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

body.launch-active #dock {
  background: linear-gradient(
    90deg,
    rgba(8, 15, 26, 0.78),
    rgba(12, 25, 37, 0.62),
    rgba(8, 15, 26, 0.78)
  ) !important;
  backdrop-filter: blur(18px) saturate(135%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
  box-shadow:
    0 -8px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

body.launch-active .dock-status-chip,
body.launch-active .dock-btn-back,
body.launch-active .dock-btn-primary:disabled {
  backdrop-filter: blur(10px) saturate(125%);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
}

.dock-btn-primary:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

.dock-status-chip {
  height: 24px !important;
  padding: 0 12px !important;
  border-radius: 4px !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
}

/* ── Compact & Refined Telemetry Rails ── */
.rail {
  min-height: 44px !important;
  padding: 6px 12px 7px !important;
  background: rgba(8, 14, 24, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.rail .nm {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  letter-spacing: 0.1em !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

.rail .vl {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-1, #e9ecef) !important;
}

.rail .bar {
  height: 2.5px !important;
  beyond-orbit-top: 4px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 1px !important;
}

/* ── Fullscreen & Sysview: Pin Controls to Top-Right & Hide Overlapping Cards ── */
.sel-controls {
  beyond-orbit-left: auto !important;
}

body.sel-fullscreen .sel-bottom,
body.select-active.sysview .sel-bottom {
  display: none !important;
}

body.sel-fullscreen .sel-title,
body.select-active.sysview .sel-title {
  display: none !important;
}

body.sel-fullscreen .sel-tools,
body.select-active.sysview .sel-tools {
  display: none !important;
}

/* ── Prominent Large Telemetry Rails (Restored Large Bold Stats) ── */
.rail {
  min-height: 56px !important;
  padding: 8px 14px 10px !important;
  background: rgba(8, 14, 24, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.rail .nm {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

.rail .vl {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--text-1, #e9ecef) !important;
  beyond-orbit-top: 2px !important;
}

.rail .val-txt {
  font-size: 17px !important;
  font-weight: 700 !important;
}

.rail small {
  font-size: 11px !important;
  opacity: 0.65 !important;
}

.rail .bar {
  height: 3px !important;
  beyond-orbit-top: 6px !important;
}

/* ── Clearly Visible Telemetry Marquee / Ticker ── */
#telem {
  opacity: 1 !important;
  height: 24px !important;
  background: rgba(4, 7, 14, 0.96) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#telem .lbl {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  color: var(--accent, #5b9bff) !important;
  opacity: 0.92 !important;
}

#telem .run {
  opacity: 1 !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10.5px !important;
  color: rgba(235, 242, 252, 0.82) !important;
  letter-spacing: 0.04em !important;
}

#telem .run b {
  color: #65f2a5 !important;
  font-weight: 500 !important;
}

/* ── Perfect Alignment for Center CAD Readout ── */
.bay-systems .bay-center-col .readout,
.cad-readout {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 14px !important;
  beyond-orbit-top: 10px !important;
  position: static !important;
  background:
    radial-gradient(
        circle 700px at var(--sun-pos-x, 50%) var(--sun-pos-y, 0%),
        rgba(24, 38, 62, calc(0.24 * var(--sun-intensity, 0.8) + 0.12)) 0%,
        rgba(9, 14, 23, 0.85) 55%,
        rgba(5, 8, 14, 0.94) 95%
      )
      padding-box,
    radial-gradient(
        circle 600px at var(--sun-pos-x, 50%) var(--sun-pos-y, 0%),
        rgba(255, 255, 255, calc(0.25 * var(--sun-intensity, 0.8) + 0.08)) 0%,
        rgba(140, 195, 255, calc(0.18 * var(--sun-intensity, 0.8) + 0.05)) 35%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(255, 255, 255, 0.02) 100%
      )
      border-box !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 12px 18px !important;
  backdrop-filter: blur(16px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(125%) !important;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bay-systems .bay-center-col .readout div,
.cad-readout div,
.cad-readout .k,
.cad-readout .v,
.cad-readout .u {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.cad-readout > div {
  background: transparent !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  min-width: 0 !important;
}

.cad-readout .k {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  color: rgba(255, 255, 255, 0.5) !important;
  white-space: nowrap !important;
  overflow: visible !important;
  line-height: 16px !important;
  beyond-orbit-bottom: 5px !important;
  text-align: center !important;
}

.cad-readout .v {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--text-1, #f1f3f5) !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.cad-readout .v .u {
  font-size: 11.5px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.55) !important;
  beyond-orbit-left: 5px !important;
}

/* ══════════════════════════════════════════════════════════════
   GO / NO-GO ROLL CALL BUTTONS (Aerospace Flight Control Modernization)
   ══════════════════════════════════════════════════════════════ */
.team-roll {
  beyond-orbit-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
}

.tr-head {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  color: rgba(255, 255, 255, 0.5) !important;
  text-transform: uppercase !important;
  beyond-orbit-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.tr-head .code {
  font-size: 8.5px !important;
  opacity: 0.5 !important;
}

.tr-seats {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 8px !important;
  beyond-orbit-top: 6px !important;
}

/* Individual Roll Call Card Button */
button.tr-seat {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  min-height: 40px !important;
  width: 100% !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(14, 22, 34, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.18s ease !important;
  position: relative !important;
  color: var(--text-1, #e9ecef) !important;
}

/* Hover state on unvoted card */
button.tr-seat:not(.go):hover {
  background: rgba(22, 34, 52, 0.95) !important;
  border-color: rgba(91, 155, 255, 0.45) !important;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(91, 155, 255, 0.15) !important;
  transform: translateY(-1px) !important;
}

/* Left identification info */
.tr-seat-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.tr-seat .tr-seat-id {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 8px !important;
  letter-spacing: 0.14em !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.4) !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.tr-seat .tr-seat-name {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  color: var(--text-1, #e9ecef) !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

/* State Badge / Call Button (Right Side) */
.tr-seat .tr-badge {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  padding: 4px 9px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: 60px !important;
  height: 24px !important;
  transition: all 0.16s ease !important;
}

/* UNVOTED (Pending Call) */
.tr-seat:not(.go) .tr-badge {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

.tr-seat:not(.go):hover .tr-badge {
  border-color: rgba(91, 155, 255, 0.6) !important;
  background: rgba(91, 155, 255, 0.15) !important;
  color: #9ac7ff !important;
  box-shadow: 0 0 8px rgba(91, 155, 255, 0.25) !important;
}

/* VOTED (GO State) */
button.tr-seat.go {
  border-color: rgba(101, 242, 165, 0.5) !important;
  background: rgba(12, 28, 22, 0.9) !important;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(101, 242, 165, 0.14) !important;
}

button.tr-seat.go:hover {
  border-color: #65f2a5 !important;
  background: rgba(16, 36, 28, 0.95) !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(101, 242, 165, 0.22) !important;
  transform: translateY(-1px) !important;
}

button.tr-seat.go .tr-seat-name {
  color: #d9eee4 !important;
}

button.tr-seat.go .tr-badge {
  border: 1px solid #65f2a5 !important;
  background: rgba(101, 242, 165, 0.2) !important;
  color: #65f2a5 !important;
  box-shadow: 0 0 10px rgba(101, 242, 165, 0.25) !important;
}

/* Also support legacy <b> markup if present */
button.tr-seat b {
  all: unset !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  padding: 4px 9px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: 60px !important;
  height: 24px !important;
  box-sizing: border-box !important;
}

button.tr-seat:not(.go) b {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

button.tr-seat:not(.go):hover b {
  border-color: rgba(91, 155, 255, 0.6) !important;
  background: rgba(91, 155, 255, 0.15) !important;
  color: #9ac7ff !important;
}

button.tr-seat.go b {
  border: 1px solid #65f2a5 !important;
  background: rgba(101, 242, 165, 0.2) !important;
  color: #65f2a5 !important;
  box-shadow: 0 0 10px rgba(101, 242, 165, 0.25) !important;
}

/* ── Launch Vehicle List Left-Hand Scrollbar Specification ── */
.lv-list-panel #lvList,
.launch-ops-col .lv-list-panel #lvList {
  direction: rtl !important;
  padding-left: 6px !important;
  padding-right: 10px !important;
}

.lv-list-panel #lvList > *,
.launch-ops-col .lv-list-panel #lvList > * {
  direction: ltr !important;
}

/* ── Left-Hand Scrollbars for Left Screen Columns ── */
.launch-ops-col {
  direction: rtl !important;
  padding-left: 14px !important;
  padding-right: 12px !important;
}

.launch-ops-col > * {
  direction: ltr !important;
}

/* Ensure inner fleet card list fits comfortably without redundant inner bar */
.lv-list-panel #lvList,
.launch-ops-col .lv-list-panel #lvList {
  direction: ltr !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Build Step 1 (Payload): Left column instrument catalogue list */
.bay-payload .bay-cat-col .cat {
  direction: rtl !important;
  padding-left: 14px !important;
  padding-right: 4px !important;
}

.bay-payload .bay-cat-col .cat > * {
  direction: ltr !important;
}

/* Build Step 2 (Systems): Left-hand column (Power / Propulsion / Shielding) */
.bay-systems > .bay-col:first-child {
  direction: rtl !important;
  padding-left: 14px !important;
  padding-right: 4px !important;
}

.bay-systems > .bay-col:first-child > * {
  direction: ltr !important;
}

/* Build Step 3 (Review): Left-hand column (Spacecraft Inspection & Review Matrix) */
.revgrid > .rev-col:first-child {
  direction: rtl !important;
  padding-left: 14px !important;
  padding-right: 4px !important;
}

.revgrid > .rev-col:first-child > * {
  direction: ltr !important;
}

/* Scrollbar track breathing space */
.launch-ops-col::-webkit-scrollbar,
.bay-payload .bay-cat-col .cat::-webkit-scrollbar,
.bay-systems > .bay-col:first-child::-webkit-scrollbar,
.revgrid > .rev-col:first-child::-webkit-scrollbar {
  width: 5px !important;
}

.launch-ops-col::-webkit-scrollbar-track,
.bay-payload .bay-cat-col .cat::-webkit-scrollbar-track,
.bay-systems > .bay-col:first-child::-webkit-scrollbar-track,
.revgrid > .rev-col:first-child::-webkit-scrollbar-track {
  background: transparent !important;
  beyond-orbit: 6px 0 !important;
}

.launch-ops-col::-webkit-scrollbar-thumb,
.bay-payload .bay-cat-col .cat::-webkit-scrollbar-thumb,
.bay-systems > .bay-col:first-child::-webkit-scrollbar-thumb,
.revgrid > .rev-col:first-child::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 255, 0.28) !important;
  border-radius: 999px !important;
}

.launch-ops-col::-webkit-scrollbar-thumb:hover,
.bay-payload .bay-cat-col .cat::-webkit-scrollbar-thumb:hover,
.bay-systems > .bay-col:first-child::-webkit-scrollbar-thumb:hover,
.revgrid > .rev-col:first-child::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 155, 255, 0.55) !important;
}

/* ══════════════════════════════════════════════════════════════
   FLIGHT READINESS REVIEW (FRR) — High-Density Balanced Layout
   ══════════════════════════════════════════════════════════════ */
#goBox > .frr-pad {
  padding: 12px 14px 10px !important;
}

.frr-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
  grid-template-rows: auto auto !important;
  gap: 16px 18px !important;
  align-content: start !important;
}

.frr-body > .frr-sec:nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding-right: 4px !important;
}

.frr-body > .frr-sec:nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding-left: 4px !important;
}

.frr-body > .frr-sec:nth-child(3) {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  beyond-orbit-top: 2px !important;
}

/* Section Header Typography */
.frr-body .frr-h {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  color: rgba(255, 255, 255, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  beyond-orbit-bottom: 2px !important;
}

.frr-body .frr-h::after {
  content: "" !important;
  flex: 1 1 auto !important;
  height: 1px !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Cost Summary Lines */
.frr-body .frr-lines {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.frr-body .frr-line {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  padding: 4px 0 !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

.frr-body .frr-line > span:first-child {
  color: var(--text-1, #e9ecef) !important;
  font-weight: 500 !important;
  font-size: 11.5px !important;
}

.frr-body .frr-line em {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  beyond-orbit-left: 4px !important;
}

.frr-body .frr-line .num {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text-1, #f1f3f5) !important;
}

/* Total Commitment Hero Metric */
.frr-body .frr-total {
  beyond-orbit-top: 4px !important;
  padding-top: 6px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.frr-body .frr-total .k {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 8.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

.frr-body .frr-total .v {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}

.frr-body .frr-total .u {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Budget Utilization Progress */
.frr-body .frr-util {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  beyond-orbit-top: 6px !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 8.5px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

.frr-body .frr-util b {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--text-1, #e9ecef) !important;
}

.frr-body .frr-util-track {
  height: 3.5px !important;
  beyond-orbit-top: 3px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

/* BEYOND-ORBITs Progress Gauges (Right Side) */
.frr-body .frr-bars {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.frr-body .frr-bars .budget-bar-wrap {
  padding: 0 !important;
  beyond-orbit: 0 !important;
  border: none !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.frr-body .budget-bar-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

.frr-body .budget-bar-head > span:last-child {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

.frr-body .budget-bar-head em {
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 8px !important;
  font-style: normal !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
}

.frr-body .budget-bar-track {
  height: 3px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

.frr-body .budget-bar-fill.nominal {
  background: linear-gradient(
    90deg,
    rgba(101, 242, 165, 0.7),
    #65f2a5
  ) !important;
  box-shadow: 0 0 6px rgba(101, 242, 165, 0.4) !important;
}

.frr-body .budget-bar-fill.warn {
  background: linear-gradient(90deg, #ffb000, #ffc107) !important;
  box-shadow: 0 0 6px rgba(255, 176, 0, 0.4) !important;
}

.frr-body .budget-bar-fill.crit {
  background: linear-gradient(90deg, #fc3d21, #ff5722) !important;
  box-shadow: 0 0 6px rgba(252, 61, 33, 0.4) !important;
}

/* FRR Section 3: Readiness Checks (5/5) Clean Non-Collapsing Layout */
.frr-body .frr-checks {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
}

.frr-body .frr-sec:nth-child(3) .frr-checks {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  height: auto !important;
  min-height: auto !important;
}

.frr-body .frr-sec:nth-child(3) .frr-check,
.frr-body .frr-check {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto 44px !important;
  grid-template-areas: "t n g" !important;
  align-items: center !important;
  flex: none !important;
  min-height: 28px !important;
  height: auto !important;
  padding: 6px 10px 6px 12px !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-sizing: border-box !important;
  beyond-orbit: 0 !important;
  gap: 10px !important;
  transition:
    background 0.15s ease,
    border-color 0.15s ease !important;
}

.frr-body .frr-check:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.frr-body .frr-sec:nth-child(3) .frr-check .t,
.frr-body .frr-check .t {
  grid-area: t !important;
  font-family: var(--font-ui, var(--sans)) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
  color: var(--text-1, #e9ecef) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.frr-body .frr-sec:nth-child(3) .frr-check .n,
.frr-body .frr-check .n {
  grid-area: n !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 10px !important;
  color: rgba(255, 255, 255, 0.52) !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

.frr-body .frr-sec:nth-child(3) .frr-check .g,
.frr-body .frr-check .g {
  grid-area: g !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 20px !important;
  padding: 0 4px !important;
  border-radius: 3px !important;
  font-family: var(--font-data, var(--mono)) !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  box-sizing: border-box !important;
}

.frr-body .frr-check.ok .g {
  border: 1px solid rgba(95, 207, 155, 0.45) !important;
  background: rgba(95, 207, 155, 0.12) !important;
  color: #65f2a5 !important;
  box-shadow: 0 0 6px rgba(101, 242, 165, 0.15) !important;
}

.frr-body .frr-check.bad .g {
  border: 1px solid rgba(238, 106, 85, 0.45) !important;
  background: rgba(238, 106, 85, 0.12) !important;
  color: #fc3d21 !important;
  box-shadow: 0 0 6px rgba(252, 61, 33, 0.15) !important;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM GLASS & LIGHT-REACTIVE HUD BEYOND-ORBIT VIEW (#hud, .rail)
   ══════════════════════════════════════════════════════════════ */
#hud {
  background:
    linear-gradient(180deg, rgba(14, 22, 34, 0.88), rgba(7, 11, 18, 0.96))
      padding-box,
    linear-gradient(180deg, rgba(91, 155, 255, 0.28), rgba(255, 255, 255, 0.04))
      border-box !important;
  border-top: 1px solid transparent !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(130%) !important;
  box-shadow:
    0 -12px 36px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.rails {
  background: rgba(255, 255, 255, 0.05) !important;
  gap: 1px !important;
}

.rail {
  background: radial-gradient(
    circle 450px at var(--sun-pos-x, 50%) var(--sun-pos-y, 0%),
    rgba(25, 42, 68, calc(0.24 * var(--sun-intensity, 0.75) + 0.12)) 0%,
    rgba(10, 16, 26, 0.78) 55%,
    rgba(6, 10, 17, 0.9) 95%
  ) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: all 0.16s ease !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.rail:hover {
  background: radial-gradient(
    circle 450px at var(--sun-pos-x, 50%) var(--sun-pos-y, 0%),
    rgba(35, 58, 92, calc(0.32 * var(--sun-intensity, 0.75) + 0.18)) 0%,
    rgba(14, 22, 35, 0.84) 55%,
    rgba(8, 13, 22, 0.94) 95%
  ) !important;
}

.rail .bar {
  background: rgba(255, 255, 255, 0.09) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM BEYOND-ORBIT BAR INTERACTIVE HOVER REACTIONS (.rail:hover)
   ══════════════════════════════════════════════════════════════ */
.rail {
  position: relative !important;
  overflow: hidden !important;
  transition:
    transform 0.18s var(--ease),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease !important;
}

.rail::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(
    circle 180px at var(--sun-pos-x, 50%) var(--sun-pos-y, 30%),
    rgba(255, 255, 255, 0.12),
    transparent 75%
  ) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease !important;
}

.rail:hover {
  transform: translateY(-2.5px) !important;
  border-top: 1px solid rgba(130, 190, 255, 0.65) !important;
  box-shadow:
    0 -6px 20px rgba(0, 0, 0, 0.5),
    0 -2px 10px rgba(91, 155, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  z-index: 5 !important;
}

.rail:hover::before {
  opacity: 1 !important;
}

.rail:hover .nm {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

.rail:hover .val-txt {
  color: #ffffff !important;
  text-shadow: 0 0 12px rgba(130, 190, 255, 0.6) !important;
}

.rail:hover .bar {
  background: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1) !important;
}

.rail:hover .bar i {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(101, 242, 165, 0.75)) !important;
}

.rail.caution:hover .bar i {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(255, 176, 0, 0.75)) !important;
}

.rail.over:hover .bar i {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(252, 61, 33, 0.75)) !important;
}

/* ══════════════════════════════════════════════════════════════
   LAUNCH CONSOLE SELECTIVE STAGE-LIGHT REACTIVITY
   Only applied to selected components (.lv.on)
   ══════════════════════════════════════════════════════════════ */
.lv-list-panel .lv.on {
  position: relative !important;
  border-color: rgba(101, 242, 165, 0.65) !important;
  background: radial-gradient(
    circle 320px at var(--sun-pos-x, 80%) var(--sun-pos-y, 25%),
    rgba(101, 242, 165, calc(0.24 * var(--sun-intensity, 0.75) + 0.12)) 0%,
    rgba(16, 38, 30, 0.85) 60%,
    rgba(8, 20, 16, 0.95) 100%
  ) !important;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(101, 242, 165, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 3px 0 0 #65f2a5 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.lv-list-panel .lv.on::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    calc(var(--sun-pos-x, 80%) * 1.8deg),
    rgba(255, 255, 255, 0.14) 0%,
    transparent 55%
  ) !important;
  pointer-events: none !important;
  border-radius: inherit !important;
}

.minimap-action-btn:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.4);
}

/* ── Competitive Challenge Match (Phase 2) ── */
.match-teams-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: rgba(14, 20, 32, 0.7);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 12px 14px;
  beyond-orbit-bottom: 12px;
}
.match-team-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.match-vs-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--amber);
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.match-verdict-box {
  border-radius: 6px;
  padding: 10px 14px;
  beyond-orbit-bottom: 12px;
}

/* ── Aerospace Modal Design System (Obsidian Dark-Glass & Phosphor Emerald) ── */
.mbox.modal-wide {
  max-width: 780px !important;
  width: 94vw !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid rgba(101, 242, 165, 0.22) !important;
  border-top: 1px solid rgba(101, 242, 165, 0.5) !important;
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.95),
    0 0 30px rgba(101, 242, 165, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.mbox.modal-wide > h3,
.mbox.academy-wide > h3 {
  display: none !important;
}

.modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(
    180deg,
    rgba(14, 18, 24, 0.96) 0%,
    rgba(8, 11, 16, 0.99) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}
.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.modal-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--phosphor, #65f2a5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.modal-title {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
  beyond-orbit: 0;
}
.modal-close-icon {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(101, 242, 165, 0.4);
}
.modal-scroll-body {
  padding: 16px 20px 20px 20px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.modal-scroll-body::-webkit-scrollbar {
  width: 5px;
}
.modal-scroll-body::-webkit-scrollbar-track {
  background: transparent !important;
}
.modal-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 4px !important;
}
.modal-scroll-body::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 242, 165, 0.45) !important;
}
.modal-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 22px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 16, 0.98);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
  gap: 12px;
  flex-shrink: 0;
}
.modal-bottom-bar .btn {
  beyond-orbit-bottom: 2px !important;
}
.modal-status-text {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.08em;
}

/* Provenance / Citations Cards */
.prov-card {
  background: rgba(16, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 10px 14px;
  beyond-orbit-bottom: 8px;
  transition: all 0.15s ease;
}
.prov-card:hover {
  border-color: rgba(101, 242, 165, 0.3);
  background: rgba(22, 28, 38, 0.7);
}
.prov-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  beyond-orbit-bottom: 4px;
}
.prov-card-title {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.prov-card-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  display: block;
  beyond-orbit-bottom: 3px;
  word-break: break-all;
}
.prov-card-simp {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.prov-section-header {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--phosphor, #65f2a5);
  beyond-orbit: 18px 0 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 4px;
}
.prov-intro-card {
  background: rgba(101, 242, 165, 0.06);
  border: 1px solid rgba(101, 242, 165, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--bone);
  beyond-orbit-bottom: 14px;
}
.prov-abstractions-box {
  background: rgba(12, 16, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prov-abs-item {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
}

/* How It Works Steps & Glossary */
.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  beyond-orbit-bottom: 14px;
}
@media (max-width: 650px) {
  .how-steps-grid {
    grid-template-columns: 1fr;
  }
}
.how-step-card {
  display: flex;
  gap: 12px;
  background: rgba(16, 20, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 12px;
}
.how-step-num {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(101, 242, 165, 0.12);
  border: 1px solid rgba(101, 242, 165, 0.3);
  color: var(--phosphor, #65f2a5);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.how-step-content b {
  display: block;
  font-size: 13px;
  color: #fff;
  beyond-orbit-bottom: 3px;
  font-weight: 600;
}
.how-step-content p {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
  beyond-orbit: 0;
}
.how-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--dim);
  padding: 8px 12px;
  background: rgba(4, 7, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  beyond-orbit-bottom: 14px;
  flex-wrap: wrap;
}
.how-glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 700px) {
  .how-glossary-grid {
    grid-template-columns: 1fr;
  }
}
.glossary-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(12, 16, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.glossary-term {
  font-family: var(--mono);
  color: var(--bone);
  font-weight: 600;
  font-size: 11.5px;
}
.glossary-def {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}

/* Cadet Flight School Interactive Tour (Phase 3 - High-Fidelity Flight Academy) */
.mbox.academy-wide {
  max-width: 900px !important;
  width: min(900px, 96vw) !important;
  max-height: 98vh !important;
  height: auto !important;
  border: 1px solid rgba(101, 242, 165, 0.22) !important;
  border-top: 1px solid rgba(101, 242, 165, 0.5) !important;
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.95),
    0 0 30px rgba(101, 242, 165, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.mbox.academy-wide > h3 {
  display: none !important;
}

/* Academy Header Bar (Obsidian Dark-Glass & Phosphor Emerald) */
.academy-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px !important;
  background: linear-gradient(
    180deg,
    rgba(14, 18, 24, 0.96) 0%,
    rgba(8, 11, 16, 0.99) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.academy-brand-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.academy-logo {
  font-family: var(--font-display, "Instrument Sans", sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.16em;
}
.academy-subhead {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--phosphor, #65f2a5);
  letter-spacing: 0.08em;
}
.academy-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.academy-mod-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--phosphor, #65f2a5);
  background: rgba(101, 242, 165, 0.1);
  border: 1px solid rgba(101, 242, 165, 0.3);
  padding: 2.5px 7px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

/* Academy Body - Zero Scroll Standard */
.academy-card-body {
  padding: 10px 18px 14px 18px !important;
  max-height: none !important;
  overflow: hidden !important;
}

.tour-stepper-nav {
  display: flex;
  gap: 6px;
  beyond-orbit-bottom: 8px !important;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 6px !important;
  overflow-x: auto;
}
.tour-step-pill {
  flex: 1;
  min-width: 90px;
  padding: 5px 8px !important;
  font-family: var(--mono);
  font-size: 10px !important;
  background: rgba(16, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--dim);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.tour-step-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--bone);
  border-color: rgba(101, 242, 165, 0.35);
}
.tour-step-pill.active {
  background: rgba(101, 242, 165, 0.12);
  border-color: var(--phosphor, #65f2a5);
  color: var(--phosphor, #65f2a5);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(101, 242, 165, 0.2);
}

/* Academy Visual Frame */
.academy-main-frame {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px !important;
  background: linear-gradient(
    180deg,
    rgba(12, 16, 22, 0.9),
    rgba(6, 8, 12, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px !important;
  beyond-orbit-bottom: 8px !important;
}
@media (max-width: 760px) {
  .academy-main-frame {
    grid-template-columns: 1fr;
  }
}

.academy-left-pane {
  display: flex;
  flex-direction: column;
  gap: 6px !important;
}
.academy-right-pane {
  display: flex;
  flex-direction: column;
  gap: 6px !important;
  background: rgba(4, 7, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px !important;
}

.academy-svg-wrap {
  width: 100%;
  background: #020408;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8);
}
.academy-svg-wrap svg {
  display: block;
  width: 100%;
  max-height: 142px !important;
  height: auto;
  object-fit: contain;
}

.academy-toy-btn {
  background: rgba(16, 20, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 5px 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.academy-toy-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(101, 242, 165, 0.35);
}
.academy-toy-btn.sel {
  background: rgba(101, 242, 165, 0.1);
  border-color: var(--phosphor, #65f2a5);
}
.academy-toy-btn-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px !important;
  color: var(--bone);
  font-weight: 600;
}
.academy-toy-btn.sel .academy-toy-btn-title {
  color: var(--phosphor, #65f2a5);
}
.academy-toy-btn-desc {
  font-size: 10px !important;
  color: var(--dim);
  beyond-orbit-top: 2px !important;
  line-height: 1.25 !important;
}

.academy-readout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px !important;
  padding: 2.5px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.academy-readout-row:last-child {
  border-bottom: none;
}
.academy-readout-row .k {
  color: var(--dim);
}
.academy-readout-row .v {
  color: var(--bone);
  font-weight: 600;
}

.academy-rule-callout {
  background: rgba(101, 242, 165, 0.08);
  border: 1px solid rgba(101, 242, 165, 0.25);
  border-left: 3px solid var(--phosphor, #65f2a5);
  border-radius: 4px;
  padding: 5px 8px !important;
  beyond-orbit-top: 6px !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  color: var(--bone);
}

/* Planet Destination Selector Buttons */
.tour-orbit-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(5, 7, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  beyond-orbit: 6px 0;
}
.tour-planet-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(16, 20, 28, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--bone);
}
.tour-planet-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(101, 242, 165, 0.35);
}
.tour-planet-btn.sel {
  background: rgba(101, 242, 165, 0.12);
  border-color: var(--phosphor, #65f2a5);
  box-shadow: 0 0 10px rgba(101, 242, 165, 0.25);
}
.tour-planet-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  beyond-orbit-bottom: 2px;
}

/* ── Sharp Aerospace Instrument Button Standard ── */
.btn,
.btn-sm,
.btn.primary,
.btn.ghost,
.btn.nominal,
button.btn,
.sel-tools button.btn,
body.brief-active .btn,
body.build-active .btn,
body.launch-active .btn {
  border-radius: 3px !important;
}
