:root {
  color-scheme: dark;
  --bg: #07111d;
  --panel: #0c1927;
  --panel-2: #0e1d2d;
  --panel-3: #122337;
  --line: rgba(166, 194, 219, .13);
  --line-strong: rgba(166, 194, 219, .22);
  --text: #edf5fb;
  --muted: #8ca2b7;
  --subtle: #61788e;
  --accent: #6de3e1;
  --accent-dim: rgba(109, 227, 225, .14);
  --accent-glow: rgba(109, 227, 225, .28);
  --warning: #e7b879;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app { height: 100vh; height: 100dvh; min-height: 520px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 40% -30%, rgba(27, 63, 83, .22), transparent 55%), var(--bg); }
.topbar { height: 70px; flex: 0 0 70px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(7, 17, 29, .94); z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 32px; height: 32px; border: 1px solid rgba(109, 227, 225, .45); border-radius: 10px; position: relative; display: grid; place-items: center; transform: rotate(-8deg); }
.brand-mark span { position: absolute; width: 17px; height: 6px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(35deg); }
.brand-mark span:nth-child(2) { transform: rotate(-35deg); opacity: .65; }
.brand-mark span:nth-child(3) { width: 4px; height: 4px; border: 0; background: var(--accent); }
.brand-copy { min-width: 0; }
.eyebrow, .section-kicker, .caption-kicker, .micro-label { color: var(--muted); font-size: 9px; line-height: 1.3; font-weight: 750; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.eyebrow-dot { width: 3px; height: 3px; background: var(--accent); border-radius: 50%; }
h1 { margin: 3px 0 0; font-size: 17px; line-height: 1.2; font-weight: 650; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.live-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent-glow); }
.icon-button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: rgba(15, 31, 47, .85); border-radius: 9px; padding: 8px 11px; font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.icon-button:hover, .step-button:hover, .text-button:hover { border-color: rgba(109, 227, 225, .55); background: var(--accent-dim); }
.icon-button:active, button:active { transform: translateY(1px); }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 12px; padding: 12px; }
.stage-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.stage { flex: 1; min-height: 280px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(ellipse at 44% 53%, rgba(22, 61, 82, .2), transparent 52%), linear-gradient(145deg, #081522, #07111d 65%); }
#scene { display: block; width: 100%; height: 100%; outline: none; }
.stage-topline, .stage-bottomline { position: absolute; left: 17px; right: 17px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.stage-topline { top: 15px; }
.stage-bottomline { bottom: 14px; }
.stage-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; background: rgba(8, 21, 34, .76); border: 1px solid rgba(166, 194, 219, .14); border-radius: 7px; color: #b4c7d7; font-size: 8px; font-weight: 800; letter-spacing: .12em; backdrop-filter: blur(8px); }
.chip-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.chip-divider { height: 10px; width: 1px; background: var(--line-strong); }
.orbit-readout { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 9px; border-radius: 7px; background: rgba(8, 21, 34, .76); border: 1px solid rgba(166, 194, 219, .14); backdrop-filter: blur(8px); }
.orbit-readout strong { font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.number-kind { color: var(--subtle); font-size: 7px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.scene-legend { display: flex; align-items: center; gap: 7px; color: #8299ad; font-size: 9px; }
.legend-line { width: 19px; height: 0; border-top: 1px dashed rgba(109, 227, 225, .65); }
.legend-arrow { width: 17px; height: 1px; background: var(--accent); position: relative; margin-left: 6px; }
.legend-arrow::after { content: ""; position: absolute; right: 0; top: -3px; border-left: 5px solid var(--accent); border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.scene-scale { color: #62798e; font-size: 8px; letter-spacing: .11em; display: flex; align-items: center; gap: 6px; }
.scene-scale b { color: #94a9bb; font-size: 7px; }
.scale-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .7; }
.scene-corner-label { position: absolute; left: 18px; top: 54px; color: rgba(135, 160, 181, .6); font-size: 8px; font-weight: 750; letter-spacing: .12em; pointer-events: none; }
.caption-strip { min-height: 76px; display: flex; align-items: center; gap: 13px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 25, 39, .9); }
.caption-icon { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid rgba(109, 227, 225, .24); background: var(--accent-dim); color: var(--accent); border-radius: 8px; display: grid; place-items: center; font-size: 16px; }
.caption-copy { min-width: 0; flex: 1; }
.caption-copy p { margin: 4px 0 0; color: #b2c2d0; font-size: 11px; line-height: 1.45; }
.caption-state { padding: 5px 8px; border: 1px solid rgba(109, 227, 225, .2); border-radius: 6px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.control-column { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #2b4358 transparent; }
.control-column::-webkit-scrollbar { width: 5px; }
.control-column::-webkit-scrollbar-thumb { background: #2b4358; border-radius: 10px; }
.telemetry-card, .controls-card, .audit-card, .science-panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(14, 29, 45, .97), rgba(10, 23, 37, .97)); }
.telemetry-card { padding: 15px 16px 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading h2, .audit-heading h2 { margin: 3px 0 0; font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.telemetry-status { padding: 5px 8px; border-radius: 5px; color: var(--accent); background: var(--accent-dim); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 15px; margin-top: 14px; }
.metric { min-width: 0; padding: 9px 10px; border: 1px solid rgba(166, 194, 219, .09); border-radius: 9px; background: rgba(4, 14, 24, .27); }
.metric-primary { grid-column: 1 / -1; }
.metric-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .09em; white-space: nowrap; }
.metric-value { display: flex; align-items: baseline; gap: 5px; margin-top: 5px; font-size: 21px; line-height: 1.1; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-value small { color: #91a6b9; font-size: 10px; font-weight: 550; letter-spacing: 0; }
.metric-primary .metric-value { color: var(--accent); font-size: 24px; }
.metric-track, .capacity-track { height: 4px; margin-top: 9px; background: rgba(143, 169, 192, .13); border-radius: 10px; overflow: hidden; }
.metric-track span, .capacity-track span { display: block; width: 37.5%; height: 100%; background: var(--accent); border-radius: inherit; box-shadow: 0 0 10px var(--accent-glow); transition: width .25s ease; }
.capacity-row { margin-top: 12px; display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.capacity-row span:last-child { color: #b6c5d2; letter-spacing: 0; font-size: 9px; }
.capacity-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.capacity-track { margin-top: 7px; height: 3px; }
.capacity-track span { background: linear-gradient(90deg, var(--accent), #b2f3e7); }
.controls-card { padding: 15px 16px 14px; }
.controls-heading { margin-bottom: 12px; }
.text-button { border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 9px; background: rgba(7, 17, 29, .5); color: #a9bac9; font-size: 10px; cursor: pointer; transition: .2s ease; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 14, 24, .25); text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.preset-button:hover { border-color: rgba(109, 227, 225, .4); }
.preset-button.active { border-color: rgba(109, 227, 225, .42); background: rgba(109, 227, 225, .07); }
.preset-mark { flex: 0 0 7px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent-glow); }
.preset-mark.limited { border-color: #9aaec0; box-shadow: none; }
.preset-button b { display: block; font-size: 9px; font-weight: 700; line-height: 1.2; }
.preset-button small { display: block; margin-top: 3px; color: var(--subtle); font-size: 8px; line-height: 1.2; }
.slider-list { display: flex; flex-direction: column; gap: 11px; }
.control-row { min-width: 0; }
.control-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.control-label label { color: #d5e1eb; font-size: 10px; font-weight: 600; }
.control-label output { margin-left: auto; color: var(--accent); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.control-row input[type="range"] { width: 100%; height: 13px; margin: 5px 0 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
.control-row input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
.control-row input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(109, 227, 225, .75), rgba(109, 227, 225, .18)); }
.control-row input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; border: 2px solid #081522; background: var(--accent); box-shadow: 0 0 0 2px rgba(109, 227, 225, .28); }
.control-row input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: rgba(109, 227, 225, .25); }
.control-row input[type="range"]::-moz-range-progress { height: 3px; background: var(--accent); }
.control-row input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; border: 2px solid #081522; background: var(--accent); box-shadow: 0 0 0 2px rgba(109, 227, 225, .28); }
.range-ends { display: flex; justify-content: space-between; color: #647b90; font-size: 7px; margin-top: -1px; }
.playback-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.playback-controls { display: flex; align-items: center; gap: 7px; }
.step-kind { font-size: 6px; }
.play-button, .step-button { min-height: 32px; border-radius: 8px; cursor: pointer; transition: .2s ease; }
.play-button { display: flex; align-items: center; gap: 8px; padding: 0 13px; background: var(--accent); color: #071821; border: 1px solid var(--accent); font-size: 10px; font-weight: 800; }
.play-button:hover { background: #a0f4ed; }
.play-symbol { font-size: 12px; line-height: 1; }
.step-button { padding: 0 10px; background: rgba(7, 17, 29, .55); border: 1px solid var(--line-strong); color: #b2c2d0; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.sim-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sim-clock strong { font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.time-control { margin-top: 12px; }
.utility-row { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.switch-control { display: flex; align-items: center; gap: 8px; color: #b7c6d3; font-size: 9px; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 27px; height: 15px; border-radius: 20px; background: #26394b; border: 1px solid #3c5368; position: relative; transition: background .2s ease; }
.switch::after { content: ""; position: absolute; width: 9px; height: 9px; left: 2px; top: 2px; border-radius: 50%; background: #91a5b8; transition: transform .2s ease, background .2s ease; }
.switch-control input:checked + .switch { background: rgba(109, 227, 225, .24); border-color: rgba(109, 227, 225, .55); }
.switch-control input:checked + .switch::after { transform: translateX(12px); background: var(--accent); }
.switch-control input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.quality-control { display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.quality-control button { border: 1px solid rgba(109, 227, 225, .28); border-radius: 5px; padding: 5px 7px; color: var(--accent); background: var(--accent-dim); font-size: 8px; font-weight: 800; cursor: pointer; }
.audit-card { padding: 12px 15px; }
.audit-heading { display: flex; align-items: center; gap: 9px; }
.audit-icon { width: 23px; height: 23px; display: grid; place-items: center; color: var(--accent); background: var(--accent-dim); border-radius: 7px; font-size: 13px; }
.audit-heading h2 { font-size: 11px; }
.audit-kind { margin-left: auto; color: var(--subtle); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.audit-main { display: flex; align-items: baseline; gap: 7px; margin-top: 9px; }
.audit-main span:first-child { color: var(--accent); font-size: 20px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.audit-main span:last-child { color: var(--muted); font-size: 9px; }
.audit-card p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.audit-card p b { color: #c8d5df; font-weight: 650; }
.audit-foot { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: #72899d; font-size: 8px; line-height: 1.4; }
.audit-foot code { color: #b6c9d8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.subscript { font-size: 6px; vertical-align: sub; }
.science-panel { padding: 0; overflow: hidden; }
.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary span:first-child { display: flex; flex-direction: column; gap: 3px; }
.science-panel summary b { font-size: 12px; font-weight: 650; }
.summary-plus { color: var(--accent); font-size: 18px; transition: transform .2s ease; }
.science-panel[open] .summary-plus { transform: rotate(45deg); }
.science-content { padding: 0 15px 14px; color: #a5b7c7; font-size: 9px; line-height: 1.55; }
.science-content h3 { margin: 12px 0 6px; color: #dbe7f0; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.equation { padding: 7px 8px; margin: 5px 0; border: 1px solid rgba(166, 194, 219, .09); border-radius: 6px; background: rgba(4, 14, 24, .35); color: #d1e0ea; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; overflow-wrap: anywhere; }
.science-content ul { margin: 5px 0 0; padding-left: 15px; }
.science-content li { margin: 5px 0; }
.science-content li b { color: var(--accent); font-size: 8px; letter-spacing: .05em; }
.science-content p { margin: 6px 0; }
.science-content .disclaimer { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); color: #8398aa; font-style: italic; }
.footer-note { padding: 2px 4px 5px; color: #526a7f; font-size: 7px; font-weight: 750; letter-spacing: .13em; text-align: center; }
.footer-note span { color: var(--accent); padding: 0 4px; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 980px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .topbar { padding: 0 16px; }
  .workspace { padding: 9px; gap: 9px; }
  .metric-label { font-size: 7px; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .app { min-height: 100vh; min-height: 100dvh; height: auto; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 12px; }
  .brand-mark { width: 28px; height: 28px; }
  .eyebrow { font-size: 7px; gap: 5px; }
  h1 { font-size: 13px; }
  .top-actions { gap: 9px; }
  .live-indicator { font-size: 7px; }
  .icon-button { padding: 7px; }
  .icon-button span { display: none; }
  .workspace { display: flex; flex-direction: column; padding: 8px; gap: 8px; }
  .stage-column { flex: none; height: 380px; gap: 8px; }
  .stage { min-height: 250px; border-radius: 12px; }
  .caption-strip { min-height: 68px; padding: 9px 11px; gap: 9px; }
  .caption-copy p { font-size: 10px; }
  .caption-state { font-size: 7px; padding: 4px 6px; }
  .control-column { overflow: visible; padding: 0; gap: 8px; }
  .telemetry-card, .controls-card { padding: 13px; }
  .audit-card { padding: 11px 13px; }
  .metric-grid { margin-top: 11px; gap: 7px; }
  .metric { padding: 8px; }
  .metric-value { font-size: 19px; }
  .metric-primary .metric-value { font-size: 22px; }
  .slider-list { gap: 10px; }
  .control-label label { font-size: 10px; }
  .control-row input[type="range"] { margin-top: 3px; }
  .preset-button { padding: 8px 7px; }
  .footer-note { padding-bottom: 10px; }
}
@media (max-width: 420px) {
  .stage-column { height: 360px; }
  .stage-topline { left: 10px; right: 10px; top: 10px; }
  .stage-bottomline { left: 10px; right: 10px; bottom: 10px; }
  .stage-chip { font-size: 7px; padding: 6px 7px; gap: 5px; }
  .orbit-readout { padding: 5px 7px; }
  .orbit-readout strong { font-size: 11px; }
  .scene-corner-label { top: 43px; left: 11px; font-size: 7px; }
  .scene-legend { font-size: 7px; gap: 5px; }
  .scene-scale { font-size: 7px; gap: 4px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 7px; }
  .metric-label { font-size: 7px; }
}
html.embed-mode, body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app { height: 100vh; height: 100dvh; min-height: 0; }
@media (max-width: 720px) {
  body.embed-mode .workspace { flex: 1; min-height: 0; overflow: hidden; }
  body.embed-mode .stage-column { flex: 0 0 55%; height: auto; min-height: 340px; max-height: 440px; }
  body.embed-mode .stage { min-height: 0; }
  body.embed-mode .control-column { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
}
@media (max-width: 420px) {
  body.embed-mode .stage-column { flex-basis: 55%; min-height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
