/* Shared workbench chrome. Plot series, phases, qualification and warning colors
   remain owned by the individual workbenches. Loaded after waveform view styles. */
body .gcw-root.gcw-workbench-usability {
  --gcw-usability-rail-width: 76px;
  --gcw-usability-line: #dce3e9;
  --gcw-usability-muted: #526171;
  --gcw-usability-selected: #e6f4f1;
  --gcw-usability-primary: #0f766e;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-measurements-with-dock {
  grid-template-columns: var(--gcw-usability-rail-width) minmax(0, 1fr) !important;
}
body .gcw-root.gcw-workbench-usability.gcw-tool-open:is(.gcw-analysis-mode.gcw-react-root,.gcw-viewport-full) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] {
  grid-template-columns: var(--gcw-usability-rail-width) minmax(0, 1fr) !important;
}
body .gcw-root.gcw-workbench-usability.gcw-tool-open:is(.gcw-analysis-mode.gcw-react-root,.gcw-viewport-full) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-measurements-with-dock {
  grid-template-columns: var(--gcw-usability-rail-width) 0 !important;
  width: var(--gcw-usability-rail-width) !important;
  min-width: var(--gcw-usability-rail-width) !important;
  max-width: var(--gcw-usability-rail-width) !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock {
  width: var(--gcw-usability-rail-width) !important;
  min-width: var(--gcw-usability-rail-width) !important;
  max-width: var(--gcw-usability-rail-width) !important;
  background: #f5f7f9 !important;
  border-right: 1px solid var(--gcw-usability-line) !important;
  box-shadow: none !important;
  overflow: hidden auto !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-tool-rail-inner {
  gap: 2px !important;
  padding: 4px !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-btn {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 3px 2px !important;
  gap: 1px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--gcw-usability-muted) !important;
  transform: none !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-icon {
  flex: 0 0 18px !important;
  width: 22px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  font: 650 15px/18px system-ui, sans-serif !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-label {
  display: block !important;
  position: static !important;
  width: auto !important;
  max-width: 100% !important;
  opacity: 1 !important;
  transform: none !important;
  color: inherit !important;
  font: 550 10.5px/15px system-ui, sans-serif !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-btn:not(.is-active):is(:hover,:focus-visible) {
  background: #e9edf2 !important;
  color: #334155 !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-btn.is-active {
  background: var(--gcw-usability-selected) !important;
  color: var(--gcw-usability-primary) !important;
  box-shadow: inset 3px 0 var(--gcw-usability-primary) !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-btn.is-active .gcw-tool-label { font-weight: 700 !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-module-dock .gcw-tool-btn.is-active .gcw-tool-icon {
  color: var(--gcw-usability-primary) !important;
}

/* Context and layout actions occupy one row; no floating controls cover plots. */
body .gcw-root.gcw-workbench-usability .gcw-workbench-context {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  border: 0 !important;
  border-bottom: 1px solid var(--gcw-usability-line) !important;
  border-radius: 0 !important;
  background: #f8fafb !important;
  box-shadow: none !important;
  color: #263445 !important;
}
body .gcw-root.gcw-workbench-usability .gcw-workbench-context-values {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: 10px !important;
  white-space: nowrap !important;
}
body .gcw-root.gcw-workbench-usability .gcw-context-item {
  display: inline-flex !important;
  align-items: baseline !important;
  min-width: 0 !important;
  gap: 4px !important;
  color: #263445 !important;
  font: 500 11px/22px system-ui, sans-serif !important;
}
body .gcw-root.gcw-workbench-usability .gcw-context-item small { font: 400 10.5px/22px system-ui, sans-serif !important; color: var(--gcw-usability-muted) !important; }
body .gcw-root.gcw-workbench-usability .gcw-context-item strong { font: 600 11px/22px system-ui, sans-serif !important; color: #263445 !important; overflow: hidden; text-overflow: ellipsis; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-source-review-actions { margin: 0 !important; gap: 5px !important; flex-wrap: wrap !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-source-review-actions label { display: flex !important; align-items: center !important; gap: 4px !important; font-size: 11px !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-source-review-actions select { width: 150px !important; max-width: 180px !important; min-height: 25px !important; padding: 2px 5px !important; font-size: 11px !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-source-review-actions button { min-height: 25px !important; padding: 3px 6px !important; font-size: 11px !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-query-page.gcw-workbench-shell .gcw-workbench-context .gcw-workbench-floating-toolbar {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: static !important;
  inset: auto !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
  min-height: 24px !important;
  padding: 0 !important;
  gap: 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-floating-toolbar .gcw-workbench-tool-btn span { display: inline !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context > small[role][hidden] { display: none !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-tool-btn { border: 1px solid var(--gcw-usability-line) !important; border-radius: 4px !important; background: #fff !important; padding: 3px 6px !important; min-height: 24px !important; font: 550 10.5px/16px system-ui, sans-serif !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-tool-btn:is(:hover,:focus-visible) { color: var(--gcw-usability-primary) !important; border-color: var(--gcw-usability-primary) !important; background: var(--gcw-usability-selected) !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context > small[role] { flex-basis: 100%; font-size: 11px !important; line-height: 1.35 !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-query-page > :is(.gcw-query-page-head,.gcw-query-status) { display: none !important; }

/* Neutral surfaces and legible supporting text; warnings remain untouched. */
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-engineering-tool-drawer,.gcw-engineering-tool-body,.gcw-query-chart-wrap) {
  min-width: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-info-pane,.gcw-generic-result-panel,.gcw-frequency-info-pane,.gcw-frequency-result-panel,.gcw-tool-uplot-shell,.gcw-harmonics-modern-aside,.gcw-readout-result-panel,.gcw-phasor-plot-panel) {
  border-color: var(--gcw-usability-line) !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-shadow: none !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-tool-drawer-head,.gcw-generic-info-head,.gcw-generic-result-head,.gcw-tool-uplot-head,.gcw-harmonics-modern-head,.gcw-phasor-live-head,.gcw-frequency-info-head,.gcw-frequency-result-head) {
  min-width: 0 !important;
  background: #f5f7f9 !important;
  border-color: var(--gcw-usability-line) !important;
  box-shadow: none !important;
}
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-info-head,.gcw-generic-result-head,.gcw-tool-uplot-head,.gcw-phasor-live-head) strong { font-weight: 650 !important; font-size: 12px !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-info-head,.gcw-generic-result-head,.gcw-tool-uplot-head,.gcw-phasor-live-head) :is(small,span) { font-weight: 450 !important; font-size: 11px !important; white-space: normal !important; overflow-wrap: anywhere !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-control-card,.gcw-generic-focus-list,.gcw-generic-visual-card,.gcw-generic-summary-strip > article) { border-color: var(--gcw-usability-line) !important; border-radius: 5px !important; background: #fff !important; box-shadow: none !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-control-card,.gcw-generic-note-card,.gcw-generic-focus-list) :is(p,li,small) { font-size: 12px !important; line-height: 1.4 !important; font-weight: 450 !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-summary-strip small,.gcw-generic-summary-strip em,.gcw-generic-focus-list li span) { font-size: 11px !important; line-height: 1.4 !important; font-weight: 500 !important; white-space: normal !important; overflow-wrap: anywhere !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-tool-input,.gcw-tool-input-label,.gcw-btn-soft,.gcw-tool-secondary,.gcw-tool-layout-action) { border-color: var(--gcw-usability-line) !important; border-radius: 5px !important; background: #fff !important; color: #334155 !important; box-shadow: none !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-side-resizer,.gcw-generic-freeze-resizer,.gcw-generic-table-resizer,.gcw-workbench-wave-splitter) { background: #f1f4f7 !important; border-color: var(--gcw-usability-line) !important; box-shadow: none !important; color: var(--gcw-usability-muted) !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-generic-side-resizer,.gcw-generic-freeze-resizer,.gcw-generic-table-resizer)::before { background: #94a3b8 !important; box-shadow: none !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] :is(.gcw-workbench-wave-label,.gcw-workbench-wave-action) { background: transparent !important; border-color: transparent !important; border-radius: 4px !important; color: #475569 !important; box-shadow: none !important; font: 550 11px/18px system-ui, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; }
body .gcw-root.gcw-workbench-usability:is(.gcw-analysis-mode.gcw-react-root,.gcw-tool-open) .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] .gcw-workbench-wave-grip { background: #94a3b8 !important; box-shadow: none !important; }
body .gcw-root.gcw-workbench-usability :is(button,select,input,summary):focus-visible { outline: 2px solid var(--gcw-usability-primary) !important; outline-offset: 2px !important; }
body .gcw-root.gcw-workbench-usability .gcw-query-page[data-tool="evidence"] .gcw-evidence-verdict-head > em { display: none !important; }

/* Both paired traces start below the tallest complete record heading. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 761px) {
    body .gcw-root.gcw-workbench-usability .gcw-multi-wave-panels.is-side-by-side { grid-template-rows: auto auto; align-items: stretch; }
    body .gcw-root.gcw-workbench-usability .gcw-multi-wave-panels.is-side-by-side > .gcw-multi-wave-panel { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 0; }
    body .gcw-root.gcw-workbench-usability .gcw-multi-wave-panels.is-side-by-side > .gcw-multi-wave-panel > header { align-self: stretch; }
  }
}

/* Shared generic evidence can scroll instead of being cropped below fixed panes. */
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-query-page.gcw-workbench-shell .gcw-workbench-context .gcw-workbench-floating-toolbar { transform: none !important; width: auto !important; height: auto !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-tool-btn { width: auto !important; min-width: max-content !important; flex: 0 0 auto !important; }
body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-tool-btn > span { display: inline !important; width: auto !important; max-width: none !important; opacity: 1 !important; transform: none !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-generic-result-panel { overflow: auto !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-generic-freeze-pane { flex-shrink: 1 !important; min-height: 150px !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-generic-live-zone { min-height: 120px !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-generic-table-wrap { flex-shrink: 1 !important; min-height: 140px !important; }
body .gcw-root.gcw-workbench-usability.gcw-tool-open .gcw-generic-plot-zone .gcw-tool-uplot-shell { min-height: 0 !important; }

/* Phasor geometry owns a square data plane; let its measured stage determine size. */
body .gcw-root.gcw-workbench-usability.gcw-analysis-mode.gcw-react-root .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] [data-gcw-phasor-viewport="fit"] .gcw-phasor-plot-panel { display: flex !important; flex-direction: column !important; min-height: 0 !important; overflow: visible !important; }
body .gcw-root.gcw-workbench-usability.gcw-analysis-mode.gcw-react-root .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] [data-gcw-phasor-viewport="fit"] :is(.gcw-phasor-graph-player-bar,.gcw-phasor-plot-scale) { flex: 0 0 auto !important; min-height: 0 !important; }
body .gcw-root.gcw-workbench-usability.gcw-analysis-mode.gcw-react-root .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] [data-gcw-phasor-viewport="fit"] .gcw-phasor-plane-stage { flex: 1 1 auto !important; min-width: 0 !important; min-height: 0 !important; container-type: size; display: grid; justify-items: center; align-items: center; overflow: visible; }
body .gcw-root.gcw-workbench-usability.gcw-analysis-mode.gcw-react-root .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] [data-gcw-phasor-viewport="fit"] .gcw-phasor-plane-stage > .gcw-tool-uplot-shell { width: min(100cqw,calc(100cqh + 22px)) !important; max-width: 100% !important; height: min(100cqh,calc(100cqw - 22px)) !important; min-height: 0 !important; max-height: 100% !important; flex: none !important; margin: 0 !important; padding: 0 !important; }
body .gcw-root.gcw-workbench-usability.gcw-analysis-mode.gcw-react-root .gcw-protection-workspace.gcw-results .gcw-workspace[data-gcw-layout] [data-gcw-phasor-viewport="fit"] .gcw-phasor-plane-stage .gcw-tool-uplot { width: 100% !important; height: 100% !important; min-height: 0 !important; }

@media (max-width: 1100px) {
  body .gcw-root.gcw-workbench-usability .gcw-workbench-context-values { gap: 7px !important; }
  body .gcw-root.gcw-workbench-usability .gcw-context-item { gap: 3px !important; }
  body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-source-review-actions select { width: 115px !important; }
}
@media (max-width: 760px) {
  body .gcw-root.gcw-workbench-usability { --gcw-usability-rail-width: 66px; }
  body .gcw-root.gcw-workbench-usability .gcw-workbench-context { gap: 4px 8px !important; padding: 4px 6px !important; }
  body .gcw-root.gcw-workbench-usability .gcw-workbench-context-values { flex-wrap: wrap !important; gap: 0 10px !important; }
  body .gcw-root.gcw-workbench-usability .gcw-workbench-context .gcw-workbench-floating-toolbar { margin-left: 0 !important; flex-wrap: wrap !important; }
}
