:root{
  color-scheme:dark;
  --bg:#0b1117;--panel:#111a22;--panel-2:#151f29;--panel-3:#192530;--line:#263440;--line-soft:#202c36;
  --text:#e8eff2;--muted:#91a1aa;--dim:#647680;--accent:#79d6e2;--accent-2:#b3edf2;--paper:#e6ddc8;--ink:#183e48;
  --radius:12px;--gap:8px;--font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--text);font-family:var(--font);overflow:hidden}
body{min-width:320px}
button,input,summary{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:radial-gradient(ellipse at 18% 0%,rgba(48,79,94,.15),transparent 42%),var(--bg)}
body.embed-mode{height:100vh;height:100dvh;overflow:hidden}
body.embed-mode .app-shell{height:100vh;height:100dvh;overflow:hidden}
.topbar{height:72px;flex:0 0 72px;display:flex;align-items:center;padding:0 22px;border-bottom:1px solid var(--line-soft);gap:14px;background:rgba(10,16,22,.96)}
.brand-mark{width:34px;height:34px;border:1px solid #31434e;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:3px;transform:rotate(-8deg);background:linear-gradient(145deg,#1b2b35,#101820)}
.brand-mark span{width:3px;border-radius:4px;background:var(--accent);display:block;opacity:.9}
.brand-mark span:nth-child(1){height:10px}.brand-mark span:nth-child(2){height:18px}.brand-mark span:nth-child(3){height:13px}
.brand-copy{min-width:0}.eyebrow,.section-kicker{font-size:9px;letter-spacing:.16em;font-weight:750;color:#82949d}.eyebrow{display:flex;align-items:center;gap:8px;margin-bottom:3px}.eyebrow-dot{width:3px;height:3px;border-radius:50%;background:var(--accent)}
h1{font-size:18px;letter-spacing:-.035em;line-height:1.1;margin:0;font-weight:650;color:#f0f5f6}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.date-chip,.live-chip{height:30px;border:1px solid var(--line);border-radius:7px;padding:0 9px;display:flex;align-items:center;gap:7px;background:#101820}
.date-year{font-size:11px;font-weight:700;color:#dce6e9;font-variant-numeric:tabular-nums}.micro-tag{font-size:8px;line-height:1.3;color:#8497a1;letter-spacing:.035em;text-transform:lowercase;white-space:nowrap}
.live-chip{font-size:9px;letter-spacing:.12em;font-weight:800;color:#b8c7cc}.live-dot{width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 9px rgba(121,214,226,.6)}
.workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:10px;padding:10px}
.stage-panel{min-width:0;min-height:0;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:linear-gradient(155deg,#131e27,#0e161d 70%);display:flex;flex-direction:column;position:relative}
.stage-head{height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid var(--line-soft);gap:8px}
.view-tabs{display:flex;align-items:center;gap:4px;min-width:0}
.view-tab{border:1px solid transparent;background:transparent;color:#81939d;border-radius:7px;padding:7px 10px;font-size:10px;font-weight:650;cursor:pointer;white-space:nowrap;transition:background .18s,border-color .18s,color .18s}
.view-tab:hover{color:#dce8eb;background:#192630}.view-tab.active{background:#1c303a;border-color:#2b4650;color:var(--accent-2)}
.stage-tools{display:flex;align-items:center;gap:10px}.stage-label{font-size:8px;letter-spacing:.14em;font-weight:800;color:#82939b;display:flex;gap:6px;align-items:center;white-space:nowrap}
.icon-button{width:29px;height:29px;display:grid;place-items:center;background:#15212a;border:1px solid #2b3a44;border-radius:7px;cursor:pointer;transition:border-color .18s,background .18s}.icon-button:hover{border-color:var(--accent);background:#1a2c36}.icon-button svg{width:15px;height:15px;fill:none;stroke:#b6c7cd;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.canvas-wrap{flex:1;min-height:0;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,rgba(35,61,72,.28),transparent 58%),linear-gradient(180deg,#101922,#0d151c)}
.canvas-wrap:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.17;background-image:linear-gradient(rgba(127,164,177,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(127,164,177,.09) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(180deg,black,transparent 95%)}
#machineCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:pan-y}
.canvas-corner{position:absolute;z-index:2;pointer-events:none;display:flex;flex-direction:column;gap:3px}.corner-tl{left:16px;top:13px}.corner-br{right:16px;bottom:62px;text-align:right}.corner-kicker{font-size:8px;letter-spacing:.16em;font-weight:800;color:#9cb0b8}.corner-sub{font-size:9px;color:#71848e}.sim-clock{font-size:12px;font-weight:750;letter-spacing:.04em;color:#d8e5e8;font-variant-numeric:tabular-nums}
.canvas-caption{position:absolute;z-index:2;bottom:12px;left:14px;right:14px;max-width:660px;padding:9px 12px;border:1px solid rgba(71,99,111,.55);border-radius:8px;background:rgba(12,20,27,.83);backdrop-filter:blur(8px);font-size:10px;line-height:1.45;color:#c5d3d8;pointer-events:none}
.transport-bar{height:52px;flex:0 0 52px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-top:1px solid var(--line-soft);background:#101820;gap:10px}.transport-actions{display:flex;align-items:center;gap:7px}
.transport-button{height:31px;padding:0 10px;border:1px solid #2b3a44;background:#15212a;border-radius:7px;display:flex;align-items:center;gap:6px;font-size:10px;font-weight:650;color:#b9c8cd;cursor:pointer;transition:background .18s,border-color .18s}.transport-button:hover{background:#1b2c36;border-color:#49606a}.transport-button:disabled{opacity:.35;cursor:not-allowed;border-color:#293943;background:#121b22}.transport-button.primary{background:#1d343e;border-color:#365d68;color:#c8f1f4}.button-icon{font-size:14px;line-height:1;color:var(--accent)}.step-meta{font-size:8px;color:#7d9099;margin-left:-3px}
.quality-control{display:flex;align-items:center;gap:3px}.quality-control>span{font-size:8px;letter-spacing:.13em;color:#73858f;font-weight:800;margin-right:4px}.quality-option{border:1px solid transparent;background:transparent;border-radius:5px;padding:5px 7px;font-size:9px;color:#83959e;cursor:pointer}.quality-option.active{background:#1a2b34;border-color:#30444e;color:var(--accent-2)}
.inspector{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(180deg,#131d26,#101820);scrollbar-width:thin;scrollbar-color:#334650 transparent}
.inspector-section{padding:13px 14px;border-bottom:1px solid var(--line-soft)}
.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.section-heading h2{font-size:13px;letter-spacing:-.02em;font-weight:650;margin:3px 0 0;color:#e3ecef}.section-mark{font-size:17px;color:#6d8792}.section-kicker{font-size:8px;letter-spacing:.14em}
.signal-status-row{height:25px;border:1px solid #293b45;border-radius:6px;background:#101920;display:flex;align-items:center;padding:0 8px;gap:7px;font-size:8px;letter-spacing:.11em;font-weight:800;color:#a9bbc2;margin-bottom:10px}.signal-indicator{width:6px;height:6px;border-radius:50%;background:#60757e}.signal-indicator.active{background:var(--accent);box-shadow:0 0 8px rgba(121,214,226,.7)}.signal-type{margin-left:auto;color:#71858e;font-size:7px;letter-spacing:.09em;display:flex;align-items:center;gap:5px}
.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.control-card{display:block;min-width:0;padding:8px 9px 7px;border:1px solid #293943;border-radius:8px;background:linear-gradient(150deg,#17232c,#131e26);cursor:default}.control-card.wide-control{grid-column:1/-1}.control-top{display:flex;align-items:flex-start;justify-content:space-between;gap:5px;font-size:9px;line-height:1.3;color:#b6c5ca}.control-top output{font-size:9px;color:#dff7f8;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}.control-card input[type=range]{display:block;width:100%;height:14px;margin:5px 0 2px;accent-color:var(--accent);cursor:pointer;background:transparent}.control-bottom{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:7px;color:#647984;font-variant-numeric:tabular-nums}.control-bottom .micro-tag{margin-left:auto;font-size:7px}
.preset-row{display:flex;gap:6px;margin-top:8px}.preset-button{flex:1;min-width:0;border:1px solid #2b3b45;border-radius:6px;background:#121d25;padding:7px 6px;font-size:8px;font-weight:650;color:#8fa1a9;cursor:pointer;transition:all .18s}.preset-button.active{border-color:#3c6872;color:#c9f0f2;background:#1b3039}.preset-button:hover{border-color:#5c8791}
.mechanics-section{padding-top:12px;padding-bottom:12px}.readout-section{padding-top:12px;padding-bottom:12px}.compact-heading{margin-bottom:8px}.compact-heading h2{margin-top:3px}.readout-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.readout-card{border:1px solid #293943;border-radius:8px;background:#121d25;padding:8px 9px;min-width:0}.readout-label{display:block;font-size:8px;color:#82949d;margin-bottom:5px}.readout-card strong{font-size:16px;letter-spacing:-.035em;font-weight:680;color:#e8f0f2;font-variant-numeric:tabular-nums;white-space:nowrap}.readout-card strong small{font-size:9px;color:#9db0b7;font-weight:600;letter-spacing:0}.readout-foot{display:block;margin-top:3px;font-size:7px;color:#657983;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.check-card{margin:10px 12px 0;padding:10px 11px;border:1px solid #2b454f;border-radius:8px;background:linear-gradient(130deg,rgba(33,63,73,.5),rgba(17,29,37,.8))}.check-head{display:flex;align-items:center;gap:6px;font-size:8px;letter-spacing:.13em;font-weight:800;color:#9bb2ba}.check-icon{width:15px;height:15px;border:1px solid #3e6a73;border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:10px}.check-head .micro-tag{margin-left:auto}.check-main{display:flex;align-items:baseline;gap:5px;margin-top:7px;font-size:9px;color:#b5c5ca;flex-wrap:wrap}.check-main strong{font-size:12px;color:#e4f5f5;font-variant-numeric:tabular-nums}.check-versus{color:#71858e;font-size:8px}.check-foot{font-size:8px;color:#748891;margin-top:3px}.check-foot strong{color:var(--accent-2);font-variant-numeric:tabular-nums}
.science-panel{margin:10px 12px 14px;border:1px solid #293943;border-radius:8px;background:#111b23;overflow:hidden}.science-panel summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:10px 11px;cursor:pointer}.science-panel summary::-webkit-details-marker{display:none}.science-panel summary>span:first-child{display:flex;flex-direction:column;gap:3px}.science-panel summary strong{font-size:11px;font-weight:650;color:#d9e5e8}.details-chevron{font-size:16px;color:#7e949e;transition:transform .2s}.science-panel[open] .details-chevron{transform:rotate(45deg)}.science-content{padding:0 11px 11px}.science-intro{font-size:9px;line-height:1.5;color:#9babb2;margin:0 0 9px}.equation{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 0;border-top:1px solid #23323b}.equation span{font-size:8px;color:#82949d}.equation code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:9px;color:#c9edf0;white-space:nowrap}.constant-list{margin-top:7px;border:1px solid #263640;border-radius:6px;overflow:hidden}.constant-list>div{display:flex;justify-content:space-between;gap:8px;padding:5px 7px;border-bottom:1px solid #22313a;font-size:8px;color:#82949d}.constant-list>div:last-child{border-bottom:0}.constant-list b{font-weight:600;color:#d0dfe3;text-align:right}.constant-list em{font-style:normal;color:#73868f;font-weight:400}.simplification{font-size:8px;line-height:1.5;color:#8598a1;margin:9px 0 0}.simplification strong{color:#bac9ce}.disclaimer{font-size:8px;line-height:1.4;color:#8ea5ad;border-top:1px solid #263640;padding-top:8px;margin:8px 0 0}
@media(max-width:1050px) and (min-width:761px){.workspace{grid-template-columns:minmax(0,1fr) 330px}.topbar{padding:0 16px}.inspector-section{padding-left:11px;padding-right:11px}.check-card,.science-panel{margin-left:9px;margin-right:9px}.control-top{font-size:8px}}
@media(max-width:760px){
  html,body{overflow:hidden}.topbar{height:58px;flex-basis:58px;padding:0 12px;gap:9px}.brand-mark{width:29px;height:29px;border-radius:8px}.eyebrow{font-size:6px;letter-spacing:.08em;white-space:nowrap;margin-bottom:2px}h1{font-size:15px}.topbar-right{gap:5px}.date-chip,.live-chip{height:26px;padding:0 6px;gap:5px}.date-year{font-size:9px}.micro-tag{font-size:7px}.live-chip{font-size:7px;letter-spacing:.08em}.workspace{display:flex;flex-direction:column;gap:7px;padding:7px;overflow:hidden}.stage-panel{flex:0 0 40%;min-height:245px;max-height:390px}.stage-head{height:42px;flex-basis:42px;padding:0 8px}.view-tabs{gap:1px}.view-tab{padding:7px 7px;font-size:8px}.stage-tools{gap:5px}.stage-label{font-size:7px;letter-spacing:.08em}.stage-label .micro-tag{display:none}.icon-button{width:26px;height:26px}.canvas-wrap{min-height:0}.corner-tl{left:10px;top:9px}.corner-br{right:10px;top:9px;bottom:auto;text-align:right}.corner-kicker{font-size:7px}.corner-sub{font-size:7px}.sim-clock{font-size:10px}.canvas-caption{bottom:8px;left:8px;right:8px;padding:6px 8px;font-size:8px;line-height:1.35}.transport-bar{height:42px;flex-basis:42px;padding:0 8px}.transport-button{height:28px;padding:0 7px;font-size:8px;gap:4px}.button-icon{font-size:12px}.step-meta{font-size:7px}.quality-control>span{display:none}.quality-option{font-size:8px;padding:5px 6px}.inspector{flex:1;min-height:0;border-radius:10px}.inspector-section{padding:10px 10px}.section-heading{margin-bottom:8px}.section-heading h2{font-size:11px}.section-kicker{font-size:7px}.signal-status-row{height:22px;margin-bottom:7px;font-size:7px}.control-grid{gap:6px}.control-card{padding:6px 7px 5px}.control-top{font-size:8px}.control-top output{font-size:8px}.control-card input[type=range]{height:12px;margin:3px 0 1px}.control-bottom{font-size:6px}.control-bottom .micro-tag{font-size:6px}.preset-row{margin-top:6px;gap:5px}.preset-button{font-size:7px;padding:6px 4px}.mechanics-section,.readout-section{padding-top:9px;padding-bottom:9px}.readout-grid{gap:5px}.readout-card{padding:6px 7px}.readout-label{font-size:7px;margin-bottom:3px}.readout-card strong{font-size:14px}.readout-card strong small{font-size:8px}.readout-foot{font-size:6px;margin-top:2px}.check-card{margin:7px 8px 0;padding:8px 9px}.check-head{font-size:7px}.check-main{margin-top:5px;font-size:8px}.check-main strong{font-size:11px}.check-foot{font-size:7px}.science-panel{margin:7px 8px 10px}.science-panel summary{padding:8px 9px}.science-panel summary strong{font-size:10px}.science-content{padding:0 9px 9px}.science-intro{font-size:8px}.equation{padding:5px 0}.equation span{font-size:7px}.equation code{font-size:8px}.constant-list>div{font-size:7px;padding:4px 6px}.simplification,.disclaimer{font-size:7px}
}
@media(max-width:380px){.stage-panel{flex-basis:38%;min-height:230px}.view-tab{padding:6px 5px;font-size:7px}.stage-label{display:none}.transport-actions{gap:4px}.transport-button{padding:0 6px}.control-top{font-size:7px}.control-top output{font-size:7px}.control-bottom .micro-tag{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(min-width:761px){
  .inspector-section{padding-top:9px;padding-bottom:9px}
  .signal-status-row{height:22px;margin-bottom:7px}
  .control-card{padding:6px 8px 5px}
  .control-card input[type=range]{height:11px;margin:3px 0 1px}
  .preset-row{margin-top:6px}
  .preset-button{padding:6px 5px}
  .readout-grid{gap:6px}
  .readout-card{padding:6px 8px}
  .check-card{margin-top:8px;padding:8px 10px}
}
