.demo .stage svg{background:#fff}.drag-dot{fill:white;stroke:#0062ff;stroke-width:3;cursor:grab}.drag-dot:hover{fill:#dbeafe}.demo.projection .demo-controls{display:none}.demo.projection .demo-layout{grid-template-columns:1fr}.demo.projection .stage svg{height:calc(100dvh - 225px)}.demo.projection svg text{font-size:30px}.model-select{font:inherit;border:1px solid #dce4ef;border-radius:7px;padding:6px;background:white}.demo .projection-toggle{white-space:nowrap}.demo .param output{margin-left:auto}.stage [role=button]{outline-offset:4px}.demo-readout .formula{white-space:normal}


/* Three-column tool layout; model and parameter containers retain their IDs. */
.demo .layout-three{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;max-width:1780px;padding:16px 22px;align-items:start}
.demo .layout-three>.demo-left{grid-column:1;grid-row:1}
.demo .layout-three>.demo-main{grid-column:2;grid-row:1 / span 2;position:sticky;top:74px;min-width:0;width:auto;order:initial}
.demo .layout-three>.demo-right{grid-column:1;grid-row:2}
.demo .layout-three>.demo-controls{display:block;position:sticky;top:74px;max-height:calc(100dvh - 92px);overflow:auto;min-width:0;width:auto;order:initial}
.demo .layout-three .demo-main .stage svg{height:calc(100dvh - 225px);min-height:370px;max-height:800px;width:100%}
.demo .demo-right .demo-readout{display:flex;flex-direction:column;align-items:stretch;font-size:16px;gap:9px;margin:0;padding:0;min-height:0;line-height:1.8}
.demo .demo-right .demo-readout strong{font-size:21px}.demo .demo-right .readout-item{width:100%;min-width:0;padding:10px 12px;font-size:13px;flex:auto}
.demo .demo-right .formula,.demo .demo-right #formula{font-size:14px;line-height:1.8;margin:10px 0 0;overflow-wrap:anywhere}
.demo .layout-three>.demo-right>.panel{margin-top:0;margin-bottom:12px}.demo .layout-three .model-list{display:flex;flex-direction:column;gap:6px}.demo .layout-three .model-button{font-size:14px;padding:9px 10px;text-align:left}
.demo .demo-right #controls{display:block}.demo .demo-right .param{min-width:0;font-size:13px;margin:13px 0}
@media(min-width:1280px){.demo .layout-three{grid-template-columns:200px minmax(0,1fr) 240px}.demo .layout-three>.demo-main{grid-column:2;grid-row:1}.demo .layout-three>.demo-right{grid-column:3;grid-row:1}}
.demo.projection .layout-three{display:block;max-width:1750px}.demo.projection .layout-three>.demo-controls{display:none!important}.demo.projection .layout-three>.demo-main{position:static;width:100%}.demo.projection .layout-three .demo-main .stage svg{height:calc(100dvh - 190px);max-height:none}
@media(max-width:760px){.demo .layout-three{display:flex;flex-direction:column;padding:10px;gap:10px}.demo .layout-three>.demo-controls{position:static;max-height:none;overflow:visible;width:100%}.demo .layout-three>.demo-left{order:-1}.demo .layout-three>.demo-main{order:0;position:static;width:100%}.demo .layout-three>.demo-right{order:1}.demo .layout-three .model-list{flex-direction:row;flex-wrap:wrap;margin-bottom:0}.demo .layout-three .model-button{font-size:12px;padding:7px 9px}.demo .layout-three .demo-main .stage svg{height:51dvh;min-height:285px;max-height:600px}.demo .demo-right .demo-readout{flex-direction:row;flex-wrap:wrap}.demo .demo-right .readout-item{width:auto;min-width:105px;flex:1}.demo .demo-right .param{margin:12px 0}.demo .demo-right #controls{display:block}.demo.projection .layout-three .demo-main .stage svg{height:72dvh;min-height:330px}}

@media(max-width:760px){.demo:not(.projection) .layout-three>.demo-left{display:none}.demo .demo-toolbar{display:flex}.demo .demo-toolbar select{max-width:100%;width:auto}}

@media(min-width:761px){.demo .layout-three #modelSelect{display:none}}
