/* EMWave v1.4.5a — Header specificity repair.
   Header-only specificity cleanup; no selector or visual changes intended. */



/* ===== header.css ===== */
.instrument-header{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(420px,580px);
  align-items:center;
  gap:var(--space-4);
  padding:0 var(--space-5);
  background:var(--color-bg-panel);
  border-bottom:1px solid var(--color-border-soft);
}
.eyebrow{
  font-size:var(--font-size-xs);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--color-text-status-label);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}@media (max-width:820px){

  .instrument-header{ grid-template-columns:1fr; padding:var(--space-3) var(--space-4); }
}
.brand-block{ min-width:0; }
.header-ops{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 64px 32px;
  align-items:center;
  gap:10px;
}
.help-button{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--color-border-strong);
  border-radius:2px;
  background:var(--control-bg);
  color:var(--color-text-heading);
  font-family:"Roboto Mono","Consolas",monospace;
  font-size:15px;
  font-weight:700;
  line-height:1;
  text-decoration:none;
  transition:background var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast);
}
.help-button:hover{
  background:var(--control-bg-hover);
  border-color:#6e7a8f;
  color:#ffffff;
}
.help-button.is-current{
  color:#b9d7ff;
  border-color:#506782;
  background:#121b27;
}@media (max-width:820px){

  .header-ops{ grid-template-columns:minmax(0,1fr) 56px 30px; }
}
html.help-document .instrument-header{
  flex:0 0 auto;
}
html.help-document .header-ops{
  grid-template-columns:minmax(0,1fr) auto;
}
.experiments-button{
  width:60px;
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}@media (max-width:820px){

  .experiments-button{ width:54px; font-size:9px; }
}
body:not(.help-page) .instrument-header{
  min-height:52px;
  padding-top:4px;
  padding-bottom:4px;
  overflow:visible;
}
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(0,1fr) 68px 34px;
  align-items:center;
}
body:not(.help-page) .help-button,
body:not(.help-page) .experiments-button{
  grid-column:auto;
  align-self:center;
  margin:0;
}
body:not(.help-page) .experiments-button{
  width:64px;
  height:28px;
  min-height:28px;
}@media (max-width:820px){

  body:not(.help-page) .instrument-header{
    min-height:auto;
    padding:var(--space-3) var(--space-4);
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 58px 30px;
  }
  body:not(.help-page) .experiments-button{
    width:56px;
  }
}@media (max-width:920px){

  .instrument-header{
    grid-template-columns:1fr;
    min-height:56px;
    padding:6px 10px;
    row-gap:4px;
  }
  .header-ops{ min-width:0; }
}
body:not(.help-page) .global-control-bar,
body:not(.help-page) .control-deck,
body:not(.help-page) .plot-deck,
body:not(.help-page) .instrument-header,
body:not(.help-page) .statusbar{
  min-width:0;
}@media (max-width:1100px){

  body:not(.help-page) .instrument-header{
    grid-template-columns:1fr;
    gap:6px;
    padding:7px 10px;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 58px 30px;
    gap:6px;
  }
}@media (max-width:620px){

  body:not(.help-page) .header-ops{
    grid-template-columns:1fr 54px 28px;
  }
}@media (max-width:1100px){

  body:not(.help-page) .instrument-header{
    position:sticky;
    top:0;
    z-index:20;
    background:rgba(18,22,29,.98);
  }
}@media (max-width:1100px){

  body:not(.help-page) .instrument-shell,
  body:not(.help-page) .instrument-header,
  body:not(.help-page) .global-control-bar,
  body:not(.help-page) .plot-deck,
  body:not(.help-page) .statusbar{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
  }
  body:not(.help-page) .instrument-header{
    grid-template-columns:minmax(0,1fr) minmax(0,1.85fr);
    padding-left:10px;
    padding-right:10px;
  }
  body:not(.help-page) .header-ops{
    min-width:0;
    grid-template-columns:minmax(0,1fr) 56px 28px;
    gap:7px;
  }
}@media (max-width:760px){

  body:not(.help-page) .instrument-header{
    grid-template-columns:1fr;
    gap:7px;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 52px 28px;
  }
}
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(0,1fr) 64px 46px 46px 34px;
  gap:8px;
}
body:not(.help-page) .diagnostics-button{
  width:46px;
  height:28px;
  min-height:28px;
  grid-column:auto;
  margin:0;
  font-size:9px;
  letter-spacing:.06em;
  text-transform:uppercase;
}@media (max-width:820px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 56px 42px 42px 30px;
    gap:5px;
  }
  body:not(.help-page) .diagnostics-button{
    width:42px;
    font-size:8px;
  }
}
.instrument-version{
  margin-left:6px;
  color:var(--color-text-status-label);
  font-family:"Roboto Mono","Consolas",monospace;
  font-size:10px;
  font-weight:500;
  letter-spacing:.04em;
  opacity:.52;
}@media (max-width:1000px){

  body:not(.help-page) .instrument-header{
    position:sticky;
    top:0;
    z-index:30;
    grid-template-columns:1fr;
    gap:7px;
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 56px 42px 42px 30px;
  }
}@media (max-width:620px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 52px 40px 40px 28px;
    gap:4px;
  }
  body:not(.help-page) .diagnostics-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .help-button{
    font-size:8px;
  }
}
.instrument-subtitle{
  margin-left:8px;
  color:#8fb6ff;
  font-size:10px;
  font-weight:500;
  letter-spacing:.06em;
  text-transform:uppercase;
}@media (max-width:1180px){

  .instrument-subtitle{ display:none; }
}
body:not(.help-page) .eyebrow{ display:none; }
body:not(.help-page) .brand-block h1{ margin-top:0; }@media (max-width:1100px){

  body:not(.help-page) .instrument-header{
    min-height:38px;
    display:grid;
    grid-template-columns:minmax(170px,.85fr) minmax(520px,1.4fr);
    gap:8px;
    padding:4px 10px;
    align-items:center;
    position:sticky;
    top:0;
    z-index:30;
  }
  body:not(.help-page) .brand-block{ min-width:0; }
  body:not(.help-page) .instrument-subtitle{ display:none; }
  body:not(.help-page) .instrument-version{ font-size:9px; opacity:.7; }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(210px,1fr) 54px 54px 54px 28px;
    gap:5px;
  }
  body:not(.help-page) .help-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button{
    width:auto;
    min-width:0;
    height:24px;
    min-height:24px;
    padding:0 6px;
    font-size:9px;
  }
}@media (max-width:760px){

  body:not(.help-page) .instrument-header{
    grid-template-columns:1fr;
    gap:4px;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 48px 48px 48px 26px;
  }
}
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(0,1fr) 48px 58px 64px 46px 46px 34px;
  gap:7px;
}
.cockpit-button{
  width:auto;
  min-width:48px;
  height:28px;
  min-height:28px;
  grid-column:auto;
  margin:0;
  padding:0 8px;
  font-size:9px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.cockpit-button.is-active{
  color:#dff2ff;
  border-color:#8fd4ff;
  background:#101923;
}@media (max-width:1180px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) 44px 52px 56px 42px 42px 30px;
    gap:5px;
  }
  .cockpit-button{ min-width:44px; padding:0 5px; font-size:8px; }
}@media (max-width:760px){

  body:not(.help-page) .header-ops{
    grid-template-columns:repeat(6, minmax(0,1fr));
  }
  .cockpit-button,.experiments-button,.diagnostics-button,.help-button{ width:100%; min-width:0; }
}
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(0,1fr) 48px 58px 64px 46px 46px 34px;
}
body:not(.help-page) .instrument-header{
  grid-column:1 / -1;
  grid-row:1 / 2;
}
body:not(.help-page).analysis-large-dock-active .instrument-header{
  grid-column:1 / -1;
  grid-row:1 / 2;
}
body:not(.help-page) .header-ops{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
body:not(.help-page) .header-ops .status-strip{
  flex:1 1 380px;
  min-width:240px;
  max-width:560px;
}
body:not(.help-page) .header-ops .help-button{
  flex:0 0 auto;
}
body:not(.help-page) .header-transport-button{
  width:auto;
  min-width:88px;
  height:28px;
  min-height:28px;
  margin:0;
  padding:0 11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  grid-column:auto;
  border-radius:2px;
  font-family:"Roboto Mono","Consolas",monospace;
  font-size:10px;
  line-height:1;
  letter-spacing:.07em;
  white-space:nowrap;
  text-transform:uppercase;
}
body:not(.help-page) .header-audio-button{
  min-width:116px;
  border-color:#4b654f;
  background:#132019;
  color:var(--control-text-active);
}
body:not(.help-page) .header-audio-button .audio-icon{ color:#89d185; }
body:not(.help-page) .header-audio-button:not(.is-active){
  border-color:var(--control-border);
  background:var(--control-bg);
  color:#c6ced9;
}
body:not(.help-page) .header-audio-button:not(.is-active) .audio-icon{ color:#626c7a; }
body.plot-focus:not(.help-page) .header-transport-button{
  min-width:96px;
  height:30px;
}@media (max-width:1180px){

  body:not(.help-page) .header-ops{ gap:5px; }
  body:not(.help-page) .header-ops .status-strip{ max-width:300px; min-width:160px; }
  body:not(.help-page) .header-transport-button{ min-width:68px; padding:0 8px; }
  body:not(.help-page) .header-audio-button{ min-width:84px; }
  body:not(.help-page) .header-transport-button .audio-label{ max-width:62px; overflow:hidden; text-overflow:ellipsis; }
}
body:not(.help-page) .instrument-header{
  grid-template-columns:minmax(230px, max-content) minmax(0, 1fr);
  column-gap:12px;
}
body:not(.help-page) .brand-block{
  min-width:0;
  max-width:430px;
}
body:not(.help-page) .brand-block h1{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body:not(.help-page) .header-ops{
  display:grid;
  grid-template-columns:minmax(460px, 1fr) repeat(8, auto);
  align-items:center;
  gap:7px;
  min-width:0;
  width:100%;
}
body:not(.help-page) .header-ops .status-strip{
  grid-column:1 / 2;
  width:100%;
  min-width:0;
  max-width:none;
  display:grid;
  grid-template-columns:repeat(3, minmax(135px, 1fr));
  gap:6px;
}
body:not(.help-page) .header-ops .readout{
  min-width:0;
  height:28px;
  grid-template-columns:auto minmax(0,1fr);
  padding:4px 8px;
  background:rgba(13,17,24,.58);
  border:1px solid rgba(79,91,110,.42);
}
body:not(.help-page) .header-ops .readout span{
  font-size:9px;
  letter-spacing:.07em;
}
body:not(.help-page) .header-ops .readout strong{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  text-align:right;
}
body:not(.help-page) .header-ops .help-button{
  grid-column:auto;
}
body:not(.help-page) .header-transport-button{
  min-width:82px;
}
body:not(.help-page) .cockpit-button,
body:not(.help-page) .experiments-button,
body:not(.help-page) .diagnostics-button{
  min-width:48px;
}@media (max-width:1500px){

  body:not(.help-page) .instrument-header{
    grid-template-columns:minmax(190px, 260px) minmax(0, 1fr);
  }
  body:not(.help-page) .brand-block .instrument-subtitle{
    display:none;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(300px, 1fr) repeat(8, auto);
    gap:5px;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-template-columns:repeat(3, minmax(95px, 1fr));
    gap:4px;
  }
  body:not(.help-page) .header-ops .readout{
    padding:3px 5px;
  }
  body:not(.help-page) .header-ops .readout span{
    font-size:8px;
  }
  body:not(.help-page) .header-ops .readout strong{
    font-size:10px;
  }
  body:not(.help-page) .header-transport-button{
    min-width:72px;
  }
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button{
    min-width:42px;
    padding-left:7px;
    padding-right:7px;
  }
}@media (max-width:1180px){

  body:not(.help-page) .instrument-header{
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    row-gap:4px;
    min-height:70px;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-template-columns:repeat(3, minmax(80px, 1fr));
  }
}
body:not(.help-page) .instrument-header{
  min-height:48px;
  height:48px;
  position:relative;
  z-index:80;
  overflow:hidden;
  align-items:center;
  background:var(--control-bg-active);
  border-bottom:1px solid var(--color-border-soft);
}
body:not(.help-page) .instrument-header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:#2b313b;
  pointer-events:none;
}
body:not(.help-page) .header-ops{
  height:34px;
  align-self:center;
  align-items:center;
  overflow:hidden;
}
body:not(.help-page) .header-ops .status-strip{
  height:30px;
  align-self:center;
  align-items:center;
  overflow:hidden;
}
body:not(.help-page) .header-ops .readout{
  height:30px;
  min-height:30px;
  max-height:30px;
  margin:0;
  align-self:center;
  overflow:hidden;
  box-shadow:none;
}
body:not(.help-page) .header-ops .help-button{
  height:30px;
  min-height:30px;
  max-height:30px;
  margin:0;
  align-self:center;
}@media (max-width:1180px){

  body:not(.help-page) .instrument-header{
    height:auto;
    min-height:70px;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops{
    height:auto;
  }
}
body.plot-focus:not(.help-page) .instrument-header{
  box-shadow:0 1px 0 rgba(143,212,255,.10), 0 10px 24px rgba(0,0,0,.18);
}@media (max-width:1540px){

  body.plot-focus:not(.help-page) .instrument-header{
    grid-template-columns:minmax(190px,.62fr) minmax(0,1.38fr);
    padding-left:10px;
    padding-right:10px;
  }
  body.plot-focus:not(.help-page) .header-ops{
    gap:6px;
  }
  body.plot-focus:not(.help-page) .header-ops .status-strip{
    gap:4px;
  }
  body.plot-focus:not(.help-page) .header-transport-button{
    min-width:78px;
    padding-left:8px;
    padding-right:8px;
  }
  body.plot-focus:not(.help-page) .header-audio-button{ min-width:92px; }
  body.plot-focus:not(.help-page) .cockpit-button,
  body.plot-focus:not(.help-page) .experiments-button,
  body.plot-focus:not(.help-page) .diagnostics-button{
    min-width:48px;
    padding-left:8px;
    padding-right:8px;
    font-size:9px;
  }
}@media (max-width:1300px){

  body.plot-focus:not(.help-page) .instrument-header{
    grid-template-columns:minmax(150px,.42fr) minmax(0,1.58fr);
  }
}@media (max-width:1100px){

  body.plot-focus:not(.help-page) .instrument-header{
    min-height:62px;
    grid-template-columns:1fr;
    gap:4px;
    padding:6px 8px;
  }
  body.plot-focus:not(.help-page) .instrument-title .instrument-subtitle,
  body.plot-focus:not(.help-page) .instrument-title .instrument-version{
    display:none;
  }
  body.plot-focus:not(.help-page) .header-ops{
    gap:4px;
  }
  body.plot-focus:not(.help-page) .header-transport-button,
  body.plot-focus:not(.help-page) .header-audio-button,
  body.plot-focus:not(.help-page) .cockpit-button,
  body.plot-focus:not(.help-page) .experiments-button,
  body.plot-focus:not(.help-page) .diagnostics-button,
  body.plot-focus:not(.help-page) .help-button{
    min-width:42px;
    padding-left:6px;
    padding-right:6px;
    font-size:8px;
  }
  body.plot-focus:not(.help-page) .header-transport-button{ min-width:66px; }
  body.plot-focus:not(.help-page) .header-audio-button{ min-width:78px; }
}

/* ===== left-dock.css ===== */
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(460px, 1fr) repeat(8, auto);
}
body:not(.help-page) .header-ops > .help-button:last-child{
  min-width:32px;
  width:32px;
  display:inline-flex;
  visibility:visible;
}@media (max-width:1500px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(300px, 1fr) repeat(8, auto);
  }
}@media (max-width:1180px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) repeat(8, auto);
  }
}
body:not(.help-page) .instrument-header{ grid-column:1 / -1; grid-row:1 / 2; }

