:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0c1420;
  --panel-2: #101b29;
  --line: rgba(157, 183, 207, .13);
  --line-strong: rgba(157, 183, 207, .22);
  --text: #e7f0f7;
  --muted: #8798a9;
  --dim: #5d7082;
  --accent: #69e4e5;
  --accent-soft: rgba(105, 228, 229, .13);
  --accent-glow: rgba(105, 228, 229, .28);
  --radius: 15px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 38% 0%, #101d2c 0%, var(--bg) 48%); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1600px, 100%); min-height: 100vh; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 356px; grid-template-rows: 58px minmax(0, 1fr); gap: 14px; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 0 5px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(105, 228, 229, .38); border-radius: 11px; display: grid; place-items: center; position: relative; background: linear-gradient(145deg, rgba(105,228,229,.13), rgba(105,228,229,.02)); box-shadow: 0 0 24px rgba(105,228,229,.08); }
.brand-mark span { width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent-glow); }
.brand-mark i { position: absolute; width: 23px; height: 1px; background: var(--accent); transform: rotate(-42deg); opacity: .8; }
.eyebrow { color: #8ba0b2; font-size: 9px; font-weight: 750; letter-spacing: .17em; line-height: 1.4; }
.eyebrow span { color: var(--accent); margin: 0 4px; }
h1 { font-size: 17px; line-height: 1.25; letter-spacing: -.025em; font-weight: 650; margin: 2px 0 0; }
.top-meta { display: flex; align-items: center; gap: 9px; }
.physics-chip, .constant-chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: #b3c3d0; font-size: 9px; font-weight: 700; letter-spacing: .09em; white-space: nowrap; background: rgba(13,22,34,.72); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; box-shadow: 0 0 9px var(--accent); }
.constant-chip { color: var(--accent); }
.constant-chip small { color: var(--dim); font-size: 8px; margin-left: 5px; }
.stage-card, .side-panel { min-width: 0; min-height: 0; }
.stage-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(14,24,37,.94), rgba(8,14,23,.97)); box-shadow: 0 20px 70px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden; }
.stage-heading { min-height: 65px; padding: 14px 18px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.stage-title { font-size: 14px; font-weight: 600; margin-top: 3px; letter-spacing: -.01em; }
.stage-legend { color: #9aabba; font-size: 9px; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.legend-line { width: 18px; border-top: 1px dashed var(--accent); margin-left: 7px; opacity: .8; }
.canvas-wrap { position: relative; flex: 1; min-height: 340px; overflow: hidden; background: #080f19; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.canvas-corner { position: absolute; top: 15px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; text-shadow: 0 1px 8px #07101a; }
.corner-left { left: 17px; }
.corner-right { right: 17px; text-align: right; }
.corner-label { color: #9aafc0; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.corner-sub { color: #70869a; font-size: 9px; }
.corner-sub b { color: var(--accent); padding: 0 3px; }
.canvas-scale { position: absolute; left: 18px; bottom: 16px; display: flex; align-items: center; gap: 8px; color: #9fb0bf; font-size: 9px; pointer-events: none; }
.scale-line { width: 38px; height: 5px; border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); opacity: .8; }
.canvas-scale small { font-size: 7px; color: var(--dim); letter-spacing: .08em; }
.observer-mark { position: absolute; right: 17px; bottom: 15px; display: flex; gap: 7px; align-items: center; color: #91a5b6; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-align: left; pointer-events: none; }
.observer-arrow { color: var(--accent); font-size: 19px; line-height: 1; }
.observer-mark small { font-size: 7px; color: var(--dim); letter-spacing: .04em; font-weight: 500; }
.stage-caption { display: flex; gap: 11px; padding: 13px 18px 12px; min-height: 68px; border-top: 1px solid var(--line); background: rgba(13,22,34,.8); }
.caption-mark { flex: 0 0 21px; width: 21px; height: 21px; border: 1px solid rgba(105,228,229,.45); border-radius: 50%; color: var(--accent); display: grid; place-items: center; font-family: Georgia, serif; font-style: italic; font-size: 13px; }
.caption-label { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .16em; margin-bottom: 4px; }
.stage-caption p { margin: 0; color: #bdcbd6; font-size: 11px; line-height: 1.45; }
.stage-bottomline { display: flex; justify-content: space-between; gap: 10px; padding: 8px 18px 9px; color: #627587; font-size: 7px; letter-spacing: .13em; font-weight: 750; border-top: 1px solid rgba(157,183,207,.07); }
.side-panel { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #263849 transparent; padding-right: 1px; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(150deg, rgba(16,27,41,.94), rgba(10,18,29,.96)); padding: 11px 12px 10px; }
.metric-featured { border-color: rgba(105,228,229,.3); box-shadow: inset 0 0 25px rgba(105,228,229,.035); }
.metric-label { color: #8ea1b2; font-size: 8px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.metric-label span { color: #53697c; font-size: 6px; letter-spacing: .08em; margin-left: 3px; }
.metric-value { margin-top: 6px; color: #e9f5f8; font-size: 23px; line-height: 1; font-weight: 650; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric-featured .metric-value { color: var(--accent); }
.metric-value small { color: #9cb0bf; font-size: 10px; font-weight: 550; letter-spacing: 0; }
.metric-foot { margin-top: 6px; color: #64788a; font-size: 8px; white-space: nowrap; }
.check-card { border: 1px solid rgba(105,228,229,.2); border-radius: 12px; background: linear-gradient(100deg, rgba(105,228,229,.07), rgba(12,20,31,.96) 52%); padding: 10px 12px; }
.check-head { display: flex; align-items: center; gap: 7px; color: #9cb2c2; font-size: 8px; letter-spacing: .11em; font-weight: 800; }
.check-icon { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; color: #071116; background: var(--accent); font-size: 10px; font-weight: 900; }
.check-tag { margin-left: auto; color: #647f8f; font-size: 6px; letter-spacing: .09em; }
.check-equation { margin: 9px 0 5px; color: #d9e9ef; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; white-space: nowrap; }
.check-equation span { color: var(--accent); padding: 0 4px; }
.check-result { color: #8ea2b2; font-size: 8px; font-variant-numeric: tabular-nums; }
.check-result span { color: var(--accent); padding: 0 3px; }
.control-card, .transport-card, .science-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(12,20,31,.88); }
.control-card { padding: 12px 13px 11px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-head h2 { margin: 2px 0 0; font-size: 14px; letter-spacing: -.02em; font-weight: 620; }
.text-button { background: transparent; border: 0; color: #7e94a7; font-size: 8px; font-weight: 800; letter-spacing: .12em; padding: 6px 0 6px 8px; cursor: pointer; }
.text-button:hover { color: var(--accent); }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.preset-button { background: #101d2b; border: 1px solid var(--line); border-radius: 7px; color: #8094a6; padding: 8px 5px; font-size: 8px; font-weight: 800; letter-spacing: .12em; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.preset-button.active { border-color: rgba(105,228,229,.42); color: var(--accent); background: rgba(105,228,229,.08); }
.control-group { margin-top: 10px; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.control-label label { color: #c4d0d9; font-size: 9px; font-weight: 600; }
.control-label label span { color: #5e7486; font-size: 7px; font-weight: 500; margin-left: 3px; }
.control-label output { color: var(--accent); font-size: 9px; font-variant-numeric: tabular-nums; font-weight: 700; }
input[type="range"] { appearance: none; width: 100%; height: 13px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(105,228,229,.6), rgba(105,228,229,.16)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(105,228,229,.6), rgba(105,228,229,.16)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--accent); border: 2px solid #0c1721; box-shadow: 0 0 0 1px rgba(105,228,229,.6), 0 0 10px rgba(105,228,229,.25); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid #0c1721; box-shadow: 0 0 0 1px rgba(105,228,229,.6); }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.range-ends { display: flex; justify-content: space-between; color: #586c7e; font-size: 7px; margin-top: 1px; }
.transport-card { padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.transport-row { display: flex; gap: 6px; }
.play-button, .small-button { min-height: 32px; border-radius: 7px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 8px; font-weight: 800; letter-spacing: .09em; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.play-button { flex: 1.05; display: flex; justify-content: center; align-items: center; gap: 7px; color: #061216; border-color: var(--accent); background: var(--accent); box-shadow: 0 4px 16px rgba(105,228,229,.12); }
.play-button:hover { background: #8af0ed; }
.play-button span:first-child { font-size: 11px; }
.small-button { flex: 1; color: #9fb1bf; background: #101c29; padding: 0 7px; white-space: nowrap; }
.small-button:hover { color: var(--accent); border-color: rgba(105,228,229,.42); background: #122332; }
.secondary-row { align-items: center; }
.quality-toggle { display: flex; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #0a121c; }
.quality-toggle button { flex: 1; border: 0; background: transparent; color: #73889a; font-size: 8px; font-weight: 800; letter-spacing: .1em; padding: 8px 4px; cursor: pointer; }
.quality-toggle button.selected { color: var(--accent); background: rgba(105,228,229,.1); }
.screenshot-button { flex: 1.2; }
.science-card { overflow: hidden; }
.science-card summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; cursor: pointer; list-style: none; }
.science-card summary::-webkit-details-marker { display: none; }
.science-card summary strong { display: block; font-size: 12px; margin-top: 2px; font-weight: 620; }
.chevron { color: var(--accent); font-size: 17px; transition: transform .2s ease; }
.science-card[open] .chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 11px 13px 13px; }
.science-content h3 { color: #dce8ee; font-size: 10px; margin: 11px 0 5px; }
.science-content h3:first-child { margin-top: 0; }
.science-content p { color: #91a3b1; font-size: 9px; line-height: 1.55; margin: 5px 0; }
.science-content b { color: #c5d4de; }
.equation-block { color: var(--accent); background: rgba(105,228,229,.055); border: 1px solid rgba(105,228,229,.12); border-radius: 6px; padding: 8px; margin: 7px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; overflow-wrap: anywhere; }
.disclaimer { margin-top: 12px !important; padding-top: 9px; border-top: 1px solid var(--line); color: #6f8495 !important; font-style: italic; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 980px) and (min-width: 701px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) 320px; gap: 10px; padding: 12px; }
  .stage-heading { padding-inline: 13px; }
  .stage-legend { font-size: 8px; }
  .metric-card { padding-inline: 9px; }
  .metric-value { font-size: 21px; }
}
@media (max-width: 700px) {
  body { min-width: 320px; }
  .app-shell { display: flex; flex-direction: column; gap: 9px; padding: 10px; min-height: 100vh; }
  .topbar { flex: 0 0 46px; padding: 0 2px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  h1 { font-size: 15px; }
  .eyebrow { font-size: 8px; }
  .top-meta { gap: 5px; }
  .physics-chip { display: none; }
  .constant-chip { font-size: 8px; padding: 6px 8px; }
  .stage-card { flex: 0 0 auto; height: 390px; }
  .stage-heading { min-height: 55px; padding: 10px 12px; }
  .stage-title { font-size: 12px; }
  .stage-legend { font-size: 0; gap: 5px; }
  .legend-line { width: 13px; }
  .canvas-wrap { min-height: 0; flex: 1; }
  .canvas-corner { top: 10px; }
  .corner-left { left: 11px; }
  .corner-right { right: 11px; }
  .corner-label { font-size: 7px; }
  .corner-sub { font-size: 8px; }
  .stage-caption { min-height: 66px; padding: 10px 12px; }
  .stage-caption p { font-size: 10px; }
  .stage-bottomline { padding: 7px 12px; font-size: 6px; }
  .side-panel { overflow: visible; gap: 8px; }
  .metric-card { padding: 9px 10px; }
  .metric-label { font-size: 7px; }
  .metric-label span { font-size: 6px; }
  .metric-value { font-size: 21px; }
  .metric-foot { font-size: 7px; }
  .check-card { padding: 9px 10px; }
  .check-head { font-size: 7px; }
  .check-equation { font-size: 9px; }
  .check-result { font-size: 7px; }
  .control-card { padding: 11px 12px; }
  .control-group { margin-top: 9px; }
  .control-label label { font-size: 9px; }
  .range-ends { font-size: 7px; }
  .transport-card { padding: 8px; }
  .play-button, .small-button { min-height: 34px; font-size: 7px; }
  .science-content p { font-size: 9px; }
}
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
@media (max-width: 700px) {
  body.embed-mode .app-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 43px minmax(245px, 39vh) minmax(0, 1fr); gap: 8px; padding: 9px; }
  body.embed-mode .topbar { grid-column: 1; min-height: 0; }
  body.embed-mode .stage-card { height: auto; min-height: 0; grid-row: 2; }
  body.embed-mode .side-panel { grid-row: 3; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1px 8px 0; }
}
@media (max-height: 700px) and (min-width: 701px) {
  .app-shell { grid-template-rows: 48px minmax(0, 1fr); padding: 10px; gap: 9px; }
  .stage-heading { min-height: 53px; }
  .canvas-wrap { min-height: 230px; }
  .side-panel { gap: 7px; }
  .metric-card { padding-block: 8px; }
  .control-group { margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.science-tag { color: #6c8495; font-size: 7px; letter-spacing: .1em; font-weight: 750; margin-left: 4px; }
