:root {
  color-scheme: dark;
  --bg: #07111b;
  --panel: #0b1723;
  --panel-raised: #101e2b;
  --line: rgba(167, 190, 207, 0.13);
  --line-strong: rgba(167, 190, 207, 0.22);
  --text: #e8f0f4;
  --muted: #91a5b4;
  --subtle: #627888;
  --accent: #71e2d2;
  --accent-dim: rgba(113, 226, 210, 0.14);
  --accent-line: rgba(113, 226, 210, 0.36);
  --warm: #d7b28a;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 0; height: 100%; margin: 0; 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: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 22% -10%, rgba(34, 74, 91, .18), transparent 42%), var(--bg); }
.topbar { flex: 0 0 64px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 17, 27, .94); z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 28px; height: 28px; position: relative; border: 1px solid rgba(113, 226, 210, .48); border-radius: 50%; transform: rotate(-28deg); flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; inset: 6px -4px; border: 1px solid var(--accent); border-radius: 50%; }
.brand-mark span { position: absolute; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; }
.brand-mark span:nth-child(1) { top: 2px; left: 12px; }
.brand-mark span:nth-child(2) { bottom: 4px; right: 3px; }
.brand-mark span:nth-child(3) { bottom: 3px; left: 5px; }
.brand-kicker { color: var(--subtle); font-size: 9px; letter-spacing: .2em; font-weight: 750; line-height: 1.2; }
.brand-title { color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: .015em; margin-top: 3px; white-space: nowrap; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: #9db0bd; font-size: 9px; letter-spacing: .13em; font-weight: 700; white-space: nowrap; }
.topbar-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px rgba(113, 226, 210, .55); }
.meta-divider { width: 1px; height: 12px; background: var(--line-strong); margin: 0 3px; }
.meta-class { color: var(--subtle); }
.workspace { flex: 1; min-height: 0; min-width: 0; display: flex; overflow: hidden; }
.stage-panel { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #07121d; }
.stage-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 50%, rgba(18, 42, 56, .42), rgba(7, 18, 29, .3) 55%, rgba(5, 13, 22, .8)); }
#space-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.stage-topline { position: absolute; top: 18px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; gap: 12px; }
.frame-label { display: flex; align-items: center; gap: 8px; color: #9bb0be; font-size: 9px; font-weight: 750; letter-spacing: .16em; text-shadow: 0 1px 6px #07111b; }
.frame-icon { width: 8px; height: 8px; border: 1px solid var(--accent); border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(113,226,210,.16); }
.stage-status { border: 1px solid var(--accent-line); border-radius: 999px; background: rgba(8, 24, 32, .72); color: var(--accent); padding: 6px 10px; font-size: 8px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.stage-footer { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; align-items: end; justify-content: space-between; pointer-events: none; text-shadow: 0 1px 8px #07111b; gap: 12px; }
.stage-footer-main { display: flex; flex-direction: column; gap: 4px; }
.stage-footer-kicker { color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.stage-footer-main strong { font-size: 12px; font-weight: 600; color: #c5d3dc; }
.stage-footer-note { color: #7f96a6; font-size: 9px; letter-spacing: .03em; text-align: right; }
.stage-legend { flex: 0 0 38px; min-height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 20px; border-top: 1px solid var(--line); background: #091521; color: #8297a6; font-size: 9px; }
.legend-item { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-particle { background: var(--accent); box-shadow: 0 0 8px rgba(113,226,210,.65); }
.legend-line { width: 17px; height: 2px; display: inline-block; background: var(--accent); opacity: .8; border-radius: 2px; }
.legend-ring { width: 11px; height: 11px; border: 1px dashed #7c98a8; border-radius: 50%; display: inline-block; }
.legend-scale { margin-left: auto; color: #617786; font-size: 8px; letter-spacing: .11em; white-space: nowrap; }
.legend-scale b { color: #8ba0ae; font-weight: 800; }
.control-panel { flex: 0 0 356px; width: 356px; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #0b1723, #091521 80%); scrollbar-width: thin; scrollbar-color: #2a3d4b transparent; }
.control-panel::-webkit-scrollbar { width: 6px; }
.control-panel::-webkit-scrollbar-thumb { background: #2a3d4b; border-radius: 8px; }
.panel-section { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.intro-section { padding-top: 20px; padding-bottom: 17px; }
.section-overline { color: #6e8494; font-size: 8px; font-weight: 850; letter-spacing: .18em; line-height: 1.3; }
.caption-heading { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; font-weight: 650; letter-spacing: -.015em; }
.live-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(113,226,210,.5); flex: 0 0 auto; }
.state-caption { margin: 8px 0 12px; color: #a3b4c0; font-size: 10px; line-height: 1.55; }
.status-row { display: flex; align-items: center; gap: 9px; }
.status-chip { color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(113,226,210,.2); border-radius: 4px; padding: 4px 7px; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.status-muted { color: #647a89; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.section-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.number-tag { color: #718696; font-size: 7px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.textbook-tag { color: #8fb6b0; }
.telemetry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.metric-card { min-width: 0; padding: 10px 10px 9px; border: 1px solid rgba(152, 180, 197, .11); border-radius: 8px; background: rgba(17, 33, 46, .72); }
.metric-label { color: #6f8493; font-size: 7px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-value { margin-top: 7px; color: #e2edf2; font-size: 19px; font-weight: 560; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-value small { color: #91a7b5; font-size: 10px; font-weight: 550; letter-spacing: 0; margin-left: 2px; }
.controls-section { padding-top: 16px; padding-bottom: 16px; }
.control-row { margin-top: 12px; }
.control-row:first-of-type { margin-top: 0; }
.control-topline { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.control-topline label { color: #c1ced6; font-size: 10px; font-weight: 550; }
.control-topline output { color: var(--accent); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 15px; background: transparent; margin: 0; cursor: pointer; display: block; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(113,226,210,.72), rgba(113,226,210,.18)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(113,226,210,.72), rgba(113,226,210,.18)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid #07111b; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), 0 0 8px rgba(113,226,210,.28); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid #07111b; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), 0 0 8px rgba(113,226,210,.28); }
.range-ends { display: flex; justify-content: space-between; color: #566d7d; font-size: 8px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; }
.preset-button { min-height: 31px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(14, 29, 41, .8); color: #91a4b1; font-size: 9px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.preset-button:hover { border-color: rgba(113,226,210,.45); color: #d9e8ed; }
.preset-button.active { color: var(--accent); border-color: rgba(113,226,210,.42); background: rgba(113,226,210,.09); }
.playback-section { padding-top: 16px; padding-bottom: 16px; }
.compact-control { margin-top: 0; }
.transport-row { display: grid; grid-template-columns: 1.2fr 1fr 38px; gap: 7px; margin-top: 14px; }
.transport-button { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(15, 31, 43, .86); color: #b3c2cb; font-size: 10px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.transport-button:hover { border-color: rgba(113,226,210,.4); background: rgba(22, 43, 55, .95); }
.transport-button:active { transform: translateY(1px); }
.transport-button.primary { border-color: rgba(113,226,210,.38); background: rgba(113,226,210,.12); color: var(--accent); }
.play-icon { display: inline-block; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; }
.pause-icon { width: 8px; height: 10px; border: 0; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.step-icon { font-size: 17px; line-height: 10px; margin-top: -2px; }
.icon-only { font-size: 18px; line-height: 1; }
.display-section { padding-top: 15px; padding-bottom: 15px; }
.display-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch-line { display: inline-flex; align-items: center; gap: 7px; color: #a9b9c4; font-size: 9px; cursor: pointer; user-select: none; }
.switch-line input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 25px; height: 14px; border-radius: 99px; background: #263b49; border: 1px solid #3a5261; position: relative; transition: background .16s ease; flex: 0 0 auto; }
.switch-track::after { content: ""; position: absolute; width: 8px; height: 8px; left: 2px; top: 2px; border-radius: 50%; background: #8295a2; transition: transform .16s ease, background .16s ease; }
.switch-line input:checked + .switch-track { background: rgba(113,226,210,.22); border-color: rgba(113,226,210,.42); }
.switch-line input:checked + .switch-track::after { transform: translateX(11px); background: var(--accent); }
.switch-line input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.quality-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.display-label { color: #718696; font-size: 8px; font-weight: 700; }
.quality-switch { display: flex; border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px; gap: 2px; }
.quality-button { min-width: 34px; padding: 4px 6px; border: 0; border-radius: 3px; background: transparent; color: #8195a3; font-size: 8px; font-weight: 750; cursor: pointer; }
.quality-button.active { color: var(--accent); background: rgba(113,226,210,.13); }
.screenshot-button { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: transparent; color: #9fb0bb; font-size: 8px; font-weight: 650; cursor: pointer; }
.screenshot-button:hover { color: var(--accent); border-color: var(--accent-line); }
.check-section { padding-top: 16px; padding-bottom: 16px; }
.check-card { border: 1px solid rgba(113,226,210,.2); border-radius: 8px; background: linear-gradient(135deg, rgba(16, 39, 48, .75), rgba(13, 27, 39, .78)); padding: 11px; }
.check-title { display: flex; align-items: center; gap: 7px; color: #d1e0e5; font-size: 10px; font-weight: 650; }
.check-mark { width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--accent); background: rgba(113,226,210,.12); font-size: 10px; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.check-values div { display: flex; flex-direction: column; gap: 4px; }
.check-values span { color: #728a98; font-size: 8px; }
.check-values strong { color: #dbe8ec; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.check-values .check-drift { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.check-values .check-drift strong { color: var(--accent); }
.check-note { margin: 10px 0 0; color: #7e929f; font-size: 8px; line-height: 1.5; }
.science-section { padding: 0; }
.science-details { border-bottom: 1px solid var(--line); }
.science-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; cursor: pointer; user-select: none; }
.science-details summary::-webkit-details-marker { display: none; }
.details-chevron { color: #78909f; font-size: 15px; transition: transform .2s ease; }
.science-details[open] .details-chevron { transform: rotate(180deg); }
.details-body { padding: 0 20px 16px; }
.science-lead { margin: 0 0 12px; color: #c2d1d9; font-size: 10px; line-height: 1.55; }
.equation-block { padding: 10px; margin: 8px 0; border: 1px solid var(--line); border-radius: 6px; background: rgba(5, 15, 24, .48); }
.equation-label { margin-bottom: 7px; color: #6e8796; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.equation-block code { display: block; color: #b4d9d4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.science-copy { color: #8fa3b0; font-size: 9px; line-height: 1.6; margin: 10px 0; }
.simplification-list { display: grid; gap: 7px; margin: 11px 0; }
.simplification-list > div { display: flex; align-items: start; gap: 8px; color: #9eb0bb; font-size: 9px; line-height: 1.45; }
.mini-bullet { width: 4px; height: 4px; margin-top: 4px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.affiliation-note { margin: 13px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: #6f8492; font-size: 8px; line-height: 1.5; }
.values-details { border-bottom: 0; }
.constant-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid rgba(167,190,207,.08); }
.constant-row span { color: #91a5b2; font-size: 8px; }
.constant-row strong { color: #d1dfe5; font-size: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.constant-row em { grid-column: 2; color: #718c89; font-size: 6px; font-style: normal; font-weight: 800; letter-spacing: .12em; text-align: right; }
.panel-footer { display: flex; justify-content: space-between; padding: 12px 20px 16px; color: #506675; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
@media (max-width: 1050px) and (min-width: 701px) {
  .control-panel { flex-basis: 330px; width: 330px; }
  .panel-section { padding-left: 16px; padding-right: 16px; }
  .stage-legend { gap: 11px; padding: 0 14px; }
  .legend-scale { display: none; }
}
@media (max-width: 700px) {
  html, body { overflow: hidden; }
  body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
  .topbar { flex: 0 0 54px; min-height: 54px; padding: 0 14px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-title { font-size: 12px; }
  .brand-kicker { font-size: 7px; }
  .topbar-meta { gap: 6px; font-size: 7px; letter-spacing: .08em; }
  .meta-class, .meta-divider { display: none; }
  .workspace { flex-direction: column; }
  .stage-panel { flex: 0 0 38%; min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-canvas-wrap { min-height: 0; }
  .stage-topline { top: 12px; left: 13px; right: 13px; }
  .frame-label { font-size: 7px; letter-spacing: .11em; gap: 6px; }
  .stage-status { padding: 5px 7px; font-size: 7px; }
  .stage-footer { left: 13px; right: 13px; bottom: 10px; }
  .stage-footer-kicker { font-size: 7px; }
  .stage-footer-main strong { font-size: 10px; }
  .stage-footer-note { font-size: 7px; }
  .stage-legend { flex: 0 0 30px; min-height: 30px; padding: 0 12px; gap: 12px; font-size: 7px; }
  .legend-item { gap: 5px; }
  .legend-dot { width: 6px; height: 6px; }
  .legend-line { width: 13px; }
  .legend-ring { width: 9px; height: 9px; }
  .legend-scale { display: none; }
  .control-panel { flex: 1 1 auto; width: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .panel-section { padding: 13px 16px; }
  .intro-section { padding-top: 15px; padding-bottom: 13px; }
  .caption-heading { margin-top: 7px; font-size: 14px; }
  .state-caption { margin: 6px 0 9px; font-size: 9px; line-height: 1.45; }
  .section-heading-row { margin-bottom: 9px; }
  .telemetry-grid { gap: 6px; }
  .metric-card { padding: 8px 9px 7px; }
  .metric-label { font-size: 6px; }
  .metric-value { margin-top: 5px; font-size: 17px; }
  .controls-section, .playback-section, .display-section, .check-section { padding-top: 13px; padding-bottom: 13px; }
  .control-row { margin-top: 10px; }
  .preset-row { margin-top: 12px; }
  .transport-row { margin-top: 11px; }
  .science-details summary { padding: 13px 16px; }
  .details-body { padding: 0 16px 14px; }
  .panel-footer { padding: 10px 16px 15px; }
}
@media (max-width: 380px) {
  .topbar-meta { display: none; }
  .stage-panel { flex-basis: 36%; }
  .stage-legend { gap: 8px; }
  .legend-item { font-size: 6px; }
  .panel-section { padding-left: 13px; padding-right: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
