@font-face{font-family:"Source Code Pro";src:url("./fonts/SourceCodePro-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1c3043;background:#f3f6f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header{max-width:1400px;margin:auto;padding:28px 30px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{font-size:11px;letter-spacing:.16em;color:#56707c;font-weight:700}h1{font-size:27px;letter-spacing:-.025em;margin:6px 0}h1 span{font-weight:400;color:#647987}.version{font-size:12px;border:1px solid #ccd8dd;padding:7px 12px;border-radius:20px;color:#52636c}main{max-width:1400px;margin:auto;padding:0 30px 25px}.notice{background:#eaf1f4;border-left:3px solid #548898;padding:13px 17px;font-size:13px;line-height:1.6;border-radius:3px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:22px 0 12px}.mode,.tools{display:flex;gap:7px}button{font:inherit;font-size:13px;border:1px solid #cbd6dc;background:white;color:#2b4557;border-radius:6px;padding:9px 13px;cursor:pointer;touch-action:manipulation}button:hover{background:#edf3f5}button:disabled{opacity:.45;cursor:default}.mode .selected{background:#213f50;color:white;border-color:#213f50}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #5a99c9;outline-offset:2px}.workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px}.editor-panel,.console-panel{border:1px solid #d4dfe4;border-radius:9px;background:white;overflow:hidden;min-width:0;display:flex;flex-direction:column}.panel-head{padding:13px 17px;background:#fbfcfd;border-bottom:1px solid #e3e9ed;display:flex;align-items:center;justify-content:space-between;gap:10px}h2{font-size:13px;margin:0;font-weight:650}.panel-head span{font-size:11px;color:#728591}#code{resize:vertical;display:block;width:100%;min-height:410px;height:52vh;border:0;padding:20px;font-family:"Source Code Pro","DejaVu Sans Mono",Consolas,monospace;font-size:16px;font-variant-ligatures:none;line-height:1.75;tab-size:2;outline:none;color:#243f55;background:#fff;white-space:pre;overflow:auto}#code:focus{box-shadow:inset 0 0 0 2px #79a7bb}.editor-foot{display:flex;justify-content:space-between;gap:12px;padding:10px 15px;border-top:1px solid #e5ebee;color:#82909a;font-size:10px}#output{font-family:"Source Code Pro","DejaVu Sans Mono",Consolas,monospace;font-size:16px;font-variant-ligatures:none;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;margin:0;padding:20px;flex:1;min-height:260px;max-height:60vh}#input-form{padding:13px 16px;background:#edf6f4;border-top:1px solid #d3e3e0}#input-form label{font-size:12px;color:#2c5f59;display:block;margin-bottom:8px}.input-row{display:flex;gap:7px}input[type=text]{font:inherit;min-width:0;width:100%;padding:9px 10px;border:1px solid #b7cfc9;border-radius:5px}small{display:block;font-size:10px;color:#5b7872;margin-top:7px}#error{padding:12px 16px;font-size:13px;line-height:1.6;background:#fff0ed;color:#923b31;border-top:1px solid #efd5ce;white-space:pre-wrap}.actions{padding:13px 16px;display:flex;gap:9px;border-top:1px solid #e2e9ed}.primary{background:#206a61;border-color:#206a61;color:white}.primary:hover{background:#18574f}details{font-size:12px;color:#5b7180;line-height:1.8;margin-top:20px}summary{cursor:pointer;color:#3e596a}details p{max-width:1000px}footer{margin-top:24px;font-size:11px;color:#7f8f98}a{color:#39717f}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:820px){header{padding:20px 16px}main{padding:0 16px 22px}.workspace{grid-template-columns:1fr}.toolbar{align-items:flex-start;flex-direction:column}#code{height:380px;min-height:280px}.version{white-space:nowrap;font-size:10px}h1{font-size:21px}h1 span{display:block;font-size:17px;margin-top:3px}.editor-foot{font-size:9px}#output{min-height:160px}}

.toolbar{flex-wrap:wrap}.decimal-setting{display:flex;align-items:center;gap:8px;font-size:12px;color:#526c7a}.decimal-setting select{font:inherit;padding:8px;border:1px solid #cbd6dc;border-radius:5px;background:white;color:#243f55}

.tools{flex-wrap:wrap}.output-data{color:#227047}.output-results{color:#816718}

/* Inline console input: override the generic input[type=text] rule. */
#output input.console-input,
#output input.console-input:focus,
#output input.console-input:focus-visible{
 display:inline-block;vertical-align:baseline;box-sizing:content-box;
 min-width:0;max-width:90%;padding:0!important;margin:0!important;
 border:0;border-radius:0;background:transparent;box-shadow:none;
 color:inherit;font:inherit;line-height:inherit;letter-spacing:inherit;word-spacing:normal;text-indent:0;
 outline:0;outline-offset:0;white-space:pre;
 -webkit-appearance:none;appearance:none;
 caret-color:currentColor;
}

/* In-page panel expansion: preserve both panels and the active input node. */
.panel-head-right{display:flex;align-items:center;gap:12px;min-width:0}
.panel-expand{padding:3px 8px;min-width:32px;min-height:30px;line-height:1;font-size:19px;background:transparent;border:1px solid transparent;color:#456376}
.panel-expand:hover,.panel-expand:focus-visible{background:#eaf1f4;border-color:#ccd8dd}
.workspace.panel-code-only,.workspace.panel-output-only{grid-template-columns:minmax(0,1fr)}
.workspace.panel-code-only .console-panel,.workspace.panel-output-only .editor-panel{display:none}
.workspace.panel-code-only #code{height:72vh;min-height:410px}
.workspace.panel-output-only #output{max-height:none;min-height:55vh;height:68vh}
@media(max-width:820px){.workspace.panel-code-only #code{height:68vh;min-height:280px}.workspace.panel-output-only #output{height:65vh;min-height:250px}}

/* Shared editor space: code and input-file tabs. */
.editor-tabs{display:flex;gap:4px;align-items:center}
.editor-tabs button{padding:4px 9px;font-size:13px;border:0;background:transparent;border-radius:4px}
.editor-tabs button.active{background:#e7f0f3;color:#1c4357;font-weight:650}
#input-data{resize:vertical;display:block;width:100%;min-height:410px;height:52vh;border:0;padding:20px;font-family:"Source Code Pro","DejaVu Sans Mono",Consolas,monospace;font-size:16px;line-height:1.75;tab-size:2;outline:none;color:#243f55;background:#fff;white-space:pre;overflow:auto}
#input-data:focus{box-shadow:inset 0 0 0 2px #79a7bb}
#input-data[hidden]{display:none}
.workspace.panel-code-only #input-data{height:72vh;min-height:410px}
@media(max-width:820px){#input-data{height:380px;min-height:280px}.workspace.panel-code-only #input-data{height:68vh;min-height:280px}}

.execution-metrics{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;border-top:1px solid #e2e9ed;color:#526c7a;font-size:12px}.execution-metrics output{font-variant-numeric:tabular-nums;font-weight:650;color:#243f55}

/* Release 1.0: compact interface, optional dark appearance, accessible About dialog. */
.mobile-note{display:none;font-size:12px;background:#fff1d6;color:#70501a;padding:10px 14px;border-radius:5px;margin:10px 0}
#about-dialog{width:min(680px,calc(100vw - 28px));max-height:85vh;border:1px solid #bacbd4;border-radius:10px;padding:0;background:#fff;color:#243f55;box-shadow:0 16px 60px #0004}
#about-dialog::backdrop{background:#12222ab0}.about-top{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:18px 22px;border-bottom:1px solid #d8e2e8}.about-top h2{font-size:19px;line-height:1.35}.about-body{padding:12px 22px 22px;overflow:auto;max-height:calc(85vh - 85px);font-size:14px;line-height:1.65}.about-body h3{font-size:14px;margin-top:20px}.about-body p{margin:10px 0}.about-disclaimer{font-size:12px;color:#627782}.about-body a{overflow-wrap:anywhere}
:root[data-theme=dark]{color-scheme:dark;background:#141c27;color:#d9e6ef}
[data-theme=dark] body{background:#141c27;color:#d9e6ef}
[data-theme=dark] .eyebrow,[data-theme=dark] h1 span,[data-theme=dark] .version,[data-theme=dark] footer,[data-theme=dark] .decimal-setting,[data-theme=dark] .execution-metrics{color:#b1c3d0}
[data-theme=dark] .editor-panel,[data-theme=dark] .console-panel,[data-theme=dark] #about-dialog{background:#1d2936;color:#e4edf4;border-color:#455667}
[data-theme=dark] .panel-head{background:#253344;border-color:#455667}
[data-theme=dark] .panel-head span,[data-theme=dark] .editor-foot{color:#bdcbd5}
[data-theme=dark] #code,[data-theme=dark] #input-data,[data-theme=dark] #output{background:#1d2936;color:#e4edf4}
[data-theme=dark] button,[data-theme=dark] select{background:#2b3a4c;color:#e4edf4;border-color:#53677b}
[data-theme=dark] button:hover{background:#384d63}
[data-theme=dark] .mode .selected,[data-theme=dark] .primary{background:#26796f;color:#fff}
[data-theme=dark] .editor-tabs button.active{background:#36536a;color:#fff}
[data-theme=dark] .execution-metrics,[data-theme=dark] .actions,[data-theme=dark] .editor-foot,[data-theme=dark] .about-top{border-color:#455667}
[data-theme=dark] .execution-metrics output,[data-theme=dark] .about-body{color:#e4edf4}
[data-theme=dark] .about-disclaimer{color:#b6c7d3}
[data-theme=dark] a{color:#92cde7}
[data-theme=dark] #error{background:#482b30;color:#ffd3d3;border-color:#77535a}
[data-theme=dark] .output-data{color:#7bdca4}[data-theme=dark] .output-results{color:#e5ce80}
@media(max-width:560px){.mobile-note{display:block}.tools,.actions{gap:6px}.tools button,.actions button{padding:8px;font-size:12px}header{flex-wrap:wrap}h1{font-size:19px}}

/* 1.0-rc2: syntax colors without replacing the native editable textarea. */
.code-layer{position:relative;min-width:0;flex:0 0 auto}
.code-layer #code{position:relative;z-index:1;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#243f55}
.code-layer #code::selection{background:rgba(72,141,218,.36);-webkit-text-fill-color:transparent}
#code-highlight{position:absolute;inset:0;z-index:0;pointer-events:none;margin:0;padding:20px;overflow:hidden;white-space:pre;font-family:"Source Code Pro","DejaVu Sans Mono",Consolas,monospace;font-size:16px;font-variant-ligatures:none;line-height:1.75;tab-size:2;color:#243f55;background:#fff;box-sizing:border-box}
.syn-keyword{color:#2563eb;font-weight:600}.syn-string{color:#a85b08}.syn-comment{color:#16803c;font-style:italic}
#theme-toggle{display:inline-flex;align-items:center;gap:7px;min-width:105px;justify-content:center;font-weight:600}
#theme-icon{font-size:18px;line-height:1}
[data-theme=dark] #code-highlight{background:#1d2936;color:#e4edf4}
[data-theme=dark] .code-layer #code{background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#e4edf4}
[data-theme=dark] .syn-keyword{color:#93c5fd}[data-theme=dark] .syn-string{color:#f0b65e}[data-theme=dark] .syn-comment{color:#7bdca4}
.workspace.panel-code-only .code-layer #code{height:72vh;min-height:410px}
@media(max-width:820px){.workspace.panel-code-only .code-layer #code{height:68vh;min-height:280px}.code-layer #code{height:380px;min-height:280px}}

/* Release candidate 3: keyword completion and clear emphasis. */
.syn-keyword{font-weight:700}
.completion-list{position:absolute;z-index:12;left:24px;top:55px;min-width:200px;max-width:min(380px,90%);max-height:220px;overflow:auto;background:#fff;color:#243f55;border:1px solid #b8c9d5;border-radius:6px;box-shadow:0 8px 24px #0003;padding:4px;font-family:"Source Code Pro",monospace;font-size:13px}
.completion-list button{display:block;text-align:left;width:100%;padding:5px 9px;background:transparent;border:0;border-radius:3px;font:inherit;color:inherit}
.completion-list button.active,.completion-list button:hover{background:#dbeafe;color:#1d4ed8}
[data-theme=dark] .completion-list{background:#263648;color:#e4edf4;border-color:#60748b}
[data-theme=dark] .completion-list button.active,[data-theme=dark] .completion-list button:hover{background:#36536a;color:#fff}

/* rc5: stronger readable editor typography without changing glyph advances. */
#code-highlight{font-weight:500;text-shadow:0.12px 0 currentColor}
.syn-keyword{font-weight:700;text-shadow:0.3px 0 currentColor,-0.3px 0 currentColor}
.syn-string,.syn-comment{font-weight:500}
#output,#input-data{font-weight:500}

/* 1.0.1: visual-only line numbers, excluded from selection and saved sources. */
.code-layer,.input-layer{position:relative;min-width:0}
.input-layer{flex:0 0 auto}
.line-gutter{position:absolute;z-index:3;left:0;top:0;bottom:0;width:43px;overflow:hidden;pointer-events:none;user-select:none;background:#f2f6f9;border-right:1px solid #dce5eb;color:#788995;font-family:"Source Code Pro","DejaVu Sans Mono",Consolas,monospace;font-size:13px;font-weight:500;line-height:28px;text-align:right;padding:20px 7px 20px 0;white-space:pre;box-sizing:border-box}
.line-gutter .line-numbers{display:block;white-space:pre}
.code-layer #code,.input-layer #input-data{padding-left:55px}
#code-highlight{padding-left:55px}
.output-layer{position:relative;flex:1;min-height:260px;min-width:0;display:flex;overflow:hidden}
.output-layer #output{min-height:0;max-height:none;width:100%;padding-left:55px}
.output-layer .line-gutter{line-height:27.2px}
[data-theme=dark] .line-gutter{background:#263444;color:#9aafbf;border-color:#455667}
.workspace.panel-output-only .output-layer{height:68vh;min-height:55vh}
.workspace.panel-output-only #output{height:100%;min-height:0}
@media(max-width:820px){.output-layer{min-height:160px}.workspace.panel-output-only .output-layer{height:65vh;min-height:250px}}

/* Console lines remain physical lines; long output scrolls horizontally instead of wrapping. */
.output-layer #output{white-space:pre;overflow-wrap:normal;overflow-x:auto}

/* 1.0.1: opt-in input file and clickable breakpoints. */
.input-enabled-label{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#435d6d;white-space:nowrap;cursor:pointer;padding:2px 4px}
.input-enabled-label input{accent-color:#226b65;cursor:pointer}
[data-theme=dark] .input-enabled-label{color:#d4e1ec}
.line-gutter.breakpoint-gutter{pointer-events:auto}
.breakpoint-gutter .line-numbers{display:block}
.breakpoint-gutter .gutter-row{display:block;position:relative;cursor:pointer;height:28px;line-height:28px;outline-offset:-2px}
.breakpoint-gutter .gutter-row:hover{background:#dce9f3}
.breakpoint-gutter .gutter-row.has-breakpoint::before{content:"";position:absolute;left:3px;top:9px;width:10px;height:10px;border-radius:50%;background:#d22e39;box-shadow:0 0 0 1px #fff}
[data-theme=dark] .breakpoint-gutter .gutter-row:hover{background:#395068}

/* 1.0.3: interactive whiteboard layouts */
.workspace{--split:55%;grid-template-columns:minmax(0,var(--split)) 14px minmax(0,1fr);gap:0;align-items:stretch}
.workspace-divider{position:relative;width:14px;min-width:14px;cursor:col-resize;touch-action:none;align-self:stretch;z-index:2;display:flex;align-items:center;justify-content:center}
.workspace-divider::before{content:"";width:4px;height:58px;border-radius:5px;background:#bacbd5}
.workspace-divider:hover::before,.workspace-divider:focus-visible::before{background:#367b9d}
.workspace.layout-vertical{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(220px,var(--split)) 14px minmax(220px,1fr);height:calc(100vh - 265px);min-height:550px}
.workspace.layout-vertical>.editor-panel{grid-column:1;grid-row:1;width:100%;min-width:0}
.workspace.layout-vertical>.workspace-divider{grid-column:1;grid-row:2;width:100%;min-width:0}
.workspace.layout-vertical>.console-panel{grid-column:1;grid-row:3;width:100%;min-width:0}
.workspace.layout-vertical .workspace-divider{width:100%;height:14px;min-height:14px;cursor:row-resize}
.workspace.layout-vertical .workspace-divider::before{width:58px;height:4px}
.workspace.layout-vertical .code-layer,.workspace.layout-vertical .input-layer,.workspace.layout-vertical .output-layer{min-height:0;flex:1}
.workspace.layout-vertical #code,.workspace.layout-vertical #input-data{height:100%;min-height:0;resize:none}
.workspace.layout-vertical #output{min-height:0;max-height:none;height:100%}
.workspace.layout-vertical .console-panel,.workspace.layout-vertical .editor-panel{min-height:0}
.workspace.panel-code-only,.workspace.panel-output-only{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;height:auto}
.workspace.panel-code-only .workspace-divider,.workspace.panel-output-only .workspace-divider{display:none}
.workspace.layout-vertical.panel-code-only,.workspace.layout-vertical.panel-output-only{height:auto}
.workspace.layout-vertical.panel-code-only #code,.workspace.layout-vertical.panel-code-only #input-data{height:72vh;min-height:410px}
.workspace.layout-vertical.panel-output-only .output-layer{height:68vh;min-height:55vh}
:fullscreen body{background:inherit}
:fullscreen header{padding-top:10px;padding-bottom:6px}
:fullscreen main{max-width:none;padding:0 16px 12px}
:fullscreen header{max-width:none}
:fullscreen .toolbar{margin:8px 0}
:fullscreen .workspace.layout-vertical{height:calc(100vh - 190px)}
@media(min-width:821px){:fullscreen .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only){height:calc(100vh - 190px)}:fullscreen .workspace:not(.layout-vertical) .code-layer,:fullscreen .workspace:not(.layout-vertical) .input-layer,:fullscreen .workspace:not(.layout-vertical) .output-layer{flex:1;min-height:0}:fullscreen .workspace:not(.layout-vertical) #code,:fullscreen .workspace:not(.layout-vertical) #input-data{height:100%;min-height:0;resize:none}:fullscreen .workspace:not(.layout-vertical) #output{height:100%;min-height:0;max-height:none}}
@media(max-width:820px){.workspace:not(.layout-vertical){grid-template-columns:minmax(0,1fr);grid-template-rows:auto 14px auto}.workspace:not(.layout-vertical) .workspace-divider{width:100%;height:14px;cursor:row-resize}.workspace:not(.layout-vertical) .workspace-divider::before{width:58px;height:4px}.workspace.layout-vertical{height:auto;grid-template-rows:auto 14px auto}.workspace.layout-vertical #code,.workspace.layout-vertical #input-data{height:380px;min-height:280px}.workspace.layout-vertical .output-layer{min-height:200px;height:280px}}

/* Keep expanded panels in the only grid cell. */
.workspace.panel-code-only>.editor-panel,.workspace.panel-output-only>.console-panel{grid-column:1;grid-row:1}

/* 1.0.3 layout fix: in side-by-side mode, output scrolls inside its panel.
   Do not let the number of output lines determine the workspace height. */
@media (min-width:821px){
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only){
    height:clamp(480px,62vh,900px);
    grid-template-rows:minmax(0,1fr);
  }
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) > .editor-panel,
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) > .console-panel{
    height:100%;min-height:0;
  }
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) .code-layer,
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) .input-layer,
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) .output-layer{
    flex:1 1 0;min-height:0;overflow:hidden;
  }
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) #code,
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) #input-data{
    height:100%;min-height:0;resize:none;overflow:auto;
  }
  .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only) #output{
    height:100%;min-height:0;max-height:none;overflow:auto;
  }
}

/* Automatic stepping controls: compact and touch friendly. */
.actions{flex-wrap:wrap;align-items:center}.auto-delay{position:relative;display:inline-flex}.auto-delay-popup{position:absolute;z-index:30;bottom:calc(100% + 8px);right:0;width:250px;max-width:calc(100vw - 32px);padding:13px;background:#fff;border:1px solid #bdccd6;border-radius:8px;box-shadow:0 8px 24px #0002;color:#243f55;font-size:12px}.auto-delay-popup label{display:block;margin-bottom:9px}.auto-delay-popup input{width:100%;accent-color:#206a61}.auto-delay-limits{display:flex;justify-content:space-between;font-size:11px;color:#647987;margin-top:6px}[data-theme=dark] .auto-delay-popup{background:#273747;color:#e4edf4;border-color:#53677b}

/* Wider splitter target for mouse and interactive whiteboards. */
.workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only){grid-template-columns:minmax(0,var(--split)) 18px minmax(0,1fr)}
.workspace-divider{width:18px;min-width:18px}
.workspace.layout-vertical:not(.panel-code-only):not(.panel-output-only){grid-template-rows:minmax(0,var(--split)) 18px minmax(0,1fr)}
.workspace.layout-vertical .workspace-divider{height:18px;min-height:18px}
@media(max-width:820px){.workspace:not(.layout-vertical){grid-template-rows:auto 18px auto}}


/* 1.0.6: visual soft wrap, without modifying any logical source line. */
.code-layer #code,.input-layer #input-data{
  white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow-x:hidden;
}
#code-highlight{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;}
.output-layer #output{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow-x:hidden;}
.line-gutter .line-numbers{display:block;white-space:normal;}
.line-gutter .gutter-row{display:block;min-height:0;line-height:inherit;}
.line-gutter .gutter-visual-line{display:block;height:28px;line-height:28px;white-space:nowrap;}
.output-layer .line-gutter .gutter-visual-line{height:27.2px;line-height:27.2px;}
.line-gutter .gutter-continuation{color:#43809b;font-weight:700;}
[data-theme=dark] .line-gutter .gutter-continuation{color:#9cc8ec;}
.glo-wrap-measurer{position:fixed;left:-100000px;top:0;visibility:hidden;pointer-events:none;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;box-sizing:content-box;}
.glo-measured-line{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;min-height:1em;}

/* Wrapped logical gutter rows must grow with their visual continuations. */
.breakpoint-gutter .gutter-row{height:auto;line-height:inherit;}

/* 1.0.6 splitter correction: both orientations must size the grid tracks. */
@media(min-width:821px){
 .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only){
  grid-template-columns:minmax(0,var(--split,55%)) 18px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
 }
}
.workspace.layout-vertical:not(.panel-code-only):not(.panel-output-only){
 grid-template-columns:minmax(0,1fr);
 grid-template-rows:minmax(0,var(--split,55%)) 18px minmax(0,1fr);
}
.workspace-divider{touch-action:none;user-select:none;}

/* 1.0.6: compact execution toolbar, retain touch-friendly height */
.actions{gap:6px;padding:11px 12px;flex-wrap:wrap;align-items:center}
.actions>button,.actions>.auto-delay>button{padding:9px 9px;font-size:12px;white-space:nowrap;min-height:38px}
.actions>.auto-delay{flex:0 0 auto}
@media(min-width:821px){.actions{column-gap:5px;row-gap:6px}}

/* 1.0.6: reclaim vertical workspace without shrinking touch targets. */
@media (min-width:821px){
  header{padding-top:12px;padding-bottom:8px;}
  .toolbar{margin-top:8px;margin-bottom:7px;}
  main{padding-bottom:15px;}
  .workspace.layout-vertical:not(.panel-code-only):not(.panel-output-only){height:calc(100vh - 220px);}
  :fullscreen header{padding-top:7px;padding-bottom:4px;}
  :fullscreen .toolbar{margin-top:5px;margin-bottom:5px;}
  :fullscreen .workspace.layout-vertical:not(.panel-code-only):not(.panel-output-only){height:calc(100vh - 160px);}
}

/* 1.0.6: preserve split ratio through viewport/fullscreen changes. */
@media(min-width:821px){
 .workspace:not(.panel-code-only):not(.panel-output-only){
  height:var(--workspace-height,650px)!important;
  min-height:440px;
  align-items:stretch;
 }
 .workspace:not(.layout-vertical):not(.panel-code-only):not(.panel-output-only){
  grid-template-columns:minmax(0,calc(var(--split, 55%) - 9px)) 18px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr);
 }
 .workspace.layout-vertical:not(.panel-code-only):not(.panel-output-only){
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,calc(var(--split, 55%) - 9px)) 18px minmax(0,1fr)!important;
 }
 .workspace:not(.panel-code-only):not(.panel-output-only)>.editor-panel,
 .workspace:not(.panel-code-only):not(.panel-output-only)>.console-panel{height:100%;min-height:0;}
 .workspace:not(.panel-code-only):not(.panel-output-only) .code-layer,
 .workspace:not(.panel-code-only):not(.panel-output-only) .input-layer,
 .workspace:not(.panel-code-only):not(.panel-output-only) .output-layer{flex:1 1 0;min-height:0;overflow:hidden;}
 .workspace:not(.panel-code-only):not(.panel-output-only) #code,
 .workspace:not(.panel-code-only):not(.panel-output-only) #input-data,
 .workspace:not(.panel-code-only):not(.panel-output-only) #output{height:100%;min-height:0;max-height:none;overflow:auto;resize:none;}
}



/* 1.0.7 - right-hand variable monitor, independent of workspace orientation */
.workspace-shell{--variables-width:270px;display:grid;grid-template-columns:minmax(0,1fr) 12px minmax(175px,var(--variables-width));align-items:stretch;min-width:0}
.workspace-shell>.workspace{min-width:0}
.variables-divider{cursor:col-resize;touch-action:none;position:relative;z-index:3}
.variables-divider::before{content:"";position:absolute;left:4px;top:calc(50% - 28px);height:56px;width:4px;border-radius:3px;background:#bacbd5}
.variables-panel{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #d4dfe4;border-radius:9px;background:white;overflow:hidden}
.variables-panel .panel-head{min-height:52px}.variables-panel h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.variables-panel .panel-head button{padding:2px 8px}
.condition-row{display:grid;grid-template-columns:55% 45%;padding:8px 10px;border-bottom:1px solid #d4dfe4;font-size:12px;font-weight:650}
.variables-scroll{flex:1;overflow-y:auto;min-height:200px;max-height:calc(var(--workspace-height, 650px) - 95px)}
.variables-table{border-collapse:collapse;width:100%;table-layout:fixed;font-family:Consolas,monospace;font-size:12px}
.variables-table th{position:sticky;top:0;background:#f5f8fa;z-index:1;text-align:left;padding:6px;border-bottom:1px solid #d4dfe4}
.variables-table td{height:27px;max-height:27px;padding:3px 6px;border-bottom:1px solid #edf0f2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.variables-table th:first-child{width:56%}.variables-spacer td{padding:0;border:0;max-height:none}
.workspace-shell.variables-hidden{grid-template-columns:minmax(0,1fr)}.variables-hidden>.variables-divider,.variables-hidden>.variables-panel{display:none}
[data-theme=dark] .variables-panel{background:#192a36;border-color:#425563}[data-theme=dark] .variables-table th{background:#243747}
@media(max-width:820px){.workspace-shell:not(.variables-hidden){grid-template-columns:minmax(0,1fr) 10px minmax(150px,var(--variables-width))}.variables-panel .panel-head{padding:8px}.variables-table{font-size:11px}}

/* 1.0.7 preview revision: compact single-line toolbar */
.toolbar{flex-wrap:nowrap!important;justify-content:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;max-width:100%;}
.toolbar .mode,.toolbar .tools,.toolbar .decimal-setting{flex-shrink:0;white-space:nowrap;}
.toolbar .tools{flex-wrap:nowrap;}
.toolbar button{white-space:nowrap;}
@media(max-width:820px){.toolbar{flex-direction:row;align-items:center;}}
.variables-table td:last-child{cursor:pointer;}
.variables-table td:last-child:focus-visible{outline:2px solid #39717f;outline-offset:-2px;}

/* 1.0.7 toolbar final candidate: one row at every viewport width. */
.toolbar{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;overflow-x:auto;overflow-y:hidden;gap:8px;max-width:100%;min-width:0;-webkit-overflow-scrolling:touch;}
.toolbar>.mode,.toolbar>.tools,.toolbar>.decimal-setting{flex:0 0 auto;min-width:max-content;}
.toolbar>.mode,.toolbar>.tools{display:flex;flex-direction:row;flex-wrap:nowrap!important;align-items:center;}
.toolbar>.decimal-setting{margin-left:auto;}
.toolbar button{flex-shrink:0;white-space:nowrap;}

/* Compact decimal selector without sacrificing the Auto label */
.decimal-setting{gap:4px!important}
.decimal-setting select{width:84px!important;min-width:84px!important;padding:6px 4px!important}
