:root {
  color-scheme: dark;
  --bg: #07151d;
  --panel: #0b1c26;
  --panel-2: #102531;
  --line: rgba(159, 197, 207, .13);
  --muted: #78909a;
  --text: #e6f2f2;
  --teal: #66e0cf;
  --teal-dim: #2c9e99;
  --blue: #70b8e8;
  --orange: #e5bd84;
  --gap: 8px;
  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%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { height: 100dvh; min-height: 580px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 22% 12%, #102b37 0%, #07151d 54%); }
.topbar { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(5, 17, 24, .88); z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; height: 28px; border: 1px solid rgba(102,224,207,.42); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-24deg); }
.brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--teal); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .5; }.brand-mark span:nth-child(2) { height: 16px; }.brand-mark span:nth-child(3) { height: 11px; opacity: .7; }
.eyebrow, .stage-kicker, .section-label, .readout-label, .camera-hint, .sim-clock, .topbar-meta { font-size: 9px; letter-spacing: .13em; font-weight: 750; }
.eyebrow { color: #77919a; line-height: 1.2; }
.brand-name { font-size: 14px; font-weight: 850; letter-spacing: .16em; line-height: 1.3; color: #e9f5f2; }.brand-name span { color: var(--teal); font-weight: 500; }
.topbar-meta { color: #8299a0; display: flex; align-items: center; gap: 9px; }
.live-dot, .clock-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px rgba(102,224,207,.75); }
.topbar-divider { height: 14px; width: 1px; background: var(--line); margin: 0 5px; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 368px; }
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #061a24; isolation: isolate; }
#sceneCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; outline: none; touch-action: pan-y; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4,17,24,.68) 0%, transparent 25%, transparent 60%, rgba(4,16,22,.76) 100%), linear-gradient(90deg, rgba(4,16,22,.18), transparent 28%, transparent 80%, rgba(4,16,22,.14)); z-index: 1; }
.stage-topline { position: absolute; top: 26px; left: 28px; right: 24px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; pointer-events: none; }
.stage-kicker { color: var(--teal); margin-bottom: 8px; }.stage-topline h1 { margin: 0; font-size: clamp(25px, 3vw, 40px); letter-spacing: -.045em; line-height: 1.04; font-weight: 720; text-shadow: 0 2px 18px rgba(0,0,0,.25); }.stage-topline h1 em { color: #7ce4d4; font-style: normal; font-weight: 450; }.stage-topline p { margin: 9px 0 0; color: #a3b9be; font-size: 12px; letter-spacing: .015em; }
.stage-badges { display: flex; gap: 7px; margin-top: 3px; }.badge { padding: 7px 9px; border-radius: 4px; font-size: 8px; letter-spacing: .12em; font-weight: 800; }.badge-teal { color: #07221f; background: rgba(102,224,207,.92); }.badge-outline { color: #b2c9ce; border: 1px solid rgba(191,221,224,.25); background: rgba(7,25,34,.35); }
.scene-legend { position: absolute; left: 28px; bottom: 126px; display: flex; flex-direction: column; gap: 8px; z-index: 2; pointer-events: none; }.scene-legend div { display: flex; align-items: center; gap: 9px; color: rgba(220,239,239,.78); font-size: 9px; letter-spacing: .03em; }.legend-line { width: 17px; height: 2px; display: inline-block; border-radius: 4px; }.legend-line.foam { background: #eaf9f5; box-shadow: 0 0 7px rgba(255,255,255,.7); }.legend-line.roll { background: #47d9ca; box-shadow: 0 0 8px rgba(71,217,202,.6); }.legend-dot { width: 5px; height: 5px; border-radius: 50%; background: #8bd4ff; box-shadow: 0 0 8px #5bb5f3; margin: 0 6px; }
.scene-footer { position: absolute; left: 28px; right: 26px; bottom: 105px; display: flex; justify-content: space-between; align-items: center; z-index: 2; pointer-events: none; }.camera-hint, .sim-clock { color: rgba(194,216,218,.64); font-size: 8px; }.camera-hint b { margin: 0 5px; color: #5c7d83; }.mouse-icon { font-size: 14px; color: var(--teal); vertical-align: -1px; margin-right: 6px; }.sim-clock { display: flex; align-items: center; gap: 8px; }.clock-pulse { width: 5px; height: 5px; }.clock-sep { color: #43616b; }
.readout-strip { position: absolute; z-index: 3; bottom: 15px; left: 16px; right: 16px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; pointer-events: none; }.readout-card { min-width: 0; padding: 11px 12px 10px; border: 1px solid rgba(167,209,214,.16); background: rgba(5,21,29,.78); backdrop-filter: blur(12px); border-radius: 7px; box-shadow: 0 6px 22px rgba(0,0,0,.12); }.readout-highlight { border-color: rgba(102,224,207,.34); background: rgba(8,35,39,.82); }.readout-label { color: #8ca8ad; font-size: 8px; letter-spacing: .09em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.readout-label span { color: #577b80; font-size: 7px; margin-left: 4px; }.readout-value { margin-top: 5px; font-size: clamp(18px, 2vw, 24px); font-weight: 680; letter-spacing: -.04em; color: #ecf8f5; font-variant-numeric: tabular-nums; }.readout-value small { color: #8eb1b3; font-size: 10px; font-weight: 500; letter-spacing: 0; }.readout-note { color: #78949a; font-size: 8px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-loss { display: none; position: absolute; inset: 0; z-index: 10; background: rgba(4,14,20,.9); align-items: center; justify-content: center; flex-direction: column; gap: 9px; text-align: center; padding: 24px; }.context-loss.visible { display: flex; }.context-loss-icon { font-size: 38px; color: var(--teal); }.context-loss strong { font-size: 17px; }.context-loss span { max-width: 320px; color: #9cb1b6; font-size: 12px; line-height: 1.5; }
.control-rail { min-height: 0; overflow: auto; background: linear-gradient(180deg, #0b1d27 0%, #091923 100%); border-left: 1px solid rgba(166,207,212,.13); padding: 20px 18px 16px; scrollbar-width: thin; scrollbar-color: #28444e transparent; }.control-rail::-webkit-scrollbar { width: 5px; }.control-rail::-webkit-scrollbar-thumb { background: #28444e; border-radius: 10px; }
.rail-heading { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }.rail-heading h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.035em; font-weight: 670; }.status-chip { display: flex; align-items: center; gap: 6px; color: #8eaaa9; font-size: 8px; letter-spacing: .12em; font-weight: 800; padding-bottom: 3px; }.status-chip span { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.preset-section, .parameter-section, .playback-section { padding: 15px 0; border-bottom: 1px solid var(--line); }.section-label { color: #88a1a7; font-size: 8px; display: flex; justify-content: space-between; margin-bottom: 10px; }.section-label span { color: #4d6c75; font-size: 7px; }
.preset-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }.preset-button { border: 1px solid rgba(164,201,206,.13); background: rgba(17,43,54,.6); border-radius: 5px; padding: 8px 5px; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer; transition: .2s ease; }.preset-button:hover { border-color: rgba(102,224,207,.45); background: rgba(25,62,70,.75); }.preset-button.active { border-color: rgba(102,224,207,.62); background: rgba(29,76,78,.44); box-shadow: inset 0 0 0 1px rgba(102,224,207,.08); }.preset-icon { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; flex: 0 0 auto; color: var(--teal); background: rgba(102,224,207,.1); font-size: 17px; }.wave-icon { color: #9bd3f2; background: rgba(112,184,232,.12); }.strong-icon { color: #e6bd85; background: rgba(230,189,133,.12); }.preset-button b { display: block; font-size: 8px; white-space: nowrap; font-weight: 730; }.preset-button small { display: block; margin-top: 3px; color: #78949a; font-size: 7px; white-space: nowrap; }
.control-row { margin-top: 13px; }.control-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }.control-heading label { color: #c5d7d8; font-size: 10px; }.control-heading output { color: #83dccc; font-size: 11px; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }.control-heading output small { color: #76999b; font-size: 9px; font-weight: 500; }.control-row input[type=range] { appearance: none; width: 100%; height: 16px; background: transparent; display: block; margin: 5px 0 0; cursor: pointer; }.control-row input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #3caaa0, #285a66); }.control-row input[type=range]::-moz-range-track { height: 3px; border-radius: 10px; background: #285a66; }.control-row input[type=range]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #a5f1df; border: 2px solid #173e44; box-shadow: 0 0 0 3px rgba(102,224,207,.12); margin-top: -4px; }.control-row input[type=range]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #a5f1df; border: 2px solid #173e44; box-shadow: 0 0 0 3px rgba(102,224,207,.12); }.control-row input:focus-visible { outline: 1px solid var(--teal); outline-offset: 3px; border-radius: 3px; }.range-scale { display: flex; justify-content: space-between; color: #58757c; font-size: 7px; margin-top: -1px; }.compact-control { margin-top: 11px; }
.playback-section { padding-bottom: 13px; }.transport-row { display: flex; align-items: center; gap: 6px; }.play-button { height: 33px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(102,224,207,.45); border-radius: 5px; background: rgba(47,135,128,.2); color: #baf5e8; cursor: pointer; }.play-button span { font-size: 13px; }.play-button b { font-size: 9px; font-weight: 750; }.icon-button { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: rgba(17,43,54,.6); color: #a8c1c3; cursor: pointer; font-size: 14px; }.play-button:hover, .icon-button:hover, .tool-button:hover { border-color: rgba(102,224,207,.65); color: #e8fffa; }.speed-control { margin-left: auto; display: flex; align-items: center; gap: 7px; }.speed-control label { font-size: 7px; letter-spacing: .1em; color: #77959a; }.speed-control select { border: 1px solid var(--line); border-radius: 4px; background: #122c37; color: #bfe9df; padding: 6px 8px; font-size: 9px; outline: none; }.tool-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; }.quality-switch { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }.quality-switch button { border: 0; background: transparent; color: #69878e; padding: 6px 8px; font-size: 7px; letter-spacing: .08em; cursor: pointer; }.quality-switch button.active { color: #b8f2e5; background: rgba(53,139,130,.28); }.tool-button { border: 1px solid var(--line); border-radius: 4px; background: rgba(17,43,54,.55); color: #9ab7bb; padding: 6px 7px; font-size: 10px; cursor: pointer; white-space: nowrap; }.tool-button span { font-size: 8px; }
.science-panel { border-bottom: 1px solid var(--line); }.science-panel summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 0; }.science-panel summary::-webkit-details-marker { display: none; }.science-symbol { width: 25px; height: 25px; display: grid; place-items: center; color: var(--teal); background: rgba(102,224,207,.1); border: 1px solid rgba(102,224,207,.15); border-radius: 5px; font-size: 15px; }.science-panel summary b { display: block; font-size: 10px; }.science-panel summary small { display: block; color: #759199; font-size: 8px; margin-top: 3px; }.chevron { margin-left: auto; color: #79969a; font-size: 17px; transition: transform .2s; }.science-panel[open] .chevron { transform: rotate(180deg); }.science-content { padding: 0 0 13px; animation: reveal .2s ease; }.science-intro { margin: 0 0 11px; color: #a2b9bb; font-size: 9px; line-height: 1.6; }.equation-block { padding: 8px 9px; margin-top: 6px; background: rgba(14,40,50,.72); border: 1px solid rgba(151,192,197,.1); border-radius: 4px; }.equation-label { display: block; color: #6f9999; font-size: 7px; letter-spacing: .1em; font-weight: 800; margin-bottom: 5px; }.equation-block code { display: block; color: #d0e8e3; font: 9px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: normal; overflow-wrap: anywhere; }.validation-card { padding: 10px; margin-top: 9px; border: 1px solid rgba(102,224,207,.2); background: rgba(15,52,54,.3); border-radius: 5px; }.validation-head { display: flex; justify-content: space-between; font-size: 7px; color: #80aaa7; letter-spacing: .1em; font-weight: 800; margin-bottom: 7px; }.validation-ok { color: #83ddbd; }.validation-card > b { display: block; font-size: 9px; margin-bottom: 7px; }.validation-values { display: flex; justify-content: space-between; gap: 6px; color: #829fa3; font-size: 8px; }.validation-values strong { color: #e1f3ed; font-weight: 700; font-variant-numeric: tabular-nums; }.validation-delta { color: #87a3a5; font-size: 8px; margin-top: 6px; }.validation-delta strong { color: #8ce4ca; }.validation-card > small { display: block; color: #6d8b90; font-size: 7px; line-height: 1.5; margin-top: 6px; }.assumption-note { margin-top: 10px; padding-left: 9px; border-left: 2px solid rgba(229,189,132,.55); }.assumption-note b { color: #d8b987; font-size: 8px; }.assumption-note p { margin: 4px 0 0; color: #829da1; font-size: 8px; line-height: 1.55; }.source-note { color: #5f7d84; font-size: 7px; line-height: 1.5; margin: 9px 0 0; }.rail-footer { padding-top: 11px; color: #58747b; font-size: 7px; line-height: 1.45; }
@keyframes reveal { from { opacity: .3; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) { .workspace { grid-template-columns: minmax(0,1fr) 330px; }.control-rail { padding-left: 14px; padding-right: 14px; }.readout-card { padding: 9px; }.readout-label { font-size: 7px; } }
@media (max-width: 760px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }.app-shell { min-height: 100dvh; height: auto; }.topbar { height: 50px; flex-basis: 50px; padding: 0 14px; }.topbar-meta { font-size: 7px; }.topbar-meta .topbar-divider, .topbar-meta > span:last-child { display: none; }.workspace { display: flex; flex-direction: column; min-height: 0; }.stage { height: 56dvh; min-height: 420px; flex: 0 0 56dvh; }.stage-topline { top: 18px; left: 17px; right: 14px; }.stage-topline h1 { font-size: 28px; }.stage-topline p { font-size: 10px; }.stage-badges { flex-direction: column; gap: 5px; }.badge { font-size: 7px; padding: 6px 7px; }.scene-legend { left: 17px; bottom: 118px; gap: 6px; }.scene-legend div { font-size: 8px; }.scene-footer { left: 17px; right: 14px; bottom: 100px; }.camera-hint { font-size: 7px; }.sim-clock { font-size: 7px; }.readout-strip { left: 9px; right: 9px; bottom: 9px; gap: 5px; grid-template-columns: repeat(4,minmax(0,1fr)); }.readout-card { padding: 7px 6px; border-radius: 5px; }.readout-label { font-size: 6px; letter-spacing: .05em; }.readout-label span { display: none; }.readout-value { font-size: 16px; margin-top: 4px; }.readout-value small { font-size: 8px; }.readout-note { font-size: 6px; }.control-rail { overflow: visible; border-left: 0; border-top: 1px solid var(--line); padding: 16px 16px 24px; }.rail-heading h2 { font-size: 17px; }.preset-button { padding: 9px 7px; }.preset-button b { font-size: 9px; }.preset-button small { font-size: 7px; }.parameter-section { padding: 14px 0; }.control-row { margin-top: 14px; }.control-heading label { font-size: 11px; }.control-heading output { font-size: 12px; }.control-row input[type=range] { margin-top: 7px; }.range-scale { font-size: 8px; }.play-button, .icon-button { height: 36px; }.tool-button { padding: 7px 8px; }.tool-button span { font-size: 9px; }.science-panel summary { padding: 15px 0; }.science-intro { font-size: 10px; }.equation-block code { font-size: 10px; }.assumption-note p { font-size: 9px; }
}
@media (max-width: 390px) { .stage { min-height: 400px; }.readout-value { font-size: 14px; }.readout-note { display: none; }.scene-legend { bottom: 105px; }.scene-footer { bottom: 91px; }.tool-row { flex-wrap: wrap; }.tool-button { flex: 1; }.quality-switch { flex: 0 0 auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body.embed .topbar { display: none; } body.embed .workspace { height: 100dvh; } body.embed .control-rail { padding-top: 14px; }

.causal-chain { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 8px 7px; margin: 0 0 8px; border: 1px solid rgba(102,224,207,.14); border-radius: 4px; background: rgba(17,55,57,.28); color: #a9c9c7; font-size: 7px; line-height: 1.35; }
.causal-chain span { min-width: 0; }
.causal-chain b { display: block; color: #74cdbd; font-size: 6px; letter-spacing: .08em; margin-bottom: 2px; }
.causal-chain i { color: #5b8c8a; font-style: normal; flex: 0 0 auto; }
@media (max-width: 760px) { .causal-chain { font-size: 8px; gap: 6px; padding: 9px; } .causal-chain b { font-size: 7px; } }

.variable-note { margin: 7px 1px 0; color: #77959a; font-size: 7px; line-height: 1.5; }
@media (max-width: 760px) { .variable-note { font-size: 8px; } }
