:root:not([data-theme="dark"]),[data-theme="light"]{--bg-body:#f9faf9;--bg-card:#fff;--bg-control:#f4f7f8;--border:#dce5eb;--text-primary:#172733;--text-secondary:#526d7e;--text-muted:#607786;--text-dim:#8499a6;--accent:#0079a8;--accent-bg:#0079a8;--accent-text:#fff;--input-bg:#fff;--select-bg:#fff}.remi-workbench{font-family:Remi,Arial,sans-serif!important;min-width:0;overflow-x:hidden}.remi-workbench button,.remi-workbench input,.remi-workbench select{font-family:inherit}.remi-workbench .lab-context{display:flex;gap:28px;align-items:center;max-width:1380px;padding:18px 38px 0;margin:0 auto;color:var(--text-secondary);font-size:11px;line-height:1.5}.lab-context>a{text-decoration:none;color:var(--accent);font-weight:550}.lab-context>span{font-family:Consolas,monospace;font-size:10px;color:var(--text-muted)}.lab-sequence{display:flex;gap:20px;margin-left:auto}.lab-sequence a{text-decoration:none;color:var(--text-secondary);font-size:11px}.remi-workbench .header{padding:23px 38px 25px!important;margin:0 auto;background:transparent!important;border:0!important;max-width:1380px;gap:10px!important;min-height:100px}.remi-workbench .header .back-link{display:none}.remi-workbench .header h1{font-size:31px;letter-spacing:-.9px;font-weight:550;line-height:1.2;color:var(--text-primary)}.remi-workbench .header p{font-size:12px;line-height:1.5;margin-top:9px;color:var(--text-secondary)}.remi-workbench .header-title{min-width:0}.remi-workbench .theme-toggle,.remi-workbench .fullscreen-toggle{border-radius:3px;width:34px;height:34px;flex-shrink:0}.remi-workbench .container{grid-template-columns:264px minmax(0,1fr);gap:20px;max-width:1380px;margin:0 auto;padding:0 38px 38px;height:auto!important;min-height:calc(100vh - 263px);align-items:start}.remi-workbench .controls{background:var(--bg-card)!important;border:1px solid var(--border);border-radius:4px;padding:20px!important;gap:0;max-height:calc(100vh - 35px);overflow-y:auto;position:sticky;top:18px;min-width:0}.remi-workbench .controls:before{content:'EXPERIMENT CONTROLS';font-size:10px;font-weight:650;letter-spacing:.1em;color:var(--text-secondary);padding-bottom:21px;display:block}.remi-workbench .control-group{background:transparent!important;border-radius:0;padding:20px 0;border-top:1px solid var(--border);margin:0}.remi-workbench .control-group h3{font-size:10px;line-height:1.6;letter-spacing:.07em;font-weight:650;color:var(--text-secondary)!important;margin-bottom:13px}.remi-workbench label{font-size:12px;line-height:1.5;margin-bottom:9px;gap:7px;flex-wrap:wrap}.remi-workbench label .val{font-family:Consolas,monospace;font-size:12px;white-space:nowrap;color:var(--accent)!important}.remi-workbench input[type=range]{height:6px;margin:8px 0 16px;accent-color:var(--accent)!important;cursor:pointer;min-width:0;max-width:100%}.remi-workbench select{font-size:12px;line-height:1.5;min-height:35px;padding:7px;border-radius:3px;border:1px solid var(--border);max-width:100%;background:var(--bg-card);color:var(--text-primary)}.remi-workbench input[type=number]{font-size:12px;min-height:32px;padding:5px;border-radius:3px;max-width:100%}.remi-workbench .plots{padding:0!important;gap:14px;grid-auto-rows:minmax(280px,auto);grid-template-rows:none!important;min-width:0;height:auto!important}.remi-workbench .plot{border:1px solid var(--border);border-radius:4px;min-width:0;height:300px;min-height:280px;overflow:hidden;background:var(--bg-card)!important}.remi-workbench .plots.lab-stacked{grid-template-columns:minmax(0,1fr)!important}.remi-workbench .plots.lab-stacked .plot{height:300px}.remi-workbench .plots.lab-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.remi-workbench .plots.lab-grid>.plot:nth-child(2):nth-last-child(3){grid-column:1/-1;height:340px}.remi-workbench .plots>.plot:nth-child(2):last-child{height:560px;min-height:420px}.remi-workbench .info-box{background:var(--bg-control)!important;border-radius:3px;font-size:12px;line-height:1.85;padding:15px;margin:16px -3px 0;overflow-wrap:anywhere;color:var(--text-secondary)!important}.remi-workbench .info-box strong{font-weight:600;color:var(--text-primary)}.remi-workbench .info-box code{color:var(--accent)!important;font-size:12px;line-height:1.8}.remi-workbench .metric{padding:12px 0!important;gap:9px}.remi-workbench .metric .label{font-size:11px;line-height:1.6}.remi-workbench .metric .value{font-size:14px;font-weight:550}.remi-workbench .play-btn,.remi-workbench .primary-button,.remi-workbench button[data-tone=primary]{background:var(--accent-bg)!important;color:var(--accent-text)!important;border-radius:3px;min-height:36px;font-size:12px}.remi-workbench .step-btn,.remi-workbench .secondary-button,.remi-workbench .control-button{background:var(--bg-control)!important;color:var(--text-primary)!important;border:1px solid var(--border)!important;border-radius:3px;min-height:34px;font-size:11px}.remi-workbench .step-btn:hover{border-color:var(--accent)!important}.remi-workbench .toggle-group{display:flex;flex-wrap:wrap;gap:4px}.remi-workbench .toggle-group button{border-radius:3px;font-size:11px;padding:7px;min-height:30px;background:var(--bg-control)!important;color:var(--text-secondary)!important;flex:1}.remi-workbench .toggle-group button.active{background:var(--accent-bg)!important;color:var(--accent-text)!important}.remi-workbench .status{font-size:11px;line-height:1.8}.remi-workbench button:focus-visible,.remi-workbench a:focus-visible,.remi-workbench input:focus-visible,.remi-workbench select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.remi-workbench .plot-focus-btn{background:var(--bg-control)!important;color:var(--text-secondary)!important;border-radius:3px;width:27px;height:27px;top:8px;right:8px;opacity:.8}.remi-workbench .container.fs-active{grid-template-columns:minmax(0,1fr)!important}.remi-workbench .plots.plot-focus-active{grid-template-columns:minmax(0,1fr)!important}.remi-workbench .plots.plot-focus-active .plot.plot-focus-target{height:calc(100vh - 295px)!important;min-height:480px;grid-column:1/-1}.remi-workbench .plotly .modebar{right:45px!important}.remi-debugger .app-shell{max-width:1380px;padding:20px 38px 40px}.remi-debugger .topbar{margin-bottom:20px}.remi-debugger .hero{background:transparent;border:0;box-shadow:none;padding:0 0 24px;border-radius:0}.remi-debugger .hero h1{font-size:34px;letter-spacing:-1px;font-weight:550}.remi-debugger .hero p{font-size:13px;color:var(--text-secondary);line-height:1.8}.remi-debugger .hero-chips{display:none}.remi-debugger .hero-links{margin-top:16px}.remi-debugger .hero-link,.remi-debugger .crumb-link{border-radius:3px;background:var(--bg-card);border:1px solid var(--border);color:var(--accent);font-size:11px;box-shadow:none}.remi-debugger .panel{border-radius:4px;box-shadow:none;border:1px solid var(--border);background:var(--bg-card)}.remi-debugger .panel-head{background:var(--bg-card);padding:20px 22px;border-color:var(--border)}.remi-debugger .panel-head h2{font-size:16px;letter-spacing:-.2px;font-weight:550}.remi-debugger .panel-head p{font-size:12px;color:var(--text-secondary);line-height:1.7}.remi-debugger .panel-body{padding:20px 22px}.remi-debugger .editor-shell,.remi-debugger .code-shell,.remi-debugger .table-wrap{border-radius:3px;border-color:var(--border)}.remi-debugger .editor{font-size:13px;line-height:1.75}.remi-debugger .code-output{font-size:12px}.remi-debugger .status-chip,.remi-debugger .meta-badge,.remi-debugger .scope-button{border-radius:3px}.remi-debugger .empty-state{background:var(--bg-control);border-radius:3px}.remi-debugger .example-select{font-size:12px}.remi-debugger .workspace{gap:20px}.remi-debugger .lower-grid{gap:20px}.remi-debugger .lab-context>span{display:none}[data-theme=dark] .remi-family-bar{background:#fff}[data-theme=dark] .remi-workbench{background:var(--bg-body)!important}
@media(min-width:1450px){.remi-workbench .plot{height:340px}.remi-workbench .plots.lab-stacked .plot{height:320px}}
@media(max-width:1000px){.remi-workbench .container{padding:0 24px 30px;grid-template-columns:230px minmax(0,1fr);gap:15px}.remi-workbench .header{padding:22px 24px!important}.remi-workbench .lab-context{padding:17px 24px 0}.remi-workbench .header h1{font-size:27px}.remi-workbench .controls{padding:16px!important}.remi-workbench .plots.lab-grid{grid-template-columns:minmax(0,1fr)!important}.remi-workbench .plots.lab-grid>.plot{grid-column:auto!important}.remi-debugger .app-shell{padding:20px 24px 35px}}
@media(max-width:768px){.remi-workbench .lab-context{padding:15px 20px 0;gap:12px;flex-wrap:wrap;font-size:10px}.lab-context>span{display:none}.lab-sequence{gap:13px}.lab-sequence a{font-size:10px}.remi-workbench .header{padding:23px 20px!important;flex-wrap:wrap;min-height:110px}.remi-workbench .header-title{flex-basis:calc(100% - 100px)}.remi-workbench .header h1{font-size:26px!important;line-height:1.15;letter-spacing:-.6px}.remi-workbench .header p{display:block!important;font-size:11px!important;margin-top:9px}.remi-workbench .container{padding:0 20px 30px;gap:14px;display:flex;flex-direction:column;min-height:0!important}.remi-workbench .controls{position:static;width:100%;max-height:none;overflow:visible;padding:0!important;border:0;display:none}.remi-workbench .controls:before{padding:18px 0}.remi-workbench .controls.mobile-open{display:flex;border:1px solid var(--border);padding:0 18px 18px!important;max-height:none;overflow:visible}.remi-workbench .mobile-controls-toggle{display:inline-flex!important;width:auto;min-width:75px;padding:0 9px;border-radius:3px;font-size:11px;height:34px;gap:6px}.remi-workbench .mobile-controls-toggle svg{width:12px;height:12px}.remi-workbench .mobile-controls-toggle:after{content:'Controls'}.remi-workbench .fullscreen-toggle{display:none}.remi-workbench .plots,.remi-workbench .plots.lab-grid,.remi-workbench .plots.lab-stacked{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;gap:13px!important;padding:0!important}.remi-workbench .plots .plot,.remi-workbench .plots.lab-stacked .plot,.remi-workbench .plots.lab-grid>.plot:nth-child(2):nth-last-child(3){height:320px;min-height:300px;grid-column:auto!important}.remi-workbench .plots>.plot:nth-child(2):last-child{height:440px}.remi-workbench .control-group{padding:19px 0}.remi-workbench label{font-size:13px}.remi-workbench select{font-size:13px;min-height:38px}.remi-workbench .plots.plot-focus-active .plot.plot-focus-target{min-height:480px;height:70vh!important}.remi-debugger .app-shell{padding:20px}.remi-debugger .hero h1{font-size:30px}.remi-debugger .panel-head,.remi-debugger .panel-body{padding:17px}.remi-debugger .topbar{gap:10px}.remi-debugger .workspace{gap:15px}.remi-debugger .lower-grid{gap:15px}}
@media(max-width:768px){.remi-workbench .header{display:grid!important;grid-template-columns:1fr auto;gap:13px!important}.remi-workbench .header-title{grid-column:1/-1}.remi-workbench .mobile-controls-toggle{grid-column:1;grid-row:2;justify-self:start}.remi-workbench .theme-toggle{grid-column:2;grid-row:2}}

/* Theme surfaces and text move together; public branding keeps its original white surface. */
[data-theme="dark"]{--bg-body:#111e29;--bg-card:#1c2d3b;--bg-control:#253a49;--border:#3e5667;--text-primary:#e6eef3;--text-secondary:#b8cbd7;--text-muted:#a4bdcd;--text-dim:#839eaf;--accent:#78c9ef;--accent-bg:#087ba8;--accent-text:#fff;--input-bg:#1c2d3b;--select-bg:#1c2d3b}
.remi-workbench{background:var(--bg-body)!important;color:var(--text-primary)!important}
.remi-workbench .controls label{color:var(--text-primary)!important}
.remi-workbench .controls button:not(.active):not(.play-btn):not([data-tone=primary]){color:var(--text-primary)}
.remi-workbench .container.fs-active .plots{height:auto!important;align-content:start;grid-auto-rows:auto}
.remi-workbench .plots{align-content:start}
.remi-workbench .plot.lab-3d-plot{height:360px;min-height:360px}
.lab-mobile-result-bar,.lab-drawer-head{display:none}
.lab-explanation{margin-top:15px;border-top:1px solid var(--border);font-size:12px;color:var(--text-secondary)}
.lab-explanation summary{cursor:pointer;padding:15px 0;line-height:1.6;font-weight:600;color:var(--text-primary)}
.remi-workbench .lab-explanation .info-box{margin:0 0 6px}
@media(max-width:768px){
 body.remi-workbench.lab-mobile-active{overflow:hidden;overscroll-behavior:none}
 .remi-workbench .lab-mobile-result-bar{display:none}
 .remi-workbench.lab-mobile-active .plots{position:fixed;z-index:60;inset:0 0 44dvh;display:flex!important;flex-direction:column;gap:0!important;width:auto!important;padding:0 12px 10px!important;margin:0!important;background:var(--bg-body);height:56dvh!important;grid-template-columns:none!important;overflow:hidden}
 .remi-workbench.lab-mobile-active .lab-mobile-result-bar{display:flex;align-items:center;gap:12px;min-height:54px;flex:0 0 54px;min-width:0}
 .lab-mobile-result-bar label{font-size:12px;flex:0 0 auto;margin:0!important;color:var(--text-secondary)!important}
 .remi-workbench.lab-mobile-active .lab-mobile-result-bar select{margin:0;flex:1;min-width:0;width:auto;font-size:12px!important;min-height:36px}
 .remi-workbench.lab-mobile-active .plots .plot{display:none!important}
 .remi-workbench.lab-mobile-active .plots .plot.lab-mobile-selected{display:block!important;flex:1 1 auto;height:0!important;min-height:0!important;width:100%;margin:0!important}
 .remi-workbench.lab-mobile-active .plot-focus-btn{display:none}
 .remi-workbench.lab-mobile-active .controls.mobile-open{position:fixed;z-index:61;top:auto;bottom:0;left:0;right:0;width:100%;height:44dvh!important;max-height:44dvh!important;display:block!important;overflow-y:auto;overscroll-behavior:contain;padding:0 20px max(20px,env(safe-area-inset-bottom))!important;margin:0!important;border:0!important;border-top:1px solid var(--border)!important;border-radius:0!important;box-shadow:0 -3px 16px #00000010;scroll-padding-top:62px}
 .remi-workbench.lab-mobile-active .controls:before{display:none}
 .remi-workbench.lab-mobile-active .lab-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:15px;position:sticky;top:0;z-index:3;background:var(--bg-card);padding:10px 0;min-height:54px;border-bottom:1px solid var(--border)}
 .lab-drawer-head strong{font-size:12px;font-weight:600;color:var(--text-primary)}
 .lab-drawer-head button{min-height:36px;padding:6px 12px;border:1px solid var(--border);border-radius:3px;background:var(--bg-control);color:var(--text-primary)!important;font-size:12px!important}
 .remi-workbench.lab-mobile-active .control-group{padding:15px 0}
 .remi-workbench.lab-mobile-active .control-group:first-of-type{border-top:0}
 .remi-workbench.lab-mobile-active input[type=range]{height:18px;margin:4px 0 12px}
 .remi-workbench.lab-mobile-active .controls select{margin-bottom:0}
 .remi-workbench .plot.lab-3d-plot{height:380px;min-height:380px}
}

@media(max-width:768px){.remi-workbench.lab-mobile-active .plotly .modebar{display:none!important}}
