:root {
  color-scheme: dark;
  --ink: #e9f2ef;
  --muted: #81918e;
  --faint: #4e5e5c;
  --line: #263735;
  --panel: #0d1719;
  --panel-soft: #101e20;
  --canvas: #081114;
  --cyan: #5de1cf;
  --amber: #f7b95e;
  --coral: #ff8067;
  --green: #78df9b;
  --shadow: rgba(0, 0, 0, .24);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #071012; color: var(--ink); }
body { font-family: "Segoe UI", "Noto Sans SC", sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; }
button, label, input[type="range"] { cursor: pointer; }
.app-shell { min-height: 100vh; background-color: #071012; background-image: linear-gradient(rgba(74, 118, 113, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(74, 118, 113, .055) 1px, transparent 1px); background-size: 32px 32px; }
.topbar { min-height: 82px; padding: 18px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(7, 16, 18, .92); }
.brand-lockup, .topbar-meta, .toolbar-right, .legend-item, .status-chip, .utc-readout { display: flex; align-items: center; }
.brand-lockup { gap: 13px; }
.brand-mark { width: 31px; height: 31px; position: relative; border: 1px solid var(--cyan); transform: rotate(45deg); display: grid; place-items: center; }
.brand-mark span { position: absolute; width: 20px; height: 1px; background: var(--cyan); transform: rotate(-45deg); }
.brand-mark span:nth-child(2) { width: 11px; transform: rotate(45deg); background: var(--amber); }
.brand-mark span:nth-child(3) { width: 1px; height: 20px; transform: rotate(-45deg); background: var(--coral); }
.eyebrow, .section-kicker, .field-label, .map-overlay span, .metric span, .footer-bar, .filter-label, .timeline-head, .field-hint { font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow { color: var(--cyan); font-size: 10px; margin: 0 0 3px; }
h1, h2, p { margin: 0; }
h1 { font: 600 21px Georgia, serif; letter-spacing: .015em; }
h1 span { color: var(--muted); font: 400 15px "Cascadia Mono", monospace; }
h2 { margin-top: 4px; font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.topbar-meta { gap: 22px; color: var(--muted); font: 11px "Cascadia Mono", monospace; }
.status-chip { gap: 7px; border: 1px solid #2d514c; padding: 7px 9px; color: var(--green); font-size: 10px; }
.status-chip i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px var(--green); }
.utc-readout { gap: 9px; }
.utc-readout strong { color: var(--ink); font-size: 13px; }
.dashboard { max-width: 1680px; margin: 0 auto; padding: 22px 28px 26px; display: grid; grid-template-columns: 286px minmax(460px, 1fr) 286px; gap: 18px; }
.panel-section, .main-stage { min-width: 0; }
.panel-section { padding: 4px 0; }
.section-heading, .stage-toolbar, .timeline-head, .timeline-scale, .metric-strip, .telemetry-row, .sidebar-footer { display: flex; align-items: center; justify-content: space-between; }
.section-heading { margin-bottom: 19px; }
.section-kicker { color: var(--muted); font-size: 9px; line-height: 1.3; }
.section-kicker::before { content: "// "; color: var(--faint); }
.icon-button { width: 29px; height: 29px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.icon-button:hover, .ghost-button:hover { border-color: var(--cyan); color: var(--cyan); }
.field-label { display: block; color: var(--muted); font-size: 9px; margin: 0 0 7px; }
textarea, input, select { color: var(--ink); background: #0a1416; border: 1px solid var(--line); border-radius: 0; outline: none; }
textarea { width: 100%; resize: vertical; min-height: 66px; padding: 10px; line-height: 1.45; font: 11px "Cascadia Mono", Consolas, monospace; margin-bottom: 13px; }
textarea:focus, input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(93, 225, 207, .09); }
.action-button { width: 100%; border: 1px solid var(--cyan); background: var(--cyan); color: #09201e; padding: 10px 12px; font-weight: 700; font-size: 12px; }
.action-button:disabled { cursor: wait; opacity: .65; }
.action-button span { margin-right: 8px; font-size: 15px; }
.validation-message { min-height: 30px; padding-top: 9px; color: var(--green); font: 10px/1.45 "Cascadia Mono", monospace; }
.validation-message.invalid { color: var(--coral); }
.calculate-button { margin-top: 12px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.station-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.station-grid label:first-child { grid-column: span 2; }
.station-grid label, .inline-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font: 10px "Cascadia Mono", monospace; }
.station-grid input, .inline-fields input, .inline-fields select, .wide-input { width: 100%; padding: 8px 9px; font: 11px "Cascadia Mono", monospace; }
.field-hint, .rail-note { color: var(--faint); font-size: 9px; line-height: 1.5; margin-top: 9px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.sidebar-footer { align-items: stretch; flex-direction: column; gap: 9px; margin-top: 22px; }
.file-button, .ghost-button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 9px 11px; font-size: 11px; text-align: center; }
.file-button:hover, .ghost-button:hover { color: var(--cyan); border-color: var(--cyan); }
.file-button span { color: var(--cyan); font-size: 16px; vertical-align: -1px; margin-right: 5px; }
.stage-toolbar { margin: 4px 0 15px; }
.stage-toolbar h2 { font-size: 20px; }
.stage-toolbar h2 span { color: var(--muted); font: 400 11px "Cascadia Mono", monospace; }
.toolbar-right { gap: 15px; font: 10px "Cascadia Mono", monospace; color: var(--muted); }
.legend-item { gap: 6px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.orbit-dot { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.station-dot { background: var(--coral); box-shadow: 0 0 7px var(--coral); }
.map-frame { position: relative; height: min(60vh, 610px); min-height: 380px; border: 1px solid var(--line); background: var(--canvas); overflow: hidden; box-shadow: 0 16px 38px var(--shadow); }
#orbitCanvas { display: block; width: 100%; height: 100%; }
.map-overlay { position: absolute; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.map-overlay span { color: var(--faint); font-size: 8px; }
.map-overlay strong { color: var(--muted); font: 10px "Cascadia Mono", monospace; }
.top-left { left: 15px; top: 13px; }.bottom-right { right: 15px; bottom: 13px; text-align: right; }
.canvas-no-data { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 11px "Cascadia Mono", monospace; }
.timeline-block { padding: 15px 2px 2px; }
.timeline-head { gap: 12px; justify-content: flex-start; color: var(--muted); font-size: 10px; }
.timeline-head strong { color: var(--ink); font-size: 11px; font-weight: 500; }.timeline-head > span:last-child { margin-left: auto; color: var(--faint); }
input[type="range"] { width: 100%; accent-color: var(--cyan); margin: 13px 0 4px; }
.timeline-scale { color: var(--faint); font: 9px "Cascadia Mono", monospace; }
.metric-strip { align-items: stretch; margin-top: 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { flex: 1; padding: 14px 12px; border-right: 1px solid var(--line); min-width: 0; }.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 7px; }.metric strong { font: 600 19px "Cascadia Mono", monospace; color: var(--ink); }.metric small { color: var(--faint); font: 9px "Cascadia Mono", monospace; margin-left: 4px; }
.mini-badge, .count-badge { color: var(--amber); border: 1px solid #624a2b; padding: 5px 7px; font: 9px "Cascadia Mono", monospace; }.count-badge { min-width: 24px; text-align: center; color: var(--cyan); border-color: #285b55; }
.telemetry-card { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px 0; }.telemetry-row { min-height: 34px; border-bottom: 1px solid rgba(38,55,53,.7); font: 10px "Cascadia Mono", monospace; color: var(--muted); gap: 10px; }.telemetry-row:last-child { border-bottom: 0; }.telemetry-row strong { color: var(--ink); font-weight: 500; text-align: right; }.accent-green { color: var(--green) !important; }
.pass-heading { margin-bottom: 15px; }.filter-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }.filter-label output { color: var(--amber); }.pass-list { display: grid; gap: 7px; margin-top: 10px; max-height: 330px; overflow: auto; padding-right: 3px; }.pass-card { padding: 10px; border: 1px solid var(--line); background: rgba(16,30,32,.72); }.pass-card:hover { border-color: #46736d; }.pass-card.primary { border-color: #5d6642; }.pass-card-head, .pass-times { display: flex; justify-content: space-between; gap: 8px; }.pass-card-head { font: 9px "Cascadia Mono", monospace; color: var(--muted); }.pass-card-head strong { color: var(--amber); font-weight: 500; }.pass-times { margin-top: 9px; }.pass-time { display: flex; flex-direction: column; gap: 3px; }.pass-time span { color: var(--faint); font: 8px "Cascadia Mono", monospace; }.pass-time strong { color: var(--ink); font: 10px "Cascadia Mono", monospace; }.empty-pass { color: var(--muted); border: 1px dashed var(--line); padding: 16px 10px; font: 10px/1.5 "Cascadia Mono", monospace; }
.footer-bar { max-width: 1680px; margin: 0 auto; padding: 0 28px 19px; display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 8px; }.footer-bar span:last-child { color: var(--muted); }
@media (max-width: 1120px) { .dashboard { grid-template-columns: 240px minmax(430px, 1fr); }.right-rail { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; }.right-rail > .divider, .right-rail > .rail-note { display: none; }.pass-list { max-height: 250px; } }
@media (max-width: 760px) { .topbar { align-items: flex-start; padding: 17px 16px; }.topbar-meta { flex-direction: column; align-items: flex-end; gap: 7px; }.dashboard { display: block; padding: 16px; }.sidebar, .right-rail { display: block; margin-bottom: 24px; }.main-stage { margin-bottom: 24px; }.map-frame { height: 58vw; min-height: 300px; }.stage-toolbar { align-items: flex-start; gap: 10px; }.toolbar-right { flex-direction: column; align-items: flex-end; gap: 6px; }.metric strong { font-size: 15px; }.metric { padding: 12px 8px; }.metric small { display: block; margin: 4px 0 0; }.footer-bar { padding: 0 16px 16px; flex-wrap: wrap; }.footer-bar span:last-child { width: 100%; } }
@media (max-width: 460px) { h1 { font-size: 18px; } h1 span { display: block; margin-top: 3px; font-size: 10px; }.brand-mark { width: 25px; height: 25px; }.utc-readout { display: none; }.stage-toolbar h2 { font-size: 17px; }.timeline-head { flex-wrap: wrap; }.timeline-head > span:last-child { margin-left: 0; width: 100%; }.metric-strip { display: grid; grid-template-columns: 1fr 1fr; }.metric { border-bottom: 1px solid var(--line); }.metric:nth-child(2) { border-right: 0; }.metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; } }