/* ===== animation.css ===== */
/* EMWave v1.4.0 — Animation and motion owner.
   Future hover, glow, RUN/status pulse and footer highlight effects should live here. */

/* ===== safety.css ===== */
/* EMWave v1.4.0w — production safety layer
   Loaded last. Use only for Plotly conflicts, visibility protection, z-index
   corrections and hard responsive overrides. */
body:not(.help-page) .instrument-header{
  grid-column:1 / -1;
  grid-row:1 / 2;
  min-width:0;
}
body:not(.help-page) .header-ops > .help-button,
body:not(.help-page) .header-ops > .header-transport-button,
body:not(.help-page) .header-ops > .header-audio-button{
  display:inline-flex;
  visibility:visible;
  opacity:1;
  position:relative;
  z-index:60;
}


/* v1.4.0x header button visibility + responsive header ownership hotfix
   The header must never clip transport/control buttons in Focus/Edit mode.
   Keep the telemetry strip flexible and reserve explicit max-content tracks
   for RUN, AUDIO, EDIT, FOCUS, EXP, DIAG, PERF, CSS and ?. */
body:not(.help-page) .instrument-header{
  overflow:visible;
  z-index:120;
}
body:not(.help-page) .header-ops{
  display:grid;
  grid-template-columns:minmax(230px,1fr) repeat(9,max-content);
  align-items:center;
  gap:6px;
  min-width:0;
  width:100%;
  overflow:visible;
}
body:not(.help-page) .header-ops .status-strip{
  grid-column:1 / 2;
  display:grid;
  grid-template-columns:repeat(3,minmax(72px,1fr));
  min-width:0;
  width:100%;
  max-width:none;
  overflow:hidden;
}
body:not(.help-page) .header-ops > .help-button,
body:not(.help-page) .header-ops > .header-transport-button,
body:not(.help-page) .header-ops > .header-audio-button,
body:not(.help-page) .header-ops > .cockpit-button,
body:not(.help-page) .header-ops > .experiments-button,
body:not(.help-page) .header-ops > .diagnostics-button{
  grid-column:auto;
  display:inline-flex;
  visibility:visible;
  opacity:1;
  position:relative;
  z-index:140;
  flex:0 0 auto;
  white-space:nowrap;
}
body:not(.help-page) .header-transport-button{ min-width:74px; }
body:not(.help-page) .header-audio-button{ min-width:102px; }
body:not(.help-page) .cockpit-button,
body:not(.help-page) .experiments-button,
body:not(.help-page) .diagnostics-button{ min-width:44px; }
body:not(.help-page) .header-ops > .help-button:last-child{ min-width:30px; width:30px; }@media (max-width:1500px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(150px,1fr) repeat(9,max-content);
    gap:4px;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-template-columns:repeat(3,minmax(54px,1fr));
    gap:3px;
  }
  body:not(.help-page) .header-ops .readout{ padding-left:4px; padding-right:4px; }
  body:not(.help-page) .header-transport-button{ min-width:64px; padding-left:6px; padding-right:6px; }
  body:not(.help-page) .header-audio-button{ min-width:82px; }
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button{ min-width:38px; padding-left:5px; padding-right:5px; }
}@media (max-width:1180px){

  body:not(.help-page) .instrument-header{
    height:auto;
    min-height:70px;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr) repeat(9,max-content);
    grid-auto-rows:auto;
    overflow:visible;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-column:1 / -1;
    grid-row:1;
  }
}

