/* The sidebar follows the charts on wide screens and stays in flow on phones. */
.lab-workspace{--lab-sticky-top:112px}
.lab-workspace .topbar{position:sticky;top:0;z-index:1000;box-shadow:0 3px 12px #00000008}
.lab-workspace .lab-layout{align-items:start}
@media(min-width:761px){
 .lab-workspace .lab-layout>.controls,.lab-workspace .lab-layout>.controls.has-pieces{position:sticky!important;top:var(--lab-sticky-top);max-height:calc(100vh - var(--lab-sticky-top) - 12px);max-height:calc(100dvh - var(--lab-sticky-top) - 12px);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#a8acb2 transparent;align-self:start}
 .lab-workspace .controls:focus-within{scroll-behavior:auto}
}
@media(max-width:760px){
 .lab-workspace .lab-layout>.controls{position:static!important;max-height:none;overflow:visible;scrollbar-gutter:auto}
 .lab-workspace .brand{max-width:100%;min-width:0;width:100%}
 .lab-workspace .brand>div{min-width:0;flex:1}
 .lab-workspace .lab-nav{flex-wrap:nowrap;overflow-x:auto;max-width:100%;white-space:nowrap;padding-bottom:3px;scrollbar-width:thin}
 .lab-workspace .lab-nav a{flex:0 0 auto}
 .lab-workspace .top-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;width:100%;gap:.3rem}
 .lab-workspace .top-actions .button{min-width:0;margin:0;padding:.3rem .4rem;font-size:.69rem;min-height:40px}
 .lab-workspace .top-actions .theme-toggle{min-width:68px;min-height:40px}
 html[data-site-surface=inverse-function].lab-workspace .top-actions{grid-template-columns:minmax(0,1fr) auto auto}
 html[data-site-surface=inverse-function].lab-workspace .top-actions>:first-child{grid-column:1/3}
 .lab-workspace .topbar{gap:.4rem}
 .lab-workspace :is(.lab-theory,.theory){scroll-margin-top:var(--lab-sticky-top)}
}
html[data-theme=dark].lab-workspace .topbar{box-shadow:0 4px 16px #0003}
html[data-theme=dark].lab-workspace .lab-layout>.controls{scrollbar-color:#86734e transparent}
