:root { color-scheme: dark; font: 14px/1.5 system-ui, sans-serif; color: #e1eaf3; background: #080f1b; }
* { box-sizing: border-box; }
body { margin: 0; display: flex; height: 100dvh; }
#info { width: 400px; flex-shrink: 0; padding: 24px; overflow-y: auto; border-right: 1px solid #263448; background: #0d1726; z-index: 1; }
header { margin-bottom: 16px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; color: #6de2b4; }
h1 { font-size: 23px; margin: 8px 0; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-size: 14px; font-weight: 600; margin: 24px 0 8px; }
label, dt { display: block; font-size: 12px; color: #9fb0c5; margin-bottom: 6px; }
input, select, button { font: inherit; color: inherit; border: 1px solid #3d5068; border-radius: 5px; background: #142235; padding: 7px 9px; }
button, select { cursor: pointer; }
button:hover, button[aria-pressed="true"] { background: #25435b; border-color: #6de2b4; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #6de2b4; outline-offset: 2px; }
.load-row { display: flex; gap: 6px; }
input { min-width: 0; width: 100%; }
select { width: 100%; }
#status, #load-status { font-size: 12px; color: #9fb0c5; overflow-wrap: anywhere; }
#load-status.error { color: #ffb5a5; }
#picker-feasibility { padding: 10px; border-left: 3px solid #e8bc75; color: #e8cda5; background: #241f1a; font-size: 12px; overflow-wrap: anywhere; }
#narrative { margin: 20px 0; padding: 16px 0; border-block: 1px solid #263448; overflow-wrap: anywhere; }
#narrative h2 { margin: 0 0 12px; color: #6de2b4; font-size: 16px; }
#narrative h3 { margin: 18px 0 6px; font-size: 13px; color: #acbed1; }
#narrative p { margin: 0; font-size: 14px; line-height: 1.65; }
.narrative-event, .narrative-scenario { white-space: pre-line; }
.headline { margin: 20px 0 12px; }
dd { font-size: 28px; margin: 0 0 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#percent { font-size: 18px; color: #6de2b4; }
#target-progress h2 { margin-top: 12px; }
#gap { font-size: 12px; font-variant-numeric: tabular-nums; margin: 6px 0; overflow-wrap: anywhere; }
progress { display: block; width: 100%; height: 10px; accent-color: #6de2b4; }
#context, #summary, .muted { font-size: 12px; color: #9fb0c5; }
.card { margin: 12px 0; border: 1px solid #263448; border-radius: 8px; overflow-wrap: anywhere; }
.card > summary { padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.card > summary:hover { background: #142235; }
.card[open] > summary { border-bottom: 1px solid #263448; }
.card-content { padding: 12px; min-width: 0; }
#advanced { margin-top: 16px; }
#advanced p, #warnings { font-size: 12px; color: #9fb0c5; }
#full-story-card p { margin: 0; line-height: 1.65; }
#full-story-card h3 { margin: 18px 0 6px; font-size: 13px; color: #acbed1; }
#travel-time { margin: 20px 0; }
.travel-highlights section { padding: 10px 12px; background: #142235; border-left: 2px solid #6de2b4; margin: 8px 0; }
.travel-highlights h3 { margin: 0 0 4px; font-size: 13px; }
.travel-highlights p { margin: 0; font-size: 12px; color: #9fb0c5; }
.travel-highlights strong { color: #6de2b4; font-size: 16px; font-variant-numeric: tabular-nums; }
#travel-card table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
#travel-card caption { text-align: left; color: #9fb0c5; margin-bottom: 8px; }
#travel-card th, #travel-card td { padding: 8px 3px; border-bottom: 1px solid #263448; text-align: right; vertical-align: top; }
#travel-card th { font-weight: 500; }
#travel-card th:first-child { width: 42%; padding-left: 0; text-align: left; overflow-wrap: anywhere; }
#travel-card td { white-space: nowrap; font-variant-numeric: tabular-nums; }
#travel-card thead { color: #9fb0c5; }
#travel-card td:last-child { color: #6de2b4; }
.milestone-distance { display: block; color: #9fb0c5; font-weight: 400; }
.playback-controls { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin-top: 16px; }
.playback-controls button { grid-row: span 2; }
.playback-controls label { margin: 0; }
#time { padding: 0; accent-color: #6de2b4; }
#playback-time { font-size: 12px; color: #9fb0c5; font-variant-numeric: tabular-nums; }
button:disabled, input:disabled { opacity: .5; cursor: default; }
#events { padding: 0; list-style: none; }
#events li { margin: 6px 0; }
#events button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font-size: 12px; overflow-wrap: anywhere; border-left: 4px solid var(--leg-color); }
#events button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leg-color); flex-shrink: 0; }
#events button:hover, #events button[aria-pressed="true"] { border-color: var(--leg-color); background: #1c3148; background: color-mix(in srgb, var(--leg-color) 18%, #142235); }
#events button:focus-visible { outline-color: var(--leg-color); }
#warnings { padding-left: 18px; }
#warnings li { margin-bottom: 8px; }
#viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; }
#plot, #markers { position: absolute; inset: 0; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orbit-anchor { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #c7d5e6; transform: translate(-50%, -50%); }
.orbit-leader, .body-leader { position: absolute; height: 1px; background: #9fb0c5; transform-origin: left center; }
.body-leader { background: #ffd68a; }
.scene-label { position: absolute; z-index: 1; margin: 0; padding: 2px 6px; border-radius: 4px; background: #080f1be8; color: #c7d5e6; font-size: 14px; line-height: 20px; white-space: nowrap; }
.body-label { color: #ffd68a; font-weight: 600; }
.body-marker { position: absolute; z-index: 1; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); background: #ffd68a; border: 2px solid #ffe9bc; box-shadow: 0 0 12px #ffc45b80; }
canvas { display: block; width: 100%; height: 100%; }
#markers { pointer-events: none; }
#markers button { position: absolute; pointer-events: auto; padding: 1px 6px; font-size: 11px; font-weight: 600; border-width: 2px; transform: translate(-50%, -50%); border-radius: 50%; }
#markers button[aria-pressed="true"] { background: #25435b; box-shadow: 0 0 0 2px #080f1b; transform: translate(-50%, -50%) scale(1.12); z-index: 1; }
#view-note { position: absolute; bottom: 12px; left: 18px; right: 18px; margin: 0; font-size: 12px; color: #acbed1; pointer-events: none; }
noscript { padding: 24px; }
@media (max-width: 900px) {
  body { flex-direction: column; height: auto; min-height: 100dvh; padding: 16px; background: #0d1726; }
  /* Flatten the sidebar groups so the plot can follow the headline/target block. */
  #info, #hud:not([hidden]) { display: contents; }
  #viewport { order: 1; flex: none; height: 45vh; width: calc(100% + 32px); margin: 16px -16px 0; }
  .playback-controls, #playback-time, #travel-panel, #story-panel, #analysis-panels, #advanced { order: 2; }
  header { margin-bottom: 12px; }
}
.toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input { width: auto; }