/* v1.4.5a stable source dock rollback */


/* ===== v1.4.5a developer header toggle + subtle header polish ===== */
body:not(.help-page) .header-ops{
  grid-template-columns:minmax(430px,1fr);
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  align-items:center;
  gap:8px;
}
body:not(.help-page) .header-ops .status-strip{
  min-width:0;
  gap:7px;
}
body:not(.help-page) .header-ops .readout{
  height:28px;
  border-color:rgba(89,105,128,.55);
  background:linear-gradient(180deg,rgba(16,22,31,.78),rgba(10,14,20,.62));
}
body:not(.help-page) .header-ops .help-button{
  height:28px;
  min-height:28px;
  border-color:rgba(78,91,112,.78);
}
body:not(.help-page) .header-transport-button{
  min-width:88px;
}
body:not(.help-page) .cockpit-button,
body:not(.help-page) .experiments-button{
  min-width:54px;
}
body:not(.help-page) .developer-header-button{
  display:none;
}
body.dev-tools-enabled:not(.help-page) .developer-header-button{
  display:inline-flex;
}@media (max-width:1500px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(300px,1fr);
    gap:6px;
  }
  body:not(.help-page) .header-transport-button{ min-width:78px; }
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button{ min-width:48px; }
}@media (max-width:1180px){

  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(0,1fr);
    grid-auto-columns:minmax(38px,max-content);
    gap:5px;
  }
  body:not(.help-page) .header-ops .status-strip{ min-width:160px; }
}


