/* Shared Investigator components. Load after tab sheets: tabs own their data
   layouts; this file owns the visual treatment of the components they share. */
:root {
  --work-gap: 16px;
  --work-pad: 16px;
  --work-radius: 8px;
  --work-title: 14px;
  --work-caption: 12px;
  --gut: 20px;
}

.ws-body { padding: 16px var(--gut) 28px; }
.ws-head { padding-inline: var(--gut); }
.workbench-heading { margin: 0 0 var(--work-gap); }
.workbench-heading h2 { margin: 0; font: 700 20px/1.3 var(--display); color: var(--ink); }
.workbench-heading p { margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.tb-app-name { font-size: 20px; }
.tab, .tab-screen .out, .tab-triage, .tab-report, .tab-token, .tab-trace,
.screen-evidence, .screen-context, .tri-col, .out, .stack { gap: var(--work-gap); }
.screen-layout, .mon-layout, .tab-triage .tri-body, .grid2 { gap: var(--work-gap); }
.grid2 { align-items: stretch; }

/* One surface, one border weight, one heading scale throughout the workbench. */
.tab .card, .tab .panel, .tab .disc, .tab .bm-stage,
.sheet, .tab .finding, .tab .list-row, .tab .tblwrap, .tab .cx-tbl,
.tab .tn-group, .chainpick-list, .tab .bm-panel, .tab .tr-pop-body {
  border: 2px solid var(--border-strong);
  border-radius: var(--work-radius);
  background-color: var(--panel);
  box-shadow: none;
}
.tab .card, .tab-monitor .card, .tab .finding, .tab .list-row { padding: var(--work-pad); }
.tab .panel-head, .tab .bm-bar { padding: 10px var(--work-pad); gap: 8px; border-bottom-color: var(--line); }
.tab .panel-body, .tab .disc-body { padding: var(--work-pad); }
.tab .card > h3, .tab-monitor .card > h3, .tab .panel-title,
.tab .disc > summary, .tab .cx-title, .tab .tn-title {
  font: 700 var(--work-title)/1.4 var(--display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.tab .card > h3 { margin: 0 0 12px; }
.tab .disc > summary { padding: 10px var(--work-pad); }
.tab .finding-head { gap: 8px; }
.tab .finding-body, .tab .disc-body { font-size: 13px; }
.tab .note { border: 0; border-radius: 0; padding: 8px 0; background: transparent; }
.tab .state-empty, .tab .state-error, .tab .state-partial {
  border: 2px solid var(--border-strong);
  border-radius: var(--work-radius);
  padding: var(--work-pad);
}
.tab .state-empty h3, .tab .state-error h3, .tab .state-partial h3 { font: 700 18px/1.35 var(--display); }
.tab .screen-verdict { border: 2px solid var(--border-strong); padding: var(--work-pad); border-radius: var(--work-radius); }
.screen-verdict .lead h2 { font-size: 20px; }
.tab .panel-head { background: var(--panel); }
.tab .rp-h1, .tab .tk-h1 { font-size: 20px; }
.tab .rp-lede, .tab .tk-lede { font-size: 13px; font-weight: 500; color: var(--dim); }

/* Descriptions use the body font; mono is reserved for addresses and values. */
.tab .sev { font-family: var(--font); font-size: 11px; line-height: 1.4; text-transform: none; letter-spacing: 0; padding: 3px 8px; }
.tab .statrow { border: 2px solid var(--border-strong); border-radius: var(--work-radius); }
.tab .stat, .mon-figures .stat { padding: 12px; }
.tab .stat .k { font: 600 var(--work-caption)/1.4 var(--font); letter-spacing: 0; text-transform: none; }
.tab .stat .v, .mon-figures .stat .v { font-size: 20px; margin-top: 4px; }
.screen-context .statrow { border: 0; }
.screen-context .stat { padding: 0 12px 12px 0; }
.screen-context .stat .v { font-size: 18px; }
.mon-figures, .mon-overview > .cx { margin-block: var(--work-gap) 0; }
.tab .tri-lbl, .tab .bm-range-k, .tab .rp-col-title, .tab .lbl {
  font: 600 var(--work-caption)/1.4 var(--font); letter-spacing: 0; text-transform: none;
}

/* Shared action geometry; primary actions retain the raised amber face. */
.btn, .tab .btn, .tab .tri-segbtn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 36px; border-radius: 6px; font-size: 12px; line-height: 1.4;
}
.btn:not(.btn-primary):hover:not(:disabled), .tab .tri-segbtn:hover { border-color: var(--ink); }
.action-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; }
.action-label { min-width: 0; overflow-wrap: break-word; }
.tab .in { min-height: 36px; border: 2px solid var(--border-strong); border-radius: 6px; }
.tab .in:focus { border-color: var(--accent-ink); }
.sheet { padding: var(--work-pad); }
.sheet-head h2 { font-size: 18px; }
.statusbar { height: auto; min-height: 40px; padding-block: 4px; }
.sb-btn { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--border-strong); border-radius: 6px; }

