/* ==========================================================================
   somaCura "Night Shift" — Census A3 Priority Stack (2026-08-06)
   Port of .handoffs/census-priority-stack-2026-08-06/somacura-night-shift.css
   (PR #30, A3 direction).

   SCOPED (2026-08-07) — THIS FILE IS NOW SAFE TO CO-LINK. Every rule below
   lives under `.a3-surface`, and the design tokens are declared ON that
   container instead of `:root`. The one canonical mount is
   `<div class="census-host a3-surface">` in templates/census.html.

   WHY IT HAD TO BE SCOPED: unscoped, this file declared `:root` tokens with
   generic names (--line, --display, --warm, --surface, --canvas, --teal) and
   styled generic classes (.cell, .meta, .flag, .controls, .workspace, .brand).
   Co-linking that into the shell would have re-pigmented every themed surface
   in the app. Scoping also runs the collision the OTHER way: A3's rules now
   carry .a3-surface specificity, so a bare `.cell` rule from any of the
   shell's other stylesheets loses to them.

   Changes from the handoff file:
   - Fonts map to self-hosted faces (CSP is default-src 'self'): Inter and
     JetBrains Mono via fonts.css. Go Mono is not vendored.
   - Mock topbar chrome (mainnav / theme pills / live cluster) removed.
   - Added .stub and .acuity-grid .new (the fold renders a
     NEW/ACTIVE count the mock's five-dot grid didn't carry).
   - The 8px rail is the floor (A1 failure); do not regress it.

   DENSITY PASS PILOT (2026-08-19, PLAN-DENSITY-PASS.md): every density
   declaration (font/padding/gap/margin/width/height/grid tracks + --field-*
   gradient stops) scaled ×0.80 with half-up integer rounding; values ≤8px
   left untouched (protects the 8px rail, hairlines, and sets an 8px type
   floor). Owner-ruled factor — matches the density he previously got via
   80% browser zoom. Column-floor breakpoints re-tuned ×0.8 (see WIDTH
   section). Borders/radii/shadows deliberately unscaled.
   ========================================================================== */