/* ===== v1.4.5a dev tools default-off fix ===== */
body:not(.help-page):not(.dev-tools-enabled) .developer-header-button{
  display:none;
}
/* ===== v1.4.5a header navigation regression hotfix =====
   Header transport buttons share IDs with dock controls. The older dock owner
   uses ID selectors for #toggleAnimation / #toggleAudio, so the header must
   explicitly reclaim grid placement inside .header-ops without changing the
   visual design. */
body:not(.help-page) .header-ops > #toggleAnimation.header-run-button,
body:not(.help-page) .header-ops > #toggleAudio.header-audio-button{
  grid-column:auto;
  grid-row:auto;
  align-self:center;
  justify-self:auto;
  width:auto;
  margin:0;
}

body:not(.help-page) .header-ops > #toggleAnimation.header-run-button{
  min-width:88px;
}

body:not(.help-page) .header-ops > #toggleAudio.header-audio-button{
  min-width:104px;
}

body:not(.help-page) .header-ops > .cockpit-button,
body:not(.help-page) .header-ops > .experiments-button,
body:not(.help-page) .header-ops > .diagnostics-button,
body:not(.help-page) .header-ops > .help-button{
  grid-column:auto;
  grid-row:auto;
  align-self:center;
  margin:0;
}

@media (max-width:1500px){
  body:not(.help-page) .header-ops > #toggleAnimation.header-run-button{ min-width:78px; }
  body:not(.help-page) .header-ops > #toggleAudio.header-audio-button{ min-width:86px; }
}

