/* Ultimate QC — the BHA table (bha_editor.js), its row properties (bha_props.js), its
   saved-BHA library (bha_library.js) and its live schematic (bha_schematic.js). Theme
   tokens only (GR-16). The table and the schematic sit side by side where both fit and
   fold to one column below that rather than squeeze (web-ui-craft: fold, never squeeze);
   the table scrolls inside its own box at 375 px (sheet_grid.css). */
/* the component's own width decides (a container, not the viewport): keyed to a 1150 px
   viewport, the /sagcheck column (830 px) squeezed the schematic to 277 px and its text to
   3 px, and pushed the table's last column out of view (2026-10-08) */
.bhaed { margin:6px 0; container-type:inline-size; container-name:bhaed; }
.bhaed-top { display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px 14px;
  margin-bottom:6px; }
.bhaed-body { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
@container bhaed (min-width:1200px) {
  /* side by side: the table keeps its columns in view, the schematic a third */
  .bhaed-body { grid-template-columns:minmax(0, 2fr) minmax(0, 1fr); align-items:start; }
}
.bhaed-grid, .bhaed-draw { min-width:0; }
/* a schematic is drawn at the width it is shown at (bha_schematic.js mount), never scaled
   down to its box, so its text is the size it says; a box under 320 px scrolls it */
svg.chart.bhaschem { width:auto; max-width:none; height:auto; }
.bhaed-svg, .bhaschem-fit { overflow-x:auto; }
.bhaed-draw svg text, .bhaschem-fit svg text { font-family:"IBM Plex Mono",Consolas,monospace; }
/* an imported КНБК's notes come one sentence a line */
.bhaed-notes { margin-top:4px; min-height:1em; white-space:pre-line; }
.bhaed-gut { display:inline-flex; align-items:center; gap:4px; max-width:220px; }
.bhaed-dis { font:inherit; font-size:11px; line-height:1; padding:2px 5px;
  border:1px solid var(--edge); border-radius:4px; background:var(--panel);
  color:var(--muted); cursor:pointer; }
.bhaed-dis:hover, .bhaed-dis:focus-visible { color:var(--ink); border-color:var(--accent); }
.bhaed-dis[aria-expanded="true"] { color:var(--accent); border-color:var(--accent-dim); }
.bhaed-sum { font-size:10.5px; color:var(--muted); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; max-width:190px; }
/* on a phone the summary would push the name out of the box: the disclosure's tooltip and
   the opened line carry it there */
@media (max-width:760px) { .bhaed-sum { display:none; } }
/* the properties under a row: captioned fields in lines that wrap */
/* the line stays in view while the wide table scrolls sideways under it */
.bhaprops { display:flex; flex-direction:column; gap:6px; position:sticky; left:8px;
  max-width:calc(100vw - 64px); }
.bp-line { display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px 12px; }
.bp-f { display:inline-flex; flex-direction:column; gap:2px; margin:0; }
/* a field's label carries its unit: not uppercased ('KG/M' read the m as mega) */
.bp-l { font-size:10.5px; font-weight:600; letter-spacing:.02em; color:var(--muted); }
.bp-in { font:inherit; font-size:12px; padding:3px 6px; width:170px;
  border:1px solid var(--edge); border-radius:4px; background:var(--panel);
  color:var(--ink); }
.bp-in.num { font-family:"IBM Plex Mono",Consolas,monospace; }
.bp-in::placeholder { color:var(--notrun); font-style:italic; }
select.bp-in { width:auto; }
.bp-x { font-family:"IBM Plex Mono",Consolas,monospace; font-size:11px;
  color:var(--muted); align-self:center; }
.bp-h { font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); margin-top:4px; }
.bp-sets .sheet-scroll { max-height:200px; }
.bhaed-lib { font-size:12px; }
.bhaed-lib summary { cursor:pointer; color:var(--accent); }
.bhaed-lib .bp-line { margin-top:6px; }
.bhaed-lib select.bp-in { max-width:320px; }
