:root{color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#000}body{font-family:system-ui,-apple-system,sans-serif;color:#e1edf4}[hidden]{display:none!important}.poster-studio{height:100dvh;min-height:0}.ps-header{height:60px;min-height:60px;padding:0 22px;border-bottom:1px solid #26343e;background:#080b10}.ps-header h1{font-size:19px;font-weight:400}.ps-header a{font-size:12px}.ps-header nav{display:flex;gap:24px}.workspace{display:grid;grid-template-columns:320px minmax(0,1fr);grid-template-areas:'tools stage';height:calc(100dvh - 60px)}#stage{grid-area:stage;position:relative;min-width:0;min-height:0;overflow:hidden;background:#000}#graph{display:block;width:100%;height:100%;touch-action:none;cursor:grab}#graph:active{cursor:grabbing}#tools{grid-area:tools;padding:17px 16px;overflow:auto;background:#0b1016;border-right:1px solid #243440;scrollbar-width:thin}h2{font-weight:400}.tool-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 8px}.tool-heading h2,#curve-controls h2{font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:#a0b6c5;margin:0}.tool-heading span{font-size:9px;color:#77909f}.ps-choices{display:grid;grid-template-columns:1fr 1fr;gap:5px}.ps-choices.triple{grid-template-columns:repeat(3,1fr);margin-bottom:20px}.poster-studio button{min-height:34px;padding:6px 10px;font-size:11px;border-radius:5px}.poster-studio button[aria-pressed=true]{background:#183147;border-color:#78b8e0;color:#e7f6ff}.tool-heading button{min-height:30px}.equation-row{padding:11px 0;border-top:1px solid #21303b}.row-heading{display:flex;align-items:center;gap:7px;font-size:11px;margin-bottom:8px}.row-heading .equation-number{color:#8dceff;min-width:18px}.row-heading .hide{margin-left:auto}.row-heading button{border:0;background:none;min-height:28px;padding:3px 6px;color:#7d9cae}.row-heading .hide[aria-pressed=false]{text-decoration:line-through}.equation-row label{display:grid;grid-template-columns:12px minmax(0,1fr);align-items:center;gap:6px;font:italic 14px Georgia;margin-top:6px;color:#84a9bf}.equation-row input{width:100%;min-width:0;background:#03070b;color:#d4eaff;border:1px solid #253a49;border-radius:4px;padding:9px 7px;font:12px/1.35 ui-monospace,monospace}.equation-row input:focus{outline:1px solid #8dcbef}.row-actions{display:flex;align-items:center;gap:10px;margin-top:8px}.row-actions button{min-height:28px;padding:3px 10px}.row-status{font-size:10px;color:#7f9daf}.row-error{color:#ffa79a;font-size:11px;margin:6px 0 0;line-height:1.45}.equation-row.off input{opacity:.5}.parameter-section{padding-top:15px;margin-top:15px;border-top:1px solid #24333e}.meaning,#syntax-note{font-size:10px;line-height:1.6;color:#8198a8;margin:6px 0}.slider-row{display:grid;grid-template-columns:18px minmax(0,1fr) 40px;align-items:center;gap:9px;margin:7px 0 0;font-size:12px}.slider-row span{font:17px Georgia;color:#d7efff}.slider-row input{width:100%;min-width:0;height:26px;margin:0;accent-color:#8bceff}.slider-row output{font-variant-numeric:tabular-nums;text-align:right;color:#b2d3e6;font-size:11px}.range-caption{display:flex;justify-content:space-between;margin-left:27px;font-size:9px;color:#7591a3;gap:5px}.mix-rule{text-align:center;font:italic 15px Georgia;color:#c6e5f8;margin:10px 0 0}.stage-heading{position:absolute;top:26px;left:30px;right:24px;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:.18em;color:#7896ad}.stage-heading h2{font:300 25px system-ui;letter-spacing:-.025em;margin:7px 0}.stage-heading p{font:italic 18px Georgia;color:#b4d8ee;margin:8px 0;min-height:26px}.stage-footer{position:absolute;bottom:19px;left:24px;right:22px;display:flex;justify-content:space-between;align-items:center;gap:10px;color:#7d96a5;font-size:10px;pointer-events:none}.stage-footer button{pointer-events:auto;background:#08121bdd}.inspector-footer{display:flex;flex-direction:column;gap:15px;margin-top:22px}.inspector-footer span{color:#668292;font-size:9px;text-align:center}#axis-labels{position:absolute;inset:0;pointer-events:none;color:#627d90;font:10px system-ui}#axis-labels span{position:absolute;transform:translate(-50%,-50%)}#axis-labels .axis-name{font:italic 15px Georgia;color:#b3d8f2}#loading,#fatal{position:absolute;left:10%;right:10%;top:45%;text-align:center;font-size:12px;color:#b9d9ed}#fatal{color:#ffa79a;background:#140b0ddd;padding:15px}#point-values{position:absolute;left:24px;right:24px;top:110px;display:flex;gap:18px;flex-wrap:wrap;font:14px Georgia;color:#b6ddff;pointer-events:none}button:focus-visible,a:focus-visible{outline:2px solid #a2daff;outline-offset:3px}
@media(min-width:641px) and (max-width:1000px){.workspace{grid-template-columns:282px minmax(0,1fr)}#tools{padding:14px 12px}.stage-heading{left:22px}.stage-heading h2{font-size:21px}.stage-footer span{max-width:160px}}
@media(max-width:640px){.ps-header{height:50px;min-height:50px;padding:0 12px}.ps-header h1{font-size:16px}.ps-header a{font-size:10px}.ps-header nav{display:none}.workspace{height:calc(100dvh - 50px);grid-template-columns:1fr;grid-template-rows:46% minmax(0,1fr);grid-template-areas:'stage' 'tools'}#tools{border-right:0;border-top:1px solid #263a48;padding:13px}.stage-heading{top:14px;left:17px}.stage-heading h2{font-size:19px;margin:5px 0}.stage-heading p{font-size:14px}.stage-footer{bottom:9px;left:14px;right:12px}.stage-footer span{font-size:9px;max-width:180px}.poster-studio button{min-height:38px}#point-values{top:91px;font-size:12px}}
.embedded .ps-header{display:none}.embedded .workspace{height:100dvh;display:grid;grid-template-columns:1fr;grid-template-rows:250px minmax(0,1fr);grid-template-areas:'stage' 'tools'}.embedded #tools{padding:12px;border-right:0;border-top:1px solid #233442}.embedded .stage-heading{top:12px;left:13px}.embedded .stage-heading h2{font-size:16px}.embedded .stage-heading p{font-size:13px}.embedded .stage-footer{bottom:7px}.embedded .stage-footer span{display:none}.embedded .stage-footer button{margin-left:auto}.embedded .inspector-footer{display:none}

#stage-formula{display:flex;align-items:center;gap:15px;flex-wrap:wrap;font-size:17px}#stage-formula math{max-width:100%;overflow:auto;font-style:normal}.formula-arrow{font:16px system-ui;color:#6289a3}@media(max-width:640px){#stage-formula{font-size:13px;gap:7px}}.embedded #stage-formula{font-size:12px;gap:5px}

.syntax-help{font-size:9px;line-height:1.55;color:#678598;margin:5px 0}.range-editor{display:grid;grid-template-columns:1fr 1fr 1fr 38px;gap:6px;align-items:end;margin-top:11px}.range-editor label{font-size:9px;color:#7693a6;min-width:0}.range-editor input{display:block;width:100%;min-width:0;margin-top:4px;padding:5px!important;font-size:10px!important}.range-editor button{padding:4px!important;min-height:30px!important}

#studio .equation-row input{background:#040a10;margin:0;padding:7px;font:12px/1.35 ui-monospace,monospace;border-color:#253a49;min-height:32px}#studio .range-editor input{background:#040a10;margin:4px 0 0}#studio .row-heading button{background:none}#studio .row-heading .hide[aria-pressed=true]{color:#b3d9ee;background:#102333}
#tools{min-width:0}.workspace{width:100%}#studio .ps-choices button{min-width:0}@media(max-width:640px){.workspace{grid-template-columns:minmax(0,1fr)}}.embedded .workspace{grid-template-columns:minmax(0,1fr)}

.stage-actions{display:flex;gap:6px;pointer-events:auto}.stage-actions button{font-variant-numeric:tabular-nums;min-width:84px}@media(max-width:640px){.stage-footer>span{display:none}.stage-actions{width:100%;justify-content:flex-end}.stage-actions button{min-width:0;flex:1;font-size:10px;padding:5px}}.embedded .stage-actions{width:100%;justify-content:flex-end}.embedded .stage-actions button{min-width:0;flex:1;font-size:10px;padding:5px}
/* Reviewed separation: controls, graph, Equation Studio list. */
.workspace{grid-template-columns:240px minmax(0,1fr) 340px;grid-template-areas:'tools stage formulas'}#stage{display:grid;grid-template-rows:76px minmax(0,1fr) 62px}.stage-heading{position:relative;inset:auto;padding:19px 22px 0}.stage-heading h2{font-size:21px;margin:6px 0}.stage-footer{position:relative;inset:auto;padding:9px 13px;border-top:1px solid #172632}.stage-footer>span{display:none}.stage-actions{width:100%;justify-content:center}.stage-actions button{flex:1;max-width:145px}#plot{position:relative;min-width:0;min-height:0;overflow:hidden}#graph{position:absolute;inset:0}#axis-labels{font-size:11px;color:#b9d3e3}#axis-labels span{background:#000c;padding:2px 4px;border-radius:3px}#axis-labels .axis-name{font-size:17px;color:#effaff;background:#09121bed}#tools{padding:18px 13px}#formula-list{grid-area:formulas;min-width:0;overflow-y:auto;overflow-x:hidden;background:#080e15;border-left:1px solid #263846;padding:18px 13px;scrollbar-width:thin;scrollbar-color:#304d60 transparent}.formula-list-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.formula-list-header h2{font-size:16px;margin:5px 0}#equation-total{font-size:10px;color:#7e9aaf;margin-left:5px}.list-intro{font-size:10px;line-height:1.6;color:#7994a7;margin:13px 0 18px}.equation-row{padding:0 0 14px;margin-bottom:14px;border-top:0;border-bottom:1px solid #24313e}.row-heading{margin:0 0 7px}.equation-number{display:grid;place-items:center;background:#152b3b;border:1px solid #2c5069;width:26px;height:26px;border-radius:6px}.equation-box{background:#000;border:1px solid #233c50;border-radius:7px;padding:8px;overflow:hidden}.equation-caption,.equation-divider{font-size:8px;letter-spacing:.16em;color:#779cb5;padding:0 5px}.equation-divider{display:flex;justify-content:space-between;border-top:1px solid #152433;padding-top:7px}.equation-box canvas{display:block;width:100%;height:54px}.row-actions{margin-top:6px;justify-content:space-between}.row-actions button{min-height:27px}.equation-row.off .equation-box{opacity:.35}.native-studio-link{font-size:10px;color:#a2d8fa;display:block;padding:6px 0 12px}#equation-status{font-size:10px;color:#b0d5eb}.rule-display{margin:10px 0 0;border:1px solid #24384a;border-radius:5px;background:#000;padding:4px}.rule-display canvas{display:block;width:100%;height:54px}dialog{width:min(520px,calc(100% - 28px));padding:22px;background:#0b131d;color:#daedf8;border:1px solid #42647d;border-radius:10px}dialog::backdrop{background:#000b;backdrop-filter:blur(6px)}dialog p{font-size:12px;line-height:1.5;color:#8eacbf}dialog label{display:block;margin:16px 0;font-size:12px}#edit-error{color:#ffb7a8}.inspector-footer{margin-top:18px}
@media(min-width:641px) and (max-width:1119px){.workspace{grid-template-columns:minmax(0,1fr) 310px;grid-template-rows:minmax(0,1fr) 235px;grid-template-areas:'stage formulas' 'tools formulas'}#tools{display:flex;gap:18px;overflow:auto;border-top:1px solid #263846}#tools>div:first-child,#tools>.triple{flex:none}#tools>.parameter-section{flex:0 0 210px;margin:0;padding:0;border:0}#tools>.inspector-footer{flex:0 0 130px}#stage .stage-heading{padding-left:16px}.stage-heading h2{font-size:19px}}
@media(max-width:640px){html,body{overflow:auto}.poster-studio{height:auto;min-height:100dvh}.workspace{display:flex;flex-direction:column;height:auto}#stage{height:370px;min-height:370px;grid-template-rows:68px minmax(0,1fr) 54px;order:0}.stage-heading{padding:14px 16px 0}.stage-heading h2{font-size:18px}#formula-list{order:1;overflow:visible;border-left:0;border-top:1px solid #263846;padding:15px}#tools{order:2;overflow:visible;padding:16px;border-top:1px solid #263846}.equation-box canvas{height:54px}.stage-footer{padding:6px 12px}.stage-actions button{min-height:36px}.ps-header{position:relative}.equation-row{margin-bottom:13px}.list-intro{margin:8px 0 14px}}
.embedded .workspace{display:flex;height:auto}.embedded #stage{height:290px;min-height:290px;grid-template-rows:60px minmax(0,1fr) 50px}.embedded .stage-heading{inset:auto;padding:12px}.embedded #formula-list{padding:12px}.embedded #tools{overflow:visible}.embedded .stage-footer{inset:auto}.embedded .stage-heading h2{font-size:16px}
@media(min-width:641px) and (max-width:1119px){html,body{overflow:auto}.poster-studio{height:auto}.workspace{height:auto;grid-template-columns:230px minmax(0,1fr);grid-template-rows:620px auto;grid-template-areas:'tools stage' 'formulas formulas'}#tools{display:block;overflow-y:auto;overflow-x:hidden;border-top:0}#tools>.parameter-section{margin-top:15px;padding-top:15px;border-top:1px solid #24333e}#formula-list{overflow:visible;border-top:1px solid #263846;border-left:0}#equations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.equation-row{min-width:0;margin:0}}

#axis-labels .axis-glyph{position:absolute;left:0;top:0;background:transparent;pointer-events:none;will-change:transform} .stage-actions button{padding:5px 6px;min-width:0}.embedded .stage-actions button{font-size:9px}

/* Teaching rail: equations and their plot are one simultaneous compact stack. */
.embedded #formula-list{order:0;padding:8px 10px;border-top:0}.embedded #stage{order:1;height:230px;min-height:230px;grid-template-rows:0 minmax(0,1fr) 44px}.embedded .stage-heading{display:none}.embedded #tools{order:2}.embedded .list-intro,.embedded .native-studio-link,.embedded .formula-list-header .eyebrow,.embedded .row-heading,.embedded #equation-status:empty{display:none}.embedded .formula-list-header h2{font-size:11px;margin:0}.embedded .formula-list-header{margin-bottom:6px}.embedded .formula-list-header button{min-height:24px;padding:3px 7px}.embedded .equation-row{margin:0 0 4px;padding-bottom:4px}.embedded .row-actions{margin-top:3px}.embedded .row-actions button{min-height:23px}.embedded .equation-box{padding:5px}.embedded .equation-divider{padding-top:4px}.embedded .stage-footer{padding:4px 8px}

#plot{grid-row:2}.stage-footer{grid-row:3}

.surface-choices{display:grid;grid-template-columns:1fr 1fr;gap:5px}.surface-choices button:last-child{grid-column:1/-1}

.embedded #formula-list{max-height:250px;overflow-y:auto;flex-shrink:0}.embedded .formula-list-header{position:sticky;top:-8px;z-index:2;background:#080e15;padding:4px 0}.embedded .equation-row:not(:only-child) .row-heading{display:flex}.embedded .equation-row:not(:only-child) .row-heading .row-name{font-size:10px}
/* The instrument has a frame; the mathematical 2D plane does not. */
#stage{border:1px solid #2d4353;border-radius:14px;margin:10px;overflow:hidden}.embedded #stage{margin:8px 0;border-radius:12px}.equation-live{border-top:1px solid #1b2d3b;margin-top:3px}#teaching-demo p{font-size:11px;line-height:1.5;color:#b3cad9;margin:8px 0}#demo-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}#demo-steps button{padding:5px;font-size:10px}.embedded #formula-list{max-height:290px}.embedded #formula-list:has(.equation-row:only-child){overflow:visible;max-height:none}.embedded .row-actions{display:none}.embedded #teaching-demo p{font-size:10px}.embedded #demo-steps button{min-height:28px}.embedded #stage{height:230px;min-height:230px}

#demo-reason{background:#000;border:1px solid #1d3445;border-radius:6px;margin:6px 0}#demo-reason canvas{display:block;width:100%;max-height:74px}.embedded #demo-reason{margin:4px 0}

.embedded .equation-row:only-child .row-actions{display:flex}.embedded #tools .range-editor{margin-top:8px}

.derivation-heading{display:flex;align-items:center;justify-content:space-between;padding:5px 8px 0;color:#99b6cb;font-size:10px}.derivation-heading button{min-height:24px;padding:3px 7px;font-size:10px}#derivation-artwork{height:76px}#derivation-artwork canvas{max-height:none;width:100%;display:block}#measurement-labels{position:absolute;inset:0;pointer-events:none}#measurement-labels canvas{position:absolute;top:0;left:0;width:42px;height:36px;will-change:transform}.embedded #formula-list:has(.equation-row:only-child){flex-shrink:0}

/* Keep the working equation, derivation and graph visible beneath native AdamAI. */
.embedded.explaining .equation-row:first-child .equation-source{display:none}
.embedded.explaining .equation-live{border-top:0;margin-top:0}
.embedded .equation-row:only-child .row-status{font-size:9px}
.embedded .row-actions{margin-top:2px}
.embedded #teaching-demo p{min-height:28px;margin:5px 0;line-height:1.4}
.embedded #derivation-artwork{height:64px}
.embedded .derivation-heading{padding-top:3px}
.embedded #formula-list{padding:5px 10px}
.embedded .formula-list-header{padding:2px 0;margin-bottom:4px}

.embedded .row-actions{display:flex}

.equation-list-actions{display:flex;gap:5px}
.embedded .equation-row:only-child .row-actions{display:none}
.embedded #demo-reason{position:relative;padding-top:12px}
.embedded .derivation-heading{position:absolute;top:0;left:0;right:0;height:24px;z-index:1}
.embedded .derivation-heading button{min-height:20px;font-size:9px;padding:2px 5px}
.embedded #teaching-demo p{min-height:24px;margin:4px 0;font-size:10px}
.embedded .equation-row{padding-bottom:0;border-bottom:0}

.editor-preview{margin:14px 0;min-height:64px}
.editor-preview canvas{width:100%;height:auto;min-height:54px}
#edit-preview[data-valid=false]{opacity:.35}
#equation-editor input{display:block;width:100%;margin-top:8px;padding:10px;border:1px solid #345065;border-radius:5px;background:#02070c;color:#d8edfa;font:13px ui-monospace,monospace}

.embedded #stage{height:198px;min-height:198px}

/* The teacher rail presents mathematics; the standalone Studio retains its tools. */
.teacher-presentation,.teacher-presentation body{height:auto;overflow:hidden}
.teacher-presentation .poster-studio{height:auto;min-height:0}
.teacher-presentation #tools,.teacher-presentation .formula-list-header,
.teacher-presentation .row-heading,.teacher-presentation .row-actions,
.teacher-presentation #demo-steps,.teacher-presentation .stage-footer,
.teacher-presentation #explanation-control{display:none!important}
.teacher-presentation #formula-list{padding:0;background:transparent;border:0;max-height:none;overflow:visible}
.teacher-presentation .equation-box{padding:0;border:0;border-radius:0}
.teacher-presentation .equation-row{margin:0;padding:0}
.teacher-presentation #demo-reason{border:0;padding-top:18px;margin:4px 0}
.teacher-presentation .derivation-heading{padding:0;height:18px}
.teacher-presentation #teaching-demo p{min-height:0;margin:4px 0}
.teacher-presentation #stage{grid-template-rows:0 minmax(0,1fr) 0;height:220px;min-height:220px;margin:6px 0 0}
.teacher-presentation #graph{cursor:default;touch-action:auto}
.teacher-presentation.equation-editable .formula-list-header{display:flex!important;justify-content:flex-end}
.teacher-presentation.equation-editable .formula-list-header>div:first-child,
.teacher-presentation.equation-editable #add{display:none!important}
#teacher-equations{margin:0;padding:0;background:#000}
#teacher-equations>p{margin:0;font-size:11px;color:#b9cfde;line-height:1.4}
.teacher-equation-art{height:88px;overflow:hidden}
.teacher-equation-art canvas{display:block;width:100%;height:88px}
.teacher-presentation.has-teacher-equations #equations,
.teacher-presentation.has-teacher-equations #teaching-demo{display:none!important}
.teacher-presentation.equations-only #stage{display:none!important}

/* The calculator consumes the native graph renderer without a second inspector. */
.calculator-viewport,.calculator-viewport body,.calculator-viewport #studio{height:100%;margin:0;overflow:hidden}
.calculator-viewport .ps-header,.calculator-viewport #tools,.calculator-viewport #formula-list,.calculator-viewport #planar-inspector,.calculator-viewport .stage-heading,.calculator-viewport .stage-footer{display:none!important}
.calculator-viewport .workspace{display:block!important;height:100%!important;padding:0!important}
.calculator-viewport #stage{height:100%!important;min-height:0!important;display:block!important;margin:0!important;border:0!important}
.calculator-viewport #plot{position:absolute!important;inset:0!important;height:100%!important;width:100%!important;min-height:0!important}
