/* Workbench execution occupies its own lower grid track. The chart and sidebar
   tracks retain their own scrolling; no fixed overlay obscures their content. */
body[data-context] { --mobile-execution-height:0px; }
body[data-context] .workbench { grid-template-rows:minmax(0,1fr) auto; }
body[data-context]:not([data-context=workbench]) .workbench { grid-template-rows:minmax(0,1fr); }
body[data-context]:not([data-context=workbench]) #execution-dock { display:none; }
body[data-context=workbench] #execution-dock {
  grid-column:1/-1; grid-row:2; display:grid;
  grid-template-columns:minmax(0,auto) minmax(0,1fr) auto;
  align-items:center; gap:12px; min-width:0; min-height:58px;
  position:relative; z-index:30; padding:5px 14px;
  border:0; border-top:2px solid var(--instrument-rim,var(--line));
  background:var(--instrument-face,var(--paper)); color:var(--instrument-ink,var(--ink));
  box-shadow:inset 0 1px color-mix(in srgb,var(--instrument-ink,var(--ink)) 10%,transparent);
}
#execution-dock .execution-main { display:flex; align-items:center; min-width:0; gap:14px; }
body[data-context=workbench] #execution-dock .clock {
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; gap:2px; margin:0;
  min-width:166px; min-height:44px; padding:3px 10px; border:1px solid var(--instrument-rim,var(--line));
  border-radius:3px; background:#152629;
  color:#e7f1ee; box-shadow:inset 0 1px 4px #0006,0 1px #fff1;
}
#execution-dock .clock>span { grid-column:1; grid-row:1; text-align:center; font-size:9px; line-height:1.2; letter-spacing:.025em; color:#bed5d1; }
#execution-dock .clock strong { grid-column:1; grid-row:2; text-align:center; font:22px/1.15 'IBM Plex Mono',monospace; color:#e7f1ee; font-variant-numeric:tabular-nums; white-space:nowrap; }
#execution-dock .run-buttons { display:flex; gap:7px; }
body[data-context=workbench] #execution-dock button { min-height:42px; padding:4px 8px; font-size:12px; line-height:1.35; }
#execution-dock .execution-desktop-buttons button { min-width:90px; }
#execution-dock .execution-options { display:flex; justify-content:flex-end; align-items:center; min-width:0; gap:14px; }
#execution-dock #run-status { max-width:150px; min-width:0; font-size:11px; line-height:1.35; color:var(--instrument-muted,var(--muted)); }
#execution-dock .run-options { display:flex; justify-content:flex-start; gap:10px; margin:0; font-size:11px; }
#execution-dock .run-options>label { display:flex; align-items:center; gap:7px; min-height:42px; white-space:nowrap; }
#execution-dock #realtime { width:17px; height:17px; margin:0; }
#execution-dock #speed { min-width:62px; width:62px; min-height:38px; font:12px 'IBM Plex Mono',monospace; }
#execution-dock .execution-session-menu { position:relative; min-width:0; margin:0; border:0; background:transparent; }
#execution-dock .execution-session-menu>summary {
  display:flex; align-items:center; justify-content:space-between; gap:9px;
  min-height:42px; padding:4px 9px; cursor:pointer; list-style:none;
  border:5px solid transparent;
  border-image:var(--instrument-selector) var(--instrument-selector-slice) fill / 5px stretch;
  background:var(--instrument-face,var(--paper)); color:var(--instrument-ink,var(--ink));
  font-size:12px; line-height:1.35; font-weight:600;
}
#execution-dock .execution-session-menu>summary::-webkit-details-marker { display:none; }
#execution-dock .execution-session-menu>summary:focus-visible { outline:3px solid var(--link,var(--teal)); outline-offset:3px; }
#execution-dock .execution-menu-chevron { font-size:12px; transition:transform .12s; }
#execution-dock .execution-session-menu[open] .execution-menu-chevron { transform:rotate(180deg); }
#execution-dock .execution-session-menu .run-secondary {
  position:absolute; right:0; bottom:calc(100% + 9px); margin:0; padding:8px;
  display:grid; grid-template-columns:minmax(0,1fr); gap:6px;
  width:max-content; min-width:200px; max-width:min(340px,calc(100vw - 24px));
  border:1px solid var(--instrument-rim,var(--line));
  background:var(--instrument-face,var(--paper)); box-shadow:0 4px 16px #0003;
}
#execution-dock .execution-session-menu:not([open])>.run-secondary { display:none; }
body[data-context=workbench] #execution-dock .run-secondary>button { min-height:44px; padding:6px 9px; font-size:12px; text-align:left; white-space:normal; }
#execution-dock .execution-locale { display:none; }
html:not(:lang(pt)):not(:lang(es)) #execution-dock .execution-locale:lang(en),
html:lang(pt) #execution-dock .execution-locale:lang(pt),
html:lang(es) #execution-dock .execution-locale:lang(es) { display:inline; }
/* The existing mobile controls are real responsive controls with the same
   handlers; they are neither hidden proxy nodes nor a second fixed footer. */
body[data-context=workbench] #execution-dock .mobile-execution { display:none; }
@media(max-width:1100px) and (min-width:901px) {
  body[data-context=workbench] #execution-dock { gap:8px; padding-inline:10px; }
  #execution-dock .execution-main { gap:8px; }
  #execution-dock .execution-options { gap:9px; }
  #execution-dock #run-status { max-width:110px; font-size:10px; }
  #execution-dock .run-options { gap:6px; }
}
@media(max-width:900px) {
  body[data-context=workbench] #execution-dock { grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; padding:6px 10px; }
  #execution-dock .execution-main { grid-column:1/-1; }
  #execution-dock .execution-desktop-clock,#execution-dock .execution-desktop-buttons { display:none!important; }
  body[data-context=workbench] #execution-dock .mobile-execution {
    position:static; display:grid; grid-template-columns:minmax(116px,1fr) minmax(0,1fr) minmax(0,1fr);
    align-items:center; gap:7px; width:100%; height:auto; margin:0; padding:0;
    border:0; background:transparent; box-shadow:none; z-index:auto;
  }
  body[data-context=workbench] #execution-dock .execution-mobile-clock { min-width:0; width:100%; min-height:44px; padding:3px 5px; }
  #execution-dock .mobile-execution:has(#mobile-step[hidden]) { grid-template-columns:minmax(116px,1fr) minmax(0,2fr); }
  body[data-context=workbench] #execution-dock .mobile-execution button { min-height:44px; white-space:normal; min-width:0; }
  #execution-dock .execution-options { grid-column:1; justify-content:flex-start; gap:10px; }
  #execution-dock .execution-session-menu { grid-column:2; }
  #execution-dock .execution-session-menu>summary { min-height:44px; }
  #execution-dock .run-options>label { min-height:44px; }
  body[data-context] .sidebar,body[data-context] #drawer-shade { bottom:0; }
}
@media(max-width:560px) {
  body[data-context=workbench] #execution-dock { padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px)); }
  #execution-dock .execution-mobile-clock strong { font-size:18px; }
  #execution-dock .execution-mobile-clock>span { font-size:8px; letter-spacing:0; }
  body[data-context=workbench] #execution-dock .mobile-execution button { font-size:11px; padding-inline:4px; }
  #execution-dock #run-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  #execution-dock .execution-options { gap:0; }
  #execution-dock .run-options { gap:8px; }
}
@media(prefers-reduced-motion:reduce) { #execution-dock .execution-menu-chevron { transition:none; } }
