:root{--bg:#07121f;--panel:#0e1b2a;--panel2:#101f30;--line:#233b50;--text:#e5f0f9;--muted:#8299aa;--faint:#566e7f;--accent:#ec748a;--aqua:#65c9e3;--green:#7bd6b9;--gold:#efc28a;--gap:8px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:12px}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--aqua);outline-offset:2px}body{background:radial-gradient(ellipse at 72% 24%,#132638,#07121f 63%)}
.app{min-height:100vh;display:flex;flex-direction:column;padding:0 18px}.topbar{height:78px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-shrink:0;border-bottom:1px solid #26394a}.brand{display:flex;align-items:center;gap:14px}.brand-mark{height:43px;width:43px;display:grid;place-items:center;border:1px solid #6890a7;border-radius:11px;font-size:27px;color:#d6f4ff;background:linear-gradient(145deg,#193348,#0d1b29);box-shadow:0 0 30px #589bbb13}.eyebrow{letter-spacing:2.1px;font-size:9px;font-weight:750;color:#85a5b8}.brand h1{font-size:21px;letter-spacing:1.5px;margin:3px 0 0;font-weight:850;line-height:1.06}.brand h1 em{font-style:normal;color:var(--accent)}.top-info{display:flex;align-items:center;gap:14px;font-size:10px;letter-spacing:1.2px;font-weight:800}.tag{color:#8cbbd1}.vline{width:1px;height:15px;background:#335267}.live-dot{height:7px;width:7px;border-radius:50%;background:var(--green);box-shadow:0 0 13px #7bd6b9}.live-label{color:#a0d8c9}.top-clock{background:#182a3d;border:1px solid #29465d;padding:8px 12px;border-radius:6px;color:#d4e4ef}
.workspace{display:grid;grid-template-columns:282px minmax(320px,1fr) 270px;gap:13px;min-height:0;height:calc(100vh - 116px);max-height:980px;padding:14px 0 12px;flex:1}.pane{background:linear-gradient(160deg,#102131e8,#0b1724fa);border:1px solid #21384b;border-radius:10px;box-shadow:inset 0 1px #ffffff0b}.controlPanel,.insightPanel{padding:17px 16px;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#29485c transparent}.panel-heading{display:flex;align-items:center;gap:6px;letter-spacing:1.15px;font-size:11px;font-weight:850}.section-number{color:var(--accent);font-size:10px}.panel-heading .icon-btn{margin-left:auto}.icon-btn{border:1px solid #2b485c;background:#142637;border-radius:6px;color:#a8c3d5;width:26px;height:26px;display:grid;place-items:center}.icon-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.subtext{color:var(--muted);line-height:1.5;font-size:11px;margin:7px 0 15px}.panel-kicker,.visual-heading{font-size:9px;color:#93aec1;letter-spacing:1.5px;font-weight:800}.presets{display:flex;gap:6px;margin:9px 0}.presets button{flex:1;color:#94abb9;background:#142539;border:1px solid #2d4355;border-radius:5px;height:30px;font-size:10px;font-weight:800;letter-spacing:.65px}.presets .selected{background:#572f47;border-color:#c56880;color:#ffe1e8}.preset-description{color:#b3a7b5;font-size:10px;line-height:1.5;min-height:30px}.section-divider,.lab-divider{height:1px;background:#27394a;margin:15px 0}.sliders{display:flex;flex-direction:column;gap:10px}.slider-field{display:block;cursor:pointer}.slider-field>span{display:flex;justify-content:space-between;align-items:center;gap:4px}.slider-field strong{font-weight:650;font-size:11px}.slider-field output{color:#f0a3b3;font-weight:750;white-space:nowrap;font-size:10px}.slider-field input{display:block;width:100%;height:5px;margin:10px 0 6px;accent-color:#f0778e;cursor:pointer}.slider-field small{display:block;color:#7690a3;font-size:9px}.panel-footnote{font-size:9px;color:#718da1;border-top:1px dashed #304556;margin-top:18px;padding-top:10px;line-height:1.5}
.stage{position:relative;min-width:0;min-height:0;border-radius:11px;overflow:hidden;border:1px solid #2a4255;background:radial-gradient(ellipse at 45% 55%,#183650,#081421 70%);box-shadow:0 12px 44px #0005}.stage:before{pointer-events:none;content:"";position:absolute;inset:0;z-index:2;background:linear-gradient(180deg,#06121ecf 0,transparent 26%,transparent 73%,#07111de8 100%)}#scene{display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline:none}#scene:active{cursor:grabbing}.stage-top{pointer-events:none;position:absolute;z-index:3;left:22px;right:18px;top:18px;display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.scene-id{font-size:9px;font-weight:750;color:var(--aqua);letter-spacing:2.4px}.stage-title{font-size:16px;font-weight:300;letter-spacing:1.2px;color:#d4e7f2;margin-top:9px;max-width:420px}.stage-title b{font-weight:850;color:#fff}.view-badge{font-size:9px;letter-spacing:.9px;background:#122638c9;border:1px solid #31526a;border-radius:5px;padding:7px 9px;color:#91c2d5;white-space:nowrap}.camera-tools{position:absolute;right:17px;top:83px;z-index:4;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.camera-tools button{border:1px solid #446075;background:#0b2034cb;color:#b0d0de;border-radius:5px;padding:7px 9px;font-size:9px;font-weight:750;letter-spacing:.6px}.camera-tools button.on{background:#255068;border-color:#74b5cf;color:#f4fdff}.microscope-note{position:absolute;left:22px;top:119px;z-index:3;padding:8px 10px;border:1px solid #3d5565;background:#0b1a2c9c;border-radius:5px;color:#b3cbde;letter-spacing:.5px;font-size:9px;max-width:360px;pointer-events:none}.microscope-note b{color:#f9b9c2}.sample-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#f57e98;margin-right:4px}.scene-legend{position:absolute;z-index:3;left:22px;bottom:90px;display:flex;gap:16px;font-size:9px;letter-spacing:.5px;color:#bfd3e2;pointer-events:none}.scene-legend span{display:flex;align-items:center;gap:6px}.legend{display:inline-block;width:8px;height:8px;border-radius:50%}.legend.snow{background:#d9f4ff}.legend.bloom{background:#f36c87}.legend.water{background:#4cc7e5}.stage-bottom{position:absolute;bottom:0;left:0;right:0;z-index:4;height:77px;border-top:1px solid #355068;background:#0a1929c9;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 19px;backdrop-filter:blur(7px)}.time-text span{display:block;letter-spacing:1.7px;color:#90acbf;font-size:9px;font-weight:750}.time-text strong{display:block;font-size:23px;font-weight:700;margin-top:4px;font-variant-numeric:tabular-nums}.time-text small{font-size:10px;font-weight:500;color:#9eb5c3}.transport{display:flex;align-items:center;gap:6px}.transport button{height:33px;min-width:34px;border:1px solid #315066;background:#152c41;color:#d6f1ff;border-radius:6px;font-weight:800;font-size:17px}.transport button.play{background:#d87488;border-color:#e398a7;color:#1f1521;width:38px}.speed-wrap{margin-left:8px;display:flex;align-items:center;gap:8px}.speed-wrap span{font-size:9px;color:#7e9ab0;letter-spacing:1px}.speed-wrap select{background:#14283b;color:#e4eff7;border:1px solid #365066;border-radius:5px;height:32px;padding:0 6px;cursor:pointer}
.insightPanel .subtext{margin-bottom:12px}.readout-pulse{color:#72d8b1;margin-left:auto;animation:pulse 2s infinite;font-size:13px}@keyframes pulse{50%{opacity:.35}}.metric{background:#102235;border:1px solid #263d52;padding:11px;border-radius:7px;min-width:0}.metric span{color:#89aabb;letter-spacing:1.1px;font-size:9px;font-weight:750}.metric span i{font-style:normal;color:#698fa6}.metric strong{display:block;font-size:22px;font-weight:750;line-height:1.3;color:#ecf7ff;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.metric strong small{font-size:10px;color:#a5bbc8;letter-spacing:0;margin-left:4px}.metric p{margin:3px 0 0;font-size:9px;color:#7b93a6;line-height:1.5}.hero-metric{padding:13px;border-color:#514255;background:linear-gradient(120deg,#291d35,#132b3a)}.hero-metric div:not(.meter){display:flex;align-items:baseline;gap:7px}.hero-metric strong{font-size:42px;color:#ffb5c1}.hero-metric small{color:#9fb0c1}.meter{height:4px;border-radius:4px;background:#3d4259;overflow:hidden;margin-top:8px}.meter div{height:100%;background:linear-gradient(90deg,#9ce9ea,#f4849f)}.metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}.metric-grid .metric{padding:10px 8px}.metric-grid .metric strong{font-size:21px;margin-top:4px}.validation-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.validation-title span{font-size:10px;color:#c7dae5;font-weight:800;letter-spacing:.8px}.validation-title b{font-size:9px;border:1px solid #4d967a;border-radius:4px;padding:4px 7px;color:#80dcba;background:#193e38}.validation-title b.fail{color:#ffb0a5;border-color:#b85c63;background:#512734}.validation-label{font-size:10px;color:#849fb1;margin:9px 0}.validation-values{display:flex;flex-direction:column;gap:7px}.validation-values span{display:flex;justify-content:space-between;color:#89a5b6;font-size:9px;font-weight:700;letter-spacing:1px}.validation-values strong{color:#d7f3f5;font-size:10px;letter-spacing:0;font-variant-numeric:tabular-nums}.reference-note{color:#758c9c;line-height:1.4;font-size:9px}.visual-heading{display:flex;justify-content:space-between;align-items:center}.visual-heading span{font-size:9px}.quality-switch{display:flex;justify-content:flex-end;gap:3px;margin-top:-12px}.quality-switch button{padding:6px 10px;background:#183045;border:1px solid #304d64;color:#a8bfcd;border-radius:4px;font-size:9px;font-weight:750}.quality-switch button.selected{color:#0b2637;background:#93cdda;border-color:#b2e1eb}.layer{display:grid;grid-template-columns:1fr 1fr;gap:10px 6px;margin:16px 0}.layer label{font-size:10px;white-space:nowrap;color:#aac1d0;cursor:pointer}.layer input{accent-color:#ee7f96;vertical-align:middle;margin-right:3px}.biology-btn{display:flex;justify-content:space-between;align-items:center;width:100%;border:1px solid #865e72;background:linear-gradient(110deg,#3c283d,#26263a);border-radius:6px;padding:11px 9px;color:#f9e4e8;font-weight:850;letter-spacing:1px;font-size:10px}.biology-btn span:last-child{font-weight:600;font-size:8px;letter-spacing:.2px;color:#d7a1b1}
.biology{border:1px solid #304c61;margin:2px 0 12px;background:#102034;border-radius:10px;padding:20px 23px;flex-shrink:0}.biology-inner{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px}.biology h2,.biology h3{font-size:17px;margin:9px 0 7px;line-height:1.25}.biology h3{font-size:15px}.biology p{color:#adc2d1;line-height:1.65;font-size:11px}.biology code{display:block;font-size:11px;line-height:2;background:#081727;color:#9de4e8;padding:12px;border:1px solid #28536b;border-radius:5px}.references{border-top:1px solid #30495c;padding-top:14px;display:flex;flex-wrap:wrap;gap:13px;align-items:center;font-size:9px;color:#84a7be;letter-spacing:.7px}.references a{color:#8dd5e2;text-decoration:underline;text-underline-offset:3px}.footer{height:38px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:12px;color:#657e91;font-size:8px;letter-spacing:1px;font-weight:600}.footer span:last-child{text-align:right} .paused .live-dot{background:#f4c17a;box-shadow:none}.paused .live-label{color:#f4c17a}
@media(max-width:1090px){.workspace{grid-template-columns:250px minmax(270px,1fr) 250px;gap:8px}.controlPanel,.insightPanel{padding:13px 12px}.brand h1{font-size:18px}.stage-title{font-size:13px}.metric-grid .metric strong{font-size:18px}.stage-bottom{padding:9px}.scene-legend{gap:7px;font-size:8px}}
@media(max-width:800px){.app{padding:0 12px}.topbar{height:65px}.brand h1{font-size:16px}.top-info .tag,.top-info .vline{display:none}.top-info{gap:8px}.workspace{height:auto;max-height:none;display:flex;flex-direction:column;gap:10px;padding:10px 0}.stage{order:0;height:420px;min-height:420px}.controlPanel{order:1;max-height:none;overflow:visible}.insightPanel{order:2;max-height:none;overflow:visible}.sliders{display:grid;grid-template-columns:1fr 1fr;gap:16px}.biology-inner{grid-template-columns:1fr}.footer{height:auto;min-height:46px;line-height:1.5;flex-wrap:wrap;padding:10px 0}.stage-title{font-size:15px}.metric-grid{grid-template-columns:repeat(4,1fr)}.stage-top{left:15px}.microscope-note{left:14px}.scene-legend{left:15px}}
@media(max-width:500px){.app{padding:0 9px}.topbar{height:59px}.brand{gap:8px}.brand-mark{height:33px;width:33px;font-size:20px}.brand h1{font-size:13px;letter-spacing:.65px}.eyebrow{font-size:7.5px;letter-spacing:1.4px}.top-info .live-label{display:none}.top-clock{padding:6px;font-size:9px}.stage{height:395px;min-height:395px}.stage-top{left:12px;right:11px;top:13px}.scene-id{font-size:7px}.stage-title{font-size:12px;max-width:220px;line-height:1.4;margin-top:4px}.view-badge{font-size:7px;padding:5px}.camera-tools{top:75px;right:9px;gap:3px}.camera-tools button{padding:6px;font-size:8px}.microscope-note{top:111px;left:9px;right:9px;font-size:7.2px;padding:6px;width:max-content;max-width:calc(100% - 18px)}.scene-legend{bottom:82px;left:10px;font-size:7px;gap:7px;right:6px}.stage-bottom{height:68px;padding:8px 10px}.time-text strong{font-size:20px}.time-text span{font-size:8px}.transport{gap:4px}.transport button{min-width:30px;height:29px}.speed-wrap{margin-left:2px;gap:4px}.speed-wrap span{font-size:7px}.speed-wrap select{height:29px}.sliders{grid-template-columns:1fr 1fr;gap:15px}.controlPanel,.insightPanel{padding:15px}.metric-grid{grid-template-columns:1fr 1fr}.metric-grid .metric strong{font-size:24px}.biology{padding:15px}.footer{font-size:7px}.footer span:last-child{text-align:left}}
body.embed .topbar,body.embed .footer{display:none}body.embed .workspace{height:100dvh;max-height:none;padding:8px 0}body.embed .app{padding:0 8px}body.embed .biology{margin-top:0}@media(max-width:800px){body.embed .workspace{height:auto}body.embed .stage{height:47dvh;min-height:330px}}
@media(prefers-reduced-motion:reduce){.readout-pulse{animation:none}*{scroll-behavior:auto!important}}

/* Constrain the desktop simulation grid to the viewport, even when panel contents scroll. */
@media(min-width:801px){.app{height:100vh;min-height:0;overflow:hidden}.workspace{min-height:0;height:calc(100vh - 116px);flex:1 1 0;grid-template-rows:minmax(0,1fr);overflow:hidden;max-height:none}.stage{height:100%;min-height:0}.controlPanel,.insightPanel{min-height:0;max-height:100%;overflow:auto}}

@media(min-width:801px){body.science-open .app{height:auto;min-height:100vh;overflow:visible}body.science-open .workspace{flex:none;min-height:0}}
