:root {
  color-scheme: dark;
  --bg: #080d14;
  --panel: #0d1520;
  --panel-raised: #111c29;
  --panel-soft: #0a121c;
  --line: rgba(151, 181, 204, .13);
  --line-strong: rgba(151, 181, 204, .22);
  --text: #edf4f7;
  --muted: #8ea1af;
  --dim: #607484;
  --accent: #63e4d2;
  --accent-soft: rgba(99, 228, 210, .13);
  --accent-line: rgba(99, 228, 210, .35);
  --radius: 12px;
  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-width: 0; height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.embed-mode body { height: 100vh; height: 100dvh; overflow: hidden; }
.embed-mode .app-shell { height: 100vh; height: 100dvh; }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: #0a111a; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-symbol { position: relative; width: 29px; height: 29px; border: 1px solid rgba(99,228,210,.55); border-radius: 50%; display: grid; place-items: center; transform: rotate(-25deg); }
.brand-symbol:before { content: ""; position: absolute; width: 34px; height: 11px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-35deg); opacity: .75; }
.brand-symbol span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(99,228,210,.8); }
.brand-symbol i { position: absolute; right: -4px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: #d7fff8; }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: .2em; line-height: 1.2; }
.brand-subtitle { margin-top: 3px; color: var(--dim); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: #91a4b1; font-size: 9px; letter-spacing: .13em; font-weight: 700; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.meta-divider { width: 1px; height: 12px; background: var(--line-strong); margin: 0 4px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 356px; flex: 1; min-height: 0; }
.visual-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; border-right: 1px solid var(--line); }
.stage { position: relative; min-height: 0; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 48% 48%, #132432 0%, #0b1722 38%, #080d14 76%); }
#spaceCanvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, rgba(5,10,16,.62) 0%, transparent 22%, transparent 66%, rgba(5,10,16,.65) 100%), radial-gradient(ellipse at center, transparent 35%, rgba(2,7,12,.35) 100%); }
.stage-headline { position: absolute; z-index: 2; top: 22px; left: 26px; right: 26px; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.eyebrow-line { width: 20px; height: 1px; background: var(--accent); }
.stage-title { margin-top: 8px; font-size: clamp(19px, 2vw, 27px); letter-spacing: -.04em; font-weight: 650; text-shadow: 0 2px 14px #06101a; }
.event-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 10px 12px; border: 1px solid rgba(159,194,210,.15); background: rgba(7,14,22,.6); border-radius: 9px; backdrop-filter: blur(8px); }
.clock-label { color: var(--muted); font-size: 8px; letter-spacing: .16em; font-weight: 800; }
.event-clock strong { font-size: 22px; line-height: 1.15; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.event-clock strong small { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.number-tag { color: #6e8797; font-size: 7px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.stage-annotations { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.annotation { position: absolute; color: rgba(190,213,222,.6); font-size: 8px; font-weight: 800; letter-spacing: .14em; text-shadow: 0 1px 6px #06101a; }
.annotation-tidal { left: 12%; top: 46%; }
.annotation-peri { right: 14%; top: 60%; }
.stage-caption { position: absolute; z-index: 2; left: 26px; bottom: 52px; width: min(490px, 62%); padding: 12px 15px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, rgba(7,15,23,.88), rgba(7,15,23,.46)); backdrop-filter: blur(5px); pointer-events: none; }
.caption-kicker { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.stage-caption p { margin: 6px 0 0; max-width: 500px; color: #d1dfe4; font-size: 11px; line-height: 1.5; }
.stage-footer { position: absolute; z-index: 2; bottom: 16px; left: 26px; right: 26px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.legend { display: flex; align-items: center; gap: 16px; color: #9aadb8; font-size: 8px; letter-spacing: .11em; font-weight: 800; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.legend-dot.bound { background: var(--accent); box-shadow: 0 0 7px rgba(99,228,210,.65); }
.legend-dot.unbound { background: #a4b4c2; }
.scale-note { color: #6c8291; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.readout-area { padding: 12px 18px 10px; background: #0b131d; border-top: 1px solid var(--line); }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.readout-card { min-width: 0; padding: 9px 11px 8px; background: rgba(255,255,255,.018); border: 1px solid var(--line); border-radius: 8px; }
.readout-label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #8da1ae; font-size: 8px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.readout-mark { color: #668c87; font-size: 6px; letter-spacing: .1em; }
.readout-value { margin-top: 6px; color: #eff8f8; font-size: clamp(16px, 1.65vw, 22px); font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #8ea2ae; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.readout-foot { margin-top: 4px; color: #718492; font-size: 8px; line-height: 1.35; min-height: 20px; }
.readout-bottomline { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px 0; color: #8ea3ae; font-size: 9px; }
.control-panel { min-width: 0; min-height: 0; background: var(--panel); }
.panel-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #29404e transparent; padding: 20px 18px 14px; }
.panel-scroll::-webkit-scrollbar { width: 5px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #29404e; border-radius: 10px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.panel-kicker { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.panel-heading h1 { margin: 5px 0 0; font-size: 19px; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; }
.quality-control { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #09111a; }
.quality-button { border: 0; background: transparent; color: #738794; padding: 5px 7px; border-radius: 4px; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.quality-button.active { color: #071310; background: var(--accent); }
.control-section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 11px; }
.section-heading h2, .check-topline h2 { margin: 0; color: #a9bac4; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #0a131d; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.preset-button:hover, .preset-button.selected { border-color: var(--accent-line); background: rgba(99,228,210,.055); }
.preset-button strong { display: block; font-size: 9px; font-weight: 700; }
.preset-button small { display: block; margin-top: 3px; color: #748a98; font-size: 7px; line-height: 1.3; }
.preset-icon { position: relative; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid rgba(99,228,210,.24); border-radius: 50%; }
.preset-icon:before { content: ""; position: absolute; width: 20px; height: 8px; top: 9px; left: 3px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-25deg); opacity: .8; }
.preset-icon i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); top: 11px; left: 11px; }
.deep-icon:before { width: 13px; height: 13px; left: 6px; top: 6px; border-style: dashed; }
.deep-icon i { left: 11px; top: 11px; box-shadow: 0 0 6px var(--accent); }
.slider-control { margin-top: 13px; }
.slider-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.slider-heading label, .slider-heading > span:first-child { color: #d1dce2; font-size: 10px; font-weight: 600; }
.slider-heading output { color: var(--accent); font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.symbol-inline { color: var(--accent); }
input[type="range"] { display: block; width: 100%; height: 13px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, var(--accent) 0%, rgba(99,228,210,.25) 100%); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: rgba(99,228,210,.32); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 2px solid #081410; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(99,228,210,.2); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #081410; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(99,228,210,.2); }
.slider-range { display: flex; justify-content: space-between; color: #617685; font-size: 7px; font-variant-numeric: tabular-nums; }
.freeze-control { margin-top: 16px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 7px; background: #08111a; }
.segment { padding: 7px 6px; border: 0; border-radius: 5px; background: transparent; color: #8ca0ad; font-size: 8px; cursor: pointer; }
.segment.active { color: #071310; background: var(--accent); font-weight: 800; }
.control-hint { margin: 7px 0 0; color: #708492; font-size: 8px; line-height: 1.45; }
.motion-section { padding-bottom: 12px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 11px; }
.switch-label { display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.switch-label span { color: #cbd7de; font-size: 9px; font-weight: 600; }
.switch-label small { color: #6f8492; font-size: 7px; }
.switch-input { appearance: none; position: relative; width: 29px; height: 16px; flex: 0 0 29px; margin: 0; border: 1px solid #3a4d5b; border-radius: 20px; background: #172431; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.switch-input:before { content: ""; position: absolute; width: 10px; height: 10px; top: 2px; left: 2px; border-radius: 50%; background: #81939e; transition: transform .15s ease, background .15s ease; }
.switch-input:checked { border-color: var(--accent); background: rgba(99,228,210,.2); }
.switch-input:checked:before { transform: translateX(13px); background: var(--accent); }
.transport-section { padding: 14px 0 13px; border-bottom: 1px solid var(--line); }
.transport-buttons { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 6px; }
.transport-primary, .transport-secondary { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 700; }
.transport-primary { border: 1px solid var(--accent); color: #071512; background: var(--accent); }
.transport-secondary { border: 1px solid var(--line-strong); color: #b4c2ca; background: #111d29; }
.transport-secondary:hover { border-color: var(--accent-line); }
.transport-secondary span { font-size: 15px; line-height: 0; }
.pause-glyph { width: 8px; height: 10px; border-left: 2px solid #071512; border-right: 2px solid #071512; }
.play-glyph { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #071512; }
.transport-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
#runStatus { display: flex; align-items: center; gap: 6px; color: #7f959f; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.status-pip { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
#runStatus.paused .status-pip { background: #758794; }
.screenshot-button { border: 0; background: transparent; color: #a7bac4; font-size: 8px; cursor: pointer; }
.screenshot-button span { color: var(--accent); margin-right: 4px; }
.toast { min-height: 0; color: var(--accent); font-size: 8px; text-align: right; }
.check-card { margin-top: 13px; padding: 11px 12px; border: 1px solid rgba(99,228,210,.2); border-radius: 8px; background: rgba(99,228,210,.035); }
.check-topline { display: flex; justify-content: space-between; align-items: center; }
.check-icon { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--accent-line); border-radius: 50%; color: var(--accent); font-size: 9px; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.check-values div { min-width: 0; }
.check-values span { display: block; color: #7e929e; font-size: 7px; line-height: 1.3; }
.check-values strong { display: block; margin-top: 4px; color: #dce9ec; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.check-result { display: flex; align-items: baseline; gap: 7px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.check-result strong { color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; }
.check-result span { color: #748b98; font-size: 7px; }
.science-panel { margin-top: 11px; border: 1px solid var(--line); border-radius: 8px; background: #0a131d; }
.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; color: #bdcbd2; font-size: 8px; font-weight: 800; letter-spacing: .14em; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.summary-plus { color: var(--accent); font-size: 14px; font-weight: 400; transition: transform .18s ease; }
.science-panel[open] .summary-plus { transform: rotate(45deg); }
.science-content { padding: 0 12px 12px; }
.science-intro { margin: 0 0 10px; color: #a6b7c1; font-size: 9px; line-height: 1.5; }
.equation-block { padding: 8px 9px; margin-top: 6px; border-left: 2px solid rgba(99,228,210,.45); background: rgba(255,255,255,.025); }
.equation-label { display: block; color: #6e8795; font-size: 6px; font-weight: 800; letter-spacing: .13em; }
.equation-block code { display: block; margin-top: 4px; color: #d8e9e8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; white-space: normal; }
.science-note { margin: 10px 0 0; color: #8297a3; font-size: 8px; line-height: 1.55; }
.science-note strong { color: #c3d1d7; }
.science-disclaimer { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: #6e8491; font-size: 7px; line-height: 1.5; font-style: italic; }
.scale-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.scale-list li { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; color: #8da1ad; font-size: 8px; line-height: 1.5; }
.scale-key { display: inline-block; padding: 3px 5px; border-radius: 3px; font-size: 6px; font-weight: 800; letter-spacing: .1em; text-align: center; }
.textbook-key { color: #b6d9d2; background: rgba(99,228,210,.12); }
.illustrative-key { color: #d0c39a; background: rgba(196,171,104,.1); }
.scaled-key { color: #a9b8d4; background: rgba(131,157,201,.1); }
.panel-footer { padding: 15px 0 4px; color: #526977; font-size: 7px; font-weight: 800; letter-spacing: .15em; text-align: center; }
.panel-footer span { color: var(--accent); padding: 0 4px; }
@media (max-width: 900px) and (min-width: 621px) {
  .workspace { grid-template-columns: minmax(0,1fr) 320px; }
  .readout-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .readout-foot { min-height: 0; }
}
@media (max-width: 620px) {
  body { overflow: hidden; }
  .topbar { height: 52px; flex-basis: 52px; padding: 0 13px; }
  .brand-symbol { width: 24px; height: 24px; }
  .brand-symbol:before { width: 28px; }
  .brand-name { font-size: 9px; }
  .brand-subtitle { font-size: 6px; }
  .topbar-meta { gap: 6px; font-size: 7px; letter-spacing: .08em; }
  .meta-divider { height: 9px; margin: 0 1px; }
  .workspace { display: flex; flex-direction: column; min-height: 0; }
  .visual-column { flex: 0 0 47%; height: 47%; border-right: 0; grid-template-rows: minmax(0,1fr) auto; }
  .stage-headline { top: 11px; left: 12px; right: 12px; }
  .eyebrow { font-size: 7px; letter-spacing: .12em; }
  .eyebrow-line { width: 12px; }
  .stage-title { margin-top: 5px; font-size: 17px; }
  .event-clock { padding: 6px 8px; border-radius: 7px; }
  .clock-label { font-size: 6px; }
  .event-clock strong { font-size: 16px; }
  .event-clock strong small { font-size: 8px; }
  .number-tag { font-size: 5px; letter-spacing: .08em; }
  .stage-caption { left: 12px; bottom: 31px; width: min(300px, 82%); padding: 7px 9px; }
  .caption-kicker { font-size: 6px; }
  .stage-caption p { margin-top: 4px; font-size: 8px; line-height: 1.35; }
  .stage-footer { bottom: 9px; left: 12px; right: 12px; }
  .legend { gap: 9px; font-size: 6px; }
  .legend span { gap: 4px; }
  .legend-dot { width: 5px; height: 5px; }
  .scale-note { font-size: 5px; letter-spacing: .07em; }
  .annotation { font-size: 6px; }
  .readout-area { padding: 6px 8px 5px; }
  .readout-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
  .readout-card { padding: 5px 5px 4px; border-radius: 5px; }
  .readout-label { font-size: 5px; letter-spacing: .04em; display: block; }
  .readout-mark { display: none; }
  .readout-value { margin-top: 4px; font-size: clamp(11px, 3vw, 14px); }
  .readout-value small { font-size: 6px; }
  .readout-foot { display: none; }
  .readout-bottomline { padding-top: 5px; font-size: 7px; }
  .readout-bottomline .number-tag { font-size: 5px; }
  .control-panel { flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--line); }
  .panel-scroll { padding: 11px 13px 16px; }
  .panel-heading { padding-bottom: 10px; }
  .panel-heading h1 { font-size: 16px; }
  .panel-kicker { font-size: 7px; }
  .quality-button { padding: 4px 6px; font-size: 6px; }
  .control-section { padding: 11px 0; }
  .section-heading { margin-bottom: 8px; }
  .section-heading h2 { font-size: 7px; }
  .preset-button { padding: 6px; gap: 6px; }
  .preset-icon { width: 23px; height: 23px; flex-basis: 23px; }
  .preset-icon:before { width: 16px; left: 2px; top: 7px; }
  .preset-icon i { left: 9px; top: 9px; }
  .deep-icon:before { width: 11px; height: 11px; left: 5px; top: 5px; }
  .preset-button strong { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .slider-control { margin-top: 10px; }
  .slider-heading { margin-bottom: 5px; }
  .slider-heading label, .slider-heading > span:first-child { font-size: 9px; }
  .slider-heading output { font-size: 8px; }
  .slider-range { font-size: 6px; }
  .freeze-control { margin-top: 12px; }
  .control-hint { font-size: 7px; margin-top: 5px; }
  .toggle-row { margin-top: 8px; }
  .switch-label span { font-size: 8px; }
  .switch-label small { font-size: 6px; }
  .transport-section { padding: 10px 0; }
  .transport-primary, .transport-secondary { min-height: 31px; font-size: 8px; }
  .check-card { margin-top: 10px; padding: 9px; }
  .check-topline h2 { font-size: 7px; }
  .check-values strong { font-size: 10px; }
  .science-panel { margin-top: 8px; }
  .science-panel summary { padding: 9px; font-size: 7px; }
  .science-content { padding: 0 9px 10px; }
  .science-intro { font-size: 8px; }
  .equation-block code { font-size: 9px; }
  .science-note { font-size: 7px; }
  .scale-list li { font-size: 7px; }
  .panel-footer { padding-top: 11px; }
}
@media (max-width: 380px) {
  .visual-column { flex-basis: 45%; height: 45%; }
  .readout-label { font-size: 4.7px; }
  .readout-value { font-size: 10px; }
  .stage-title { font-size: 15px; }
  .stage-caption { width: 88%; }
  .scale-note { max-width: 86px; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
