:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #0a0c11;
  color: #eef2fb;
  --muted: #9aa8bd;
  --line: #232d3f;
  --accent: #a1c4ff;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 32% 0%, #142039 0, transparent 630px); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(1180px, 100% - 64px); margin-inline: auto; }
.mast { min-height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 11px; align-items: center; font-size: 17px; font-weight: 690; }
.help-link { color: var(--muted); font-size: 13px; padding: 10px 0 10px 10px; }
.help-link:hover { color: #fff; }
.help-link span { color: var(--accent); margin-left: 5px; }
.intro { padding: clamp(32px, 5vw, 58px) 0 27px; }
.eyebrow, .scope-head, .telemetry span, .guide-index, footer {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: .095em;
  color: var(--muted);
}
.intro .eyebrow { color: #b4c9ef; display: flex; align-items: center; gap: 9px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #8fb8ff; box-shadow: 0 0 12px #669dff; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 6vw, 76px); letter-spacing: -.069em; line-height: 1.05; margin: 11px 0 12px; }
.intro p { color: #b1bed2; font-size: clamp(14px, 2vw, 18px); }
.console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  border: 1px solid #303c52;
  border-radius: 17px;
  overflow: hidden;
  background: #0e131e;
  box-shadow: 0 22px 60px #0007;
}
.scope { min-width: 0; background: #0c111b; display: flex; flex-direction: column; }
.scope-head, .legend { display: flex; align-items: center; gap: 12px; padding: 12px 17px; min-height: 41px; }
.scope-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.scope-symbol { margin-right: 6px; color: var(--accent); font-size: 14px; vertical-align: -1px; }
.field-wrap { flex: 1; display: flex; align-items: center; background: radial-gradient(ellipse at 58% 47%, #16243b, #0a0f19 74%); }
#field { display: block; width: 100%; height: auto; cursor: crosshair; user-select: none; }
.launch-point { touch-action: none; cursor: grab; }
.launch-point:active { cursor: grabbing; }
.map-frame { fill: none; stroke: #475977; }
.map-frame text, .map-label { fill: #a4b4ce; stroke: none; font: 600 12px var(--mono); letter-spacing: .08em; }
.planet-band { fill: none; stroke: #7188b3; stroke-opacity: .25; }
.planet-edge { fill: url(#planet-fill); stroke: #687b9f; }
.planet-arc { fill: none; stroke: #8196bc; stroke-opacity: .2; }
.gate-ring { fill: #a7bde713; stroke: #8598bb; stroke-width: 1.4; stroke-dasharray: 4 5; }
.gate.cleared .gate-ring { fill: #8ab6ff2a; stroke: #b2d0ff; stroke-dasharray: none; }
.station-ring { fill: #83b0ff16; stroke: #a1c4ff; stroke-width: 1.5; }
.station-aura { fill: none; stroke: #a1c4ff55; stroke-dasharray: 4 6; }
.station-mark, .probe { fill: #d6e7ff; filter: drop-shadow(0 0 5px #80aaff99); }
.probe, .trace, .previous, .preview, .vector { pointer-events: none; }
.trace, .previous, .preview, .vector { fill: none; stroke-linecap: round; }
.trace { stroke: #a1c4ff; stroke-width: 2.2; }
.previous { stroke: #7186a7; stroke-width: 1.4; opacity: .64; }
.preview { stroke: #b5ceff; stroke-dasharray: 2 7; stroke-width: 1.6; opacity: .55; }
.vector { stroke: #8fb8ff; stroke-width: 1.7; }
.legend { flex-wrap: wrap; gap: 7px 18px; border-top: 1px solid var(--line); color: #a8b5c9; font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border: 1px solid #9aaacc; border-radius: 50%; }
.legend-dot.start { width: 7px; height: 7px; background: #b5d2ff; border-color: #b5d2ff; }
.legend-dot.checkpoint { border-style: dashed; }
.legend-dot.station { border-color: #a1c4ff; border-radius: 2px; transform: rotate(45deg); }
.controls { border-left: 1px solid var(--line); padding: 21px 20px; display: flex; flex-direction: column; background: linear-gradient(180deg,#131a27,#0e141e); }
.mission-head .eyebrow { display: flex; justify-content: space-between; }
.mission-head h2 { font-size: 23px; line-height: 1.16; letter-spacing: -.04em; margin: 12px 0 8px; }
.mission-head p { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 39px; }
.telemetry { display: grid; grid-template-columns: 1fr 1fr; margin: 19px 0 21px; border: 1px solid var(--line); border-radius: 8px; background: #0c111a; }
.telemetry div { padding: 9px 11px; }
.telemetry div + div { border-left: 1px solid var(--line); }
.telemetry span { font-size: 9px; display: block; }
.telemetry output { display: block; margin-top: 4px; font: 600 20px var(--mono); }
.sliders { display: grid; gap: 10px; }
.slider > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #c3cfe2; font-size: 13px; }
.slider output { color: var(--accent); font: 600 12px var(--mono); white-space: nowrap; }
.slider input { display: block; width: 100%; margin: 3px 0 0; height: 26px; accent-color: #92baff; cursor: pointer; }
.slider input:disabled { cursor: default; opacity: .56; }
.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }
.primary, .secondary { min-height: 43px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 690; }
.primary { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; color: #111a2b; background: #a6c8ff; text-align: left; }
.primary:hover:not(:disabled) { background: #c7ddff; }
.primary:disabled { color: #aebbd3; background: #26344c; cursor: default; }
.launch-icon { font-size: 18px; }
.secondary { width: 43px; background: #141d2c; color: #c4d3ee; border-color: #34415a; font-size: 20px; }
.secondary:hover { background: #1d2b41; }
.status { min-height: 2.7em; padding-top: 10px; color: #acbad0; font-size: 12px; line-height: 1.4; }
.status[data-state="success"] { color: var(--accent); }
.status[data-state="failure"] { color: #f2c4b5; }
.guide { margin: 33px 0 28px; padding: 24px 0; border-block: 1px solid var(--line); display: grid; grid-template-columns: .9fr repeat(3, 1fr); gap: 26px; scroll-margin-top: 16px; }
.guide h2 { font-size: 24px; letter-spacing: -.04em; margin-top: 7px; }
.guide h3 { font-size: 15px; margin: 7px 0 5px; }
.guide p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.guide-index { color: var(--accent); }
footer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 27px; }
footer span:last-child { letter-spacing: 0; font: 12px system-ui, sans-serif; }

@media (max-width: 900px) {
  .shell { width: calc(100% - 36px); }
  .console { grid-template-columns: minmax(0, 1fr) 234px; }
  .controls { padding-inline: 15px; }
  .guide { gap: 16px; }
}
@media (max-width: 720px) {
  .mast { min-height: 61px; }
  .console { grid-template-columns: 1fr; }
  .controls { border-left: 0; border-top: 1px solid var(--line); padding: 16px; }
  .mission-head p { min-height: auto; }
  .telemetry { margin: 13px 0; }
  .sliders { grid-template-columns: 1fr 1fr; gap: 16px; }
  .actions { padding-top: 10px; }
  .guide { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .shell { width: calc(100% - 26px); }
  .intro { padding-bottom: 19px; }
  .scope-head, .legend { padding-inline: 12px; }
  .legend { gap: 6px 12px; }
  .guide { grid-template-columns: 1fr; gap: 15px; margin-top: 24px; }
}
