
:root{font-family:system-ui,"Microsoft JhengHei",sans-serif;color:#183f4c;background:#f7f7f7;font-size:15px}*{box-sizing:border-box}body{margin:0}header{padding:14px 28px;display:flex;gap:24px;align-items:center;border-bottom:1px solid #ddd;background:white}header span{color:#61757b}a{color:#196d8a}h2{font-size:15px;font-weight:500;margin:0 0 18px}p{line-height:1.65}button,input,select{font:inherit;color:inherit;min-height:38px;border:1px solid #bdc9cc;border-radius:3px;padding:6px 9px;background:white;max-width:100%}button{cursor:pointer}button:hover{background:#e7f0f2}button.primary{background:#183f4c;color:white;border-color:#183f4c}button:disabled{opacity:.45;cursor:default}:focus-visible{outline:3px solid #c77732;outline-offset:3px}label{display:flex;flex-direction:column;gap:7px;font-size:13px}label input,label select{width:100%}.topbar{display:flex;align-items:center;flex-wrap:wrap;gap:18px;padding:18px 28px;background:white;border-bottom:1px solid #d8dee0}.topbar label{width:125px}.topbar #steps{min-width:120px;font-variant-numeric:tabular-nums}.fixed,.hint{font-size:12px;color:#637b83}main{max-width:1800px;margin:auto;padding:30px 28px}.explorer{display:grid;grid-template-columns:160px minmax(440px,1.5fr) minmax(330px,1fr);gap:28px;align-items:start}.explorer>*{min-width:0}aside p{font-size:13px}aside label{margin:20px 0}.datasets{display:flex;flex-direction:column;gap:8px}.network-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;min-height:70px}.network-heading label{flex-direction:row;align-items:center}.network-heading select{width:60px}.network-scroll,.table-scroll{overflow-x:auto;max-width:100%}.network-inner{min-width:590px}#widths{display:grid;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));min-height:100px;gap:8px}#widths .layer-control{display:flex;flex-direction:column;gap:8px;padding:0 5px}#widths label{font-size:11px}#network{display:block;width:100%}#network g[role=button]{cursor:pointer}#network g[role=button]:focus{outline:none}#network g[role=button]:focus rect{stroke:#c77732;stroke-width:4}.node-inspector{display:grid;grid-template-columns:145px minmax(0,1fr);align-items:center;gap:10px;border-top:1px solid #d7dfe1;padding-top:12px}.node-inspector p{grid-column:1/-1;margin:0;font-size:12px}#response{width:100%;max-height:150px}.workspace #plot{display:block;width:100%;touch-action:none;user-select:none}.stats{display:flex;flex-wrap:wrap;gap:12px;font-size:13px;min-height:52px;font-variant-numeric:tabular-nums}.toolbar{display:flex;flex-wrap:wrap;gap:8px}#snapshot{font-size:12px}#status{font-size:13px;margin:22px 0;padding:10px 0;border-top:1px solid #d7dfe1;border-bottom:1px solid #d7dfe1}.wide{margin-top:24px}summary{cursor:pointer;padding:12px 0}#trace{font-size:13px;overflow-wrap:anywhere}form{display:flex;flex-wrap:wrap;gap:12px;align-items:end}form label{min-width:100px;flex:1}table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}th,td{text-align:left;padding:10px;border-bottom:1px solid #dde5df}caption{text-align:left;margin:20px 0 8px}footer{font-size:12px;color:#61757b}svg text{font-family:system-ui,sans-serif}@media(max-width:1100px){.explorer{grid-template-columns:150px minmax(0,1fr)}.workspace{grid-column:1/-1;max-width:740px;width:100%;justify-self:center}}@media(max-width:620px){header{padding:12px;flex-wrap:wrap;gap:10px}header span{width:100%}.topbar{padding:12px;gap:10px}.topbar label{flex:1;min-width:115px}main{padding:20px 12px}.explorer{grid-template-columns:minmax(0,1fr);gap:25px}aside .datasets{flex-direction:row;flex-wrap:wrap}aside label{margin:12px 0}.workspace{grid-column:auto}.node-inspector{grid-template-columns:1fr}.node-inspector p{grid-column:auto}form button{width:100%}.network-heading{min-height:55px}.fixed{width:100%}}

@media(prefers-reduced-motion:reduce){.weight-link{stroke-dashoffset:0}}

.advanced{margin:0 0 24px;border-bottom:1px solid #d7dfe1;padding-bottom:10px}.advanced p,.advanced output{font-size:12px}.advanced [hidden]{display:none!important}

.explorer{grid-template-columns:145px 95px minmax(400px,1.5fr) minmax(320px,1fr);gap:22px}.features label{display:grid;grid-template-columns:18px 1fr;gap:5px;align-items:center;margin:14px 0}.features input{width:16px;min-height:16px}.features svg{grid-column:2;width:72px}.features label:has(input:not(:checked)) svg{opacity:.35}@media(max-width:1150px){.explorer{grid-template-columns:130px 90px minmax(0,1fr)}.workspace{grid-column:1/-1}}@media(max-width:620px){.explorer{grid-template-columns:minmax(0,1fr)}.workspace{grid-column:auto}.features #features{display:flex;flex-wrap:wrap;gap:12px}.features label{width:90px}}

/* Keep native checkbox semantics and keyboard input; show state through the whole tile. */
.features label{position:relative;display:flex;flex-direction:column;justify-content:center;gap:7px;padding:9px 5px;border:1px solid transparent;border-radius:5px;cursor:pointer;text-align:center;transition:background .15s,border-color .15s,opacity .15s}
.features label input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;opacity:0;overflow:hidden}
.features label:has(input:checked){background:#e1eef1;border-color:#347d92;color:#163f4e;opacity:1}
.features label:has(input:not(:checked)){background:#eceff0;border-color:#d6dddf;color:#79868b;opacity:.55}
.features label:has(input:focus-visible){outline:3px solid #c77732;outline-offset:3px}
.features label svg,.features label canvas{opacity:1!important;flex:none;max-width:100%}
.features label:hover{border-color:#347d92}
@media(prefers-reduced-motion:reduce){.features label{transition:none}}

@media(max-width:650px){html,body{max-width:100%;overflow-x:clip}main,.explorer,.network-area,.output,.workspace{min-width:0}.topbar{align-items:stretch}.topbar button{min-height:48px;flex:1}.topbar label{min-width:125px;flex:1}input,select,button{font-size:16px;min-height:44px}input[type=range]{min-height:44px}.features label{min-width:78px;min-height:96px}.advanced .toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.advanced label{width:100%}form{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch}form label{min-width:0}form button{width:100%}header{gap:10px}.network-scroll,.scroll,.table-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}summary{min-height:48px;display:flex;align-items:center}#trace{overflow-wrap:anywhere}canvas{max-width:100%}}

/* Data controls occupy their own upper row. */
.explorer>aside{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 18px;border-bottom:1px solid #d4dfe2;padding-bottom:18px;margin-bottom:4px}
.explorer>aside h2{min-height:0;margin:0;align-self:center;min-width:65px}
.explorer>aside label{margin:0;min-width:130px;flex:0 1 170px}
.explorer>aside button{width:auto;min-height:44px;align-self:flex-end}
.explorer>aside p{margin:0;flex:1 1 220px;font-size:12px}
.explorer>aside .datasets{display:flex;flex-direction:row;flex-wrap:wrap;align-self:flex-end}
.explorer>aside output{align-self:center}
.explorer{grid-template-columns:100px minmax(400px,1.5fr) minmax(330px,1fr)}
.explorer>.workspace,.explorer>.output{grid-column:auto;max-width:none;justify-self:stretch}
@media(max-width:1000px){.explorer{grid-template-columns:95px minmax(0,1fr)}.explorer>.workspace,.explorer>.output{grid-column:1/-1;max-width:700px;justify-self:center}}
@media(max-width:650px){.explorer{grid-template-columns:minmax(0,1fr)}.explorer>aside{gap:12px;align-items:stretch}.explorer>aside h2{width:100%}.explorer>aside label{flex:1 1 135px;min-width:0}.explorer>aside button{flex:1 1 130px}.explorer>aside p{flex-basis:100%}.explorer>aside .datasets{width:100%}.explorer>.workspace,.explorer>.output{grid-column:auto;width:100%}}

.layer-activation{display:block;width:100%;height:58px;margin-bottom:5px}#widths{min-height:156px}#responseText{font-size:12px}

.point-modes{margin:10px 0}.point-modes button{min-height:44px}.point-modes button[aria-pressed=true]{background:#1c6b58;color:white;border-color:#1c6b58}#modeDelete[aria-pressed=true]{background:#a43e32;border-color:#a43e32}

.probe-ticks{display:flex;justify-content:space-between;width:100%;font-size:12px;color:#526d78;font-variant-numeric:tabular-nums}#probeValue,#probeInfo{font-size:15px;font-weight:600;color:#7e316f;line-height:1.7;padding:8px 0;overflow-wrap:anywhere}

[hidden]{display:none!important}

.plot-bars{display:flex;gap:14px;margin:10px 0 4px}.plot-bars label{flex:1;min-width:0;font-size:12px;gap:0}.plot-bars input[type=range]{width:100%;min-height:32px;margin:0;padding:0;accent-color:#23765b}.plot-bars .probe-ticks{font-size:11px}@media(max-width:650px){.plot-bars input[type=range]{min-height:44px}}

.topbar label:has(.parameter-pair){width:205px}.parameter-pair{display:grid;grid-template-columns:minmax(80px,1fr) 76px;gap:8px;align-items:center}.parameter-pair input[type=range]{padding:0;accent-color:#23765b}.parameter-toggle{display:flex;align-items:center;gap:7px;font-size:12px}.parameter-toggle input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0}.topbar input:disabled{opacity:.45}@media(max-width:650px){.topbar label:has(.parameter-pair){flex:1 1 100%}.parameter-toggle{min-height:32px}}

.vector-row{display:flex;align-items:center;gap:22px;overflow-x:auto;padding:16px 3px;max-width:100%}.vector-heading{font-size:13px;text-align:center;margin-bottom:12px;white-space:nowrap}.vector-bracket{border-left:2px solid #385c68;border-right:2px solid #385c68;position:relative;padding:4px 14px;min-width:145px;background:linear-gradient(#385c68,#385c68) left top/10px 2px no-repeat,linear-gradient(#385c68,#385c68) right top/10px 2px no-repeat,linear-gradient(#385c68,#385c68) left bottom/10px 2px no-repeat,linear-gradient(#385c68,#385c68) right bottom/10px 2px no-repeat}.vector-item{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 0}.vector-item small{font-size:11px;color:#667d86;white-space:nowrap}.vector-item span{font-size:18px;font-variant-numeric:tabular-nums}.vector-arrow{font-size:16px;white-space:nowrap}.vector-source{font-size:12px;line-height:1.8;overflow-wrap:anywhere}

#vectorView{min-width:0;max-width:100%}#vectorView .math-block{text-align:left}#vectorView p{font-size:13px;line-height:1.8;overflow-wrap:anywhere}

.point-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px;color:#425f6b;margin:8px 0}

.advanced>.sgd-definition,.advanced>.mse-definition{margin-left:24px;max-width:calc(100% - 24px)}

.explorer>aside h2 span{display:block;font-size:12px;color:#6b7c82;margin-top:6px}.explorer>aside>.hint{flex:1 0 100%}

.point-modes{align-items:center}.point-role{margin:0;min-width:145px}.point-role select{height:44px;min-height:44px;font-size:15px;width:100%}.point-modes button{min-height:44px}

.activation-label{font-size:11px!important;text-align:left!important;padding-top:0!important;color:#183f4c!important}.linear-output-control{display:flex;flex-direction:column;gap:10px;align-self:start;font-size:11px}.linear-activation{display:block;width:100%;height:58px;margin-top:100px}.layer-activation{margin-top:4px;margin-bottom:0}#layers,#widths{min-height:190px}

.linear-output-control .linear-activation{margin-top:4px}.fixed-activation{display:block;padding:7px;border:1px solid #bdc9cc;border-radius:3px;font-size:12px;background:white}

/* Shared row positions for hidden-layer and output activation controls. */
#widths .layer-control,#layers>label,.linear-output-control{display:grid!important;grid-template-rows:18px 38px 30px 38px 58px;row-gap:7px!important;align-content:start;padding-top:0!important}
#widths .layer-control>label:first-of-type{display:contents}
#widths .layer-control>label:first-of-type>.width{grid-row:2}
#widths .layer-control>label:nth-of-type(2){display:contents}
#widths .layer-control>label:nth-of-type(2)>.activation{grid-row:4}
#widths .layer-control>.layer-activation{grid-row:5}
#layers>label>select:first-of-type{grid-row:2}
#layers>label>.activation-label{grid-row:3}
#layers>label>select:nth-of-type(2){grid-row:4}
#layers>label>.layer-activation{grid-row:5}
.linear-output-control>.activation-label{grid-row:3}
.linear-output-control>.fixed-activation{grid-row:4;box-sizing:border-box}
.linear-output-control>.linear-activation{grid-row:5;margin:0!important}
.layer-activation{margin:0!important;height:58px}
#widths,#layers{min-height:225px}

#widths .layer-caption{grid-row:1}#widths .layer-control .activation-label{grid-row:3}

.advanced>summary{font-size:12px;color:#839197;font-weight:400;min-height:36px;padding:6px 0}.advanced{border-bottom-color:#e4e9eb;margin-bottom:16px}.advanced>summary:hover,.advanced>summary:focus-visible{color:#385c68}@media(max-width:650px){.advanced>summary{min-height:44px}}

main:has(>.advanced){padding-top:0}.advanced:not([open]){margin-top:0;margin-bottom:0;padding-bottom:0}.advanced:not([open])>summary{min-height:28px;padding:3px 0}.advanced[open]{margin-top:0}@media(max-width:650px){main:has(>.advanced){padding-top:0}.advanced:not([open])>summary{min-height:36px;padding:2px 0}}

/* Align optimizer parameter titles, inputs, and switches. */
.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){display:grid;grid-template-rows:20px 40px 24px;row-gap:5px;align-self:center;align-content:start}
.topbar>label:has(#batch)>.parameter-pair,.topbar>label:has(#momentum)>.parameter-pair{grid-row:2}
.topbar>label:has(#batch)>.parameter-toggle,.topbar>label:has(#decay)>.parameter-toggle{grid-row:3}
.topbar>label:has(#decay)>#decay{grid-row:2}
.topbar .parameter-pair input{height:40px;min-height:40px}
.topbar .parameter-toggle{min-height:24px;align-self:center}
@media(max-width:650px){.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){grid-template-rows:20px 44px 32px}.topbar .parameter-pair input{height:44px;min-height:44px}.topbar .parameter-toggle{min-height:32px}}

.explorer>aside{align-items:flex-end}.explorer>aside>label select,.explorer>aside>button{height:44px;min-height:44px;box-sizing:border-box}.explorer>aside>label{gap:7px;margin:0}.explorer>aside>h2{align-self:center}

/* All training parameter controls share title/input/switch rows. */
.topbar>label:has(#rate),.topbar>label:has(#seed),.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){display:grid;grid-template-rows:24px 40px 24px;row-gap:5px;align-self:center;align-content:start}
.topbar>label:has(#rate),.topbar>label:has(#seed){width:150px}
.topbar #rate,.topbar #seed,.topbar #decay{grid-row:2;height:40px;min-height:40px}
.topbar .parameter-pair{grid-row:2}
.topbar .parameter-toggle{grid-row:3}
@media(max-width:650px){.topbar>label:has(#rate),.topbar>label:has(#seed),.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){grid-template-rows:24px 44px 32px}.topbar #rate,.topbar #seed,.topbar #decay{height:44px;min-height:44px}}

/* Explicit title elements prevent anonymous text from shifting grid tracks. */
.topbar>label.training-parameter{display:grid;grid-template-rows:36px 44px 28px;gap:6px;align-self:center;align-items:center;align-content:start;margin:0;min-width:150px}
.training-parameter>.parameter-title{grid-row:1;align-self:end;line-height:18px;font-size:13px}
.training-parameter>input,.training-parameter>select,.training-parameter>.parameter-pair{grid-row:2;align-self:stretch;height:44px;min-height:44px}
.training-parameter>.parameter-toggle{grid-row:3;align-self:start;margin:0;min-height:24px}
.training-parameter .parameter-pair input{height:44px;min-height:44px;margin:0;box-sizing:border-box}
.training-parameter>.parameter-pair{align-items:center}
@media(max-width:650px){.topbar>label.training-parameter{grid-template-rows:36px 44px 32px;align-self:stretch}.training-parameter>.parameter-toggle{min-height:32px}}

.noise-control{min-width:160px}.noise-control output{font-size:12px}.noise-control input[type=range]{padding:0;accent-color:#23765b;height:44px}

.output-training{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0 16px}.output-training button{min-height:44px}.output-training #steps{font-size:13px;font-variant-numeric:tabular-nums;flex:1 0 100%;padding:4px 0}.output-training #run{background:#183f4c;color:white;border-color:#183f4c}@media(max-width:650px){.output-training button{flex:1}}

body>header,.topbar{justify-content:center}body>header span{margin-left:0}@media(max-width:650px){body>header{text-align:center}body>header span{text-align:center}}

.point-modes #pointCount{font-size:13px;white-space:nowrap;align-self:center;margin-left:4px}

#widths,#layers{min-height:0;margin-bottom:0}.network-area>.plot-bars{margin:0 0 10px}.network-area .network-scroll,.network-area>.scroll{margin-top:0;padding-top:0}

/* Reduce whitespace without scaling nodes, fonts, controls, or output plots. */
#widths .layer-control,#layers>label,.linear-output-control{row-gap:4px!important}.network-heading,.heading{margin-bottom:0}.network-area>.plot-bars{margin-top:0;margin-bottom:4px}.plot-bars label{gap:0}.node-calculation,.wide{margin-top:18px}.output-training{margin-top:8px;margin-bottom:10px}.point-legend{margin:5px 0}.point-modes{margin:6px 0}

/* Tight activation caption row; preserve control and graph sizes. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-rows:18px 38px 16px 38px 58px;row-gap:3px!important}.activation-label{line-height:16px!important;align-self:end!important;margin:0!important;padding:0!important}#widths .layer-control .activation-label{line-height:16px}#layers,#widths{padding-bottom:0}

/* Keep the bottom of the input bars aligned with the image action row. */
.explorer>.network-area,.explorer>.output,.explorer>.workspace{align-self:stretch}
.explorer>.network-area{display:flex;flex-direction:column;min-width:0}
.network-area>.plot-bars{margin-top:auto;margin-bottom:0;padding-bottom:0}
.network-area>.plot-bars .probe-ticks{line-height:14px}
.output #snapshot:empty,.workspace #snapshot:empty{display:none}
.output>.toolbar:last-of-type,.workspace>.toolbar:last-of-type{margin-bottom:0}
@media(max-width:1000px){.network-area>.plot-bars{margin-top:0}}

/* Center the unchanged network drawing in available vertical space. */
.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:auto;margin-bottom:auto;flex-shrink:0}
.explorer>.network-area>.plot-bars{margin-top:0;flex-shrink:0}
@media(max-width:1000px){.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:0;margin-bottom:0}}

@media(min-width:1151px){.features,.network-area{position:relative}.features #features,.network-area>.scroll,.network-area>.network-scroll{will-change:transform}.explorer{padding-bottom:12px}}

.network-controls-scroll{max-width:100%;overflow-x:auto;flex-shrink:0}#widths,#layers{min-width:480px}.network-heading,.heading{min-height:46px;margin:0 0 8px}.explorer>.network-area>.network-controls-scroll{transform:none;position:relative;z-index:1}.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:0;margin-bottom:0}

/* Bars stay at the image-download action baseline, independently of drawing offsets. */
.explorer>.network-area>.plot-bars{margin-top:auto;margin-bottom:0;transform:none;position:relative;z-index:2;flex-shrink:0}.explorer>.network-area{align-self:stretch}.output>.toolbar:last-of-type,.workspace>.toolbar:last-of-type{margin-bottom:0;padding-bottom:0}@media(max-width:1000px){.explorer>.network-area>.plot-bars{margin-top:8px}}

#widths>.input-caption,#layers>.input-caption,.linear-output-control>.output-caption{padding:0!important;margin:0;line-height:18px;font-size:11px;text-align:left!important;align-self:start;grid-row:1}.linear-output-control>#taskMode{grid-row:2;min-height:38px;height:38px;align-self:stretch}.linear-output-control>.output-caption{color:#183f4c}

.workspace #plot{width:100%;height:auto;aspect-ratio:1 / 1}

.coordinate-tooltip{position:fixed;z-index:1000;pointer-events:none;background:#183f4c;color:white;border-radius:4px;padding:6px 9px;font:13px system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}

.output-controls{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;align-items:start;margin:10px 0 12px}
.output-controls .output-training{margin:0;align-content:start}
.output-controls .topbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:0;border:0;background:transparent;min-width:0}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;grid-template-rows:32px 38px 24px!important;gap:3px!important;margin:0!important}
.output-controls .parameter-title{font-size:11px!important;line-height:16px!important}
.output-controls .parameter-pair{grid-template-columns:minmax(40px,1fr) 56px;gap:5px}
.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{font-size:12px;min-height:38px!important;height:38px!important;padding:4px;max-width:100%}
.output-controls .parameter-toggle{font-size:11px;min-height:24px!important}
main>.advanced:last-child{margin-top:20px;border-top:1px solid #e4e9eb;border-bottom:0}
@media(min-width:1500px){.output-controls{grid-template-columns:180px minmax(0,1fr)}.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.output-controls{grid-template-columns:minmax(0,1fr)}.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}.output-controls .topbar>label.training-parameter{grid-template-rows:32px 44px 28px!important}.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{min-height:44px!important;height:44px!important;font-size:16px}.output-controls .output-training button{flex:1}}


@media(min-width:651px){
.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,175px));gap:4px 8px;justify-content:start}
.output-controls .topbar>label.training-parameter{grid-template-rows:26px 30px 20px!important;gap:2px!important;width:100%!important}
.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{min-height:30px!important;height:30px!important;font-size:12px;padding:3px 5px}
.output-controls .parameter-title{font-size:11px!important;line-height:14px!important}
.output-controls .parameter-toggle{min-height:20px!important;font-size:10px}
.output-controls .parameter-pair{grid-template-columns:minmax(35px,1fr) 49px}
}

@media(min-width:651px){
.output-controls .topbar{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;justify-content:stretch;gap:5px 9px}
.output-controls .topbar>label.training-parameter{min-width:0!important;max-width:none}
.output-controls .topbar>label:has(#rate){grid-column:1;grid-row:1}
.output-controls .topbar>label:has(#seed){grid-column:2;grid-row:1}
.output-controls .topbar>label:has(#decay){grid-column:3;grid-row:1}
.output-controls .topbar>label:has(#batch){grid-column:1 / 3;grid-row:2}
.output-controls .topbar>label:has(#momentum){grid-column:3;grid-row:2}
.output-controls .parameter-pair{grid-template-columns:minmax(25px,1fr) 49px}
}

#outputTitle{min-height:0!important;height:auto;line-height:20px;margin:0 0 5px!important}
.output-controls{margin-top:0;margin-bottom:8px;align-items:start}
@media(min-width:651px){
.output-controls .topbar>label.training-parameter{grid-template-rows:18px 30px 20px!important;gap:2px!important;align-self:start!important}
.output-controls .training-parameter>.parameter-title{align-self:start!important;line-height:16px!important;margin:0;padding:0}
.output-controls .topbar{align-items:start;row-gap:6px}
.output-controls .topbar #rate,.output-controls .topbar #seed,.output-controls .topbar #decay{height:30px;min-height:30px;align-self:stretch;margin:0}
.output-controls .output-training{margin-top:0}
}

.point-count-group{display:flex;flex-direction:column;gap:3px;align-self:center}.point-count-group .point-legend{margin:0;font-size:11px;gap:12px}.point-count-group #pointCount{margin:0}

.output-controls .output-training #loss,.output-controls .output-training .stats{flex:1 0 100%;margin:4px 0 0;min-height:0;font-size:11px;line-height:1.6;gap:3px}
.output-controls .topbar{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;justify-content:flex-start;align-items:flex-start;padding-bottom:4px}
.output-controls .topbar>label.training-parameter{flex:0 0 128px!important;width:128px!important;min-width:128px!important;grid-column:auto!important;grid-row:auto!important}
.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum){flex-basis:165px!important;width:165px!important;min-width:165px!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 150px!important;width:150px!important;min-width:150px!important}}

/* Parameters own the full first row; training actions follow below. */
.output-controls{display:flex;flex-direction:column;align-items:stretch;gap:9px}
.output-controls>.topbar{order:0;width:100%;max-width:100%}
.output-controls>.output-training{order:1;display:flex;flex-wrap:wrap;align-items:center;width:100%;margin:0;gap:8px}
.output-controls .output-training #steps{flex:0 1 auto;padding:0;margin-left:3px}
.output-controls .output-training #loss,.output-controls .output-training .stats{flex:1 0 100%;margin-top:0}
@media(max-width:650px){.output-controls>.output-training button{flex:0 1 auto}.output-controls .output-training #steps{flex:1 0 100%}}

.output-controls .output-training #steps{order:1;flex:1 0 100%;margin:0;padding:0;line-height:20px}
.output-controls .output-training #loss,.output-controls .output-training .stats{order:2;flex:1 0 100%;margin:0;line-height:18px}
.output-controls .output-training{row-gap:5px}

.output-controls .topbar>label:has(#seed){order:10}

/* Let the caption determine each parameter column's intrinsic width. */
.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;width:max-content!important;min-width:0!important;max-width:none;grid-template-columns:minmax(0,max-content)}
.output-controls .training-parameter>.parameter-title{white-space:nowrap}
.output-controls .training-parameter>input:not([type=checkbox]),.output-controls .training-parameter>select,.output-controls .training-parameter>.parameter-pair{width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box}
.output-controls .training-parameter>.parameter-pair{grid-template-columns:minmax(0,1fr) 43px}
.output-controls .parameter-pair>input{min-width:0!important;width:100%!important;box-sizing:border-box}

.output-controls .training-parameter>input:not([type=checkbox]),.output-controls .training-parameter>select,.output-controls .training-parameter>.parameter-pair{contain:inline-size}

.output-controls>.output-training{align-items:center;column-gap:10px}
.training-readouts{display:flex;flex-direction:column;gap:3px;min-width:0}
.output-controls .training-readouts #steps,.output-controls .training-readouts #loss,.output-controls .training-readouts .stats{order:0;flex:0 1 auto;margin:0;padding:0;line-height:18px;font-size:11px}
.output-training>label:has(#seed){display:flex;flex-direction:column;gap:3px;min-width:0;width:115px;margin:0;order:0}
.output-training>label:has(#seed)>.parameter-title{font-size:11px;line-height:16px}
.output-training #seed{width:115px;height:32px;min-height:32px;font-size:12px;padding:4px 6px;contain:none}
@media(max-width:650px){.output-training #seed{height:44px;min-height:44px;font-size:16px}.training-readouts{flex:0 1 auto}}

/* Fill the parameter row; keep checkboxes inline with their controls. */
.output-controls .topbar{width:100%;gap:10px}
.output-controls .topbar>label.training-parameter{flex:1 1 0!important;width:auto!important;min-width:0!important;grid-template-columns:minmax(0,1fr);grid-template-rows:30px 38px!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) auto}
.output-controls .topbar .parameter-title{grid-column:1 / -1}
.output-controls .topbar .parameter-toggle{grid-row:2!important;grid-column:2;align-self:center;margin-left:5px;white-space:nowrap;min-height:24px!important}
.output-controls .topbar .parameter-pair,.output-controls .topbar #decay{grid-row:2;grid-column:1}
.output-controls .topbar .parameter-pair{grid-template-columns:minmax(24px,1fr) 42px}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 180px!important;grid-template-rows:30px 44px!important}.output-controls .topbar>label.training-parameter:has(#batch){flex-basis:245px!important}}

.output-controls .topbar>label:has(#rate){order:0}.output-controls .topbar>label:has(#decay){order:1}.output-controls .topbar>label:has(#momentum){order:2}.output-controls .topbar>label:has(#batch){order:3}

/* Content-sized columns, not equal fractions. */
.output-controls .topbar{justify-content:flex-start;gap:12px}
.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;width:max-content!important;min-width:0!important;grid-template-columns:max-content;grid-template-rows:30px 38px!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(70px,max-content) auto}
.output-controls .topbar>label:has(#rate){width:140px!important}
.output-controls .topbar>label:has(#decay){width:170px!important;grid-template-columns:minmax(75px,1fr) auto}
.output-controls .topbar>label:has(#momentum){width:160px!important}
.output-controls .topbar>label:has(#batch){width:220px!important;grid-template-columns:minmax(90px,1fr) auto}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;grid-template-rows:30px 44px!important}}

.output-controls .topbar{column-gap:5px;row-gap:4px}.output-controls .topbar .parameter-toggle{margin-left:2px}.output-controls .parameter-pair{gap:3px}

/* Four equal parameter cells across exactly the output chart width. */
.output-controls{width:100%;min-width:0}
.output-controls .topbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:100%;column-gap:6px;row-gap:4px;box-sizing:border-box;padding-left:0;padding-right:0;overflow-x:visible}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;max-width:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:30px 38px!important;grid-column:auto!important;grid-row:auto!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) auto}
.output-controls .topbar .parameter-title{white-space:normal;overflow-wrap:anywhere}
.output-controls .topbar .parameter-pair{grid-template-columns:minmax(0,1fr) 40px}
.output-controls .topbar .parameter-toggle{font-size:10px;margin-left:2px;gap:3px;white-space:nowrap}
@media(max-width:650px){.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.output-controls .topbar>label.training-parameter{grid-template-rows:30px 44px!important}}

/* Checkbox and caption are contained inside each quarter of the chart. */
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) minmax(0,max-content);column-gap:3px;box-sizing:border-box}
.output-controls .topbar .parameter-toggle{max-width:76px;min-width:0;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;margin-left:0;line-height:13px}
.output-controls .topbar .parameter-toggle input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-width:16px;min-height:16px;padding:0}
.output-controls .topbar .parameter-pair,.output-controls .topbar .parameter-pair>input{min-width:0!important;max-width:100%;box-sizing:border-box}

.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,92px) auto;justify-content:start;column-gap:3px}
.output-controls .topbar #decay{width:92px!important;max-width:100%}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,138px)!important;grid-template-columns:minmax(0,1fr) 40px;justify-self:start}
@media(max-width:650px){.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,150px)!important}}

.output-controls .topbar .parameter-toggle{font-size:12px!important;line-height:18px;display:flex;align-items:center;align-self:center;gap:4px;min-height:30px!important;white-space:nowrap;max-width:none}
.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,82px) auto;align-items:center}
.output-controls .topbar #decay{width:82px!important}
.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-template-columns:minmax(0,1fr) 44px}
.output-controls .topbar #batch{width:44px!important;padding-left:3px;padding-right:3px;font-variant-numeric:tabular-nums}

.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,112px)!important;grid-template-columns:minmax(0,1fr) 40px}

.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-template-columns:minmax(0,1fr) 34px;gap:3px}.output-controls .topbar #batch{width:34px!important;padding-left:2px;padding-right:1px;font-size:11px;appearance:textfield;-moz-appearance:textfield}.output-controls #batch::-webkit-inner-spin-button,.output-controls #batch::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Native range tracks must not inherit text-field frames or padding. */
.output-controls .topbar input[type=range]{border:0!important;background:transparent!important;padding:0!important;margin:0!important;border-radius:0!important;box-shadow:none!important;outline-offset:2px;min-width:0!important;width:100%!important}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 36px;gap:3px}
.output-controls .topbar>label:has(#batch)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 28px;gap:2px}
.output-controls .topbar #batch{width:28px!important;padding:1px!important;font-size:10px!important;text-align:center;letter-spacing:-.2px}
.output-controls .topbar #momentum{width:36px!important;min-width:0!important;padding:2px!important}

/* Each parameter keeps exactly one quarter; momentum reserves inline breathing room. */
.output-controls .topbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:6px}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:calc(100% - 40px)!important;min-width:64px!important;max-width:100%;grid-template-columns:minmax(0,1fr) 36px;justify-self:start}
@media(max-width:650px){.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Batch controls must fit within the final quarter of the chart. */
.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:minmax(0,1fr) 42px!important;column-gap:2px!important;width:100%!important;min-width:0!important;max-width:100%!important}
.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-column:1!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) 28px!important;gap:2px!important;contain:inline-size}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:2!important;width:42px;max-width:42px;min-width:0;gap:2px;margin:0;padding:0;font-size:11px!important;justify-content:flex-start}
.output-controls .topbar>label:has(#batch)>.parameter-toggle input{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;flex:0 0 14px}
.output-controls .topbar #batchBar{min-width:0!important;width:100%!important;max-width:100%!important}
.output-controls .topbar #batch{min-width:0!important;width:28px!important;max-width:28px!important;box-sizing:border-box}

/* Checkboxes get their own lower line within a shared parameter height. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:28px 30px 20px!important;row-gap:2px!important;align-content:start}
.output-controls .topbar .training-parameter>.parameter-title{grid-column:1!important;grid-row:1!important}
.output-controls .topbar .training-parameter>.parameter-pair,.output-controls .topbar .training-parameter>#decay,.output-controls .topbar .training-parameter>#rate{grid-column:1!important;grid-row:2!important}
.output-controls .topbar .training-parameter>.parameter-toggle,.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:1!important;grid-row:3!important;min-height:20px!important;height:20px;margin:0!important;padding:0;align-self:start;justify-self:start;width:auto;max-width:100%}
.output-controls .topbar>label:has(#batch)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 28px!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:30px 44px 24px!important}.output-controls .topbar .training-parameter>.parameter-toggle{height:24px;min-height:24px!important}}

/* Range alone on row 2; numeric value and toggle share row 3. */
.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:28px 30px 20px!important;column-gap:3px!important}
.output-controls .topbar>label:has(#momentum)>.parameter-title,.output-controls .topbar>label:has(#batch)>.parameter-title{grid-column:1 / -1!important}
.output-controls .topbar>label:has(#momentum)>.parameter-pair,.output-controls .topbar>label:has(#batch)>.parameter-pair{display:contents!important;contain:none!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{grid-column:1 / -1!important;grid-row:2!important;width:100%!important;height:30px!important;min-height:30px!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{grid-column:1!important;grid-row:3!important;justify-self:start;align-self:start;height:20px!important;min-height:20px!important;padding:0 2px!important;font-size:11px!important}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:2!important;grid-row:3!important;align-self:center;justify-self:start}
@media(max-width:650px){.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch){grid-template-rows:30px 44px 32px!important}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:44px!important;min-height:44px!important}.output-controls .topbar #momentum,.output-controls .topbar #batch{height:32px!important;min-height:32px!important;font-size:16px!important}}

/* Use Learning rate's 60px footprint: caption, slim range, aligned value row. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:18px 12px 30px!important;row-gap:0!important;align-content:start}
.output-controls .topbar .training-parameter>.parameter-title{grid-row:1!important;grid-column:1 / -1!important;align-self:start!important;line-height:16px!important}
.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{grid-row:3!important;height:30px!important;min-height:30px!important;align-self:stretch!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{grid-row:2!important;grid-column:1 / -1!important;height:12px!important;min-height:12px!important;align-self:center;margin:0!important}
.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,1fr) auto!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle,.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-row:3!important;grid-column:2!important;height:30px!important;min-height:30px!important;align-self:center!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:20px 24px 44px!important}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:24px!important;min-height:24px!important}.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{height:44px!important;min-height:44px!important}}

.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,82px) auto!important;justify-content:start;column-gap:3px!important}
.output-controls .topbar #decay{grid-column:1!important;width:82px!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{grid-column:2!important;grid-row:3!important;margin:0!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{width:calc(100% - 20px)!important;justify-self:center}
.output-controls .topbar #momentum,.output-controls .topbar #batch,.output-controls .topbar #decay{text-align:center!important}
.output-controls .topbar>label.training-parameter:has(#momentum){grid-template-columns:minmax(0,1fr)!important}
.output-controls .topbar #momentum{justify-self:center;grid-column:1!important}
.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:28px auto!important;justify-content:center}
.output-controls .topbar>label:has(#batch)>.parameter-title{justify-self:start}

/* Keep every control inside its own quarter; remove conflicting internal grid tracks. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){display:block!important;position:relative;height:64px!important;min-height:64px;min-width:0!important;width:100%!important;max-width:100%!important;overflow:hidden;box-sizing:border-box;padding:0!important;margin:0!important}
.output-controls .topbar .training-parameter>.parameter-title{display:block;height:18px;line-height:16px!important;width:100%;white-space:nowrap;font-size:11px!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{position:absolute;left:8px;top:18px;width:calc(100% - 16px)!important;height:12px!important;min-height:12px!important;max-width:calc(100% - 16px)!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{position:absolute;left:50%;top:32px;transform:translateX(-50%);text-align:center!important;height:30px!important;min-height:30px!important;margin:0!important}
.output-controls .topbar #momentum{width:36px!important}
.output-controls .topbar #batch{width:28px!important}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{position:absolute;left:calc(50% + 18px);top:32px;max-width:calc(50% - 18px);height:30px!important;min-height:30px!important;width:auto;margin:0!important}
.output-controls .topbar #rate{position:absolute;left:0;top:32px;width:100%!important;height:30px!important;min-height:30px!important}
.output-controls .topbar #decay{position:absolute;left:0;top:32px;width:calc(100% - 49px)!important;max-width:82px;height:30px!important;min-height:30px!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{position:absolute;left:min(85px,calc(100% - 46px));top:32px;height:30px!important;min-height:30px!important;max-width:46px;margin:0!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:88px!important;min-height:88px}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:24px!important;min-height:24px!important}.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{top:44px;height:44px!important;min-height:44px!important}.output-controls .topbar>label:has(#batch)>.parameter-toggle,.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:44px;height:44px!important;min-height:44px!important}}

/* Sliders start at the column edge; only their numeric fields are centered. */
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{left:0;width:100%!important;max-width:100%!important;justify-self:start}
.output-controls .topbar #momentum{width:58px!important;max-width:58px!important;padding:2px 4px!important;font-size:12px!important;text-align:center!important}
.output-controls .topbar #rate,.output-controls .topbar #decay{top:18px}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:18px}
@media(max-width:650px){.output-controls .topbar #rate,.output-controls .topbar #decay{top:20px}.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:20px}.output-controls .topbar #momentum{font-size:16px!important}}

@media(min-width:651px){
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:52px!important;min-height:52px!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{height:20px!important;min-height:20px!important;top:30px;padding-top:0!important;padding-bottom:0!important;line-height:18px}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{top:30px;height:20px!important;min-height:20px!important}
.output-controls .topbar{padding-bottom:0;row-gap:0}
.output-controls{gap:4px;margin-bottom:4px}
}

.network-heading,.heading{display:grid!important;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));gap:8px;align-items:start}
.network-input-heading{grid-column:1;align-self:start;font-size:12px;color:#526d78;padding-top:2px}
.network-heading>h2,.heading>h2{grid-column:2;grid-row:1;min-height:0;font-size:13px;margin:0;white-space:nowrap}
.network-heading>h2>span,.heading>h2>span{display:block;font-size:11px;margin-top:3px}
.network-heading>label,.heading>label{grid-column:-2 / -1;grid-row:1;justify-self:end;width:70px}

/* Compact layer selectors; keep activation previews aligned across columns. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-rows:18px 28px 16px 28px 58px;row-gap:3px!important}
#widths .layer-control select,#layers>label>select{height:28px!important;min-height:28px!important;padding:2px 5px!important;box-sizing:border-box}
.linear-output-control>.fixed-activation{height:28px;min-height:28px;padding:3px 7px;box-sizing:border-box}

/* Equal parameter footprints: 18px title + 32px controls (12px slider + 20px value). */
@media(min-width:651px){
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:50px!important;min-height:50px!important}
.output-controls .topbar #rate,.output-controls .topbar #decay{top:18px!important;height:32px!important;min-height:32px!important;box-sizing:border-box;margin:0!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:18px!important;height:32px!important;min-height:32px!important;display:flex;align-items:center}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{top:18px!important;height:12px!important;min-height:12px!important;margin:0!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{top:30px!important;height:20px!important;min-height:20px!important;box-sizing:border-box}
.output-controls .topbar{align-items:start!important;margin:0!important;padding-top:0!important;padding-bottom:0!important}
}

/* Column headings share a baseline above the actual network columns. */
.network-input-heading,.network-output-heading{grid-row:1;align-self:start;padding:0;line-height:18px;font-size:13px;color:#183f4c;text-align:center}
.network-input-heading{grid-column:1}
.network-output-heading{grid-column:-2 / -1}
.network-heading>h2,.heading>h2{line-height:18px;padding:0 56px 0 0;min-height:0}
.network-heading>label,.heading>label{grid-column:2;grid-row:1;justify-self:end;align-self:start;width:48px;font-size:0;line-height:0;margin:0}
.network-heading>label>select,.heading>label>select{display:block;width:48px;height:24px!important;min-height:24px!important;padding:1px 4px!important;font-size:12px;line-height:20px;margin:0}
.linear-output-control>#taskMode{height:28px!important;min-height:28px!important;padding:2px 5px!important;box-sizing:border-box}

/* Bilingual headings, centered over input, hidden-layer group, and output. */
.network-input-heading,.network-output-heading{font-size:13px;font-weight:400;line-height:18px;text-align:center}
.network-input-heading>span,.network-output-heading>span{display:block;font-size:11px;color:#6b7c82;margin-top:3px;line-height:16px}
.network-heading>h2,.heading>h2{grid-column:2 / -2;text-align:center;padding:0 56px;line-height:18px;font-size:13px;white-space:nowrap}
.network-heading>label,.heading>label{grid-column:-3 / -2}

/* Equal vertical breathing room around the training action row. */
.output-controls{gap:0;margin-bottom:0}
.output-controls>.output-training{padding:8px 0;margin:0;box-sizing:border-box;align-items:center}

/* Keep the depth selector directly beside the centered hidden-layer title. */
.network-heading>label,.heading>label{grid-column:2 / -2;justify-self:center;transform:translateX(96px);margin:0}

/* Slightly larger depth selector beside HIDDEN LAYERS. */
.network-heading>label,.heading>label{width:60px;transform:translateX(102px)}
.network-heading>label>select,.heading>label>select{width:60px;height:30px!important;min-height:30px!important;font-size:14px;line-height:24px;padding:2px 6px!important}

/* Align the depth selector with the Chinese subtitle rather than the English title. */
.network-heading>label,.heading>label{align-self:start;margin-top:14px}

/* Depth label and select share the subtitle's center line. */
.network-heading>label,.heading>label{display:flex;align-items:center;gap:5px;width:auto;height:24px;line-height:16px;font-size:11px;margin-top:17px;transform:translateX(94px)}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:inline;white-space:nowrap;font-size:11px;line-height:16px;color:#6b7c82}
.network-heading>label>select,.heading>label>select{width:54px;height:24px!important;min-height:24px!important;font-size:12px;line-height:20px;padding:1px 5px!important;margin:0}

/* One actual row: 隱藏層 · 層數 · selector. */
.network-heading>h2,.heading>h2{padding:0;text-align:center}
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex;justify-content:center;align-items:center;gap:8px;min-height:24px;margin-top:3px;line-height:16px}
.hidden-subtitle>label{display:inline-flex;align-items:center;gap:5px;width:auto;margin:0;padding:0;transform:none;font-size:11px;line-height:16px}
.hidden-subtitle .depth-caption{font-size:11px;white-space:nowrap}
.hidden-subtitle #depth{display:inline-block;width:54px;height:24px!important;min-height:24px!important;padding:1px 5px!important;margin:0;font-size:12px;line-height:20px}

/* Independent hidden-layer heading, with depth control to its right. */
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:block;min-height:16px;line-height:16px}
.network-heading>label,.heading>label{grid-column:2 / -2;grid-row:1;justify-self:center;display:flex;align-items:center;gap:5px;width:auto;height:24px;margin:17px 0 0;padding:0;transform:translateX(105px);font-size:11px;line-height:16px}
.network-heading>label>select,.heading>label>select{width:62px;height:24px!important;min-height:24px!important;font-size:12px;line-height:20px;padding:1px 5px!important;margin:0}

/* The action row owns its spacing; the point toolbar adds no extra top gap. */
.output .point-modes,.output .toolbar.point-modes{margin-top:0!important;margin-bottom:0!important}
.output-controls>.output-training{padding-top:8px!important;padding-bottom:8px!important;margin-top:0!important;margin-bottom:0!important}

/* Override inherited column label layout: caption and select stay on one line. */
.network-heading>label:has(#depth),.heading>label:has(#depth){display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:5px!important;width:max-content!important;white-space:nowrap;line-height:24px!important}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:inline-block!important;flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important;line-height:24px!important}
.network-heading>label>#depth,.heading>label>#depth{display:inline-block!important;flex:0 0 62px!important;width:62px!important;margin:0!important}

/* Lower layer captions slightly without moving the selectors. */
#widths .layer-caption,#layers>label>.layer-caption{position:relative;top:4px;grid-row:1;text-align:left;padding:0;line-height:18px;align-self:start}

/* Increment/decrement controls for layer and neuron counts. */
.count-stepper{display:flex!important;flex-direction:row;align-items:center;gap:6px;grid-row:2;padding:0!important;line-height:28px;white-space:nowrap}
.count-stepper>button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:28px;min-width:28px;padding:0;border:0;border-radius:50%;background:#e9edef;color:#183f4c;font-size:20px;line-height:1;cursor:pointer}
.count-stepper>button:disabled{opacity:.35;cursor:default}
.count-stepper>span{font-size:12px!important;padding:0!important;color:#183f4c!important;line-height:28px}
.network-heading>label:has(#depth),.heading>label:has(#depth){width:max-content!important;transform:translateX(130px)}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:none!important}
.network-heading #depth,.heading #depth,#widths select.width[hidden],#layers>label>select[hidden]{display:none!important}
.network-heading .count-stepper,.heading .count-stepper{height:28px}

/* Put neuron count after the layer caption; use smaller +/- circles. */
.layer-caption>.layer-count{display:inline!important;margin-left:8px;padding:0!important;font-size:11px!important;line-height:18px!important;color:#526d78!important}
.count-stepper{gap:5px;line-height:24px}
.count-stepper>button{width:24px;height:24px;min-width:24px;min-height:24px;font-size:18px}

/* Shared sizing for every layer/neuron count module. */
.count-stepper,.network-heading .count-stepper,.heading .count-stepper{height:24px;min-height:24px;gap:5px;align-items:center;line-height:24px}
.count-stepper>button{box-sizing:border-box;flex:0 0 24px;width:24px;height:24px;min-width:24px;min-height:24px;margin:0;padding:0;font-size:18px}
.count-stepper>span{line-height:24px!important}

/* Restore the original +/- button size. */
.count-stepper,.network-heading .count-stepper,.heading .count-stepper{height:28px;min-height:28px;line-height:28px}
.count-stepper>button{flex:0 0 28px;width:28px;height:28px;min-width:28px;min-height:28px;font-size:20px}
.count-stepper>span{line-height:28px!important}

/* Activation selector and preview follow the caption's intrinsic width. */
#widths .layer-control,#layers>label,.linear-output-control{--activation-width:142px}
#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label{width:max-content!important;max-width:none;white-space:nowrap}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation,#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:var(--activation-width)!important;max-width:100%;justify-self:start;box-sizing:border-box}

/* Center each layer's settings over its network column. */
#widths .layer-control,#layers>label,.linear-output-control{justify-items:center}
#widths .layer-control .layer-caption,#layers>label>.layer-caption{justify-self:center!important;text-align:center!important;width:max-content;max-width:100%}
#widths .layer-control>.count-stepper,#widths .layer-control>label>.count-stepper,#layers>label>.count-stepper{justify-self:center!important;justify-content:center}
#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label{justify-self:center!important;text-align:center!important}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation,#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{justify-self:center!important;margin-left:0!important;margin-right:0!important}
.linear-output-control>#taskMode{justify-self:center!important}

/* Hidden-layer count belongs to the subtitle; +/- occupies the line below. */
.network-heading>label:has(#depth),.heading>label:has(#depth){display:none!important}
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex;align-items:center;justify-content:center;gap:6px;line-height:18px}
.hidden-subtitle>.depth-count{font-size:11px;color:#6b7c82;line-height:18px}
.network-heading h2>.depth-stepper,.heading h2>.depth-stepper{display:flex!important;justify-content:center;margin-top:4px;grid-row:auto}

/* Subtitle and its count use the same typography and baseline. */
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex!important;align-items:baseline!important;justify-content:center;gap:5px;font-size:12px!important;line-height:18px!important}
.network-heading .hidden-subtitle>.depth-count,.heading .hidden-subtitle>.depth-count{display:inline!important;font:inherit!important;line-height:inherit!important;color:inherit!important;margin:0!important;padding:0!important;vertical-align:baseline}

/* Keep depth buttons above the neuron controls, with distinct hit areas. */
.network-heading,.network-area>.heading{position:relative;z-index:2;min-height:78px}
.network-heading .depth-stepper,.heading .depth-stepper{position:relative;z-index:3;pointer-events:auto}
.network-controls-scroll{position:relative;z-index:1}

/* Tighter horizontal spacing between neighboring layer settings. */
#widths,#layers{column-gap:4px!important}
.network-heading,.network-area>.heading{column-gap:4px!important}

/* Minimal separation between adjacent layer settings. */
#widths,#layers{column-gap:2px!important}
.network-heading,.network-area>.heading{column-gap:2px!important}

/* Activation select and half-height preview share one row equally. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:repeat(2,calc(var(--activation-width,142px) / 2));grid-template-rows:18px 28px 16px 29px;justify-content:center;column-gap:0;row-gap:3px!important}
#widths .layer-control .layer-caption,#layers>label>.layer-caption,#widths .layer-control .count-stepper,#layers>label>.count-stepper,#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label,.linear-output-control>.output-caption,.linear-output-control>#taskMode{grid-column:1 / -1!important}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation{grid-column:1!important;grid-row:4!important;width:100%!important;min-width:0;max-width:100%;height:29px!important;min-height:29px!important;font-size:11px;padding-left:3px!important;padding-right:2px!important}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{grid-column:2!important;grid-row:4!important;width:100%!important;height:29px!important;max-width:100%;margin:0!important;align-self:center}

/* Square activation preview; selector takes the remaining caption width. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 29px)) 29px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:29px!important;height:29px!important}

/* 24px square activation preview, with remaining width for the selector. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 24px)) 24px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:24px!important;height:24px!important}

/* Match the activation preview to the adjacent 29px-high select. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 29px)) 29px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:29px!important;height:29px!important}

/* Feature toggles are the network's input nodes; no duplicate feature column. */
.explorer>.features{display:none!important}
.explorer{grid-template-columns:minmax(400px,1.5fr) minmax(330px,1fr)!important}
.explorer>.network-area,.explorer>.output{grid-column:auto!important}
#network [data-input-feature]{cursor:pointer;outline:none}
#network [data-input-feature]:focus-visible{filter:drop-shadow(0 0 3px #c77732)}
@media(max-width:1150px){.explorer{grid-template-columns:minmax(0,1fr)!important}.explorer>.network-area,.explorer>.output{grid-column:1!important;width:100%}}

/* Hover preview must not add layout height or selection frames. */
.output{position:relative}
.output #finalOutput{position:absolute;right:0;top:0;z-index:3;margin:0}
#network rect[data-node]{stroke:none!important;filter:none!important}
#network [data-node]>rect{stroke:none!important;fill:transparent!important}
@media(hover:hover) and (pointer:fine){.output #finalOutput{display:none!important}}

/* One-dimensional output uses the same rows as the two-dimensional output. */
#widths>.linear-output-control{position:relative;grid-template-rows:18px 28px 16px 29px}
#widths>.linear-output-control>#taskMode{grid-column:1 / -1!important;grid-row:1 / 3!important;align-self:start;transform:none;height:28px!important;min-height:28px!important;width:100%;padding:2px 5px;font-size:11px}
#widths>.linear-output-control>.output-combination{grid-column:1 / -1;grid-row:2;align-self:end;justify-self:center;padding:0;line-height:16px;font-size:11px;color:#526d78;white-space:nowrap}
#widths>.linear-output-control>.activation-label{grid-row:3!important}
#widths>.linear-output-control>.fixed-activation,#widths>.linear-output-control>.linear-activation{grid-row:4!important}
.workspace{position:relative}
.workspace #finalOutput{position:absolute;right:0;top:0;z-index:3;margin:0}
@media(hover:hover) and (pointer:fine){.workspace #finalOutput{display:none!important}}

/* Matching control slots in the 1D and 2D output panels. */
.output-controls>.output-training{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.output-controls .training-readouts{min-height:39px;justify-content:center}
.output-controls .training-readouts .stats{min-height:0;display:flex;gap:3px;font-size:11px;line-height:18px}
.output .point-modes{display:grid;grid-template-columns:minmax(90px,1.5fr) minmax(75px,1fr) minmax(75px,1fr) 56px minmax(92px,1fr);gap:6px;align-items:center;margin:0!important}
.output .point-modes>.point-role{grid-column:1;min-width:0;width:100%}
.output .point-modes>#modeAdd{grid-column:2}
.output .point-modes>#modeOrange,.output .point-modes>.point-mode-placeholder{grid-column:3}
.output .point-modes>#modeDelete{grid-column:4}
.output .point-modes>.point-count-group{grid-column:5;min-width:0;font-size:11px}
.output .point-modes>button,.output .point-role select{height:44px;min-height:44px;width:100%;padding:4px;font-size:12px;white-space:nowrap}
.output .point-modes>.point-mode-placeholder{height:44px;visibility:hidden}
@media(max-width:650px){.output .point-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.output .point-modes>.point-role{grid-column:1 / -1}.output .point-modes>#modeAdd{grid-column:1}.output .point-modes>#modeOrange,.output .point-modes>.point-mode-placeholder{grid-column:2}.output .point-modes>#modeDelete{grid-column:3}.output .point-modes>.point-count-group{grid-column:1 / -1}.output .point-modes>button,.output .point-role select{font-size:14px}}

/* Seed precedes the training action buttons. */
.output-controls>.output-training>label:has(#seed){order:-1!important}

/* Seed input follows the intrinsic width of its caption. */
.output-controls>.output-training>label:has(#seed){display:inline-grid!important;grid-template-columns:max-content;width:max-content!important;min-width:0!important;gap:3px}
.output-controls>.output-training>label:has(#seed)>.parameter-title{white-space:nowrap}
.output-controls .output-training #seed{width:0!important;min-width:100%!important;max-width:100%;box-sizing:border-box}

/* Fit the complete network diagram to the same mobile width as OUTPUT. */
@media(max-width:1150px){
.explorer>.network-area,.explorer>.output,.explorer>.workspace{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch}
.network-area>.scroll,.network-area>.network-scroll{width:100%;min-width:0;max-width:100%;overflow-x:hidden}
.network-area .network-inner{width:100%!important;min-width:0!important;max-width:100%!important}
.network-area #network{display:block;width:100%!important;min-width:0!important;max-width:100%!important;height:auto}
}

/* Shared 2D reference layout for both dimensions. */

main{max-width:1800px;padding:38px 30px}.explorer{grid-template-columns:145px 105px minmax(360px,1.4fr) minmax(350px,1fr);gap:30px;align-items:start}.explorer h2{font-size:14px;font-weight:500;letter-spacing:.04em;min-height:46px;margin:0}.explorer h2 span{display:block;font-size:12px;color:#6b7c82;letter-spacing:0;margin-top:6px}.features p,aside p,.output p{font-size:12px;color:#657b85}.features>p:first-of-type{height:35px;margin-top:0}.features label{display:grid;grid-template-columns:18px 1fr;align-items:center;gap:4px;margin:12px 0}.features input{width:16px;min-height:16px}.features canvas{grid-column:2;width:42px;height:42px;border:1px solid #8198a3;box-shadow:1px 2px 3px #c5ccce}.features label:has(input:not(:checked)) canvas{opacity:.3}aside label{margin:12px 0}aside button{width:100%;font-size:12px}.heading{display:flex;justify-content:space-between;gap:8px;min-height:81px}.heading label{width:70px}.heading h2{padding-top:0}#layers{display:grid;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));gap:8px;min-height:92px;margin:0;align-items:start}#layers label{font-size:11px;min-width:0}#layers span{font-size:11px;text-align:center;padding-top:8px;color:#637b83}#layers select{font-size:11px;padding:4px 2px;min-height:30px}.network-inner{min-width:480px}#network{width:100%;min-width:0;display:block}.scroll{overflow:auto;max-width:100%}canvas{max-width:100%;height:auto}#map{width:100%;touch-action:none;border:0;display:block}#loss{min-height:35px;margin:0 0 12px}.output .toolbar{margin-top:14px}.output .toolbar button{font-size:12px}#saved{display:block;margin-top:12px;width:150px}#saved:not([data-kept]){display:none}#nodeMap{display:block;margin-top:12px}#nodeInfo{font-size:12px}.inspector label{max-width:220px}main>section{margin:28px 0;border-top:1px solid #ccd5d8;padding-top:20px}#questions article{margin:18px 0}footer{margin-top:24px}.topbar input{width:100%}#trace{white-space:pre-wrap}button{min-height:40px}@media(max-width:1150px){.explorer{grid-template-columns:130px 95px minmax(0,1fr);gap:22px}.output{grid-column:1/-1;width:100%;max-width:600px;justify-self:center}.output h2{min-height:40px}}@media(max-width:650px){main{padding:24px 14px}.explorer{grid-template-columns:minmax(0,1fr)}.features #features{display:flex;flex-wrap:wrap;gap:12px}.features label{width:78px}.features>p:first-of-type{height:auto}.features canvas{width:48px;height:48px}.output{grid-column:auto}.heading{min-height:64px}.topbar{padding:12px;gap:10px}header span{width:100%;margin:0}#layers{gap:5px}}

.advanced{margin:0 0 24px;border-bottom:1px solid #d7dfe1;padding-bottom:10px}.advanced p,.advanced output{font-size:12px}.advanced [hidden]{display:none!important}

/* Keep native checkbox semantics and keyboard input; show state through the whole tile. */
.features label{position:relative;display:flex;flex-direction:column;justify-content:center;gap:7px;padding:9px 5px;border:1px solid transparent;border-radius:5px;cursor:pointer;text-align:center;transition:background .15s,border-color .15s,opacity .15s}
.features label input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;opacity:0;overflow:hidden}
.features label:has(input:checked){background:#e1eef1;border-color:#347d92;color:#163f4e;opacity:1}
.features label:has(input:not(:checked)){background:#eceff0;border-color:#d6dddf;color:#79868b;opacity:.55}
.features label:has(input:focus-visible){outline:3px solid #c77732;outline-offset:3px}
.features label svg,.features label canvas{opacity:1!important;flex:none;max-width:100%}
.features label:hover{border-color:#347d92}
@media(prefers-reduced-motion:reduce){.features label{transition:none}}

@media(max-width:650px){html,body{max-width:100%;overflow-x:clip}main,.explorer,.network-area,.output,.workspace{min-width:0}.topbar{align-items:stretch}.topbar button{min-height:48px;flex:1}.topbar label{min-width:125px;flex:1}input,select,button{font-size:16px;min-height:44px}input[type=range]{min-height:44px}.features label{min-width:78px;min-height:96px}.advanced .toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.advanced label{width:100%}form{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch}form label{min-width:0}form button{width:100%}header{gap:10px}.network-scroll,.scroll,.table-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}summary{min-height:48px;display:flex;align-items:center}#trace{overflow-wrap:anywhere}canvas{max-width:100%}}

/* Data controls occupy their own upper row. */
.explorer>aside{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 18px;border-bottom:1px solid #d4dfe2;padding-bottom:18px;margin-bottom:4px}
.explorer>aside h2{min-height:0;margin:0;align-self:center;min-width:65px}
.explorer>aside label{margin:0;min-width:130px;flex:0 1 170px}
.explorer>aside button{width:auto;min-height:44px;align-self:flex-end}
.explorer>aside p{margin:0;flex:1 1 220px;font-size:12px}
.explorer>aside .datasets{display:flex;flex-direction:row;flex-wrap:wrap;align-self:flex-end}
.explorer>aside output{align-self:center}
.explorer{grid-template-columns:100px minmax(400px,1.5fr) minmax(330px,1fr)}
.explorer>.workspace,.explorer>.output{grid-column:auto;max-width:none;justify-self:stretch}
@media(max-width:1000px){.explorer{grid-template-columns:95px minmax(0,1fr)}.explorer>.workspace,.explorer>.output{grid-column:1/-1;max-width:700px;justify-self:center}}
@media(max-width:650px){.explorer{grid-template-columns:minmax(0,1fr)}.explorer>aside{gap:12px;align-items:stretch}.explorer>aside h2{width:100%}.explorer>aside label{flex:1 1 135px;min-width:0}.explorer>aside button{flex:1 1 130px}.explorer>aside p{flex-basis:100%}.explorer>aside .datasets{width:100%}.explorer>.workspace,.explorer>.output{grid-column:auto;width:100%}}

.activity-intro{margin:0 0 20px;padding:10px 0 16px;border-bottom:1px solid #d4dfe2;font-size:15px;line-height:1.8;color:#244b59;max-width:100%;overflow-wrap:anywhere}

#network image[role=button]{cursor:pointer}#network image[role=button]:focus{outline:3px solid #c77732}#nodeMap{width:360px;max-width:100%}#activationMap{width:360px;max-width:100%}.inspector{scroll-margin-top:20px}

.layer-activation{width:100%;height:58px;display:block;border:1px solid #d3dfe3;margin-bottom:5px}#layers{min-height:156px}#layers label{display:flex;flex-direction:column}.output>label{margin:0 0 10px}#nodeInfo{min-height:36px}

.point-modes{margin:10px 0}.point-modes button{min-height:44px}.point-modes button[aria-pressed=true]{background:#1c6b58;color:white;border-color:#1c6b58}#modeDelete[aria-pressed=true]{background:#a43e32;border-color:#a43e32}

.probe-ticks{display:flex;justify-content:space-between;width:100%;font-size:12px;color:#526d78;font-variant-numeric:tabular-nums}#probeValue,#probeInfo{font-size:15px;font-weight:600;color:#7e316f;line-height:1.7;padding:8px 0;overflow-wrap:anywhere}

[hidden]{display:none!important}

.plot-bars{display:flex;gap:14px;margin:10px 0 4px}.plot-bars label{flex:1;min-width:0;font-size:12px;gap:0}.plot-bars input[type=range]{width:100%;min-height:32px;margin:0;padding:0;accent-color:#23765b}.plot-bars .probe-ticks{font-size:11px}@media(max-width:650px){.plot-bars input[type=range]{min-height:44px}}

.topbar label:has(.parameter-pair){width:205px}.parameter-pair{display:grid;grid-template-columns:minmax(80px,1fr) 76px;gap:8px;align-items:center}.parameter-pair input[type=range]{padding:0;accent-color:#23765b}.parameter-toggle{display:flex;align-items:center;gap:7px;font-size:12px}.parameter-toggle input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0}.topbar input:disabled{opacity:.45}@media(max-width:650px){.topbar label:has(.parameter-pair){flex:1 1 100%}.parameter-toggle{min-height:32px}}

.vector-row{display:flex;align-items:center;gap:22px;overflow-x:auto;padding:16px 3px;max-width:100%}.vector-heading{font-size:13px;text-align:center;margin-bottom:12px;white-space:nowrap}.vector-bracket{border-left:2px solid #385c68;border-right:2px solid #385c68;position:relative;padding:4px 14px;min-width:145px;background:linear-gradient(#385c68,#385c68) left top/10px 2px no-repeat,linear-gradient(#385c68,#385c68) right top/10px 2px no-repeat,linear-gradient(#385c68,#385c68) left bottom/10px 2px no-repeat,linear-gradient(#385c68,#385c68) right bottom/10px 2px no-repeat}.vector-item{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 0}.vector-item small{font-size:11px;color:#667d86;white-space:nowrap}.vector-item span{font-size:18px;font-variant-numeric:tabular-nums}.vector-arrow{font-size:16px;white-space:nowrap}.vector-source{font-size:12px;line-height:1.8;overflow-wrap:anywhere}

#vectorView{min-width:0;max-width:100%}#vectorView .math-block{text-align:left}#vectorView p{font-size:13px;line-height:1.8;overflow-wrap:anywhere}

/* Match the one-dimensional header and training controls. */
.topbar{gap:18px;padding:18px 28px}.topbar #run{border-radius:3px;width:auto;height:auto;font-size:inherit}header{font-size:15px;background:white}header span{margin-left:0}.topbar>span:last-child{font-size:12px;color:#637b83}@media(max-width:620px){.topbar{padding:12px;gap:10px}}

.point-modes{align-items:end}.new-point-kind{min-width:160px;font-size:12px}.new-point-kind select{min-height:44px}@media(max-width:650px){.new-point-kind{flex:1 1 100%}}

.point-modes .add-blue{color:#247ba0}.point-modes .add-orange{color:#cb7133}.point-modes .add-blue[aria-pressed=true]{background:#247ba0;color:white}.point-modes .add-orange[aria-pressed=true]{background:#cb7133;color:white}

.point-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px;color:#425f6b;margin:8px 0}

.advanced>.sgd-definition,.advanced>.mse-definition{margin-left:24px;max-width:calc(100% - 24px)}

.point-modes{align-items:center}.point-role{margin:0;min-width:145px}.point-role select{height:44px;min-height:44px;font-size:15px;width:100%}.point-modes button{min-height:44px}

.activation-label{font-size:11px!important;text-align:left!important;padding-top:0!important;color:#183f4c!important}.linear-output-control{display:flex;flex-direction:column;gap:10px;align-self:start;font-size:11px}.linear-activation{display:block;width:100%;height:58px;margin-top:100px}.layer-activation{margin-top:4px;margin-bottom:0}#layers,#widths{min-height:190px}

.linear-output-control .linear-activation{margin-top:4px}.fixed-activation{display:block;padding:7px;border:1px solid #bdc9cc;border-radius:3px;font-size:12px;background:white}

/* Shared row positions for hidden-layer and output activation controls. */
#widths .layer-control,#layers>label,.linear-output-control{display:grid!important;grid-template-rows:18px 38px 30px 38px 58px;row-gap:7px!important;align-content:start;padding-top:0!important}
#widths .layer-control>label:first-of-type{display:contents}
#widths .layer-control>label:first-of-type>.width{grid-row:2}
#widths .layer-control>label:nth-of-type(2){display:contents}
#widths .layer-control>label:nth-of-type(2)>.activation{grid-row:4}
#widths .layer-control>.layer-activation{grid-row:5}
#layers>label>select:first-of-type{grid-row:2}
#layers>label>.activation-label{grid-row:3}
#layers>label>select:nth-of-type(2){grid-row:4}
#layers>label>.layer-activation{grid-row:5}
.linear-output-control>.activation-label{grid-row:3}
.linear-output-control>.fixed-activation{grid-row:4;box-sizing:border-box}
.linear-output-control>.linear-activation{grid-row:5;margin:0!important}
.layer-activation{margin:0!important;height:58px}
#widths,#layers{min-height:225px}

.advanced>summary{font-size:12px;color:#839197;font-weight:400;min-height:36px;padding:6px 0}.advanced{border-bottom-color:#e4e9eb;margin-bottom:16px}.advanced>summary:hover,.advanced>summary:focus-visible{color:#385c68}@media(max-width:650px){.advanced>summary{min-height:44px}}

main:has(>.advanced){padding-top:0}.advanced:not([open]){margin-top:0;margin-bottom:0;padding-bottom:0}.advanced:not([open])>summary{min-height:28px;padding:3px 0}.advanced[open]{margin-top:0}@media(max-width:650px){main:has(>.advanced){padding-top:0}.advanced:not([open])>summary{min-height:36px;padding:2px 0}}

/* Align optimizer parameter titles, inputs, and switches. */
.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){display:grid;grid-template-rows:20px 40px 24px;row-gap:5px;align-self:center;align-content:start}
.topbar>label:has(#batch)>.parameter-pair,.topbar>label:has(#momentum)>.parameter-pair{grid-row:2}
.topbar>label:has(#batch)>.parameter-toggle,.topbar>label:has(#decay)>.parameter-toggle{grid-row:3}
.topbar>label:has(#decay)>#decay{grid-row:2}
.topbar .parameter-pair input{height:40px;min-height:40px}
.topbar .parameter-toggle{min-height:24px;align-self:center}
@media(max-width:650px){.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){grid-template-rows:20px 44px 32px}.topbar .parameter-pair input{height:44px;min-height:44px}.topbar .parameter-toggle{min-height:32px}}

.explorer>aside{align-items:flex-end}.explorer>aside>label select,.explorer>aside>button{height:44px;min-height:44px;box-sizing:border-box}.explorer>aside>label{gap:7px;margin:0}.explorer>aside>h2{align-self:center}

/* All training parameter controls share title/input/switch rows. */
.topbar>label:has(#rate),.topbar>label:has(#seed),.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){display:grid;grid-template-rows:24px 40px 24px;row-gap:5px;align-self:center;align-content:start}
.topbar>label:has(#rate),.topbar>label:has(#seed){width:150px}
.topbar #rate,.topbar #seed,.topbar #decay{grid-row:2;height:40px;min-height:40px}
.topbar .parameter-pair{grid-row:2}
.topbar .parameter-toggle{grid-row:3}
@media(max-width:650px){.topbar>label:has(#rate),.topbar>label:has(#seed),.topbar>label:has(#batch),.topbar>label:has(#momentum),.topbar>label:has(#decay){grid-template-rows:24px 44px 32px}.topbar #rate,.topbar #seed,.topbar #decay{height:44px;min-height:44px}}

/* Explicit title elements prevent anonymous text from shifting grid tracks. */
.topbar>label.training-parameter{display:grid;grid-template-rows:36px 44px 28px;gap:6px;align-self:center;align-items:center;align-content:start;margin:0;min-width:150px}
.training-parameter>.parameter-title{grid-row:1;align-self:end;line-height:18px;font-size:13px}
.training-parameter>input,.training-parameter>select,.training-parameter>.parameter-pair{grid-row:2;align-self:stretch;height:44px;min-height:44px}
.training-parameter>.parameter-toggle{grid-row:3;align-self:start;margin:0;min-height:24px}
.training-parameter .parameter-pair input{height:44px;min-height:44px;margin:0;box-sizing:border-box}
.training-parameter>.parameter-pair{align-items:center}
@media(max-width:650px){.topbar>label.training-parameter{grid-template-rows:36px 44px 32px;align-self:stretch}.training-parameter>.parameter-toggle{min-height:32px}}

.noise-control{min-width:160px}.noise-control output{font-size:12px}.noise-control input[type=range]{padding:0;accent-color:#23765b;height:44px}

.output-training{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0 16px}.output-training button{min-height:44px}.output-training #steps{font-size:13px;font-variant-numeric:tabular-nums;flex:1 0 100%;padding:4px 0}.output-training #run{background:#183f4c;color:white;border-color:#183f4c}@media(max-width:650px){.output-training button{flex:1}}

body>header,.topbar{justify-content:center}body>header span{margin-left:0}@media(max-width:650px){body>header{text-align:center}body>header span{text-align:center}}

.point-modes #pointCount{font-size:13px;white-space:nowrap;align-self:center;margin-left:4px}

#widths,#layers{min-height:0;margin-bottom:0}.network-area>.plot-bars{margin:0 0 10px}.network-area .network-scroll,.network-area>.scroll{margin-top:0;padding-top:0}

/* Reduce whitespace without scaling nodes, fonts, controls, or output plots. */
#widths .layer-control,#layers>label,.linear-output-control{row-gap:4px!important}.network-heading,.heading{margin-bottom:0}.network-area>.plot-bars{margin-top:0;margin-bottom:4px}.plot-bars label{gap:0}.node-calculation,.wide{margin-top:18px}.output-training{margin-top:8px;margin-bottom:10px}.point-legend{margin:5px 0}.point-modes{margin:6px 0}

/* Tight activation caption row; preserve control and graph sizes. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-rows:18px 38px 16px 38px 58px;row-gap:3px!important}.activation-label{line-height:16px!important;align-self:end!important;margin:0!important;padding:0!important}#widths .layer-control .activation-label{line-height:16px}#layers,#widths{padding-bottom:0}

/* Keep the bottom of the input bars aligned with the image action row. */
.explorer>.network-area,.explorer>.output,.explorer>.workspace{align-self:stretch}
.explorer>.network-area{display:flex;flex-direction:column;min-width:0}
.network-area>.plot-bars{margin-top:auto;margin-bottom:0;padding-bottom:0}
.network-area>.plot-bars .probe-ticks{line-height:14px}
.output #snapshot:empty,.workspace #snapshot:empty{display:none}
.output>.toolbar:last-of-type,.workspace>.toolbar:last-of-type{margin-bottom:0}
@media(max-width:1000px){.network-area>.plot-bars{margin-top:0}}

/* Center the unchanged network drawing in available vertical space. */
.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:auto;margin-bottom:auto;flex-shrink:0}
.explorer>.network-area>.plot-bars{margin-top:0;flex-shrink:0}
@media(max-width:1000px){.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:0;margin-bottom:0}}

.linear-output-control>#taskMode{grid-row:1 / 3;align-self:start;min-height:38px;height:38px;width:100%;font-size:12px;padding:4px}

@media(min-width:1151px){.features,.network-area{position:relative}.features #features,.network-area>.scroll,.network-area>.network-scroll{will-change:transform}.explorer{padding-bottom:12px}}

.network-controls-scroll{max-width:100%;overflow-x:auto;flex-shrink:0}#widths,#layers{min-width:480px}.network-heading,.heading{min-height:46px;margin:0 0 8px}.explorer>.network-area>.network-controls-scroll{transform:none;position:relative;z-index:1}.explorer>.network-area>.scroll,.explorer>.network-area>.network-scroll{margin-top:0;margin-bottom:0}

/* Bars stay at the image-download action baseline, independently of drawing offsets. */
.explorer>.network-area>.plot-bars{margin-top:auto;margin-bottom:0;transform:none;position:relative;z-index:2;flex-shrink:0}.explorer>.network-area{align-self:stretch}.output>.toolbar:last-of-type,.workspace>.toolbar:last-of-type{margin-bottom:0;padding-bottom:0}@media(max-width:1000px){.explorer>.network-area>.plot-bars{margin-top:8px}}

#widths>.input-caption,#layers>.input-caption,.linear-output-control>.output-caption{padding:0!important;margin:0;line-height:18px;font-size:11px;text-align:left!important;align-self:start;grid-row:1}.linear-output-control>#taskMode{grid-row:2;min-height:38px;height:38px;align-self:stretch}.linear-output-control>.output-caption{color:#183f4c}

.coordinate-tooltip{position:fixed;z-index:1000;pointer-events:none;background:#183f4c;color:white;border-radius:4px;padding:6px 9px;font:13px system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}

.output-controls{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;align-items:start;margin:10px 0 12px}
.output-controls .output-training{margin:0;align-content:start}
.output-controls .topbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:0;border:0;background:transparent;min-width:0}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;grid-template-rows:32px 38px 24px!important;gap:3px!important;margin:0!important}
.output-controls .parameter-title{font-size:11px!important;line-height:16px!important}
.output-controls .parameter-pair{grid-template-columns:minmax(40px,1fr) 56px;gap:5px}
.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{font-size:12px;min-height:38px!important;height:38px!important;padding:4px;max-width:100%}
.output-controls .parameter-toggle{font-size:11px;min-height:24px!important}
main>.advanced:last-child{margin-top:20px;border-top:1px solid #e4e9eb;border-bottom:0}
@media(min-width:1500px){.output-controls{grid-template-columns:180px minmax(0,1fr)}.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.output-controls{grid-template-columns:minmax(0,1fr)}.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}.output-controls .topbar>label.training-parameter{grid-template-rows:32px 44px 28px!important}.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{min-height:44px!important;height:44px!important;font-size:16px}.output-controls .output-training button{flex:1}}


@media(min-width:651px){
.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,175px));gap:4px 8px;justify-content:start}
.output-controls .topbar>label.training-parameter{grid-template-rows:26px 30px 20px!important;gap:2px!important;width:100%!important}
.output-controls .topbar input:not([type=checkbox]),.output-controls .topbar select{min-height:30px!important;height:30px!important;font-size:12px;padding:3px 5px}
.output-controls .parameter-title{font-size:11px!important;line-height:14px!important}
.output-controls .parameter-toggle{min-height:20px!important;font-size:10px}
.output-controls .parameter-pair{grid-template-columns:minmax(35px,1fr) 49px}
}

@media(min-width:651px){
.output-controls .topbar{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;justify-content:stretch;gap:5px 9px}
.output-controls .topbar>label.training-parameter{min-width:0!important;max-width:none}
.output-controls .topbar>label:has(#rate){grid-column:1;grid-row:1}
.output-controls .topbar>label:has(#seed){grid-column:2;grid-row:1}
.output-controls .topbar>label:has(#decay){grid-column:3;grid-row:1}
.output-controls .topbar>label:has(#batch){grid-column:1 / 3;grid-row:2}
.output-controls .topbar>label:has(#momentum){grid-column:3;grid-row:2}
.output-controls .parameter-pair{grid-template-columns:minmax(25px,1fr) 49px}
}

#outputTitle{min-height:0!important;height:auto;line-height:20px;margin:0 0 5px!important}
.output-controls{margin-top:0;margin-bottom:8px;align-items:start}
@media(min-width:651px){
.output-controls .topbar>label.training-parameter{grid-template-rows:18px 30px 20px!important;gap:2px!important;align-self:start!important}
.output-controls .training-parameter>.parameter-title{align-self:start!important;line-height:16px!important;margin:0;padding:0}
.output-controls .topbar{align-items:start;row-gap:6px}
.output-controls .topbar #rate,.output-controls .topbar #seed,.output-controls .topbar #decay{height:30px;min-height:30px;align-self:stretch;margin:0}
.output-controls .output-training{margin-top:0}
}

.point-count-group{display:flex;flex-direction:column;gap:3px;align-self:center}.point-count-group .point-legend{margin:0;font-size:11px;gap:12px}.point-count-group #pointCount{margin:0}

.output-controls .output-training #loss,.output-controls .output-training .stats{flex:1 0 100%;margin:4px 0 0;min-height:0;font-size:11px;line-height:1.6;gap:3px}
.output-controls .topbar{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;justify-content:flex-start;align-items:flex-start;padding-bottom:4px}
.output-controls .topbar>label.training-parameter{flex:0 0 128px!important;width:128px!important;min-width:128px!important;grid-column:auto!important;grid-row:auto!important}
.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum){flex-basis:165px!important;width:165px!important;min-width:165px!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 150px!important;width:150px!important;min-width:150px!important}}

/* Parameters own the full first row; training actions follow below. */
.output-controls{display:flex;flex-direction:column;align-items:stretch;gap:9px}
.output-controls>.topbar{order:0;width:100%;max-width:100%}
.output-controls>.output-training{order:1;display:flex;flex-wrap:wrap;align-items:center;width:100%;margin:0;gap:8px}
.output-controls .output-training #steps{flex:0 1 auto;padding:0;margin-left:3px}
.output-controls .output-training #loss,.output-controls .output-training .stats{flex:1 0 100%;margin-top:0}
@media(max-width:650px){.output-controls>.output-training button{flex:0 1 auto}.output-controls .output-training #steps{flex:1 0 100%}}

.output-controls .output-training #steps{order:1;flex:1 0 100%;margin:0;padding:0;line-height:20px}
.output-controls .output-training #loss,.output-controls .output-training .stats{order:2;flex:1 0 100%;margin:0;line-height:18px}
.output-controls .output-training{row-gap:5px}

.output-controls .topbar>label:has(#seed){order:10}

/* Let the caption determine each parameter column's intrinsic width. */
.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;width:max-content!important;min-width:0!important;max-width:none;grid-template-columns:minmax(0,max-content)}
.output-controls .training-parameter>.parameter-title{white-space:nowrap}
.output-controls .training-parameter>input:not([type=checkbox]),.output-controls .training-parameter>select,.output-controls .training-parameter>.parameter-pair{width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box}
.output-controls .training-parameter>.parameter-pair{grid-template-columns:minmax(0,1fr) 43px}
.output-controls .parameter-pair>input{min-width:0!important;width:100%!important;box-sizing:border-box}

.output-controls .training-parameter>input:not([type=checkbox]),.output-controls .training-parameter>select,.output-controls .training-parameter>.parameter-pair{contain:inline-size}

.output-controls>.output-training{align-items:center;column-gap:10px}
.training-readouts{display:flex;flex-direction:column;gap:3px;min-width:0}
.output-controls .training-readouts #steps,.output-controls .training-readouts #loss,.output-controls .training-readouts .stats{order:0;flex:0 1 auto;margin:0;padding:0;line-height:18px;font-size:11px}
.output-training>label:has(#seed){display:flex;flex-direction:column;gap:3px;min-width:0;width:115px;margin:0;order:0}
.output-training>label:has(#seed)>.parameter-title{font-size:11px;line-height:16px}
.output-training #seed{width:115px;height:32px;min-height:32px;font-size:12px;padding:4px 6px;contain:none}
@media(max-width:650px){.output-training #seed{height:44px;min-height:44px;font-size:16px}.training-readouts{flex:0 1 auto}}

/* Fill the parameter row; keep checkboxes inline with their controls. */
.output-controls .topbar{width:100%;gap:10px}
.output-controls .topbar>label.training-parameter{flex:1 1 0!important;width:auto!important;min-width:0!important;grid-template-columns:minmax(0,1fr);grid-template-rows:30px 38px!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) auto}
.output-controls .topbar .parameter-title{grid-column:1 / -1}
.output-controls .topbar .parameter-toggle{grid-row:2!important;grid-column:2;align-self:center;margin-left:5px;white-space:nowrap;min-height:24px!important}
.output-controls .topbar .parameter-pair,.output-controls .topbar #decay{grid-row:2;grid-column:1}
.output-controls .topbar .parameter-pair{grid-template-columns:minmax(24px,1fr) 42px}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 180px!important;grid-template-rows:30px 44px!important}.output-controls .topbar>label.training-parameter:has(#batch){flex-basis:245px!important}}

.output-controls .topbar>label:has(#rate){order:0}.output-controls .topbar>label:has(#decay){order:1}.output-controls .topbar>label:has(#momentum){order:2}.output-controls .topbar>label:has(#batch){order:3}

/* Content-sized columns, not equal fractions. */
.output-controls .topbar{justify-content:flex-start;gap:12px}
.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;width:max-content!important;min-width:0!important;grid-template-columns:max-content;grid-template-rows:30px 38px!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(70px,max-content) auto}
.output-controls .topbar>label:has(#rate){width:140px!important}
.output-controls .topbar>label:has(#decay){width:170px!important;grid-template-columns:minmax(75px,1fr) auto}
.output-controls .topbar>label:has(#momentum){width:160px!important}
.output-controls .topbar>label:has(#batch){width:220px!important;grid-template-columns:minmax(90px,1fr) auto}
@media(max-width:650px){.output-controls .topbar>label.training-parameter{flex:0 0 auto!important;grid-template-rows:30px 44px!important}}

.output-controls .topbar{column-gap:5px;row-gap:4px}.output-controls .topbar .parameter-toggle{margin-left:2px}.output-controls .parameter-pair{gap:3px}

/* Four equal parameter cells across exactly the output chart width. */
.output-controls{width:100%;min-width:0}
.output-controls .topbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:100%;column-gap:6px;row-gap:4px;box-sizing:border-box;padding-left:0;padding-right:0;overflow-x:visible}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;max-width:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:30px 38px!important;grid-column:auto!important;grid-row:auto!important}
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) auto}
.output-controls .topbar .parameter-title{white-space:normal;overflow-wrap:anywhere}
.output-controls .topbar .parameter-pair{grid-template-columns:minmax(0,1fr) 40px}
.output-controls .topbar .parameter-toggle{font-size:10px;margin-left:2px;gap:3px;white-space:nowrap}
@media(max-width:650px){.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.output-controls .topbar>label.training-parameter{grid-template-rows:30px 44px!important}}

/* Checkbox and caption are contained inside each quarter of the chart. */
.output-controls .topbar>label.training-parameter:has(.parameter-toggle){grid-template-columns:minmax(0,1fr) minmax(0,max-content);column-gap:3px;box-sizing:border-box}
.output-controls .topbar .parameter-toggle{max-width:76px;min-width:0;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;margin-left:0;line-height:13px}
.output-controls .topbar .parameter-toggle input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-width:16px;min-height:16px;padding:0}
.output-controls .topbar .parameter-pair,.output-controls .topbar .parameter-pair>input{min-width:0!important;max-width:100%;box-sizing:border-box}

.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,92px) auto;justify-content:start;column-gap:3px}
.output-controls .topbar #decay{width:92px!important;max-width:100%}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,138px)!important;grid-template-columns:minmax(0,1fr) 40px;justify-self:start}
@media(max-width:650px){.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,150px)!important}}

.output-controls .topbar .parameter-toggle{font-size:12px!important;line-height:18px;display:flex;align-items:center;align-self:center;gap:4px;min-height:30px!important;white-space:nowrap;max-width:none}
.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,82px) auto;align-items:center}
.output-controls .topbar #decay{width:82px!important}
.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-template-columns:minmax(0,1fr) 44px}
.output-controls .topbar #batch{width:44px!important;padding-left:3px;padding-right:3px;font-variant-numeric:tabular-nums}

.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:min(100%,112px)!important;grid-template-columns:minmax(0,1fr) 40px}

.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-template-columns:minmax(0,1fr) 34px;gap:3px}.output-controls .topbar #batch{width:34px!important;padding-left:2px;padding-right:1px;font-size:11px;appearance:textfield;-moz-appearance:textfield}.output-controls #batch::-webkit-inner-spin-button,.output-controls #batch::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Native range tracks must not inherit text-field frames or padding. */
.output-controls .topbar input[type=range]{border:0!important;background:transparent!important;padding:0!important;margin:0!important;border-radius:0!important;box-shadow:none!important;outline-offset:2px;min-width:0!important;width:100%!important}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 36px;gap:3px}
.output-controls .topbar>label:has(#batch)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 28px;gap:2px}
.output-controls .topbar #batch{width:28px!important;padding:1px!important;font-size:10px!important;text-align:center;letter-spacing:-.2px}
.output-controls .topbar #momentum{width:36px!important;min-width:0!important;padding:2px!important}

/* Each parameter keeps exactly one quarter; momentum reserves inline breathing room. */
.output-controls .topbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:6px}
.output-controls .topbar>label.training-parameter{width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box}
.output-controls .topbar>label:has(#momentum)>.parameter-pair{width:calc(100% - 40px)!important;min-width:64px!important;max-width:100%;grid-template-columns:minmax(0,1fr) 36px;justify-self:start}
@media(max-width:650px){.output-controls .topbar{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Batch controls must fit within the final quarter of the chart. */
.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:minmax(0,1fr) 42px!important;column-gap:2px!important;width:100%!important;min-width:0!important;max-width:100%!important}
.output-controls .topbar>label:has(#batch)>.parameter-pair{grid-column:1!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) 28px!important;gap:2px!important;contain:inline-size}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:2!important;width:42px;max-width:42px;min-width:0;gap:2px;margin:0;padding:0;font-size:11px!important;justify-content:flex-start}
.output-controls .topbar>label:has(#batch)>.parameter-toggle input{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;flex:0 0 14px}
.output-controls .topbar #batchBar{min-width:0!important;width:100%!important;max-width:100%!important}
.output-controls .topbar #batch{min-width:0!important;width:28px!important;max-width:28px!important;box-sizing:border-box}

/* Checkboxes get their own lower line within a shared parameter height. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:28px 30px 20px!important;row-gap:2px!important;align-content:start}
.output-controls .topbar .training-parameter>.parameter-title{grid-column:1!important;grid-row:1!important}
.output-controls .topbar .training-parameter>.parameter-pair,.output-controls .topbar .training-parameter>#decay,.output-controls .topbar .training-parameter>#rate{grid-column:1!important;grid-row:2!important}
.output-controls .topbar .training-parameter>.parameter-toggle,.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:1!important;grid-row:3!important;min-height:20px!important;height:20px;margin:0!important;padding:0;align-self:start;justify-self:start;width:auto;max-width:100%}
.output-controls .topbar>label:has(#batch)>.parameter-pair{width:100%!important;grid-template-columns:minmax(0,1fr) 28px!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:30px 44px 24px!important}.output-controls .topbar .training-parameter>.parameter-toggle{height:24px;min-height:24px!important}}

/* Range alone on row 2; numeric value and toggle share row 3. */
.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:28px 30px 20px!important;column-gap:3px!important}
.output-controls .topbar>label:has(#momentum)>.parameter-title,.output-controls .topbar>label:has(#batch)>.parameter-title{grid-column:1 / -1!important}
.output-controls .topbar>label:has(#momentum)>.parameter-pair,.output-controls .topbar>label:has(#batch)>.parameter-pair{display:contents!important;contain:none!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{grid-column:1 / -1!important;grid-row:2!important;width:100%!important;height:30px!important;min-height:30px!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{grid-column:1!important;grid-row:3!important;justify-self:start;align-self:start;height:20px!important;min-height:20px!important;padding:0 2px!important;font-size:11px!important}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-column:2!important;grid-row:3!important;align-self:center;justify-self:start}
@media(max-width:650px){.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch){grid-template-rows:30px 44px 32px!important}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:44px!important;min-height:44px!important}.output-controls .topbar #momentum,.output-controls .topbar #batch{height:32px!important;min-height:32px!important;font-size:16px!important}}

/* Use Learning rate's 60px footprint: caption, slim range, aligned value row. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:18px 12px 30px!important;row-gap:0!important;align-content:start}
.output-controls .topbar .training-parameter>.parameter-title{grid-row:1!important;grid-column:1 / -1!important;align-self:start!important;line-height:16px!important}
.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{grid-row:3!important;height:30px!important;min-height:30px!important;align-self:stretch!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{grid-row:2!important;grid-column:1 / -1!important;height:12px!important;min-height:12px!important;align-self:center;margin:0!important}
.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,1fr) auto!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle,.output-controls .topbar>label:has(#batch)>.parameter-toggle{grid-row:3!important;grid-column:2!important;height:30px!important;min-height:30px!important;align-self:center!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(.parameter-toggle),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#decay){grid-template-rows:20px 24px 44px!important}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:24px!important;min-height:24px!important}.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{height:44px!important;min-height:44px!important}}

.output-controls .topbar>label.training-parameter:has(#decay){grid-template-columns:minmax(0,82px) auto!important;justify-content:start;column-gap:3px!important}
.output-controls .topbar #decay{grid-column:1!important;width:82px!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{grid-column:2!important;grid-row:3!important;margin:0!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{width:calc(100% - 20px)!important;justify-self:center}
.output-controls .topbar #momentum,.output-controls .topbar #batch,.output-controls .topbar #decay{text-align:center!important}
.output-controls .topbar>label.training-parameter:has(#momentum){grid-template-columns:minmax(0,1fr)!important}
.output-controls .topbar #momentum{justify-self:center;grid-column:1!important}
.output-controls .topbar>label.training-parameter:has(#batch){grid-template-columns:28px auto!important;justify-content:center}
.output-controls .topbar>label:has(#batch)>.parameter-title{justify-self:start}

/* Keep every control inside its own quarter; remove conflicting internal grid tracks. */
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){display:block!important;position:relative;height:64px!important;min-height:64px;min-width:0!important;width:100%!important;max-width:100%!important;overflow:hidden;box-sizing:border-box;padding:0!important;margin:0!important}
.output-controls .topbar .training-parameter>.parameter-title{display:block;height:18px;line-height:16px!important;width:100%;white-space:nowrap;font-size:11px!important}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{position:absolute;left:8px;top:18px;width:calc(100% - 16px)!important;height:12px!important;min-height:12px!important;max-width:calc(100% - 16px)!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{position:absolute;left:50%;top:32px;transform:translateX(-50%);text-align:center!important;height:30px!important;min-height:30px!important;margin:0!important}
.output-controls .topbar #momentum{width:36px!important}
.output-controls .topbar #batch{width:28px!important}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{position:absolute;left:calc(50% + 18px);top:32px;max-width:calc(50% - 18px);height:30px!important;min-height:30px!important;width:auto;margin:0!important}
.output-controls .topbar #rate{position:absolute;left:0;top:32px;width:100%!important;height:30px!important;min-height:30px!important}
.output-controls .topbar #decay{position:absolute;left:0;top:32px;width:calc(100% - 49px)!important;max-width:82px;height:30px!important;min-height:30px!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{position:absolute;left:min(85px,calc(100% - 46px));top:32px;height:30px!important;min-height:30px!important;max-width:46px;margin:0!important}
@media(max-width:650px){.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:88px!important;min-height:88px}.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{height:24px!important;min-height:24px!important}.output-controls .topbar #rate,.output-controls .topbar #decay,.output-controls .topbar #momentum,.output-controls .topbar #batch{top:44px;height:44px!important;min-height:44px!important}.output-controls .topbar>label:has(#batch)>.parameter-toggle,.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:44px;height:44px!important;min-height:44px!important}}

/* Sliders start at the column edge; only their numeric fields are centered. */
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{left:0;width:100%!important;max-width:100%!important;justify-self:start}
.output-controls .topbar #momentum{width:58px!important;max-width:58px!important;padding:2px 4px!important;font-size:12px!important;text-align:center!important}
.output-controls .topbar #rate,.output-controls .topbar #decay{top:18px}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:18px}
@media(max-width:650px){.output-controls .topbar #rate,.output-controls .topbar #decay{top:20px}.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:20px}.output-controls .topbar #momentum{font-size:16px!important}}

@media(min-width:651px){
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:52px!important;min-height:52px!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{height:20px!important;min-height:20px!important;top:30px;padding-top:0!important;padding-bottom:0!important;line-height:18px}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{top:30px;height:20px!important;min-height:20px!important}
.output-controls .topbar{padding-bottom:0;row-gap:0}
.output-controls{gap:4px;margin-bottom:4px}
}

.network-heading,.heading{display:grid!important;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));gap:8px;align-items:start}
.network-input-heading{grid-column:1;align-self:start;font-size:12px;color:#526d78;padding-top:2px}
.network-heading>h2,.heading>h2{grid-column:2;grid-row:1;min-height:0;font-size:13px;margin:0;white-space:nowrap}
.network-heading>h2>span,.heading>h2>span{display:block;font-size:11px;margin-top:3px}
.network-heading>label,.heading>label{grid-column:-2 / -1;grid-row:1;justify-self:end;width:70px}

/* Compact layer selectors; keep activation previews aligned across columns. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-rows:18px 28px 16px 28px 58px;row-gap:3px!important}
#widths .layer-control select,#layers>label>select{height:28px!important;min-height:28px!important;padding:2px 5px!important;box-sizing:border-box}
.linear-output-control>.fixed-activation{height:28px;min-height:28px;padding:3px 7px;box-sizing:border-box}

/* Equal parameter footprints: 18px title + 32px controls (12px slider + 20px value). */
@media(min-width:651px){
.output-controls .topbar>label.training-parameter,.output-controls .topbar>label.training-parameter:has(#momentum),.output-controls .topbar>label.training-parameter:has(#batch),.output-controls .topbar>label.training-parameter:has(#decay){height:50px!important;min-height:50px!important}
.output-controls .topbar #rate,.output-controls .topbar #decay{top:18px!important;height:32px!important;min-height:32px!important;box-sizing:border-box;margin:0!important}
.output-controls .topbar>label:has(#decay)>.parameter-toggle{top:18px!important;height:32px!important;min-height:32px!important;display:flex;align-items:center}
.output-controls .topbar #momentumBar,.output-controls .topbar #batchBar{top:18px!important;height:12px!important;min-height:12px!important;margin:0!important}
.output-controls .topbar #momentum,.output-controls .topbar #batch{top:30px!important;height:20px!important;min-height:20px!important;box-sizing:border-box}
.output-controls .topbar{align-items:start!important;margin:0!important;padding-top:0!important;padding-bottom:0!important}
}

/* Column headings share a baseline above the actual network columns. */
.network-input-heading,.network-output-heading{grid-row:1;align-self:start;padding:0;line-height:18px;font-size:13px;color:#183f4c;text-align:center}
.network-input-heading{grid-column:1}
.network-output-heading{grid-column:-2 / -1}
.network-heading>h2,.heading>h2{line-height:18px;padding:0 56px 0 0;min-height:0}
.network-heading>label,.heading>label{grid-column:2;grid-row:1;justify-self:end;align-self:start;width:48px;font-size:0;line-height:0;margin:0}
.network-heading>label>select,.heading>label>select{display:block;width:48px;height:24px!important;min-height:24px!important;padding:1px 4px!important;font-size:12px;line-height:20px;margin:0}
.linear-output-control>#taskMode{height:28px!important;min-height:28px!important;padding:2px 5px!important;box-sizing:border-box}

/* Bilingual headings, centered over input, hidden-layer group, and output. */
.network-input-heading,.network-output-heading{font-size:13px;font-weight:400;line-height:18px;text-align:center}
.network-input-heading>span,.network-output-heading>span{display:block;font-size:11px;color:#6b7c82;margin-top:3px;line-height:16px}
.network-heading>h2,.heading>h2{grid-column:2 / -2;text-align:center;padding:0 56px;line-height:18px;font-size:13px;white-space:nowrap}
.network-heading>label,.heading>label{grid-column:-3 / -2}

/* Equal vertical breathing room around the training action row. */
.output-controls{gap:0;margin-bottom:0}
.output-controls>.output-training{padding:8px 0;margin:0;box-sizing:border-box;align-items:center}

/* Keep the depth selector directly beside the centered hidden-layer title. */
.network-heading>label,.heading>label{grid-column:2 / -2;justify-self:center;transform:translateX(96px);margin:0}

/* Slightly larger depth selector beside HIDDEN LAYERS. */
.network-heading>label,.heading>label{width:60px;transform:translateX(102px)}
.network-heading>label>select,.heading>label>select{width:60px;height:30px!important;min-height:30px!important;font-size:14px;line-height:24px;padding:2px 6px!important}

/* Align the depth selector with the Chinese subtitle rather than the English title. */
.network-heading>label,.heading>label{align-self:start;margin-top:14px}

/* Depth label and select share the subtitle's center line. */
.network-heading>label,.heading>label{display:flex;align-items:center;gap:5px;width:auto;height:24px;line-height:16px;font-size:11px;margin-top:17px;transform:translateX(94px)}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:inline;white-space:nowrap;font-size:11px;line-height:16px;color:#6b7c82}
.network-heading>label>select,.heading>label>select{width:54px;height:24px!important;min-height:24px!important;font-size:12px;line-height:20px;padding:1px 5px!important;margin:0}

/* One actual row: 隱藏層 · 層數 · selector. */
.network-heading>h2,.heading>h2{padding:0;text-align:center}
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex;justify-content:center;align-items:center;gap:8px;min-height:24px;margin-top:3px;line-height:16px}
.hidden-subtitle>label{display:inline-flex;align-items:center;gap:5px;width:auto;margin:0;padding:0;transform:none;font-size:11px;line-height:16px}
.hidden-subtitle .depth-caption{font-size:11px;white-space:nowrap}
.hidden-subtitle #depth{display:inline-block;width:54px;height:24px!important;min-height:24px!important;padding:1px 5px!important;margin:0;font-size:12px;line-height:20px}

/* Independent hidden-layer heading, with depth control to its right. */
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:block;min-height:16px;line-height:16px}
.network-heading>label,.heading>label{grid-column:2 / -2;grid-row:1;justify-self:center;display:flex;align-items:center;gap:5px;width:auto;height:24px;margin:17px 0 0;padding:0;transform:translateX(105px);font-size:11px;line-height:16px}
.network-heading>label>select,.heading>label>select{width:62px;height:24px!important;min-height:24px!important;font-size:12px;line-height:20px;padding:1px 5px!important;margin:0}

/* The action row owns its spacing; the point toolbar adds no extra top gap. */
.output .point-modes,.output .toolbar.point-modes{margin-top:0!important;margin-bottom:0!important}
.output-controls>.output-training{padding-top:8px!important;padding-bottom:8px!important;margin-top:0!important;margin-bottom:0!important}

/* Override inherited column label layout: caption and select stay on one line. */
.network-heading>label:has(#depth),.heading>label:has(#depth){display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:5px!important;width:max-content!important;white-space:nowrap;line-height:24px!important}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:inline-block!important;flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important;line-height:24px!important}
.network-heading>label>#depth,.heading>label>#depth{display:inline-block!important;flex:0 0 62px!important;width:62px!important;margin:0!important}

/* Lower layer captions slightly without moving the selectors. */
#widths .layer-caption,#layers>label>.layer-caption{position:relative;top:4px;grid-row:1;text-align:left;padding:0;line-height:18px;align-self:start}

/* Increment/decrement controls for layer and neuron counts. */
.count-stepper{display:flex!important;flex-direction:row;align-items:center;gap:6px;grid-row:2;padding:0!important;line-height:28px;white-space:nowrap}
.count-stepper>button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:28px;min-width:28px;padding:0;border:0;border-radius:50%;background:#e9edef;color:#183f4c;font-size:20px;line-height:1;cursor:pointer}
.count-stepper>button:disabled{opacity:.35;cursor:default}
.count-stepper>span{font-size:12px!important;padding:0!important;color:#183f4c!important;line-height:28px}
.network-heading>label:has(#depth),.heading>label:has(#depth){width:max-content!important;transform:translateX(130px)}
.network-heading>label>.depth-caption,.heading>label>.depth-caption{display:none!important}
.network-heading #depth,.heading #depth,#widths select.width[hidden],#layers>label>select[hidden]{display:none!important}
.network-heading .count-stepper,.heading .count-stepper{height:28px}

/* Put neuron count after the layer caption; use smaller +/- circles. */
.layer-caption>.layer-count{display:inline!important;margin-left:8px;padding:0!important;font-size:11px!important;line-height:18px!important;color:#526d78!important}
.count-stepper{gap:5px;line-height:24px}
.count-stepper>button{width:24px;height:24px;min-width:24px;min-height:24px;font-size:18px}

/* Shared sizing for every layer/neuron count module. */
.count-stepper,.network-heading .count-stepper,.heading .count-stepper{height:24px;min-height:24px;gap:5px;align-items:center;line-height:24px}
.count-stepper>button{box-sizing:border-box;flex:0 0 24px;width:24px;height:24px;min-width:24px;min-height:24px;margin:0;padding:0;font-size:18px}
.count-stepper>span{line-height:24px!important}

/* Restore the original +/- button size. */
.count-stepper,.network-heading .count-stepper,.heading .count-stepper{height:28px;min-height:28px;line-height:28px}
.count-stepper>button{flex:0 0 28px;width:28px;height:28px;min-width:28px;min-height:28px;font-size:20px}
.count-stepper>span{line-height:28px!important}

/* Activation selector and preview follow the caption's intrinsic width. */
#widths .layer-control,#layers>label,.linear-output-control{--activation-width:142px}
#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label{width:max-content!important;max-width:none;white-space:nowrap}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation,#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:var(--activation-width)!important;max-width:100%;justify-self:start;box-sizing:border-box}

/* Center each layer's settings over its network column. */
#widths .layer-control,#layers>label,.linear-output-control{justify-items:center}
#widths .layer-control .layer-caption,#layers>label>.layer-caption{justify-self:center!important;text-align:center!important;width:max-content;max-width:100%}
#widths .layer-control>.count-stepper,#widths .layer-control>label>.count-stepper,#layers>label>.count-stepper{justify-self:center!important;justify-content:center}
#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label{justify-self:center!important;text-align:center!important}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation,#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{justify-self:center!important;margin-left:0!important;margin-right:0!important}
.linear-output-control>#taskMode{justify-self:center!important}

/* Hidden-layer count belongs to the subtitle; +/- occupies the line below. */
.network-heading>label:has(#depth),.heading>label:has(#depth){display:none!important}
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex;align-items:center;justify-content:center;gap:6px;line-height:18px}
.hidden-subtitle>.depth-count{font-size:11px;color:#6b7c82;line-height:18px}
.network-heading h2>.depth-stepper,.heading h2>.depth-stepper{display:flex!important;justify-content:center;margin-top:4px;grid-row:auto}

/* Subtitle and its count use the same typography and baseline. */
.network-heading>h2>.hidden-subtitle,.heading>h2>.hidden-subtitle{display:flex!important;align-items:baseline!important;justify-content:center;gap:5px;font-size:12px!important;line-height:18px!important}
.network-heading .hidden-subtitle>.depth-count,.heading .hidden-subtitle>.depth-count{display:inline!important;font:inherit!important;line-height:inherit!important;color:inherit!important;margin:0!important;padding:0!important;vertical-align:baseline}

/* Keep depth buttons above the neuron controls, with distinct hit areas. */
.network-heading,.network-area>.heading{position:relative;z-index:2;min-height:78px}
.network-heading .depth-stepper,.heading .depth-stepper{position:relative;z-index:3;pointer-events:auto}
.network-controls-scroll{position:relative;z-index:1}

/* Tighter horizontal spacing between neighboring layer settings. */
#widths,#layers{column-gap:4px!important}
.network-heading,.network-area>.heading{column-gap:4px!important}

/* Minimal separation between adjacent layer settings. */
#widths,#layers{column-gap:2px!important}
.network-heading,.network-area>.heading{column-gap:2px!important}

#colorLegend{display:grid;grid-template-columns:minmax(0,1fr);width:180px;max-width:100%;gap:3px;margin:8px 0;font-size:11px;color:#526d78}
.colorbar-scale{display:block;height:10px;background:linear-gradient(to right,rgb(206,113,45),rgb(250,250,250),rgb(39,123,158));border-radius:2px}
.colorbar-ticks{display:flex;justify-content:space-between;line-height:16px}
.colorbar-title{line-height:16px}

.colorbar-title:empty{display:none}

/* Colorbar spans the same output width as the square prediction map. */
.output #colorLegend{width:100%;max-width:100%;box-sizing:border-box}

/* Attach the color scale directly to the map. */
.output #colorLegend{margin-top:0!important;row-gap:0}
.output #map{margin-bottom:0!important}

/* Keep export actions close to the colorbar ticks. */
.output #colorLegend{margin-bottom:0!important}
.output #colorLegend+.toolbar{margin-top:2px!important}
.output #colorLegend .colorbar-ticks{line-height:14px}

/* Activation select and half-height preview share one row equally. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:repeat(2,calc(var(--activation-width,142px) / 2));grid-template-rows:18px 28px 16px 29px;justify-content:center;column-gap:0;row-gap:3px!important}
#widths .layer-control .layer-caption,#layers>label>.layer-caption,#widths .layer-control .count-stepper,#layers>label>.count-stepper,#widths .layer-control .activation-label,#layers>label>.activation-label,.linear-output-control>.activation-label,.linear-output-control>.output-caption,.linear-output-control>#taskMode{grid-column:1 / -1!important}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),.linear-output-control>.fixed-activation{grid-column:1!important;grid-row:4!important;width:100%!important;min-width:0;max-width:100%;height:29px!important;min-height:29px!important;font-size:11px;padding-left:3px!important;padding-right:2px!important}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{grid-column:2!important;grid-row:4!important;width:100%!important;height:29px!important;max-width:100%;margin:0!important;align-self:center}

/* Square activation preview; selector takes the remaining caption width. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 29px)) 29px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:29px!important;height:29px!important}

/* 24px square activation preview, with remaining width for the selector. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 24px)) 24px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:24px!important;height:24px!important}

/* Match the activation preview to the adjacent 29px-high select. */
#widths .layer-control,#layers>label,.linear-output-control{grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 29px)) 29px}
#widths .layer-activation,#layers .layer-activation,.linear-output-control>.linear-activation{width:29px!important;height:29px!important}

/* Feature toggles are the network's input nodes; no duplicate feature column. */
.explorer>.features{display:none!important}
.explorer{grid-template-columns:minmax(400px,1.5fr) minmax(330px,1fr)!important}
.explorer>.network-area,.explorer>.output{grid-column:auto!important}
#network [data-input-feature]{cursor:pointer;outline:none}
#network [data-input-feature]:focus-visible{filter:drop-shadow(0 0 3px #c77732)}
@media(max-width:1150px){.explorer{grid-template-columns:minmax(0,1fr)!important}.explorer>.network-area,.explorer>.output{grid-column:1!important;width:100%}}

/* Hover preview must not add layout height or selection frames. */
.output{position:relative}
.output #finalOutput{position:absolute;right:0;top:0;z-index:3;margin:0}
#network rect[data-node]{stroke:none!important;filter:none!important}
#network [data-node]>rect{stroke:none!important;fill:transparent!important}
@media(hover:hover) and (pointer:fine){.output #finalOutput{display:none!important}}

/* Short task labels fit the output column; pairing is shown on its own line. */
#layers>.linear-output-control{grid-template-rows:18px 28px 18px 16px 29px}
#layers>.linear-output-control>.output-combination{grid-column:1 / -1;grid-row:3;justify-self:center;font-size:11px;line-height:18px;padding:0;color:#526d78;white-space:nowrap}
#layers>.linear-output-control>.activation-label{grid-row:4!important}
#layers>.linear-output-control>.fixed-activation,#layers>.linear-output-control>.linear-activation{grid-row:5!important}

/* Keep output activation controls on the same rows as hidden layers. */
#layers>.linear-output-control{grid-template-rows:18px 28px 16px 29px;position:relative}
#layers>.linear-output-control>.output-combination{position:absolute;bottom:calc(100% + 2px);left:50%;transform:translateX(-50%);margin:0;line-height:16px;grid-row:auto}
#layers>.linear-output-control>.activation-label{grid-row:3!important}
#layers>.linear-output-control>.fixed-activation,#layers>.linear-output-control>.linear-activation{grid-row:4!important}

/* Task select above its pairing; activation controls keep their shared rows. */
#layers>.linear-output-control>#taskMode{grid-row:1 / 3!important;align-self:start;transform:translateY(-10px)}
#layers>.linear-output-control>.output-combination{position:static;grid-column:1 / -1;grid-row:2;align-self:end;justify-self:center;transform:none;margin:0;padding:0;line-height:16px}

/* Lower the task selector slightly without moving its pairing. */
#layers>.linear-output-control>#taskMode{transform:translateY(0)}

/* Matching control slots in the 1D and 2D output panels. */
.output-controls>.output-training{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.output-controls .training-readouts{min-height:39px;justify-content:center}
.output-controls .training-readouts .stats{min-height:0;display:flex;gap:3px;font-size:11px;line-height:18px}
.output .point-modes{display:grid;grid-template-columns:minmax(90px,1.5fr) minmax(75px,1fr) minmax(75px,1fr) 56px minmax(92px,1fr);gap:6px;align-items:center;margin:0!important}
.output .point-modes>.point-role{grid-column:1;min-width:0;width:100%}
.output .point-modes>#modeAdd{grid-column:2}
.output .point-modes>#modeOrange,.output .point-modes>.point-mode-placeholder{grid-column:3}
.output .point-modes>#modeDelete{grid-column:4}
.output .point-modes>.point-count-group{grid-column:5;min-width:0;font-size:11px}
.output .point-modes>button,.output .point-role select{height:44px;min-height:44px;width:100%;padding:4px;font-size:12px;white-space:nowrap}
.output .point-modes>.point-mode-placeholder{height:44px;visibility:hidden}
@media(max-width:650px){.output .point-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.output .point-modes>.point-role{grid-column:1 / -1}.output .point-modes>#modeAdd{grid-column:1}.output .point-modes>#modeOrange,.output .point-modes>.point-mode-placeholder{grid-column:2}.output .point-modes>#modeDelete{grid-column:3}.output .point-modes>.point-count-group{grid-column:1 / -1}.output .point-modes>button,.output .point-role select{font-size:14px}}

/* Seed precedes the training action buttons. */
.output-controls>.output-training>label:has(#seed){order:-1!important}

/* Seed input follows the intrinsic width of its caption. */
.output-controls>.output-training>label:has(#seed){display:inline-grid!important;grid-template-columns:max-content;width:max-content!important;min-width:0!important;gap:3px}
.output-controls>.output-training>label:has(#seed)>.parameter-title{white-space:nowrap}
.output-controls .output-training #seed{width:0!important;min-width:100%!important;max-width:100%;box-sizing:border-box}

/* Fit the complete network diagram to the same mobile width as OUTPUT. */
@media(max-width:1150px){
.explorer>.network-area,.explorer>.output,.explorer>.workspace{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch}
.network-area>.scroll,.network-area>.network-scroll{width:100%;min-width:0;max-width:100%;overflow-x:hidden}
.network-area .network-inner{width:100%!important;min-width:0!important;max-width:100%!important}
.network-area #network{display:block;width:100%!important;min-width:0!important;max-width:100%!important;height:auto}
}

/* Final shared geometry: both pages use the 2D reference layout. */
#widths,#layers{min-height:225px;margin:0;padding:0;align-items:start}
#widths .layer-control{padding-left:0!important;padding-right:0!important}
.network-heading,.network-area>.heading{align-items:start;min-height:78px}
.network-heading>h2,.heading>h2{font-weight:500;letter-spacing:.04em}
#widths .layer-control .layer-caption,#layers>label>.layer-caption{font-size:11px!important;line-height:18px}
.workspace.output,.explorer>.output{max-width:none;justify-self:stretch}
.output-scale-placeholder{height:24px;margin:0;padding:0}
.output .output-scale-placeholder+.toolbar{margin-top:2px!important}
.network-area>.plot-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

/* A single 1D input slider spans the complete network width. */
.network-area>.plot-bars:has(#probe){grid-template-columns:minmax(0,1fr)}
.network-area>.plot-bars #probe{width:100%;min-width:0;box-sizing:border-box}

/* One explicit output-settings grid for both dimensions; no per-page offsets. */
#widths>.linear-output-control,#layers>.linear-output-control{display:grid!important;position:relative;grid-template-columns:minmax(0,calc(var(--activation-width,142px) - 29px)) 29px;grid-template-rows:18px 28px 16px 29px;gap:3px 0!important;justify-content:center;justify-items:stretch;align-items:center;padding:0!important;margin:0!important}
#widths>.linear-output-control>#taskMode,#layers>.linear-output-control>#taskMode{position:static!important;grid-column:1 / -1!important;grid-row:1 / 3!important;justify-self:stretch!important;align-self:start!important;transform:none!important;width:100%!important;height:28px!important;min-height:28px!important;margin:0!important;padding:2px 5px!important;box-sizing:border-box;font-size:11px!important}
#widths>.linear-output-control>.output-combination,#layers>.linear-output-control>.output-combination{position:static!important;grid-column:1 / -1!important;grid-row:2!important;align-self:end!important;justify-self:stretch!important;transform:none!important;text-align:center!important;line-height:16px!important;font-size:11px!important;width:100%;margin:0!important;padding:0!important}
#widths>.linear-output-control>.activation-label,#layers>.linear-output-control>.activation-label{grid-column:1 / -1!important;grid-row:3!important;justify-self:stretch!important;align-self:center!important;text-align:center!important;line-height:16px!important;width:100%!important;margin:0!important;padding:0!important}
#widths>.linear-output-control>.fixed-activation,#layers>.linear-output-control>.fixed-activation{grid-column:1!important;grid-row:4!important;display:flex!important;align-items:center!important;justify-content:flex-start;width:100%!important;height:29px!important;min-height:29px!important;font-size:11px!important;line-height:normal!important;padding:2px 5px!important;margin:0!important;box-sizing:border-box}
#widths>.linear-output-control>.linear-activation,#layers>.linear-output-control>.linear-activation{grid-column:2!important;grid-row:4!important;align-self:center!important;justify-self:stretch!important;display:block;width:29px!important;height:29px!important;margin:0!important;padding:0!important}

#widths>.linear-output-control>.activation-label,#layers>.linear-output-control>.activation-label{width:max-content!important;justify-self:center!important;white-space:nowrap}

/* Network and OUTPUT occupy equal-width columns for every depth. */
@media(min-width:1151px){.explorer{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.explorer>.network-area,.explorer>.output{min-width:0!important;width:100%!important;max-width:none!important}
.network-area .network-inner{min-width:0!important;width:100%!important;max-width:100%!important}
.network-area #network{min-width:0!important;width:100%!important;max-width:100%!important}
/* Center the group heading between input/output even when there are zero hidden columns. */
.network-heading,.network-area>.heading{position:relative;grid-template-rows:auto;min-height:78px}
.network-heading>h2,.network-area>.heading>h2{position:absolute;left:50%;top:0;transform:translateX(-50%);grid-column:auto!important;grid-row:auto!important;width:max-content;max-width:55%;text-align:center;margin:0!important;padding:0!important}
.network-input-heading{grid-column:1!important;grid-row:1!important}
.network-output-heading{grid-column:-2 / -1!important;grid-row:1!important}

/* Stable centered headings on phones, independent of hidden-layer count. */
@media(max-width:650px){
.network-heading,.network-area>.heading{grid-template-columns:repeat(3,minmax(0,1fr))!important;column-gap:4px!important;min-height:82px;align-items:start}
.network-heading>.network-input-heading,.heading>.network-input-heading{grid-column:1!important;grid-row:1!important;width:100%;text-align:center;font-size:11px;line-height:16px;white-space:normal}
.network-heading>h2,.network-area>.heading>h2{position:static;grid-column:2!important;grid-row:1!important;left:auto;top:auto;transform:none;width:100%;max-width:100%;text-align:center;font-size:11px!important;line-height:16px;white-space:normal}
.network-heading>.network-output-heading,.heading>.network-output-heading{grid-column:3!important;grid-row:1!important;width:100%;text-align:center;font-size:11px;line-height:16px}
.network-heading .depth-stepper,.heading .depth-stepper{justify-content:center}
.network-area,.network-area>.network-scroll,.network-area>.scroll{margin-left:0;margin-right:0;justify-self:stretch}
}

/* Lock layer settings to one row, regardless of implicit grid placement. */
#widths,#layers{display:grid!important;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr))!important;grid-template-rows:auto!important;grid-auto-flow:column!important;align-items:start!important;min-height:0!important}
#widths>.input-caption,#widths>.layer-control,#widths>.linear-output-control,#layers>.input-caption,#layers>label,#layers>.linear-output-control{grid-row:1!important;grid-column:auto!important;min-width:0}
@media(max-width:650px){
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
main{width:100%;max-width:100%;padding-left:14px!important;padding-right:14px!important;box-sizing:border-box}
.explorer{width:100%;min-width:0!important;max-width:100%;grid-template-columns:minmax(0,1fr)!important}
.explorer>.network-area,.explorer>.output{width:calc(100vw - 28px)!important;min-width:0!important;max-width:100%!important;box-sizing:border-box}
.network-area>.scroll,.network-area>.network-scroll,.network-area .network-inner{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box}
.network-area #network{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;overflow:hidden}
.network-controls-scroll{width:100%;min-width:0;overflow-x:auto;overflow-y:hidden}
#widths,#layers{width:max(480px,100%);min-width:480px!important}
}

/* Each requested item gets its own line in layer settings. */
#widths .layer-control,#layers>label,#widths>.linear-output-control,#layers>.linear-output-control{grid-template-columns:var(--activation-width,100px)!important;grid-template-rows:36px 28px 36px 29px 29px!important;row-gap:3px!important;justify-items:center;align-content:start}
#widths .layer-control .layer-caption,#layers>label>.layer-caption{display:flex!important;flex-direction:column;align-items:center;justify-content:center;grid-column:1!important;grid-row:1!important;top:0;line-height:18px!important;height:36px}
#widths .layer-caption>.layer-count,#layers>label>.layer-caption>.layer-count{display:block!important;margin:0!important;padding:0!important;line-height:18px!important}
#widths .layer-control .count-stepper,#layers>label>.count-stepper{grid-column:1!important;grid-row:2!important}
#widths .layer-control .activation-label,#layers>label>.activation-label,#widths>.linear-output-control>.activation-label,#layers>.linear-output-control>.activation-label{grid-column:1!important;grid-row:3!important;display:block!important;text-align:center!important;align-self:center!important;height:36px!important;width:max-content!important;line-height:18px!important;padding:0!important;margin:0!important}
.activation-label>span{display:block!important;white-space:nowrap;line-height:18px!important;font-size:11px!important;padding:0!important;margin:0!important}
#widths .layer-control select.activation,#layers>label>select:nth-of-type(2),#widths>.linear-output-control>.fixed-activation,#layers>.linear-output-control>.fixed-activation{grid-column:1!important;grid-row:4!important;width:100%!important;justify-self:stretch!important}
#widths .layer-activation,#layers .layer-activation,#widths>.linear-output-control>.linear-activation,#layers>.linear-output-control>.linear-activation{grid-column:1!important;grid-row:5!important;width:29px!important;height:29px!important;justify-self:center!important;align-self:start!important}
#widths>.linear-output-control>#taskMode,#layers>.linear-output-control>#taskMode{grid-column:1!important;grid-row:1!important;align-self:center!important}
#widths>.linear-output-control>.output-combination,#layers>.linear-output-control>.output-combination{grid-column:1!important;grid-row:2!important;align-self:center!important}

.network-controls-scroll .activation-label{min-width:80px!important}


/* Equal-width centered batch and momentum numeric fields. */
.output-controls .topbar #batch,.output-controls .topbar #momentum{width:58px!important;min-width:58px!important;max-width:58px!important;left:50%!important;transform:translateX(-50%)!important;text-align:center!important;box-sizing:border-box}
.output-controls .topbar>label:has(#batch)>.parameter-toggle{left:calc(50% + 32px)!important;max-width:calc(50% - 32px)}

/* One coordinate space for mobile headings, controls and network nodes. */
.network-stage-viewport,.network-stage{display:contents}
@media(max-width:650px){
.network-area>.network-stage-viewport{display:block;position:relative;width:100%;min-width:0;max-width:100%;overflow:hidden}
.network-stage-viewport>.network-stage{display:block;width:650px!important;min-width:650px!important;max-width:none!important;transform:scale(var(--network-scale,1));transform-origin:left top}
.network-stage>.network-heading,.network-stage>.heading{display:grid!important;width:650px!important;min-height:90px;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr))!important;column-gap:0!important;margin:0!important;position:relative}
.network-stage .network-input-heading{grid-column:1!important;grid-row:1!important;width:100%;text-align:center}
.network-stage .network-output-heading{grid-column:-2 / -1!important;grid-row:1!important;width:100%;text-align:center}
.network-stage>.network-heading>h2,.network-stage>.heading>h2{position:absolute!important;left:50%!important;top:0!important;transform:translateX(-50%)!important;grid-column:auto!important;grid-row:auto!important;width:max-content!important;max-width:55%!important;white-space:nowrap}
.network-stage>.network-controls-scroll{width:650px!important;min-width:650px!important;max-width:none!important;overflow:visible!important;transform:none!important}
.network-stage #widths,.network-stage #layers{width:650px!important;min-width:650px!important;max-width:650px!important;column-gap:0!important}
.network-stage>.scroll,.network-stage>.network-scroll,.network-stage .network-inner{width:650px!important;min-width:650px!important;max-width:650px!important;overflow:hidden!important;margin:0!important;transform:none!important}
.network-stage #network{width:650px!important;min-width:650px!important;max-width:650px!important;height:auto!important;display:block}
}

.network-stage>.network-heading,.network-stage>.heading{min-height:78px}
@media(max-width:650px){.network-stage>.network-heading,.network-stage>.heading{min-height:90px}}

/* Fixed endpoints at x=45/605 and y=55/395 in the 650x415 drawing. */
.network-stage #widths,.network-stage #layers{position:relative;display:block!important;width:100%!important;min-width:0!important;height:170px!important;min-height:170px!important;box-sizing:border-box;overflow:visible}
#widths>.input-caption,#widths>.layer-control,#widths>.linear-output-control,#layers>.input-caption,#layers>label,#layers>.linear-output-control{position:absolute!important;top:0!important;left:var(--node-x,50%)!important;transform:translateX(-50%)!important;width:80px!important;min-width:0!important;margin:0!important}
.network-stage .network-heading>.network-input-heading,.network-stage .heading>.network-input-heading{position:absolute;top:0;left:6.923076923%;transform:translateX(-50%);width:80px!important;max-width:80px;text-align:center;white-space:normal}
.network-stage .network-heading>.network-output-heading,.network-stage .heading>.network-output-heading{position:absolute;top:0;left:93.076923077%;transform:translateX(-50%);width:80px!important;max-width:80px;text-align:center;white-space:normal}
.network-stage #network{aspect-ratio:650 / 415;height:auto!important}

/* Replace the new-point role menu with Seed; reset is last in the training row. */
.output .point-modes>#role{display:none!important}
.output .point-modes>.point-seed{grid-column:1;display:inline-grid;grid-template-columns:max-content;justify-self:start;align-self:center;width:max-content;min-width:0;max-width:100%;gap:0;margin:0;padding:0}
.output .point-seed>.parameter-title{font-size:11px;line-height:16px;white-space:nowrap}
.output .point-seed #seed{width:0;min-width:100%;max-width:100%;height:28px;min-height:28px;padding:2px 5px;font-size:12px;box-sizing:border-box}
.output-controls>.output-training>#reset{order:10!important;margin-left:auto!important}
@media(max-width:650px){.output .point-modes>.point-seed{grid-column:1 / -1}.output .point-seed #seed{height:32px;min-height:32px;font-size:16px}}

/* Seed belongs with data generation; reset starts the training action row. */
.output-controls>.output-training>#reset{order:-1!important;margin-left:0!important}
.explorer>aside>.data-seed{display:inline-grid;grid-template-columns:max-content;flex:0 0 auto;min-width:0;width:max-content;gap:0;margin:0;align-self:end}
.explorer>aside>.data-seed>.parameter-title{font-size:12px;line-height:18px;white-space:nowrap}
.explorer>aside>.data-seed #seed{width:0;min-width:100%;max-width:100%;height:38px;min-height:38px;font-size:14px;padding:4px 6px;box-sizing:border-box}
.output .point-modes{grid-template-columns:minmax(75px,1fr) minmax(75px,1fr) 56px minmax(92px,1fr)}
.output .point-modes>#modeAdd{grid-column:1}
.output .point-modes>#modeOrange,.output .point-modes>.point-mode-placeholder{grid-column:2}
.output .point-modes>#modeDelete{grid-column:3}
.output .point-modes>.point-count-group{grid-column:4}
@media(max-width:650px){.explorer>aside>.data-seed #seed{height:44px;min-height:44px;font-size:16px}.output .point-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.output .point-modes>.point-count-group{grid-column:1 / -1}}

/* Activation dropdown follows the English caption width; keep the column centered. */
.network-controls-scroll .activation-label>span{width:max-content!important;margin-left:auto!important;margin-right:auto!important}
.network-controls-scroll #widths .layer-control select.activation,.network-controls-scroll #layers>label>select:nth-of-type(2),.network-controls-scroll #widths>.linear-output-control>.fixed-activation,.network-controls-scroll #layers>.linear-output-control>.fixed-activation{width:var(--activation-select-width,55px)!important;min-width:0!important;max-width:100%!important;justify-self:center!important}
/* Bring the point count closer to Delete. */
.output .point-modes>.point-count-group{justify-self:start!important;align-self:center;margin-left:-4px!important;padding-left:0!important;text-align:left}
@media(min-width:651px){.output .point-modes{column-gap:4px}}
@media(max-width:650px){.output .point-modes>.point-count-group{margin-left:0!important;justify-self:start!important}}

/* Identical heading and control footprints when switching dimensions. */
header{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;align-items:center}
header>a,header>strong{display:flex;align-items:center;min-height:40px;line-height:20px;margin:0}
header>a{justify-content:flex-start}header>strong{justify-content:flex-end;text-align:right}
header>span{grid-column:1 / -1;display:block;min-height:20px;line-height:20px;text-align:center;margin:0;width:100%}
.output-controls .training-readouts .stats{display:block!important;margin:0!important;min-height:0!important;line-height:18px;font-size:11px}
.network-stage #widths>.layer-control,.network-stage #layers>label{margin:0!important;padding:0!important;font-size:11px;line-height:18px}
.network-stage #widths .layer-activation,.network-stage #layers .layer-activation{border:1px solid #d3dfe3;box-sizing:border-box}
@media(max-width:650px){header{gap:6px 12px}header>a,header>strong{min-height:40px;font-size:14px;line-height:20px}}

/* Empty status messages do not leave an empty bordered row. */
#status:empty{display:none}

/* Dimension-independent mobile header and output action slots. */
@media(max-width:650px){header>a,header>strong{min-height:60px!important;height:60px;align-items:center;line-height:20px}}
.output>.toolbar:has(#downloadImage){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;align-items:stretch}
.output>.toolbar:has(#downloadImage)>button{width:100%;min-width:0;height:40px;min-height:40px;padding:4px 6px;font-size:12px;line-height:18px;box-sizing:border-box}
@media(max-width:650px){.output>.toolbar:has(#downloadImage)>button{height:44px;min-height:44px;font-size:14px}}