.a3-surface{
  --canvas:#0d0906; --void:#120c06; --obsidian:#160e08; --deep:#1b120c;
  --cacao:#21160f; --surface:#281b13; --surface-2:#302117; --surface-3:#3a2a20;
  --ledger-a:#1b120c; --ledger-b:#261910; --ledger-line:#684934;
  --ledger-id-a:#2c1e15; --ledger-id-b:#352319;
  --line:#4f392b; --line-soft:rgba(112,89,74,.42); --line-faint:rgba(255,248,240,.055);
  --display:#fff8f0; --warm:#f4e8d8; --reading:#e9dccf; --secondary:#bba188;
  --structural:#a88c73; --tertiary:#786351;
  --amber:#e9922e; --amber-hot:#ff853d; --gold:#d0a200; --brass:#bda45d;
  --scarlet:#fe8175; --magenta:#ed85b8; --teal:#2cb9aa; --olive:#9daf48;
  --harvest:#d79b29; --burnt:#fb864d;
  --rail-critical:#ff776c; --rail-worsening:#ff8fc4; --rail-new:#ffa03a;
  --rail-improving:#33c8b8; --rail-stable:#a9be4f;
  --label-critical:#ffb5ae; --label-worsening:#ffb1d6; --label-new:#ffc276;
  --label-improving:#5dd7ca; --label-stable:#bdcf68;
  /* State fields — MUTED 2026-08-06 (owner ruling): the A3 large-area tint
     survives only as a subtle hue shift over the ledger browns (~30% of the
     original saturation). Distinguishability now rides the 8px rail + state
     label + border whisper; critical keeps one faint outer ring. */
  --field-new:linear-gradient(90deg,#3f2814 0 93px,#3c2718 93px 352px,#21150d 352px 100%);
  --field-worsening:linear-gradient(90deg,#3d2023 0 93px,#3c2422 93px 352px,#221414 352px 100%);
  --field-critical:linear-gradient(90deg,#442118 0 93px,#40241b 93px 352px,#25150f 352px 100%);
  --field-ledger-a:linear-gradient(90deg,#2c1e15 0 352px,var(--ledger-a) 352px 100%);
  --field-ledger-b:linear-gradient(90deg,#352319 0 352px,var(--ledger-b) 352px 100%);
  --sans:"Inter","Helvetica Neue",Arial,sans-serif;
  --mono:"JetBrains Mono","SFMono-Regular",Consolas,"Liberation Mono",monospace;

  font-family:var(--sans);background:var(--canvas);color:var(--reading);
  font-feature-settings:"tnum" 1,"cv02" 1,"cv03" 1;
  -webkit-font-smoothing:antialiased;
}
.a3-surface *{box-sizing:border-box}

/* ---- canonical chart-shell atmosphere, contained to the host ---- */
.census-host.a3-surface{
  position:relative;width:100%;min-height:100%;overflow-x:hidden;overflow-y:auto;
  background:
    radial-gradient(80% 48% at 50% 9%,rgba(112,89,74,.15),transparent 65%),
    radial-gradient(55% 48% at 50% 53%,rgba(58,42,32,.12),transparent 72%),
    linear-gradient(180deg,#100b07 0%,#0d0906 42%,#0a0705 100%);
}

/* ============ PAGE HEAD ============ */
.a3-surface .workspace{width:min(1392px,calc(100% - 38px));margin:16px auto 22px}
.a3-surface .page-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;margin-bottom:11px}
.a3-surface .title-wrap{display:flex;align-items:baseline;gap:14px}
.a3-surface .title-wrap h1{margin:0;color:var(--amber);font-family:var(--sans);font-size:22px;line-height:1;font-weight:720;letter-spacing:.015em}
.a3-surface .service{font:600 8px/1 var(--mono);letter-spacing:.18em;color:var(--structural)}
.a3-surface .shift-summary{font:500 9px/1 var(--mono);letter-spacing:.04em;color:var(--structural)}
.a3-surface .head-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px;justify-self:end}
/* Surface-owned ADD PATIENT / PREP SHIFT for the EMBEDDED board (2026-08-07).
   The board replaced the v2 census header that carried these, and the nav
   quick-actions die at max-width:1920px — without them every doctor below
   1921px loses Add Patient (the 2026-08-06 coworker report). Sized to sit on
   the head-right stack without pushing the freshness stamp off its baseline. */
.a3-surface .a3-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  justify-content:flex-end;justify-self:end;align-self:end}
.a3-surface .a3-head-action{font:700 8px/1 var(--mono);letter-spacing:.12em;
  color:var(--amber);padding:8px 10px;border-radius:5px;cursor:pointer;white-space:nowrap;
  background:rgba(233,146,46,.08);border:1px solid rgba(233,146,46,.42)}
.a3-surface .a3-head-action:hover{background:rgba(233,146,46,.16);color:var(--warm)}
.a3-surface .a3-head-action--primary{color:#1b120c;border-color:transparent;
  background:linear-gradient(180deg,var(--amber),#c9741f)}
.a3-surface .a3-head-action--primary:hover{filter:brightness(1.1);color:#1b120c}
/* ============ COMMAND STRIP ============ */
.a3-surface .command-strip{height:59px;display:grid;grid-template-columns:1.05fr 1.55fr .85fr 1.25fr;
  border:1px solid rgba(112,89,74,.5);border-radius:10px;
  background:linear-gradient(180deg,rgba(33,22,15,.78),rgba(19,13,9,.78));
  box-shadow:0 14px 40px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.025);overflow:hidden}
.a3-surface .metric{padding:10px 16px;position:relative}
.a3-surface .metric+.metric{border-left:1px solid rgba(112,89,74,.28)}
.a3-surface .metric label{display:block;font:700 8px/1 var(--mono);letter-spacing:.18em;color:var(--structural);margin-bottom:8px}
.a3-surface .stub{font:700 7px/1 var(--mono);letter-spacing:.12em;color:var(--tertiary);
  border:1px solid rgba(120,99,81,.5);border-radius:3px;padding:2px 4px;margin-left:6px;
  vertical-align:super}
.a3-surface .acuity-grid{display:flex;align-items:center;gap:10px}
.a3-surface .acuity-grid .c{font:700 10px/1 var(--mono);display:flex;align-items:center;gap:6px;color:var(--secondary)}
.a3-surface .acuity-grid .c::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;
  box-shadow:0 0 10px color-mix(in srgb,currentColor 48%,transparent)}
.a3-surface .acuity-grid .critical{color:var(--scarlet)}
.a3-surface .acuity-grid .worsening{color:var(--magenta)}
.a3-surface .acuity-grid .improving{color:var(--harvest)}
.a3-surface .acuity-grid .stable{color:var(--olive)}
.a3-surface .acuity-grid .new{color:var(--amber)}
.a3-surface .acuity-grid .muted{color:#665445}
.a3-surface .metric-line{font:500 9px/1.2 var(--mono);color:var(--secondary);white-space:nowrap}
.a3-surface .metric-line b{font-size:10px}
.a3-surface .metric-line i{display:inline-block;width:3px;height:3px;border-radius:50%;background:#5a4737;margin:0 8px 2px}
.a3-surface .critical-t{color:var(--magenta)}
.a3-surface .teal-t{color:var(--teal)}
.a3-surface .olive-t{color:var(--olive)}
.a3-surface .amber-t{color:var(--amber)}
.a3-surface .bigline{display:flex;align-items:baseline;gap:7px}
.a3-surface .bigline b{color:var(--teal);font:720 20px/1 var(--sans)}
.a3-surface .bigline span{font:650 9px/1 var(--mono);color:var(--teal)}
.a3-surface .bigline small{font:500 8px/1 var(--mono);color:var(--secondary);margin-left:8px}
.a3-surface .capacity-line{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:7px}
.a3-surface .capacity-line b{font:730 16px/1 var(--sans);color:var(--warm)}
.a3-surface .capacity-line span{font:550 8px/1 var(--mono);color:var(--secondary)}

/* ============ CONTROLS ============ */
.a3-surface .controls{height:37px;display:flex;align-items:center;gap:10px}
.a3-surface .a3-patient-search{display:inline-flex;align-items:center;gap:8px;margin-right:auto}
.a3-surface .a3-patient-search-label{font:700 8px/1 var(--mono);letter-spacing:.08em;color:var(--structural)}
.a3-surface .a3-patient-search-input{width:clamp(144px,22vw,256px);min-height:26px;border:1px solid var(--line);
  border-radius:3px;background:var(--surface);color:var(--reading);font:600 9px/1.2 var(--mono);padding:7px 8px}
.a3-surface .a3-patient-search-input:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.a3-surface .sort-label{font:700 8px/1 var(--mono);letter-spacing:.14em;color:var(--structural);display:flex;align-items:center;gap:8px}
.a3-surface .sort-label::before{content:"⇵";color:var(--amber)}
.a3-surface .control-pill{font:600 8px/1 var(--mono);letter-spacing:.07em;color:var(--structural);padding:8px 10px;
  border:1px solid rgba(112,89,74,.34);border-radius:5px;background:rgba(22,14,9,.54);cursor:pointer;
  transition:color .2s ease-out,border-color .2s ease-out,background .2s ease-out}
.a3-surface .control-pill:hover{color:var(--secondary)}
.a3-surface .control-pill.active{color:var(--warm);border-color:rgba(233,146,46,.38);background:rgba(233,146,46,.07)}

/* ============ TABLE STAGE ============ */
.a3-surface .table-stage{position:relative;padding:7px 9px 13px;border-radius:16px;
  background:linear-gradient(180deg,rgba(31,20,14,.31),rgba(10,7,5,.15) 90%,transparent);
  border-top:1px solid rgba(140,101,73,.24)}
.a3-surface .table-stage::before{content:"";position:absolute;inset:0;border-radius:16px;pointer-events:none;
  background:radial-gradient(90% 30% at 50% 0%,rgba(233,146,46,.035),transparent 65%)}
.a3-surface .a3-search-empty{margin:0;padding:29px 16px;text-align:center;color:var(--structural);
  font:600 9px/1.4 var(--mono)}
.a3-surface .column-head{height:22px;display:grid;grid-template-columns:88px 264px 72px minmax(264px,1.15fr) minmax(344px,1.25fr) 164px;
  align-items:center;padding:0 4px;font:700 8px/1 var(--mono);letter-spacing:.16em;color:#8e7661}
.a3-surface .column-head span{padding:0 11px}
.a3-surface .column-head span:last-child{text-align:right;padding-right:8px}

/* ============ PATIENT ROW — the atom (Priority Stack, Rev B2) ============ */
.a3-surface .patient-list{display:flex;flex-direction:column;gap:7px}
.a3-surface .patient-row{height:47px;display:grid;
  grid-template-columns:88px 264px 72px minmax(264px,1.15fr) minmax(344px,1.25fr) 164px;
  align-items:stretch;position:relative;overflow:hidden;
  border:1px solid rgba(126,91,67,.64);border-radius:7px;background:var(--field-ledger-a);
  box-shadow:0 7px 19px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,248,240,.035),inset 0 -1px 0 rgba(0,0,0,.38);
  cursor:pointer;transition:box-shadow .2s ease-out}
.a3-surface .patient-row:nth-child(even){background:var(--field-ledger-b);border-color:rgba(148,104,75,.68)}
.a3-surface .patient-row::before{content:"";position:absolute;left:0;top:0;bottom:0;width:8px;background:var(--amber)}
.a3-surface .patient-row::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(255,255,255,.022),transparent 38%,rgba(0,0,0,.09))}
/* selection ≠ severity: neutral white inner ring only, never a state tint */
.a3-surface .patient-row.selected{box-shadow:0 7px 19px rgba(0,0,0,.18),inset 0 0 0 1.5px rgba(255,248,240,.22)}
.a3-surface .patient-row:hover:not(.selected){box-shadow:0 7px 19px rgba(0,0,0,.18),inset 0 0 0 1px rgba(255,248,240,.06)}

.a3-surface .cell{min-width:0;display:flex;align-items:center;padding:0 11px;border-left:1px solid rgba(255,248,240,.065);
  position:relative;z-index:1}
.a3-surface .cell.room{border-left:0;justify-content:center;flex-direction:column;gap:5px;
  background:rgba(255,255,255,.035);border-right:1px solid rgba(255,248,240,.075);
  font:720 13px/1 var(--mono);color:#f3bc63;letter-spacing:-.02em}
.a3-surface .cell.room .state-label{font:750 7px/1 var(--mono);letter-spacing:.18em;color:var(--secondary)}
.a3-surface .cell.identity{flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;
  background:linear-gradient(90deg,rgba(255,255,255,.045),rgba(255,255,255,.012) 74%,transparent)}
.a3-surface .cell.identity strong{font:650 13px/1.05 var(--sans);color:#fff6eb;letter-spacing:-.012em}
.a3-surface .meta{font:500 8px/1.2 var(--mono);letter-spacing:.015em;color:#b69b82}
.a3-surface .name-line{display:flex;align-items:center;gap:7px;min-width:0}
.a3-surface .cell.day{flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;font-family:var(--mono)}
.a3-surface .cell.day strong{font-size:10px;color:var(--reading)}
.a3-surface .cell.day span{font-size:8px;color:var(--structural)}
.a3-surface .cell.complaint{font:520 11px/1 var(--sans);color:#f0dfd0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.a3-surface .cell.overnight{gap:7px;font:500 8px/1.25 var(--mono);color:#c1a184;white-space:nowrap;overflow:hidden}
.a3-surface .cell.overnight>span:last-child{overflow:hidden;text-overflow:ellipsis}
.a3-surface .cell.flags{justify-content:flex-end;align-content:center;gap:6px;flex-wrap:wrap;padding-right:8px}
/* ROW ARCHIVE + ARCHIVED SECTION (2026-08-11; in-flow 2026-08-21). The button
   is the last flex child of the FLAGS cell, taking real layout space after the
   flag chips — the old absolute overlay (right:8px, ~55px wide vs a 30px
   clear-zone padding) covered the NEW ADMIT chip on hover. Still hover-revealed
   via opacity: the space is reserved, the row just stays quiet until hovered. */
.a3-surface .a3-row-archive{flex:0 0 auto;
  font:700 8px/1 var(--mono);letter-spacing:.1em;color:var(--secondary);
  padding:5px 7px;border:1px solid rgba(112,89,74,.6);border-radius:4px;
  background:rgba(22,14,9,.92);cursor:pointer;opacity:0;
  transition:opacity .15s ease-out,color .15s ease-out,border-color .15s ease-out}
.a3-surface .patient-row:hover .a3-row-archive,
.a3-surface .patient-row:focus-within .a3-row-archive{opacity:1}
.a3-surface .a3-row-archive:hover{color:var(--scarlet);border-color:rgba(254,129,117,.5)}
/* touch / coarse pointers have no hover — keep the action visible */
@media (hover:none){.a3-surface .a3-row-archive{opacity:1}}
.a3-surface .a3-archive-section{margin-top:10px;border-top:1px solid rgba(112,89,74,.28);padding-top:8px}
.a3-surface .a3-archive-toggle{display:inline-flex;align-items:center;gap:8px;
  font:700 8px/1 var(--mono);letter-spacing:.14em;color:var(--secondary);
  padding:7px 8px;border:1px solid rgba(112,89,74,.6);border-radius:5px;
  background:rgba(22,14,9,.54);cursor:pointer;
  transition:color .2s ease-out,border-color .2s ease-out}
.a3-surface .a3-archive-toggle:hover{color:var(--secondary)}
.a3-surface .a3-archive-toggle[aria-expanded="true"]{color:var(--warm);border-color:rgba(233,146,46,.38)}
.a3-surface .a3-archive-caret{color:var(--amber)}
.a3-surface .a3-archive-body{margin-top:8px;display:flex;flex-direction:column;gap:5px}
.a3-surface .a3-archive-note{margin:0;padding:8px 10px;font:500 8px/1.4 var(--mono);color:var(--tertiary)}
.a3-surface .a3-archived-row{display:grid;grid-template-columns:64px minmax(160px,1fr) 48px auto;
  align-items:center;gap:10px;padding:7px 10px;border:1px solid rgba(126,91,67,.4);border-radius:6px;
  background:rgba(22,14,9,.4);font:500 9px/1 var(--mono);color:var(--secondary)}
.a3-surface .a3-archived-room{color:#f3bc63;font-weight:700}
.a3-surface .a3-archived-name{font:600 10px/1.1 var(--sans);color:var(--reading);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.a3-surface .a3-restore-btn{font:700 8px/1 var(--mono);letter-spacing:.1em;color:var(--teal);
  padding:5px 8px;border:1px solid rgba(44,185,170,.5);border-radius:4px;
  background:rgba(44,185,170,.12);cursor:pointer;
  transition:background .15s ease-out,color .15s ease-out}
.a3-surface .a3-restore-btn:hover{background:rgba(44,185,170,.14);color:#58d4c5}

/* "Other doctors" disclosure (2026-08-19): admin-only in practice — the
   backend pre-filters non-admin rosters, so nobody else ever has rows here.
   Mirrors the archive disclosure chrome; rows reuse .patient-list styling. */
.a3-surface .a3-others-section{margin-top:10px;border-top:1px solid rgba(112,89,74,.28);padding-top:8px}
.a3-surface .a3-others-toggle{display:inline-flex;align-items:center;gap:8px;
  font:700 8px/1 var(--mono);letter-spacing:.14em;color:var(--secondary);
  padding:7px 8px;border:1px solid rgba(112,89,74,.6);border-radius:5px;
  background:rgba(22,14,9,.54);cursor:pointer;
  transition:color .2s ease-out,border-color .2s ease-out}
.a3-surface .a3-others-toggle:hover{color:var(--secondary)}
.a3-surface .a3-others-toggle[aria-expanded="true"]{color:var(--warm);border-color:rgba(233,146,46,.38)}
.a3-surface .a3-others-list{margin-top:8px}
.a3-surface .a3-owner-badge{font:700 8px/1 var(--mono);letter-spacing:.1em;padding:4px 6px;border-radius:3px;
  color:#58d4c5;background:rgba(44,185,170,.06);border:1px solid rgba(44,185,170,.4);white-space:nowrap}

.a3-surface .severity-badge{font:700 8px/1 var(--mono);letter-spacing:.1em;padding:4px 6px;border-radius:3px;
  color:var(--magenta);background:rgba(237,133,184,.08);border:1px solid rgba(237,133,184,.34);
  box-shadow:0 0 12px rgba(237,133,184,.055);white-space:nowrap}
.a3-surface .flag{font:700 8px/1 var(--mono);letter-spacing:.065em;padding:5px 7px;border-radius:3px;
  border:1px solid rgba(187,161,136,.48);color:var(--secondary);background:rgba(187,161,136,.035);white-space:nowrap}
.a3-surface .flag-amber{color:var(--amber-hot);border-color:rgba(255,133,61,.64);background:rgba(255,133,61,.075)}
.a3-surface .flag-teal{color:#58d4c5;border-color:rgba(44,185,170,.62);background:rgba(44,185,170,.075)}
.a3-surface .flag-critical{color:var(--scarlet);border-color:rgba(254,129,117,.68);background:rgba(254,129,117,.08);
  box-shadow:0 0 12px rgba(254,129,117,.06)}

.a3-surface .trend{width:14px;display:inline-flex;justify-content:center;font:700 10px/1 var(--mono);flex:0 0 14px}
.a3-surface .trend-critical{color:var(--scarlet)}
.a3-surface .trend-worsening{color:var(--magenta)}
.a3-surface .trend-improving{color:var(--teal)}
.a3-surface .trend-stable{color:var(--olive)}
.a3-surface .trend-new{color:var(--amber)}

/* calm tiers: rail + label, surface stays on the ledger */
.a3-surface .state-improving::before{background:var(--rail-improving);box-shadow:0 0 10px rgba(44,185,170,.18)}
.a3-surface .state-improving .state-label{color:var(--label-improving)}
.a3-surface .state-stable::before{background:var(--rail-stable);box-shadow:0 0 8px rgba(157,175,72,.12)}
.a3-surface .state-stable .state-label{color:var(--label-stable)}
/* new/active: whisper-warm field, no colored glow (muted 2026-08-06) */
.a3-surface .state-new{border-color:rgba(233,146,46,.32);background:var(--field-new)}
.a3-surface .state-new::before{background:var(--rail-new);box-shadow:0 0 10px rgba(233,146,46,.18)}
.a3-surface .state-new .state-label{color:var(--label-new)}
/* worsening: whisper-plum field */
.a3-surface .state-worsening{border-color:rgba(237,133,184,.32);background:var(--field-worsening)}
.a3-surface .state-worsening::before{background:var(--rail-worsening);box-shadow:0 0 10px rgba(237,133,184,.20)}
.a3-surface .state-worsening .state-label{color:var(--label-worsening)}
/* critical: whisper-scarlet field + the one faint outer ring */
.a3-surface .state-critical{border:1px solid rgba(254,129,117,.45);background:var(--field-critical);
  box-shadow:0 0 0 1px rgba(254,129,117,.10),0 7px 19px rgba(0,0,0,.18)}
.a3-surface .state-critical::before{background:var(--rail-critical);box-shadow:0 0 12px rgba(254,129,117,.22)}
.a3-surface .state-critical .state-label{color:var(--label-critical)}

.a3-surface .footer-note{width:min(1392px,calc(100% - 38px));margin:12px auto 29px;
  text-align:center;font:500 8px/1 var(--mono);letter-spacing:.08em;color:#6f5b49}

/* ============ WIDTH ============================================
   THE COLUMN FLOOR IS THE REAL BREAKPOINT, NOT THE WORKSPACE WIDTH.
   The row/head grid below the first breakpoint used to sum to a hard floor
   while .workspace was already down to calc(100vw - margins). Measured at a
   1280 viewport that was scrollWidth 1534 vs clientWidth 1280 — 254px of
   silent horizontal overflow, and FLAGS (NEW ADMIT / DC TODAY / DC TOMORROW)
   sat off the right edge with no scroll cue. Widening the workspace alone
   never fixed it; the FLOORS have to come down with it. Any future column
   change must re-sum this row. (2026-08-06)
   DENSITY PASS 2026-08-19 (owner-ruled ×0.80, integer-rounded, 8px floor):
   base floor now 1196px (88+264+72+264+344+164) -> fits from ~1234px;
   breakpoints re-tuned ×0.8 to match (1560->1248, 1180->944).
   ============================================================== */
@media (max-width:1248px){
  .a3-surface .workspace,.a3-surface .footer-note{width:calc(100% - 26px)}
  /* floor sum 888px -> fits from ~914px viewport up */
  .a3-surface .column-head,.a3-surface .patient-row{
    grid-template-columns:80px 208px 64px minmax(192px,1.1fr) minmax(208px,1fr) 136px}
}
@media (max-width:944px){
  .a3-surface .workspace,.a3-surface .footer-note{width:calc(100% - 16px)}
  /* floor sum 708px -> fits from ~724px viewport up */
  .a3-surface .column-head,.a3-surface .patient-row{
    grid-template-columns:74px 168px 58px minmax(144px,1.1fr) minmax(152px,1fr) 112px}
}

/* The host's own width, not the viewport, drives the column floors. */
@container a3board (max-width:1248px){
  .census-host .column-head,.census-host .patient-row{
    grid-template-columns:80px 208px 64px minmax(192px,1.1fr) minmax(208px,1fr) 136px}
}
@container a3board (max-width:944px){
  .census-host .column-head,.census-host .patient-row{
    grid-template-columns:74px 168px 58px minmax(144px,1.1fr) minmax(152px,1fr) 112px}
}
.census-host{container:a3board / inline-size}