/* ===== v1.4.5a responsive header repair =====
   Restore compact adaptive navigation after header specificity cleanup.
   Large screens keep the single-row instrument header. Medium screens use
   two rows; narrow screens use a three-row stacked header. */
@media (max-width:1180px) and (min-width:761px){
  body:not(.help-page) .instrument-header{
    height:auto;
    min-height:72px;
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:20px 34px;
    align-content:center;
    row-gap:5px;
    padding:6px 8px;
    overflow:hidden;
  }
  body:not(.help-page) .brand-block{
    min-width:0;
    align-self:end;
  }
  body:not(.help-page) .brand-block h1{
    line-height:18px;
    font-size:12px;
  }
  body:not(.help-page) .instrument-version{
    font-size:8px;
  }
  body:not(.help-page) .header-ops{
    height:34px;
    min-width:0;
    width:100%;
    display:grid;
    grid-template-columns:minmax(170px,1fr) repeat(9,max-content);
    grid-auto-flow:column;
    align-items:center;
    gap:4px;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-column:auto;
    width:100%;
    min-width:0;
    height:28px;
    display:grid;
    grid-template-columns:repeat(3,minmax(48px,1fr));
    gap:3px;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops .readout{
    height:28px;
    min-height:28px;
    max-height:28px;
    padding:3px 4px;
  }
  body:not(.help-page) .header-ops .readout span{ font-size:7px; }
  body:not(.help-page) .header-ops .readout strong{ font-size:9px; }
  body:not(.help-page) .header-ops > .help-button,
  body:not(.help-page) .header-ops > .header-transport-button,
  body:not(.help-page) .header-ops > .header-audio-button,
  body:not(.help-page) .header-ops > .cockpit-button,
  body:not(.help-page) .header-ops > .experiments-button,
  body:not(.help-page) .header-ops > .diagnostics-button{
    height:26px;
    min-height:26px;
    max-height:26px;
    padding-left:5px;
    padding-right:5px;
    font-size:8px;
  }
  body:not(.help-page) .header-ops > #toggleAnimation.header-run-button{ min-width:58px; }
  body:not(.help-page) .header-ops > #toggleAudio.header-audio-button{ min-width:76px; }
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button{ min-width:36px; }
  body:not(.help-page) .header-ops > .help-button:last-child{ min-width:26px; width:26px; }
}

@media (max-width:760px){
  body:not(.help-page) .instrument-header{
    height:auto;
    min-height:104px;
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:20px 30px 30px;
    align-content:center;
    row-gap:5px;
    padding:7px 8px;
    overflow:hidden;
  }
  body:not(.help-page) .brand-block h1{
    line-height:18px;
    font-size:12px;
  }
  body:not(.help-page) .header-ops{
    height:auto;
    min-width:0;
    width:100%;
    display:grid;
    grid-template-columns:repeat(9,minmax(0,max-content));
    grid-template-rows:30px 28px;
    align-items:center;
    justify-content:start;
    gap:4px;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-column:1 / -1;
    grid-row:1;
    width:100%;
    min-width:0;
    height:28px;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:3px;
  }
  body:not(.help-page) .header-ops .readout{
    height:28px;
    min-height:28px;
    max-height:28px;
    padding:3px 4px;
  }
  body:not(.help-page) .header-ops .readout span{ font-size:7px; }
  body:not(.help-page) .header-ops .readout strong{ font-size:9px; }
  body:not(.help-page) .header-ops > .help-button,
  body:not(.help-page) .header-ops > .header-transport-button,
  body:not(.help-page) .header-ops > .header-audio-button,
  body:not(.help-page) .header-ops > .cockpit-button,
  body:not(.help-page) .header-ops > .experiments-button,
  body:not(.help-page) .header-ops > .diagnostics-button{
    grid-row:2;
    height:26px;
    min-height:26px;
    max-height:26px;
    padding-left:4px;
    padding-right:4px;
    font-size:7px;
  }
  body:not(.help-page) .header-ops > #toggleAnimation.header-run-button{ min-width:52px; }
  body:not(.help-page) .header-ops > #toggleAudio.header-audio-button{ min-width:66px; }
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button{ min-width:32px; }
  body:not(.help-page) .header-ops > .help-button:last-child{ min-width:24px; width:24px; }
}

@media (max-width:1180px) and (min-width:761px){
  body.plot-focus:not(.help-page) .instrument-shell,
  body.plot-focus:not(.help-page).has-many-channels .instrument-shell,
  body.plot-focus:not(.help-page).control-view-primary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-secondary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-utility .instrument-shell,
  body.plot-focus:not(.help-page).analysis-large-dock-active .instrument-shell{
    grid-template-rows:72px minmax(0,1fr) var(--footer-height);
  }
}
@media (max-width:760px){
  body.plot-focus:not(.help-page) .instrument-shell,
  body.plot-focus:not(.help-page).has-many-channels .instrument-shell,
  body.plot-focus:not(.help-page).control-view-primary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-secondary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-utility .instrument-shell,
  body.plot-focus:not(.help-page).analysis-large-dock-active .instrument-shell{
    grid-template-rows:104px minmax(0,1fr) var(--footer-height);
  }
}

/* ===== v1.4.5a responsive compact polish =====
   Narrow-width polish only. Widescreen/header ownership remains unchanged.
   Prevent brand/metric/button collision in very compact responsive panes. */
@media (max-width:620px){
  body:not(.help-page) .instrument-header{
    min-height:132px;
    grid-template-columns:1fr;
    grid-template-rows:18px 28px 74px;
    align-content:start;
    row-gap:5px;
    padding:6px 7px;
    overflow:hidden;
  }
  body:not(.help-page) .brand-block{
    min-width:0;
    height:18px;
    overflow:hidden;
  }
  body:not(.help-page) .brand-block h1{
    max-width:100%;
    height:18px;
    line-height:18px;
    font-size:11px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body:not(.help-page) .brand-block .instrument-subtitle,
  body:not(.help-page) .brand-block .instrument-version{
    display:none;
  }
  body:not(.help-page) .header-ops{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-template-rows:28px 26px 26px;
    grid-auto-flow:row;
    gap:4px;
    width:100%;
    height:auto;
    min-width:0;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-column:1 / -1;
    grid-row:1;
    min-width:0;
    width:100%;
    height:28px;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:3px;
    overflow:hidden;
  }
  body:not(.help-page) .header-ops .readout{
    height:28px;
    min-height:28px;
    max-height:28px;
    padding:3px 4px;
    min-width:0;
  }
  body:not(.help-page) .header-ops .readout span{
    font-size:7px;
    letter-spacing:.04em;
  }
  body:not(.help-page) .header-ops .readout strong{
    font-size:8px;
  }
  body:not(.help-page) .header-ops > .help-button,
  body:not(.help-page) .header-ops > .header-transport-button,
  body:not(.help-page) .header-ops > .header-audio-button,
  body:not(.help-page) .header-ops > .cockpit-button,
  body:not(.help-page) .header-ops > .experiments-button,
  body:not(.help-page) .header-ops > .diagnostics-button{
    grid-column:auto;
    grid-row:auto;
    width:100%;
    min-width:0;
    height:26px;
    min-height:26px;
    max-height:26px;
    padding:0 3px;
    justify-content:center;
    font-size:7px;
    letter-spacing:.035em;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body:not(.help-page) .header-ops > #toggleAnimation.header-run-button,
  body:not(.help-page) .header-ops > #toggleAudio.header-audio-button,
  body:not(.help-page) .cockpit-button,
  body:not(.help-page) .experiments-button,
  body:not(.help-page) .diagnostics-button,
  body:not(.help-page) .header-ops > .help-button:last-child{
    min-width:0;
    width:100%;
  }
}

@media (max-width:460px){
  body:not(.help-page) .instrument-header{
    min-height:158px;
    grid-template-rows:18px 28px 100px;
  }
  body:not(.help-page) .header-ops{
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:28px repeat(3,26px);
  }
  body:not(.help-page) .header-ops .status-strip{
    grid-column:1 / -1;
  }
  body:not(.help-page) .header-ops .readout strong{
    font-size:7.5px;
  }
}

@media (max-width:620px){
  body.plot-focus:not(.help-page) .instrument-shell,
  body.plot-focus:not(.help-page).has-many-channels .instrument-shell,
  body.plot-focus:not(.help-page).control-view-primary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-secondary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-utility .instrument-shell,
  body.plot-focus:not(.help-page).analysis-large-dock-active .instrument-shell{
    grid-template-rows:132px minmax(0,1fr) var(--footer-height);
  }
}
@media (max-width:460px){
  body.plot-focus:not(.help-page) .instrument-shell,
  body.plot-focus:not(.help-page).has-many-channels .instrument-shell,
  body.plot-focus:not(.help-page).control-view-primary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-secondary .instrument-shell,
  body.plot-focus:not(.help-page).control-view-utility .instrument-shell,
  body.plot-focus:not(.help-page).analysis-large-dock-active .instrument-shell{
    grid-template-rows:158px minmax(0,1fr) var(--footer-height);
  }
}


/* ===== v1.4.5a PROFILE developer tool header accommodation ===== */
body:not(.help-page) .profile-button{
  min-width:68px;
}
@media (max-width:1180px) and (min-width:761px){
  body:not(.help-page) .header-ops{
    grid-template-columns:minmax(150px,1fr) repeat(10,max-content);
  }
  body:not(.help-page) .profile-button{
    min-width:58px;
  }
}
@media (max-width:760px){
  body:not(.help-page) .header-ops{
    grid-template-columns:repeat(10,minmax(0,max-content));
  }
  body:not(.help-page) .profile-button{
    min-width:42px;
  }
}
@media (max-width:620px){
  body:not(.help-page) .profile-button{
    min-width:0;
  }
}
