/* THE BRAIN BEHIND THEIR SYMPTOMS (Lee, 21 Oct 2026: "if i type in symptoms in PC - it should light up brain areas? i should
   be looking out for for treating") — the Brain tab when the caret line names no brain part, and its drawings' sheet
   (public/brain-behind-panel.js). The tab keeps the helpers' fixed area (styles.css .ni-note-helpers): one head line of one
   height, rows of one height, the list scrolling inside the tab — what it says changes as the PC is typed, the space it
   takes never does. Shared rules only: no element is built with a custom property of its own (WebKit keeps the memory). */

/* the head: one line, its words cut short rather than wrapped, the tools at its end; a narrow tab (the notes column at
   1200 px, a phone) gives their symptoms the room: the tab's own name is "Brain", so the heading words go first */
#brainPanel.is-behind { container: bb-panel / inline-size; }
#brainPanel.is-behind > .ni-decoder-head { display: flex; align-items: center; gap: 6px; height: 22px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; }
#brainPanel.is-behind #brainHead { flex: none; }
#brainPanel.is-behind #brainSub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#brainPanel.is-behind #brainSub::before { content: "— "; }
.ni-bb-tools { flex: none; display: inline-flex; gap: 6px; align-items: center; }
.ni-bb-tools:empty { display: none; }
.ni-bb-tool { height: 22px; box-sizing: border-box; padding: 0 9px; border: 1px solid var(--anat-pale); border-radius: 999px; background: #fff; color: var(--anat-dk);
  font: 700 11px/20px var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; }
.ni-bb-tool:hover { border-color: var(--anat); color: var(--anat-dk); background: var(--anat-light); }
.ni-bb-tool:focus-visible { outline: 2px solid var(--anat); outline-offset: 1px; }
@container bb-panel (max-width: 440px) {
  #brainPanel.is-behind #brainHead { display: none; }
  #brainPanel.is-behind #brainSub::before { content: none; }
  .ni-bb-long { display: none; }
}

/* the list, and where they are beside it */
.ni-bb { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; align-items: start; }
.ni-bb-list { list-style: none; margin: 0; padding: 0; min-width: 0; container: bb-list / inline-size; }
.ni-bb-row { display: flex; align-items: center; gap: 7px; height: 21px; min-width: 0; border-bottom: 1px solid rgba(125, 91, 166, .12); font: 500 12px/21px var(--font); color: var(--text-muted); white-space: nowrap; }
.ni-bb-row:last-child { border-bottom: 0; }
.ni-bb-n { flex: none; width: 30px; font: 800 11px/21px var(--font); color: var(--anat-dk); font-variant-numeric: tabular-nums; }
.ni-bb-row.is-all .ni-bb-n { color: #fff; background: var(--anat); border-radius: 5px; text-align: center; line-height: 17px; height: 17px; }
.ni-bb-ab { flex: none; max-width: 92px; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 800; }
.ni-bb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ni-bb-lines { flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; color: var(--text-light); }
.ni-bb-ln { color: #0b6f6a; font-weight: 700; }
.ni-bb-ln.is-code { color: var(--anat-dk); }
.ni-bb-ln.is-none { color: var(--text-light); font-weight: 500; font-style: italic; }
.ni-bb-row.is-faint { opacity: .62; }
.ni-bb-sec { height: 21px; font: 800 9.5px/24px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-light); }
/* where they are: one button a part of the nervous system, its count; sticky, so it stays in sight as the list scrolls */
.ni-bb-where { position: sticky; top: 0; display: flex; flex-direction: column; gap: 3px; }
.ni-bb-where-h { margin: 0 0 1px; height: 14px; font: 800 9.5px/14px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-light); }
.ni-bb-wh { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 21px; padding: 0 8px; box-sizing: border-box; border: 1px solid var(--anat-pale);
  border-radius: 6px; background: #fff; font: 600 11.5px/19px var(--font); color: var(--anat-dk); cursor: zoom-in; white-space: nowrap; }
.ni-bb-wh:hover { border-color: var(--anat); background: var(--anat-light); }
.ni-bb-wh:focus-visible { outline: 2px solid var(--anat); outline-offset: 1px; }
.ni-bb-wh-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ni-bb-wh-n { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.ni-bb-last, .ni-bb-foot, .ni-bb-wait { margin: 6px 0 0; font: 500 10.5px/1.4 var(--font); color: var(--text-light); }
.ni-bb-last b { color: var(--text-muted); }
.ni-bb-wait { font-size: 12px; color: var(--text-muted); }
/* a narrow list (the notes column at 1200 px): the code and its lines, the full name in the row's tooltip */
@container bb-list (max-width: 320px) {
  .ni-bb-name { display: none; }
  .ni-bb-lines { flex: 1 1 auto; max-width: none; text-align: right; }
}
/* a narrow tab (a phone, a narrow window): the regions and their lines, where they are a tap on "Drawings" away */
@media (max-width: 700px) {
  .ni-bb { grid-template-columns: minmax(0, 1fr); }
  .ni-bb-where { display: none; }
  .ni-bb-name { display: none; }
  .ni-bb-lines { flex: 1 1 auto; max-width: none; }
}

/* the sheet: the drawings, lit together, over the right-hand side (the builder's sheet's place, .ni-pk-sheet) */
.ni-bb-sheet { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--anat); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(30, 24, 60, .18); overflow: hidden; }
.ni-bb-sheet-h { flex: none; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--border); }
.ni-bb-sheet-r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ni-bb-sheet-t { flex: 1 1 auto; min-width: 0; margin: 0; font: 800 15px/1.2 var(--font); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-bb-sheet-kinds { margin: 3px 0 6px; height: 16px; font: 600 12px/16px var(--font); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-bb-vtabs { display: flex; gap: 5px; flex-wrap: nowrap; overflow: hidden; }
.ni-bb-vtab { flex: none; height: 24px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font: 700 11.5px/22px var(--font); color: var(--text-muted); cursor: pointer; }
.ni-bb-vtab:hover { border-color: var(--anat-mid); color: var(--anat-dk); }
.ni-bb-vtab.is-on { background: var(--anat); border-color: var(--anat); color: #fff; }
.ni-bb-sheet-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px 14px; }
.ni-bb-sheet-fig svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.ni-bb-sheet-note { margin: 0 0 6px; font: 600 12.5px/1.4 var(--font); color: var(--text-muted); }
.ni-bb-cord { margin: 0 0 8px; padding-left: 18px; font: 500 12.5px/1.6 var(--font); color: var(--text-muted); }
.ni-bb-cord b { color: var(--text); }
