*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}body{margin:0;background:#f3f6f7;color:#142e40;font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;border:1px solid #d2dfe4;border-radius:9px;padding:8px 14px;background:#fff;color:#244658;cursor:pointer;text-decoration:none;font-weight:550;line-height:1.4}button:hover,.button:hover{border-color:#138274;background:#eef9f5}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,select:focus-visible{outline:3px solid #d69c3c;outline-offset:3px}.primary{background:#087e72;color:#fff;border-color:#087e72}.primary:hover{background:#09695f;color:white}.text-btn{background:transparent;border:0;color:#477084;padding:6px 0}a{color:#0a776e}h1,h2,h3,p{margin-top:0}h1{font-size:29px;line-height:1.3;letter-spacing:-.7px;margin-bottom:8px}h2{font-size:17px;margin:0;line-height:1.4}h3{font-size:15px;margin:0}.topbar{height:76px;background:#fff;border-bottom:1px solid #dfe7eb;display:flex;align-items:center;justify-content:space-between;padding:0 28px;gap:20px;position:sticky;top:0;z-index:15}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#173447;font-size:23px;font-weight:750;white-space:nowrap}.logo{display:grid;place-items:center;width:40px;height:42px;background:#123b46;color:#91dfc5;border-radius:11px;font:29px Georgia,serif}.brand-sub{display:block;font-size:11px;letter-spacing:1.2px;font-weight:500;color:#65808d;line-height:1.2}.header-note{font-size:14px;font-weight:650}.header-note span{color:#708591;font-weight:400;margin-left:18px}.header-actions{display:flex;gap:8px}.app-shell{display:grid;grid-template-columns:214px minmax(0,1fr);max-width:1800px;margin:auto}.sidebar{background:#fff;border-right:1px solid #dfe7eb;padding:28px 14px;position:sticky;top:76px;height:calc(100vh - 76px);overflow:auto}.side-kicker{font-size:12px;color:#718895;letter-spacing:2px;margin:0 12px 17px}.side-kicker span{float:right;letter-spacing:0;color:#0a8278}.nav-group{margin:21px 12px 8px;font-size:11px;color:#91a2aa;font-weight:700;letter-spacing:3px}.case-nav{display:flex;width:100%;text-align:left;justify-content:flex-start;min-height:68px;gap:10px;border-color:transparent;background:transparent;margin-bottom:5px;padding:10px 9px}.case-nav.active{background:#eaf6f2;border-color:#d2e9df;color:#076b61}.case-nav .case-icon{font-size:22px;width:29px;font-family:Georgia,serif;color:#27887b;text-align:center}.nav-copy{min-width:0;font-size:12px;line-height:1.65}.nav-copy small{display:block;font-size:10px;color:#7a909b;letter-spacing:.5px}.sidebar-bottom{border-top:1px solid #e5ecef;margin:25px 8px 0;padding-top:20px;color:#52747f;font-size:12px;line-height:1.8}.sidebar-bottom small{font-size:10px;color:#8398a2}.status-dot,.live-dot{width:7px;height:7px;display:inline-block;background:#20a287;border-radius:50%;margin-right:7px}.workspace{padding:25px 30px 14px;min-width:0}.project-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.project-heading p:not(.eyebrow){color:#728694;font-size:14px;margin-bottom:14px}.eyebrow{font-size:10px;font-weight:750;color:#157d71;letter-spacing:1.4px;display:flex;gap:13px;align-items:center;margin-bottom:8px}.eyebrow span+span{padding-left:13px;border-left:1px solid #bfd7d6}.heading-actions{display:flex;gap:8px}.question-banner{display:flex;align-items:center;gap:15px;background:#e9f2f3;padding:12px 16px;border-left:3px solid #2a8a80;border-radius:0 8px 8px 0;margin:3px 0 20px;line-height:1.7;font-size:13px}.question-banner p{margin:0;flex:1}.question-banner a{white-space:nowrap;font-size:11px}.question-label{color:#0b7b70;white-space:nowrap;font-size:11px;font-weight:750}.panel{border:1px solid #dde7eb;border-radius:13px;background:white;box-shadow:0 3px 14px #173c4804;min-width:0}.lab-grid{display:grid;grid-template-columns:minmax(0,1fr) 276px;gap:18px}.stage{overflow:hidden;display:flex;flex-direction:column;background:#0a1c2a;border-color:#152e40}.stage-head{display:flex;gap:8px;align-items:center;padding:13px 18px;color:#d1e6ec;font-size:12px;border-bottom:1px solid #243b4a;min-height:52px}.stage-head .live-dot{margin:0;background:#67d9b8}.stage-caption{margin-left:auto;color:#8ba5b6;font-size:10px}.stage-head select{background:#233e4f;color:#e3edf3;border:1px solid #4c6a7c;border-radius:5px;max-width:130px;font-size:11px;min-height:30px}.canvas-wrap{height:400px;position:relative;min-width:0;flex:1;min-height:320px}#sceneCanvas{width:100%;height:100%;display:block;touch-action:none}#sceneError{position:absolute;z-index:4;top:38px;left:20px;right:20px;background:#774022;padding:12px;color:white;border-radius:6px;font-size:13px}.scene-toolbar{padding:10px 12px;display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid #233e50;background:#112b3c}.scene-toolbar button{background:#1c394c;color:#bed2df;border-color:#344f60;border-radius:6px;min-height:33px;font-size:11px;padding:6px 10px}.scene-toolbar .play-btn{color:#80e6c5;border-color:#377964}.toolbar-space{flex:1}.scene-note{font-size:10px;color:#99b2c3;background:#102536;margin:0;padding:11px 16px;line-height:1.8;min-height:57px}.controls{padding:17px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.panel-heading>span{font-size:10px;color:#8296a1}.presets{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:12px;border-bottom:1px solid #e8eff2;margin-bottom:14px}.presets button{font-size:10px;min-height:31px;padding:5px 8px;border-radius:5px;background:#f4f8f9}.control{margin-bottom:13px}.control-top{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px}.control label{font-size:11px;font-weight:600;line-height:1.4}.control label small{color:#7b929f;font-size:10px;font-weight:400;margin-left:5px}.control input[type=number]{width:69px;background:#f3f7f8;border:1px solid #dde7eb;border-radius:5px;padding:4px 5px;font-size:12px;color:#1b5d61;height:31px}.control input[type=range]{width:100%;accent-color:#178776;height:20px;cursor:pointer}.control select{width:100%;border:1px solid #d5e2e7;border-radius:6px;background:white;padding:7px;font-size:11px;min-height:36px}.range-extents{display:flex;justify-content:space-between;font-size:9px;color:#a0afb7;line-height:1}.wide{width:100%}.micro{font-size:11px;color:#718b99;line-height:1.8;margin:8px 0 0}.metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}.metric{background:white;border:1px solid #dce7e9;border-radius:10px;padding:14px 13px;min-width:0}.metric small{display:block;font-size:10px;color:#6b8491;margin-bottom:7px}.metric strong{font-size:17px;letter-spacing:-.4px;display:block;overflow-wrap:anywhere;line-height:1.45;font-variant-numeric:tabular-nums}.metric:last-child{border-color:#a3c9bd;background:#f3faf6}.metric.long strong{font-size:12px}.learning-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.plot-panel,.theory-panel{padding:18px}.plot-panel .panel-heading>span{font-size:9px}#plotCanvas{width:100%;height:235px;display:block}.formula{font:17px/1.9 Georgia,"Cambria Math","Microsoft YaHei",serif;background:#f0f6f5;border-left:3px solid #42a88e;border-radius:0 7px 7px 0;padding:12px 15px;margin-bottom:12px;overflow-wrap:anywhere}.formula sub,.formula sup{font-size:.65em}details{border-top:1px solid #e6edef;padding:10px 0 2px;font-size:12px}summary{font-size:12px;font-weight:650;cursor:pointer;min-height:24px}details ol{padding-left:18px;color:#546f7d;line-height:1.95;margin:10px 0}details li+li{margin-top:5px}#thinkingQuestion{font-weight:600;color:#157e70}.notebook{padding:22px}.notebook h2{font-size:20px}.draft-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.draft-grid label,.ai-box label{font-size:12px;font-weight:650;display:block;margin-bottom:8px}textarea{width:100%;display:block;resize:vertical;border:1px solid #cedee4;border-radius:8px;padding:11px;color:#24414e;background:#fbfdfd;font-size:13px;line-height:1.8;min-width:0}textarea::placeholder{color:#98a9b2}textarea[readonly]{background:#f1f5f6;color:#647985}.draft-grid button{font-size:12px;min-height:34px;margin-top:8px}.draft-grid small{font-size:10px;color:#8da0aa;margin-left:7px}.records-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:24px 0 12px}.records-heading>span{font-size:10px;color:#8196a2}.snapshot-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.snapshot{border:1px solid #dce7e8;background:#f8fbfb;border-radius:8px;padding:13px;font-size:11px}.snapshot-head{display:flex;justify-content:space-between;gap:10px;color:#157e70;font-weight:700;margin-bottom:8px}.snapshot-head button{min-height:25px;padding:2px 7px;font-size:10px}.snapshot p{margin:5px 0;color:#69818e;overflow-wrap:anywhere}.snapshot dl{margin:8px 0 0}.snapshot dl div{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #e1eaeb;padding:3px 0}.snapshot dt{color:#7b929d}.snapshot dd{margin:0;color:#153e45;text-align:right}.empty{color:#8aa0aa;font-size:12px;padding:20px;border:1px dashed #cbdcdf;border-radius:7px;grid-column:1/-1;text-align:center}.comparison{font-size:12px;padding:14px;border-left:3px solid #cf9c42;background:#fdf7ec;margin:15px 0;line-height:1.9;white-space:pre-line}.ai-box{margin-top:18px}.ai-box p{color:#65818e}.ai-box button{font-size:11px;margin-bottom:12px}.history-box{margin-top:15px}.history-box ol{max-height:210px;overflow:auto;font-size:10px;list-style:none;padding:0} .notebook-actions{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:20px;border-top:1px solid #e3ecef;padding-top:18px}.notebook-actions p{margin:0;font-size:12px;color:#6c8591}footer{display:flex;justify-content:space-between;gap:20px;margin-top:20px;font-size:10px;color:#8aa0aa;align-items:center}footer button{font-size:10px}.mobile-only{display:none}dialog{width:min(720px,94vw);max-height:88vh;border:1px solid #cbdbdf;border-radius:15px;padding:25px;box-shadow:0 24px 90px #04172166;color:#244858;overflow:auto}dialog::backdrop{background:#0d293983;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.dialog-head h2{font-size:21px}.dialog-head button{border:0;font-size:24px;padding:0;min-width:36px;min-height:36px}.dialog-tip{background:#e9f5f0;padding:13px;border-radius:7px;font-size:12px}.export-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.export-actions button,.export-actions .button{font-size:12px}dialog label{font-size:12px}dialog p{font-size:13px}#resultImage{display:block;width:100%;height:auto;border:1px solid #dae7eb;border-radius:8px;margin-bottom:14px}#imageArea p{font-size:11px;color:#718d9b}.guide-steps{padding-left:25px}.guide-steps li{padding:9px 0}.guide-steps p{margin:5px 0;color:#6a8490}.guide-steps b{color:#16695f}.storage-banner{padding:10px 24px;background:#fff1d6;color:#795219;font-size:12px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%) translateY(100px);opacity:0;max-width:90vw;background:#143a48;color:#e0fff3;padding:12px 22px;border-radius:9px;z-index:100;font-size:13px;box-shadow:0 5px 25px #00192633;transition:.2s;pointer-events:none}#toast.show{transform:translateX(-50%) translateY(0);opacity:1}.skip{position:absolute;left:0;top:-100px}.skip:focus{top:0;background:white;padding:12px;z-index:100}[hidden]{display:none!important}
@media(min-width:1500px){.workspace{padding:28px 40px}.canvas-wrap{height:440px}.lab-grid{grid-template-columns:minmax(0,1fr) 300px}.control label{font-size:12px}.control{margin-bottom:17px}}
@media(max-width:1150px){.app-shell{grid-template-columns:175px minmax(0,1fr)}.sidebar{padding:20px 9px}.workspace{padding:20px}.lab-grid{grid-template-columns:minmax(0,1fr) 240px}.canvas-wrap{height:350px}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.header-note span{display:none}.stage-caption{display:none}.learning-grid{grid-template-columns:1fr}.snapshot-list{grid-template-columns:repeat(2,minmax(0,1fr))}h1{font-size:25px}}
@media(max-width:800px){html{scroll-padding-top:75px}.topbar{height:64px;padding:0 15px;gap:10px}.brand{font-size:20px}.brand-sub{font-size:9px}.logo{width:33px;height:35px;font-size:24px}.header-note{display:none}.header-actions button{font-size:11px;min-height:37px;padding:7px 10px}.app-shell{display:block}.sidebar{display:none;position:fixed;left:0;top:64px;height:calc(100dvh - 64px);width:265px;z-index:30;box-shadow:10px 0 40px #082c4b30}.sidebar.open{display:block}.workspace{padding:20px 15px 10px}.mobile-only{display:inline-flex}.project-heading{align-items:flex-start}.project-heading h1{font-size:23px}.project-heading p:not(.eyebrow){font-size:12px}.heading-actions{flex-direction:column;gap:6px}.heading-actions button{font-size:10px;padding:6px 8px;min-height:30px}.question-banner{align-items:flex-start;padding:10px 12px;gap:8px;font-size:12px;flex-wrap:wrap}.question-label{font-size:10px}.question-banner p{flex-basis:calc(100% - 70px)}.question-banner a{margin-left:auto}.lab-grid{grid-template-columns:1fr;gap:13px}.canvas-wrap{height:340px;min-height:340px}.stage-head{min-height:44px;padding:10px 14px}.stage-caption{display:block}.stage-head select{margin-left:auto}.scene-note{font-size:10px;padding:10px 13px}.scene-toolbar{gap:5px;padding:9px}.scene-toolbar button{padding:6px 9px;font-size:10px;min-height:36px}.controls{padding:16px}#paramControls{display:grid;grid-template-columns:1fr 1fr;column-gap:20px}.control select{font-size:12px}.control label{font-size:12px}.control input[type=number]{height:35px;width:66px}.control input[type=range]{height:26px}.presets button{min-height:36px;font-size:11px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric:last-child{grid-column:1/-1}.metric strong{font-size:18px}.metric.long strong{font-size:13px}.metric small{font-size:11px}.learning-grid{gap:13px}.notebook{padding:17px}.draft-grid{grid-template-columns:1fr;gap:20px}.snapshot-list{grid-template-columns:1fr}.snapshot{font-size:12px}.notebook-actions{flex-direction:column;align-items:stretch}.notebook-actions button{width:100%}.records-heading>span{display:none}.panel-heading>span{font-size:10px}.notebook h2{font-size:19px}footer{flex-direction:column;gap:4px}.plot-panel,.theory-panel{padding:16px}.formula{font-size:16px}.theory-panel details{font-size:13px}dialog{padding:18px;width:95vw}.dialog-head h2{font-size:20px}.stage-caption{font-size:9px}.brand-sub{letter-spacing:0}.control select{max-width:100%}}
@media(max-width:380px){#paramControls{column-gap:12px}.control-top{align-items:flex-start}.control label{font-size:11px}.control input[type=number]{width:59px}.stage-caption{display:none}.project-heading h1{font-size:20px}.canvas-wrap{height:300px;min-height:300px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

#chartLegend{display:flex;gap:10px;flex-wrap:wrap}.advanced-params{grid-column:1/-1;margin-bottom:14px}.advanced-params summary{font-size:11px;color:#577e88}.advanced-params[open] .control:first-of-type{margin-top:12px}
@media(max-width:800px){textarea,.control select,.control input[type=number]{font-size:16px}.control input[type=number]{height:38px}.control label{font-size:12px}.scene-toolbar button{min-height:40px}.scene-note{font-size:11px}.micro{font-size:12px}}

/* Keep drawing size independent of the canvas bitmap dimensions. */
.lab-grid{align-items:start}.canvas-wrap{flex:0 0 auto}