/* A consistent table frame with an identifiable subject during horizontal scroll. */
.tab .tblwrap table:has(th:nth-child(5)) { min-width: 680px; }
.tab .tblwrap th { font: 600 12px/1.4 var(--font); text-transform: none; letter-spacing: 0; white-space: nowrap; padding: 10px 12px; }
.tab .tblwrap td, .tab .tblwrap.dense td { font-size: 12px; padding: 9px 12px; }
.tab .tblwrap th:first-child, .tab .tblwrap td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--panel);
  box-shadow: 3px 0 4px -3px var(--border-strong);
}
.tab .tblwrap th:first-child { z-index: 3; background: var(--bg2); }
.tab .tblwrap tr.hit td:first-child, .tab .tblwrap .tri-row-venue td:first-child { background: #fff7f7; }
.tab .tblwrap tr.gap td:first-child { background: var(--highbg); }
.tab .tblwrap tr.tri-done td:first-child { background: var(--panel); }
.tab-token .tk-rank { display: block; font-size: 11px; color: var(--soft); margin-bottom: 3px; }
.tab-token .tk-holders .tblwrap th:first-child, .tab-token .tk-holders .tblwrap td:first-child { width: 220px; max-width: 220px; }
.tab-token .tk-holders .tblwrap table { table-layout: fixed; }

/* Every selected control is ink with light text, distinct from a light hover. */
.chainpick-list li[aria-selected=true], .tab .bm-tg[aria-pressed=true],
.tab .bm-clrow.on, .tab .bm-row.sel { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
.tab .bm-row.sel .bm-row-main:hover { background: #1e293b; }
.tab .bm-row.sel :is(.bm-row-a,.bm-row-m,.bm-row-l,.bm-eye), .tab .bm-clrow.on b { color: #fff; }
.tab .bm-row.sel .bm-eye:hover { color: var(--accent); }
.tab .bm-row.sel.off .bm-row-main { opacity: 1; }

/* The popup remains a compact, scrollable list, with filtering outside the listbox. */
.chainpick-list { padding: 8px; min-width: 220px; max-width: calc(100vw - 24px); }
.chainpick-list[hidden], .chainpick-list [hidden] { display: none; }
.chainpick-filter { width: 100%; min-height: 36px; margin: 0 0 6px; }
.chainpick-options { list-style: none; padding: 0; margin: 0; max-height: min(320px, 45dvh); overflow-y: auto; }
.chainpick-list li { padding: 7px 9px; font-size: 13px; min-height: 36px; }
.chainpick-list li:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }
.chainpick-empty { margin: 8px 0; }

@media (max-width: 1100px) and (min-width: 701px) {
  /* Labels keep the navigation recognizable at laptop and tablet widths. */
  .rail { flex-basis: 150px; align-items: stretch; }
  .rail-btn { flex-direction: row; justify-content: flex-start; gap: 8px; }
  .rail-lbl { display: block; }
}
@media (max-width: 700px) {
  :root { --gut: 12px; --work-gap: 12px; --work-pad: 12px; }
  .workbench-heading h2 { font-size: 18px; }
  .workbench-heading p { font-size: 13px; }
  .tb-app-name { font-size: 20px; }
  .tab .stat .v { font-size: 18px; }
  .btn, .tab .btn, .tab .tri-segbtn, .sb-btn { min-height: 44px; }
  .tab .in, .chainpick-filter { min-height: 44px; font-size: 16px; }
  .chainpick-list li { min-height: 44px; }
  .statusbar { min-height: 52px; }
  .tab .tblwrap th, .tab .tblwrap td, .tab .tblwrap.dense td { padding: 9px; }
  .tab .tblwrap th:first-child, .tab .tblwrap td:first-child { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { scroll-behavior: auto; transition: none; animation: none; }
}

/* ---------------------------------------------------------------- compact pass, 2026-11-09
   Tighter vertical rhythm everywhere; smaller controls where the pointer is a mouse; 44px
   targets where it is a finger. Loaded last so it settles the earlier per-tab values. */
:root { --work-gap: 12px; --work-pad: 14px; }
.ws-body { padding: 12px var(--gut) 24px; }
.workbench-heading { margin-bottom: 12px; }
.workbench-heading h2 { font-size: 18px; }
.workbench-heading p { margin-top: 2px; }
.tab .card > h3 { margin-bottom: 8px; }
.mon-head { margin-bottom: 8px; }
.tab .stat, .mon-figures .stat { padding: 9px 12px; }
.tab .stat .v, .mon-figures .stat .v { font-size: 18px; margin-top: 2px; }
.tab .tblwrap th { padding: 8px 10px; }
.tab .tblwrap td, .tab .tblwrap.dense td { padding: 7px 10px; }
.tab-monitor .finding { padding: 12px; }
.tab-monitor .finding + .finding { margin-top: 10px; }
.mon-thresholds { margin-block: 10px; }
.mon-search { margin-block: 10px; }

/* Screen: the verdict, the source-check rows and the account panel. */
.tab-screen .out, .screen-evidence, .screen-context { gap: 12px; }
.screen-layout { gap: 12px; }
.tab-screen .screen-verdict { padding: 14px 16px; }
.tab-screen .panel-head { min-height: 0; padding: 9px 14px; }
.tab-screen .panel-body { padding: 12px 14px; }
.tab-screen .vm-cell { padding: 9px 14px; gap: 3px 12px; }
.vm-detail, .vm-links { font-size: 12px; }
.screen-context .stat { padding: 0 10px 8px 0; }
.screen-context .stat .v { font-size: 16px; }
.screen-next p { margin: 0 0 10px; font-size: 13px; color: var(--dim); }
.screen-next .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* The status bar holds only the Shortcuts button now. */
.statusbar { min-height: 34px; padding-block: 3px; }

@media (pointer: fine) {
  .btn, .tab .btn, .tab .tri-segbtn, .tab-monitor .btn, .screen-context .panel-actions .btn { min-height: 30px; padding: 3px 10px; }
  .tab-triage .tri-seg-sm .tri-segbtn { min-height: 28px; }
  .tab .in, .chainpick-filter { min-height: 32px; }
  .chainpick-list li { min-height: 32px; padding-block: 5px; }
  .sb-btn { min-height: 26px; }
  .tab-monitor .tn-row .chk { min-height: 30px; }
  .tab-monitor .tn-row input[type=range] { min-height: 24px; }
  .tab-monitor .tn-row > :first-child { padding: 6px 8px; }
  .mon-thresholds > summary { min-height: 34px; padding-block: 7px; }
  .mon-search input { min-height: 34px; padding: 5px 10px; }
  .tab-report summary.rp-lane-sum { min-height: 34px; }
  .rail-btn { padding-block: 6px; }
}

@media (max-width: 700px) {
  /* Nothing is left on the status bar at phone width (the shortcut sheet needs a keyboard). */
  .statusbar { display: none; }
  /* The eight tabs sit in a four by two grid, so every tab is on screen without a sideways
     scroll that hides Entities and Lists past the edge. */
  .rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; padding: 6px var(--gut); }
  .rail-btn { width: 100%; min-width: 0; min-height: 44px; justify-content: center; gap: 5px; padding: 4px 6px; font-size: 13px; }
  .rail-lbl { flex: 0 1 auto; white-space: nowrap; }
  .rail-n { font-size: 9.5px; padding: 0 4px; }
  .tab-screen .vm-cell { padding: 10px 12px; }
  .tab-screen .vm-links .srclink { min-height: 44px; }
}
