:root {
  --bg: #03060d; --panel: #0a1426e6; --panel-solid: #0a1426; --line: #1b3354; --line-2: #24466f;
  --text: #eaf3ff; --muted: #b0c1d8; --cyan: #4fd8ff; --blue: #2f7dff; --amber: #ffb547;
  --fav: #3ddc97; --mod: #ffc94d; --unf: #ff6b6b; --ins: #b2c1d5;
  --side: 248px; --top: 80px;
  --font-body: 15px; --font-secondary: 13px; --font-meta: 13px;
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: var(--font-body); line-height: 1.5; color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
.mono, td, .num { font-family: 'IBM Plex Mono', monospace; }

/* --- loading --- */
#loading { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 40%, #0b1a33, #02040a 70%); display: grid; place-items: center; transition: opacity .6s; }
#loading.done { opacity: 0; pointer-events: none; }
.ld-inner { text-align: center; } .ld-inner h2 { letter-spacing: .12em; font-weight: 600; margin: 24px 0 0; } .ld-inner p { color: var(--muted); } .ld-inner .ld-subtitle { margin: 2px 0 6px; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.ld-orbit { width: 90px; height: 90px; border: 1px solid var(--line-2); border-radius: 50%; margin: auto; position: relative; animation: spin 2.4s linear infinite; }
.ld-orbit span { position: absolute; width: 12px; height: 12px; background: var(--cyan); border-radius: 50%; top: -6px; left: 39px; box-shadow: 0 0 14px var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- shell --- */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); background: linear-gradient(180deg, #071021, #050b17); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0; color: var(--cyan); }
.sidebar-head, nav, .side-foot { flex-shrink: 0; }
.sidebar-head { padding: 24px 20px 22px; }
.brand b { display: block; letter-spacing: .28em; color: var(--text); font-size: 15px; } .brand span { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
nav { display: flex; flex-direction: column; gap: 8px; padding: 0 14px; }
nav button { background: #0c182b; border: 1px solid #203754; text-align: left; padding: 10px 12px; min-height: 46px; border-radius: 8px; color: #d3e1f3; cursor: pointer; display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 500; box-shadow: inset 0 1px 0 #ffffff05; }
nav button i { font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #9bb2cf; }
nav button:hover { background: #142a46; border-color: #365d86; color: #fff; }
nav button.active { background: #183b65; border-color: #427da8; color: #fff; font-weight: 600; }
nav button.active i { color: var(--cyan); }
.side-foot { margin-top: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: var(--font-secondary); color: var(--muted); }
.side-foot > small { font-size: var(--font-meta); line-height: 1.6; }
.site-chip { background: #0c1a30; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 15px; color: var(--text); }
.site-chip small { display: block; color: var(--muted); font-size: var(--font-meta); letter-spacing: .06em; text-transform: uppercase; }
.legend { display: flex; flex-wrap: wrap; gap: 4px; }

.timebar { position: fixed; left: var(--side); right: 0; top: 0; height: var(--top); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 36px 20px; gap: 4px 16px; align-content: center; align-items: center; padding: 8px 16px; background: #050b17; border-bottom: 1px solid var(--line); z-index: 9; }
.time-controls { min-width: 0; display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.timebar .time-controls button { min-height: 34px; padding: 5px 8px; font-size: 13px; }
.timebar input, .timebar select { font-size: 14px; min-height: 34px; padding: 5px 8px; }
#t-input { width: 208px; }
#t-speed { width: 104px; }
.timebar .tb-group label { font-size: 12px; }
.timebar .language-switch { grid-column: 2; grid-row: 1; margin: 0; }
.timebar .language-switch button { min-width: 38px; min-height: 30px; padding: 4px 8px; font-size: 13px; }

.tb-group { display: flex; align-items: center; gap: 6px; }
.tb-group label { font-size: var(--font-meta); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.timebar button, .btn { background: #0e1d36; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 12px; min-height: 42px; cursor: pointer; font-size: var(--font-body); }
.timebar button:hover, .btn:hover { border-color: var(--cyan); }
.primary, .btn.primary { background: linear-gradient(180deg, #1a64d8, #134aa3) !important; border-color: #3d8bff !important; }
input, select { background: #08142a; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px; color-scheme: dark; }
input:focus, select:focus { outline: 1px solid var(--cyan); }
.tb-status { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.tb-status .badge { font-size: 11px; padding: 1px 5px; flex-shrink: 0; }

main { position: fixed; left: var(--side); top: var(--top); right: 0; bottom: 0; }
.page { position: absolute; inset: 0; display: none; }
.page.active { display: block; }
.viewport { position: absolute; inset: 0; isolation: isolate; }
.viewport canvas { display: block; width: 100%; height: 100%; }
.labels-layer { position: absolute; inset: 0; }

/* --- panels --- */
.panel { position: absolute; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(10px); padding: 14px 16px; }
.panel h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.panel h4 { margin: 14px 0 6px; font-size: var(--font-secondary); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; font-size: var(--font-body); }
.kv > span:nth-child(odd) { color: var(--muted); } .kv > span:nth-child(even) { font-family: 'IBM Plex Mono', monospace; text-align: right; }
.note { font-size: var(--font-secondary); color: var(--muted); line-height: 1.65; margin-top: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--font-secondary); color: var(--muted); }
.field input, .field select { font-size: var(--font-body); color: var(--text); width: 100%; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 10px; cursor: pointer; font-size: var(--font-body); color: var(--muted); }
.seg button.on { background: #1a3e70; color: var(--text); }

.badge { display: inline-block; font-size: var(--font-meta); padding: 3px 7px; border-radius: 4px; letter-spacing: .05em; border: 1px solid; font-family: 'IBM Plex Mono', monospace; }
.b-real { color: #6ff0b4; border-color: #2c7a59; background: #0c2b20; }
.b-interpolated { color: #7fd8ff; border-color: #2a6687; background: #0b2433; }
.b-approximate { color: #ffd479; border-color: #7d6327; background: #2b220c; }
.b-illustrative, .b-demo { color: #ff9cc9; border-color: #8a3a63; background: #2d0f1e; }
.b-insufficient { color: #b0bccc; border-color: #4c5a6d; background: #161d27; }

.body-label { color: #cfe6ff; font-size: 14px; letter-spacing: .02em; padding: 2px 6px; margin-top: -26px; cursor: pointer; text-shadow: 0 0 4px #000; pointer-events: auto; user-select: none; }
.body-label:hover { color: var(--cyan); }
.site-label { font-size: 14px; color: #bfe9ff; text-shadow: 0 0 3px #000, 0 0 3px #000; margin-top: -14px; pointer-events: none; }
.sky-label { font-size: 14px; color: #ffe2a8; text-shadow: 0 0 4px #000; font-family: 'IBM Plex Mono', monospace; }
.card-label { font-size: var(--font-body); color: var(--cyan); font-weight: 600; }

.scale-tag { position: absolute; z-index: 2; left: 16px; bottom: 16px; font-size: var(--font-secondary); color: var(--amber); background: #1d1608cc; border: 1px solid #5b4314; padding: 6px 10px; border-radius: 6px; max-width: 560px; line-height: 1.5; }

.list { display: flex; flex-direction: column; gap: 2px; max-height: 210px; overflow: auto; }
.list button { text-align: left; background: none; border: 0; padding: 5px 6px; border-radius: 5px; cursor: pointer; font-size: var(--font-body); color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.list button:hover { background: #12274a; } .list button small { font-size: var(--font-secondary); color: var(--muted); font-family: 'IBM Plex Mono', monospace; }

/* --- layouts for planning/compare/analysis --- */
.split { position: absolute; inset: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); }
.split > .form { overflow: auto; padding: 16px; border-right: 1px solid var(--line); background: #060d1a; }
.split > .work { display: grid; grid-template-rows: minmax(300px, 1fr) 360px; min-height: 0; }
.work .sky { position: relative; min-height: 0; }
.work .bottom { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 0; background: #050b17; }
.chart-box { position: relative; padding: 10px 12px 4px; min-height: 0; }
.events { border-left: 1px solid var(--line); padding: 12px; overflow: auto; font-size: var(--font-secondary); }
.events .ev { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed #15294a; font-family: 'IBM Plex Mono', monospace; }
.ev .sun { color: var(--amber); } .ev .earth { color: var(--cyan); }
.scroll-page { position: absolute; inset: 0; overflow: auto; padding: 22px 26px 60px; }
.scroll-page h2 { margin: 0 0 4px; font-weight: 600; letter-spacing: .02em; } .scroll-page .sub { color: var(--muted); margin: 0 0 18px; font-size: var(--font-body); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; }
.card h4 { margin: 0 0 6px; font-size: var(--font-body); color: var(--text); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.card .big { font-size: 28px; font-family: 'IBM Plex Mono', monospace; }
.card p { font-size: var(--font-body); color: #cbd8e9; line-height: 1.65; margin: 8px 0 0; }
.lvl { position: absolute; top: 14px; right: 14px; font-size: var(--font-meta); padding: 3px 8px; border-radius: 20px; font-weight: 600; letter-spacing: .05em; }
.lvl.favorable { background: #0f3326; color: var(--fav); } .lvl.moderate { background: #33290d; color: var(--mod); }
.lvl.unfavorable { background: #3a1414; color: var(--unf); } .lvl.insufficient { background: #1d242f; color: var(--ins); }
.card.favorable { border-left: 3px solid var(--fav); } .card.moderate { border-left: 3px solid var(--mod); } .card.unfavorable { border-left: 3px solid var(--unf); } .card.insufficient { border-left: 3px solid var(--ins); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0 18px; }
table.data th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 8px; border-bottom: 1px solid var(--line-2); font-size: var(--font-secondary); letter-spacing: .04em; text-transform: uppercase; }
table.data td { padding: 7px 8px; border-bottom: 1px solid #13284a; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.charts .card { height: 300px; }
.err { color: var(--unf); font-size: var(--font-body); margin-top: 8px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
.edu-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px; }
.edu-3d { position: relative; height: 380px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
input[type=range] { accent-color: var(--cyan); padding: 0; }

@media (max-width: 900px) {
  .brand div, nav button span, .side-foot { display: none; }
  .split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: auto; }
  .charts, .edu-hero { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .timebar, .no-print { display: none !important; }
  main, .page, .scroll-page { position: static !important; overflow: visible !important; }
  html, body { overflow: visible; background: #fff; color: #000; }
  .card { break-inside: avoid; background: #fff; color: #000; border-color: #999; }
  .card p, .scroll-page .sub { color: #222; }
}

/* Direct language choice, anchored to the upper-right toolbar. */
.language-switch { display: inline-flex; gap: 2px; padding: 3px; margin-top: 0; border: 1px solid var(--line-2); border-radius: 8px; background: #08142a; }
.language-switch button { min-width: 48px; min-height: 36px; padding: 5px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.language-switch button:hover { background: #132945; color: #fff; }
.language-switch button[aria-pressed="true"] { background: #254e7d; color: #fff; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.timebar .tb-group { flex-shrink: 0; }
.tb-status { min-width: 0; }
.card .lvl { position: static; display: table; margin: 0 0 10px auto; max-width: 100%; }
.card .lvl + h4 { padding-right: 0; overflow-wrap: anywhere; }
.panel, .card, .grid2 > *, .split > * { min-width: 0; }
.panel .kv > span { overflow-wrap: anywhere; }
.events .ev { gap: 12px; flex-wrap: wrap; }
@media (max-width: 1200px) {
  .work .bottom { grid-template-columns: minmax(0, 1fr); grid-template-rows: 280px 180px; overflow: auto; }
  .split > .work { grid-template-rows: minmax(300px, 1fr) 460px; }
  .events { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  :root { --side: 72px; --top: 80px; }
  .sidebar-head { padding: 20px 10px; }
  .brand { justify-content: center; }
  nav { padding: 0 8px; }
  nav button { justify-content: center; padding: 12px 4px; }
  nav button i { font-size: 16px; }
  .timebar { padding: 8px 10px; column-gap: 8px; }
  .time-controls { gap: 12px; }
  .tb-status { font-size: 11px; }
  .split { display: block; }
  .split > .form { overflow: visible; }
  .split > .work { min-height: 900px; height: 900px; }
  .mission-time { grid-template-columns: minmax(0, 1fr) !important; }
  #page-explorer, #page-solar { overflow: auto; }
  #page-explorer .viewport, #page-solar .viewport { position: relative; height: 55vh; min-height: 320px; }
  #page-explorer .panel, #page-solar .panel { position: relative; inset: auto !important; width: auto !important; max-height: none !important; margin: 16px; }
  #page-explorer .scale-tag, #page-solar .scale-tag { position: relative; inset: auto; margin: 16px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}

.mission-time { grid-template-columns: minmax(0, 1fr) 96px; }
.panel-orientation { grid-column: 1 / -1; }
.ex-scale-note { font-size: var(--font-secondary); line-height: 1.6; color: var(--amber); padding-top: 12px; margin: 12px 0 0; border-top: 1px solid var(--line-2); }

/* Explorer: compact controls, clear groups and independently dismissible panels. */
.ex-panel { top: 16px; padding: 0; max-height: calc(100% - 80px); overflow: hidden; display: flex; flex-direction: column; background: #0a1426f5; }
.ex-panel[hidden] { display: none !important; }
.ex-site-panel { left: 16px; width: 304px; }
.ex-view-panel { right: 16px; width: 288px; }
.ex-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ex-panel-head h3 { font-size: 14px; margin: 0; letter-spacing: .08em; }
.panel-close { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.panel-close:hover { color: #fff; border-color: var(--line-2); background: #17304e; }
.ex-panel-body { padding: 14px; display: flex; flex-direction: column; gap: 16px; overflow: auto; min-height: 0; }
.ex-site-fields { display: flex; flex-direction: column; gap: 10px; }
.ex-panel .field { gap: 5px; font-size: 13px; }
.ex-panel .field input { font-size: 14px; padding: 6px 8px; min-height: 34px; }
.ex-panel .btn { font-size: 14px; min-height: 34px; padding: 6px 9px; }
.ex-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-panel .kv { font-size: 14px; gap: 5px 10px; }
.ex-panel .kv > span:nth-child(even) { white-space: nowrap; }
.ex-panel .note { font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
.ex-panel .badge { font-size: 12px; padding: 1px 5px; }
.ex-panel .list { max-height: 180px; gap: 2px; }
.ex-panel .list button { font-size: 14px; padding: 7px 4px; }
.ex-panel .list button small { font-size: 12px; white-space: nowrap; align-self: center; }
.ex-panel h4 { font-size: 12px; letter-spacing: .08em; margin: 0 0 8px; }
.ex-site-list { padding-top: 14px; border-top: 1px solid var(--line); }
.ex-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-presets .btn:last-child { grid-column: 1 / -1; }
.ex-slider-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-slider-title b { font-size: 14px; color: var(--text); }
.ex-relief input[type=range] { padding: 0; }
.ex-overlays { display: grid; gap: 6px; }
.ex-overlays label { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 26px; cursor: pointer; }
.ex-overlays input { margin: 0; accent-color: var(--cyan); width: 15px; height: 15px; }
.ex-source { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.ex-source summary { cursor: pointer; color: #cbd8e9; padding: 2px 0; }
.ex-panel .ex-scale-note { font-size: 13px; line-height: 1.5; margin: 0; padding: 0; border: 0; }
.explorer-tools { position: absolute; z-index: 3; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line-2); border-radius: 9px; background: #08142af5; max-width: calc(100% - 24px); }
.explorer-tools .btn { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; min-height: 34px; padding: 5px 9px; border-color: transparent; background: transparent; }
.explorer-tools .btn[aria-expanded="true"] { background: #173353; border-color: #335c83; }
@media (max-width: 900px) {
  #page-explorer .ex-panel { max-height: none !important; }
  #page-explorer .ex-panel-body { overflow: visible; }
  .explorer-tools { position: sticky; top: 8px; bottom: auto; left: auto; transform: none; width: max-content; margin: 12px auto; }
}

#page-solar > .panel.no-print { max-height: calc(100% - 36px); overflow-y: auto; }
#ss-list .row button { flex: 1; }
#ss-extra .row { margin: 8px 0; flex-wrap: wrap; }

/* Compact navigation and shared panel controls. No layout animation during 3D rendering. */
[hidden] { display: none !important; }
#sidebar-toggle { width: 34px; min-width: 34px; min-height: 32px; padding: 0; margin: 0; font-size: 20px; flex-shrink: 0; }
body.sidebar-compact { --side: 72px; }
.sidebar-compact .sidebar-head { padding: 12px 10px; text-align: center; }
.sidebar-compact .brand { justify-content: center; }
.sidebar-compact .brand div, .sidebar-compact nav button span, .sidebar-compact .side-foot { display: none; }
.sidebar-compact nav { padding: 0 8px; }
.sidebar-compact nav button { justify-content: center; padding: 12px 4px; }
.sidebar-expanded .brand div, .sidebar-expanded nav button span { display: block; }
.sidebar-expanded .side-foot { display: flex; }
.panel-menu { position: absolute; right: 16px; top: 8px; z-index: 8; max-width: calc(100% - 32px); }
.panel-menu > summary { cursor: pointer; padding: 6px 14px; background: #0e1d36; border: 1px solid var(--line-2); border-radius: 6px; }
.panel-menu > div { position: absolute; right: 0; top: calc(100% + 4px); width: 270px; max-width: 80vw; max-height: 65vh; overflow-y: auto; padding: 8px; display: grid; gap: 6px; background: #081326; border: 1px solid var(--line-2); border-radius: 8px; }
.panel-menu button { text-align: left; }
.panel-menu button[aria-expanded=false] { color: var(--muted); border-style: dashed; }
.managed-panel { position: relative; }
.panel.managed-panel { position: absolute; }
.managed-close { position: absolute; right: 6px; top: 6px; z-index: 4; font-size: 22px; background: #0a1426; }
.managed-panel > h3, .managed-panel > h4 { padding-right: 28px; }
.managed-panel > .lvl { margin-right: 28px; }
.page[data-panels-mounted] > .scroll-page { padding-top: 54px; }
#page-solar > .panel { top: 56px !important; max-height: calc(100% - 72px) !important; overflow: auto; }
.chart-box.managed-panel, .events.managed-panel { padding-top: 40px; }
.chart-box.managed-panel::before { content: attr(data-panel-label); position: absolute; top: 10px; left: 12px; right: 36px; font-size: 13px; color: var(--muted); }
.edu-hero:has(> [hidden]) { grid-template-columns: 1fr; }

/* Mission console: horizon view, status instruments, shared time cursor and selectable events. */
.mission-console { top: 48px; grid-template-columns: 320px minmax(0, 1fr); }
.mission-console:has(> .form[hidden]) { grid-template-columns: minmax(0, 1fr); }
.mission-console > .work { grid-template-rows: minmax(320px, 1fr) 240px; }
.mission-console .bottom { grid-template-columns: minmax(0, 1fr) 240px; }
.mission-console .bottom:has(> [hidden]) { grid-template-columns: 1fr; }
.mission-console .work:has(> .bottom > .chart-box[hidden]):has(> .bottom > .events[hidden]) { grid-template-rows: minmax(320px, 1fr); }
.mission-console .bottom:has(> .chart-box[hidden]):has(> .events[hidden]) { display: none; }
.mission-console .sky > .scale-tag { top: auto !important; bottom: 110px !important; font-size: 11px; max-width: calc(100% - 24px); pointer-events: none; }
.mission-console .sky > .panel { padding-top: 38px !important; }
.mission-hud { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; padding: 10px 36px 10px 12px; background: #071120e8; border: 1px solid var(--line-2); border-radius: 10px; }
#pl-hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#pl-hud > p { grid-column: 1 / -1; }
.mission-instrument { display: grid; align-content: start; gap: 3px; border-left: 2px solid currentColor; padding-left: 10px; min-width: 0; }
.mission-instrument small { text-transform: uppercase; letter-spacing: .12em; }
.mission-instrument strong { font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.mission-instrument span { color: var(--muted); font-size: 12px; }
.mission-instrument.sun { color: var(--amber); }
.mission-instrument.earth { color: var(--cyan); }
.mission-instrument.power { color: var(--fav); }
.mission-details { margin-top: 18px; }
.mission-details summary { cursor: pointer; color: var(--muted); }
.events button.ev { width: 100%; background: transparent; border: 0; color: var(--text); text-align: left; cursor: pointer; border-bottom: 1px dashed var(--line); }
.events button.ev:hover { background: #17304e; }
summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (min-width: 901px) { body.sidebar-expanded { --side: 248px; } }
@media (max-width: 1200px) { .mission-console > .work { grid-template-rows: minmax(360px, 1fr) 320px; } .mission-console .bottom { grid-template-rows: 1fr; } }
@media (max-width: 900px) {
  .sidebar-expanded .sidebar { width: 248px; box-shadow: 10px 0 30px #0008; }
  .sidebar-expanded nav button { justify-content: flex-start; gap: 14px; }
  .mission-console { overflow: auto; }
  .mission-console > .work { height: 900px; }
  .mission-console .bottom { grid-template-columns: 1fr; grid-template-rows: 240px 180px; }
  .mission-console .bottom:has(> [hidden]) { grid-template-rows: 1fr; }
  #pl-hud { gap: 6px; }
  .mission-instrument { padding-left: 6px; }
  .mission-instrument strong { font-size: 16px; }
  .mission-instrument span { font-size: 11px; }
}
@media print { .panel-menu, .managed-close { display: none !important; } .managed-panel[hidden] { display: block !important; } }

#pl-reset { position: absolute; z-index: 3; right: 12px; bottom: 112px; min-height: 32px; font-size: 13px; }
.mission-console .sky > .scale-tag { max-width: calc(100% - 175px); }
@media (max-width: 600px) { #pl-reset { bottom: 160px; } .mission-console .sky > .scale-tag { max-width: calc(100% - 24px); } }

.nav-tooltip { position: fixed; transform: translateY(-50%); z-index: 50; pointer-events: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #0c192c; color: var(--text); box-shadow: 0 4px 16px #0008; white-space: nowrap; }
.tour { position: fixed; z-index: 30; right: 18px; bottom: 18px; width: min(390px, calc(100vw - 36px)); padding: 18px; border: 1px solid var(--line-2); border-radius: 10px; background: #081426; box-shadow: 0 8px 28px #000a; }
.tour small { color: var(--cyan); font-family: 'IBM Plex Mono', monospace; }
.tour h2 { font-size: 18px; margin: 8px 0; }
.tour p { color: var(--muted); margin: 0 0 12px; }
.tour-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tour-actions .btn { min-height: 36px; }
.edu-hero.managed-panel { position: relative; }
.edu-hero > .managed-close { z-index: 2; }
