:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#253643;background:#edf1f4;font-synthesis:none;--accent:#177d65;--line:#e1e7ec;--muted:#7a8995}
*{box-sizing:border-box}body{margin:0}button,select,input,textarea{font:inherit}button,select{cursor:pointer}button{background:#fff;border:1px solid #d8e1e6;border-radius:5px;color:#3d5360;padding:7px 11px;font-size:12px;white-space:nowrap;transition:background .15s}button:hover{background:#f0f5f4}button:disabled{opacity:.45;cursor:default}.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}.primary:hover{background:#116952}.danger{color:#a94447}.quiet{border:0;background:transparent}.topbar{height:76px;background:#143840;color:#fff;display:flex;align-items:center;padding:0 25px;gap:35px}.brand{display:flex;align-items:center;gap:12px;min-width:235px}.brand img{width:35px;height:35px}.brand strong{font-size:22px;letter-spacing:.2px;display:block;font-weight:650}.brand span{font-size:9px;letter-spacing:2px;color:#b5d1ce;display:block;margin-top:3px}.brand small{background:#31585b;padding:1px 5px;border-radius:3px;letter-spacing:0;margin-left:4px}.project-switch{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.project-switch label{font-size:12px;color:#bdd0d3}.project-switch select{background:#23474e;color:#fff;border:1px solid #45636a;padding:8px 12px;border-radius:5px;min-width:180px;max-width:300px}.project-switch button{color:#d1e4e5}.connection{font-size:11px;color:#c3d6d6;display:flex;gap:8px;align-items:center}.connection span:first-child{width:7px;height:7px;border-radius:50%;background:#8fa3aa}.connection span.online{background:#65d7a4}.workbench{padding:18px 20px;display:grid;grid-template-columns:210px minmax(320px,1fr) 330px;grid-template-rows:minmax(380px,calc(100vh - 435px)) 270px;gap:14px;max-width:2100px;margin:auto}.panel{background:#fff;border:1px solid #dce4e9;border-radius:7px;overflow:hidden;min-width:0;box-shadow:0 2px 3px #22394503}.panel-title{height:49px;padding:0 15px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:8px}.panel-title h2{font-size:13px;font-weight:600;margin:0;white-space:nowrap}.panel-title>div{display:flex;align-items:center;gap:6px}.tag{font-size:9px;color:#74878e;background:#f0f4f6;padding:4px 7px;border-radius:4px;letter-spacing:.5px}.files{grid-row:1/3;display:flex;flex-direction:column}.file-actions{display:flex;gap:7px;padding:14px 12px 8px}.file-actions button{flex:1}.file-list{padding:4px 8px;flex:1;overflow:auto;min-height:100px}.file-entry{width:100%;display:flex;align-items:center;gap:8px;border:0;background:none;text-align:left;padding:10px 9px;font-size:12px;white-space:normal;overflow-wrap:anywhere}.file-entry.active{background:#eaf6f1;color:#16745d}.file-entry .file-type{font-family:Consolas,monospace;font-size:10px;padding:3px;border-radius:3px;background:#eff3f7;min-width:25px;text-align:center;color:#63768a}.file-entry .file-type.py{background:#fef6dc;color:#9b792e}.project-actions{padding:12px;display:grid;gap:7px;border-top:1px solid var(--line)}.aside-note{font-size:11px;line-height:1.8;color:#8a97a0;padding:0 15px 12px;margin:0}.editor-panel{display:flex;flex-direction:column}.editor-heading{height:45px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#f8fafb;padding:0 12px;gap:8px}.editor-tab{display:flex;align-items:center;gap:7px;min-width:0}.editor-tab>span:first-child{font-family:Consolas,monospace;font-size:11px;color:#338772;font-weight:700}.editor-tab input{background:transparent;border:0;outline:none;font-size:12px;min-width:0;width:190px;color:#3d5360}#dirty-indicator{font-size:8px;color:#b79a49;visibility:hidden}#dirty-indicator.dirty{visibility:visible}select{border:1px solid #dce4e9;background:#fff;border-radius:4px;font-size:11px;padding:5px 7px;color:#536570;max-width:100%}.toolbar{display:flex;justify-content:space-between;padding:10px 12px;gap:8px;border-bottom:1px solid var(--line)}.execution-actions{display:flex;gap:7px}.editor{display:flex;flex:1;min-height:0;background:#fff;overflow:hidden}.editor pre,.editor textarea{font-family:Consolas,"Cascadia Code","Microsoft YaHei",monospace;font-size:12px;line-height:21px;margin:0;padding-top:16px}.editor pre{width:45px;flex-shrink:0;text-align:right;padding-right:10px;color:#a3afb8;background:#fafbfc;border-right:1px solid #f0f2f5;user-select:none;overflow:hidden}.editor textarea{resize:none;border:0;outline:none;width:100%;padding-left:13px;padding-right:15px;tab-size:4;white-space:pre;overflow:auto;color:#314654;background:transparent}.editor-footer{height:29px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#84939d;padding:7px 12px}.workspace{display:flex;flex-direction:column}.workspace-actions{display:flex;gap:8px;padding:12px 13px 0}.workspace-note{margin:9px 14px 14px;font-size:10px;color:#8a979f}.variable-scroll{overflow:auto;flex:1}table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:11px}th{font-weight:500;color:#85919b;text-align:left;padding:9px 12px;background:#f8fafb;border-block:1px solid #e9edf0}th:first-child{width:26%}th:nth-child(2){width:32%}td{padding:11px 12px;border-bottom:1px solid #edf1f4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}td:first-child{font-family:Consolas,monospace;color:#247862}td:nth-child(2){font-size:10px;color:#7b8792}td:last-child{font-family:Consolas,monospace;color:#72818c}tbody tr{cursor:pointer}tbody tr:hover{background:#f2f8f6}.empty{text-align:center;font-size:11px;line-height:1.8;color:#a0adb5;padding:25px 15px}.console{grid-column:2;display:flex;flex-direction:column}#console-output{overflow:auto;flex:1;padding:12px 16px;font-size:11px;line-height:1.7;font-family:Consolas,"Microsoft YaHei",monospace;white-space:pre-wrap;overflow-wrap:anywhere;min-height:80px}.welcome{color:#8e9ba3}.console-line{padding:2px 0}.console-line.command{color:#287864;margin-top:9px}.console-line.error{color:#aa494f}.console-line.result{color:#435e6e}#command-form{display:flex;gap:8px;align-items:center;padding:8px 12px;border-top:1px solid var(--line)}#command-form label{font-family:Consolas,monospace;color:#247862}#command{min-width:0;flex:1;outline:none;border:0;color:#344a58;font-family:Consolas,"Microsoft YaHei",monospace;font-size:12px}.figures{grid-column:3;display:flex;flex-direction:column}#figure-content{min-height:0;overflow:auto;flex:1;text-align:center;padding:8px;background:#fafcfd}#figure-content img{display:block;max-width:100%;height:auto;margin:auto}.plot-empty{padding:23px 5px 10px}.plot-symbol{font-size:43px;font-weight:300;color:#c0d3d8;line-height:1}.plot-empty p{font-size:11px;margin:12px 0 7px;color:#82949d}.plot-empty span{font-size:10px;color:#a1afb6}.plot-card{margin-bottom:9px}.plot-card button{font-size:10px;margin-top:3px}.page-footer{padding:0 22px 14px;font-size:10px;color:#8b99a2;display:flex;justify-content:space-between;gap:15px}#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#173d43;color:#fff;padding:12px 22px;border-radius:7px;font-size:12px;max-width:90vw;box-shadow:0 5px 25px #173d4340;z-index:10}dialog{border:1px solid var(--line);border-radius:9px;padding:0;width:650px;max-width:94vw;box-shadow:0 10px 60px #142e4840}dialog::backdrop{background:#19353d55}.dialog-heading{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid var(--line)}.dialog-heading h2{font-size:14px;margin:0}#variable-value{margin:0;padding:20px;max-height:50vh;overflow:auto;font-family:Consolas,"Microsoft YaHei",monospace;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.dialog-actions{display:flex;justify-content:flex-end;padding:12px;gap:10px;border-top:1px solid var(--line)}
.project-switch button:hover{background:#31585b;color:#fff}
/* Desktop uses the available viewport; scrollable contents never push the command row away. */
body{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.topbar{height:64px;min-height:64px;padding:0 18px;gap:20px;flex-shrink:0}
.brand{min-width:155px}.project-switch{gap:8px}.project-switch select{min-width:110px;width:200px;max-width:22vw}
.global-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.global-actions button{background:#23474e;border-color:#45636a;color:#e9f5f3}.global-actions button:hover{background:#31585b}.global-actions select{background:#23474e;border-color:#45636a;color:#fff;min-width:95px}
.workbench{--files-width:190px;--workspace-width:300px;--console-height:200px;flex:1;min-height:0;width:100%;padding:12px 14px 8px;gap:0;grid-template-columns:var(--files-width) 10px minmax(0,1fr) 10px var(--workspace-width);grid-template-rows:minmax(0,1fr) 10px var(--console-height)}
.panel{min-height:0}.files{grid-column:1;grid-row:1/4}.editor-panel{grid-column:3;grid-row:1}.workspace{grid-column:5;grid-row:1}.console{grid-column:3;grid-row:3}.figures{grid-column:5;grid-row:3}
.panel-title,.editor-heading,.toolbar,.editor-footer,#command-form{flex-shrink:0}.file-list,.variable-scroll,#console-output{min-height:0}.editor-heading{min-height:42px}.editor-tab input{width:150px}.toolbar{flex-wrap:wrap;padding:8px 10px}.toolbar>select{min-width:0;max-width:100%}.editor-footer{height:auto;min-height:25px;flex-wrap:wrap;padding:5px 10px}.file-actions{padding:10px 10px 6px}.project-actions{padding:10px}.aside-note{padding-bottom:8px}.workspace-note{margin-bottom:10px}.panel-title{height:42px;padding-inline:12px}#command-form{min-height:44px;background:#fff}#command-language{max-width:80px}
.page-footer{flex-shrink:0;padding:4px 16px 8px;line-height:1.4;flex-wrap:wrap;font-size:9px}
.splitter{position:relative;touch-action:none;user-select:none;outline:none}.splitter::after{content:"";position:absolute;border-radius:3px;background:#b7c9cf;opacity:.55;transition:background .15s,opacity .15s}.splitter:hover::after,.splitter:focus-visible::after{background:var(--accent);opacity:1}.vertical{cursor:col-resize}.vertical::after{width:3px;top:35%;bottom:35%;left:4px}.horizontal{cursor:row-resize}.horizontal::after{height:3px;left:40%;right:40%;top:4px}#split-left{grid-column:2;grid-row:1/4}#split-right{grid-column:4;grid-row:1/4}#split-bottom{grid-column:3/6;grid-row:2}.resizing,.resizing *{user-select:none!important}.resizing[data-resize="bottom"],.resizing[data-resize="bottom"] *{cursor:row-resize!important}.resizing[data-resize="left"],.resizing[data-resize="left"] *,.resizing[data-resize="right"],.resizing[data-resize="right"] *{cursor:col-resize!important}
.plot-empty{font-size:11px;color:#82949d;line-height:1.8}
.file-actions{flex-wrap:wrap}.file-actions button{flex:1 0 70px;white-space:normal;overflow-wrap:anywhere;padding-inline:6px}.project-actions button{white-space:normal;overflow-wrap:anywhere}.workspace-actions{flex-wrap:wrap}.panel-title h2{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.tag{flex-shrink:0}
#feedback-dialog{width:390px;max-height:92dvh;overflow:auto}.feedback-body{padding:16px;text-align:center}.feedback-body p{font-size:12px;line-height:1.7;margin:0 0 12px}.feedback-body p:last-child{font-size:11px;color:var(--muted);margin:12px 0 0}.feedback-body img{display:block;width:260px;max-width:100%;height:auto;margin:auto;image-rendering:auto}
@media(max-width:1350px){.connection{display:none}.topbar{gap:14px}.brand{min-width:145px}}
@media(max-height:720px) and (min-width:1001px){.aside-note{display:none}.workspace-note{margin-block:7px}.workspace-actions{padding-top:8px}.panel-title{height:36px}.project-actions{padding:7px}.plot-empty{padding-top:12px}}
/* On narrow screens the command form stays at the viewport bottom while panels scroll. */
@media(max-width:1000px){body{height:auto;min-height:100dvh;overflow:auto;padding-bottom:calc(58px + env(safe-area-inset-bottom))}.topbar{height:auto;min-height:64px;padding:12px;flex-wrap:wrap;gap:10px}.brand{min-width:130px}.project-switch{min-width:210px}.project-switch select{max-width:none;width:150px}.global-actions{margin-left:auto}.workbench{display:grid;grid-template-columns:170px minmax(0,1fr);grid-template-rows:410px 230px 250px;gap:10px;padding:10px}.files{grid-column:1;grid-row:1/3}.editor-panel{grid-column:2;grid-row:1}.console{grid-column:2;grid-row:2}.workspace{grid-column:1;grid-row:3}.figures{grid-column:2;grid-row:3}.splitter{display:none}#reset-layout{display:none}#command-form{position:fixed;bottom:0;left:0;width:100%;z-index:5;min-height:50px;padding-bottom:calc(8px + env(safe-area-inset-bottom));box-shadow:0 -3px 15px #173d4314}.page-footer{flex-direction:column;gap:4px}}
@media(max-width:580px){.brand strong{font-size:19px}.brand img{width:28px}.brand span{font-size:8px}.global-actions{order:1}.project-switch{order:2;flex-basis:100%;min-width:0}.project-switch select{flex:1;max-width:none}.topbar{gap:10px}.workbench{display:flex;flex-direction:column}.files{height:195px;max-height:195px}.files .panel-title{height:34px;min-height:34px}.file-actions{padding:6px 10px}.file-list{min-height:32px;display:flex;overflow:auto;flex-shrink:0}.file-entry{min-width:145px;width:auto}.project-actions{display:flex;flex-wrap:wrap;padding:6px}.aside-note{display:none}.editor-panel{height:400px}.toolbar>select{width:100%}.workspace{height:260px}.console{height:240px}.figures{height:300px}.editor-footer{font-size:8px}.page-footer{padding:3px 14px 15px}.panel-title{padding-inline:12px}.feedback-body img{width:230px}}
