:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: #0b1721;
  --panel-2: #0e1d28;
  --panel-3: #10232e;
  --line: rgba(151, 184, 198, .14);
  --line-strong: rgba(151, 184, 198, .24);
  --text: #e9f2f4;
  --muted: #91a6af;
  --faint: #607681;
  --accent: #73e6d0;
  --accent-strong: #a0f7e7;
  --accent-dim: rgba(115, 230, 208, .12);
  --white-star: #e8edf0;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { width: 100%; height: 100%; min-width: 0; overflow: hidden; }
html, body { width: 100%; min-width: 0; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 10% -25%, rgba(37, 91, 94, .17), transparent 42%), var(--bg); }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 24, .88); z-index: 3; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; position: relative; border: 1px solid rgba(115, 230, 208, .45); border-radius: 50%; box-shadow: inset 0 0 14px rgba(115,230,208,.08); }
.brand-mark::before { content: ""; position: absolute; width: 20px; height: 9px; left: 4px; top: 9px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-34deg); }
.brand-mark span { position: absolute; width: 5px; height: 5px; left: 12px; top: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.brand-mark i { position: absolute; width: 3px; height: 3px; right: 3px; top: 7px; border-radius: 50%; background: #dce8eb; }
.eyebrow, .scene-kicker, .micro-label, .section-label, .readout-label, .canvas-corner-note, .timeline-readout > span:nth-child(2), .visual-footer-right, .check-row span, .check-result span { font-size: 9px; line-height: 1.25; letter-spacing: .15em; font-weight: 750; color: var(--muted); }
.brand-copy h1 { margin: 3px 0 0; font-size: 16px; font-weight: 640; letter-spacing: -.025em; white-space: nowrap; }
.brand-copy .eyebrow { color: var(--accent); }
.topbar-meta { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: .11em; color: #9bb0b9; font-weight: 700; white-space: nowrap; }
.status-dot, .live-pill span, .timeline-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(115,230,208,.7); }
.meta-divider, .footer-divider { width: 1px; height: 13px; background: var(--line-strong); margin: 0 5px; }
.topbar-scale { color: var(--accent); }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 16px; padding: 16px; }
.visual-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.stage { min-height: 0; flex: 1; position: relative; overflow: hidden; border: 1px solid rgba(128, 169, 181, .18); border-radius: 17px; background: #07131d; box-shadow: var(--shadow); isolation: isolate; }
#spaceCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-topline { position: absolute; left: 22px; right: 22px; top: 19px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; pointer-events: none; z-index: 1; }
.scene-label { display: flex; flex-direction: column; gap: 6px; }
.scene-kicker { color: var(--accent); }
.scene-label strong { font-size: 13px; font-weight: 590; letter-spacing: -.01em; color: #dbe7ea; }
.stage-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: #9db0b8; font-size: 9px; letter-spacing: .01em; }
.stage-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.legend-a { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.legend-b { background: var(--white-star); box-shadow: 0 0 8px rgba(232,237,240,.65); }
.legend-ring { width: 8px; height: 8px; border: 1px dashed #a5b9c2; border-radius: 50%; display: inline-block; }
.stage-bottomline { position: absolute; bottom: 17px; left: 18px; right: 18px; display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 1.5fr); align-items: end; gap: 10px; pointer-events: none; }
.caption-card { min-width: 0; padding: 12px 14px; border: 1px solid rgba(134, 174, 185, .15); border-radius: 11px; background: rgba(7, 18, 27, .79); backdrop-filter: blur(10px); }
.micro-label { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 8px; }
.pulse-icon { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }
.caption-card p { margin: 7px 0 0; color: #c3d1d6; font-size: 11px; line-height: 1.45; max-width: 340px; }
.readout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.readout-card { min-width: 0; padding: 10px 11px 9px; border: 1px solid rgba(134, 174, 185, .15); border-radius: 10px; background: rgba(7, 18, 27, .83); backdrop-filter: blur(10px); }
.readout-label { font-size: 7px; letter-spacing: .105em; white-space: nowrap; }
.readout-label span { color: #6e8791; font-size: 6px; margin-left: 3px; }
.readout-value { margin-top: 7px; font-size: clamp(16px, 1.55vw, 22px); line-height: 1; letter-spacing: -.04em; font-weight: 630; color: var(--accent-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #9eb2ba; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.readout-note { margin-top: 5px; font-size: 8px; color: #718893; }
.canvas-corner-note { position: absolute; top: 75px; left: 22px; display: flex; align-items: center; gap: 8px; color: #78909a; font-size: 7px; letter-spacing: .12em; pointer-events: none; }
.corner-line { display: inline-block; width: 19px; height: 1px; background: var(--accent); opacity: .75; }
.visual-footer { height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.timeline-readout { display: flex; align-items: center; gap: 8px; min-width: 0; }
.timeline-readout > span:nth-child(2) { font-size: 8px; }
.timeline-readout strong { font-size: 10px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.timeline-readout em { font-size: 8px; color: var(--faint); font-style: normal; }
.visual-footer-right { display: flex; align-items: center; font-size: 8px; gap: 8px; white-space: nowrap; }
#motionState { color: var(--accent); }
.control-panel { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 15px 12px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, rgba(16,35,46,.94), rgba(9,22,31,.98)); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: #28414b transparent; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { color: var(--accent); }
.panel-heading h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.035em; font-weight: 620; }
.live-pill { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid rgba(115,230,208,.2); border-radius: 20px; background: rgba(115,230,208,.06); color: #a5dcd2; font-size: 8px; letter-spacing: .1em; font-weight: 700; white-space: nowrap; }
.live-pill span { width: 5px; height: 5px; }
.preset-block { padding: 14px 0 13px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; justify-content: space-between; align-items: center; font-size: 8px; letter-spacing: .13em; }
.section-label span { font-size: 7px; color: #68818c; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.preset-button { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(255,255,255,.018); text-align: left; font-size: 10px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button small { color: var(--muted); font-size: 8px; font-weight: 450; }
.preset-button:hover { border-color: rgba(115,230,208,.5); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(115,230,208,.48); background: var(--accent-dim); color: var(--accent-strong); }
.preset-button.active small { color: #9dcac3; }
.control-list { padding: 3px 0 9px; }
.control-item { padding: 10px 0 8px; border-bottom: 1px solid rgba(151,184,198,.08); }
.control-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.control-heading label { color: #c6d3d8; font-size: 10px; font-weight: 550; }
.control-heading output { color: var(--accent-strong); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.origin-tag { display: inline-block; margin-left: 4px; color: #69828c; font-size: 6px; letter-spacing: .1em; font-weight: 750; vertical-align: 1px; }
input[type="range"] { appearance: none; width: 100%; height: 16px; margin: 7px 0 0; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0%, rgba(115,230,208,.26) 100%); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: rgba(115,230,208,.26); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid var(--accent-strong); border-radius: 50%; background: #102c34; box-shadow: 0 0 0 3px rgba(115,230,208,.12), 0 0 10px rgba(115,230,208,.28); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid var(--accent-strong); border-radius: 50%; background: #102c34; box-shadow: 0 0 0 3px rgba(115,230,208,.12); }
.range-ends { display: flex; justify-content: space-between; color: #607984; font-size: 7px; margin-top: 1px; }
.time-control { border-bottom: 0; padding-bottom: 6px; }
.display-options { padding: 12px 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toggle-row { display: flex; gap: 18px; margin-top: 10px; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; color: #b9c9cf; font-size: 9px; cursor: pointer; user-select: none; }
.switch-label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 26px; height: 15px; position: relative; border: 1px solid #3a535e; border-radius: 20px; background: #162a35; transition: background .2s ease, border-color .2s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #7f949d; transition: transform .2s ease, background .2s ease; }
.switch-label input:checked + .switch { border-color: rgba(115,230,208,.65); background: rgba(115,230,208,.2); }
.switch-label input:checked + .switch::after { transform: translateX(11px); background: var(--accent); box-shadow: 0 0 7px rgba(115,230,208,.5); }
.switch-label input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.transport-block { padding: 13px 0 11px; }
.transport-row { display: grid; grid-template-columns: 1.15fr .9fr .9fr; gap: 6px; }
.transport-button, .utility-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.025); color: #c3d1d6; font-size: 9px; font-weight: 600; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.transport-button:hover, .utility-button:hover { border-color: rgba(115,230,208,.45); background: rgba(115,230,208,.06); }
.transport-button:active, .utility-button:active { transform: translateY(1px); }
.transport-button.primary { background: var(--accent); border-color: var(--accent); color: #08201f; }
.transport-button.primary:hover { background: #95f3e2; }
.pause-glyph { font-size: 12px; font-weight: 800; }
.transport-button:not(.primary) span[aria-hidden] { font-size: 15px; line-height: 1; }
.utility-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.utility-button { min-height: 30px; color: #8fa6af; font-size: 8px; }
.quality-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px rgba(115,230,208,.55); }
.science-block { border-top: 1px solid var(--line); }
.science-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 0 5px; border: 0; background: transparent; color: #c9d6da; font-size: 10px; font-weight: 650; cursor: pointer; }
.science-toggle > span:first-child { display: flex; align-items: center; gap: 8px; }
.science-icon { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(115,230,208,.25); border-radius: 6px; color: var(--accent); font-size: 13px; font-style: normal; }
.chevron { color: var(--muted); font-size: 15px; transition: transform .2s ease; }
.science-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.science-panel { padding: 8px 0 5px; }
.science-section { padding: 10px 0; border-top: 1px solid rgba(151,184,198,.08); }
.science-section h3 { margin: 0 0 8px; color: #d6e2e5; font-size: 10px; font-weight: 650; }
.equation { margin: 5px 0; padding: 7px 9px; border-radius: 6px; background: rgba(255,255,255,.025); color: var(--accent-strong); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; letter-spacing: .01em; }
.science-copy { margin: 7px 0 0; color: #91a7b0; font-size: 9px; line-height: 1.55; }
.check-row, .check-result { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; margin-top: 5px; border: 1px solid rgba(151,184,198,.1); border-radius: 6px; background: rgba(255,255,255,.02); }
.check-row span, .check-result span { font-size: 7px; letter-spacing: .09em; }
.check-row strong, .check-result strong { color: #c6d7dc; font-size: 9px; font-variant-numeric: tabular-nums; }
.check-result { border-color: rgba(115,230,208,.2); background: rgba(115,230,208,.055); }
.check-result strong { color: var(--accent-strong); }
.science-disclaimer { margin: 10px 0 2px; padding-left: 8px; border-left: 2px solid rgba(115,230,208,.55); color: #8299a3; font-size: 8px; line-height: 1.5; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
@media (max-width: 900px) {
  .topbar { height: 58px; flex-basis: 58px; padding: 0 15px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-copy h1 { font-size: 14px; }
  .topbar-meta { font-size: 8px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 310px; gap: 10px; padding: 10px; }
  .stage-topline { left: 15px; right: 15px; top: 15px; }
  .stage-bottomline { left: 12px; right: 12px; bottom: 12px; grid-template-columns: 1fr; gap: 7px; }
  .caption-card { padding: 8px 10px; }
  .caption-card p { max-width: none; font-size: 10px; margin-top: 4px; }
  .readout-card { padding: 8px; }
  .readout-label { font-size: 6px; }
  .readout-value { font-size: 17px; }
  .readout-note { font-size: 7px; }
  .canvas-corner-note { top: 68px; left: 15px; }
}
@media (max-width: 650px) {
  body { overflow: hidden; }
  .topbar { height: 55px; flex-basis: 55px; padding: 0 12px; }
  .brand-lockup { gap: 9px; }
  .brand-mark { width: 25px; height: 25px; }
  .brand-copy .eyebrow { font-size: 7px; }
  .brand-copy h1 { font-size: 12px; letter-spacing: -.02em; }
  .topbar-meta { gap: 6px; font-size: 7px; }
  .topbar-meta .meta-divider, .topbar-scale { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow: hidden; }
  .visual-column { flex: 0 0 45%; min-height: 280px; gap: 5px; }
  .stage { border-radius: 12px; }
  .stage-topline { top: 10px; left: 11px; right: 11px; flex-direction: column; align-items: flex-start; gap: 5px; }
  .scene-kicker { font-size: 7px; }
  .scene-label { gap: 4px; }
  .scene-label strong { font-size: 10px; }
  .stage-legend { max-width: none; justify-content: flex-start; gap: 5px 8px; font-size: 7px; }
  .stage-legend span { gap: 4px; }
  .canvas-corner-note { top: 72px; left: 11px; font-size: 6px; }
  .stage-bottomline { left: 8px; right: 8px; bottom: 8px; gap: 5px; }
  .caption-card { padding: 6px 8px; border-radius: 8px; }
  .micro-label { font-size: 6px; }
  .caption-card p { font-size: 8px; line-height: 1.32; margin-top: 3px; }
  .readout-grid { gap: 4px; }
  .readout-card { padding: 6px 6px 5px; border-radius: 7px; }
  .readout-label { font-size: 5px; letter-spacing: .07em; }
  .readout-label span { font-size: 4px; margin-left: 1px; }
  .readout-value { margin-top: 5px; font-size: 14px; }
  .readout-value small { font-size: 8px; }
  .readout-note { margin-top: 3px; font-size: 6px; }
  .visual-footer { height: 22px; flex-basis: 22px; padding: 0 2px; }
  .timeline-readout { gap: 5px; }
  .timeline-readout > span:nth-child(2), .visual-footer-right { font-size: 6px; }
  .timeline-readout strong { font-size: 8px; }
  .timeline-readout em { font-size: 6px; }
  .control-panel { flex: 1 1 0; min-height: 0; padding: 12px 12px 18px; border-radius: 12px; }
  .panel-heading { padding-bottom: 10px; }
  .panel-heading h2 { font-size: 15px; }
  .panel-heading .eyebrow { font-size: 7px; }
  .live-pill { font-size: 7px; padding: 5px 7px; }
  .preset-block { padding: 10px 0; }
  .control-item { padding: 8px 0 6px; }
  .control-heading label { font-size: 9px; }
  .control-heading output { font-size: 9px; }
  input[type="range"] { margin-top: 5px; }
  .range-ends { font-size: 6px; }
  .display-options { padding: 10px 0; }
  .toggle-row { margin-top: 8px; }
  .transport-block { padding: 10px 0; }
}
@media (max-width: 380px) {
  .topbar-meta { display: none; }
  .stage-legend { max-width: none; }
  .readout-label { letter-spacing: .04em; }
  .readout-label span { display: none; }
  .stage-bottomline { bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
