/* Clinic Console — the shell.
   One stylesheet, three layouts. The markup never changes shape; this file
   decides whether a pass is a column of chips under your thumb or a fields
   panel beside a cockpit. */

:root {
  --bg:        #091418;
  --ink:       #f4fbfa;
  --ink-2:     #d8e8e6;
  --dim:       #c1d5d2;

  --dimmer:    #afc7c3;
  --faint:     #a0bbb7;
  --hush:      #304c51;
  --rule:      #73999b;
  --label:     #d4e8e5;

  --teal:      #72e5d5;
  --teal-2:    #a3e4dc;
  --amber:     #ffd17a;
  --amber-ink: #ffe5b2;
  --red:       #ff9a8d;
  --red-ink:   #ffc7bf;
  --red-solid: #b52b26;

  --line:      #405c62;
  --line-soft: #304c51;
  --panel:     #13282b;
  --panel-2:   #102125;
  --sunk:      #0b1c20;
  --map-numb:  #91bdff;
  --map-swell: #ffb83d;

  color-scheme: dark;

  --r:   10px;
  --r-l: 14px;

  --display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --serif:   "Newsreader", Georgia, serif;

  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --z1: 0 10px 24px rgba(0,0,0,0.32);
  --z2: 0 22px 48px rgba(0,0,0,0.46);
  --z3: -34px 0 72px rgba(0,0,0,0.55);
  /* Shared with the front desk: opaque grounds and readable secondary text. */
  --panel-hover: #1b3236;
  --selected-bg: #193b3a;
  --accent-ink: #06221e;
}
/* 💛 CareBee · Basic info on the folder (9 Nov) */
.cbb-label { font-size: 11px; color: var(--dim); }
.cbb-row { padding: 2px 0; }
.cbb-past { color: var(--dim); text-decoration: line-through; }
.cbb-date, .cbb-status { color: var(--dim); }
.cbb-foot { margin-top: 6px; font-size: 11px; color: var(--dim); }
/* 📏 CareBee's shared height and weight (appmeasure.ts) */
.pam-chart { display: block; max-width: 100%; color: var(--ink); margin: 4px 0; }
.pam-row { padding: 2px 0; }
.pam-day, .pam-also, .pam-words, .pam-when, .pam-note { color: var(--dim); }
.pam-day { margin-right: 8px; }
.pam-note { margin-top: 6px; font-size: 11px; }


* { box-sizing: border-box; }

/* A BUTTON NEVER FALLS BACK TO THE BROWSER'S OWN GREY (24 Sept, "the
   contrast is hard to see"). Under color-scheme: dark Chromium paints an
   unstyled <button> rgb(107,107,107), and a row built as a button that set
   no background of its own -- the day's schedule, the tasks, the Diary
   chip -- drew its teal-grey text on that grey at 2.0:1. :where() weighs
   nothing, so every class that paints a button still wins. */
:where(button) { background-color: transparent; color: inherit; }
/* SELECTED TEXT STAYS READABLE (4 Oct 2026, his report: the patient-ID chip
   went white-on-bright-blue). No ::selection existed anywhere, so a double-click
   or a drag painted the SYSTEM highlight -- blue under white text on this dark
   ground. The theme's own pair instead: --teal under --bg, ~11:1 at night and
   ~5:1 by day (verify_brand_and_selection measures both). */
::selection { background: var(--teal); color: var(--bg); }
/* A LINK WITH NO CLASS of its own was the browser's #0000EE on a near-black
   ground. :where() keeps it at zero specificity: every styled link wins. */
:where(a) { color: var(--teal); }

html, body {
  margin: 0; height: 100%;
  background:
    radial-gradient(1400px 900px at 44% 34%, #0c1a1c 0%, #071012 58%, #04090a 100%),
    var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { display: flex; flex-direction: column; }

.mono  { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.dim   { color: var(--dimmer); }
.tiny  { font-size: var(--tiny, 11px); }  /* dom.js's tiny(): the size it was given, until the desktop's scale raises it */
.kicker {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; color: var(--teal);
}
.spacer { flex: 1 1 auto; }
.rule { width: 1px; height: 18px; background: rgba(79,214,200,0.18); flex: 0 0 auto; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dot-red   { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-teal  { background: var(--teal); }

/* the orb — the recording, and the one living thing on screen. Everything
   else that moves on this app is a person's finger. */
.pill-rec .dot {
  width: 14px; height: 14px;
  background: radial-gradient(circle at 36% 30%, #ffd9d3, #e05a4a 55%, #5e1d16 85%, #2a0d09);
  box-shadow: 0 0 9px rgba(224,90,74,0.5), inset 0 1px 3px rgba(255,255,255,0.28);
  animation: orb-breathe 2.8s ease-in-out infinite;
}
@keyframes orb-breathe {
  50% { box-shadow: 0 0 16px rgba(224,90,74,0.8), inset 0 1px 3px rgba(255,255,255,0.28); }
}

/* THE ROOM'S BUTTONS, SLIM (Dr Lau, 21 Nov 2026: "keep the buttons slim and
   professional looking", board Btn1): one 28px row in one style, Open · Pend
   · Close as one group, and symbols alone on a narrow window. */
.dk-actions { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.dk-actions .dk-action { min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; gap: 0.375rem;
  border-radius: 0.4375rem; background: var(--panel); border-color: var(--rule); flex: 0 0 auto; }
.dk-actions .dk-action:hover { border-color: var(--teal); background: rgba(79,214,200,.1); }
.dk-actions .dk-action-i { font-size: 0.875rem; display: inline; }
.dk-actions .dk-action-l { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.dk-actions .dk-action-s { display: none; }
.dk-encbtn { min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; font-size: 0.8125rem;
  border-radius: 0.4375rem; }
.dk-encbtns-row { gap: 0; }
.dk-encbtns-row > .dk-encbtn { border-radius: 0; margin-left: -1px; }
.dk-encbtns-row > .dk-encbtn:first-child { border-radius: 0.4375rem 0 0 0.4375rem; margin-left: 0; }
.dk-encbtns-row > .dk-encbtn:last-child { border-radius: 0 0.4375rem 0.4375rem 0; }
.dk-lead { gap: 0.375rem 0.5rem; }
/* THE FRONT SCREEN'S ACTION ROW, SLIM (Dr Lau, 23 Nov 2026, on a screenshot of
   Next patient · Open · Pend · Close · Inpatient view drawn 56px tall: "slim
   button design"): one 28px line each, in the room's slim style. Named with
   the button and its row so `.btn`'s own height, set later in this file, no
   longer wins; the pointer's hit area stays 44px tall through ::after. */
.dk-lead > button.btn.dk-nextpt, .dk-encbtns-row > button.btn.dk-encbtn, .dk-lead > button.fv-switch, .ipf-head button.fv-switch {
  position: relative; min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; font-size: 0.8125rem; line-height: 1; border-radius: 0.4375rem; }
.dk-encbtns-row > button.btn.dk-encbtn { border-radius: 0; }
.dk-encbtns-row > button.btn.dk-encbtn:first-child { border-radius: 0.4375rem 0 0 0.4375rem; }
.dk-encbtns-row > button.btn.dk-encbtn:last-child { border-radius: 0 0.4375rem 0.4375rem 0; }
.dk-lead > button.btn.dk-nextpt::after, .dk-encbtns-row > button.btn.dk-encbtn::after, .dk-lead > button.fv-switch::after, .ipf-head button.fv-switch::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
@media (max-width: 1360px) {
  .dk-actions .dk-action-i { display: inline; }
  .dk-actions .dk-action-l { display: none; }
  .dk-actions .dk-action { padding: 0 0.5rem; }
}
/* THE WEEK'S STRIPS AS SYMBOLS, THE LEGEND ON HOVER (Dr Lau, 21 Nov 2026). */
.wk-rate .wk-rate-n { font-size: 0.6875rem; color: var(--dim); }
/* THE VISIT HISTORY AS A BOARD (Dr Lau, 21 Nov 2026: "build the visit history board"; visitboard.ts). */
.vb { display: flex; align-items: stretch; min-height: 24rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.vb-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.5rem 0.375rem; border-right: 1px solid var(--line-soft); min-width: 0; overflow: auto; }
.vb-side[hidden], .vb-tab[hidden], .vb-grip[hidden], .vb-split[hidden], .vb-pane[hidden], .vb-when[hidden], .vb-copy[hidden] { display: none; }
.vb-k { font: 600 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); padding: 0.25rem 0.5rem 0.5rem; }
.vb-k2 { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--line-soft); }
.vb-kind { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border: 0; border-radius: 0.5rem; background: none; color: var(--dim); font: 500 0.85rem var(--display); text-align: left; cursor: pointer; }
.vb-kind.is-on { background: #173a35; color: var(--ink); }
.vb-kind.is-zero { color: var(--faint); }
.vb-kind.is-sub { padding-left: 1.25rem; font-size: 0.8rem; }
.vb-kind.is-you .vb-kind-l { font-weight: 600; }
.vb-kind[data-side-id] { cursor: grab; }
.vb-kind.is-dragging { opacity: 0.5; cursor: grabbing; }
.vb-kind.side-over { outline: 0.125rem dashed var(--teal); outline-offset: -0.125rem; }
.vb-kind-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-n { font: 500 0.75rem var(--mono); color: var(--dimmer); margin-left: 0.25rem; }
.vb-fold { margin: auto 0.5rem 0.25rem; align-self: flex-start; min-height: 1.5rem; height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }
.vb-tab { flex: 0 0 auto; writing-mode: vertical-rl; border: 0; border-right: 1px solid var(--line-soft); background: var(--panel-2); color: var(--dim); font: 500 0.8rem var(--display); padding: 0.5rem 0.25rem; cursor: pointer; }
.vb-grip, .vb-split { flex: 0 0 0.375rem; cursor: col-resize; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.vb-grip::after, .vb-split::after { content: ""; width: 0.125rem; height: 2.5rem; border-radius: 0.125rem; background: #3d8a80; }
.vb-grip:focus-visible, .vb-split:focus-visible { outline: 0.125rem solid var(--teal); }
.vb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.vb-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; padding: 0.25rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.vb-bar .btn, .vb-search, .vb-when { height: 1.5rem; min-height: 1.5rem; padding: 0 0.5rem; border-radius: 0.375rem; font-size: 0.75rem; }
.vb-search { width: 13.75rem; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); }
.vb-when, .vb-oppick, .vb-dxpick { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); border-radius: 0.375rem; font-size: 0.75rem; height: 1.5rem; }
.vb-seg { display: inline-flex; height: 1.5rem; border: 1px solid var(--line); border-radius: 0.375rem; overflow: hidden; }
.vb-view { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0 0.5rem; border: 0; border-right: 1px solid var(--line-soft); background: none; color: var(--dim); font: 500 0.72rem var(--display); white-space: nowrap; cursor: pointer; }
.vb-view:last-child { border-right: 0; }
.vb-view.is-on { background: #173a35; color: var(--teal-2); }
.vb-flex { flex: 1 1 auto; }
.vb-help { padding: 0; border: 0; }
.vb-said, .vb-psaid { margin: 0.25rem 0.75rem; }
.vb-body { flex: 1 1 auto; min-height: 0; display: flex; }
.vb-list { flex: 1 1 60%; min-width: 0; overflow: auto; }
.vb-pane { flex: 1 1 40%; min-width: 0; overflow: auto; display: flex; flex-direction: column; border-left: 1px solid var(--line-soft); }
.vb-row.is-sel { background: #173a35; }
.vb-row.is-booked .fv-st-c { color: var(--amber); }
.vb-row.is-defaulted .fv-st-c { color: var(--dimmer); }
.vb-row.vb-todayrow .fv-st-c { padding: 0; height: 0.125rem; border-top: 0.125rem solid var(--teal); font: 500 0.625rem var(--mono); color: var(--teal); }
.vb-dot[data-state="open"], .vb-dot[data-state="in"] { color: var(--teal); }
.vb-dot[data-state="pended"] { color: var(--amber); }
.vb-dot[data-state="closed"], .vb-dot[data-state="discharged"], .vb-dot[data-state="defaulted"] { color: var(--dimmer); }
.vb-res.is-abn { color: var(--red); }
.vb-unread { color: var(--amber); }
.vb-none, .vb-quiet { padding: 0.5rem 0.75rem; color: var(--dimmer); font-size: 0.8rem; }
.vb-unfiled { margin: 0.25rem 0.75rem 0.5rem; height: 1.5rem; min-height: 1.5rem; font-size: 0.75rem; color: var(--dimmer); }
.vb-ph { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.vb-pt { font-size: 0.85rem; color: var(--ink); }
.vb-b { width: 1.5rem; height: 1.5rem; min-height: 1.5rem; padding: 0; border-radius: 0.375rem; font-size: 0.8rem; }
.vb-psub { padding: 0.375rem 0.75rem 0; font-size: 0.75rem; color: var(--dimmer); }
.vb-psec { padding: 0.375rem 0.75rem; }
.vb-ph2 { font: 600 0.6875rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.125rem; }
.vb-ptext { font-size: 0.8rem; color: var(--ink-2); line-height: 1.5; }
.vb-ptext.is-stopped { text-decoration: line-through; color: var(--dimmer); }
.vb-ul { margin: 0; padding-left: 1rem; font-size: 0.8rem; color: var(--ink-2); }
.vb-dash { color: var(--dimmer); font-size: 0.8rem; }
.vb-held { margin: 0.5rem 0.75rem; color: var(--dim); font-size: 0.8rem; }
.vb-tiles { margin: 0.25rem 0.75rem; align-self: flex-start; }
.vb-ep, .vb-dx, .vb-appts { flex: 1 1 auto; min-width: 0; overflow: auto; padding: 0.5rem 0.75rem; }
.vb-ep .vh-ep.is-focus { outline: 0.125rem solid var(--teal); }
.vb-dxbar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.vb-axis { margin-left: 11rem; position: relative; height: 1rem; border-bottom: 1px solid var(--line-soft); }
.vb-months { position: relative; height: 1rem; }
.vb-month, .vb-today { position: absolute; transform: translateX(-50%); font: 500 0.625rem var(--mono); color: var(--dimmer); }
.vb-today { color: var(--teal); }
.vb-lanes { display: flex; flex-direction: column; }
.vb-lane { display: flex; align-items: center; min-height: 2rem; border-bottom: 1px dashed var(--line-soft); }
.vb-lane-l { flex: 0 0 11rem; display: flex; flex-direction: column; padding-right: 0.5rem; }
.vb-lane-t { font-size: 0.78rem; color: var(--ink-2); }
.vb-lane-s { font-size: 0.6875rem; color: var(--dimmer); }
.vb-track { position: relative; flex: 1 1 auto; height: 1.75rem; }
.vb-mark, .vb-pain { position: absolute; top: 0.25rem; transform: translateX(-50%); border: 0; background: none; padding: 0; font-size: 0.8rem; cursor: pointer; }
.vb-pain { color: var(--amber); cursor: default; }
.vb-group { position: absolute; top: 0.25rem; height: 1.25rem; min-width: 6rem; border: 1px solid #3d8a80; border-radius: 0.375rem; background: #173a35; color: var(--teal-2); font: 500 0.7rem var(--display); white-space: nowrap; cursor: pointer; }
.vb-lane-said { position: absolute; left: 0; top: 0.375rem; font-size: 0.72rem; color: var(--dimmer); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vb-lane.is-carebee .vb-lane-said { left: 0.5rem; }
.vb-earlier { position: absolute; left: 0; bottom: 0; font-size: 0.625rem; color: var(--faint); }
.vb-dxtable { margin-top: 0.75rem; }
.vb-empty { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; color: var(--dimmer); font-size: 0.85rem; }
.vb.is-empty { min-height: 14rem; }
@media (max-width: 899px) { .vb, .vb-body { flex-direction: column; } .vb-grip, .vb-split, .vb-tab { display: none; } .vb-side { width: auto !important; border-right: 0; } }
/* THE NOTES TAB (Dr Lau, 21 Nov 2026: "technical encounter should be slim
   button - within the top part of the card - right column pls make the width
   adjustable, each item clickable and draggable and swappable - can close as
   rail"; "use dash '-'"; "synopsis - 1 line the rest bubble"). notesboard.ts
   arranges the column; the encounters card's head is one 24px row. */
.fv-body .fv-notes.nb { grid-template-columns: auto 0.375rem minmax(0, 1fr); gap: 0 0.5rem; }
.fv-body.rail-folded .fv-notes.nb { grid-template-columns: 2.75rem minmax(0, 1fr); }
.fv-body.is-expanded .fv-notes.nb { grid-template-columns: minmax(0, 1fr); }
.fv-body.is-expanded .nb-grip, .fv-body.rail-folded .nb-grip { display: none; }
.fv-notes.nb > .nb-col { min-width: 12.5rem; max-width: 35rem; width: 20rem; }
.fv-body.rail-folded .fv-notes.nb > .nb-col { min-width: 0; width: 2.75rem; padding: 0.5rem 0.125rem; }
.nb-grip { cursor: col-resize; touch-action: none; background: linear-gradient(var(--line), var(--line)) center / 0.125rem 2.5rem no-repeat; border-radius: 0.25rem; }
.nb-grip:hover, .nb-grip:focus { background-color: var(--line-soft); outline: none; }
.nb-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.375rem; }
.nb-head-t { font: 600 0.6875rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dimmer); }
.nb-head > .nb-fold { margin-left: auto; min-height: 1.5rem; padding: 0 0.5rem; }
.fv-body.rail-folded .nb-head-t { display: none; }
.fv-body.rail-folded .nb-head > .nb-fold { margin: 0 auto; }
.nb-rail { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.nb-rail[hidden], .nb-cards[hidden], .nb-foot[hidden] { display: none; }
.nb-sym { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; width: 2.25rem; padding: 0.25rem 0; border: 1px solid var(--line); border-radius: 0.5rem; background: transparent; color: var(--ink-2); cursor: pointer; }
.nb-sym:hover, .nb-sym:focus { border-color: var(--teal); }
.nb-sym-i { font-size: 1rem; line-height: 1; }
.nb-sym-n { font: 500 0.6875rem var(--mono); color: var(--dim); }
.nb-sym.is-unread .nb-sym-n { color: var(--amber); }
.nb-card > .fv-tile-h { align-items: center; gap: 0.375rem; padding: 0.375rem 0.5rem; }
.nb-card.is-sel { border-color: var(--teal); }
.nb-card.is-dragging { opacity: 0.5; }
.nb-card.side-over { outline: 2px dashed var(--teal); outline-offset: 2px; }
.nb-drag { cursor: grab; color: var(--dimmer); font-size: 0.75rem; letter-spacing: -0.1em; user-select: none; }
.nb-ic { font-size: 0.875rem; line-height: 1; }
.nb-title { cursor: pointer; }
.nb-card > .fv-tile-h > .nb-count { margin-left: 0.25rem; }
.nb-count.is-unread { color: var(--amber); }
.nb-cfold { margin-left: auto; min-height: 1.5rem; min-width: 1.5rem; padding: 0 0.375rem; font-size: 0.75rem; }
.nb-dash { color: var(--dimmer); }
.fv-tile-h.nb-ehead { align-items: center; gap: 0.375rem; height: 1.5rem; padding: 0.375rem 0.5rem; box-sizing: content-box; flex-wrap: nowrap; overflow: hidden; }
.nb-ehead > .fv-tile-s { margin-left: 0; }
.nb-ehead > .btn, .nb-ehead > .fv-enc-ctl, .nb-ehead > .fv-ver, .nb-ehead > .help-btn { height: 1.5rem; min-height: 1.5rem; padding-top: 0; padding-bottom: 0; font-size: 0.75rem; margin-left: 0; }
.nb-ehead > .fv-ver .fv-ver-b { padding: 0 0.5rem; font-size: 0.72rem; }
.nb-esearch { flex: 0 1 13rem; min-width: 6rem; height: 1.5rem; box-sizing: border-box; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 0.375rem; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.75rem; }
.nb-ehead > .nb-tech { padding: 0 0.5rem; white-space: nowrap; }
.nb-ehead > .help-btn { margin-left: auto; }
.nb-syn { display: flex; align-items: baseline; gap: 0.375rem; min-width: 0; flex-wrap: wrap; }
.nb-syn.is-none { color: var(--dimmer); }
.nb-syn1 { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-more { flex: 0 0 auto; padding: 0 0.375rem; border: 1px solid var(--line); border-radius: 999px; font: 500 0.6875rem var(--mono); color: var(--dim); cursor: pointer; }
.nb-more:hover, .nb-more:focus { border-color: var(--teal); color: var(--teal); outline: none; }
.nb-syn-rest { flex: 1 0 100%; display: flex; flex-direction: column; gap: 0.125rem; color: var(--ink-2); font-size: 0.8rem; white-space: normal; }
.nb-syn-rest[hidden] { display: none; }
/* THE LEFT PANEL AS ONE FLAT PANEL (Dr Lau, 28 Nov 2026, his option A): the
   encounters panel's ground, border and radius; a 46px head line FOLDER with
   ⓘ and ◂ at the right; a thin ITEM · DATE line; the groups as rows, each
   heading one full-width button in mono teal caps with its count; rows under
   thin rules, item left, date right; the ⠿ handles on hover or focus only. */
.nb-col.nb-flat { padding: 0; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); }
.nb-flat > .nb-head { height: 2.875rem; box-sizing: border-box; margin: 0; padding: 0 0.875rem; gap: 0.625rem; border-bottom: 1px solid var(--line); }
.nb-flat > .nb-head > .nb-head-t { font: 400 0.75rem var(--mono); letter-spacing: 0.2em; color: var(--teal); }
.nb-flat > .nb-head > .nb-head-sp { flex: 1 1 auto; }
.nb-flat > .nb-head > .nb-fold { margin-left: 0; }
.nb-flat > .help-panel { padding: 0.5rem 0.875rem; border-bottom: 1px solid var(--line); }
.nb-colh { display: flex; gap: 0.5rem; padding: 0.5rem 0.875rem; border-bottom: 1px solid var(--line); font: 400 0.6875rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.nb-colh[hidden] { display: none; }
.nb-colh-i { flex: 1 1 auto; }
.nb-colh-d { flex: 0 0 5rem; text-align: right; }
.nb-flat .nb-cards { gap: 0; }
.nb-flat .nb-card { border: 0; border-radius: 0; background: transparent; }
.nb-flat .nb-card.is-sel { box-shadow: inset 0.1875rem 0 0 var(--teal); }
.nb-flat .nb-card > .fv-tile-h { position: relative; padding: 0; gap: 0; align-items: stretch; border-bottom: 1px solid var(--line); background: var(--sunk); }
.nb-flat .nb-drag { position: absolute; left: 0.125rem; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .12s; }
.nb-flat .nb-card > .fv-tile-h:hover .nb-drag, .nb-flat .nb-card:focus .nb-drag, .nb-flat .nb-card > .fv-tile-h:focus-within .nb-drag { opacity: 1; }
#folder .nb-cfold.nb-ghead, .nb-cfold.nb-ghead { flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; width: 100%; height: auto; min-height: 2.5rem;
  margin: 0; padding: 0.625rem 0.875rem; border: 0; border-radius: 0; background: transparent; color: var(--teal); text-align: left; font: 400 0.75rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.nb-ghead .fv-tile-t { font-size: inherit; letter-spacing: inherit; color: inherit; }
.nb-ghead .nb-count { margin-left: 0.25rem; color: var(--ink); font-size: 0.75rem; letter-spacing: 0; }
.nb-ghead .nb-caret { width: 0.75rem; }
.nb-flat .nb-card > .fv-tile-b { padding: 0; gap: 0; }
.nb-flat .fv-tile-b .fo-encs { gap: 0; }
.nb-flat .fv-tile-b .fo-enc, .nb-flat .fv-tile-b .nb-item, .nb-flat .fv-tile-b .fv-none, .nb-flat .fv-tile-b .fv-sub, .nb-flat .fv-tile-b .fo-mc-sub, .nb-flat .fv-tile-b .fo-mc-now { margin: 0; padding: 0.5625rem 0.875rem 0.5625rem 1.875rem; border: 0; border-radius: 0; background: transparent; border-bottom: 1px solid var(--line-soft); }
.nb-flat .fv-tile-b .fo-enc:has(+ .fo-mc-sub) { border-bottom: 0; }
.nb-flat .fv-tile-b .fo-mc-sub { padding-top: 0; }
.nb-flat .fv-tile-b .fv-none { color: var(--dim); }
.nb-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.75rem; align-items: baseline; }
.nb-item > .fv-row-t { grid-column: 1; }
.nb-item > .fv-row-d { grid-column: 2; grid-row: 1; color: var(--dim); font-size: 0.75rem; white-space: nowrap; }
.nb-item > .fv-row-s { grid-column: 1 / -1; color: var(--dim); font-size: 0.75rem; }
.nb-rowgrip { position: absolute; left: 0.625rem; top: 0.5625rem; color: var(--dimmer); opacity: 0; cursor: grab; user-select: none; }
.nb-item:hover > .nb-rowgrip, .nb-item:focus > .nb-rowgrip, .nb-item:focus-within > .nb-rowgrip { opacity: 1; }
@media (max-width: 899px) { .fv-body .fv-notes.nb { grid-template-columns: minmax(0, 1fr); } .nb-grip { display: none; } .fv-notes.nb > .nb-col { width: auto !important; max-width: none; } }
/* THE SLOT MENU'S HELP AT ITS UPPER RIGHT, beside × (Dr Lau, 22 Nov 2026). */
.sl-pop .sl-head { display: flex; align-items: center; gap: 0.375rem; padding-right: 1.75rem; }
.sl-pop .sl-head .help-btn { margin-left: auto; }
.sl-pop .sl-opt { min-height: 2rem; }
/* THE ENCOUNTER'S BOTTOM BAR, SLIM (Dr Lau, 22 Nov 2026: "use the slim
   button"): every button on the bar one 28px line in the room's slim style,
   symbol and short word, the sub-line its hover title; symbols alone on a
   narrow window. The bill's folded tab carries its total. */
.dk-enc-acts .dk-enc-row.dk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.dk-enc-acts .dk-enc-row > .dk-act { flex: 0 0 auto; min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; gap: 0.375rem;
  border-radius: 0.4375rem; background: var(--panel); border-color: var(--rule); }
.dk-enc-acts .dk-enc-row > .dk-act:hover { border-color: var(--teal); background: rgba(79,214,200,.1); }
.dk-enc-acts .dk-enc-row > .dk-act .dk-act-i { font-size: 0.875rem; }
.dk-enc-acts .dk-enc-row > .dk-act .dk-act-l { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.dk-enc-acts .dk-enc-row > .dk-act .dk-act-s { display: none; }
.dk-enc-acts .dk-enc-row.dk-bar > .wb-actions { flex: 1 1 auto; padding: 0; border: 0; background: none; gap: 0.375rem; flex-wrap: wrap; }
.dk-enc-acts button.btn.wb-slim { min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; gap: 0.375rem; font-size: 0.8125rem;
  border-radius: 0.4375rem; background: var(--panel); border-color: var(--rule); white-space: nowrap; }
.dk-enc-acts button.btn.btn-primary.wb-slim { background: rgba(79,214,200,0.14); border-color: rgba(79,214,200,0.44); }
.dk-enc-acts button.btn.wb-slim:hover { border-color: var(--teal); }
aside.dk-left-rail .dk-side-rail-tab.dk-side-rail-sym:has(> .dk-bill-total) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem; flex: 0 0 auto; height: auto; min-height: 3rem; min-block-size: 3rem; padding: 0.25rem 0.125rem; }
.dk-bill-total { display: block; font-size: 0.5625rem; letter-spacing: -0.03em; color: var(--ink-2); writing-mode: horizontal-tb; white-space: nowrap; }
@media (max-width: 1360px) {
  .dk-enc-acts .dk-enc-row > .dk-act .dk-act-l, .dk-enc-acts .wb-slim .wb-bl { display: none; }
  .dk-enc-acts .dk-enc-row > .dk-act, .dk-enc-acts button.btn.wb-slim { padding: 0 0.5rem; }
}
/* THE BODY DIAGRAM CARD (Dr Lau, 22 Nov 2026: "use slim button throughout -
   use menu picker on the left upper corner ... each zoom in is a proper zoom
   in without scroll; add swelling"; drawcard.ts, diagrams.ts, bodymap.ts).
   Every button on the card is one 28px line in one style, the room's slim
   block: symbol and short word, the symbol alone on a narrow card. The
   picture menu and its search sit at the card's upper left. The zoom is the
   picture's viewBox, so the frame never scrolls. Swelling is its own colour
   (--map-swell) and a DOTTED mark. */
.dg-card button.opt, .map-wrap button.opt, .dc-card button.opt, button.opt.dc-slim,
.dc-card .dc-ctl .map-tick, .dc-card .dc-ctl .map-arrow {
  min-height: 1.75rem; height: 1.75rem; min-width: 1.75rem; padding: 0 0.625rem; gap: 0.375rem; flex: 0 0 auto;
  border-radius: 0.4375rem; font-family: var(--display); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0;
  background: var(--panel); border: 1px solid var(--rule); color: var(--dim); white-space: nowrap; }
.dg-card button.opt:hover, .map-wrap button.opt:hover, .dc-card button.opt:hover, .dc-card .dc-ctl .map-tick:hover {
  border-color: var(--teal); background: rgba(79,214,200,.1); }
.dc-card .dc-ctl .map-tick.on { border-color: var(--teal); background: rgba(79,214,200,.16); color: var(--ink); }
button.dc-slim .dc-i { font-size: 0.875rem; line-height: 1; }
button.dc-slim .dc-w { white-space: nowrap; }
.dc-card.dc-narrow button.dc-slim .dc-i + .dc-w { display: none; }
.dg-card button.dg-zlvl, .dc-card button.dg-zlvl { min-width: 3.5rem; }
.dg-ink-btn.dg-ink-red .dc-i, .map-ink-btn.ink-pain .dc-i { color: var(--red); }
.dg-ink-btn.dg-ink-blue .dc-i, .map-ink-btn.ink-numb .dc-i { color: var(--map-numb); }
.dg-ink-btn.dg-ink-green .dc-i, .map-ink-btn.ink-scar .dc-i { color: #8fe39a; }
[data-theme="day"] .dg-ink-btn.dg-ink-green .dc-i, [data-theme="day"] .map-ink-btn.ink-scar .dc-i { color: #1f7a33; }
.dg-ink-btn.dg-ink-purple .dc-i { color: #c9a6ff; }
[data-theme="day"] .dg-ink-btn.dg-ink-purple .dc-i { color: #6b3fb5; }
.dg-ink-btn.dg-ink-amber .dc-i, .map-ink-btn.ink-swelling .dc-i { color: var(--map-swell); }
svg .dg-ink path.dg-mark-swelling, svg .map-ink path.ink-swelling { stroke: var(--map-swell); stroke-dasharray: 1 16; stroke-linecap: round; }
svg .map-ink path.ink-swelling { stroke-dasharray: 1 22; }
.dg-ink-btn.dg-ink-amber[aria-pressed="true"], .map-ink-btn.ink-swelling[aria-pressed="true"] { border-color: var(--map-swell); color: var(--ink); }
.dg-pickrow { display: flex; align-items: center; gap: 0.375rem; margin: 0 0 0.375rem; }
.dg-pickbox { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.dg-pickbox select, .dg-pickbox input { height: 1.75rem; min-height: 1.75rem; padding: 0 0.5rem; font-size: 0.8125rem;
  border-radius: 0.4375rem; border: 1px solid var(--rule); background: var(--panel-2); color: var(--ink); }
.dg-pickbox select { max-width: 16rem; }
.dg-pickbox input { width: 8.5rem; }
.dc-head { justify-content: flex-start; }
.dc-head .dc-pick { order: -1; margin-right: auto; }
.dg-stage.zoomed .dg-svg:not(.armed), .zoomed .dc-scroll > svg:not(.armed) { touch-action: none; cursor: grab; }
/* the drawing onto the writing board: ⤵ and its lines drag (22 Nov) */
.dc-dragline, button.dc-bring { cursor: grab; }
.wb-src-body .wb-src-t { font-size: 1rem; }
/* ── the gate ───────────────────────────────────────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(4,9,10,0.96);
}
/* THE hidden ATTRIBUTE WINS, everywhere. Four rules below name one element
each, and the fifth element with hidden -- the gate's "Open Telegram" link, a
.btn -- had none, so .btn's own display beat the UA default and a button that
led nowhere showed before a code existed. One rule, every element. */
[hidden] { display: none !important; }

/* THE SIGN-IN CARD (7 October, his "make it professional looking with qr
   code"): the steps on the left, the code on its own tile on the right; one
   column on a phone, where the code sits first. The SVG paints its own white
   quiet zone -- a camera wants light behind dark, whatever the theme -- and
   the tile around it is white for the same reason, in both themes. */
.gate[hidden] { display: none; }
.gate-card {
  width: min(760px, 100%);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: 36px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line-soft);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.gate-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gate-side { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 260px; }
.gate-brand { display: flex; align-items: baseline; gap: 12px; }
.gate-mark { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: 0.02em; color: var(--teal); }
.gate-title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.gate-body  { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.6; color: var(--dim); max-width: 46ch; }
.gate-steps { margin: 0; padding: 0; list-style: none; counter-reset: gate-step; display: flex; flex-direction: column; gap: 10px; }
.gate-steps li { counter-increment: gate-step; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); }
.gate-steps li::before {
  content: counter(gate-step); flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 600 13px/1 var(--mono);
  color: var(--teal); border: 1px solid var(--line);
}
.gate-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gate-qr-img, .gate-qr-wait {
  width: 260px; max-width: 72vw; aspect-ratio: 1; box-sizing: border-box;
  padding: 10px; border-radius: 14px; background: #fff; overflow: hidden;
}
.gate-qr-img svg { display: block; width: 100%; height: auto; }
/* WHILE THE CODE IS ASKED FOR, its place is held so nothing jumps. */
.gate-qr-wait { background: var(--panel-2); border: 1px dashed var(--line); }
.gate-qr:not([hidden]) + .gate-qr-wait { display: none; }
.gate-qr-cap { font: 500 10.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.gate-state {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--amber);
}
.gate-side .btn, .gate-side .fd-btn { text-decoration: none; text-align: center; white-space: nowrap; }
/* ON A DESKTOP the code is the way in and opening the link here is the
   exception, so it is the quiet button; on a phone it is the way in. */
.gate-card .gate-open { background: transparent; border-color: var(--line); color: var(--dim); font-weight: 500; }
/* THE CARD OUTSIDE THE CONSOLE (app/signincard.ts): the page's own sentence
   under the title, and a refusal in red rather than the waiting amber. */
.gate-note { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
p.gate-state { margin: 0; }
.gate-state.is-no { color: var(--red); }
@media (max-width: 720px) {
  .gate { align-items: flex-start; overflow-y: auto; }
  .gate-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .gate-side { width: 100%; align-items: center; }
  .gate-side .btn, .gate-side .fd-btn { width: 100%; }
  .gate-card .gate-open { background: rgba(79,214,200,0.14); border-color: rgba(79,214,200,0.44); color: var(--teal); font-weight: 600; order: -1; }
  .gate-steps { display: none; }
  .gate-qr-img, .gate-qr-wait { width: 200px; }
}

.btn {
  min-height: var(--tap);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border-radius: var(--r-l);
  font-family: var(--display); font-size: 15px; font-weight: 500;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: rgba(79,214,200,0.14); border-color: rgba(79,214,200,0.44); color: var(--teal); font-weight: 600; }
.btn:active { transform: translateY(1px); }

/* ── the spine ──────────────────────────────────────────────────────────── */
.spine {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.spine[hidden] { display: none; }

.wordmark { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--teal); flex: 0 0 auto; }
/* THE S-EMR MARK, drawn ON the wordmark and the front desk's brand (4 Oct 2026).
   The patient (after Leonardo) in the record's circle, linked to the care team
   at a hexagon's points -- app/tools/semr-mark.svg, the small-size drawing.
   Two stencils, so each part takes the THEME's own colour (ink and teal, day
   and night) where a picture would be one colour in both. Pseudo-elements, not
   markup: the phone bar's grid has a "brand" cell for exactly one element, a
   harness reads the wordmark's text, and a click on the mark is a click on the
   wordmark -- the way home. */
.wordmark, .fd-brand { position: relative; padding-left: calc(var(--bm, 20px) + 8px); }
.wordmark { --bm: 20px; }
.fd-brand { --bm: 30px; }
@media (min-width: 1100px) { .wordmark { --bm: 24px; } }  /* beside the 12px kicker */
.wordmark::before, .wordmark::after, .fd-brand::before, .fd-brand::after {
  content: ''; position: absolute; left: 0; top: 50%; width: var(--bm); height: var(--bm);
  transform: translateY(-50%); pointer-events: none;
  -webkit-mask: var(--bm-mask) center / contain no-repeat; mask: var(--bm-mask) center / contain no-repeat; }
.wordmark::before, .fd-brand::before { background: var(--ink);
  --bm-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22 fill=%22none%22%3E%3Cpath d=%22M32 5 L55.38 18.5 V45.5 L32 59 L8.62 45.5 V18.5 Z%22 stroke=%22%23000%22 stroke-width=%223%22 stroke-linejoin=%22round%22%3E%3C/path%3E%3Ccircle cx=%2255.38%22 cy=%2218.5%22 r=%222.6%22 fill=%22%23000%22%3E%3C/circle%3E%3Ccircle cx=%2232%22 cy=%2259%22 r=%222.6%22 fill=%22%23000%22%3E%3C/circle%3E%3Ccircle cx=%228.62%22 cy=%2218.5%22 r=%222.6%22 fill=%22%23000%22%3E%3C/circle%3E%3Cg transform=%22translate(13.308 15.925) scale(0.18692)%22%3E%3Cpath d=%22M 104.80 38.80 C 105.20 41.40 105.40 43.20 106.40 44.60 C 109.00 46.40 113.40 46.80 118.60 47.20 C 120.60 46.60 122.40 46.20 124.40 46.20 C 129.00 45.60 134.60 45.40 140.00 45.60 C 144.00 45.80 147.40 46.00 150.60 45.80 C 155.00 45.40 159.00 45.20 163.00 45.40 C 166.00 45.60 168.60 45.80 171.20 46.00 C 174.00 45.60 176.40 45.40 179.00 45.80 C 181.60 46.20 184.00 46.40 185.00 47.40 C 185.60 48.20 185.00 48.80 183.60 49.00 C 181.80 49.40 180.20 49.60 179.00 50.20 C 177.00 51.20 174.00 50.80 171.20 50.00 C 167.00 50.40 162.40 51.00 157.80 51.80 C 154.60 52.20 151.80 51.60 149.20 51.40 C 145.00 52.00 141.00 52.80 137.40 53.80 C 132.00 55.20 127.40 56.80 123.60 58.80 C 123.80 64.60 122.40 70.40 120.00 75.40 C 117.80 80.20 116.40 85.00 116.80 89.60 C 117.20 94.20 118.60 98.80 118.40 104.00 C 118.20 113.60 116.60 124.60 114.20 134.00 C 113.40 137.40 113.20 140.20 113.60 143.20 C 114.80 151.00 114.00 160.00 110.80 168.00 C 109.40 172.00 108.80 176.00 109.40 179.60 C 111.60 181.00 114.00 182.00 114.40 184.00 C 114.40 185.40 111.00 185.60 104.00 185.40 C 102.20 185.20 101.60 184.00 101.80 181.60 C 102.20 176.00 101.80 170.00 101.40 163.00 C 101.00 156.00 101.60 149.00 102.40 143.00 C 102.80 138.00 102.20 132.00 101.60 126.00 C 101.20 119.00 100.80 112.00 100.00 107.00 L 100.00 107.00 C 99.20 112.00 98.80 119.00 98.40 126.00 C 97.80 132.00 97.20 138.00 97.60 143.00 C 98.40 149.00 99.00 156.00 98.60 163.00 C 98.20 170.00 97.80 176.00 98.20 181.60 C 98.40 184.00 97.80 185.20 96.00 185.40 C 89.00 185.60 85.60 185.40 85.60 184.00 C 86.00 182.00 88.40 181.00 90.60 179.60 C 91.20 176.00 90.60 172.00 89.20 168.00 C 86.00 160.00 85.20 151.00 86.40 143.20 C 86.80 140.20 86.60 137.40 85.80 134.00 C 83.40 124.60 81.80 113.60 81.60 104.00 C 81.40 98.80 82.80 94.20 83.20 89.60 C 83.60 85.00 82.20 80.20 80.00 75.40 C 77.60 70.40 76.20 64.60 76.40 58.80 C 72.60 56.80 68.00 55.20 62.60 53.80 C 59.00 52.80 55.00 52.00 50.80 51.40 C 48.20 51.60 45.40 52.20 42.20 51.80 C 37.60 51.00 33.00 50.40 28.80 50.00 C 26.00 50.80 23.00 51.20 21.00 50.20 C 19.80 49.60 18.20 49.40 16.40 49.00 C 15.00 48.80 14.40 48.20 15.00 47.40 C 16.00 46.40 18.40 46.20 21.00 45.80 C 23.60 45.40 26.00 45.60 28.80 46.00 C 31.40 45.80 34.00 45.60 37.00 45.40 C 41.00 45.20 45.00 45.40 49.40 45.80 C 52.60 46.00 56.00 45.80 60.00 45.60 C 65.40 45.40 71.00 45.60 75.60 46.20 C 77.60 46.20 79.40 46.60 81.40 47.20 C 86.60 46.80 91.00 46.40 93.60 44.60 C 94.60 43.20 94.80 41.40 95.20 38.80 Z%22 fill=%22%23000%22%3E%3C/path%3E%3Cellipse cx=%22100%22 cy=%2228%22 rx=%2210.4%22 ry=%2212.6%22 fill=%22%23000%22%3E%3C/ellipse%3E%3Crect x=%2296%22 y=%2236%22 width=%228%22 height=%2210%22 fill=%22%23000%22%3E%3C/rect%3E%3C/g%3E%3C/svg%3E"); }
.wordmark::after, .fd-brand::after { background: var(--teal);
  --bm-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22 fill=%22none%22%3E%3Cpath d=%22M32 12 L32 5 M49.32 42 L55.38 45.5 M14.68 42 L8.62 45.5%22 stroke=%22%23000%22 stroke-width=%222.6%22 stroke-linecap=%22round%22%3E%3C/path%3E%3Ccircle cx=%2232%22 cy=%225%22 r=%223.4%22 fill=%22%23000%22%3E%3C/circle%3E%3Ccircle cx=%2255.38%22 cy=%2245.5%22 r=%223.4%22 fill=%22%23000%22%3E%3C/circle%3E%3Ccircle cx=%228.62%22 cy=%2245.5%22 r=%223.4%22 fill=%22%23000%22%3E%3C/circle%3E%3Ccircle cx=%2232%22 cy=%2232%22 r=%2220%22 stroke=%22%23000%22 stroke-width=%222.4%22%3E%3C/circle%3E%3Cg transform=%22translate(13.308 15.925) scale(0.18692)%22%3E%3C/g%3E%3C/svg%3E"); }

.who { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,214,200,0.14); border: 1px solid rgba(79,214,200,0.34);
  font-family: var(--mono); font-size: 10px; color: var(--teal);
}
.who-lines { display: flex; flex-direction: column; gap: 1px; }
.who-name { font-size: 12px; color: var(--ink-2); line-height: 1.1; }
.who-sub  { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; color: var(--label); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  border: 1px solid var(--line); color: var(--dim); flex: 0 0 auto;
}
.pill[hidden] { display: none; }
.pill-teal  { background: rgba(79,214,200,0.10); border-color: rgba(79,214,200,0.3); color: var(--teal); }
.pill-rec   { background: rgba(224,90,74,0.12);  border-color: rgba(224,90,74,0.4);  color: #ff8a7a; }
.pill-alert { background: rgba(224,90,74,0.16);  border-color: rgba(224,90,74,0.5);  color: var(--red-ink); border-radius: 5px; }
.pill-ok    { background: rgba(79,214,200,0.09); border-color: rgba(79,214,200,0.28); color: var(--teal); border-radius: 5px; }
/* NOT ON FILE is not "fine": nobody has asked. Amber, as main's card drew it. */
.pill-unasked { background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.45); color: var(--amber-ink); border-radius: 5px; }

.patient {
  font-family: var(--display); font-size: 16px; font-weight: 600; color: #fff;
  background: none; border: 0; border-bottom: 1px dotted rgba(79,214,200,0.45);
  padding: 0 0 1px; cursor: help; flex: 0 0 auto;
}
.patient-sub { font-size: 12px; color: var(--dimmer); flex: 0 0 auto; }

.studies { display: flex; gap: 6px; flex: 0 0 auto; }
/* CareBee beside the number (11 Nov): green connected, red not, dull off. */
.bee { font-size: 18px; line-height: 1; flex: 0 0 auto; display: inline-flex; color: #4fd17a; }
.bee svg { display: block; }
.bee-body { fill: currentColor; }
.bee-wing { fill: currentColor; opacity: .62; }
.bee-connected { color: #4fd17a; }
.bee-not { color: #e05a4f; }
.bee-off { color: var(--dimmer); opacity: .55; }
:root { --bee-connected: #4fd17a; --bee-not: #e05a4f; }
/* The patient's journey on a room row (11 Nov): done, now, still to come. */
.wr-journey { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.wr-jt { font-size: 11px; line-height: 1; padding: 2px; border-radius: 4px; border: 1px solid transparent; }
.wr-jt-done { border-color: #3ccf7a; }
.wr-jt-now { border-color: #e0a63c; background: rgba(224, 166, 60, .18); }
.wr-jt-todo { filter: grayscale(1); opacity: .4; }
/* The route under the number (11 Nov): last station, the wait here, next. */
.wr-route { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); margin: 2px 0 0 2px; white-space: nowrap; overflow: hidden; }
.wr-stop { white-space: nowrap; }
.wr-stop-last { color: var(--faint); }
.wr-stop-now { color: var(--ink); font-weight: 600; font-family: var(--mono); }
.wr-stop-next { color: var(--teal); }
.wr-arrow { color: var(--faint); }
.study {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.study .mod    { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.study .centre { font-size: 11px; color: var(--ink-2); }
.study .glyph  { font-family: var(--mono); font-size: 11px; }
.study.open  { background: rgba(79,214,200,0.07); border-color: rgba(79,214,200,0.22); }
.study.open  .glyph { color: var(--teal); }
.study.wait  { background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.32); }
.study.wait  .glyph { color: var(--amber); }
.study.none  .glyph { color: var(--dimmer); }

.meter { font-family: var(--mono); font-size: 10px; color: var(--faint); flex: 0 0 auto; }
/* Dr Lau, 11 Nov: "pls remove this" -- the row of studies and the token
   meter under the header are removed at every width. The studies stay on
   the patient card (Imaging). */
#studies, #meter { display: none; }
/* Open · Pend · Close on the centre bar (11 Nov). */
.dk-encbtns { display: flex; flex-direction: column; gap: 6px; margin-left: auto; align-items: flex-end; }
.dk-encbtns-row { display: flex; gap: 6px; }
.dk-encbtn.is-off { opacity: .45; }
.dk-encbtns .dk-pend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* WHAT OPEN, PEND AND CLOSE SAY floats just under the three buttons rather than
   pushing the bar and the act row down (Dr Lau's "check all the buttons", 11 Nov:
   the dimmed Open's reason was drawn beneath the bar where nobody looks). */
.dk-encbtns { position: relative; }
.dk-encbtns > .file-said, .dk-encbtns > .dk-pend { position: absolute; top: calc(100% + 4px); right: 0; z-index: 40;
  margin: 0; max-width: 460px; background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.dk-encbtns > .dk-pend[hidden], .dk-encbtns > .file-said[hidden] { display: none; }
.dk-encbtns > .file-said { padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; }

.patient-card {
  position: absolute; top: calc(100% + 6px); left: 16px; z-index: 40;
  width: min(420px, calc(100vw - 32px));
  display: none; flex-direction: column; gap: 7px;
  padding: 15px 17px; border-radius: var(--r);
  background: rgba(5,12,13,0.98); border: 1px solid rgba(79,214,200,0.26);
  box-shadow: 0 20px 48px rgba(0,0,0,0.7);
}
.patient-card.on { display: flex; }
/* The check-in route is not a patient chart. If a clinician arrived here
   from an open encounter, remove the registration identity strip and its
   hover card for the duration of this focused action. */
.spine.is-checkin #patient-rule,
.spine.is-checkin #patient-name,
.spine.is-checkin #patient-mrn,
.spine.is-checkin #patient-sub,
.spine.is-checkin #allergy,
.spine.is-checkin #mrialert,
.spine.is-checkin #studies,
.spine.is-checkin #patient-card,
.spine.is-registration #patient-rule,
.spine.is-registration #patient-name,
.spine.is-registration #patient-mrn,
.spine.is-registration #patient-sub,
.spine.is-registration #allergy,
.spine.is-registration #mrialert,
.spine.is-registration #studies,
.spine.is-registration #patient-card { display: none !important; }
.pc-row { display: flex; align-items: baseline; gap: 11px; }
.pc-k { font-size: 11px; color: var(--dimmer); width: 96px; flex: 0 0 auto; }
.pc-v { font-size: 12px; color: var(--ink-2); }

.demo-banner {
  flex: 0 0 auto; padding: 7px 12px;
  border-bottom: 1px solid rgba(224,164,74,.5);
  background: rgba(224,164,74,.14); color: var(--amber-ink);
  font: 700 12px/1.35 var(--mono); letter-spacing: .08em;
  text-align: center;
}
.demo-banner[hidden] { display: none; }

/* ── the encounter workspace ─────────────────────────────────────────────
   One compact, persistent route around the current encounter. It reports
   server state; the destination renderers still own every clinical action. */
.enc-workspace {
  flex: 0 0 auto; min-width: 0;
  display: flex; align-items: stretch; gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(4,9,10,0.88);
}
.enc-workspace[hidden] { display: none; }
.ew-patient {
  width: 190px; min-width: 190px;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 4px 10px 4px 4px;
  border-right: 1px solid var(--line);
}
.ew-kicker { font: 500 11px/1.25 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.ew-name { font-size: 13px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.ew-detail { font: 500 11px/1.35 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.ew-actions {
  min-width: 0; flex: 1 1 auto;
  display: grid; grid-template-columns: repeat(8, minmax(96px, 1fr)); gap: 6px;
}
.ew-action {
  min-width: 0; min-height: var(--tap);
  display: flex; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-family: var(--display); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ew-action.is-review { border-color: rgba(79,214,200,.45); background: rgba(79,214,200,.12); }
.ew-action:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.ew-action:active { transform: translateY(1px); }
.ew-action[disabled] { opacity: .7; cursor: default; }   /* its state line says WHY it is off, so it must still be read */
.ew-icon { width: 18px; flex: 0 0 auto; text-align: center; font-size: 15px; color: var(--teal); }
.ew-words { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ew-label { font-size: 12px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.ew-state { font: 500 11px/1.3 var(--mono); color: var(--dim); overflow-wrap: anywhere; }

@media (max-width: 1399px) {
  .ew-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .enc-workspace { flex-direction: column; padding: 6px 7px; gap: 6px; }
  .ew-patient { width: 100%; min-width: 0; padding: 2px 4px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ew-action { min-width: 0; padding: 6px; }
  .ew-icon { display: none; }
}

.load-failed {
  width: min(440px, 100%); margin: 24px auto; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid rgba(224,90,74,.42); border-radius: var(--r-l);
  background: var(--panel);
}
.load-failed-t { font-size: 17px; font-weight: 600; color: var(--red-ink); }
.load-failed-s { font: 500 11px/1.5 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.load-failed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.load-failed-actions .btn { flex: 1 1 160px; }

/* ── the body: one region, three layouts ────────────────────────────────── */
main {
  flex: 1 1 auto; min-height: 0;
  display: grid; gap: 0;
  grid-template-columns: 1fr;
  grid-template-areas: "fields";
}
main[hidden] { display: none; }

.col { min-width: 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.col-sources { grid-area: sources; display: none; border-right: 1px solid var(--line); }
.col-note    { grid-area: note;    display: none; border-right: 1px solid var(--line); }
.col-fields  { grid-area: fields;  display: block; }

/* phone — the pass, and nothing else. Everything tappable in the lower half. */
@media (max-width: 767px) {
  .spine { flex-wrap: wrap; gap: 8px 10px; }
  .spine .rule, .spine .studies, .spine .meter, .spine .patient-sub { display: none; }
  .col-fields { padding: 0 16px calc(20px + var(--safe-b)); }
}

/* tablet — the note beside what it still needs */
@media (min-width: 768px) and (max-width: 1599px) {
  main { grid-template-columns: minmax(0,1fr) 380px; grid-template-areas: "note fields"; }
  .col-note   { display: block; padding: 18px 22px; }
  .col-fields { padding: 16px 18px; }
  /* the imaging chips belong to the cockpit; at this width they were pushing
     the spine past the viewport (measured: 1542px of spine at 1000px wide).
     What remains may still not fit a narrow tablet — and the allergy and the
     recording are not hideable, so the spine wraps rather than clips. */
  .spine { flex-wrap: wrap; row-gap: 6px; }
  .spine .meter, .spine .studies { display: none; }
}

/* widescreen — the cockpit */
@media (min-width: 1600px) {
  main { grid-template-columns: 380px minmax(0,1fr) 460px; grid-template-areas: "sources note fields"; }
  .col-sources { display: block; padding: 18px; }
  .col-note    { display: block; padding: 20px 26px; }
  .col-fields  { padding: 18px; }
}

/* ── depth: three planes, one perspective ───────────────────────────────────
   Depth is information — the plane that needs you sits closest. The room
   (plane 0) is atmosphere and never data; the record (plane 1) reads flat;
   the ask (plane 2) leans toward the hand. The phone stays flat: one column
   has no planes to separate, and its speed is the feature.

   Two facts this leans on: a tilted column may poke a few pixels past the
   viewport, so main clips instead of growing a scrollbar; and a scrolling
   column flattens preserve-3d, so a field that leans in does it with scale
   and shadow — same statement, no broken scroll. */
@media (min-width: 768px) {
  /* the spine never clips and never scrolls sideways: whatever this pass
     cannot fit on one row wraps to a second, allergy and recording included */
  .spine { flex-wrap: wrap; row-gap: 6px; }

  body::before {                       /* plane 0 — the room */
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(900px 520px at 78% 18%, rgba(79,214,200,0.05) 0%, rgba(79,214,200,0) 70%),
      radial-gradient(700px 700px at 12% 86%, rgba(79,214,200,0.03) 0%, rgba(79,214,200,0) 70%);
  }
  main { overflow: clip; }

  .field { transition: transform 0.16s ease, box-shadow 0.16s ease; }
  .field.open.stake {                  /* an open high-stake ask leans in */
    transform: scale(1.012);
    box-shadow: var(--z2), 0 0 0 1px rgba(224,164,74,0.14);
  }
}

@media (min-width: 768px) and (max-width: 1599px) {
  main { perspective: 2200px; perspective-origin: 46% 40%; }
  .col-fields {
    transform: rotateY(-1.5deg);
    transform-origin: left center;
    background: linear-gradient(168deg, rgba(16,32,34,0.42), rgba(8,17,19,0.5));
    border-left: 1px solid rgba(79,214,200,0.14);
    box-shadow: var(--z3);
  }
}

@media (min-width: 1600px) {
  main { perspective: 2600px; perspective-origin: 52% 40%; }
  .col-sources {                       /* plane 1, receding — reading only */
    transform: rotateY(1.6deg);
    transform-origin: right center;
    background: linear-gradient(168deg, rgba(10,20,22,0.5), rgba(5,10,11,0.35));
  }
  .col-fields {                        /* plane 2 — the ask sits closest */
    transform: rotateY(-2deg) translateZ(36px);
    transform-origin: left center;
    background: linear-gradient(168deg, rgba(16,32,34,0.5), rgba(8,17,19,0.58));
    border-left: 1px solid rgba(79,214,200,0.16);
    box-shadow: var(--z3);
  }
}

/* ── section furniture ──────────────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: baseline; gap: 9px;
  padding: 14px 0 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--label);
}
.sec-head .right { margin-left: auto; color: var(--faint); }
.sec-note { font-size: 11px; color: var(--dimmer); line-height: 1.5; padding-bottom: 10px; }
/* the visit before this one, on a follow-up (W2.10): read, never edited */
.precis { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--rule); }
.precis-h { font-weight: 600; color: var(--label); margin-bottom: 6px; }
.precis-row { margin-bottom: 6px; }
.precis-k { color: var(--dimmer); }
.precis-held { color: var(--dim); font-style: italic; }
.precis-v { color: var(--ink); line-height: 1.45; white-space: pre-wrap; }

/* ── a field: the pass, made visible ────────────────────────────────────── */
.field {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 13px; margin-bottom: 9px;
  border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
}
.field.open  { background: rgba(224,164,74,0.06); border-color: rgba(224,164,74,0.3); }
.field.stake { border-left: 2px solid rgba(224,164,74,0.55); }

.field-head { display: flex; align-items: baseline; gap: 9px; }
.field-label { font-size: 14px; color: var(--ink-2); }
.field.open .field-label { color: var(--amber-ink); }
.field-unit { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.field-state {
  margin-left: auto; font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.07em; color: var(--label);
}
.field.open .field-state { color: var(--amber); }

.evidence {
  padding: 8px 11px; border-radius: 8px;
  background: rgba(79,214,200,0.05); border-left: 2px solid rgba(79,214,200,0.4);
  font-family: var(--serif); font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.evidence .src {
  display: block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.12em; color: var(--teal); margin-bottom: 3px;
}

.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opt {
  min-height: var(--tap); flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--sunk); border: 1px solid var(--line);
  color: var(--dim); font-size: 15px; font-family: var(--display);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.opt[aria-pressed="true"] {
  background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5);
  /* the same fault: a pressed option was #fff on a pale teal in day, 1.10:1 */
  color: var(--ink); font-weight: 600;
}
.opt:active { transform: translateY(1px); }

/* a value already known — agreed with, not chosen */
.confirm { display: flex; flex-direction: column; gap: 5px; padding: 16px; border-radius: 12px;
           background: var(--sunk); border: 1px solid rgba(79,214,200,0.2); }
/* THE VALUE HE IS ABOUT TO CONFIRM, and it was WHITE ON WHITE in day view:
   `.confirm` grounds itself on --sunk, which the day palette makes #ffffff,
   while this literal stayed #fff -- 1.00:1, an empty box where the TOSP
   code, the level or the side should be. --ink is near-white in dark, so
   the shipped design is unchanged and day gets a colour. */
.confirm .big   { font-family: var(--mono); font-size: 28px; color: var(--ink); letter-spacing: 0.02em; }
.confirm .small { font-size: 14px; color: var(--ink-2); }
.confirm .src   { font-family: var(--mono); font-size: 10px; color: var(--label); padding-top: 3px; }

/* the alternatives behind a confirm — a different value goes in by slide */
.alts { display: flex; flex-direction: column; gap: 7px; padding-top: 4px; }
.alts[hidden] { display: none; }
.alt {
  min-height: var(--tap);
  display: flex; align-items: baseline; gap: 12px; text-align: left;
  padding: 10px 14px; border-radius: 10px;
  background: var(--sunk); border: 1px solid var(--line);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.alt .alt-code   { font-size: 15px; color: var(--ink-2); letter-spacing: 0.02em; }
.alt .alt-detail { font-size: 13px; color: var(--dim); }
.alt.on {
  background: rgba(224,164,74,0.10); border-color: rgba(224,164,74,0.5);
}
.alt.on .alt-code { color: var(--amber-ink); }

/* a suggestion — lit before anyone touched it, and it says so */
.opt.suggested {
  border-style: dashed; border-color: rgba(224,164,74,0.5);
  background: rgba(224,164,74,0.07); color: var(--amber-ink);
}

.btn-wide { width: 100%; margin-top: 9px; }
.slide-slot:empty { display: none; }
.slide-slot { padding-top: 8px; }

/* the ones a mis-tap must not decide — a real drag, end to end */
.slide {
  position: relative; height: 56px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center;
  background: rgba(224,90,74,0.10); border: 1px solid rgba(224,90,74,0.45);
}
.slide .knob { position: absolute; left: 0; top: 0; bottom: 0; width: 88px;
               border-radius: 11px; background: rgba(224,90,74,0.28);
               border: 1px solid rgba(224,90,74,0.6);
               cursor: grab; touch-action: none;
               transition: transform 0.16s ease; }
.slide .knob:active { cursor: grabbing; }
.slide .lab  { position: absolute; left: 104px; font-size: 14px; font-weight: 500; color: #ff8a7a; }
.slide.done  { background: rgba(79,214,200,0.10); border-color: rgba(79,214,200,0.45); }
.slide.done .knob { background: rgba(79,214,200,0.3); border-color: rgba(79,214,200,0.6); cursor: default; }
.slide.done .lab  { color: var(--teal); }

/* the body diagram — where it hurts, drawn on a body that turns */
.map-wrap { display: flex; flex-direction: column; gap: 9px; }
.map-stage { display: flex; justify-content: center; perspective: 900px; }
.map-svg {
  width: min(64%, 220px); height: auto; display: block;
  border-radius: 12px; background: var(--sunk);
  border: 1px solid var(--line);
  /* INERT UNTIL ARMED. pan-y hands vertical gestures to the browser, so a
     finger scrolling the pass never reaches the drawing handlers. Only the
     DRAW tap flips this to none, and then the canvas owns the gesture. */
  touch-action: pan-y; cursor: default;
  transition: transform 0.095s ease-in-out, box-shadow 0.16s ease;
  transform-style: preserve-3d;
}
.map-svg.armed {
  touch-action: none; cursor: crosshair;
  border-color: rgba(224,90,74,0.45);
  box-shadow: 0 0 0 1px rgba(224,90,74,0.25), var(--z1);
}
.map-svg.done { cursor: default; }
.map-dial {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px; border-radius: 999px;
  background: rgba(5,10,11,0.55); border: 1px solid var(--line-soft);
  touch-action: none; cursor: ew-resize;
}
.map-arrow, .map-tick {
  min-height: 32px; padding: 5px 10px; border-radius: 999px;
  background: transparent; border: 1px solid transparent;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--dimmer); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.map-arrow { color: var(--dim); font-size: 12px; }
.map-tick.on { border-color: rgba(79,214,200,0.4); background: rgba(79,214,200,0.1); color: var(--teal); }
.map-body  { fill: rgba(220,235,233,0.05); stroke: var(--rule); stroke-width: 1.6; stroke-linejoin: round; }
.map-guides { stroke: rgba(79,214,200,0.14); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
/* The anatomical landmarks (BODY_LANDMARKS): something to aim by, quieter than
   the outline and never mistaken for a mark -- no fill, no ink colour. */
.map-landmarks path, .map-landmarks circle, .map-landmarks ellipse {
  fill: none; stroke: rgba(220,235,233,0.32); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
}
/* A SKIN ENTRY'S MARK ON THE BODY (nursing, owed inside block 4): the same
   outline, small, the point in the clinic's red. */
.body-mark { width: 48px; height: auto; flex: none; }
.body-pick { width: 160px; height: auto; cursor: crosshair; touch-action: manipulation; }
.body-mark-dot { fill: var(--red); stroke: var(--bg); stroke-width: 3; }
/* THE TWO INKS: red for pain, blue for numbness. The kind is on the stroke,
   so the colour reads the same wherever the drawing is rendered. */
.map-ink path {
  fill: none; stroke-opacity: 0.5;
  stroke-width: 13; stroke-linecap: round; stroke-linejoin: round;
}
.map-ink path.ink-pain { stroke: var(--red); }
.map-ink path.ink-numb { stroke: var(--map-numb); }
.map-ink path.ink-scar { stroke: #8fe39a; stroke-width: 1.6; }
[data-theme="day"] .map-ink path.ink-scar { stroke: #1f7a33; }
.map-svg.erasing { cursor: cell; border-color: rgba(224,164,74,0.45); }
/* the ink buttons carry their own colour, so the choice is seen not read */
.map-ink-btn.ink-pain[aria-pressed="true"] { border-color: rgba(224,90,74,0.6);
  background: rgba(224,90,74,0.14); color: var(--red-ink); }
.map-ink-btn.ink-numb[aria-pressed="true"] { border-color: rgba(90,162,255,0.6);
  background: rgba(90,162,255,0.14); color: #b8d2ff; }
.map-ink-btn.ink-scar[aria-pressed="true"] { border-color: rgba(143,227,154,0.6);
  background: rgba(143,227,154,0.14); color: #c6f2cc; }
[data-theme="day"] .map-ink-btn.ink-scar[aria-pressed="true"] { color: #1f7a33; }
.map-lab   { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dimmer); }
.map-meter { font-size: 10px; color: var(--dim); text-align: center; }
/* THE PLANE: the same card, bigger, over the page (the depth rules' z2). */
.map-plane { position: fixed; inset: 0; z-index: 54; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4,9,10,0.72); }
.map-plane-card { width: min(560px, 100%); max-height: 92vh; overflow: auto;
  padding: 16px; border-radius: 16px; background: rgba(7,15,16,0.98);
  border: 1px solid rgba(79,214,200,0.22); box-shadow: var(--z2); }
.map-wrap.is-big .map-svg { width: min(340px, 78vw); }
.map-wrap.is-big .map-tick { min-height: 36px; font-size: 11px; }

/* ✏️ THE MODULES' DIAGRAMS (21 Oct, diagrams.js): the library's pictures,
   drawn in the theme's own tokens so the day and dark views each read. The
   scenery classes and ink colours are diagram_library's closed sets; the
   picture is inert (pan-y) until a tool is picked, as the body map is. */
.dg-sec .dg-chips { margin: 6px 0 8px; flex-wrap: wrap; }
.dg-card { display: flex; flex-direction: column; gap: 8px; }
.dg-stage { display: flex; justify-content: center; }
.dg-svg {
  width: min(100%, 360px); flex: none; height: auto; display: block; border-radius: 12px;
  background: var(--sunk); border: 1px solid var(--line); touch-action: pan-y; cursor: default;
}
.dg-svg.armed { touch-action: none; cursor: crosshair; border-color: rgba(224,90,74,0.45);
  box-shadow: 0 0 0 1px rgba(224,90,74,0.25), var(--z1); }
.dg-svg.erasing { cursor: cell; border-color: rgba(224,164,74,0.45); }
.dg-card.is-big .dg-svg { width: min(520px, 86vw); }
/* zoomed, the picture keeps its size: the zoom is its viewBox (22 Nov), never a scrollbar */
.dg-zoom { justify-content: center; gap: 6px; }
.dg-zbtn { min-width: var(--tap); }
.dg-zlvl { min-width: 72px; }
/* THE BODY DIAGRAM'S DRAWING CARD (#1198, Dr Lau's arrangement Z, BodyZ):
   a card over the page, centred, just big enough for its one or two bodies
   (drawcard.js sizes them: about 560px tall on a 900px screen); the picture
   menu and × in its head, the region row above the bodies, the views and the
   tools in one row at the bottom, every control at least --tap. */
.dc-plane { position: fixed; inset: 0; z-index: 56; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(5, 10, 11, 0.55); }
.dc-card { width: fit-content; min-width: min(400px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto;
  display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--panel);
  border: 1px solid var(--teal); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); outline: none; }
.dc-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dc-pick { display: flex; align-items: center; gap: 8px; }
.dc-pick select { min-height: 1.75rem; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); }
.dc-title { flex: 1; color: var(--dim); text-align: center; }
.dc-x { min-width: var(--tap); min-height: var(--tap); background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 20px; }
.dc-body { padding: 8px 16px; }
.dc-body > .is-draw { gap: 8px; }
.dc-regions { justify-content: center; flex-wrap: wrap; gap: 4px; }
.dc-ctl { justify-content: center; flex-wrap: wrap; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.dc-card .dc-regions .opt, .dc-card .dc-ctl .opt, .dc-card .dc-ctl .map-tick { min-height: 1.75rem; height: 1.75rem; min-width: 1.75rem; }
.dc-card .dc-ctl .map-arrow { display: none; }
.dc-card .dc-ctl .map-dial { padding: 0; background: none; border: 0; }
/* the rows wrap to the card's width; the bodies decide how wide it is */
.dc-ctl, .dc-regions, .dc-more { width: 0; min-width: 100%; box-sizing: border-box; }
.dc-ctl .dg-views, .dc-ctl .map-dial { display: flex; gap: 4px; }
.dc-stage { display: flex; gap: 24px; justify-content: center; }
.dc-card .dg-stage { display: flex; gap: 24px; justify-content: center; }
.dc-fig { position: relative; width: var(--fig-w); height: var(--fig-h); flex: none; }
.dc-scroll { width: 100%; height: 100%; overflow: hidden; border-radius: 12px; }
.dc-card .dc-scroll > svg, .dc-card .dc-scroll > .dg-svg, .dc-card .dc-scroll > .map-svg {
  width: var(--fig-w); max-width: none; height: auto; transform: none; }
.dc-turn { position: absolute; top: 6px; right: 6px; width: var(--tap); height: var(--tap); border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 18px; }
.dc-more { color: var(--dim); }
.dc-more > summary { min-height: var(--tap); display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* #1221 (board BodyZ). THE CARD OPENS BELOW THE TOP BAR: the scrim starts
   where the bar ends (drawcard.js sets its top), and the card's height is the
   room under it. THE VIEWS AND THE TOOLS ARE ONE ROW on a desktop: the short
   words (Numb, Right, ⌫ …) sit tight, and the row may widen the card a
   little rather than wrap. NO FOOTER LINE: ⋯ in that row opens what was
   under "Read, file, scores and note". A SHORT WINDOW lays ONE figure, with
   ⟳, beside its rows (`dc-side`) instead of shrinking two. */
.dc-card { max-height: calc(100% - 24px); }
.dc-card .dc-more > summary { display: none; }
.dc-card .dc-ctl .opt { flex: 0 0 auto; padding: 0 0.5rem; gap: 0.25rem; }
.dc-card .dc-ctl .dg-views, .dc-card .dc-ctl .map-dial { gap: 4px; }
@media (min-width: 1100px) {
  .dc-card:not(.dc-side) .dc-ctl { flex-wrap: nowrap; width: max-content; min-width: 100%; max-width: calc(100vw - 64px); align-self: center; }
}
.dc-card.dc-side .dc-body > .is-draw { display: grid; grid-template-columns: auto minmax(240px, 340px); grid-template-rows: auto auto 1fr; column-gap: 16px; align-items: start; }
.dc-card.dc-side .dc-body > .is-draw > .dg-stage { grid-column: 1; grid-row: 1 / span 3; }
.dc-card.dc-side .dc-body > .is-draw > .dc-regions,
.dc-card.dc-side .dc-body > .is-draw > .dc-ctl,
.dc-card.dc-side .dc-body > .is-draw > .dc-more { grid-column: 2; width: auto; min-width: 0; }
.dc-card.dc-side .dc-ctl { border-top: 0; justify-content: flex-start; }
.dc-card.dc-side .dc-regions { justify-content: flex-start; }
/* 📝 THE WRITING BOARD (15 Nov, new batch ticket 1): the folder rail, its
   docked list, and the board and the body diagram side by side. */
.wb { display: flex; gap: 10px; align-items: stretch; min-height: 60vh; }
.wb-rail { display: flex; flex-direction: column; gap: 6px; flex: none; width: 72px; }
.wb-sym { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: var(--tap); padding: 6px 2px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--dim); cursor: pointer; font-size: 11px; }
.wb-sym:hover { background: var(--panel-hover); }
.wb-sym.is-open { background: var(--selected-bg); border-color: var(--teal); color: var(--ink); }
.wb-sym-i { font-size: 20px; line-height: 1; }
.wb-sym-n { position: absolute; top: 2px; right: 4px; font-size: 11px; color: var(--teal); }
.wb-sym-body { margin-top: 8px; border-style: dashed; }
.wb-dock { flex: 0 0 280px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 8px; overflow: auto; }
.wb-dock[hidden] { display: none; }
.wb-dock-h { display: flex; align-items: center; gap: 6px; }
.wb-dock-t { flex: 1; font-weight: 600; color: var(--ink); }
.wb-dock-x { min-width: var(--tap); min-height: var(--tap); background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 20px; }
.wb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wb-row { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--r);
  border: 1px solid var(--line-soft); background: var(--sunk); color: var(--ink-2); cursor: grab; }
.wb-row:focus-visible { outline: 2px solid var(--teal); }
.wb-row-grip, .wb-grip { color: var(--faint); cursor: grab; }
.wb-row-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wb-add, .wb-open { min-width: var(--tap); min-height: var(--tap); border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); cursor: pointer; }
.wb-none, .wb-hint { color: var(--faint); font-size: 11px; }
.wb-cards { flex: 1; display: flex; gap: 0; min-width: 0; }
.wb-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-l); padding: 8px; }
.wb-card.wb-drop { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.wb-card-h { display: flex; align-items: center; gap: 8px; }
.wb-card-t { flex: 1; font-weight: 600; color: var(--ink); }
.wb-swap, .wb-fold { min-width: var(--tap); min-height: var(--tap); background: none; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--dim); cursor: pointer; }
.wb-split { flex: 0 0 10px; cursor: col-resize; position: relative; }
.wb-split::after { content: ''; position: absolute; inset: 30% 4px; border-radius: 2px; background: var(--line); }
.wb-split:focus-visible::after, .wb-split:hover::after { background: var(--teal); }
.wb-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wb-tool { min-width: var(--tap); min-height: var(--tap); border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); cursor: pointer; }
.wb-b { font-weight: 700; } .wb-i { font-style: italic; } .wb-u { text-decoration: underline; }
.wb-size { min-height: var(--tap); border-radius: var(--r); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
.wb-editor { flex: 1; min-height: 240px; overflow: auto; padding: 10px; border-radius: var(--r);
  background: var(--sunk); border: 1px solid var(--line-soft); color: var(--ink); line-height: 1.5; outline: none; }
.wb-editor:focus { border-color: var(--teal); }
.wb-editor:empty::before { content: attr(data-placeholder); color: var(--faint); }
.wb-editor h1 { font-size: 20px; margin: 6px 0 2px; } .wb-editor h2 { font-size: 16px; margin: 6px 0 2px; }
.wb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-cont { min-height: var(--tap); max-width: 46%; border-radius: var(--r); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
.wb-editor .wb-carried { color: var(--dim); border-left: 2px dashed var(--line); padding-left: 6px; }
.wb-editor .wb-new { border-left: 2px solid var(--teal); padding-left: 6px; min-height: 1.5em; }
.wb-editor .wb-base-from { color: var(--faint); font-size: 11px; }
.wb-said { color: var(--dim); font-size: 11px; }
/* ticket #1195: an empty status line takes no height, nor a foot holding nothing else */
.wb-said:empty { display: none; }
.wb-foot:not(:has(> :not(.wb-said:empty))) { display: none; }
.wb-body { flex: 1; min-height: 0; overflow: auto; }
/* THE RIGHT RAIL (15 Nov, ticket 3): the encounter's panels as symbols, one
   docked at a time beside the cards. */
.wb-rrail { display: flex; flex-direction: column; gap: 6px; flex: none; width: 72px; }
.wb-rdock { flex: 0 0 380px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 8px; overflow: auto; }
.wb-rdock[hidden] { display: none; }
/* #1197 (Dr Lau, 20 Nov: "the board is floated - similar to body diagram -
   the card size - height and width are adjustable"): the open panel is a card
   over the page, placed and sized by workboard.js (left/top/width/height,
   always inside the window); the writing board keeps its width under it. */
.wb-rdock.wb-float { position: fixed; z-index: 50; flex: none; box-sizing: border-box;
  border-color: var(--teal); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); padding-bottom: 22px; }
.wb-float-h { cursor: move; touch-action: none; border-radius: var(--r); }
.wb-float-h:focus-visible { outline: 2px solid var(--teal); }
.wb-float-grip { font-size: 12px; letter-spacing: -2px; }
.wb-float-size { position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; cursor: nwse-resize;
  touch-action: none; border-right: 3px solid var(--teal); border-bottom: 3px solid var(--teal); border-radius: 0 0 6px 0; }
.wb-float-size:focus-visible { outline: 2px solid var(--teal); }
.wb-rdock-b { min-width: 0; }
/* 📅 THE TCU BUTTON. */
.tcu-stations, .tcu-grid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tcu-grid { margin-top: 8px; }
.tcu-k { color: var(--faint); font-size: 11px; width: 100%; }
.tcu-st { min-height: var(--tap); padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--dim); cursor: pointer; }
.tcu-st.is-on { border-color: var(--teal); background: var(--selected-bg); color: var(--teal); font-weight: 700; }
.tcu-b { min-width: 96px; }
.tcu-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.tcu-row .tcu-k { width: 64px; }
.tcu-n { min-width: var(--tap); padding: 0 6px; }
.tcu-date { min-height: var(--tap); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 0 8px; }
.tcu-why, .tcu-said { color: var(--faint); font-size: 11px; margin-top: 6px; }
/* THE BOARD LAID OUT (22 Nov): three headed blocks -- where next, see again
   in, no date -- and the numbers on one seven-column grid. */
.tcu { display: flex; flex-direction: column; gap: 12px; }
.tcu > .tcu-grid, .tcu .tcu-row { margin-top: 0; }
.tcu-h { text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.tcu-again { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.tcu-again .tcu-row { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); gap: 6px; }
.tcu-again .tcu-row .tcu-k { width: auto; color: var(--dim); }
.tcu .tcu-n { min-width: 0; padding: 0; border: 1px solid var(--line); border-style: solid; border-radius: 8px;
  background: var(--panel-2); color: var(--ink); font-variant-numeric: tabular-nums; }
.tcu .tcu-n:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.tcu-again .tcu-daterow { grid-template-columns: 58px minmax(0, 1fr) auto; border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 2px; }
.tcu-daterow .tcu-date { grid-column: auto; min-width: 0; }
.tcu > .tcu-grid .tcu-b { flex: 1 1 0; min-width: 0; }
.tcu-st { white-space: nowrap; }
/* Pend or Closed (22 Nov): the second step, two halves of one switch. */
.tcu-after { display: flex; flex-direction: column; gap: 6px; }
.tcu-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tcu-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: var(--tap); padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--dim); cursor: pointer; text-align: left; }
.tcu-mode.is-on { border-color: var(--teal); background: var(--selected-bg); color: var(--teal); }
.tcu-mode-l { font-weight: 700; }
.tcu-mode-s { font-size: 11px; color: var(--dim); }
.tcu-pend-say { color: var(--dim); font-size: 12.5px; }
.tcu-pendbox .tcu-pend { width: 100%; }
@media (hover: hover) {
  .tcu .tcu-n, .tcu .tcu-b, .tcu .tcu-st, .tcu .tcu-date { min-height: 32px; }
  .tcu .tcu-b, .tcu .tcu-st { padding: 0 10px; font-size: 12.5px; }
}
@media (max-width: 900px) { .wb-rrail { flex-direction: row; width: auto; overflow-x: auto; } .wb-rdock { flex: none; } }
/* #1196 (Dr Lau, 20 Nov: "clicking all these have no responses"): on the
   encounter page the board's host is the area body, whose later rule stacks
   its children in a column -- so the right dock opened BELOW the cards, out of
   sight inside the scrolling area. Beside the cards, as the dock is meant to sit. */
@media (min-width: 901px) { .dk-area-b.wb { flex-direction: row; } }
/* 🔗 THE REFERRAL BOARD (15 Nov). */
.lb { display: flex; flex-direction: column; gap: 10px; }
.lb-targets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lb-target { min-height: var(--tap); padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.lb-target.is-sx { border-style: dashed; }
.lb-target.is-on { background: var(--selected-bg); border-color: var(--teal); color: var(--teal); }
.lb-addsx { display: inline-flex; gap: 6px; margin-left: auto; }
.lb-sxname { min-height: var(--tap); border-radius: var(--r); background: var(--sunk); color: var(--ink); border: 1px solid var(--line); padding: 0 8px; }
.lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.lb-items, .lb-time { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lb-h { font-weight: 600; color: var(--ink); }
.lb-item { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 6px; background: var(--sunk); }
.lb-item-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.lb-when { color: var(--teal); }
.lb-kind, .lb-who, .lb-by, .lb-none, .lb-said, .lb-patient { color: var(--faint); font-size: 11px; }
.lb-label { flex: 1; min-width: 0; color: var(--ink-2); }
.lb-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.lb-st { min-height: var(--tap); padding: 0 12px; background: var(--panel-2); color: var(--dim); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.lb-st:last-child { border-right: 0; }
.lb-st.is-on.lb-st-linked { background: var(--selected-bg); color: var(--teal); font-weight: 700; }
.lb-st.is-on.lb-st-possibly { background: rgba(255,209,122,0.15); color: var(--amber); font-weight: 700; }
.lb-st.is-on.lb-st-not { background: var(--panel-hover); color: var(--ink); font-weight: 700; }
.lb-lane { display: flex; align-items: center; min-height: 40px; border-bottom: 1px dashed var(--line-soft); }
.lb-lane-who { width: 150px; flex: none; color: var(--dim); font-size: 11px; }
.lb-axis { position: relative; flex: 1; height: 28px; border-bottom: 2px solid var(--line); }
.lb-dot { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; }
.lb-dot-linked { background: var(--teal); }
.lb-dot-possibly { border: 2px dashed var(--amber); background: transparent; }
.lb-dot.is-ref { box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line); }
@media (max-width: 900px) { .lb-grid { grid-template-columns: 1fr; } .lb-addsx { margin-left: 0; } }
/* THE TRANSCRIPTS SYMBOL (ticket 4, proposal C): the list beside the reading pane. */
.tx-head { display: flex; gap: 6px; margin-bottom: 8px; }
.tx-q { flex: 1; min-width: 0; }
.tx-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: 10px; min-height: 0; }
.tx-list { display: flex; flex-direction: column; gap: 4px; overflow: auto; max-height: 60vh; }
.tx-row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; text-align: left; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
.tx-row.is-on { border-color: var(--teal); }
.tx-row.is-current { border-left: 3px solid var(--teal); }
.tx-row[disabled] { opacity: 0.55; cursor: default; }
.tx-snip { text-align: left; margin-left: 12px; padding: 4px 6px; border: 0; background: transparent; color: var(--dim); cursor: pointer; }
.tx-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tx-tab { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.tx-tab.is-on { border-color: var(--teal); color: var(--teal); }
.tx-tab.is-amd { border-style: dashed; }
.tx-words { white-space: pre-wrap; line-height: 1.5; overflow: auto; max-height: 52vh; }
.tx-hit { background: rgba(232, 176, 60, 0.35); color: inherit; border-radius: 2px; }
.tx-acts { display: flex; gap: 6px; margin-top: 8px; }
.tx-tab[draggable="true"] { cursor: grab; }
.tx-del { margin-left: auto; }
.tx-confirm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px; border: 1px solid #c0342a; border-radius: 6px; }
.tx-confirm .tx-k { flex-basis: 100%; color: var(--dim); font-size: 11px; }
.tx-typed { width: 120px; }
.tx-when, .tx-n, .tx-meta, .tx-none, .tx-said, .tx-snip-l { color: var(--faint); font-size: 11px; }
@media (max-width: 900px) { .tx-grid { grid-template-columns: 1fr; } }
/* THE ANSWER ON THE BOARD (ticket 5): source-quoted lines, each editable in place. */
.ans-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ans-chip { border: 1px solid var(--teal); border-radius: 14px; padding: 3px 10px; background: transparent; color: var(--ink); cursor: pointer; }
.ans-h { margin: 10px 0 2px; color: var(--teal); font-weight: 600; letter-spacing: .06em; }
.ans-ln { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 2px 0; }
.ans-src { flex: none; border: 1px solid var(--rule); border-radius: 8px; padding: 0 6px; background: transparent; color: var(--faint); cursor: pointer; }
.ans-src.is-carried { border-style: dashed; }
.ans-src.is-amd { border-color: var(--amber); color: var(--amber); }
.ans-text { flex: 1; min-width: 0; cursor: text; border-bottom: 1px dashed transparent; }
.ans-text:hover, .ans-text:focus { border-bottom-color: var(--rule); outline: none; }
.ans-ln.is-edited .ans-text { color: var(--ink); }
.ans-edit { flex: 1; min-width: 0; }
.ans-tag { color: var(--teal); border: 1px solid var(--teal); border-radius: 8px; padding: 0 6px; }
.ans-quote { flex-basis: 100%; margin-left: 4px; padding: 4px 8px; border-left: 2px solid var(--rule); color: var(--dim); }
.ans-quote[hidden] { display: none; }
.ans-unclear { margin: 4px 0; padding: 6px 8px; border: 1px solid #b98a2e; border-radius: 6px; background: rgba(232, 176, 60, 0.08); }
.ans-removed summary { cursor: pointer; color: var(--dim); margin-top: 10px; }
.ans-k, .ans-said, .ans-src, .ans-tag { font-size: 11px; }
.ans-k, .ans-said { color: var(--faint); }
.wb-rsym { cursor: grab; }
/* THE BOARD'S SYMBOLS ON THE PAGE'S RIGHT RAIL (20 Nov): the column moved
   into the encounter page's rail above 🌴 and ⚙️; it scrolls inside the rail
   rather than clipping, a symbol only while the rail is narrow and its words
   once the rail is widened, as the rail's own tiles do. */
.dk-setrail-tools { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; overflow-y: auto;
  padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.dk-setrail-tools:empty { display: none; }
.wb-rrail.wb-rrail-page { width: 100%; flex: 0 0 auto; gap: 4px; align-items: center; }
.wb-rrail-page .wb-rsym { position: relative; }
/* FOLDED, A THIN STRIP OF THE BOARD'S SYMBOLS (19 Nov, amending #1177): the
   same slot under the fold arrow, one symbol wide, each a full tap target. */
.dk-setrail.is-folded.has-strip .dk-setrail-tools { width: var(--tap); padding-bottom: 0; border-bottom: 0; }
.dk-setrail.is-folded.has-strip .wb-rrail-page { gap: 4px; }
/* THE BOARD'S LEFT SYMBOLS ON THE PAGE'S LEFT RAIL (20 Nov): a thin bar of
   their own while the bill is open, inside the bill's folded rail while it is
   folded; the symbol alone, its name on hover, and the bar scrolls rather
   than clipping. */
.dk-enc-lrail { overflow-y: auto; }
.dk-lrail-tools { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; overflow-y: auto; }
.dk-lrail-tools:empty { display: none; }
.dk-left-rail > .dk-lrail-tools { padding-top: 6px; border-top: 1px solid var(--rule); }
.wb-rail.wb-rail-page { width: 100%; flex: 0 0 auto; gap: 4px; align-items: center; }
.wb-imp { position: relative; padding: 2px 26px 2px 6px; margin: 2px 0; border-left: 3px solid var(--teal); background: rgba(79, 214, 200, 0.06); border-radius: 4px; }
.wb-imp::before { content: attr(data-tag); display: inline-block; margin-right: 8px; padding: 0 6px; border: 1px solid var(--teal); border-radius: 8px; color: var(--teal); font-size: 11px; }
.wb-imp-x { position: absolute; right: 4px; top: 2px; border: 0; background: transparent; color: var(--faint); cursor: pointer; }
.wb-imp-x::after { content: '×'; }
.wb-h-soap { color: var(--teal); font-weight: 700; margin-top: 6px; }
/* THE RAILS (21 Nov, "make the railing overflow from left to right, right
   to left"): a symbol drawn on the other rail for want of room on its own
   sits above a dashed line, its own outline dashed. */
.wb-rail-spill { flex: none; align-self: stretch; height: 0; margin: 2px 4px; border-top: 2px dashed var(--teal); }
.wb-sym.is-guest { border-style: dashed; border-color: var(--teal); }
.wb-rail .wb-sym, .wb-rrail .wb-sym { cursor: grab; }
.wb-rgrip { position: absolute; top: 1px; left: 3px; font-size: 9px; color: var(--faint); letter-spacing: -2px; }
.wb-card-body.wb-drop-sym { outline: 2px dashed var(--teal); outline-offset: -4px; background: rgba(79, 214, 200, 0.08); }
.wb-cardtool { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.wb-back { border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; padding: 0 6px; }
@media (max-width: 900px) {
  .wb { flex-direction: column; }
  .wb-rail { flex-direction: row; width: auto; overflow-x: auto; }
  .wb-dock { flex: none; max-height: 40vh; }
  .wb-cards { flex-direction: column; gap: 10px; }
  .wb-cards > .wb-card { flex: none !important; }
  .wb-split { display: none; }
}
.dg-outline { fill: none; stroke: var(--rule); stroke-width: 1.5; stroke-linejoin: round; }
.dg-soft { fill: rgba(220,235,233,0.06); stroke: var(--rule); stroke-width: 1.2; }
.dg-organ { fill: rgba(255,154,141,0.10); stroke: var(--rule); stroke-width: 1.3; }
.dg-bone { fill: rgba(240,232,210,0.10); stroke: var(--rule); stroke-width: 1.2; }
.dg-cartilage { fill: rgba(145,189,255,0.14); stroke: var(--line); stroke-width: 1; }
.dg-muscle { fill: rgba(255,154,141,0.07); stroke: var(--line); stroke-width: 1; }
.dg-fluid { fill: rgba(145,189,255,0.10); stroke: var(--line); stroke-width: 1; }
.dg-artery { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-opacity: 0.8; }
.dg-vein { fill: none; stroke: var(--map-numb); stroke-width: 2.2; stroke-linecap: round; stroke-opacity: 0.8; }
.dg-nerve { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-opacity: 0.8; }
.dg-faint { fill: none; stroke: var(--line); stroke-width: 0.8; stroke-dasharray: 3 3; }
.dg-label { fill: var(--dim); font-family: var(--mono); }
.dg-zone { fill: rgba(79,214,200,0.03); stroke: rgba(79,214,200,0.30); stroke-width: 0.7; stroke-dasharray: 2 3; }
.dg-zone:hover { fill: rgba(79,214,200,0.12); }
.dg-hide-zones .dg-zone { stroke: transparent; fill: transparent; }
.dg-fill-normal { fill: rgba(79,214,200,0.28); }
.dg-fill-impaired { fill: rgba(255,209,122,0.45); }
.dg-fill-absent { fill: rgba(255,154,141,0.50); }
.dg-fill-nt { fill: rgba(160,187,183,0.30); }
/* SHADED AREAS (24 Oct, the pain areas proposed from the dictation and filed
   whole): a named region filled in its ink, kept visible when the zones are
   hidden, because a shaded area is part of the drawing, not a guide. */
.dg-zone.dg-fill-shade-red, .dg-hide-zones .dg-zone.dg-fill-shade-red { fill: rgba(255,154,141,0.45); stroke: #ff9a8d; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-blue, .dg-hide-zones .dg-zone.dg-fill-shade-blue { fill: rgba(145,189,255,0.45); stroke: #91bdff; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-amber, .dg-hide-zones .dg-zone.dg-fill-shade-amber { fill: rgba(255,209,122,0.45); stroke: #ffd17a; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-teal, .dg-hide-zones .dg-zone.dg-fill-shade-teal { fill: rgba(114,229,213,0.40); stroke: #72e5d5; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-green, .dg-hide-zones .dg-zone.dg-fill-shade-green { fill: rgba(143,227,154,0.40); stroke: #8fe39a; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-purple, .dg-hide-zones .dg-zone.dg-fill-shade-purple { fill: rgba(201,166,255,0.40); stroke: #c9a6ff; stroke-dasharray: none; }
.dg-zone.dg-fill-shade-grey, .dg-hide-zones .dg-zone.dg-fill-shade-grey { fill: rgba(115,153,155,0.40); stroke: #73999b; stroke-dasharray: none; }
[data-theme="day"] .dg-zone.dg-fill-shade-red, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-red { fill: rgba(183,45,38,0.30); stroke: #b72d26; }
[data-theme="day"] .dg-zone.dg-fill-shade-blue, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-blue { fill: rgba(34,91,173,0.28); stroke: #225bad; }
[data-theme="day"] .dg-zone.dg-fill-shade-amber, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-amber { fill: rgba(120,82,12,0.28); stroke: #78520c; }
[data-theme="day"] .dg-zone.dg-fill-shade-teal, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-teal { fill: rgba(0,107,96,0.26); stroke: #006b60; }
[data-theme="day"] .dg-zone.dg-fill-shade-green, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-green { fill: rgba(31,122,51,0.26); stroke: #1f7a33; }
[data-theme="day"] .dg-zone.dg-fill-shade-purple, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-purple { fill: rgba(107,63,181,0.26); stroke: #6b3fb5; }
[data-theme="day"] .dg-zone.dg-fill-shade-grey, [data-theme="day"] .dg-hide-zones .dg-zone.dg-fill-shade-grey { fill: rgba(85,121,125,0.26); stroke: #55797d; }
.dg-proposed:empty { display: none; }
.dg-shade-chips { flex-wrap: wrap; }
.dg-shade-chip { white-space: normal; text-align: left; }
.dg-quotes .pd-line { color: var(--dim); }
.dg-dropped { color: var(--dim); }
.dg-scores { display: flex; flex-direction: column; gap: 4px; }
.dg-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dg-score-v { font-weight: 600; }
.dg-score-add { flex-wrap: wrap; align-items: center; }
.dg-score-add .pd-in { width: auto; min-width: 0; }
.dg-score-about { flex: 1 1 140px; }
.dg-ink path { fill: none; stroke-opacity: 0.6; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.dg-ink path.dg-ink-red, .dg-ink-btn.dg-ink-red[aria-pressed="true"] { stroke: var(--red); border-color: var(--red); }
.dg-ink path.dg-ink-blue, .dg-ink-btn.dg-ink-blue[aria-pressed="true"] { stroke: var(--map-numb); border-color: var(--map-numb); }
.dg-ink path.dg-ink-amber, .dg-ink-btn.dg-ink-amber[aria-pressed="true"] { stroke: var(--amber); border-color: var(--amber); }
.dg-ink path.dg-ink-teal, .dg-ink-btn.dg-ink-teal[aria-pressed="true"] { stroke: var(--teal); border-color: var(--teal); }
.dg-ink path.dg-ink-green, .dg-ink-btn.dg-ink-green[aria-pressed="true"] { stroke: #8fe39a; border-color: #8fe39a; }
.dg-ink path.dg-ink-purple, .dg-ink-btn.dg-ink-purple[aria-pressed="true"] { stroke: #c9a6ff; border-color: #c9a6ff; }
.dg-ink path.dg-ink-grey, .dg-ink-btn.dg-ink-grey[aria-pressed="true"] { stroke: var(--rule); border-color: var(--rule); }
[data-theme="day"] .dg-ink path.dg-ink-green, [data-theme="day"] .dg-ink-btn.dg-ink-green[aria-pressed="true"] { stroke: #1f7a33; border-color: #1f7a33; }
[data-theme="day"] .dg-ink path.dg-ink-purple, [data-theme="day"] .dg-ink-btn.dg-ink-purple[aria-pressed="true"] { stroke: #6b3fb5; border-color: #6b3fb5; }
[data-theme="day"] .dg-zone { fill: rgba(11,114,102,0.03); stroke: rgba(11,114,102,0.35); }
[data-theme="day"] .dg-fill-normal { fill: rgba(11,114,102,0.25); }
[data-theme="day"] .dg-fill-impaired { fill: rgba(138,94,12,0.30); }
[data-theme="day"] .dg-fill-absent { fill: rgba(192,52,42,0.30); }
.dg-ink-btn[aria-pressed="true"] { background: rgba(79,214,200,0.10); }
.dg-meter { color: var(--dim); text-align: center; }
.dg-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-thumb-fig { margin: 0; }
.dg-thumb { width: 140px; height: auto; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line-soft); }
.dg-cap { color: var(--dimmer); text-align: center; }
.dg-filed-item { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
/* 🧬 THE PEDIGREE (22 Oct, pedigree.js): the standard symbols in the theme's
   own tokens -- an affected quadrant is filled in the ink the outline is
   drawn in, so it reads filled in the day view and the dark view alike. The
   tree scrolls sideways inside its own box rather than shrinking past
   reading. */
.pg-stage { overflow-x: auto; justify-content: flex-start; }
.pg-svg { max-width: none; flex: none; display: block; border-radius: 12px;
  background: var(--sunk); border: 1px solid var(--line); }
.pg-sym { fill: transparent; }
.pg-edge { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.pg-fill, .pg-dot, .pg-head { fill: var(--ink); }
.pg-line { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.pg-halo { stroke: var(--sunk); stroke-width: 4.5; stroke-linecap: round; }
.pg-txt, .pg-gen { fill: var(--dim); font-family: var(--mono); }
.pg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--dim); }
.pg-said:empty { display: none; }
.pg-row { border-top: 1px solid var(--line-soft); padding: 6px 0; }
.pg-row-h { cursor: pointer; }
.pg-row-b { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px; }
.pg-mark, .pg-add, .pg-sex, .pg-union, .pg-cond { flex-wrap: wrap; align-items: center; }
.pg-mark-k, .pg-union-h { color: var(--dim); min-width: 4em; }
/* 24 Oct: twins, adoption, a pregnancy; the draft from the dictation */
.pg-dash { stroke-dasharray: 5 4; }
.pg-preg, .pg-q, .pg-sb { fill: var(--ink); }
.pg-kind, .pg-adopt, .pg-twin { flex-wrap: wrap; align-items: center; }
.pg-twin-h { color: var(--dim); min-width: 4em; }
.pg-draft:empty { display: none; }
.pg-dropped { color: var(--dim); }

/* not yours to answer */
.waiting {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 12px;
  background: var(--sunk); border: 1px dashed rgba(79,214,200,0.22);
  color: var(--dim); font-size: 14px;
}

/* ── the note, as blocks ────────────────────────────────────────────────── */
.block {
  display: flex; gap: 11px; padding: 11px 12px; margin-bottom: 9px;
  border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
}
.block.out { background: rgba(5,10,11,0.3); border-color: rgba(79,214,200,0.06); }
.tick {
  width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px;
  border-radius: 4px; border: 1.5px solid rgba(79,214,200,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #04191a; cursor: pointer;
}
.tick.on { background: var(--teal); border-color: var(--teal); }
/* A 16px tick is too small for a finger: a 44px hit area around it (5 Dec). */
.tick { position: relative; }
.tick::before { content: ""; position: absolute; inset: -14px; }
.block-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }
.block-head { display: flex; align-items: baseline; gap: 8px; }
.kind {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.09em;
  padding: 2px 6px; border-radius: 3px;
  border: 1px solid rgba(79,214,200,0.16); color: var(--dimmer);
}
.block-h { font-family: var(--mono); font-size: 9px; letter-spacing: 0.13em; color: var(--label); }
/* WHERE A BLOCK OF THE NOTE CAME FROM. --hush is A DIVIDER in the day
   palette by its own comment, and this is text -- 1.3:1, and at 13.3px
   since the type scale, so it is large as well as unreadable. --faint is
   the dim TEXT token: near-identical in dark, 4.7:1 in day. */
.block-src { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--faint); }
.block-t { font-family: var(--serif); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.block.out .block-t { color: var(--dimmer); }

/* the section mic — dictation addressed to one heading */
.mic {
  margin-left: 8px; flex: 0 0 auto;
  min-width: 30px; height: 24px; padding: 0 8px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  background: transparent; border: 1px solid var(--line); color: var(--dimmer);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.block-src + .mic { margin-left: 8px; }
.block-head .mic { order: 9; }
.mic:hover { color: var(--red-ink); border-color: rgba(224,90,74,0.45); }
.mic.on {
  color: #ff8a7a; background: rgba(224,90,74,0.14);
  border-color: rgba(224,90,74,0.55);
}
/* typed into one section (wave 4, B4) -- the box beside the mic */
.block-head .typed-pen { order: 10; margin-left: 4px; }
.typed-pen:hover { color: var(--teal); border-color: var(--teal); }
.typed-take { display: flex; gap: 6px; align-items: flex-end; margin: 6px 0 2px; }
.typed-take[hidden] { display: none; }
.typed-words {
  flex: 1 1 auto; min-width: 0; resize: vertical; font: inherit;
  background: var(--sunk); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px;
}
.block.listening { border-color: rgba(224,90,74,0.5); box-shadow: 0 0 0 1px rgba(224,90,74,0.2), var(--z1); }

.take-section { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--amber); }

/* ── sources ────────────────────────────────────────────────────────────── */
.take {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; margin-bottom: 8px; border-radius: 9px;
  background: var(--panel-2); border: 1px solid var(--line-soft); cursor: pointer;
}
.take.on { background: rgba(79,214,200,0.08); border-color: rgba(79,214,200,0.3); }
.take-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.take-where { font-size: 12px; color: var(--ink-2); }
.take-when  { font-size: 10px; color: var(--dimmer); }
.take-src   { font-family: var(--mono); font-size: 8px; letter-spacing: 0.05em; color: var(--faint); }

/* ── the foot ───────────────────────────────────────────────────────────── */
.footrule {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line); background: rgba(4,9,10,0.72);
  font-size: 12px; color: var(--dimmer);
}
.footrule[hidden] { display: none; }

.file-bar { position: sticky; bottom: 0; padding-top: 10px;
            display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
            background: linear-gradient(180deg, rgba(4,9,10,0) 0%, rgba(4,9,10,0.92) 34%); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── what the phone can capture ──────────────────────────────────────────────
   The sections strip earns its place only where the note is hidden: below
   768px the mics on the block headings are off screen, so this is the only
   way to dictate into a heading. At 768 and up the note is right there, so
   the strip stands down and the paperclip stays. */
.capture { flex: 0 0 auto; }
.capture[hidden] { display: none; }

.cap-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: rgba(4,9,10,0.82);
}

.cap-strip {
  display: flex; gap: 7px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cap-strip::-webkit-scrollbar { display: none; }
/* AND IT HAS TO LOOK SCROLLABLE. Seven section chips are 970px wide; a 390px
   phone shows three, the scrollbar is hidden on purpose, and nothing said the
   rest were there. The mask fades the last few pixels so the row reads as cut
   off rather than finished -- and it fades only while there IS more, because
   a permanent fade is decoration that teaches nothing. */
.cap-strip {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
}
.cap-strip.ends {
  -webkit-mask-image: none;
          mask-image: none;
}

.sect {
  flex: 0 0 auto; min-height: 38px;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--sunk); border: 1px solid var(--line);
  font-family: var(--display); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sect-h { font-size: 11px; color: var(--dim); letter-spacing: 0.01em; white-space: nowrap; }
.sect-n { font-size: 10px; color: var(--faint); }

/* a section that has audio held for it */
.sect.has { background: rgba(79,214,200,0.08); border-color: rgba(79,214,200,0.3); }
.sect.has .sect-h { color: var(--ink-2); }
.sect.has .sect-n { color: var(--teal); }

/* a block still out of the note — the one nothing has been said about */
.sect.empty { border-color: rgba(224,164,74,0.32); background: rgba(224,164,74,0.06); }
.sect.empty .sect-h { color: var(--amber-ink); }

/* recording, right now */
.sect.rec { background: rgba(224,90,74,0.16); border-color: rgba(224,90,74,0.55); }
.sect.rec .sect-h { color: #ff8a7a; }
.sect.rec .sect-n { color: #ff8a7a; font-variant-numeric: tabular-nums; }

/* no microphone on this device — stated, never pretended around */
.sect.nomic { opacity: 0.5; }

.clip {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1;
  background: rgba(79,214,200,0.1); border: 1px solid rgba(79,214,200,0.3);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.clip:active { transform: translateY(1px); }

/* the sheet — Telegram's arrangement: one clip, one sheet, three ways in */
.sheet {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 10px calc(10px + var(--safe-b));
  background: rgba(4,9,10,0.72);
}
.sheet[hidden] { display: none; }
.sheet-card {
  width: min(460px, 100%);
  display: flex; flex-direction: column; gap: 7px;
  padding: 14px; border-radius: 18px;
  background: rgba(7,15,16,0.98); border: 1px solid rgba(79,214,200,0.22);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
}
.sheet-h { font-size: 9px; letter-spacing: 0.2em; color: var(--label); padding: 2px 4px 4px; }
.sheet-row {
  min-height: var(--tap);
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 11px 13px; border-radius: 12px;
  background: var(--sunk); border: 1px solid var(--line);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sheet-g  { font-size: 18px; color: var(--teal); flex: 0 0 auto; }
.sheet-t  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-t1 { font-size: 15px; color: var(--ink-2); }
.sheet-t2 { font-size: 11.5px; color: var(--dimmer); }
.sheet-cancel {
  min-height: var(--tap); margin-top: 3px;
  padding: 11px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line);
  font-family: var(--display); font-size: 14px; color: var(--dim);
  cursor: pointer;
}
.hidden-file { display: none; }

/* at 768 and up the note carries its own mics, so the strip stands down */
@media (min-width: 768px) {
  .cap-strip { display: none; }
  .cap-bar { justify-content: flex-end; }
}

/* What filing said. The button used to have no handler at all -- drawn,
   styled, and silent on a real phone after three recordings and a photo.
   Whatever happens now, it says so here: filed, or the rows still open, or
   the door out of reach. */
.file-said { font: 500 12px/1.5 "IBM Plex Mono", monospace; margin-top: 10px;
  padding: 9px 11px; border-radius: 6px; border: 1px solid var(--hush);
  color: var(--dim); background: var(--panel, #071214); }
.file-said.ok { color: var(--teal); border-color: var(--rule); }
.file-said.no { color: var(--amber); border-color: #4d3c22; }

/* PRESSED, VISIBLY. The only half of the feedback that cannot be refused by
   the WebView, so it carries the weight: every button and every tappable row
   moves under the finger. -webkit-tap-highlight-color is cleared because
   Android's default grey flash arrives late and reads as lag. */
.btn, .take, .chip, .tick { -webkit-tap-highlight-color: transparent;
  transition: transform .06s ease, filter .06s ease; }
.btn:active, .take:active, .chip:active, .tick:active {
  transform: scale(.97); filter: brightness(1.25); }
.btn:active { box-shadow: inset 0 2px 6px rgba(0,0,0,.45); }

/* What a recording said, opened by tapping it. */
.take-text { grid-column: 1 / -1; margin-top: 8px; padding: 9px 11px;
  border-radius: 6px; border: 1px solid var(--hush); background: rgba(0,0,0,.25);
  font: 400 13px/1.55 "Newsreader", Georgia, serif; color: var(--ink-2);
  white-space: pre-wrap; }

/* A CONTROL LOOKS LIKE ONE, AND ONLY IF IT IS ONE. Three pills in the header
   carried a border, a colour and a dot and had no listener at all -- which is
   a button as far as a thumb is concerned. The ones that act now say so. */
.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .06s ease, filter .06s ease; }
.tappable:active { transform: scale(.97); filter: brightness(1.25); }
.tappable:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* What a header control said when it was tapped. */
.spine-said { flex-basis: 100%; order: 99; font: 500 11px/1.5 "IBM Plex Mono", monospace;
  color: var(--amber); padding: 6px 0 0; }

/* ── recordings, numbered, with what they heard ──────────────────────────── */
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec { border: 1px solid var(--hush); border-radius: 7px; padding: 10px 11px;
  background: var(--panel, #071214); display: flex; flex-direction: column; gap: 5px;
  flex: 1 1 auto; min-width: 0; }
.rec-bad { border-color: #4a2521; }
.rec-head { display: flex; align-items: baseline; gap: 10px; }
.rec-n { font-size: 10.5px; letter-spacing: .1em; color: var(--ink-2); font-weight: 600; }
.rec-state { font-size: 10px; letter-spacing: .07em; margin-left: auto; }
.rec-sub { font-size: 10.5px; color: var(--dim); }
.rec-text { font: 400 13px/1.55 "Newsreader", Georgia, serif; color: var(--ink);
  white-space: pre-wrap; padding: 8px 10px; border-radius: 6px;
  background: rgba(0,0,0,.28); border: 1px solid var(--hush); }
.rec-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rec-say { font-size: 10.5px; color: var(--dim); line-height: 1.5; }
.btn-small { font-size: 11.5px; padding: 6px 11px; }
/* WITHDRAWN, WHICH IS NOT DELETED. The row stays, dimmed and struck, because
   it is out of the note and still on the record -- and a row that vanished
   would claim a destruction this system does not do. Kept readable rather
   than ghosted: he may need to read what he took out. */
.rec-out { border-style: dashed; opacity: .72; }
.rec-struck { text-decoration: line-through; text-decoration-thickness: 1px;
  text-decoration-color: var(--dim); color: var(--dim); }
.tick-off { opacity: .35; cursor: default; }
.take-out { order: 2; }

/* Remove is the one control here that changes the record, so it is quiet
   until it is armed, and unmistakable once it is. */
.btn-quiet { color: var(--dim); border-color: var(--hush); background: transparent; }
.btn-quiet:hover { color: var(--ink-2); }
.btn-arm { color: var(--red-ink, #e07a6f); border-color: #4a2521;
  background: rgba(120,40,34,.14); }

/* The switch that spends money, beside the button that spends it. */
.file-auto { display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 11px; color: var(--dim); line-height: 1.45; }
.file-auto input { accent-color: var(--teal); width: 15px; height: 15px; flex: 0 0 auto; }

/* What else this encounter can produce, under the buttons that produce it. */
.letter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  flex: 1 1 100%; padding-top: 4px; }



/* the drawer a section chip opens */
.sect-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sect-open { font-size: 10.5px; letter-spacing: .06em; padding: 5px 9px;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--panel, #071214);
  color: var(--teal-2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sect-open:active { transform: scale(.97); filter: brightness(1.25); }
.sect-open:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* THE RECORDINGS DRAWER, FULL WIDTH, UNDER THE BAR.
   It used to be `.sect-drawer`, a flex line inside the chip's own wrap --
   which sits inside a strip that scrolls sideways, so on a 390px phone the
   transcript and its buttons rendered in a 160px column. Out here it has the
   width of the screen, which is what a transcript needs and what makes "shows
   all recording" mean anything on the device he carries. */
.cap-drawer {
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(4,9,10,0.82);
  max-height: 46vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cap-drawer[hidden] { display: none; }
.cap-drawer-h {
  font-size: 9px; letter-spacing: 0.18em; color: var(--dimmer);
  padding-bottom: 8px;
}
/* THE DOOR TO EVERY RECORDING. Pinned beside the paperclip rather than left
   among the section chips, so it never scrolls off the edge of the phone. */
.sect-all {
  flex: 0 0 auto; min-height: 38px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(79,214,200,0.34); background: rgba(79,214,200,0.07);
  color: var(--teal); font-size: 11px; letter-spacing: .06em;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sect-all:active { transform: scale(.97); filter: brightness(1.25); }
.sect-all:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── the review, on the console (6 September) ─────────────────────────── */
.review { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid rgba(79,214,200,0.34);
  border-radius: 8px; background: rgba(79,214,200,0.06); }
.review-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; }
.review-t { font-weight: 600; color: var(--teal); }
.review-red { font-size: 11px; color: var(--amber); }
.review-row { display: flex; flex-wrap: wrap; gap: 8px; }
.review-frame { margin-top: 10px; }
.review-pdf { width: 100%; height: 70vh; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.btn-danger { border-color: rgba(230,110,90,0.5); color: var(--red); }

/* ── the points the model flagged (commit 6) ──────────────────────────── */
.points { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; }
.points-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; }
.points-t { font-weight: 600; }
.points-n { font-size: 11px; color: var(--dim); }
.pt { padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.pt:first-of-type { border-top: 0; }
.pt-settled { opacity: 0.55; }
.pt-head { display: flex; gap: 8px; align-items: baseline; }
.pt-n { color: var(--dim); font-size: 11px; }
.pt-kind { font-size: 10px; letter-spacing: 0.06em; color: var(--red); }
.pt-offer .pt-kind { color: var(--teal); }
.pt-stop .pt-kind { color: var(--amber); }
.pt-was, .pt-mark { font-size: 10px; letter-spacing: 0.06em; color: var(--dim); }
.pt-text { margin: 3px 0; }
.pt-heard { font-size: 11.5px; margin: 2px 0; }
.pt-quote { color: var(--teal-2); }
.pt-heard-note { color: var(--dim); font-size: 10.5px; margin-left: 6px; }
.pt-sug { font-size: 12px; margin: 3px 0; }
.pt-sug-l { color: var(--dim); font-size: 10px; letter-spacing: 0.06em; margin-right: 6px; }
.pt-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pt-acts .btn.on { border-color: var(--teal); color: var(--teal); }
.pt-apply { margin-top: 10px; }
.pt-unc { font-size: 11.5px; margin-top: 3px; }

/* ── his own words on a point (commit 7) ──────────────────────────────── */
.say { margin-top: 10px; padding: 9px 10px; border: 1px solid rgba(230,180,90,0.4);
  border-radius: 7px; background: rgba(230,180,90,0.05); }
.say-t { font-weight: 600; color: var(--amber); margin-bottom: 5px; }
.say-q { font-size: 12px; margin: 2px 0; }
.say-box { width: 100%; margin: 7px 0; padding: 7px 8px; border-radius: 6px;
  border: 1px solid var(--rule); background: transparent; color: inherit;
  font: inherit; resize: vertical; }

/* -- the close (commit 8) -------------------------------------------- */
.close, .close-owed { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; }
.close-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.close-t { font-weight: 600; }
.close-n { font-size: 11px; color: var(--amber); }
.close-rows { display: flex; flex-direction: column; gap: 7px; }
.close-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.close-why { font-size: 11.5px; color: var(--dim); }
/* W2.1: the order composed in his own words, on the medication question. */
.close-order { display: flex; flex-direction: column; gap: 8px; margin-top: 6px;
  padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; }
.close-rb { color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
/* The drafted order, one row per medicine with its gap under it (C2), and
   the line above them saying it is drafted, not filed. */
.close-rb-head { color: var(--amber); font-weight: 600; padding-bottom: 6px; }
.close-rb-row { padding: 7px 0; border-top: 1px solid var(--hush); overflow-wrap: anywhere; }
.close-rb-gap { color: var(--amber); padding-left: 1.6em; margin-top: 2px; }
.close-discard-line { margin-top: 4px; }
.close-hits { display: flex; flex-wrap: wrap; gap: 6px; }
.close-words { flex: 1 1 220px; min-width: 0; padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--sunk); color: var(--ink); }
/* W2.4: the ward. */
.wd-row { border: 1px solid var(--rule); border-radius: 9px; padding: 10px 11px;
  margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.wd-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.wd-where { color: var(--dim); }
.wd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-row.wd-oneline > .wd-head { flex-wrap: nowrap; align-items: center; min-width: 0; }
.wd-oneline .wd-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-oneline .wd-acts { flex-wrap: nowrap; margin-left: auto; flex: 0 0 auto; }
.wd-acts .wd-sym { min-width: 40px; padding-left: 8px; padding-right: 8px; font-size: 17px; }
.wd-outcome { display: flex; flex-direction: column; gap: 6px; }
/* The ward as a TABLE (ticket #1143, 18 Nov). A patient is a tbody of two
   rows: the columns, then what opens under them across the whole table. The
   table scrolls sideways inside its own box on a narrow screen; the page does
   not. */
.wd-table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 9px; margin-bottom: 8px; }
.wd-table { width: 100%; border-collapse: collapse; }
.wd-th { text-align: left; font-weight: 600; color: var(--dim); padding: 8px 10px; white-space: nowrap;
  border-bottom: 1px solid var(--rule); }
.wd-table tr.wd-row { display: table-row; border: 0; border-radius: 0; padding: 0; margin: 0; }
.wd-td { padding: 8px 10px; vertical-align: middle; border-top: 1px solid var(--rule); }
.wd-c-key, .wd-c-days, .wd-c-admitted { white-space: nowrap; }
.wd-c-acts { text-align: right; }
.wd-c-acts .wd-head { justify-content: flex-end; }
.wd-sub-td { padding: 0 10px; }
.wd-sub-td:empty { display: none; }
.wd-unread { color: var(--amber); font-weight: 600; cursor: help; }
.wd-inf-none { color: var(--dim); }
.wd-inf { color: var(--red); font-weight: 600; }
.wd-tr.is-infection .wd-c-key { box-shadow: inset 3px 0 0 var(--red); }
/* THE GLANCE (ticket #1159, 19 Nov): pills under each name, and the 24-hour
   strip under them. Every pill carries its words; the colour only repeats
   what they say. */
.wd-strip-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 4px 0 6px; }
.wd-count { color: var(--dim); }
.wd-strip-ctl { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.wd-name { all: unset; cursor: pointer; font-weight: 700; color: var(--ink); min-height: 32px; }
.wd-name:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wd-caret { display: inline-block; width: 1.1em; color: var(--dim); }
.wd-flagged { color: var(--red); font-weight: 600; white-space: nowrap; }
.wd-tr.is-flagged .wd-c-name { box-shadow: inset 3px 0 0 var(--red); }
.wd-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 6px; }
.wd-pill { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--dim); }
.wd-pill.lvl-ok { color: var(--teal); border-color: var(--teal); }
.wd-pill.lvl-warn { color: var(--amber); border-color: var(--amber); }
.wd-pill.lvl-bad { color: var(--red); border-color: var(--red); font-weight: 600; }
.wd-pill.lvl-unread { color: var(--amber); border-style: dashed; cursor: help; }
/* #1184: the symbols are actions; a dash is nothing charted, said not coloured. */
button.wd-pill { font: inherit; background: transparent; cursor: pointer; min-height: 32px; }
button.wd-pill:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wd-pill-w.is-dash { color: var(--dim); }
.wd-menu { margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.wd-menu-h { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.wd-menu-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wd-menu-row .is-on { border-color: var(--teal); }
.wd-menu-why { display: block; width: 100%; max-width: 420px; margin: 4px 0; }
.wd-read { font-size: 11px; color: var(--dim); margin-left: auto; }
.wd-strip { margin: 2px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--sunk); }
.wd-strip.is-flagged { border-left: 3px solid var(--red); }
.wd-strip-why { color: var(--red); font-weight: 600; margin-bottom: 6px; }
.wd-strip-foot { color: var(--dim); }
.wd-strip-svg { display: block; max-width: 1160px; }
.wd-strip-svg .wd-band { fill: var(--panel); }
.wd-strip-svg .wd-grid { stroke: var(--hush); }
.wd-strip-svg .wd-ax, .wd-strip-svg .wd-lab { fill: var(--dim); font-size: 11px; }
.wd-strip-svg .wd-val { fill: var(--ink); font-size: 11px; }
.wd-strip-svg .wd-note { fill: var(--dim); font-size: 12px; }
.wd-strip-svg .wd-note.is-warn, .wd-strip-svg .wd-note.is-unread { fill: var(--amber); }
.wd-strip-svg .wd-temp { fill: none; stroke: var(--ink); stroke-width: 2; }
.wd-strip-svg .wd-hr { fill: none; stroke: var(--dimmer); stroke-width: 1.5; stroke-dasharray: 4 3; }
.wd-strip-svg .wd-pt { fill: var(--teal); }
.wd-strip-svg .wd-pt.is-out { fill: var(--red); }
.wd-strip-svg .wd-pain { fill: var(--amber); }
.wd-strip-svg .wd-pain.is-high { fill: var(--red); }
.wd-strip-svg .wd-bo { fill: var(--teal); }
.wd-strip-svg .wd-linebar { fill: var(--line); }
.wd-strip-svg .wd-linebar.is-bad { fill: var(--red); }
/* ON A PHONE each patient is a card: the same pills, wrapped; the table's
   columns are read on the desktop. */
@media (max-width: 700px) {
  .wd-table, .wd-table tbody, .wd-table tr, .wd-table td { display: block; width: auto; }
  .wd-table thead { display: none; }
  .wd-table .wd-pair { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; padding: 10px; }
  .wd-table tr.wd-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .wd-table .wd-td { border-top: 0; padding: 2px 0; }
  .wd-table .wd-c-name { order: -1; flex: 1 1 100%; }
  .wd-table .wd-c-admitted, .wd-table .wd-c-principal, .wd-table .wd-c-others { display: none; }
  .wd-table .wd-c-acts { flex: 1 1 100%; text-align: left; }
  .wd-table .wd-c-acts .wd-head { justify-content: flex-start; }
  .wd-sub-td { padding: 0; }
  .wd-strip-ctl { margin-left: 0; }
}
.close-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.close-date { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; }
/* 📹 the close's By video (5 Nov): the hold's day, time and length, beside the date's. */
.close-time, .close-len { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; }
.close-video-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* -- the waiting room (commit 9) --------------------------------------- */
.room { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.money { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.mn-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.mn-t { font-weight: 600; }
.mn-n { font-size: 11px; color: var(--dim); }
.mn-latest { font-size: 10px; color: var(--amber); text-transform: uppercase; letter-spacing: .08em; }
.mn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.mn-row:first-of-type { border-top: 0; }
.mn-l { flex: 1 1 auto; }
.mn-a { font-weight: 600; }
.mn-to { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.mn-vr { font-size: 10px; color: var(--amber); }
.mn-rm { font-size: 10px; color: var(--teal); }
.mn-void .mn-l, .mn-void .mn-a { text-decoration: line-through; color: var(--faint); }
.mn-sum { display: flex; gap: 10px; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.mn-sum-k { font-weight: 600; flex: 1 1 auto; }
.mn-sum-v { font-weight: 600; }
.mn-sum-n { font-size: 11px; color: var(--dim); }
.wr-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.wr-t { font-weight: 600; }
.wr-n { font-size: 11px; color: var(--dim); }
.wr-row { padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.wr-row:first-of-type { border-top: 0; }
.wr-head { display: flex; flex-wrap: nowrap; gap: 8px; align-items: baseline; min-width: 0; }
.wr-who { font-weight: 600; flex: none; }
.wr-comm { flex: none; font-size: 13px; }
/* The people around the patient (25 Nov, option D): one person once. */
.pp { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pp-t { font-size: 13px; }
.pp-b { display: flex; flex-direction: column; gap: 6px; }
.pp-check { font-size: 12px; color: var(--amber, #e9b44c); border: 1px solid currentColor; border-radius: 6px; padding: 4px 8px; }
.pp-table { display: flex; flex-direction: column; }
.pp-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--rule); font-size: 12.5px; }
.pp-head { color: var(--dim); font-size: 11px; border-top: 0; }
.pp-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.pp-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-in { min-width: 0; font-size: 12.5px; }
.pp-note { font-size: 11.5px; color: var(--dim); }
@media (max-width: 899px) { .pp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* New case yellow, follow-up green (24 Sept). Dark ink on its own fill, so
   it reads the same on the dark and the day theme. */
.wr-visit { padding: 1px 6px; border-radius: 4px; border: 1.5px solid currentColor; }
.wr-visit-new { color: #e3c454; background: rgba(227,196,84,0.13); }
.wr-visit-followup { color: #6cc38e; background: rgba(108,195,142,0.13); }
.wr-who.wr-overdue { color: #e5776b; background: rgba(229,119,107,0.13); border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 6px; }
.wr-overdue-wait { color: #e5776b; }
.wr-head .wr-why, .wr-head .wr-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wr-head .wr-why { flex: 0 1 auto; }
.wr-head .wr-note { flex: 1 1 0; color: var(--dim); }
.wr-head .wr-lamp, .wr-head .wr-wait { flex: none; }
/* The second line holds the acts; the type picker gives way first so the
   buttons stay on it rather than wrapping into a third. */
.wr-acts > * { flex: none; }
.wr-acts > .wr-type { flex: 1 1 0; min-width: 72px; max-width: 220px; text-overflow: ellipsis; }
.wr-lamp { font-size: 10px; }
.wr-lamp-green { color: var(--teal); }
.wr-lamp-red { color: var(--red); }
/* The journey's third state (11 Nov): amber, sent but not yet gone. */
.wr-lamp-amber { color: var(--amber, #e0a63c); }
.wr-back { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--teal); color: var(--accent-ink, #062); font-weight: 700; }
@keyframes wr-glow { 0% { background: rgba(60, 207, 122, .28); } 100% { background: transparent; } }
.wr-glow { animation: wr-glow 10s ease-out 1; }
.wr-why { font-size: 12px; color: var(--dim); }
.wr-wait { font-size: 11px; color: var(--faint); margin-left: auto; }
.wr-note { font-size: 11.5px; }
.wr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wr-type { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; }

/* -- the walk-in (commit 10) ------------------------------------------- */
.wr-new { margin-top: 10px; }
.wr-new-t { cursor: pointer; font-size: 12px; color: var(--teal-2); }
.wr-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.wr-in { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; min-width: 90px; }

/* -- putting one down (commit 11) -------------------------------------- */
.wr-down { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }

/* -- what is on: the day, the week, the month, the year (commit 12) ----- */
.day { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.dy-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dy-bar .is-on { color: var(--teal); border-color: var(--line); }
.dy-sum { font-size: 11.5px; color: var(--dim); margin: 6px 0 2px; }
.dy-why { font-size: 11px; color: var(--dimmer); margin-bottom: 4px; }
.dy-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dy-day { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 6px; }
.dy-day:first-child { border-top: 0; }
.dy-today .dy-date { color: var(--teal); }
.dy-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.dy-date { font-weight: 600; font-size: 12.5px; }
.dy-away { font-size: 11px; color: var(--amber); }
.dy-call { font-size: 11px; color: var(--teal-2); }
/* THE DESK SHORT-HANDED. Neutral, and deliberately not .dy-away's amber:
   that chip means there is no clinic, this means there is one and the
   counter is thin. A token, like both of its neighbours here, so it follows
   the day/dark toggle -- unlike the week grid's chips, which were literals
   and were invisible in day view until 17 September. */
.dy-deskshort { font-size: 11px; color: var(--dim); }
.dy-count { font-size: 11px; color: var(--faint); margin-left: auto; }
.dy-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline;
  font-size: 12px; padding: 2px 0 2px 4px; }
.dy-at { font-size: 11px; color: var(--dim); min-width: 38px; }
.dy-icon { font-size: 11px; }
.dy-who { font-weight: 600; }
.dy-what { color: var(--dim); }
.dy-note { color: var(--dimmer); font-size: 11px; }
.dy-clip { font-size: 11px; color: var(--dimmer); }
.dy-more, .dy-empty { font-size: 11px; color: var(--dimmer); padding-left: 4px; }
/* A month of counts, and a year of twelve figures. */
.dy-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px; margin-top: 8px; }
.dy-month { display: flex; gap: 6px; align-items: baseline;
  border: 1px solid var(--hush); border-radius: var(--r); padding: 6px 8px; }

/* -- one patient's folder, read (commit 13) ---------------------------- */
.folder { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.fo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.fo-who { font-weight: 600; }
.fo-mrn { font-size: 11px; color: var(--dim); }
.fo-allergy { font-size: 11px; color: var(--amber); }
.fo-allergy.is-known { color: var(--red-ink); }
.fo-test { font-size: 11px; color: var(--amber); }
/* A folder opened from the Review tile: said once, under the bar, in the
   amber the console keeps for "read this before acting". */
.fo-review { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding: 8px 12px;
  border: 1px solid rgba(224,164,74,0.45); border-radius: var(--r); background: rgba(224,164,74,0.08); }
.fo-review-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--amber); flex: 0 0 auto; }
.fo-review-t { font-size: 13px; color: var(--amber-ink); }
.fo-bar .btn { margin-left: auto; }
.fo-h { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dimmer); margin: 10px 0 4px; }
.fo-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.fo-f { display: contents; }
.fo-k { font-size: 11.5px; color: var(--dim); }
.fo-v { font-size: 12px; }
.fo-encs { display: flex; flex-direction: column; gap: 2px; }
.fo-enc { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.fo-enc-r { font-size: 11px; color: var(--dimmer); margin-left: auto; }
.fo-more, .fo-none { font-size: 11px; color: var(--dimmer); }

/* ─── THE DESKTOP FOLDER (24 September) ─── two header lines, six tiles in
   three columns and two rows, and a bar down the right. The page is the
   viewport: the tiles scroll inside themselves, never the page. */
#folder.fo-desk { display: flex; flex-direction: column; gap: 8px; height: calc(100vh - 72px);
  padding: 10px 14px 14px; overflow: hidden; position: relative; }
#folder.fo-desk[hidden] { display: none; }
.fv-h1, .fv-h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.fv-h1 .fo-who { font-size: 20px; font-weight: 600; }
.fv-h1 .fo-mrn { font-size: 13px; color: var(--dim); }
.fv-who { font-size: 14px; color: var(--ink-2); }
.fv-h1 .fo-allergy { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--amber); }
.fv-h1 .fo-allergy.is-known { color: var(--red-ink); }
.fv-review { display: inline-flex; align-items: baseline; gap: 8px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(224,164,74,0.45); background: rgba(224,164,74,0.08); }
.fv-review-t { font-size: 12.5px; color: var(--amber-ink); }
.fv-h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fv-kv { display: inline-flex; align-items: baseline; gap: 6px; }
.fv-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.fv-held { margin: 6px 0 0; color: var(--dim); font-style: italic; }
/* 🧵 DIAGNOSIS TERMS (31 Oct, phase 3 of the access plan): a thread per problem. */
.term-pane, .term-enc { margin: 10px 0; }
.term-box { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.term-box.is-closed { opacity: 0.75; }
.term-h { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.term-name { font-weight: 600; color: var(--ink); }
.term-said, .term-sub { color: var(--dim); }
.term-results { margin: 6px 0; }
.term-result, .term-row { margin: 4px 0; }
.term-thread { margin: 6px 0; }
.term-none { color: var(--dim); font-style: italic; }
.term-file, .term-open, .term-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.term-in { min-width: 12em; }
/* 🔐 REQUESTS AND FORWARDING (31 Oct, phase 4): the folder's Access tab and the Access page. */
.acc-pane, .acc-page { margin: 10px 0; }
.acc-page { padding: 12px 16px; }
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acc-h { font-weight: 600; color: var(--ink); margin: 12px 0 4px; }
.acc-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; border: 1px solid var(--rule);
  border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.acc-what { flex: 1 1 16em; color: var(--ink); }
.acc-state, .acc-note { color: var(--dim); }
.acc-opened { color: var(--dim); font-style: italic; margin: 2px 0 6px; }
.acc-row .ask-line { flex-basis: 100%; }
.fv-v { font-size: 14px; color: var(--ink); }
.fv-prog { font-size: 12px; padding: 3px 10px; border-radius: 999px; color: var(--teal);
  border: 1px solid rgba(79,214,200,0.4); background: rgba(79,214,200,0.08); }
.fv-hbtn { padding: 4px 12px; font-size: 13px; }
/* THE FOLDER'S BODY (25 September): a rail down the LEFT holding everything
   but the encounters, and the encounters as the main panel. Expanded, the
   rail steps aside and the encounters take the whole body. */
.fv-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 10px; }
.fv-body.is-expanded { grid-template-columns: minmax(0, 1fr); }
.fv-body.is-expanded .fv-rail { display: none; }
/* THE FOLDER IN TABS (28 October: "take a cue from here ... the tabs allow
   the patient to be arranged systematically"). The strip across the top, one
   pane under it; the Notes pane carries the rail and the encounters side by
   side, as the body did. */
.fv-body.fv-tabbed { display: flex; flex-direction: column; gap: 8px; }
.fv-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.fv-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--rule);
  border-radius: 8px 8px 0 0; background: var(--panel-2); color: var(--ink-2); font: 13px var(--display); cursor: pointer; }
.fv-tab.is-on { color: var(--ink); border-color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); }
.fv-tab-n { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fv-panes { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fv-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.fv-pane-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; align-items: start; }
.fv-pane-sec { min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.fv-notes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 10px; height: 100%; }
.fv-body.is-expanded .fv-notes { grid-template-columns: minmax(0, 1fr); }
.fv-body.rail-folded .fv-notes { grid-template-columns: 44px minmax(0, 1fr); }
.fv-write { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.fv-write-t { font-size: 12px; color: var(--dim); }
/* THE RAIL SCROLLS AS ONE COLUMN, so a tile inside it is its content's
   height -- the flex:1 / min-height:0 that let a tile share a grid cell
   would squash every one of them to nothing in a column. */
.fv-rail { min-height: 0; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-l); background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.fv-rail-in > .fv-tile { flex: 0 0 auto; min-height: auto; }
.fv-rail-in > .fv-tile > .fv-tile-b { flex: 0 0 auto; overflow: visible; }
/* THE RAIL FOLDS (26 September). Folded, a thin strip with one button. */
.fv-rail-in { display: flex; flex-direction: column; gap: 10px; }
.fv-rail-fold { align-self: flex-end; padding: 3px 10px; font-size: 12px; }
.fv-body.rail-folded { grid-template-columns: 44px minmax(0, 1fr); }
.fv-body.rail-folded .fv-rail { padding: 8px 2px; align-items: center; overflow: hidden; }
.fv-body.rail-folded .fv-rail-in { display: none; }
.fv-body.rail-folded .fv-rail-fold { align-self: center; }
.fv-main { min-height: 0; display: flex; flex-direction: column; }
.fv-main > .fv-tile { flex: 1 1 auto; }
.fv-tile { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line);
  border-radius: var(--r-l); background: var(--panel); }
.fv-tile-h { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.fv-tile-t { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.fv-tile-s { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fv-tile-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.fv-sub { margin-top: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.fv-sub:first-child { margin-top: 0; }
.fv-state-h { margin-top: 8px; }
.fv-state-list + .fv-state-h { border-top: 1px solid var(--rule); padding-top: 6px; }
.fv-none { font-size: 12.5px; color: var(--dimmer); }
/* The folder's Insurance and Log tabs (17 Nov). */
.fv-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fv-icard-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding-bottom: 8px; }
.fv-icard-fact { display: inline-flex; gap: 8px; align-items: baseline; }
.fv-icard-fact .fv-k { color: var(--dimmer); font-size: 12px; }
.fv-icard-row { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.fv-icard { display: block; flex: 0 0 auto; margin: 0; width: 260px; scroll-snap-align: start; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--sunk); overflow: hidden; }
.fv-icard.is-big { width: 560px; }
.fv-icard.is-gone { opacity: 0.6; }
.fv-icard-b { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; min-height: 120px; }
.fv-icard.is-big .fv-icard-b { cursor: zoom-out; }
.fv-icard-img { display: block; width: 100%; height: auto; }
.fv-icard-x { padding: 44px 12px; text-align: center; color: var(--dim); font-size: 12.5px; }
.fv-icard-cap { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 12.5px; }
.fv-icard-w { color: var(--dimmer); font-size: 12px; }
.fv-st { width: 100%; border-collapse: collapse; font-size: 13px; }
.fv-st-h { text-align: left; padding: 0; border-bottom: 1px solid var(--line); }
.fv-st-hb { display: inline-flex; gap: 6px; align-items: center; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; background: transparent; color: var(--dim); font: inherit; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; text-align: left; }
.fv-st-hb:hover, .fv-st-hb:focus-visible { color: var(--ink); }
.fv-st-h[aria-sort="ascending"] .fv-st-hb, .fv-st-h[aria-sort="descending"] .fv-st-hb { color: var(--teal); }
.fv-st-arrow { font-size: 10px; min-width: 10px; }
.fv-st-c { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fv-st-date, .fv-st-last, .fv-st-receipt, .fv-st-amount, .fv-st-total, .fv-st-count { font-family: var(--mono); white-space: nowrap; }
.fv-st-amount, .fv-st-total, .fv-st-count { text-align: right; }
.fv-st-name, .fv-st-what { font-weight: 600; }
.fv-st-open { padding: 0; border: 0; background: transparent; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; }
.fv-st-more { margin-top: 10px; flex: 0 0 auto; width: auto; align-self: flex-start; }
.fv-st-more + .fv-pane-sec:empty { display: none; }
.fv-tile-b > .fv-looked-month { width: auto; margin-bottom: 8px; }
.fv-icard-b { display: block; }
.fv-log-row.is-open .fv-st-state { color: var(--amber); }
/* 🧪 THE LABORATORY TAB AS ONE TABLE (18 Nov, #1149). The flag says its word
   beside its arrow; colour is never the only cue. */
.lt-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.lt-chips, .lt-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lt-chip, .lt-gb { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.lt-chip[aria-pressed="true"], .lt-gb[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); }
.lt-group-k { color: var(--dimmer); }
.lt-flag-high, .lt-flag-low { color: var(--amber); font-weight: 600; }
.lt-flag-critical { color: var(--red); font-weight: 700; }
.lt-flag-unjudged, .lt-flag-held { color: var(--dimmer); }
.lt-uncertain { color: var(--amber); font-style: italic; }
.lt-ver { display: inline-flex; gap: 6px; align-items: center; }
.lt-ver-not .lt-ver-w { color: var(--amber); }
.lt-row-critical .lt-ver-not .lt-ver-w { color: var(--red); }
.lt-spark { color: var(--teal); vertical-align: middle; }
.lt-row.is-held .fv-st-c, .lt-pend-row.is-held .fv-st-c { color: var(--dimmer); font-style: italic; }
.lt-act { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.lt-verify { width: auto; flex: 0 0 auto; }
.lt-note { color: var(--dim); }
.lt-line:empty { display: none; }
.lt-line { flex-basis: 100%; }
/* 🧪 EVERY INVESTIGATION AS ONE TABLE (21 Nov, #1207). A critical row is
   shaded AND says "Critical"; colour is never the only cue. */
.iv .fv-tile-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.iv-order-k { margin-left: auto; color: var(--dimmer); }
.iv-order, .iv-range, .iv-centre { width: auto; min-height: 32px; }
.iv-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.iv-search { flex: 1 1 260px; min-height: 32px; }
.iv-chips, .iv-types { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.iv-type { min-height: 32px; padding: 4px 12px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.iv-type[aria-pressed="true"] { border-style: solid; border-color: var(--teal); color: var(--teal); }
.iv-count { color: var(--dimmer); margin-bottom: 6px; }
.iv-row-critical .fv-st-c { background: rgba(181, 43, 38, 0.16); }
.iv-st-critical { color: var(--red); font-weight: 700; }
.iv-st-abnormal { color: var(--amber); font-weight: 600; }
.iv-st-pending { color: var(--amber); }
.iv-st-held, .iv-st-withdrawn, .iv-st-cancelled, .iv-st-unjudged { color: var(--dimmer); }
.iv-row.is-held .fv-st-c { color: var(--dimmer); font-style: italic; }
.iv-row-critical .lt-ver-not .lt-ver-w { color: var(--red); }
.iv-hist { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 12px; margin-top: 8px; }
.iv-hist-r { display: contents; }
.iv-hist-t { font-weight: 600; margin-bottom: 6px; }
/* #1221 (board Inv2): Status is a PILL that keeps its words; the
   investigation's name is plain bold text (the row opens on a tap); every
   heading carries a sort glyph -- ⇅ until it orders, then ▼ or ▲. */
.iv-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.iv-pill.iv-st-critical { background: rgba(181, 43, 38, 0.22); }
.iv-pill.iv-st-abnormal { background: rgba(214, 160, 60, 0.18); }
.iv-pill.iv-st-pending { background: rgba(214, 160, 60, 0.12); }
.iv-pill.iv-st-normal, .iv-pill.iv-st-report, .iv-pill.iv-st-back { color: var(--teal); background: rgba(79, 214, 200, 0.12); }
.iv-name { font-weight: 700; color: var(--ink); text-decoration: none; }
button.iv-name { background: none; border: 0; padding: 0; min-height: 0; width: auto; font: inherit; font-weight: 700; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none; }
.iv-row-opens { cursor: pointer; }
.iv-namebox { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.iv-older { font-size: 12px; color: var(--amber); border: 1px dashed currentColor; border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.iv-t .fv-st-arrow:empty::before { content: "\21C5"; color: var(--faint); }
.iv-t .fv-st-arrow { margin-left: 4px; }
.iv-t th[data-col="pick"] .fv-st-arrow::before { content: none; }
/* 👤 THE DETAILS TAB AS ONE TABLE (18 Nov, #1150). A blank field is shown
   blank; a held one says so. */
.dt-row.is-blank .fv-st-value::after { content: "\2014"; color: var(--faint); }
.dt-held, .dt-how { color: var(--dimmer); }
.dt-edit { width: auto; }
.dt-team-b { width: auto; margin-top: 10px; align-self: flex-start; }
/* THIN BULLETS (25 Nov): the Details actions as one hairline-dot list. */
.dt-bullets-rule { border-top: 1px solid var(--line); margin-top: 10px; }
.dt-bullet { display: flex; align-items: center; gap: 8px; width: auto; align-self: flex-start; min-height: 28px; margin: 0; padding: 0 2px; border: 0; background: none; color: var(--teal); font: inherit; font-size: 13px; font-weight: 400; text-align: left; cursor: pointer; }
.dt-bullet::before { content: ""; width: 5px; height: 5px; border-radius: 99px; border: 1px solid currentColor; flex: 0 0 auto; }
.dt-bullet[aria-expanded="true"]::before { background: currentColor; }
.dt-bullet[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dt-bullet:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.dt-team-b.dt-bullet { margin-top: 6px; }
@media (pointer: coarse) { .dt-bullet { min-height: var(--tap); } }
/* THE DATED eGFR ON THE IMAGING ORDER CARD (25 Nov 2026). */
.or-egfr { margin: 0 0 8px; font-size: 13px; color: var(--ink); }
.or-egfr.is-none { color: var(--dim); }
.or-egfr.is-stale { color: var(--amber-ink); }
/* A FOLDER ROW DRAGS ONTO THE WRITING BOARD (25 Nov 2026). */
tr.is-draggable { cursor: grab; }
tr.is-draggable.is-dragging { opacity: 0.5; cursor: grabbing; }
.dt-fix:empty, .dt-team:empty { display: none; }
.fv-cover-row .fv-st-member, .fv-case-row .fv-st-member { font-family: var(--mono); white-space: nowrap; }
/* ✉ 🗂 CORRESPONDENCE AND CABINET AS TABLES, AND THE LOG (18 Nov, #1151). */
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pt-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.pt-chip[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); }
.pt-row.is-gone .fv-st-c { text-decoration: line-through; color: var(--dimmer); }
.pt-row.is-gone .fv-st-status { text-decoration: none; }
.pt-row.is-held .fv-st-c { color: var(--dimmer); font-style: italic; }
/* 🗂 THE CABINET AS ONE TABLE OF WHAT WAS RECEIVED (19 Nov, #1164, ftabcabinet.ts). */
/* THE FILTERS AS A NARROW COLUMN (21 Nov, #1223): kinds, then "Show" and
   its three filters, one compact line each in a ~170px column; the summary
   and search on top of the documents, which take the rest of the width.
   .cbt-box is the container: under 900px of folder the column folds into
   one "Filter ▾" button (.cbt-fold), opened as .cbt-wrap.is-open. */
.cbt-box { container-type: inline-size; position: relative; min-width: 0; }
.cbt-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.cbt-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cbt-main { min-width: 0; }
.cbt-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 2px; }
.cbt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.cbt-counts { color: var(--dim); }
.cbt-chips, .cbt-bar { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 4px; }
.cbt-chip, .cbt-filter { position: relative; display: flex; align-items: center; gap: 6px; width: 100%;
  min-height: 40px; padding: 2px 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--dim); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; }
.cbt-chip::before, .cbt-filter::before, .cbt-fold::before { content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 44px; }
.cbt-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbt-n { margin-left: auto; white-space: pre; font-variant-numeric: tabular-nums; color: var(--dimmer); }
.cbt-chip[aria-pressed="true"], .cbt-filter[aria-pressed="true"] { background: var(--sunk); outline: 1px solid var(--teal); color: var(--teal); }
.cbt-chip[aria-pressed="true"] .cbt-n, .cbt-filter[aria-pressed="true"] .cbt-n { color: var(--teal); }
.cbt-show { margin-top: 6px; }
.cbt-search { flex: 1; min-width: 180px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; }
.cbt-fold { display: none; position: relative; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
@container (max-width: 900px) {
  .cbt-wrap { grid-template-columns: minmax(0, 1fr); }
  .cbt-fold { display: inline-flex; align-items: center; }
  .cbt-side { display: none; }
  .cbt-wrap.is-open .cbt-side { display: flex; position: absolute; top: 42px; left: 0; z-index: 5; width: 220px;
    padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}
}
.cbt-photonote { color: var(--dim); margin-bottom: 6px; }
.cbt-what, .cbt-from, .cbt-proc { display: flex; flex-direction: column; gap: 2px; }
.cbt-type { font-weight: 600; }
.cbt-from-s, .cbt-proc-s, .cbt-none { color: var(--dim); }
.cbt-proc-b { padding: 0; border: 0; background: transparent; color: var(--teal); font: inherit; cursor: pointer; text-align: left; min-height: 28px; }
.cbt-proc.is-none .cbt-proc-w { color: var(--amber); }
.cbt-ver.is-unverified { color: var(--amber); }
.cbt-row.is-gone .fv-st-c { text-decoration: line-through; color: var(--dimmer); }
.cbt-row.is-held .fv-st-c { color: var(--dimmer); font-style: italic; }
.pt-gp-referral .fv-st-status { color: var(--amber); }
.pt-open-b { width: auto; }
.pt-said:empty { display: none; }
.pt-said { display: block; color: var(--red); }
.pt-held, .pt-none, .pt-gone { color: var(--dimmer); }
.fv-looked-row.is-emergency .fv-st-c { color: var(--red); font-weight: 600; }
/* ✍ THE CONSENT BOARD (27 Nov 2026, consentboard.ts): a left column of
   sections, one card; every explanatory sentence behind the card's ⓘ. */
.ksb { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ksb-col { flex: 0 0 220px; width: 220px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.ksb-g { margin: 8px 6px 2px; color: var(--teal); letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600; }
.ksb-item { display: grid; grid-template-columns: 1.4rem 1fr; text-align: left; gap: 0 4px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.ksb-item.is-on { background: var(--sunk); }
.ksb-item .ksb-n { grid-column: 2; color: var(--dim); font-size: 0.75rem; }
.ksb-card { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.ksb-head { display: flex; align-items: center; gap: 10px; }
.ksb-title { color: var(--teal); letter-spacing: 0.1em; font-weight: 600; }
.ksb-sub { margin-left: auto; color: var(--dim); font-size: 0.8rem; }
.ksb-info { flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border: 1px solid var(--teal); border-radius: 50%; background: transparent; color: var(--teal); cursor: pointer; }
.ksb-info[aria-expanded="true"] { background: var(--teal); color: var(--bg); }
.ksb-note { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--teal); border-radius: 10px; color: var(--dim); font-size: 0.8rem; }
.ksb-table { width: 100%; border-collapse: collapse; }
.ksb-table th { text-align: left; color: var(--dim); font-size: 0.72rem; letter-spacing: 0.08em; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ksb-table td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ksb-state.ksb-in_force { color: var(--teal); }
.ksb-state.ksb-waiting { color: var(--amber); }
.ksb-state.ksb-withdrawn { color: var(--dim); }
.ksb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ksb-chip { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.ksb-chip.is-on { border-color: var(--teal); background: var(--sunk); }
.ksb-send { margin-left: auto; }
.ksb-warn { color: var(--amber); }
.ksb-dim, .ksb-none { color: var(--dim); }
.cns-preview { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.cns-pv-k { color: var(--dim); font-size: 0.75rem; letter-spacing: 0.08em; }
.cns-pv-t { font-weight: 600; }
.cns-pv-by { color: var(--dim); font-size: 0.8rem; }
.cns-pv-h { font-weight: 600; }
.cns-pv-x { white-space: pre-wrap; }
/* 🐝 THE FOLDER'S CAREBEE TAB (21 Nov, #1224, ftabcarebee.ts): a slim
   retractable column of sections, the chosen one as a table beside it. */
.cb-tab { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.cb-col { flex: 0 0 190px; width: 190px; display: flex; flex-direction: column; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cb-conn { display: flex; align-items: center; gap: 6px; padding: 6px 4px 6px 10px; font-size: 12px; color: var(--dim); }
.cb-conn.is-on { color: var(--teal); }
.cb-conn.is-unread { color: var(--amber); }
.cb-conn-w { flex: 1; min-width: 0; }
.cb-fold { position: relative; min-width: 28px; min-height: 28px; border: 0; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.cb-fold::before { content: ''; position: absolute; inset: -8px; }
.cb-k { padding: 8px 10px 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.cb-sec { position: relative; display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.cb-sec[aria-pressed="true"] { background: var(--sunk); outline: 1px solid var(--teal); }
.cb-sec-l { flex: 1; min-width: 0; }
.cb-sec-n { margin-left: auto; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cb-sec-n.is-unread { color: var(--amber); font-weight: 600; }
.cb-tab.is-folded .cb-col { flex-basis: 44px; width: 44px; padding: 4px 0; align-items: center; }
.cb-tab.is-folded .cb-conn-w, .cb-tab.is-folded .cb-k, .cb-tab.is-folded .cb-sec-l { display: none; }
.cb-tab.is-folded .cb-conn { padding: 4px 0; }
.cb-tab.is-folded .cb-sec { flex-direction: column; gap: 0; width: 44px; min-height: var(--tap); padding: 2px 0; justify-content: center; }
.cb-tab.is-folded .cb-sec-n { margin-left: 0; font-size: 10px; }
.cb-main { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; }
.cb-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cb-title { flex: 1; min-width: 0; font-size: 13px; }
.cb-search { width: 320px; max-width: 45%; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; }
.cb-body { padding: 6px 12px; }
.cb-foot { margin: 0; padding: 8px 12px; font-size: 11px; color: var(--dim); }
.cb-unread { color: var(--amber); padding: 8px 0; }
.cb-said, .cb-note { color: var(--dim); padding: 8px 0; }
.cb-note.is-partial { color: var(--amber); }
.cb-what-b { font-weight: 600; }
.cb-said-p { color: var(--dim); }
.cb-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; color: var(--dim); }
.cb-pill.is-wait { border-color: var(--amber); color: var(--amber); }
.cb-pill.is-ok { border-color: var(--teal); color: var(--teal); }
.cb-act { position: relative; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.cb-act::before { content: ''; position: absolute; inset: -8px -4px; }
.cb-act:disabled { color: var(--dimmer); cursor: default; }
/* THE FOLDER'S MEDICATION, MC AND NURSING TABLES (#1147, #1148, 18 Nov). */
.fv-tab-table { display: flex; flex-direction: column; gap: 6px; }
.fv-st-sec { margin-top: 10px; color: var(--dim); }
.fv-st-sec-t { color: var(--ink); font-weight: 600; }
.fv-st-foot { color: var(--dim); margin-top: 6px; }
.fv-medrow.is-expired .fv-st-c, .fv-medrow.is-stopped .fv-st-c { color: var(--dim); }
.fv-medrow.is-stopped .fv-st-medicine { text-decoration: line-through; }
.fv-mcrow.is-withdrawn .fv-st-c { color: var(--dim); text-decoration: line-through; }
.fv-st-who, .fv-st-doctor, .fv-st-nurse { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-st-medicine { font-weight: 600; }
.fv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fv-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.fv-chip.is-on { border-color: var(--teal); color: var(--teal); }
.fv-nurserow.is-gone .fv-st-entry { text-decoration: line-through; color: var(--dim); }
.fv-nurserow.is-flagged .fv-st-flag { color: var(--amber); font-weight: 600; }
@media (max-width: 899px) {
  .fv-st thead { display: none; }
  .fv-st, .fv-st tbody, .fv-st-r, .fv-st-c { display: block; }
  .fv-st-r { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
  .fv-st-c { border: 0; padding: 2px 0; text-align: left; }
  .fv-st-c::before { content: attr(data-label) ": "; color: var(--dimmer); font-size: 12px; }
}
.fv-enc { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.fv-enc:last-child { border-bottom: 0; }
.fv-enc-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; width: 100%;
  padding: 0; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fv-enc-top:hover .fv-enc-what { color: var(--teal-2); }
.fv-enc-when { font-size: 12px; color: var(--dim); }
.fv-enc-what { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fv-enc-by { font-size: 12px; color: var(--dim); margin-left: auto; }
/* THE SPECIALTY IN THE MIDDLE OF THE ROW (27 September), the doctor at its
   end: it takes the room between the date and the name and centres in it. */
.fv-enc-spec { flex: 1 1 auto; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--teal-2); }
.fv-enc-spec:empty { flex: 1 1 auto; }
/* THE ENCOUNTERS AS A TABLE (17 Nov): one header, a row an encounter, the
   same column template on both so every cell sits under its heading. The
   state is a symbol per state, each its own shape and colour. */
.fv-enc-state { text-align: center; font-weight: 700; }
.fv-enc-state.is-open { color: var(--bee-connected); cursor: help; }
.fv-enc.is-now { border-left: 3px solid var(--teal); }
.fv-enc-now { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 2px 12px 8px 44px; min-height: 0; color: var(--teal); font: inherit; font-size: 12px; cursor: pointer; }
.fv-enc-tech { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.fv-enc-tech-say { color: var(--dim); font-size: 12px; }
.fv-enc-state.is-pended { color: var(--amber); cursor: help; }
.fv-enc-state.is-closed { color: var(--dim); cursor: help; }
:root[data-theme="day"] .fv-enc-state.is-open { color: #17803d; }
.fv-enc-where, .fv-enc-dxc, .fv-enc-syn { font-size: 13px; color: var(--ink-2); }
.fv-enc-dxc { color: var(--ink); }
@media (min-width: 900px) {
  .fv-enc-head, .fv-enc-table .fv-enc-top { display: grid; align-items: start; gap: 4px 12px;
    grid-template-columns: 20px minmax(132px, 1.1fr) 104px minmax(120px, 1.6fr) minmax(120px, 1.8fr) minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1fr); }
  .fv-enc-head { padding: 0 0 6px; border-bottom: 1px solid var(--line); }
  .fv-enc-table .fv-enc-top > * { min-width: 0; overflow-wrap: anywhere; text-align: left; margin: 0; flex: none; }
  .fv-enc-table .fv-enc-state { text-align: center; }
  .fv-enc-table .fv-enc-when { white-space: nowrap; }
}
@media (max-width: 899px) {
  .fv-enc-head { display: flex; gap: 8px; padding-bottom: 6px; }
  .fv-enc-head > span { display: none; }
  .fv-enc-table .fv-enc-top > :empty { display: none; }
}
.fv-enc-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); text-align: left; }
button.fv-enc-sort { position: relative; border: 0; background: transparent; padding: 0; cursor: pointer; }
button.fv-enc-sort::before { content: ''; position: absolute; inset: -12px -6px; }
button.fv-enc-sort:hover, button.fv-enc-sort.is-on { color: var(--teal-2); }
/* NEHR'S SHELVES ON THE FOLDER'S RAIL (27 September): a row of tabs over
   rows the door already sent. */
.fv-shelf { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.fv-shelf-b { padding: 4px 9px; font-size: 11.5px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); cursor: pointer; font-family: inherit; }
.fv-shelf-b.is-on { border-color: var(--teal-2); color: var(--teal-2); font-weight: 600; }
/* The appointments sheet's past visits: date, what, specialty, doctor. */
.fv-appt-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 5px 0;
  border-bottom: 1px solid var(--line-soft); }
.fv-appt-when { font-size: 12px; color: var(--dim); }
.fv-appt-what { font-size: 13px; color: var(--ink); font-weight: 600; }
.fv-appt-spec { flex: 1 1 auto; text-align: center; font-size: 12.5px; color: var(--teal-2); }
.fv-appt-by { font-size: 12px; color: var(--dim); margin-left: auto; }
/* THE CARD, ASKED FIRST IN THE PATIENT'S PROGRAMMES (27 September). */
.smf { margin: 4px 0 10px; }
.smf-q { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.smf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.smf-chip { padding: 6px 12px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; font-family: inherit; }
.smf-chip.is-on { border-color: var(--teal-2); color: var(--teal-2); font-weight: 600; }
.smf-chip.is-ask { border-color: var(--amber); }
.smf-say { margin-top: 6px; font-size: 12px; color: var(--dim); }
/* A NEW ENCOUNTER FROM THE FOLDER: the room's own types, or the admin one. */
.fv-ne-note { font-size: 13px; color: var(--dim); margin-bottom: 10px; }
.fv-ne-types { display: flex; flex-wrap: wrap; gap: 8px; }
.fv-ne-b { padding: 8px 14px; font-size: 13px; }
.fv-ne-say { margin-top: 10px; font-size: 12.5px; color: var(--ink); }
/* ONE LINE UNDER EACH ENCOUNTER, THE DIAGNOSIS. Hidden while the row is
   open, because the whole note below it says it already. */
.fv-enc-dx { margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-enc.is-open .fv-enc-dx { display: none; }
/* Expand and Copy, in the panel's own header. */
.fv-enc-ctl { margin-left: 6px; padding: 3px 10px; font-size: 12px; }
/* Right-aligned by the count when there is one (it carries margin-left:auto);
   with no count the first control takes that job -- two auto margins would
   split the space and float the count into the middle. */
.fv-tile-h > .fv-tile-t + .fv-enc-ctl, .fv-tile-h > .fv-tile-t + .fv-ver { margin-left: auto; }
/* THE THREE VERSIONS (26 September): one switch on the panel's head. */
.fv-ver { display: inline-flex; margin-left: 10px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.fv-ver-b { padding: 3px 12px; border: 0; background: transparent; font: inherit; font-size: 12px; color: var(--dim); cursor: pointer; }
.fv-ver-b + .fv-ver-b { border-left: 1px solid var(--line); }
.fv-ver-b.is-on { background: var(--teal); color: var(--bg); font-weight: 600; }
.fv-enc-sum { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.fv-sum-pt { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.4; }
.fv-sum-k { color: var(--label); font-weight: 600; }
.fv-sum-v { color: var(--ink); }
.fv-sum-from { margin-top: 2px; font-size: 11.5px; color: var(--dimmer); font-style: italic; }
.fv-enc-summary.is-open .fv-enc-sum { display: none; }
/* THE COMPLETE VERSION, laid out: the heading underlined, a subheading
   sharp, a point "Label — text" with its label bold. */
.fv-cn-h { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: underline;
  text-underline-offset: 3px; text-transform: none; letter-spacing: 0; }
.fv-cn-h:first-child { margin-top: 0; }
.fv-cn-body { margin-top: 3px; display: flex; flex-direction: column; gap: 2px; }
.fv-cn-sub { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--teal-2); }
.fv-cn-pt { padding-left: 12px; font-size: 13px; line-height: 1.45; color: var(--ink); text-indent: -10px; }
.fv-cn-pt::before { content: '•'; margin-right: 6px; color: var(--dim); }
.fv-cn-k { font-weight: 600; }
.fv-cn-p { font-size: 13px; line-height: 1.45; color: var(--ink); }
/* THE SUMMARY FOLDER, in the rail. */
.fv-sum-said { padding: 4px 12px 0; font-size: 12px; color: var(--dim); }
.fv-sum-said:empty { display: none; }
.fv-sum { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.fv-sum:last-child { border-bottom: 0; }
.fv-sum-h { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.fv-sum-on { font-size: 12px; color: var(--ink); font-weight: 600; }
.fv-sum-n { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.fv-sum-l { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.fv-enc-detail { margin-top: 6px; padding: 8px 10px; border-left: 2px solid var(--teal); background: var(--panel-2); border-radius: 6px; }
.fv-sec-h { margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--label); }
.fv-sec-h:first-child { margin-top: 0; }
.fv-sec-t { font-size: 13px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; }
.fv-pdf { margin-top: 8px; }
.fv-pdf-said { margin-left: 8px; font-size: 12px; color: var(--dim); }
.fv-sheet { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px; background: rgba(0,0,0,0.45); }
.fv-sheet-card { width: min(640px, 92%); max-height: 75%; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg); box-shadow: var(--z2); }
.fv-sheet-top { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.fv-sheet-t { font-size: 15px; font-weight: 600; }
.fv-sheet-top .btn { margin-left: auto; }
.fv-sheet-body { overflow-y: auto; padding: 12px 14px; }
[data-theme="day"] .fv-sheet { background: rgba(20,50,47,0.25); }

/* The patient's shared photo on the record's header (12 Nov). */
.pp-photo { display: flex; gap: 10px; align-items: flex-start; }
.pp-photo[hidden] { display: none; }
.pp-img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); }
.pp-side { display: flex; flex-direction: column; gap: 4px; max-width: 560px; align-items: flex-start; }
.pp-frame { position: relative; flex: 0 0 auto; }
.pp-compact { position: relative; gap: 0; }
.pp-compact .pp-img { width: 40px; height: 40px; border-radius: 50%; }
.pp-compact .pp-remove { width: 16px; height: 16px; font-size: 11px; line-height: 13px; top: -4px; right: -4px; }
.pp-compact .pp-side { position: absolute; top: 100%; left: 0; z-index: 6; width: 360px; max-width: none; }
.pp-compact .pp-ask { box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.fv-head { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 12px 20px;
  align-items: start; padding-right: 44px; }
/* ONE ROW (17 Nov): the number and its plus, the tabs, three menus, Close. */
.fv-bar { display: flex; align-items: center; gap: 6px; padding-right: 44px; border-bottom: 1px solid var(--line); padding-bottom: 6px; min-height: 44px; }
/* THE TABS WRAP (17 Nov: "folder tabs - wrap it"): a second line, never a
   sideways scroll. */
.fv-bar .fv-tabs { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; row-gap: 4px; border-bottom: 0; padding-bottom: 0; }
/* The insurance card's three ways in, and what CareBee holds. */
.fv-icard-ways { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.fv-icard-waysrow { display: flex; flex-wrap: wrap; gap: 6px; }
.fv-icard-bee { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--rule); border-radius: 8px; padding: 8px; }
.fv-icard-beerow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fv-icard-beewhat { flex: 1 1 180px; min-width: 0; }
.fv-icard-reply { max-width: 260px; }
.fv-icard-pdf { display: block; padding: 18px 12px; color: var(--dim); }
.fv-head-ins { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.fv-bar .fv-tabs > * { flex: 0 0 auto; white-space: nowrap; }
.fv-bar .fv-tab { padding: 6px 5px; gap: 3px; font-size: 0.86em; }
.fv-bar .fv-tabs { gap: 2px; }
.fv-bar .fv-bar-allergy { font-size: 0.72em; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1799px) { .fv-bar .fv-tab-i { display: none; } }
/* with the number up on the top bar the row has room for the icons again */
@media (min-width: 1400px) { .fv-bar.on-topbar .fv-tab-i { display: inline; } }
.fv-idpill { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; border: 1px solid var(--teal); border-radius: 999px;
  padding: 2px 4px 2px 12px; background: var(--sunk); color: var(--ink); }
.fv-idpill-n { font-weight: 600; font-size: 0.88em; cursor: grab; }
.fv-idplus { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule); background: transparent;
  color: var(--teal); line-height: 22px; padding: 0; cursor: pointer; }
.fv-idplus::before { content: ''; position: absolute; inset: -9px; }
.fv-barmarks { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.fv-barmarks:empty, .fv-bar-allergy:empty { display: none; }
/* The top bar carries the number, its plus and the allergy for the patient
   in the chair; this row keeps them only for anybody else (17 Nov). */
.fv-bar.on-topbar > .fv-idpill, .fv-bar.on-topbar > .fv-barmarks { display: none; }
.fv-enc-hpair { display: inline-flex; align-items: center; gap: 6px; }
.fv-enc-time { border: 1px solid var(--rule); border-radius: 999px; background: none; color: inherit; padding: 0 6px; font-size: 0.85em; cursor: pointer; }
.fv-enc-time.is-on { border-color: var(--teal); color: var(--teal); }
/* 20 Nov: the folder row's number is the folder VIEWED, not the chair's. */
.fv-viewing { margin-left: 6px; padding: 1px 7px; border: 1px dashed var(--amber); border-radius: 999px;
  color: var(--amber); font-size: 0.85em; letter-spacing: .04em; white-space: nowrap; }
/* THE FOLDER'S ONE LINE UNDER ITS TABS (28 Nov 2026, his option B): this
   folder's own identity only while the top bar names somebody else (the
   [hidden] attribute decides that, syncChair), "Born ..." and the facts on the
   left; on Details the board's controls; Family and the appointment at the
   right, then the board's ?. One row; it wraps rather than clips. */
.fv-fline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); min-height: 40px; }
.fv-fline > .spacer { flex: 1 1 0; }
.fv-fline-l, .fv-own, .fv-facts, .fv-fline-c, .fv-fline-r, .fv-famchip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fv-fline-c { gap: 8px; flex: 0 0 auto; flex-wrap: nowrap; }
.fv-fline-r { flex: 0 0 auto; flex-wrap: nowrap; }
.fv-fline-c .dt-search-top { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; width: auto; }
.fv-fline-c .dt-find { width: 14rem; max-width: 100%; min-height: 28px; }
.fv-fline-c .btn, .fv-fline-r .btn { white-space: nowrap; }
.fv-own[hidden], .fv-fline-c[hidden], .fv-fline-help[hidden], .fv-born[hidden] { display: none; }
.fv-facts:empty, .fv-fline-c:empty, .fv-fline-help:empty { display: none; }
.fv-fline .fv-bar-allergy { font-size: 0.72em; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-fline .fv-bar-allergy:empty { display: none; }
.fv-born { color: var(--dim); white-space: nowrap; }
.fv-famchip { gap: 0; border: 1px solid var(--rule); border-radius: 6px; }
.fv-famchip > .btn { border: 0; min-height: 28px; }
.fv-famchip > .fv-fam-add { border-left: 1px solid var(--rule); border-radius: 0 6px 6px 0; color: var(--teal); }
.fv-fline .pp-compact .pp-img { width: 28px; height: 28px; }
.dt.dt-headless > .fv-tile-b { padding-top: 0; }
.pill-plus { position: relative; flex: 0 0 auto; width: 26px; height: 26px; margin-left: -4px; border-radius: 50%; border: 1px solid var(--teal);
  background: transparent; color: var(--teal); line-height: 22px; padding: 0; cursor: pointer; }
.pill-plus::before { content: ''; position: absolute; inset: -9px; }
.pill-plus[hidden] { display: none; }

.fv-bar .fv-right { flex: 0 0 auto; flex-direction: row; gap: 4px; }
.fv-sec { position: relative; }
.fv-bar .fv-sec-k { min-height: 34px; padding: 6px 6px; letter-spacing: .04em; margin: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel-2);
  color: var(--ink-2); cursor: pointer; }
.fv-bar .fv-sec-k::after { content: ' \25BE'; }
.fv-bar .fv-sec-k.is-on { color: var(--ink); border-color: var(--teal); }
.fv-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; min-width: 220px; padding: 8px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.fv-menu .fv-grp { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.fv-menu .fv-grp > * { justify-content: flex-start; text-align: left; white-space: nowrap; }
.fv-left { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; min-width: 0; grid-column: 1 / -1; }
.fv-left > * { flex: 0 1 420px; min-width: 280px; }
/* The patient and family cards, on top of the Details tab (#1161). */
.fv-dcards { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fv-dcard { flex: 1 1 360px; min-width: 280px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; background: var(--sunk); }
.fv-dcard-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.fv-dcard-k { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-right: auto; }
.fv-dcard-fam .ft-h { display: none; }
.fv-dcard-pt > .fv-icard { width: auto; border: 0; background: transparent; overflow: visible; }
.fv-fam-how { color: var(--dim); margin-bottom: 8px; }
/* The tabs moved by hand (#1162). */
.fv-tab-grip { color: var(--dim); cursor: grab; }
.fv-tab.is-drop { box-shadow: inset 2px 0 0 var(--teal); }
.fv-tab.is-dragging { opacity: 0.5; }
.fv-tabtail { display: inline-flex; align-items: center; gap: 6px; }
.fv-tabhint { color: var(--dim); }
.fv-tab-says { color: var(--dim); margin: 0 0 8px; }
.fv-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--rule); border-radius: 12px;
  padding: 12px 14px; background: var(--sunk); }
.fv-card-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fv-card .fv-h1, .fv-card .fv-h2 { flex-direction: column; align-items: flex-start; gap: 4px; }
.fv-card .fv-h1 .fo-who { font-size: 20px; }
.fv-card .fv-kv, .fv-card .fv-prog { font-size: 13px; }
.fv-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fv-headgrip { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 14px; margin: 2px 0 4px;
  cursor: ns-resize; touch-action: none; user-select: none; border-radius: 6px; color: var(--dim); font-size: 13px; }
.fv-headgrip:hover, .fv-headgrip:focus-visible { background: rgba(79,214,200,0.08); }
.fv-headgrip-bar { width: 56px; height: 4px; border-radius: 3px; background: var(--rule); }
.fv-headgrip:hover .fv-headgrip-bar { background: var(--teal); }
.fv-headgrip.is-folded { justify-content: flex-start; min-height: 32px; padding: 0 12px; border: 1px solid var(--rule); cursor: s-resize; }
/* the rail's diagnoses, dragged into his order (17 Nov) */
.fv-dxrow[draggable="true"] { cursor: grab; border-radius: 6px; }
.fv-dxrow.is-dragging { opacity: .4; }
.fv-dxrow.is-drop { box-shadow: 0 -3px 0 var(--teal); }
.fv-dxrow:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fv-dxreset { align-self: flex-start; margin-top: 4px; min-height: 30px; padding: 2px 10px; }
.fv-dragitem { cursor: grab; }
.fv-dragitem.is-dragging { opacity: .4; }
.fv-dragitem.is-drop { box-shadow: -3px 0 0 var(--teal); }
.fv-dragitem.is-swap { outline: 2px dashed var(--amber); outline-offset: 2px; }
.fv-grp.is-drop, .fv-tabs.is-drop { outline: 1px dashed var(--teal); outline-offset: 3px; }
.fv-tabs > .fv-hbtn { min-height: 34px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 8px 8px 0 0; }
.fv-grp > .fv-tab { border-radius: 8px; }
.fv-sec-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.fv-right .fv-grp { border: 0; gap: 6px; overflow: visible; }
.fv-right .fv-grp > .btn, .fv-right .fv-grp > button { border: 1px solid var(--rule); border-radius: 8px; }
.fv-access { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* A tag, not a control: no border, the hover-help cursor the bee uses
   (verify_console_controls: a bordered, filled chip with a title reads as a
   button and this one does nothing when pressed). */
.fv-acc { font-size: 12px; padding: 2px 8px; border: none; border-radius: 999px; color: var(--ink); background: rgba(232,170,60,.18); cursor: help; }
.fv-lang { font-size: 12px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }
/* The communication level (25 Nov, option E): staff only. */
.fv-comm { font-size: 12px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }
.pp-large .pp-img { width: 96px; height: 96px; }
.pp-large .pp-remove { width: 20px; height: 20px; font-size: 13px; line-height: 17px; top: 0; right: 0; }
#folder.fo-desk .fv-h1 { padding-right: 0; }
.fv-tree { margin-top: 0; align-items: stretch; }
.fv-idrow { display: inline-flex; gap: 8px; align-items: center; }
.fv-tree .ft-tier { flex-direction: column; align-items: stretch; gap: 2px; border: 0; padding: 0; }
.fv-tree .ft-mid { flex-direction: column; }
.fv-tree .ft-side { flex-direction: column; gap: 2px; }
.fv-tree .ft-node, .fv-tree .ft-me { display: grid; grid-template-columns: 64px auto 1fr; gap: 8px; align-items: baseline;
  border: 0; border-radius: 6px; padding: 2px 4px; text-align: left; }
.fv-tree .ft-node:hover { background: var(--sunk); }
.fv-tree .ft-me .ft-name { font-weight: 600; }
@media (max-width: 899px) {
  .fv-head { grid-template-columns: minmax(0, 1fr); padding-right: 40px; }
}
.fv-grp { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.fv-grp > .btn, .fv-grp > button { border: 0; border-radius: 0; border-right: 1px solid var(--rule); min-height: 34px;
  padding: 4px 10px; font-size: 13px; }
.fv-grp > :last-child { border-right: 0; }
.fv-bee { font-size: 15px; cursor: help; }
.fv-bee.bee-not { filter: grayscale(1); opacity: .55; }
.fv-tree { border: 1px solid var(--rule); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; font-size: 11px; min-width: 0; margin-top: 0; }
.ft-h { align-self: stretch; display: flex; justify-content: space-between; align-items: center; }
.ft-k { letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-size: 10px; }
.ft-add { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule); background: transparent;
  color: var(--ink); padding: 0; cursor: pointer; line-height: 18px; position: relative; }
.ft-add::before { content: ''; position: absolute; inset: -11px; }
.ft-tier { display: flex; gap: 6px; justify-content: center; position: relative; }
.ft-up { padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.ft-down { padding-top: 6px; border-top: 1px solid var(--rule); }
.ft-mid { align-items: center; }
.ft-side { display: flex; gap: 6px; }
.ft-node, .ft-me { display: flex; flex-direction: column; align-items: center; padding: 3px 6px; border: 1px solid var(--rule);
  border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; line-height: 1.25; }
.ft-me { border-color: var(--teal, #4fd6c8); cursor: default; }
.ft-rel { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.ft-name { font-size: 11px; }
.ft-key { font-size: 9px; color: var(--faint); }
.ft-none { color: var(--dim); }
.pp-remove { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 18px;
  padding: 0; cursor: pointer; }
.pp-remove::before { content: ''; position: absolute; inset: -11px; }
.pp-remove:hover { border-color: #c0342a; color: #ff8a80; }
.pp-ask { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--sunk); }
.pp-ask[hidden] { display: none; }
.pp-ask-q { font-size: 13px; color: var(--ink); }
.pp-ask-k { font-size: 11px; color: var(--dim); }
.pp-ask-in { width: 160px; }
.pp-ask-said { font-size: 12px; color: var(--dim); }
#folder.fo-desk { position: relative; }

.fv-close { position: absolute; top: 8px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); font-size: 20px; line-height: 28px;
  padding: 0; cursor: pointer; z-index: 2; }
.fv-close::before { content: ''; position: absolute; inset: -6px; }
.fv-photo { margin: 4px 0 6px; }
.pp-words { font-size: 12px; color: var(--dim); }
/* The CareBee bee beside the folder number (12 Nov). */
.fv-bee { font-size: 15px; cursor: help; }
.fv-bee.bee-not { filter: grayscale(1); opacity: .55; }
/* ==== referrals BEGIN — who referred the patient (referrer.ts, #1262, 25 November) ==== */
/* The directory search, the file's referral block, the writing board's
   pop-up and a directory entry's tracking sheet. No px font size, so the
   generated desktop type scale is not asked to know these classes. */
.rf, .rf-sheet { display: flex; flex-direction: column; gap: 0.35rem; }
.rf-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.rf-lab { color: var(--dim); min-width: 8rem; }
.rf-name { font-weight: 600; }
.rf-clash, .rf-said { color: var(--amber); }
.rf-no, .rf-wait, .rf-none { color: var(--dim); }
.rf-area { display: flex; flex-direction: column; gap: 0.35rem; }
.rf-search { display: flex; flex-direction: column; gap: 0.3rem; }
.rf-q, .rf-in { width: 100%; max-width: 28rem; }
.rf-list { display: flex; flex-direction: column; gap: 0.2rem; max-height: 16rem; overflow-y: auto; }
.rf-opt { text-align: left; justify-content: flex-start; }
.rf-opt-sub { color: var(--dim); }
.rf-addf { display: flex; flex-direction: column; gap: 0.3rem; }
.rf-part .rf-v { flex: 1; }
.rf-on { padding: 0.1rem 0; }
.rf-table { border-collapse: collapse; width: 100%; }
.rf-table th, .rf-table td { text-align: left; padding: 0.25rem 0.4rem; border-bottom: 1px solid var(--rule); }
.rf-held { font-weight: 600; }
.rf-up { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.rf-open { margin-left: 0.3rem; }
.rf-tech { display: flex; flex-direction: column; gap: 0.35rem; }
.wb-ref-b { min-width: 20rem; }
.prt-sheet-b, .pv-sheet-b { margin-top: 0.35rem; }
/* ==== referrals END ==== */
/* ==== visits BEGIN — the folder's Visit history (30 October) ==== */
/* 🗓 VISIT HISTORY: a tab per provider over the visits. ALL PROVIDERS reads
   down the page, a row per visit and its six tiles across it (his system's
   layout); ONE PROVIDER reads across, a card per visit, the tiles stacked.
   Prefix `vh-`, grepped absent before it was claimed. Layout only: every word
   is the door's. No px font size, so the generated desktop type scale is
   untouched. */
.vh { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.vh-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.vh-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--rule);
  border-radius: 999px; background: var(--panel-2); color: var(--ink-2); font-family: var(--display); font-size: 0.95em; cursor: pointer; }
.vh-tab.is-on { color: var(--accent-ink); background: var(--teal); border-color: var(--teal); }
.vh-tab.is-you .vh-tab-t { font-weight: 600; }
.vh-tab-n { font-family: var(--mono); font-size: 0.85em; opacity: 0.85; }
.vh-discs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.vh-disc { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 1px dashed var(--rule);
  border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.vh-disc.is-on { border-style: solid; border-color: var(--teal); color: var(--teal); }
.vh-disc.is-unrecorded .vh-disc-t { font-style: italic; }
.vh-why { color: var(--dim); font-size: 0.92em; }
.vh-older { color: var(--dim); font-size: 0.92em; }
.vh-none { color: var(--dim); }
.vh-held { color: var(--dim); font-style: italic; }
.vh-body { min-height: 0; }
.vh-h { padding: 2px 10px; color: var(--label); font-family: var(--mono); font-size: 0.8em; letter-spacing: 0.04em; text-transform: uppercase; }
.vh-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.vh-card { flex: 0 0 300px; display: flex; flex-direction: column; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.vh-card > .vh-h { padding-top: 6px; border-top: 1px solid var(--line-soft); }
.vh-tile { min-width: 0; padding: 8px 10px; overflow-wrap: anywhere; }
.vh-info { box-shadow: inset 3px 0 0 var(--teal); border-radius: var(--r) 0 0 var(--r); }
.vh-card > .vh-info { border-radius: var(--r-l) var(--r-l) 0 0; }
.vh-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-bottom: 4px; }
.vh-date { font-weight: 600; color: var(--ink); }
.vh-ago { color: var(--dim); font-size: 0.9em; }
.vh-line { font-size: 0.92em; }
.vh-k { color: var(--dim); }
.vh-sub { margin-top: 4px; color: var(--label); font-size: 0.85em; font-weight: 600; }
.vh-sub:first-child { margin-top: 0; }
.vh-list { margin: 2px 0 0; padding-left: 16px; }
.vh-gp { margin-top: 6px; padding-left: 6px; border-left: 3px solid var(--rule); }
.vh-gp.is-open { border-left-color: var(--amber); }
.vh-gp.is-closed { border-left-color: var(--ink); }
.vh-gp-t { font-weight: 600; margin-right: 6px; }
.vh-gp-l { font-size: 0.88em; }
.vh-gp.is-open .vh-gp-l { color: var(--amber); }
.vh-gp.is-closed .vh-gp-l { color: var(--ink); }
.vh-gp-s { font-size: 0.88em; color: var(--dim); }
.vh-allied { list-style: none; padding-left: 0; }
.vh-al { border-left: 3px solid var(--amber); padding-left: 6px; }
.vh-al.is-replied { border-left-color: var(--teal); }
.vh-al-r { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 999px; font-size: 0.82em;
  color: var(--amber); border: 1px solid var(--amber); }
.vh-al.is-replied .vh-al-r { color: var(--teal); border-color: var(--teal); }
.vh-al + .vh-al { margin-top: 6px; }
.vh-al-d { font-weight: 600; }
.vh-al-s { font-size: 0.9em; color: var(--dim); }
.vh-al-ep { font-size: 0.88em; color: var(--teal); }
.vh-al-ep.is-closed, .vh-al-ep.is-defaulted { color: var(--dim); }
.vh-al-f { margin: 3px 4px 0 0; }
.vh-mcitem + .vh-mcitem, .vh-doc + .vh-doc, .vh-labrow + .vh-labrow, .vh-report + .vh-report { margin-top: 6px; }
.vh-mcdays { font-weight: 600; }
.vh-mcspan, .vh-mckind, .vh-mcserial { font-size: 0.9em; color: var(--dim); }
.vh-mcserial { font-family: var(--mono); }
.vh-read { min-height: 34px; margin-bottom: 4px; }
.vh-doc { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.vh-doc-w { color: var(--dim); font-size: 0.88em; }
.vh-labrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.vh-test { font-weight: 600; }
.vh-state { color: var(--dim); font-size: 0.9em; }
.vh-flag { color: var(--amber); font-size: 0.9em; font-weight: 600; }
.vh-report-t { font-weight: 600; }
.vh-finding { font-family: var(--serif); font-style: italic; }
.vh-nofinding { color: var(--dim); font-size: 0.9em; }
.vh-photos { margin-top: 4px; color: var(--dim); font-size: 0.9em; }
.vh-photo { margin: 4px 6px 0 0; }
.vh-photo-off { color: var(--dim); font-size: 0.9em; margin-top: 4px; }
/* Every file naming no listed visit, apart at the foot of the overview. */
.vh-unfiled { margin-top: 16px; padding: 12px; border: 1px dashed var(--rule); border-radius: 10px; }
.vh-unfiled-h { font-weight: 700; }
.vh-unfiled-s { color: var(--dim); font-size: 0.9em; margin: 2px 0 8px; }
.vh-unfiled-t { margin-top: 10px; }
.vh-unfiled-i { padding: 6px 0; border-top: 1px solid var(--rule); }
.vh-unfiled-w { color: var(--dim); font-size: 0.85em; margin-top: 2px; }
/* Lab · Rad (30 Oct): a few abnormal readings, the full results, the report and its images. */
.vh-results { margin-top: 6px; color: var(--dim); font-size: 0.9em; }
.vh-results.is-off { color: var(--amber); font-weight: 600; }
.vh-abn { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-top: 2px; padding-left: 8px;
  border-left: 2px solid var(--amber); }
.vh-abn-n { font-weight: 600; }
.vh-abn-v { font-family: var(--mono); }
.vh-abn-s { color: var(--amber); font-size: 0.9em; }
.vh-abn-u, .vh-abn-more, .vh-nolink { color: var(--dim); font-size: 0.88em; }
.vh-abn-more { margin-top: 2px; padding-left: 10px; }
.vh-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vh-link { min-height: 34px; padding: 4px 10px; }
.vh-full { margin-top: 6px; }
.vh-report-img { display: block; max-width: 100%; }
.vh-report-pdf { display: block; width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--r); }
.vh-studies { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.vh-study { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.vh-study.is-same { box-shadow: inset 3px 0 0 var(--teal); }
.vh-study-t { flex: 1 1 220px; min-width: 0; }
.vh-study-m { color: var(--dim); font-size: 0.88em; }
.vh-study-said { flex-basis: 100%; color: var(--dim); font-size: 0.88em; }
.vh-study-said:empty { display: none; }
.vh .is-withdrawn { text-decoration: line-through; color: var(--dim); }
.vh .is-stopped { color: var(--dim); }
.vh-sec-h { margin-top: 10px; color: var(--label); font-family: var(--mono); font-size: 0.85em; letter-spacing: 0.04em; }
.vh-sec-h:first-child { margin-top: 0; }
.vh-sec-t { white-space: pre-wrap; }
@media (max-width: 899px) {
  .vh-card { flex-basis: 85%; }
}
/* 📑 THE CHART REVIEW, beside the overview (30 October, "keep the overview,
   put chart review beside it"), and the operation in perspective: choose a
   procedure and every row is dated from it. The words are the door's; the
   colour is never the only cue. */
.cr-views { display: inline-flex; margin-bottom: 8px; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.cr-view { min-height: var(--tap); padding: 0 14px; border: 0; background: transparent; color: var(--ink-2);
  font: inherit; font-family: var(--display); cursor: pointer; }
.cr-view + .cr-view { border-left: 1px solid var(--rule); }
.cr-view.is-on { background: var(--teal); color: var(--accent-ink); font-weight: 600; }
.cr-wrap { display: flex; flex-direction: column; gap: 10px; }
.cr-wrap[hidden], .vh-overview[hidden] { display: none; }
.cr-anchors, .cr-kinds, .cr-periods, .cr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cr-anchors-h { color: var(--label); font-family: var(--mono); font-size: 0.85em; letter-spacing: 0.04em; }
.cr-anchors-none { color: var(--dim); font-size: 0.9em; }
.cr-anchor, .cr-kind, .cr-period { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px;
  border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.cr-anchor.is-on, .cr-kind.is-on, .cr-period.is-on { background: var(--teal); border-color: var(--teal); color: var(--accent-ink); }
.cr-provider, .cr-find { min-height: 34px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel-2); color: var(--ink); font: inherit; }
.cr-find { flex: 1 1 200px; max-width: 320px; }
.cr-op { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--teal);
  border-radius: var(--r-l); background: var(--panel-2); }
.cr-op[hidden] { display: none; }
.cr-op-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.cr-op-k { color: var(--label); font-family: var(--mono); font-size: 0.8em; letter-spacing: 0.08em; text-transform: uppercase; }
.cr-op-today { color: var(--teal); font-family: var(--mono); font-size: 0.9em; }
.cr-op-t { font-family: var(--display); font-size: 1.25em; font-weight: 700; }
.cr-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; }
.cr-fact-k { color: var(--dim); }
.cr-dim { color: var(--dim); }
.cr-ba { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.cr-ba-h { color: var(--label); font-family: var(--mono); font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; }
.cr-ba-l { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 12px; }
.cr-ba-l.is-flagged .cr-fact-v { color: var(--amber); font-weight: 600; }
.cr-pain { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cr-pain .cr-ba-h { flex: 1 0 100%; }
.cr-pain-i { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-width: 64px; height: 96px; }
.cr-pain-bar { display: block; width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--amber); }
.cr-pain-i.is-post .cr-pain-bar, .cr-pain-i.is-op .cr-pain-bar { background: var(--teal); }
.cr-pain-w { font-weight: 600; text-align: center; }
.cr-pain-r { color: var(--dim); font-family: var(--mono); font-size: 0.8em; text-align: center; }
.cr-miles { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.cr-miles .cr-ba-h { flex: 1 0 100%; }
.cr-mile { flex: 1 1 160px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: var(--r); }
.cr-mile.is-seen { border-color: var(--teal); }
.cr-mile.is-none, .cr-mile.is-due { border-color: var(--amber); }
.cr-mile.is-booked { border-color: var(--teal); border-style: dashed; }
.cr-mile-n { font-weight: 700; }
.cr-mile-w { color: var(--dim); font-family: var(--mono); font-size: 0.8em; }
.cr-mile-s { font-weight: 600; }
.cr-mile.is-seen .cr-mile-s, .cr-mile.is-booked .cr-mile-s { color: var(--teal); }
.cr-mile.is-none .cr-mile-s, .cr-mile.is-due .cr-mile-s { color: var(--amber); }
.cr-main { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.cr-left { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-count { color: var(--dim); font-size: 0.9em; }
.cr-list { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--r-l); overflow: hidden; }
.cr-group { padding: 6px 12px; background: var(--panel-2); color: var(--teal); font-weight: 700; font-size: 0.9em;
  border-top: 1px solid var(--rule); }
.cr-row { display: grid; grid-template-columns: 150px 100px 120px minmax(0, 1fr) 90px 170px; gap: 10px; align-items: start;
  min-height: var(--tap); padding: 8px 12px; border: 0; border-top: 1px solid var(--line-soft); background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cr-list > .cr-row:first-child, .cr-list > .cr-group:first-child { border-top: 0; }
.cr-row:not(:has(.cr-rel)) { grid-template-columns: 100px 120px minmax(0, 1fr) 90px 170px; }
.cr-row.is-sel { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--teal); }
.cr-row.is-op { background: color-mix(in srgb, var(--teal) 8%, transparent); }
.cr-rel { font-family: var(--mono); font-size: 0.85em; font-weight: 600; }
.cr-date, .cr-visit { font-family: var(--mono); font-size: 0.85em; color: var(--ink-2); }
.cr-kindw { color: var(--dim); font-size: 0.9em; }
.cr-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-title-t { font-weight: 600; }
.cr-title-s { color: var(--dim); font-size: 0.9em; }
.cr-status { font-size: 0.9em; }
.cr-row.is-open .cr-status, .cr-row.is-awaiting .cr-status, .cr-row.is-flagged .cr-status { color: var(--amber); font-weight: 600; }
.cr-row.is-replied .cr-status { color: var(--teal); font-weight: 600; }
.cr-row.is-withdrawn .cr-title-t { text-decoration: line-through; color: var(--dim); }
.cr-preview { flex: 1 1 320px; min-width: 280px; max-width: 440px; display: flex; flex-direction: column; gap: 8px; padding: 14px;
  border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--panel-2); }
.cr-pv-t { font-family: var(--display); font-size: 1.15em; font-weight: 700; }
.cr-pv-m { color: var(--dim); font-family: var(--mono); font-size: 0.85em; }
.cr-pv-apart { color: var(--amber); font-size: 0.9em; }
.cr-pv-s { font-weight: 600; }
.cr-pv-s.is-open, .cr-pv-s.is-awaiting, .cr-pv-s.is-flagged { color: var(--amber); }
.cr-pv-s.is-replied { color: var(--teal); }
@media (max-width: 899px) {
  .cr-row, .cr-row:not(:has(.cr-rel)) { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cr-preview { max-width: none; }
}
/* AN OPERATION AND THE VISITS ABOUT IT, one block in the overview's list:
   the operation's own row first, the related visits indented under it. */
.vh-ep { display: flex; flex-direction: column; border: 1px solid var(--teal); border-radius: var(--r-l);
  background: var(--panel-2); overflow: hidden; }
.vh-ep.is-closed { border-color: var(--rule); }
.vh-ep-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft); }
.vh-ep-k { color: var(--teal); font-family: var(--mono); font-size: 0.8em; letter-spacing: 0.08em; text-transform: uppercase; }
.vh-ep.is-closed .vh-ep-k { color: var(--label); }
.vh-ep-t { flex: 1 1 260px; font-weight: 700; }
.vh-ep-w { color: var(--dim); font-family: var(--mono); font-size: 0.85em; }
.vh-ep.is-open .vh-ep-w { color: var(--teal); }
.vh-ep-miles { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.vh-ep-mile { padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; color: var(--dim); font-size: 0.85em; }
.vh-ep-mile[data-state="seen"] { border-color: var(--teal); color: var(--teal); }
.vh-ep-mile[data-state="booked"] { border-color: var(--teal); border-style: dashed; color: var(--teal); }
.vh-ep-mile[data-state="none"], .vh-ep-mile[data-state="due"] { border-color: var(--amber); color: var(--amber); }
.vh-ep-more { min-height: var(--tap); }
.vh-ep-rows[hidden] { display: none; }
/* #1153: the operation under the table's row that holds it; its visits named, each one tap from its tiles. */
.vh-ep-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 12px; border-top: 1px solid var(--line-soft); }
.vh-ep-item.is-op { background: var(--panel); }
.vh-ep-item.is-sub { border-left: 3px solid var(--teal); padding-left: 1.2em; }
.vh-ep-item.is-discharge { border-left-color: var(--rule); }
.vh-ep-what { flex: 1 1 200px; color: var(--dim); }
.vt-oprow > .vt-op { padding: 4px 10px 10px 22px; }
.vt-oprow .vh-ep + .vh-ep { margin-top: 8px; }
.vt-op-acts { margin-top: 4px; }
.vh-ep-rel { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--line-soft);
  color: var(--teal); font-family: var(--mono); font-size: 0.8em; font-weight: 600; }
.vh-ep-none { padding: 8px 12px; color: var(--dim); }
.vh-ep-card { padding: 4px 8px; border-radius: var(--r); background: var(--line-soft); color: var(--teal);
  font-family: var(--mono); font-size: 0.8em; font-weight: 600; }
/* THE CASE'S PROGRESSION: one axis of days after the operation, each step a
   shape and a word, the windows in their states, today a hairline; the same
   steps as words under it. The picture needs width, so a phone reads the
   words alone. */
.tl { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; border-bottom: 1px solid var(--line-soft); }
.cr-op .tl { padding: 0 0 8px; }
.tl-plot { width: 100%; }
.tl-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tl-ev:focus, .tl-win:focus { outline: none; }
.tl-ev:focus .tl-hit, .tl-ev:hover .tl-hit { fill: var(--line-soft); }
.tl-ev:focus .tl-ev-l, .tl-ev:hover .tl-ev-l { font-weight: 700; }
.tl-win-band { fill: var(--line-soft); }
.tl-win-band[data-state="seen"] { fill: var(--teal); fill-opacity: 0.28; }
.tl-win-band[data-state="booked"] { fill: none; stroke: var(--teal); stroke-width: 1.5; }
.tl-win-band[data-state="none"], .tl-win-band[data-state="due"] { fill: var(--amber); fill-opacity: 0.3; }
.tl-win:focus .tl-win-band { stroke: var(--ink); stroke-width: 1.5; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--dim); font-size: 0.85em; }
.tl-key { display: inline-flex; align-items: center; gap: 5px; }
.tl-seq { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.tl-step { display: inline-flex; align-items: baseline; gap: 5px; }
.tl-step + .tl-step::before { content: "→"; margin: 0 8px; color: var(--dim); }
.tl-step-s { font-family: var(--mono); font-weight: 700; color: var(--teal); }
.tl-step.is-today .tl-step-s { color: var(--amber); }
@media (max-width: 699px) {
  .tl-plot, .tl-legend { display: none; }
  .tl-seq { flex-direction: column; }
  .tl-step + .tl-step::before { content: "↓"; margin: 0 6px 0 0; }
}
/* WHAT IS STILL OUT OF RANGE WHILE IN HOSPITAL, AND RESULTS VERIFIED (30 Oct):
   his rule, verified in the ordinary ink (black in the day theme), not
   verified amber, critical not verified red -- and every state also says
   its words, so the colour is never the only cue. */
.vh-stay { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: var(--r-l); background: var(--panel); }
.vh-stay[data-critical="true"] { border-left-color: var(--red); }
.vh-stay-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.vh-stay-k { font-weight: 700; }
.vh-stay-t { color: var(--dim); font-size: 0.92em; }
.vh-stay-w { font-weight: 700; color: var(--amber); }
.vh-stay[data-critical="true"] .vh-stay-w { color: var(--red); }
.vh-stay-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vh-stay-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.85em; font-weight: 600; }
.vh-stay-chip[data-verify="critical"] { border-color: var(--red); color: var(--red); }
.vh-stay-chip[data-verify="unverified"] { border-color: var(--amber); color: var(--amber); }
.vh-iss { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.vh-iss-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px 6px; }
.vh-iss-k { font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.vh-iss[data-open="true"] .vh-iss-k { color: var(--red); }
.vh-iss-rule, .vh-iss-key, .vh-iss-ctx, .vh-iss-unjudged, .vh-iss-backrow, .vh-iss-handed, .vh-iss-none {
  font-size: 0.82em; color: var(--dim); }
.vh-iss-ctx, .vh-iss-unjudged, .vh-iss-handed, .vh-iss-none { padding: 4px 12px; }
.vh-iss-g { background: var(--sunk); }
.vh-iss-gt { padding: 8px 12px 2px; font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.vh-iss-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 1fr) 150px minmax(0, 1.6fr) minmax(170px, 1.2fr);
  gap: 4px 14px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.vh-iss-who, .vh-iss-val, .vh-iss-trend, .vh-iss-act { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vh-iss-n { font-weight: 700; }
.vh-iss-since, .vh-iss-r, .vh-iss-by { font-size: 0.8em; color: var(--dim); }
.vh-iss-v { font-family: var(--mono); font-weight: 600; }
.vh-iss-r { font-family: var(--mono); }
.vh-iss-recheck { font-size: 0.82em; color: var(--amber); }
.vh-iss-state { font-size: 0.82em; font-weight: 700; }
.vh-iss-row[data-verify="critical"] .vh-iss-n, .vh-iss-row[data-verify="critical"] .vh-iss-v,
.vh-iss-row[data-verify="critical"] .vh-iss-state { color: var(--red); }
.vh-iss-row[data-verify="unverified"] .vh-iss-n, .vh-iss-row[data-verify="unverified"] .vh-iss-v,
.vh-iss-row[data-verify="unverified"] .vh-iss-state { color: var(--amber); }
.vh-iss-verify, .vh-iss-handover { align-self: flex-start; }
.vh-iss-hand { display: flex; flex-wrap: wrap; gap: 4px; }
.vh-iss-spark { display: block; }
.vh-iss-band { fill: var(--teal); fill-opacity: 0.16; }
.vh-iss-op { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 2; }
.vh-iss-line { fill: none; stroke: var(--dim); stroke-width: 1.6; }
.vh-iss-stale { stroke: var(--amber); stroke-width: 1.6; stroke-dasharray: 3 3; }
.vh-iss-pt { fill: var(--sunk); stroke: var(--dim); stroke-width: 1.4; }
.vh-iss-pt.is-out { fill: var(--ink); stroke: var(--ink); }
.vh-iss-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.vh-iss-back { padding: 2px 12px 8px; background: var(--sunk); }
.vh-abn[data-verify="critical"] .vh-abn-n, .vh-abn[data-verify="critical"] .vh-abn-v,
.vh-abn[data-verify="critical"] .vh-abn-vf { color: var(--red); font-weight: 700; }
.vh-abn[data-verify="unverified"] .vh-abn-n, .vh-abn[data-verify="unverified"] .vh-abn-v,
.vh-abn[data-verify="unverified"] .vh-abn-vf { color: var(--amber); }
.vh-abn-vf { font-size: 0.8em; }
.vh-verify { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.vh-verify-w { font-size: 0.82em; color: var(--amber); }
.vh-verify[data-verify="critical"] .vh-verify-w { color: var(--red); font-weight: 700; }
.vh-verified { font-size: 0.82em; color: var(--dim); }
.vh-report-vf { font-size: 0.8em; }
.vh-report[data-verify="unverified"] .vh-report-vf { color: var(--amber); }
/* THE VISIT HISTORY AS ONE TABLE (ticket #1144). */
.vt-chip { min-height: 34px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.vt-chip.is-on { color: var(--teal); border-color: var(--teal); }
.vt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.vt-count { color: var(--dim); font-size: 0.86em; }
.vt-r.is-focus { outline: 2px solid var(--teal); outline-offset: -2px; }   /* #1156: the episode brought into view, a moment */
.vt-said { color: var(--dim); font-size: 0.9em; margin: 4px 0; }
.vt-findrow { margin: 6px 0; }   /* #1157: the search box over the visit table */
.vt-find { width: min(420px, 100%); min-height: 34px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; }
.vt-nomatch .vt-c { color: var(--dim); }
.vt-body { overflow-x: auto; }
.vt-table { width: 100%; border-collapse: collapse; }
.vt-h { text-align: left; padding: 0; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 0.85em; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.vt-sort { min-height: 34px; padding: 6px 10px; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.vt-h[aria-sort="ascending"], .vt-h[aria-sort="descending"] { color: var(--teal); }
.vt-c { padding: 8px 10px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.vt-date { font-family: var(--mono); white-space: nowrap; }
.vt-r.is-allied { background: var(--panel-2); }
.vt-r.is-day .vt-c { color: var(--dim); font-size: 0.92em; }
.vt-r.is-day .vt-visit { padding-left: 22px; }
.vt-ep-t { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; padding: 0; cursor: pointer; text-align: left; }
.vt-ep-w { color: var(--dim); font-size: 0.86em; }
.vt-ep-acts { display: flex; gap: 4px; margin-top: 4px; }
.vt-state[data-state="open"], .vt-state[data-state="in"] { color: var(--teal); }
.vt-state[data-state="pended"] { color: var(--amber); }
.vt-state[data-state="unread"] { color: var(--amber); }
.vt-dx.is-held, .vt-held { color: var(--dim); font-style: italic; }
.vt-g-h { padding: 10px; border-top: 1px solid var(--line); }
.vt-g-w { color: var(--dim); }
.vt-kind { font-size: 0.85em; color: var(--dim); }
@media (max-width: 699px) {
  .vh-iss-row { grid-template-columns: 1fr auto; }
  .vh-iss-val { align-items: flex-end; }
  .vh-iss-spark { grid-column: 1; }
  .vh-iss-trend, .vh-iss-act { grid-column: 1 / -1; }
}
/* ==== visits END ==== */

/* ─── SETTINGS, ONE PAGE (24 September) ─── a bar of sections down the left,
   the section's panels beside it, a close in the top-right corner. The page
   is the viewport; only a panel scrolls. */
#setdeskview.sd-page { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px;
  height: calc(100vh - 72px); padding: 12px 14px 14px; overflow: hidden; }
#setdeskview.sd-page[hidden] { display: none; }
body.is-phone #setdeskview.sd-page { grid-template-columns: minmax(0, 1fr); }   /* #1307: on a phone the section list is the Settings seat */
body.is-phone #setdeskview.sd-page .sd-bar { display: none; }
.sd-phone-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 14px; }
.sd-phone-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--label); padding: 2px 4px 6px; }
.sd-phone-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sd-phone-i { width: 22px; text-align: center; }
.sd-phone-i:empty { display: none; }
/* the phone follows the tabs: a tab is a heading row, the pages inside it sit under it */
.sd-phone-tab { font-weight: 600; }
/* #1307: home is one card a tab (its pages counted and named), a tab is the
   swiped strip and its pages under its own headings, and one search box leads */
.sd-phone-w { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sd-phone-l { overflow-wrap: anywhere; }
.sd-phone-s { font-size: 12px; color: var(--dim); font-weight: 400; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sd-phone-q { min-height: 44px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; }
.sd-phone-body { display: flex; flex-direction: column; gap: 6px; }
.sd-phone-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
.sd-phone-chip { flex: 0 0 auto; scroll-snap-align: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; white-space: nowrap; cursor: pointer; }
.sd-phone-chip.on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.sd-phone-g { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--label); padding: 8px 4px 0; }
.sd-phone-none { color: var(--dim); padding: 8px 4px; }
.sd-bar { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; min-height: 0; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel-2); }
.sd-bar-h { padding: 4px 10px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--label); }
.sd-nav { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--r); font: inherit; font-size: 14px; color: var(--ink-2);
  text-align: left; cursor: pointer; }
.sd-nav:hover { border-color: var(--line); color: var(--ink); }
.sd-nav.is-on { border-color: rgba(79,214,200,0.5); background: rgba(79,214,200,0.12); color: var(--teal); font-weight: 600; }
.sd-nav-i { flex: 0 0 22px; text-align: center; }
.sd-more { margin-top: auto; }
.sd-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.sd-top { display: flex; align-items: center; gap: 12px; }
.sd-title { font-size: 20px; font-weight: 600; }
.sd-close { margin-left: auto; width: var(--tap); height: var(--tap); border-radius: 50%; font-size: 18px;
  border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.sd-close:hover { border-color: var(--teal); color: var(--teal); }
.sd-body { flex: 1 1 auto; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.sd-body.sd-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-body.sd-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* TAB VIEW (25 September): one panel across the page, its content flowing
   into columns rather than down, so a tab reads without scrolling. */
.sd-view { display: inline-flex; gap: 2px; margin-left: auto; border: 1px solid var(--rule);
  border-radius: 999px; padding: 2px; }
.sd-view-b { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 0;
  background: none; color: var(--dim); cursor: pointer; white-space: nowrap; }
.sd-view-b.is-on { background: rgba(79,214,200,.14); color: var(--ink); }
.sd-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-tab { font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 8px 8px 0 0;
  border: 1px solid var(--rule); border-bottom-color: transparent; background: none;
  color: var(--dim); cursor: pointer; }
.sd-tab.is-on { color: var(--ink); background: rgba(79,214,200,.10); border-color: var(--teal); }
.sd-body.sd-tabbed { grid-template-columns: minmax(0, 1fr); }
.sd-tabbed .sd-panel[hidden] { display: none; }
.sd-tabbed .sd-panel-b { columns: 340px; column-gap: 28px; column-fill: auto; overflow: auto; }
/* NO HEADING AT THE FOOT OF A COLUMN (26 September: "on-call (a header)
   starts at the bottom of a page -- this is a sin in design"). A block in a
   tab's flow is never split, and a heading never parts from what follows. */
.sd-tabbed .sd-panel-b > * { break-inside: avoid; }
.sd-tabbed .sd-panel-b :is(h1, h2, h3, h4, .st-h, .st-card-t) { break-after: avoid; }
/* A panel of stacks (Doctor · On call · Leave) is laid as COLUMNS OF ITS OWN,
   one stack each, never flowed; the Clinic tab is laid by its sub-tabs. */
.sd-tabbed .sd-panel-b:has(> .sd-stack) { columns: auto; display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.sd-tabbed .sd-panel-b:has(> .sd-stack) > .sd-stack + .sd-stack { margin-top: 0; padding-top: 0; border-top: 0;
  padding-left: 20px; border-left: 1px solid var(--line-soft); }
.sd-tabbed .sd-panel-b:has(.st-sub) { columns: auto; }
.sd-top .sd-tabs { margin-left: 18px; flex-wrap: nowrap; }
.sd-top .sd-tab { border-radius: 8px; }
/* THE CLINIC SUB-TABS: one clinic, or the desk's hours, at a time. */
.su-k { font-size: 12px; color: var(--dim); margin-top: 6px; }
.st-subs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 8px; }
.st-subtab { font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: none; color: var(--dim); }
.st-subtab.is-on { color: var(--ink); border-color: var(--teal); background: rgba(79,214,200,.10); }
.st-sub > [hidden] { display: none; }
.sd-tabbed .st-sub .st-card-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px; align-items: start; }
/* CHECKING PATIENTS IN (25 September), above the place picker. */
.ci-arr { border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin: 8px 0 14px; }
.ci-arr-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
.ci-arr-t { font-weight: 600; font-size: 14px; }
.ci-arr-sub { font-size: 12px; color: var(--dim); }
.ci-arr-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.ci-arr-row { display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 6px 8px; border-radius: 8px; background: var(--sunk); }
.ci-arr-who { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
.ci-arr-reg { font-size: 13px; }
.ci-arr-row { cursor: grab; border: 1px solid var(--line-soft); }
.ci-arr-who { align-items: center; }
.ci-arr-grip { color: var(--faint); font-size: 13px; letter-spacing: -2px; user-select: none; }
.ci-arr-sym { width: 26px; height: 26px; flex: 0 0 26px; display: inline-grid; place-items: center; font-size: 15px;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 7px; }
.ci-arr-bee::before { content: ''; width: 17px; height: 17px; background-color: var(--bee-connected);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='7.6' cy='7.4' rx='2.6' ry='4.4' transform='rotate(-38 7.6 7.4)' opacity='.62'/%3E%3Cellipse cx='16.4' cy='7.4' rx='2.6' ry='4.4' transform='rotate(38 16.4 7.4)' opacity='.62'/%3E%3Cellipse cx='12' cy='15.4' rx='5.6' ry='6.6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='7.6' cy='7.4' rx='2.6' ry='4.4' transform='rotate(-38 7.6 7.4)' opacity='.62'/%3E%3Cellipse cx='16.4' cy='7.4' rx='2.6' ry='4.4' transform='rotate(38 16.4 7.4)' opacity='.62'/%3E%3Cellipse cx='12' cy='15.4' rx='5.6' ry='6.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.ci-arr-reg { padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); white-space: nowrap; }
.ci-arr-lapsed { font-size: 12.5px; color: var(--amber); margin-top: 6px; }
.ci-arr-at { font-size: 12px; color: var(--dim); }
.ci-arr-drop { margin-top: 8px; padding: 9px 12px; border: 1px dashed var(--rule); border-radius: 10px; font-size: 12.5px; color: var(--dim); }
.ci-arr-drop.is-drop { border-color: var(--teal); background: rgba(114,229,213,.1); color: var(--ink); }
.ci-arr-how { font-size: 12px; color: var(--dim); }
/* Scan the patient's CareBee My QR to check them in (23 Nov 2026). */
.ci-arr-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
/* The expected list from a photographed printed list (#1301, photolist.ts). */
.pl { margin: 8px 0; }
.pl-panel { border: 1px solid var(--rule); border-radius: 10px; padding: 10px; margin-top: 8px; }
.pl-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pl-t { font-weight: 600; }
.pl-help summary { cursor: pointer; }
.pl-help p { margin: 4px 0; color: var(--dim); }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.pl-said { color: var(--dim); margin: 4px 0; }
.pl-rows { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: 8px; background: var(--sunk); }
.pl-row.unread { outline: 1px dashed var(--amber); }
.pl-row.same { outline: 1px solid var(--red); }
.pl-ini { width: 5em; text-transform: uppercase; }
.pl-line { flex-basis: 100%; color: var(--dim); overflow-wrap: anywhere; }
.pl-ask { margin-top: 8px; }
.pl-ask-l { color: var(--dim); }
.pl-ask-t.no { color: var(--red); }
.ci-arr-scan-t { font-size: 12.5px; color: var(--dim); }
.ci-arr-scan-in { flex: 1 1 160px; min-width: 120px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; }
.ci-arr-scan-cam { flex: 1 1 100%; max-width: 320px; border-radius: 10px; }
.ci-arr-row.ci-arr-scanned { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 10px; }
.ci-arr-said { font-size: 12px; margin-top: 6px; }
.ci-arr-none { font-size: 12.5px; color: var(--dim); }
.ci-arr-said.ok { color: var(--teal); }
.ci-arr-said.no { color: var(--red); }
.sd-body.sd-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.sd-panel { min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line);
  border-radius: var(--r-l); background: var(--panel); }
/* THE DOCTOR'S PANEL HOLDS THREE SCREENS (25 September): who he is, his
   on-call dates, his leave. Each paints its own host; this only spaces them
   and rules a line between, so they read as parts of one panel. */
.sd-stack + .sd-stack { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sd-panel-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px; }
/* a screen painted into a panel un-hides itself; inside a panel that is right */
.sd-panel-b > [hidden] { display: none; }
/* 👨‍⚕️ THE DOCTOR PAGE (26 November, doctorpage.ts): one list on the left,
   the part picked on the right, in the folder Insurance tab's format. The
   pane scrolls inside itself; the list stays put. Narrow, the list sits on
   top as a wrap of items. */
.dp-host { height: 100%; container-type: inline-size; }
.sd-tabbed .sd-panel-b.dp-host { columns: auto; overflow: hidden; padding: 0; }
.dp { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100%; min-height: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.dp-list { border-right: 1px solid var(--line); padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.dp-cap { font: 600 11px var(--mono, ui-monospace, monospace); letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal); padding: 10px 10px 6px; }
.dp-cap:first-child { padding-top: 2px; }
.dp-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.dp-item:hover { background: var(--line-soft); }
.dp-item.is-on { background: var(--teal-soft, rgba(114, 229, 213, .16)); box-shadow: inset 3px 0 0 var(--teal); }
.dp-i { flex: 0 0 auto; width: 22px; text-align: center; }
.dp-w { display: flex; flex-direction: column; min-width: 0; }
.dp-l { font-size: 14px; }
.dp-sub { font-size: 12px; color: var(--faint); }
.dp-pane { min-width: 0; min-height: 0; overflow-y: auto; padding: 14px 16px; }
@container (max-width: 620px) {
  .dp { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dp-list { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .dp-cap { width: 100%; padding: 6px 6px 2px; }
  .dp-item { width: auto; }
  .dp-sub { display: none; }
}
.sd-note { font-size: 13px; color: var(--dim); margin-bottom: 10px; }
/* ASK TWICE (asktwice.ts): the read-back line under every write on the
   Settings page and the template builders. */
.ask-line { min-height: 16px; margin-top: 6px; font-size: 12px; color: var(--dim); line-height: 1.45; }
.ask-line.is-ok { color: var(--teal); }
.ask-line.is-no { color: var(--red-ink); }
.ask-line.is-ask { padding: 8px 10px; border-left: 3px solid var(--amber); background: rgba(224,164,74,.08); color: var(--amber-ink); }
.ask-q { margin-bottom: 6px; }
/* 🤝 THE ALLIED HEALTH REFERRAL (8 October) -- the encounter area's form and
   this patient's referrals. Layout only: every word is the door's. */
/* 📋 THE NEW-CASE INTAKE (intake.ts): layout only, the state colours tokens. */
.itk-list { display: grid; gap: 10px; max-width: 52em; }
.itk-item { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; }
.itk-item.is-gone { opacity: 0.6; text-decoration: line-through; border-left-color: var(--line); }
.itk-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.itk-label { color: var(--amber); }
.itk-status, .itk-meta { color: var(--dim); }
.itk-flags { display: grid; gap: 4px; padding: 6px 8px; border: 1px solid var(--red); border-radius: 6px; }
.itk-answers { display: grid; gap: 4px; }
.itk-ans { display: grid; gap: 2px; }
.itk-ans.is-flag .itk-prompt { color: var(--red); }
.itk-prompt { color: var(--dim); }
.itk-said { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.itk-how { color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.itk-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.itk-reason { min-width: 14em; flex: 1; }
.alr-form { display: grid; gap: 10px; max-width: 46em; }
.alr-field { display: grid; gap: 4px; }
.alr-label { color: var(--dim); }
.alr-urg { display: flex; flex-wrap: wrap; gap: 6px; }
.alr-question { width: 100%; box-sizing: border-box; }
.alr-condbox { display: grid; gap: 6px; }
.alr-conditions { display: flex; flex-wrap: wrap; gap: 6px; }
.alr-condition { width: 100%; box-sizing: border-box; }
.alr-cond { font-weight: 600; }
.alr-list { display: grid; gap: 8px; margin-top: 16px; max-width: 46em; }
.alr-h { color: var(--dim); }
.alr-item { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; }
.alr-item.is-waiting { border-left-color: var(--amber); }
.alr-item.is-confirmed { border-left-color: var(--teal); }
.alr-item.is-declined { border-left-color: var(--red); }
.alr-item .btn { justify-self: start; }
/* AWS-82: consent for THIS referral -- who, how, when; the GP bridge's chips. */
.alr-consent { display: grid; gap: 6px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
.alr-on { max-width: 12em; }
.alr-today { align-self: center; }
.alr-rx { display: grid; gap: 8px; margin-top: 16px; max-width: 46em; }
.arx-sub { color: var(--dim); margin-top: 6px; }
.tc-id-how { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
/* 🚑 URGENT CARE (INT-03, 22 Oct): the centre's patients for a doctor, and the
   endings owed. No category is coloured here -- the label the centre sends says it. */
.ucc-h { color: var(--dim); margin-top: 14px; letter-spacing: .04em; }
.ucc-list { display: grid; gap: 8px; max-width: 52em; }
.ucc-row { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; }
.ucc-row .hs-btn { justify-self: start; }
.ucc-owed { border-left-color: var(--amber); }
.ucc-cat { font-weight: 600; }
.ucc-said { color: var(--ink); }
.ucc-end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ucc-end-place { min-width: 16em; }
.arx-item { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; }
.arx-item .btn { justify-self: start; }
.arx-lines { margin: 0; padding-left: 1.4em; }
.arx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arx-chips .btn.is-on { border-color: var(--teal); color: var(--teal); }
.arx-given { display: grid; gap: 4px; padding-left: 6px; border-left: 2px solid var(--line); }
.arx-given-row.is-missing .arx-given-it { color: var(--amber); }
.arx-given-it { color: var(--dim); }
.ask-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* THE DOOR'S ITEMISED READ-BACK (#1219), and the centred dialog an imaging
   order is read back in (board Img2). A warning line is amber, said in words. */
.ask-changes { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 8px; }
.ask-change { color: var(--ink); font-size: 13px; line-height: 1.45; }
.ask-change.is-warn { color: var(--amber); font-weight: 600; }
.ask-veil { position: fixed; inset: 0; z-index: 60; background: rgba(5,10,11,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 150px 16px 16px; }
.ask-dialog { width: min(560px, 100%); max-height: calc(100vh - 170px); overflow: auto;
  background: var(--panel); border: 1px solid var(--teal); border-radius: var(--r);
  box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.ask-dialog-h { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--label);
  padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ask-dialog .ask-changes { margin: 10px 12px 4px; }
.ask-dialog .ask-q { margin: 6px 12px; color: var(--dim); font-size: 12px; }
.ask-dialog .file-auto { margin: 6px 12px; display: flex; gap: 8px; }
.ask-dialog .ask-acts { margin: 14px 12px; }
.ask-dialog .ask-acts .btn { min-height: var(--tap); }
/* 🔒 CONFIDENTIAL (12 October) -- the encounter's flag and the roads out.
   Prefix `cnf-`, grepped absent before it was claimed. Every word is the door's. */
.cnf-box { display: grid; gap: 8px; max-width: 46em; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; }
.cnf-box.is-on { border-left-color: var(--amber); }
.cnf-head { font-weight: 600; }
.cnf-top { display: flex; align-items: center; gap: 8px; }
.cnf-why { color: var(--amber-ink); }
.dk-body-off { display: grid; gap: 8px; justify-items: start; padding: 8px; }
.cnf-since { color: var(--dim); }
.cnf-roads { display: grid; gap: 6px; }
.cnf-road { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cnf-road-open { color: var(--amber); }
.cnf-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* ==== translation BEGIN — a translated note (console_translation, 18 October) ==== */
/* 🌐 TRANSLATED NOTE: each language's card -- where it stands, the draft, the
   translator's copy awaiting or approved, and the acts the door offers.
   Prefix `trn-`, grepped absent before it was claimed. Layout only: every word
   is the door's. No px font size, so the generated desktop type scale is
   untouched. */
.trn-lang { display: grid; gap: 8px; max-width: 52em; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; }
.trn-head { font-weight: 600; }
.trn-status { color: var(--dim); }
.trn-pre { white-space: pre-wrap; margin: 6px 0 0; font-family: inherit; }
.trn-withdrawn { color: var(--dim); text-decoration: line-through; }
.trn-acts { display: grid; gap: 10px; }
.trn-act { display: grid; gap: 6px; }
.trn-field { display: grid; gap: 4px; }
.trn-label { color: var(--dim); }
.trn-in { max-width: 46em; }
/* ==== translation END ==== */
/* ==== radiology BEGIN — the radiology door's screens (radiology.ts, fdradiology.ts, 19 October) ==== */
/* ── radiology: ask for a report, the report as received, its alerts ────────
   📡 on the doctor's encounter page, 🚨 on his top bar and the desk's tab.
   Prefix `rad-`, grepped absent before it was claimed. Layout and the state
   colours only: every word is the door's, every colour a token. Placed above
   the chat sections, never after the last chat marker, whose slice runs to
   EOF and would swallow it. Phone width holds: every grid shrinks to one
   column, every control is as wide as its column and no wider, and a long
   line (a viewer link, a reference) wraps rather than pushing the page. */
.rad-area, .rad-form, .rad-list, .rad-req, .rad-report, .rad-alert, .rad-desk {
  min-width: 0; overflow-wrap: anywhere; }
.rad-area { display: grid; gap: 14px; max-width: 52em; }
.rad-form { display: grid; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.rad-h { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.rad-grid { display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11em), 1fr)); }
.rad-field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.rad-label { color: var(--dim); }
.rad-in { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.rad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rad-who, .rad-second { display: grid; gap: 8px; min-width: 0; }
.rad-fallback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; }
.rad-fallback .rad-in.rad-fb-hours { width: 5.5em; }
.rad-fb-sub { flex: 1 1 12em; min-width: 0; }
.rad-priors { display: grid; gap: 4px; }
.rad-prior { display: flex; gap: 8px; align-items: baseline; }
.rad-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rad-acts .rad-in { flex: 1 1 12em; width: auto; }
.rad-readback { display: grid; gap: 6px; padding: 8px 10px; border-left: 3px solid var(--amber); }
.rad-rb-h { color: var(--amber-ink); }
.rad-rb-cross, .rad-rb-lines { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.rad-rb-cross dd, .rad-rb-lines dd { margin: 0; }
.rad-rb-cross dt, .rad-rb-lines dt { color: var(--dim); }
.rad-rb-who { font-weight: 600; }
.rad-rb-agree { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.rad-rb-agree dt { color: var(--dim); }
.rad-rb-agree dd { margin: 0; }
.rad-rb-agree dd.is-ok { color: var(--teal); }
.rad-rb-agree dd.is-no { color: var(--red-ink); font-weight: 600; }
.rad-list { display: grid; gap: 10px; }
.rad-req { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: 8px; }
.rad-req.is-failed, .rad-req.is-refused { border-left-color: var(--red); }
.rad-req.is-accepted, .rad-req.is-sent { border-left-color: var(--amber); }
.rad-req.is-reported, .rad-req.is-addended { border-left-color: var(--teal); }
.rad-req.is-cancelled { opacity: .7; }
.rad-req-head { font-weight: 600; }
.rad-state { color: var(--ink); }
.rad-by { color: var(--teal); }
.rad-due { color: var(--dim); }
.rad-due.is-overdue { color: var(--red-ink); font-weight: 600; }
.rad-cancelled { color: var(--dim); text-decoration: line-through; }
.rad-report { display: grid; gap: 6px; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; }
.rad-report-h { font-weight: 600; }
.rad-banner { padding: 6px 10px; border: 1px solid var(--amber); border-radius: 6px; color: var(--amber-ink); font-weight: 600; }
.rad-portal { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--teal); border-radius: 8px; }
.rad-view { justify-self: start; min-height: var(--tap); }
.rad-acc { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rad-copied { color: var(--dim); }
.rad-unlisted { color: var(--amber-ink); }
.rad-sec-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }
.rad-text { white-space: pre-wrap; }
.rad-summary, .rad-incidental { margin: 0; padding-left: 1.5em; display: grid; gap: 4px; }
.rad-inc-rec { color: var(--dim); }
.rad-images { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.rad-figure { margin: 0; display: grid; gap: 4px; min-width: 0; }
.rad-theatre { display: grid; gap: 8px; }
.rad-label.is-required::after { content: ' · required'; }
.nf { display: grid; gap: 4px; }
.nf-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* THE STANDARD FORM (Dr Lau, 2 Dec 2026: "make the design consistent ... use
   slim bullet buttons"). One look for every request form -- the radiology
   request, the Allied Health and GP referrals, the phone's referral card:
   every box the same face and frame, every button the slim one, the two
   note buttons slim bullets. Slim where a pointer hovers; a finger keeps its
   full target. */
.form-std textarea, .form-std select, .form-std input:not([type="checkbox"]):not([type="radio"]) { width: 100%; max-width: 100%; }
/* `form-face` is the same look for a form whose boxes keep their own widths
   (the therapy sheet, the surgery plan's rows, consent, the patient's mail,
   the insurer's answer); `form-std` also makes every box the row's width. */
:is(.form-std, .form-face) textarea, :is(.form-std, .form-face) select,
:is(.form-std, .form-face) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  box-sizing: border-box; min-width: 0; padding: 0.25rem 0.5625rem;
  border: 1px solid var(--rule); border-radius: 0.4375rem; background: var(--panel-2); color: var(--ink);
  font: inherit; font-size: 0.875rem; line-height: 1.35; }
.form-std textarea, .form-std select, .form-std input:not([type="checkbox"]):not([type="radio"]) { margin: 0; }
:is(.form-std, .form-face) textarea { resize: vertical; }
.form-std .alr-consent input[type="date"] { width: auto; }
:is(.form-std, .form-face) select, :is(.form-std, .form-face) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: var(--tap); }
:is(.form-std, .form-face) :is(textarea, select, input):focus-visible { outline: 0.125rem solid var(--teal); outline-offset: 0.0625rem; }
@media (hover: hover) and (pointer: fine) {
  :is(.form-std, .form-face) select, :is(.form-std, .form-face) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: 1.75rem; }
  .form-std select, .form-std input:not([type="checkbox"]):not([type="radio"]) { height: 1.75rem; }
  .form-std .btn, .form-std .gv-chip, .form-std .pr-pill { min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem;
    font-size: 0.8125rem; line-height: 1; border-radius: 0.875rem; }
  .form-face .btn, .form-face .gv-chip { min-height: 1.75rem; padding: 0.1875rem 0.625rem; font-size: 0.8125rem; line-height: 1.2; border-radius: 0.875rem; }
}
.nf-say { color: var(--dim); }
.nf-say:empty { display: none; }
.rad-form-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rad-clin { display: grid; gap: 6px; }
.rad-clin-say { color: var(--dim); }
.rad-clin-say:empty { display: none; }
.rad-wide { grid-column: 1 / -1; min-width: 0; }
.rad-wide select { width: 100%; }
.rad-theatre-tick { display: flex; gap: 8px; align-items: center; min-height: var(--tap); }
.rad-imageset { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; }
.rad-imageset-h { font-weight: 600; }
.rad-img-hold { min-height: 6em; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 6px; color: var(--dim); }
.rad-img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.rad-caption { color: var(--dim); }
.rad-point { color: var(--teal); }
.rad-addendum { display: grid; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--amber); }
.rad-add-h { font-weight: 600; }
.rad-alerts, .rad-desk { display: grid; gap: 10px; }
.rad-alert { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--red);
  border-left: 4px solid var(--red); border-radius: 8px; }
.rad-alert.is-overdue { border-color: var(--red-ink); }
.rad-alert.is-acked { border-color: var(--line); opacity: .85; }
.rad-alert-h { font-weight: 600; color: var(--red-ink); }
.rad-alert.is-acked .rad-alert-h { color: var(--dim); }
.rad-alert-who { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rad-alert-name { font-weight: 600; color: var(--ink); }
.rad-alert-key { font-size: 11px; color: var(--teal); letter-spacing: .04em; }
.rad-alert-study { color: var(--dim); }
.rad-finding { color: var(--ink); }
.rad-finding.is-withheld { color: var(--dim); font-style: italic; }
.rad-action { color: var(--amber-ink); }
.rad-lines { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rad-tel { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; min-height: var(--tap);
  color: var(--teal); text-decoration: none; }
.rad-tel:hover, .rad-tel:focus-visible { text-decoration: underline; }
.rad-tel-who { color: var(--dim); }
.rad-acked { color: var(--teal); }
.rad-none { color: var(--dim); }
.rad-pill { cursor: pointer; font: inherit; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.rad-pill:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.rad-pill-n { font-weight: 600; margin-left: 4px; }
.ut-card.rad-card { width: min(640px, 100%); }
.rad-plane-body { overflow: auto; display: grid; gap: 10px; align-content: start; }
.rad-done { display: grid; gap: 8px; margin-top: 6px; }
.rad-cancel { margin-top: 4px; }
.rad-viewer-link { color: var(--teal); }
/* Studies a radiographer or a sonographer shared (20 October): on the doctor's
   area, newest first, each image a button that enlarges it over the page;
   held ones on the desk's tab, linked to a folder by its key. */
.rad-studies, .rad-study, .rad-held-box, .rad-held-row, .rad-link { min-width: 0; overflow-wrap: anywhere; }
.rad-studies { display: grid; gap: 10px; }
.rad-study { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: 8px; }
.rad-study.is-unseen { border-left-color: var(--teal); }
.rad-study-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rad-study-line { font-weight: 600; }
.rad-unseen { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--teal); }
.rad-study-when, .rad-study-by, .rad-study-acc { color: var(--dim); }
.rad-study-note { white-space: pre-wrap; }
.rad-images.rad-shots { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); }
.rad-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
.rad-thumb .rad-img { width: 100%; height: 7.5em; object-fit: cover; }
.rad-thumb:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ut-card.rad-shot-card { width: min(960px, 100%); }
.rad-shot-body { overflow: auto; display: grid; place-items: center; }
.rad-shot-big { display: block; max-width: 100%; max-height: 80vh; height: auto; }
.rad-held-box { display: grid; gap: 8px; margin-top: 10px; }
.rad-held { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* the desk's row is a flex line; a held study stacks, so its read-back has the width */
.fd-wk-task.rad-held-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rad-held-by { color: var(--dim); }
.rad-link { display: grid; gap: 6px; }
.rad-link .rad-link-key { flex: 1 1 10em; width: auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
/* ==== radiology END — the radiology door's screens ==== */
/* ==== partners BEGIN — the front desk's Partners card (fdpartners.ts, 26 November) ==== */
.fpt { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.fpt-bar { display: flex; align-items: center; gap: 4px; }
.fpt-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
.fpt-tab, .fpt-btn, .fpt-help { min-height: 26px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 13px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12px; line-height: 1.2; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; }
.fpt-tab.is-on { border-color: var(--teal); color: var(--teal); }
.fpt-help { width: 26px; padding: 0; justify-content: center; border-color: var(--teal); color: var(--teal); font-weight: 600; flex: 0 0 auto; }
.fpt-btn { flex: 0 0 auto; }
.fpt-n { min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--red-solid); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.fpt-n.is-q { background: transparent; color: var(--dim); border: 1px solid var(--rule); }
.fpt-help-note { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; font-size: 12px; color: var(--dim); }
.fpt-help-l + .fpt-help-l { margin-top: 4px; }
.fpt-body { display: flex; flex-direction: column; gap: 4px; overflow: auto; min-height: 0; }
.fpt-row { padding: 4px 6px; border-bottom: 1px solid var(--rule); }
.fpt-l1 { display: flex; align-items: center; gap: 6px; }
.fpt-lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); flex: 0 0 auto; }
.fpt-row.is-waiting .fpt-lamp { background: var(--amber); }
.fpt-who { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.fpt-when { color: var(--dim); font-size: 11px; flex: 0 0 auto; }
.fpt-l2 { color: var(--dim); font-size: 12px; padding-left: 14px; }
.fpt-none, .fpt-note { color: var(--dim); font-size: 12px; margin: 4px 0; }
.fpt-open { align-self: flex-start; margin-top: 4px; }
@media (hover: none) { .fpt-tab, .fpt-btn, .fpt-help { min-height: var(--tap, 44px); } .fpt-help { width: var(--tap, 44px); } }
.fpt-do { margin-top: 6px; }
.fpt-act { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hush); }
.far { display: flex; flex-direction: column; gap: 6px; }
.far-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.far-f { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; min-width: 0; font-size: 12px; }
.far-l { font-size: 11px; color: var(--dim); }
.far-in { min-height: 26px; padding: 2px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 12px; }
.far-send { align-self: flex-start; }
@media (hover: none) { .far-in { min-height: 44px; } }
.fpt-qbtn { align-self: flex-start; }
.fpt-rowq { flex: 0 0 auto; min-height: 22px; padding: 0 6px; }
.fpt-q { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--rule); border-radius: 8px; }
.fpt-in { width: 100%; box-sizing: border-box; min-height: 26px; padding: 2px 6px; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.fpt-words { resize: vertical; min-height: 64px; }
.fpt-q-acts { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fpt-urgent { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--dim); }
.fpt-sent { margin-top: 6px; }
.fpt-sent-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 2px 6px; }
.fpt-row.is-no .fpt-l2 { color: var(--red); }
@media (hover: none) { .fpt-tab, .fpt-btn, .fpt-help, .fpt-in { min-height: var(--tap, 44px); } .fpt-help { width: var(--tap, 44px); } }
/* ==== partners END ==== */
/* ==== queue BEGIN — the front desk's Queue tab (fdqueue.ts, 21 October) ==== */
/* ── 🎫 THE QUEUE TAB (21 October 2026; reference/QUEUE_SERVICE.md §5,
   app/fdqueue.ts) ──────────────────────────────────────────────────────
   The front desk's whole queue: who is in with the doctor, the line in
   order with each patient's expected time, who is out of the room, and the
   pace, the settings, the waiting-room screens and the export folded under
   it. Every class is the `qd-` prefix (unused anywhere else when this was
   written); the buttons are `.btn .btn-small`, and the read-back line is
   asktwice's own `.ask-line`, restyled only INSIDE `.qd` -- its question
   keeps the door's line breaks, because a settings read-back is one line per
   setting. Tokens only, so the day theme follows by itself. A queue per
   doctor (Q-D7) adds whom each patient waits for (`qd-for`), the Assign
   control on a row in line, and the sharing's select in the settings. */
.qd { display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--ink); }
.qd-off { padding: 12px 0; line-height: 1.5; color: var(--dim); }
.qd-status { font-size: 12px; line-height: 1.45; color: var(--dim); }
.qd-status:empty { display: none; }
.qd-status.is-ok { color: var(--teal); }
.qd-status.is-no { color: var(--red-ink); }
.qd .ask-q { white-space: pre-line; }

.qd-head { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); }
.qd-head-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qd-place { font-family: var(--display); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-clock { font-family: var(--mono); font-size: 15px; color: var(--dim); }
.qd-doc { font-size: 12.5px; color: var(--teal); }
.qd-doc.is-out, .qd-doc.is-away { color: var(--amber-ink); }
.qd-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.qd-fact { white-space: nowrap; }
.qd-walkin { color: var(--ink-2); }
.qd-done { color: var(--dim); }

.qd-sect { display: flex; flex-direction: column; gap: 6px; }
.qd-seeing .qd-tkt { color: var(--teal); }
.qd-inline .qd-row:first-child { border-color: var(--teal); }
.qd-away .qd-row { background: var(--panel-2); }
.qd-h { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--label); }
.qd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qd-line, .qd-hold, .qd-screens { min-width: 0; }
.qd-empty { padding: 4px 0; font-size: 12px; color: var(--dim); }

.qd-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 10px; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.qd-row.is-pinned { border-color: var(--amber); }
.qd-in { border-color: var(--teal); }
.qd-tkt { grid-row: 1 / span 2; font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.qd-pin { display: block; font-size: 13px; }
.qd-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qd-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.qd-sub { font-size: 12px; color: var(--ink-2); }
.qd-times { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.qd-eta { font-size: 12.5px; color: var(--teal); }
.qd-for { font-size: 12.5px; color: var(--ink-2); }
.qd-marks, .qd-flags { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.qd-mark { font-size: 11.5px; color: var(--dim); }
.qd-app { color: var(--teal-2); }
.qd-noapp { color: var(--amber-ink); }
.qd-flag { font-size: 11.5px; line-height: 1.35; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--amber); color: var(--amber-ink); background: var(--sunk); }
.qd-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.qd-next, .qd-up, .qd-down, .qd-auto { min-width: 34px; }
.qd-ring { border-color: var(--teal); color: var(--teal); }
.qd-stepout, .qd-back { color: var(--ink-2); }
.qd-assign { display: flex; flex: 1 1 200px; min-width: 0; }
.qd-assign-pick { flex: 1 1 auto; min-width: 0; max-width: 100%; min-height: 32px; padding: 4px 8px; font-size: 12.5px;
  color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.qd-assign-go { flex: none; }
.qd-row .ask-line { grid-column: 1 / -1; }
.qd-row .ask-line:empty { display: none; }

.qd-fold { padding: 4px 10px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r); }
.qd-fold > summary { padding: 6px 0; cursor: pointer; }
.qd-pace { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
.qd-pace-row { font-size: 12.5px; color: var(--ink-2); }

.qd-settings { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.qd-set { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.qd-set-l { flex: 1 1 auto; min-width: 0; }
.qd-set-choice { flex-wrap: wrap; }
.qd-set-pick { flex: 1 1 240px; min-width: 0; max-width: 100%; min-height: 32px; padding: 4px 8px; font-size: 12.5px;
  color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.qd-set-num { width: 72px; min-height: 32px; padding: 4px 8px; font-family: var(--mono); font-size: 13px;
  color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.qd-set-check { width: 18px; height: 18px; accent-color: var(--teal); }
.qd-set-b { min-width: 44px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.qd-save { align-self: flex-start; }

.qd-displays { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.qd-screen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0;
  border-bottom: 1px solid var(--line-soft); }
.qd-screen-l { font-weight: 600; }
.qd-screen-s { flex: 1 1 auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.qd-screen .ask-line { flex: 1 1 100%; }
.qd-screen .ask-line:empty { display: none; }
.qd-revoke { margin-left: auto; }
.qd-mint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qd-mint-label, .qd-export-day { min-height: 32px; padding: 4px 8px; font-size: 13px; color: var(--ink);
  background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.qd-mint-label { flex: 1 1 160px; min-width: 0; }
.qd-mint-go, .qd-export-go { flex: none; }
.qd-mint .ask-line, .qd-mint-slot { flex: 1 1 100%; }
.qd-minted { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--sunk);
  border: 1px solid var(--amber); border-radius: var(--r); }
.qd-minted-t { font-size: 12.5px; color: var(--amber-ink); }
.qd-copy { display: flex; gap: 6px; }
.qd-copy-field { flex: 1 1 auto; min-width: 0; min-height: 32px; padding: 4px 8px; font-family: var(--mono);
  font-size: 12px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.qd-minted-url, .qd-minted-cmd { text-overflow: ellipsis; }
.qd-copy-go { flex: none; }
.qd-minted-done { align-self: flex-start; }

.qd-export { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 8px; }
.qd-export .ask-line { flex: 1 1 100%; }
.qd-notes { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; color: var(--dim); }
/* ==== queue END — the front desk's Queue tab ==== */
/* ==== leads BEGIN — the front desk's Leads tab and Reports (leads.ts, 22 October) ==== */
/* ── 🎯 THE LEADS TAB AND ITS REPORTS (22 October 2026; app/leads.ts, the
   door console_leads.py) ──────────────────────────────────────────────────
   Website call tracking on the front desk: the leads in a period (a strip
   by status, the tiles, the period / status / source chips, the "not called
   back yet" banner, the search, the table) and -- for a sign-in that may
   read bills -- the Reports beside it. Every class is the `ld-` prefix
   (unused anywhere else when this was written); the buttons are `.btn
   .btn-small`, and the read-back line is asktwice's own `.ask-line`,
   restyled only INSIDE `.ld` -- its question keeps the door's line breaks,
   because a link's read-back is one line per fact. Tokens only, so the day
   theme follows by itself. The table scrolls sideways inside its own box
   when the panel is narrower than its columns; the page never does. */
.ld { display: flex; flex-direction: column; gap: 10px; min-width: 0; font-size: 13px; color: var(--ink); }
.ld-off { padding: 12px 0; line-height: 1.5; color: var(--dim); }
.ld-screen { padding-bottom: 8px; }
.ld .ask-q { white-space: pre-line; }
.ld .ask-line:empty { display: none; }
.ld-status { font-size: 12px; line-height: 1.45; color: var(--dim); }
.ld-status:empty { display: none; }
.ld-status.is-ok { color: var(--teal); }
.ld-status.is-no { color: var(--red-ink); }

/* the two views */
.ld-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.ld-tab { min-height: var(--tap); padding: 0 16px; font-family: var(--display); font-size: 14px; font-weight: 600;
  color: var(--dim); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.ld-tab.is-on { color: var(--teal); border-bottom-color: var(--teal); }
.ld-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* the period said */
.ld-period { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ld-period-l { font-family: var(--display); font-size: 15px; font-weight: 600; }
.ld-period-d { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.ld-period-cut { flex: 1 1 100%; font-size: 12px; color: var(--amber-ink); }

/* the strip: the period's leads by status, each part as wide as its count */
.ld-progress { display: flex; gap: 2px; min-height: 22px; border-radius: 999px; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line-soft); }
.ld-progress.is-empty { min-height: 8px; }
.ld-seg { flex: 1 1 0; min-width: 0; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--rule); }
.ld-seg.is-new { background: var(--amber); }
.ld-seg.is-qualified { background: var(--teal-2); }
.ld-seg.is-closed { background: var(--teal); }
.ld-seg.is-lost { background: var(--hush); color: var(--ink); }

/* the tiles */
.ld-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ld-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); }
.ld-tile.is-lead { border-color: var(--teal); }
.ld-tile.is-lead .ld-tile-v { color: var(--teal); }
.ld-tile-k { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--label); }
.ld-tile-v { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.ld-tile-u { font-size: 12px; color: var(--dim); }

/* the filter card: period, status and source chips */
.ld-filters { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--panel-2);
  border: 1px solid var(--line-soft); border-radius: var(--r); }
.ld-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ld-flabel { min-width: 64px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--label); }
.ld-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ld-periods, .ld-statuses, .ld-sources, .ld-groups { flex: 1 1 260px; }
.ld-sorts, .ld-pers { flex: 0 1 auto; }
.ld-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px;
  font-size: 12.5px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; }
.ld-chip:hover { background: var(--panel-hover); }
.ld-chip.is-on { color: var(--teal); background: var(--selected-bg); border-color: var(--teal); }
.ld-chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ld-chip-l { white-space: nowrap; }
.ld-chip-n { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.ld-chip.is-on .ld-chip-n { color: var(--teal-2); }

/* a custom span: two days and Apply, the door's refusal beside them */
.ld-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ld-from, .ld-to { min-height: var(--tap); padding: 4px 8px; font-size: 13px; color: var(--ink); background: var(--sunk);
  border: 1px solid var(--line); border-radius: 6px; }
.ld-custom-to { font-size: 12px; color: var(--dim); }
.ld-custom-said { flex: 1 1 100%; font-size: 12px; color: var(--red-ink); }
.ld-custom-said:empty { display: none; }

/* the banner: people who left their details and are still waiting */
.ld-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px;
  color: var(--amber-ink); background: var(--sunk); border: 1px solid var(--amber); border-left-width: 4px;
  border-radius: var(--r); }
.ld-waiting-t { flex: 1 1 220px; font-size: 13px; font-weight: 600; }

/* the search, and the line above the table */
.ld-search { display: flex; gap: 6px; }
.ld-q, .ld-link-key, .ld-note-input { flex: 1 1 auto; min-width: 0; min-height: var(--tap); padding: 4px 10px;
  font-size: 13px; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.ld-q-go, .ld-custom-go, .ld-waiting-go, .ld-link-go, .ld-link-cancel, .ld-note-save, .ld-note-cancel,
.ld-prev, .ld-next, .ld-csv-go, .ld-expect-go, .ld-expected-clear, .ld-suggest-close,
.ld-cand-link, .ld-cand-book { flex: none; }
.ld-listbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.ld-showing { flex: 1 1 200px; font-size: 12.5px; color: var(--ink-2); }
.ld-pager { display: flex; align-items: center; gap: 6px; }
.ld-pageof { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

/* the table, scrolled sideways inside its own box */
.ld-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--panel); }
.ld-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.ld-report .ld-table { min-width: 620px; }
.ld-table th { position: sticky; top: 0; padding: 8px 10px; text-align: left; font-family: var(--mono); font-size: 11px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--label); background: var(--panel-2);
  border-bottom: 1px solid var(--line); }
.ld-table td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.ld-col-lead { min-width: 170px; }
.ld-col-att { min-width: 160px; }
.ld-col-status { min-width: 120px; }
.ld-col-value, .ld-col-date { white-space: nowrap; }
.ld-col-acts { min-width: 170px; }
.ld-col-note { min-width: 160px; }
.ld-col-group { min-width: 160px; }
.ld-col-n { text-align: right; white-space: nowrap; }
.ld-row:hover { background: var(--panel-hover); }

/* LEAD */
.ld-lead { min-width: 0; }
.ld-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ld-phone { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.ld-email { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.ld-ref { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.ld-marks { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; }
.ld-mark { font-size: 11.5px; color: var(--dim); }
.ld-returning { color: var(--teal-2); }
.ld-clicks { color: var(--amber-ink); }

/* ATTRIBUTION: a small-caps label over its value, four deep */
.ld-attribution { min-width: 0; }
.ld-att { display: flex; flex-direction: column; margin-bottom: 4px; }
.ld-att-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ld-att-v { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.ld-gclick { font-size: 11.5px; color: var(--teal-2); }

/* STATUS */
.ld-state { min-width: 0; }
.ld-pill { display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 600; line-height: 1.5; border-radius: 999px;
  color: var(--dim); background: var(--sunk); border: 1px solid var(--line); }
.ld-pill.is-new { color: var(--amber-ink); border-color: var(--amber); }
.ld-pill.is-qualified { color: var(--teal-2); border-color: var(--teal-2); }
.ld-pill.is-closed { color: var(--teal); border-color: var(--teal); }
.ld-pill.is-lost { color: var(--dim); border-color: var(--hush); }
.ld-chan { margin-top: 3px; font-size: 12px; color: var(--ink-2); }
.ld-patient { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--teal); overflow-wrap: anywhere; }
/* the number in a span of its own, so it drags (FORM-1, 2 Dec) */
.ld-patient-name { color: inherit; }
.ld-patient-key { white-space: nowrap; }
.ld-visited { font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* VALUE and DATE */
.ld-value { font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ld-unpriced { font-family: var(--display); font-size: 11.5px; font-weight: 400; color: var(--amber-ink); }
.ld-date { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }

/* ACTIONS, and the link box under them */
.ld-acts { min-width: 0; }
.ld-act-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-act { white-space: nowrap; }
.ld-link-slot:empty { display: none; }
.ld-link { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* WHO IT WAS FOR, HOW IT MATCHED, WHAT IT WAS BOOKED UNDER (22 Oct: "caller
   may not be the patient"). The words carry the meaning; colour only
   repeats them. */
.ld-for { color: var(--ink-2); }
.ld-matched { margin-top: 3px; font-size: 11.5px; color: var(--teal-2); }
.ld-expected-slot:empty { display: none; }
.ld-expected-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.ld-expected { font-size: 11.5px; color: var(--amber-ink); overflow-wrap: anywhere; }
.ld-expected-name { color: var(--ink-2); }
.ld-expect { align-items: center; }
.ld-expect-key { text-transform: uppercase; }
.ld-act.ld-suggest { font-weight: 600; }

/* SUGGEST A MATCH: one card per patient weighed, the verdict in words first */
.ld-suggest-box { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--sunk); display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.ld-suggest-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ld-suggest-title { font-size: 12.5px; font-weight: 600; }
.ld-suggest-for, .ld-suggest-said { font-size: 11.5px; color: var(--dim); }
.ld-suggest-said.is-no { color: var(--red-ink); }
.ld-cand { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.ld-cand.is-likely { border-color: var(--teal-2); }
.ld-cand.is-possible { border-color: var(--amber); }
.ld-cand-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ld-cand-verdict { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.ld-cand-verdict.is-likely { color: var(--teal-2); }
.ld-cand-verdict.is-possible { color: var(--amber-ink); }
.ld-cand-who { font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.ld-cand-meta { font-size: 11.5px; color: var(--dim); }
.ld-cand-facts { margin: 4px 0 0; padding-left: 18px; font-size: 11.5px; color: var(--ink-2); }
.ld-cand-why { margin-top: 4px; font-size: 11.5px; color: var(--dim); font-style: italic; }
.ld-cand-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* NOTE */
.ld-note { min-width: 0; }
.ld-note-text { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; margin-bottom: 4px; }
.ld-note-open { align-self: flex-start; }
.ld-note-edit { display: flex; flex-wrap: wrap; gap: 6px; }

.ld-empty-row:hover { background: transparent; }
.ld-empty { padding: 14px 10px; font-size: 12.5px; color: var(--dim); }
.ld-how { font-size: 12px; line-height: 1.5; color: var(--dim); }

/* the Reports */
.ld-report .ld-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ld-rhead { font-size: 13px; color: var(--ink-2); }
.ld-rrow:hover { background: var(--panel-hover); }
.ld-rlabel { font-weight: 600; overflow-wrap: anywhere; }
.ld-rn { text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.ld-rate { color: var(--ink-2); }
.ld-rev { color: var(--dim); }
.ld-rev.is-earned { color: var(--teal); font-weight: 700; }
.ld-rfoot { font-size: 12px; color: var(--dim); }
.ld-export { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* Over every visit, until discharge, and the keywords that funnel (22 Oct,
   his second instruction): the episode line under a lead's value, the
   episode cell's sub-line, and the three graphs. The graphs are inline SVG
   drawn by leads.ts; their colours are the theme's tokens, set inline, so
   these rules only lay the boxes out. */
.ld-journey { font-family: var(--display); font-size: 11.5px; font-weight: 400; color: var(--dim); }
.ld-episode .ld-sub { font-size: 11px; color: var(--dim); white-space: nowrap; }
.ld-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin: 4px 0 12px; }
.ld-graph { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); min-width: 0; }
.ld-graph svg { display: block; width: 100%; height: auto; }
.ld-graph-t { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ld-graph-w { font-size: 11.5px; line-height: 1.45; color: var(--dim); margin-top: 6px; }
.ld-graph-none { font-size: 12px; color: var(--dim); padding: 8px 2px; }
.ld-graph-spend { grid-column: 1 / -1; }
.ld-graph-funnel, .ld-graph-months { align-self: start; }
.ld-funnel, .ld-spend, .ld-months { overflow: visible; font-family: var(--display); }
.ld-funnel-row rect { shape-rendering: crispEdges; }
.ld-spend-line path { vector-effect: non-scaling-stroke; }

/* Registration candidates are evidence for staff review, never identity decisions. */
.ld-registration-review { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; min-width: 220px; }
.ld-registration-candidate { padding: 10px 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.ld-registration-candidate p { margin: 6px 0 10px; }
.ld-registration-candidate button { min-height: 44px; }

.ld-registration-key { font-family: var(--mono); font-size: 12px; white-space: nowrap; margin-top: 4px; }
/* ==== leads END — the front desk's Leads tab ==== */
/* ==== inpatient BEGIN — the inpatient episode (inpatient.ts, inpatientacts.ts; 31 October) ==== */
/* ─── THE INPATIENT EPISODE (app/inpatient.ts) ───────────────────────────
   Dr Lau, 31 October 2026: "docapp construct epic per entry style - pls an
   overall view of the episodes for better visualization for inpatient".
   reference/INPATIENT_EPISODE_VIEW.md.

   EVERY COLOUR IS A TOKEN, so the day theme ([data-theme="day"]) needs no
   rule of its own: the tokens flip and these follow. Colour is never the
   only cue -- the arrows, shapes, dashes, strikes and words are the
   module's, and the rules here only make them legible.

   THE PAGE NEVER SCROLLS SIDEWAYS. The timeline box scrolls inside itself
   (`.ip-tl`), its label column sticky at the left so a lane's name stays
   beside its marks; a lane's sentence (`.ip-lsaid`) is sticky too and as
   wide as the box's VISIBLE width (a container unit, with a fallback), so it
   wraps where it can be read. The flowsheet scrolls inside its own box with
   the parameter column sticky. Header chips wrap. */

.ip-screen { --ip-lw: 96px; display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 100%; color: var(--ink); }
.ip-head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ip-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ip-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; flex: 1 1 auto; min-width: 0; }
.ip-name { margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.ip-num { font-family: var(--mono); font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }

.ip-btn { min-height: var(--tap); padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ip-btn:focus-visible, .ip-prow:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ip-order { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.ip-d-open, .ip-d-answer { border-color: var(--teal); color: var(--teal); }

/* the Storyboard: the allergy on a line of its own, first */
.ip-story { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ip-allergy { flex: 1 1 100%; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: var(--r); border: 2px solid var(--red); background: var(--panel); color: var(--red-ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ip-al { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.ip-allergy.ip-a-none { border-style: dashed; border-color: var(--amber); color: var(--amber-ink); }
.ip-chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; max-width: 100%; box-sizing: border-box; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 12px; overflow-wrap: anywhere; }
.ip-chip-l { color: var(--dim); }
.ip-chip-w { color: var(--ink); }
.ip-chip.ip-alert { border: 2px solid var(--red); color: var(--red-ink); }
.ip-chip.ip-warn { border: 2px dashed var(--amber); color: var(--amber-ink); }
.ip-cmk { font-weight: 700; }

/* the zoom and the flowsheet's switch */
.ip-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ip-zooms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ip-tools-l { font-size: 12px; color: var(--dim); }
.ip-zoom[aria-pressed="true"], .ip-flowbtn[aria-pressed="true"] { background: var(--selected-bg); border-color: var(--teal); font-weight: 600; }
.ip-zoom[aria-pressed="true"]::before, .ip-flowbtn[aria-pressed="true"]::before { content: "● "; }

.ip-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.ip-views { min-width: 0; }

/* the timeline: one box that scrolls inside itself */
.ip-tl { max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; container-type: inline-size; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); -webkit-overflow-scrolling: touch; }
.ip-row { display: flex; width: max-content; }
.ip-lab { position: sticky; left: 0; z-index: 2; flex: none; box-sizing: border-box; width: var(--ip-lw); padding: 3px 6px; display: flex; flex-direction: column; justify-content: center; gap: 1px; background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; }
.ip-lab-t { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.ip-lab-s { font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
.ip-lab-x { font-size: 11px; color: var(--faint); font-family: var(--mono); overflow-wrap: anywhere; }
.ip-ltitle .ip-lab-t { font-weight: 600; color: var(--label); }
.ip-lane { border-top: 1px solid var(--line-soft); }
.ip-lsaid { position: sticky; left: 0; box-sizing: border-box; width: min(100%, 92vw); width: 100cqw; padding: 4px 8px 6px; font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.ip-unknown { color: var(--amber-ink); }

.ip-strip { display: block; flex: none; }
.ip-band-0 { fill: var(--panel); }
.ip-band-1 { fill: var(--sunk); }
.ip-mid { stroke: var(--line); stroke-width: 1; }
.ip-now { stroke: var(--teal); stroke-width: 1; stroke-dasharray: 3 3; }
.ip-tick { stroke: var(--line-soft); stroke-width: 1; }
.ip-dl { fill: var(--ink-2); font-size: 11px; font-family: var(--display); }
.ip-hl { fill: var(--faint); font-size: 10px; font-family: var(--mono); }
.ip-hl-now { fill: var(--teal); }

/* a mark: every one is a button */
.ip-mk { cursor: pointer; }
.ip-mk:focus { outline: none; }
.ip-mk:focus-visible > :first-child, .ip-mk.ip-on > :first-child { stroke: var(--ink); stroke-width: 2.5; }
.ip-bar { fill: var(--selected-bg); stroke: var(--teal); stroke-width: 1; }
.ip-bar-t { fill: var(--ink); font-size: 11px; }
.ip-clipmk { fill: var(--dim); font-size: 12px; }
.ip-run-mark { fill: var(--teal); }
.ip-strike { stroke: var(--ink-2); stroke-width: 1.5; }
.ip-f-withdrawn .ip-bar, .ip-f-withdrawn .ip-ev, .ip-f-withdrawn .ip-given, .ip-f-withdrawn .ip-held, .ip-f-withdrawn .ip-other, .ip-f-withdrawn .ip-pt { fill-opacity: .35; stroke-dasharray: 3 2; }
.ip-f-withdrawn .ip-refused { stroke-dasharray: 3 2; }
.ip-ev { fill: var(--amber); stroke: var(--panel); stroke-width: 1; }
.ip-fmk { fill: var(--amber-ink); font-size: 11px; font-weight: 700; }
.ip-given { fill: var(--teal); }
.ip-held { fill: none; stroke: var(--amber); stroke-width: 2; }
.ip-refused { fill: none; stroke: var(--red); stroke-width: 2.2; }
.ip-other { fill: var(--dim); }

/* the series: the clinic's range shaded, the exact value beside each point */
.ip-range { fill: var(--teal); fill-opacity: .14; }
.ip-line { fill: none; stroke: var(--map-numb); stroke-width: 1.5; }
.ip-pt { fill: var(--map-numb); }
.ip-f-high .ip-pt, .ip-f-low .ip-pt { fill: var(--red); }
.ip-v { fill: var(--ink); font-size: 10px; font-family: var(--mono); }
.ip-arrow { fill: var(--red-ink); font-size: 12px; font-weight: 700; }
.ip-none { fill: var(--faint); color: var(--faint); font-size: 12px; }

/* NEWS2 (31 Oct): a box per set, the band its only colour, and "n/s" for a
   set with a reading missing -- never an alarm. */
.ip-score-box { fill: var(--panel-2); stroke: var(--line); stroke-width: 1; }
.ip-score-t { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: var(--mono); }
.ip-band-low-medium .ip-score-box, .ip-band-medium .ip-score-box { stroke: var(--amber); stroke-width: 2; }
.ip-band-high .ip-score-box { stroke: var(--red); stroke-width: 2.4; }
.ip-score-ns .ip-score-box { stroke: var(--amber); stroke-dasharray: 3 2; fill: none; }
.ip-score-ns .ip-score-t, .ip-score-wd .ip-score-t { fill: var(--faint); font-size: 10px; }
td.ip-band-medium, td.ip-band-low-medium { color: var(--amber-ink); font-weight: 700; }
td.ip-band-high { color: var(--red-ink); font-weight: 700; }
/* THE EXPECTED STAY: the middle half of the clinic's past stays, its median. */
.ip-expect-bar { fill: var(--map-numb); fill-opacity: .16; stroke: var(--map-numb); stroke-dasharray: 4 3; }
.ip-expect-med { stroke: var(--map-numb); stroke-width: 2; }
.ip-expect-ahead .ip-expect-bar { fill-opacity: .08; }
/* THE PANELS: the discharge checklist and the balance against weight. */
.ip-panels { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.ip-panel { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
.ip-panel-h { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ip-panel-w { margin: 0 0 6px; font-size: 13px; color: var(--ink); }
.ip-panel-rows { list-style: none; margin: 0; padding: 0; }
.ip-prow { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ip-prow:last-child { border-bottom: 0; }
.ip-prow-s { width: 16px; flex: none; text-align: center; font-weight: 700; }
.ip-prow-b { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.ip-prow-l { color: var(--ink); }
.ip-prow-x { color: var(--dim); font-size: 12px; }
.ip-tone-ok .ip-prow-s { color: var(--teal); }
.ip-tone-bad .ip-prow-s { color: var(--red-ink); }
.ip-tone-unknown .ip-prow-s { color: var(--amber-ink); }
.ip-panel-f { margin: 6px 0 0; font-size: 12px; color: var(--faint); }

/* the fluid days */
.ip-dcell { fill: transparent; stroke: var(--line-soft); stroke-dasharray: 2 3; }
.ip-in { fill: var(--teal); }
.ip-out { fill: var(--map-numb); }
.ip-nc { fill: none; stroke: var(--amber); stroke-dasharray: 3 2; }
.ip-zero { stroke: var(--line); stroke-width: 1; }
.ip-dv { fill: var(--dim); font-size: 10px; font-family: var(--mono); }
.ip-bal { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--mono); }
.ip-dwords { fill: var(--amber-ink); font-size: 11px; }
.ip-dlabel { fill: var(--faint); font-size: 10px; }
.ip-cum { fill: none; stroke: var(--teal-2); stroke-width: 1.5; }
.ip-cpt { fill: var(--teal-2); }
.ip-gap { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 2 2; }

/* the entry, opened */
.ip-detail { box-sizing: border-box; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow-wrap: anywhere; }
.ip-hint { margin: 0; color: var(--faint); font-size: 12px; }
.ip-d-title { margin: 0 0 4px; font-size: 15px; }
.ip-d-when { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ip-d-flag { margin-top: 4px; font-weight: 600; color: var(--amber-ink); }
.ip-d-line { margin-top: 4px; font-size: 13px; white-space: pre-wrap; }
.ip-d-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* the flowsheet */
.ip-flow { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ip-fs-h { margin: 0; font-size: 13px; color: var(--label); }
.ip-fsbox { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.ip-fs { border-collapse: collapse; font-size: 12px; }
.ip-fs th, .ip-fs td { padding: 4px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.ip-fs .ip-fs-p { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--panel); }
.ip-fs-d, .ip-fs-t { display: block; }
.ip-fs-t, .ip-fs-u { font-family: var(--mono); color: var(--dim); }
.ip-fs-n { font-family: var(--mono); }
.ip-fs-flag { color: var(--red-ink); font-weight: 700; }
.ip-fs-wd { text-decoration: line-through; color: var(--faint); }
.ip-fs-more { margin: 0; font-size: 12px; color: var(--dim); }

.ip-said { margin: 0; padding-left: 18px; font-size: 12px; color: var(--dim); }

/* the ward list */
.ip-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.ip-list-h { margin: 0; font-size: 16px; }
.ip-prow { display: flex; flex-direction: column; gap: 3px; box-sizing: border-box; width: 100%; min-height: var(--tap); padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); font: inherit; overflow-wrap: anywhere; }
button.ip-prow { cursor: pointer; }
.ip-pwho { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ip-pname { font-weight: 600; }
.ip-pnum { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ip-pall { color: var(--red-ink); font-weight: 600; }
.ip-pall.ip-a-none { color: var(--amber-ink); font-weight: 400; }
.ip-pmeta { font-size: 12px; color: var(--dim); }
.ip-pflags { display: flex; flex-wrap: wrap; gap: 4px; }
.ip-pflag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; }

@media (min-width: 1100px) {
  .ip-screen { --ip-lw: 168px; }
  .ip-main { grid-template-columns: minmax(0, 1fr) 340px; }
  .ip-detail { position: sticky; top: 8px; align-self: start; }
}
/* ── 31 October: blood pressure as one strip, and the medication groups.
   The diastolic half is DASHED, so the two lines differ by more than colour;
   its range band is fainter so the two bands can overlap and still read. */
.ip-line2 { stroke-dasharray: 5 3; }
.ip-pt2 { fill: var(--panel); stroke: var(--map-numb); stroke-width: 1.5; }
.ip-range2 { opacity: 0.55; }
.ip-r-group .ip-lab-t { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.ip-gstrip { opacity: 0.6; }
.ip-fs-sep { color: var(--dim); padding: 0 1px; }
/* ── the doctor's acts on the episode (inpatientacts.ts): the drip order,
   read back first, and an answer to the ward pharmacist. Prefix `ipa-`,
   grepped absent before it was claimed; every colour a token. */
.ipa-qs, .ipa-order { display: grid; gap: 10px; max-width: 52em; min-width: 0; margin-top: 12px; }
.ipa-t { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ipa-q, .ipa-stop { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.ipa-qh { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.ipa-qt { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.ipa-in { width: 100%; min-width: 0; min-height: 34px; box-sizing: border-box; padding: 6px 9px;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink);
  font: 13px var(--display); }
textarea.ipa-in { resize: vertical; }
.ipa-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); min-width: 0; }
.ipa-adds { display: grid; gap: 6px; min-width: 0; }
.ipa-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ipa-row > .ipa-in { flex: 1 1 10em; width: auto; }
.ipa-seen { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); }
/* ==== inpatient END ==== */

/* ==== inpatientboard BEGIN — the file review board, variation C (inpatientboard.ts; 31 October) ==== */
/* ─── THE INPATIENT FILE REVIEW BOARD (variation C, 31 October) ─────────
   app/inpatientboard.ts. Folded into app.css by the integrator.

   THE CONSOLE'S TOKENS ONLY: no colour is spelled here, so the day theme
   ([data-theme="day"]) repaints every rule by itself and nothing below needs
   an override of its own.

   A PHONE FIRST (390 px): one column, the day strip and the tiles stacked,
   every control at --tap, no type under 13 px; the page scrolls as a phone
   page does. A DESKTOP (>= 1100 px, the console's own width line): the board
   fits the viewport and scrolls only inside the regions marked -- the day
   strip (sideways), a tile's body, the open note, the feed and its side,
   the palette's list and the note's side -- with no type under 12 px.
   `--ipb-above` is what sits above the board on the page (the console's top
   bar and the stay's own heading); the integrator sets it where it mounts.

   THE CONSOLE STYLES EVERY BUTTON: `body:not(.fd-console) :is(button, ...)`
   (specificity 0,1,2) sets a border colour, and its `:disabled` twin
   (0,2,2) a dashed border. An accent of the board's own is therefore written
   under its root (`:is(.ipb-screen, ...)`, 0,2,0) or it would lose. A page
   or a discipline already shown is a span, not a disabled button. */

.ipb-screen { --ipb-above: 132px; position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; color: var(--ink); }
.ipb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ipb-btn { min-height: var(--tap); padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ipb-btn:hover:not(:disabled) { background: var(--panel-hover); }
.ipb-btn:disabled { cursor: default; color: var(--dim); }
.ipb-btn:focus-visible, .ipb-go:focus-visible, .ipb-name:focus-visible, .ipb-palo:focus-visible, .ipb-ta:focus-visible, .ipb-days:focus-visible, .ipb-fmain:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ipb-loading, .ipb-none { padding: 8px 2px; color: var(--dim); font-size: 14px; }
.ipb-quiet { color: var(--dim); font-size: 13px; }
.ipb-said { margin: 0; padding-left: 18px; color: var(--dim); font-size: 13px; }
.ipb-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
.ipb-ht { flex: 1 1 auto; }

/* the header and its card */
.ipb-head { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ipb-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ipb-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.ipb-name { min-height: var(--tap); padding: 0 4px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 19px; font-weight: 600; text-decoration: underline dotted var(--teal); text-underline-offset: 5px; cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.ipb-num { font-family: var(--mono); font-size: 13px; color: var(--teal-2); overflow-wrap: anywhere; }
.ipb-meta { font-size: 14px; color: var(--dim); }
.ipb-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ipb-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.ipb-allergy { border-color: var(--red); color: var(--red-ink); }
.ipb-mri { border-color: var(--amber); color: var(--amber-ink); }
.ipb-infection { border-style: dashed; border-color: var(--red); color: var(--red-ink); }
.ipb-pmk { font-weight: 700; }
.ipb-stayline { display: flex; flex-wrap: wrap; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.ipb-sl { overflow-wrap: anywhere; }
.ipb-dot { color: var(--faint); white-space: pre; }
.ipb-back { flex: none; }
.ipb-card { position: relative; width: 100%; box-sizing: border-box; padding: 10px 14px 12px; border: 2px solid var(--teal); border-radius: var(--r-l); background: var(--panel); color: var(--ink); box-shadow: var(--z2); }
.ipb-card.ipb-pinned { border-color: var(--amber); }
.ipb-card-x { float: right; margin: 0 0 6px 8px; }
.ipb-card-g { clear: both; margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); }
.ipb-card-r { display: contents; }
.ipb-card-l { padding: 8px 14px 8px 0; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 13px; }
.ipb-card-v { margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; overflow-wrap: anywhere; }
.ipb-nric { font-family: var(--mono); font-weight: 600; letter-spacing: .04em; }
.ipb-nric.ipb-shown { color: var(--amber-ink); }
:is(.ipb-screen, .ipb-head) .ipb-reveal { margin-left: 8px; border-color: var(--amber); color: var(--amber-ink); }
.ipb-ask { margin-top: 4px; }
.ipb-ask .ask-acts .btn, .ipb-wline .ask-acts .btn { min-height: var(--tap); }
.ipb-nok { display: flex; flex-direction: column; gap: 2px; }
.ipb-nok-p { font-family: var(--mono); }
.ipb-card-said { margin-top: 8px; font-size: 13px; color: var(--dim); }

/* the tabs between the pages */
.ipb-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ipb-tab { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ipb-screen .ipb-tab[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: var(--accent-ink); font-weight: 700; }
.ipb-page { min-width: 0; }

/* page 1: the board */
.ipb-board { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ipb-stay, .ipb-now, .ipb-reader, .ipb-tile { box-sizing: border-box; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.ipb-tl { flex: none; }
.ipb-days { position: relative; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ipb-chip { flex: 0 0 min(330px, 84vw); display: flex; flex-direction: column; max-height: 260px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); scroll-snap-align: end; }
.ipb-chip.ipb-today { border: 2px solid var(--teal); }
.ipb-chh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.ipb-chl { color: var(--ink); }
.ipb-chd, .ipb-chp { color: var(--dim); font-size: 13px; }
.ipb-chn { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--teal); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.ipb-items { position: relative; list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; }
.ipb-it { margin: 0; }
.ipb-itr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; width: 100%; box-sizing: border-box; padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.ipb-ic { flex: none; width: 1.4em; text-align: center; }
.ipb-itx { flex: 1 1 0; min-width: 0; }
.ipb-itx > * + * { margin-left: 4px; }
.ipb-go { min-height: var(--tap); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.ipb-go:hover { background: var(--panel-hover); }
.ipb-fa, .ipb-fs { font-weight: 700; }
.ipb-fw { font-size: 13px; }
.ipb-ftag { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; color: var(--label); }
.ipb-f-hi .ipb-fa, .ipb-f-hi .ipb-fw, .ipb-f-hi .ipb-itw, .ipb-f-hi .ipb-rwt { color: var(--red-ink); }
.ipb-f-lo .ipb-fa, .ipb-f-lo .ipb-fw, .ipb-f-lo .ipb-itw, .ipb-f-lo .ipb-rwt { color: var(--map-numb); }
.ipb-f-al .ipb-fs, .ipb-f-al .ipb-fw { color: var(--red-ink); }
.ipb-f-x .ipb-fa, .ipb-f-x .ipb-fs, .ipb-f-x .ipb-fw { color: var(--amber-ink); }
/* withdrawn: kept, marked; its words struck only where the door sent the reason apart */
.ipb-wd { font-style: italic; }
.ipb-wds .ipb-itw, .ipb-wds .ipb-rwt, .ipb-strike { text-decoration: line-through; color: var(--dim); }
.ipb-wdw { font-size: 13px; font-style: italic; color: var(--amber-ink); }

/* the NOW band */
.ipb-nowh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.ipb-nowt { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
.ipb-nowm { font-size: 13px; color: var(--dim); }
.ipb-overdue .ipb-nowm, .ipb-overdue .ipb-fs { color: var(--amber-ink); }
.ipb-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ipb-fluid { grid-column: 1 / -1; }
.ipb-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.ipb-cell.ipb-f-hi { border: 2px solid var(--red); }
.ipb-cell.ipb-f-lo { border: 2px solid var(--map-numb); }
.ipb-cell.ipb-f-x { border: 2px solid var(--amber); }
.ipb-cl { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); overflow-wrap: anywhere; }
.ipb-cv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.ipb-big { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.ipb-cu { font-size: 13px; color: var(--dim); }
.ipb-cw { font-size: 13px; color: var(--teal-2); overflow-wrap: anywhere; }
.ipb-cell.ipb-f-hi .ipb-big, .ipb-cell.ipb-f-hi .ipb-cw { color: var(--red-ink); }
.ipb-cell.ipb-f-lo .ipb-big, .ipb-cell.ipb-f-lo .ipb-cw { color: var(--map-numb); }
.ipb-co2 { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.ipb-cr { font-size: 13px; color: var(--faint); overflow-wrap: anywhere; }
.ipb-pair .ipb-sp-l + .ipb-sp-l { stroke-dasharray: 3 2; }
.ipb-ct { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.ipb-spark { display: block; width: 100%; height: 26px; }
.ipb-sp-l { fill: none; stroke: var(--map-numb); stroke-width: 1.5; }
.ipb-sp-p { fill: var(--teal); }
.ipb-sp-f { fill: var(--bg); stroke: var(--red); stroke-width: 1.5; }
.ipb-sp-f.ipb-f-lo { stroke: var(--map-numb); }
.ipb-cfw { font-size: 14px; }
.ipb-cfx { overflow-wrap: anywhere; }
.ipb-cfw > * + * { margin-left: 4px; }

/* the note opened in place */
.ipb-reader { border: 2px solid var(--teal); max-height: 60vh; overflow: auto; }
.ipb-reader-x { float: right; margin: 0 0 6px 8px; }
.ipb-card-x, .ipb-reader-x, .ipb-palx { flex: none; }
.ipb-note-t { font-size: 15px; font-weight: 700; }
.ipb-note-m { font-size: 13px; color: var(--dim); }
.ipb-note-s { margin-top: 6px; }
.ipb-note-h { margin: 0; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--label); }
.ipb-note-x { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* the six tiles */
.ipb-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.ipb-tile { display: flex; flex-direction: column; gap: 4px; }
.ipb-tile.ipb-open { border: 2px solid var(--teal); }
.ipb-th { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ipb-tn { min-width: 1.6em; padding: 1px 6px; border-radius: 6px; background: var(--selected-bg); color: var(--teal); font-size: 14px; font-weight: 700; text-align: center; }
.ipb-tt { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--label); }
.ipb-ts { flex: 1 1 100%; order: 6; font-size: 13px; color: var(--dim); }
.ipb-tile:not(.ipb-open) .ipb-ts { display: none; }
.ipb-tsum { flex: 1 1 100%; order: 5; min-width: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
:is(.ipb-screen, .ipb-board) .ipb-tog { margin-left: auto; border-color: var(--teal); color: var(--teal); }
.ipb-tsaid { padding: 4px 8px; border: 1px dashed var(--amber); border-radius: 6px; color: var(--amber-ink); font-size: 13px; }
.ipb-tb { position: relative; display: flex; flex-direction: column; min-height: 0; }
.ipb-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; width: 100%; box-sizing: border-box; padding: 4px 2px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; }
.ipb-rl { font-weight: 600; overflow-wrap: anywhere; }
.ipb-rw { min-width: 0; color: var(--ink-2); text-align: right; overflow-wrap: anywhere; }
.ipb-rsrc { flex: 1 1 100%; font-size: 13px; color: var(--faint); overflow-wrap: anywhere; }
.ipb-grp { margin-top: 4px; padding: 2px 0; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal-2); }
.ipb-more { display: flex; flex-direction: column; }
.ipb-empty { font-size: 13px; color: var(--dim); }
/* THE TIDY BOARD: a dash for "nothing recorded", a narrow card for a day
   with nothing, and a tile's source kept for a screen reader only. */
.ipb-dash { color: var(--dim); text-decoration: none; }
.ipb-row-none .ipb-rl { font-weight: 500; color: var(--ink-2); }
.ipb-chip.ipb-chip-none { flex: 0 0 auto; min-width: 0; width: auto; }
.ipb-chip.ipb-chip-none .ipb-chh { flex-direction: column; align-items: flex-start; gap: 0; }
.ipb-tile .ipb-ts, .ipb-tile:not(.ipb-open) .ipb-ts { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* THE DOCTOR'S OWN LAYOUT: a tile's grip and its resize edges (a desktop
   only -- the module draws neither on a phone), and the way back. */
.ipb-layout { display: flex; justify-content: flex-end; }
.ipb-layout[hidden] { display: none; }

/* page 2: entries by date */
.ipb-feed { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ipb-fside { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ipb-fchips, .ipb-fjump { display: flex; flex-wrap: wrap; gap: 6px; }
.ipb-fchip, .ipb-fj { display: inline-flex; align-items: center; gap: 8px; }
.ipb-feed .ipb-fchip[aria-current="true"] { background: var(--selected-bg); border-color: var(--teal); color: var(--ink); font-weight: 700; }
.ipb-fcn, .ipb-fjn { font-family: var(--mono); color: var(--dim); }
.ipb-fmain { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.ipb-fday { position: sticky; top: 0; z-index: 1; margin: 0; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--sunk); color: var(--teal); font-size: 14px; }
.ipb-fday.ipb-jumped { box-shadow: inset 4px 0 0 var(--teal); }
.ipb-fe { margin: 6px 8px; padding: 6px 10px; border-left: 4px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.ipb-fe.ipb-wd { border-left-style: dashed; }
.ipb-feh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ipb-disc { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--label); }
.ipb-fat { font-family: var(--mono); font-size: 14px; }
.ipb-fwho { font-size: 14px; color: var(--dim); }
.ipb-ftitle { font-size: 14px; font-weight: 600; }
.ipb-feed .ipb-fread { margin-left: auto; border-color: var(--teal); color: var(--teal); }
.ipb-fet { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.ipb-fnote { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.ipb-fsay { font-size: 13px; color: var(--dim); }

/* page 3: write a note */
.ipb-write { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ipb-wmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ipb-wh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ipb-wht { font-size: 16px; }
.ipb-whs { flex: 1 1 auto; font-size: 13px; color: var(--dim); }
.ipb-write .ipb-sign { background: var(--teal); border-color: var(--teal); color: var(--accent-ink); font-weight: 700; }
.ipb-write .ipb-sign:disabled { background: var(--panel-2); color: var(--dim); }
.ipb-wbox { position: relative; min-width: 0; }
.ipb-ta { display: block; width: 100%; min-height: 42vh; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; }
.ipb-pal { position: absolute; z-index: 25; left: 8px; right: 8px; top: 2.5em; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; padding: 8px; border: 2px solid var(--teal); border-radius: var(--r-l); background: var(--panel); box-shadow: var(--z2); }
.ipb-pal.ipb-sheet { position: fixed; z-index: 40; left: 0; right: 0; top: auto; bottom: 0; max-height: 72dvh; border-radius: var(--r-l) var(--r-l) 0 0; padding-bottom: calc(8px + var(--safe-b)); }
.ipb-palh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.ipb-palht { flex: 1 1 auto; }
.ipb-pall { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 0; max-height: 36vh; overflow: auto; }
.ipb-palo { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 8px; border: 1px solid; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ipb-pal .ipb-palo { border-color: transparent; }
.ipb-pal .ipb-palo.ipb-on { background: var(--selected-bg); border-color: var(--teal); }
.ipb-palk { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--mono); }
.ipb-pall-l { min-width: 0; overflow-wrap: anywhere; }
.ipb-palp { font-size: 13px; color: var(--dim); }
.ipb-palpl { margin-bottom: 2px; }
.ipb-palpt { margin: 0; padding: 6px 8px; border: 1px solid var(--map-numb); border-radius: 6px; background: var(--sunk); color: var(--ink); font-family: inherit; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ipb-wcount { font-size: 13px; color: var(--dim); }
.ipb-wenc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ipb-wencw { font-size: 13px; color: var(--amber-ink); }
.ipb-write .ipb-wopen { border-color: var(--amber); color: var(--amber-ink); }
.ipb-wsay { font-size: 13px; color: var(--dim); }
.ipb-wside { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.ipb-lastt { text-align: left; }
.ipb-last { padding: 8px; border: 1px dashed var(--line); border-radius: var(--r); }
.ipb-inlist { list-style: none; margin: 0; padding: 0; }
.ipb-inl { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.ipb-ink { font-family: var(--mono); }
.ipb-inw { min-width: 0; }
.ipb-ina { margin-left: auto; color: var(--dim); }

/* A PHONE'S FRAME CLIPS EVERY REGION (body.is-phone > section); the stay
   is the one region that scrolls, and inpatientview.ts marks it so. */
body.is-phone > section.inpatientview:not([hidden]) { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* A DESKTOP. The feed and the note fit the viewport, their marked regions
   scrolling; the BOARD flows and the page scrolls, because a real stay holds
   more than fits 1440x900 and a clipped row is a fact nobody sees (measured
   on the door's own answer in Chromium, 31 Oct: every tile was cut). */
@media (min-width: 1100px) {
  /* the header and the tabs share the stay line, as the mock-up has them; a
     desktop's controls are a pointer's, 30-36 px, its rows 28 px */
  .ipb-screen { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); gap: 6px 12px; }
  .ipb-screen:has(.ipb-feed), .ipb-screen:has(.ipb-write) { height: calc(100dvh - var(--ipb-above)); min-height: 600px; }
  .ipb-topwrap { grid-column: 1; grid-row: 1; min-width: 0; }
  .ipb-tabs { grid-column: 2; grid-row: 1; align-self: end; flex-wrap: nowrap; }
  .ipb-page { grid-column: 1 / -1; grid-row: 2; }
  .ipb-btn { min-height: 32px; padding: 0 10px; }
  .ipb-name { min-height: 36px; }
  .ipb-card { position: absolute; z-index: 30; left: 0; top: 42px; width: min(560px, 100%); }
  .ipb-tab { flex: 0 0 auto; }
  .ipb-page { min-height: 0; display: flex; flex-direction: column; }
  .ipb-stay, .ipb-now, .ipb-tile { padding: 6px 8px; }
  .ipb-h { margin-bottom: 4px; }
  .ipb-chh { font-size: 13px; }
  .ipb-nowh { margin-bottom: 4px; }
  .ipb-cell { padding: 4px 6px; }
  .ipb-spark { height: 18px; }
  .ipb-board { flex: 1 1 auto; min-height: 0; }
  .ipb-days { flex: none; }
  /* A DAY HOLDS AS MANY ITEMS AS HAPPENED: the chip scrolls, never clips. */
  .ipb-chip { flex: 0 0 calc((100% - 24px) / 4); min-width: 250px; max-height: 190px; overflow-y: auto; }
  .ipb-ts { flex: 0 1 auto; order: 0; }
  .ipb-tile:not(.ipb-open) .ipb-ts { display: none; }
  .ipb-itr { font-size: 13px; }
  .ipb-go { min-height: 28px; }
  .ipb-cells { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ipb-fluid { grid-column: auto; }
  .ipb-big { font-size: 22px; }
  .ipb-cl, .ipb-cw, .ipb-co2, .ipb-cr, .ipb-ct { font-size: 12px; }
  .ipb-reader { position: absolute; z-index: 15; right: 0; bottom: 0; width: 46%; max-height: 62%; box-shadow: var(--z2); }
  .ipb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; grid-auto-flow: row dense; align-items: start; }
  .ipb-tile { min-height: 0; }
  .ipb-tile.ipb-open { grid-column: 1 / -1; }
  .ipb-tb { flex: 1 1 auto; }
  .ipb-tile.ipb-open .ipb-tb { display: block; column-count: 2; column-gap: 20px; }
  .ipb-tile.ipb-open .ipb-row, .ipb-tile.ipb-open .ipb-grp { break-inside: avoid; }
  .ipb-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ipb-tile { position: relative; grid-column: span 2; }
  .ipb-grip { flex: 0 0 auto; min-width: 24px; min-height: 28px; padding: 0 2px; border: 0; border-radius: 6px; background: transparent; color: var(--dim); font-size: 16px; line-height: 1; cursor: grab; touch-action: none; }
  .ipb-grip:hover, .ipb-grip:focus-visible { color: var(--teal); background: var(--panel-2); }
  .ipb-tile.ipb-dragging, .ipb-tile.ipb-picked { outline: 2px dashed var(--teal); outline-offset: 2px; }
  .ipb-tile.ipb-dragging { opacity: .85; }
  .ipb-tile.ipb-dragging .ipb-grip { cursor: grabbing; }
  .ipb-arranging { user-select: none; }
  .ipb-rz { position: absolute; z-index: 2; touch-action: none; }
  .ipb-rz-e { top: 12px; bottom: 12px; right: 0; width: 8px; cursor: ew-resize; }
  .ipb-rz-s { left: 12px; right: 12px; bottom: 0; height: 8px; cursor: ns-resize; }
  .ipb-rz-se { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
  .ipb-rz:hover, .ipb-arranging .ipb-rz:active { background: var(--teal); opacity: .5; border-radius: 6px; }
  .ipb-tile.ipb-open .ipb-rz-e, .ipb-tile.ipb-open .ipb-rz-se { display: none; }
  .ipb-tile.ipb-sized { overflow: hidden; }
  .ipb-tile.ipb-sized .ipb-tb { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  .ipb-tile.ipb-sized .ipb-tb > * { flex-shrink: 0; }
  .ipb-morecue { position: absolute; left: 50%; bottom: 6px; z-index: 3; transform: translateX(-50%); min-height: 28px; padding: 2px 12px; border: 1px solid var(--teal); border-radius: 999px; background: var(--panel); color: var(--teal); font-size: 13px; white-space: nowrap; }
  .ipb-morecue[hidden] { display: none; }
  .ipb-morecue.ipb-morewarn { border-color: var(--amber); color: var(--amber-ink); font-weight: 600; }
  .ipb-row { font-size: 13px; padding: 2px; }
  .ipb-row.ipb-go { min-height: 28px; }
  .ipb-said { flex: none; }
  .ipb-feed { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; flex: 1 1 auto; min-height: 0; }
  .ipb-fside { overflow: auto; }
  .ipb-fmain { overflow: auto; min-height: 0; }
  .ipb-fchips, .ipb-fjump { flex-direction: column; }
  .ipb-fsay, .ipb-feed > .ipb-said { grid-column: 1 / -1; }
  .ipb-write { display: grid; grid-template-columns: minmax(0, 1fr) 380px; flex: 1 1 auto; min-height: 0; }
  .ipb-wmain { min-height: 0; }
  .ipb-wbox { flex: 1 1 auto; min-height: 0; }
  .ipb-ta { height: 100%; min-height: 12em; resize: none; }
  .ipb-wside { min-height: 0; overflow: auto; }
}
/* ==== inpatientboard END ==== */

/* ==== frontview BEGIN — the front screen follows the check-in (frontview.ts, inpatientfront.ts; 2 November) ==== */
/* THE SWITCH, on both front views: it names the view a tap opens. */
.fv-switch { font: inherit; font-size: 12px; color: var(--teal); background: var(--panel-2);
  border: 1px solid var(--hush); border-radius: 999px; padding: 0 14px; min-height: 44px;
  cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.fv-switch:hover { background: var(--panel-hover); }
.fv-switch:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* THE DESKTOP'S LEAD LINE carries it at its right, on the same line as who is
   in the room, so the front screen loses no height to it. */
.dk-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dk-lead > .home-resume { flex: 1 1 auto; width: auto; }
.dk-lead > .fv-switch { order: 9; margin-left: auto; }
/* THE PHONE'S HEADING carries it at its end. */
.now-sh > .fv-switch { margin-left: auto; min-height: 44px; }
/* THE INPATIENT VIEW: a head that says where he is, the ward beneath it. On a
   desktop it is the front screen's centre, the ward list its one scrolling
   region; on a phone it is the Now page's column. */
.dk-ipf { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ipf { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; }
.ipf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 10px 12px; border: 1px solid var(--hush); border-radius: 10px; background: var(--panel-2); }
.ipf-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 12em; }
.ipf-t { font-weight: 600; font-size: 15px; color: var(--ink); }
.ipf-where { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.ipf-ward { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
body.is-phone .ipf-ward { flex: 1 1 auto; min-height: 0; }
/* ==== frontview END ==== */
/* ==== imaging store BEGIN — the imaging store's screens (imagestore.ts, 21 October) ==== */
/* ── imaging store: kept for the patient, a study sent, the studies filed ──
   🗄 on the doctor's encounter page. Prefix `ims-`, grepped absent before it
   was claimed. Layout and the state colours only, every colour a token.
   Placed above the chat sections, never after the last chat marker, whose
   slice runs to EOF and would swallow it. Phone width holds: every grid
   shrinks to one column, a control is as wide as its column and no wider,
   and a long name (a CD's path, a UID) wraps rather than pushing the page. */
.ims-area, .ims-part, .ims-form, .ims-row, .ims-readback, .ims-run, .ims-series {
  min-width: 0; overflow-wrap: anywhere; }
.ims-area { display: grid; gap: 14px; max-width: 52em; }
.ims-part { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.ims-h { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ims-h2 { font-weight: 600; }
.ims-note { color: var(--dim); line-height: 1.45; }
.ims-note.is-no { color: var(--red-ink); }
.ims-list { display: grid; gap: 8px; }
.ims-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding: 8px 0;
  border-top: 1px solid var(--line); }
.ims-row.is-withdrawn .ims-what { text-decoration: line-through; color: var(--dim); }
.ims-words { display: grid; gap: 4px; flex: 1 1 14em; min-width: 0; }
.ims-what { font-weight: 600; }
.ims-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line);
  background: var(--sunk); }
.ims-form { display: grid; gap: 8px; }
.ims-in { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.ims-picked, .ims-cabinet, .ims-acts, .ims-pick, .ims-screen, .ims-withdraw {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ims-chip, .ims-film { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 999px; }
.ims-film .ims-thumb { width: 48px; height: 48px; }
.ims-label { color: var(--dim); }
.ims-file { max-width: 100%; }
.ims-readback { display: grid; gap: 4px; padding: 8px 10px; background: var(--sunk); border-radius: 6px; }
.ims-who { line-height: 1.45; }
.ims-who-id { font-family: var(--mono); }
.ims-who-mismatch, .ims-skip { color: var(--red-ink); }
.ims-who-unstated, .ims-who-initials_differ { color: var(--amber); }
.ims-who-match { color: var(--teal); }
.ims-study-line { font-family: var(--mono); color: var(--ink); }
.ims-run, .ims-status, .ims-failed { display: grid; gap: 6px; }
.ims-bar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.ims-bar-fill { height: 100%; width: 0; background: var(--teal); }
.ims-detail, .ims-files-list { display: grid; gap: 6px; flex-basis: 100%; }
.ims-series { display: grid; gap: 4px; padding-left: 10px; border-left: 2px solid var(--line); }
.ims-file-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-family: var(--mono); }
.ims-said { color: var(--dim); }
.ims-capture, .ims-capture-preview { display: grid; gap: 8px; min-width: 0; }
.ims-capture { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.ims-capture-image { display: block; width: auto; max-width: 100%; max-height: 65vh; object-fit: contain;
  background: #000; border: 1px solid var(--line); border-radius: 6px; }
/* ==== imaging store END — the imaging store's screens ==== */
/* ==== paquestionnaires BEGIN — questionnaires in the patient app (PA-013, Wave 2) ==== */
/* 📋 QUESTIONNAIRES IN THE PATIENT APP (paquestionnaires.ts, PA-013 Wave 2):
   send a form, the answers waiting to be filed, the forms still with the
   patient. Layout only: every word is the door's. No px font size, so the
   generated desktop type scale is untouched. */
.paq-send { display: grid; gap: 8px; max-width: 46em; }
.paq-form, .paq-due { max-width: 24em; }
.paq-label { color: var(--dim); }
.paq-note { color: var(--amber); }
.paq-lists { display: grid; gap: 8px; margin-top: 16px; max-width: 52em; }
.paq-h { color: var(--dim); margin-top: 8px; }
.paq-item { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 8px; }
.paq-item.is-overdue { border-left-color: var(--amber); }
.paq-item .btn { justify-self: start; }
.paq-lines { display: grid; gap: 2px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; }
.paq-line { white-space: pre-wrap; }
/* ==== paquestionnaires END — questionnaires in the patient app (PA-013, Wave 2) ==== */
/* ==== paprogrammes BEGIN — condition programmes in the patient app (Wave 2, PA-017a/c/d) ==== */
/* 🩺 CONDITION PROGRAMMES IN THE PATIENT APP (paprogrammes.ts, PA-017a/c/d
   Wave 2): enrol a patient, their programmes with what can be done to each,
   the pre-visit summary, and the clinic's contacts list. Layout only: every
   word is the door's. No px font size, so the generated desktop type scale is
   untouched. Every class is new under `pgm-` -- measured unused in
   app/app.css, app/*.ts and reference/fragments/ before it was chosen. The
   read-back line is asktwice's own `.ask-line`, the buttons `.btn .btn-small`,
   so nothing here restyles another screen's class. Fold into app/app.css under
   its own marker, beside paquestionnaires', never after the last chat marker. */
.pgm-enrol { display: grid; gap: 8px; max-width: 46em; }
.pgm-template, .pgm-start, .pgm-stage, .pgm-review { max-width: 24em; }
.pgm-label { color: var(--dim); }
.pgm-note { color: var(--amber); }
.pgm-list { display: grid; gap: 8px; margin-top: 16px; max-width: 52em; }
.pgm-h { color: var(--dim); margin-top: 8px; }
.pgm-item, .pgm-contact { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--teal); border-radius: 8px; }
.pgm-item.is-withdrawn { border-left-color: var(--line); opacity: 0.75; }
.pgm-item.is-withdrawn .pgm-head { text-decoration: line-through; }
.pgm-item .btn, .pgm-contact .btn { justify-self: start; }
.pgm-line, .pgm-history { white-space: pre-wrap; }
.pgm-history { color: var(--dim); }
.pgm-summary { display: grid; gap: 2px; }
.pgm-summary:not(:empty) { padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; }
.pgm-sline { white-space: pre-wrap; }
/* ==== paprogrammes END — condition programmes in the patient app (Wave 2, PA-017a/c/d) ==== */
/* ==== surgery BEGIN — My Surgery, the surgeon's plan to CareBee (10 Nov 2026) ==== */
/* 🔪 MY SURGERY (surgery.ts): the folder's tile, the plan's editor and his
   templates. No px font size, so the generated desktop type scale is
   untouched. Every class is new under `sp-`; the read-back line is
   asktwice's own `.ask-line`, the buttons `.btn .btn-small`. */
.sp-tile .fv-tile-b { display: grid; gap: 10px; }
.sp-plan { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--teal); border-radius: 8px; }
.sp-plan.is-withdrawn { border-left-color: var(--line); opacity: 0.75; }
.sp-plan.is-withdrawn .sp-head { text-decoration: line-through; }
.sp-head { font-weight: 600; }
.sp-state, .sp-fast, .sp-why, .sp-label, .sp-anaes { color: var(--dim); }
.sp-table { width: 100%; border-collapse: collapse; }
.sp-table th, .sp-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line);
  vertical-align: top; }
.sp-from { border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); white-space: nowrap; }
.sp-from-default { color: var(--dim); }
.sp-from-other { border-color: var(--amber); }
.sp-meds-h, .sp-sub, .sp-day-h { color: var(--dim); margin-top: 6px; }
.sp-removed { text-decoration: line-through; color: var(--dim); }
.sp-acts, .sp-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-form, .sp-editor, .sp-items { display: grid; gap: 6px; max-width: 60em; }
.sp-edit-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
/* each label sits over its own field: a label as wide as its field must not run
   into the next one's ("Admission time Hospital", the 11 Nov screenshots) */
.sp-field { display: grid; gap: 2px; min-width: 0; }
.sp-field > .sp-label { white-space: nowrap; }
.sp-in { min-width: 0; }
.sp-flag { color: var(--red); }
.sp-summary:not(:empty) { padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; }
/* THE CARE JOURNEY HUDDLE: the four phases side by side on a wide screen,
   stacked on a phone; what was pre-filled marked until accepted; the
   patient's own words set apart; a goal's met / partly / not-met mark is a
   word and a symbol, never colour alone. */
.sp-start { font-weight: 600; justify-self: start; }
.sp-editor { max-width: none; }
.sp-block > button, .sp-block > span, .sp-line > span > button { justify-self: start; }
.sp-phase .sp-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px; }
.sp-phase .sp-edit-row > input[type="text"], .sp-phase .sp-edit-row > select:first-child { grid-column: 1 / -1; }
.sp-phase .sp-edit-row > button { justify-self: start; }
.sp-phase .sp-edit-row > span { grid-column: 1 / -1; justify-self: start; }
.sp-phase .sp-edit-row .sp-in { width: 100%; }
.sp-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .sp-phases { grid-template-columns: minmax(0, 1fr); } }
.sp-phase { display: grid; gap: 4px; align-content: start; padding: 6px; border: 1px solid var(--line);
  border-radius: 8px; min-width: 0; }
.sp-phase.is-now { border-color: var(--teal); }
.sp-phase-h { font-weight: 600; }
.sp-line, .sp-goal, .sp-member, .sp-goal-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sp-when, .sp-target { color: var(--dim); }
.sp-block { display: grid; gap: 2px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); }
.sp-block-nursing { border-left: 3px solid var(--teal); }
.sp-block-allied_health { border-left: 3px solid var(--amber); }
.sp-block-vendor { border-left: 3px dashed var(--dim); }
.sp-block-h { font-weight: 600; }
.sp-team { display: grid; gap: 4px; }
/* THE SHARED CARE CARD, stage 1: the provider picker, who sees inside, what is going on. */
.sp-sees, .sp-looked { color: var(--dim); font-size: 13px; }
.sp-pick { display: grid; gap: 6px; margin-top: 4px; }
.sp-pick-open { justify-self: start; }
.sp-pick-sheet { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.sp-pick-sheet[hidden] { display: none; }
.sp-pick-h { color: var(--dim); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.sp-pick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.sp-pick-tile { display: grid; gap: 1px; min-height: var(--tap); padding: 6px 10px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.sp-pick-tile[aria-pressed="true"] { border: 2px solid var(--teal); padding: 5px 9px; }
.sp-pick-tile:disabled { opacity: .5; cursor: default; }
.sp-pick-r { color: var(--teal); font-size: 13px; }
.sp-pick-s { color: var(--dim); font-size: 13px; }
.sp-pick-chosen { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sp-pick-chosen:empty { display: none; }
.sp-pick-who { font-weight: 600; }
.sp-activity { display: grid; gap: 2px; margin: 6px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.sp-activity-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-top: 0; }
.sp-new-n { padding: 0 8px; border: 1px solid var(--teal); border-radius: 999px; color: var(--teal); font-size: 13px; }
.sp-act { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 3px 0 3px 8px; border-left: 3px solid transparent; }
.sp-act[hidden] { display: none; }
.sp-act.is-new { border-left-color: var(--teal); }
.sp-act-at { color: var(--dim); font-size: 13px; min-width: 96px; }
.sp-act-who { color: var(--teal); font-weight: 600; }
.sp-act-new { padding: 0 6px; border-radius: 999px; background: var(--teal); color: var(--bg); font-size: 12px; font-weight: 600; }
.sp-activity-all { justify-self: start; }
.sp-member.is-ended .sp-member-n { text-decoration: line-through; color: var(--dim); }
.sp-block.is-ended .sp-block-by, .sp-line.is-ended .sp-from { color: var(--dim); font-style: italic; }
.sp-ended { color: var(--dim); }
.sp-stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-stage.is-on { background: rgba(79,214,200,0.22); border-color: var(--teal); color: var(--teal); font-weight: 600; }
.is-prefill { outline: 1px dashed var(--amber); outline-offset: 2px; }
.is-decide { outline: 2px solid var(--amber); }
.sp-decide:not(:empty) { padding: 6px 8px; border: 1px solid var(--amber); border-radius: 6px; }
.sp-patient { font-style: italic; }
.sp-goal-met .sp-mark { color: var(--teal); }
.sp-goal-partly .sp-mark { color: var(--amber); }
.sp-goal-notmet .sp-mark { color: var(--red); font-weight: 600; }
.sp-mark { white-space: nowrap; }
/* ==== surgery END — My Surgery, the surgeon's plan to CareBee (10 Nov 2026) ==== */
/* ==== pahealth BEGIN — the patient app's health summary and allergy card (PA-007b/PA-014, Wave 2) ==== */
/* 🩺 THE PATIENT APP'S HEALTH SUMMARY (pahealth.ts, PA-007b / PA-014, Wave 2):
   what the patient sent for the record, the allergies they typed beside the
   chart's own, and the chart's allergies sent back. Layout only: every word
   is the door's. No px font size, so the generated desktop type scale is
   untouched. */
.pah-sent, .pah-allergies { display: grid; gap: 8px; max-width: 52em; }
.pah-allergies { margin-top: 16px; }
.pah-h { color: var(--dim); margin-top: 8px; }
.pah-said { margin-bottom: 8px; }
.pah-item, .pah-sec { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 8px; }
.pah-lines { display: grid; gap: 2px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; }
.pah-line { white-space: pre-wrap; }
.pah-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pah-label { color: var(--dim); }
.pah-pick { max-width: 18em; }
.pah-typed { display: grid; gap: 4px; padding-left: 8px; border-left: 2px dashed var(--amber); }
.pah-typed .btn, .pah-allergies > .btn { justify-self: start; }
/* ==== pahealth END — the patient app's health summary and allergy card (PA-007b/PA-014, Wave 2) ==== */
/* THE TEMPLATE BUILDERS (tplbuild.ts, shortcuts.ts, pdftpl.ts) and the
   patient's forms & email sheet (patientmail.ts), 24 September. */
.tb-head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.tb-add { margin-bottom: 8px; }
.tb-list { display: flex; flex-direction: column; gap: 6px; }
/* PDF FORM TEMPLATES -- field kinds and source hints (26 September).
 * Prefix `pfs-`, grepped absent from app/app.css before it was claimed
 * (`.pt-` is three modules' already). Fold under the PDF templates block. */
.pfs-kind { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px;
  font-family: inherit; font-size: 10.5px; letter-spacing: 0.02em; color: var(--dim);
  border: 1px solid var(--line, rgba(127,127,127,0.35)); vertical-align: 1px; }
.pfs-hint { grid-column: 1 / -1; font-size: 11px; color: var(--dim); line-height: 1.35; }
.pfs-hint[hidden] { display: none; }
@media (min-width: 1100px) {
  .pfs-kind { font-size: 11px; }
  .pfs-hint { font-size: 13.3px; }
}
/* ── scheme membership (Dr Lau, 26 September: the scheme's second component,
   whether the PATIENT is a member, captured at registration) ──────────────
   Fragment for the integrator to fold into app/app.css. Prefix `smb-`,
   checked absent from app.css before it was claimed. Colours are tokens
   only, so both palettes follow. */
.smb-group .smb-row { display: flex; flex-direction: column; gap: 3px; }
.smb-q { font-size: 11px; color: var(--dim); line-height: 1.4; }
.smb-not-here { margin-left: 6px; font-size: 10.5px; color: var(--amber); }
.smb-elsewhere .smb-select { border-style: dashed; }
.smb-toggle { margin-top: 6px; align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--teal); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.smb-more { margin-top: 6px; }
.smb-none { color: var(--faint); }
.smb-section .smb-line { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid var(--hush); }
.smb-section .smb-line:first-of-type { border-top: 0; }
.smb-line-n { font-size: 12.5px; color: var(--ink); }
.smb-line-q { font-size: 11.5px; color: var(--dim); }
.smb-line.smb-elsewhere .smb-line-q { color: var(--amber); }
.smb-look { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.smb-who { flex: 1 1 220px; min-width: 0; }
.smb-editor { margin-top: 10px; }
.smb-say { margin-top: 6px; }
/* PRE-BUILT PATIENT FORMS (26 September): the licence and source lines, and restore. */
.tb-head { gap: 8px; flex-wrap: wrap; }
.tb-licence { font-size: 12px; color: var(--amber); white-space: normal; margin-top: 2px; }
.tb-src { font-size: 11.5px; color: var(--dim); white-space: normal; margin-top: 2px; }
.tb-restore { margin-bottom: 8px; }
.tb-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); }
.tb-item .ask-line { grid-column: 1 / -1; }
.tb-item-name { font-size: 13.5px; color: var(--ink); }
.tb-item-sub { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-item-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-form { display: flex; flex-direction: column; gap: 6px; }
.tb-form-h { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.tb-l { font: 11px var(--mono); color: var(--label); letter-spacing: .04em; margin-top: 6px; }
.tb-in { width: 100%; min-height: 32px; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--rule);
  border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.tb-area { resize: vertical; }
.tb-rows { display: flex; flex-direction: column; gap: 8px; }
.tb-row { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 8px 38px 8px 8px;
  border: 1px dashed var(--rule); border-radius: var(--r); }
.tb-row-tools { position: absolute; right: 4px; top: 4px; display: flex; flex-direction: column; gap: 3px; }
.tb-mini { width: 28px; height: 26px; border: 1px solid var(--rule); border-radius: 6px; color: var(--dim); cursor: pointer; font-size: 12px; }
.tb-mini:hover { color: var(--teal); border-color: var(--teal); }
.tb-scale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.tb-num { width: 64px; }
.tb-form-acts { display: flex; gap: 8px; margin-top: 8px; }
.pt-grid { display: flex; flex-direction: column; gap: 5px; max-height: none; }
.pt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; }
.pt-field { font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.pt-ess-l { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.pm-to { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
/* RELATED FOLDERS (relatives.ts) -- first-degree relatives, under the number */
.fv-rel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fv-rel[hidden] { display: none; }
.rel-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.rel-chip { min-height: 28px; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--teal); cursor: pointer;
  border: 1px solid rgba(79,214,200,0.4); background: rgba(79,214,200,0.08); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rel-h { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rel-none { font-size: 12px; color: var(--dim); }
.rel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.rel-row .ask-line { grid-column: 1 / -1; }
.rel-row .ask-line:empty, .rel-form > .ask-line:empty { display: none; }
.rel-open { display: flex; align-items: baseline; gap: 8px; min-width: 0; min-height: 34px; padding: 4px 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink); font: inherit; }
.rel-rel { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); flex: 0 0 auto; }
.rel-name { font-size: 13px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-key { font-size: 12px; color: var(--dim); flex: 0 0 auto; }
.rel-add { align-self: flex-start; }
.rel-form { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px dashed var(--rule); border-radius: 8px; }
.rel-form[hidden] { display: none; }
.rel-search, .rel-pickrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.rel-q { flex: 1 1 200px; min-width: 0; min-height: 34px; box-sizing: border-box; padding: 6px 9px;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.rel-pick { min-height: 34px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); }
/* PARENT / GUARDIAN (guardians.ts, GP Phase 0) -- relatives' own shape */
.gd-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gd-h { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gd-none { font-size: 12px; color: var(--dim); }
.gd-needed { font-size: 13px; color: var(--amber, #e0a33a); padding: 6px 10px; border: 1px solid currentColor; border-radius: 8px; }
.gd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.gd-row .ask-line, .gd-basis { grid-column: 1 / -1; }
.gd-row .ask-line:empty, .gd-form > .ask-line:empty { display: none; }
.gd-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.gd-rel { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.gd-name { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.gd-phone, .gd-email { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.gd-basis { font-size: 12px; color: var(--ink-2); }
.gd-stale { color: var(--amber, #e0a33a); }
.gd-add { align-self: flex-start; }
.gd-form { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px dashed var(--rule); border-radius: 8px; }
.gd-form[hidden], .gd-field[hidden] { display: none; }
.gd-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gd-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.gd-field input, .gd-pick { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.dk-guardian { margin-top: 8px; }
/* GP MODE (gp.ts, GP Phase 0): the GP strip under the first page's actions */
.dk-gp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dk-gp[hidden] { display: none; }
.dk-gp-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
/* THE TWO-MINUTE VISIT (gpvisit.ts, GP Phase 1) */
.gv-box { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 4px 2px; }
.gv-who { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gv-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.gv-h { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.gv-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.gv-chips[hidden] { display: none; }
.gv-cwrap { display: inline-flex; gap: 4px; align-items: center; }
.gv-chip { min-height: 32px; padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--ink); border: 1px solid var(--rule); background: var(--panel-2); }
.gv-chip.is-on { color: var(--teal); border-color: rgba(79,214,200,0.6); background: rgba(79,214,200,0.12); }
.gv-days { width: 4.5em; min-height: 32px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); }
.gv-days[hidden], .gv-text[hidden] { display: none; }
.gv-text, .gv-date, .gv-pick { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.gv-vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: 6px; }
.gv-vital { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.gv-exam { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.gv-sys { flex: 0 0 7em; font-size: 12px; color: var(--ink-2); }
.gv-finds { flex: 1 1 100%; }
.gv-dx { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-mc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gv-mc-next { font-size: 12px; color: var(--teal); }
.gv-mc-next.is-gap { color: var(--amber); }
/* 🩺 THE MC ON THE ENCOUNTER PAGE AND IN THE FOLDER (28 Oct, mc.ts): the
   register, newest first, the days between two MCs said, and the further one. */
.mc-area { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-width: 0; }
.mc-h { font: 600 14px var(--display); color: var(--ink); }
.mc-sh { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.mc-now { font-size: 13px; color: var(--ink-2); }
.mc-now.is-on { color: var(--teal); }
.mc-rows { display: flex; flex-direction: column; gap: 4px; }
.mc-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 7px; min-width: 0; }
.mc-row.is-here { border-color: var(--teal); }
.mc-row.is-gone { opacity: 0.6; text-decoration: line-through; }
.mc-span { font-size: 13px; color: var(--ink); }
.mc-days { font-size: 12px; color: var(--teal); }
.mc-kind { font-size: 12px; color: var(--ink-2); }
.mc-sub { flex: 1 1 100%; font-size: 11px; color: var(--dim); }
.mc-gap { font-size: 12px; color: var(--amber); padding-left: 8px; }
.mc-next { font-size: 12px; color: var(--teal); }
.mc-next.is-gap { color: var(--amber); }
.mc-check { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-width: 0; }
.mc-check-in { flex: 1 1 160px; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.mc-check-out { display: flex; flex-direction: column; gap: 6px; }
.mc-check-facts { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--rule); border-radius: 7px; padding: 8px 10px; }
.mc-check-fact { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.mc-check-k { flex: 0 0 88px; font-size: 11px; color: var(--dim); }
.mc-check-v { flex: 1 1 auto; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.mc-form { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); padding-top: 8px; }
.mc-in-row, .mc-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mc-in { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.fv-mc { font-size: 12px; padding: 3px 10px; border-radius: 999px; color: var(--ink-2); border: 1px solid var(--rule); }
.fv-mc.is-on { color: var(--teal); border-color: var(--teal); }
.fo-mc-now { font-size: 12px; color: var(--ink-2); margin: 2px 0 4px; }
.fo-mc-now.is-on { color: var(--teal); }
.fo-mc-gap { font-size: 11px; color: var(--amber); padding: 0 0 2px 10px; }
.fo-mc-sub { font-size: 11px; color: var(--dim); padding: 0 0 3px; margin-top: -2px; }
/* ✉️ THE MEMO BOARD ON THE ENCOUNTER PAGE (30 Oct, memoboard.ts): the kinds
   and this encounter's letters on the left, the letter on the right. */
.mb { display: flex; gap: 12px; padding: 10px; min-width: 0; align-items: flex-start; }
.mb-side { flex: 0 0 210px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mb-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* The quick-selection board (23 Nov): the help symbol in the upper right
   corner, its notes above the letter, the kind on screen lit. */
.mb { position: relative; }
.mb-col { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-right: 40px; }
.mb-helpb { position: absolute; top: 8px; right: 8px; }
.mb-kind.is-on { border-color: var(--teal); }
.mb-addt { border-style: dashed; color: var(--teal); }
.mb-choice[aria-pressed="true"] { background: rgba(114,229,213,0.14); color: var(--ink); }
.mb-k { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-top: 2px; }
.mb-k2 { margin-top: 10px; }
.mb-g { font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.mb-kind, .mb-letter, .mb-r, .mb-addt { display: flex; flex-direction: column; gap: 1px; text-align: left; min-height: 34px; padding: 6px 9px; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); cursor: pointer; min-width: 0; }
.mb-kind:hover, .mb-letter:hover, .mb-r:hover, .mb-addt:hover { border-color: var(--teal); }
.mb-letter.is-on { border-color: var(--teal); }
.mb-l1, .mb-r1 { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.mb-l2, .mb-r2 { font-size: 11px; color: var(--dim); }
.mb-wait, .mb-none, .mb-hint { font-size: 12px; color: var(--dim); }
.mb-no { font-size: 13px; color: var(--red-ink); }
.mb-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
/* What the draft includes, on one line under the title (29 Nov). */
.mb-includes { flex-basis: 100%; }
.mb-incl { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.mb-incl .mb-choices { display: contents; }
.mb-directory { margin-top: 4px; }
.mb-title { font: 600 15px var(--display); color: var(--ink); }
.mb-state { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.mb-state-sending, .mb-state-leaving { color: var(--amber); border-color: var(--amber); }
/* ✉️ MEMO BOARD B (27 Nov 2026, his design B): a slim left column of
   types (a grip each, dragged to reorder, the chosen one outlined), the
   templates and the memos already written one line each; a bar of two
   lines; the writing board or the page as it prints; the picks drawer on
   the right. */
.mb-side { flex-basis: 160px; }
.mb-col { padding-right: 0; }
.mb-sidehead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mb-sidehead .mb-helpb { position: static; }
.mb-types { display: flex; flex-direction: column; gap: 3px; min-height: 8px; }
.mb-side .mb-kind { flex-direction: row; align-items: center; gap: 6px; min-height: 30px; padding: 4px 7px; }
.mb-grip { color: var(--dim); cursor: grab; letter-spacing: -2px; flex: none; }
.mb-kl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-side .mb-kind.is-on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 0 8px rgba(79,214,200,0.35); }
.mb-kind.is-drag { opacity: 0.5; }
.mb-side .mb-letter { flex-direction: row; gap: 6px; align-items: baseline; min-height: 28px; padding: 4px 7px; }
.mb-side .mb-l1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.mb-side .mb-l2 { flex: none; }
.mb-past { display: flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 4px; border-bottom: 1px solid var(--rule); min-width: 0; }
.mb-past.is-revoked .mb-pl, .mb-past.is-revoked .mb-pd { text-decoration: line-through; color: var(--dim); }
.mb-pd { flex: none; font-size: 11px; color: var(--dim); }
.mb-pl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink); }
.mb-pacts { flex: none; display: flex; gap: 2px; }
.mb-pi { position: relative; width: 26px; height: 26px; padding: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-2); color: var(--ink-2); cursor: pointer; }
.mb-pi:hover, .mb-pi:focus-visible { border-color: var(--teal); color: var(--ink); }
.mb-pi[data-tip]:hover::after, .mb-pi[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 4px); white-space: nowrap; padding: 3px 7px; border-radius: 5px; background: var(--panel); border: 1px solid var(--rule); color: var(--ink); font-size: 11px; z-index: 5; pointer-events: none; }
.mb-older { align-self: flex-start; border: 0; background: none; color: var(--teal); font-size: 12px; cursor: pointer; padding: 4px 0; }
.mb-reason { width: 100%; margin: 4px 0; }
.mb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mb-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.mb-segb { min-height: 28px; padding: 3px 10px; border: 0; border-right: 1px solid var(--rule); background: var(--panel-2); color: var(--ink-2); font: 12px var(--display); cursor: pointer; }
.mb-seg .mb-segb:last-child { border-right: 0; }
.mb-segb.is-on { background: rgba(79,214,200,0.16); color: var(--ink); }
.mb-segb:disabled { cursor: default; opacity: 0.6; }
.mb-zoom { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.mb-zoom .mb-segb { border: 1px solid var(--rule); border-radius: 6px; width: 28px; padding: 0; }
.mb-zoomw { font-size: 12px; color: var(--ink-2); min-width: 40px; text-align: center; }
.mb-stage { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.mb-wpane { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mb-pv { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; overflow: auto; }
.mb-pvpage { width: 560px; max-width: 100%; aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--rule); box-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.mb-pvpage[data-size="A5"] { aspect-ratio: 148 / 210; }
.mb-pvframe { width: 100%; height: 100%; border: 0; display: block; }
.mb-drawer { flex: 0 0 270px; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-left: 10px; border-left: 1px solid var(--rule); }
.mb-dsec { display: flex; flex-direction: column; gap: 5px; }
.mb-dh { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.mb-drawer .mb-seg { flex-direction: column; }
.mb-drawer .mb-seg .mb-segb { border-right: 0; border-bottom: 1px solid var(--rule); text-align: left; }
.mb-drawer .mb-seg .mb-segb:last-child { border-bottom: 0; }
.mb-vchips { display: flex; flex-wrap: wrap; gap: 4px; }
.mb-vchip { min-height: 26px; padding: 2px 9px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel-2); color: var(--ink-2); font: 12px var(--display); cursor: pointer; }
.mb-vchip.is-on { border-color: var(--teal); background: rgba(79,214,200,0.16); color: var(--ink); }
.mb-foot { position: sticky; bottom: 0; background: var(--panel); padding: 6px 0; z-index: 2; }
@media (max-width: 1099px) {
  .mb-stage { flex-direction: column; align-items: stretch; }
  .mb-drawer { flex: none; padding-left: 0; border-left: 0; }
}
.mb-state-sent, .mb-state-printed { color: var(--teal); border-color: var(--teal); }
.mb-state-failed { color: var(--red-ink); border-color: var(--red); }
.mb-corr { font-size: 12px; color: var(--ink-2); }
.mb-h, .mb-sh { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.mb-to, .mb-consent, .mb-semr:not(:empty), .mb-ai, .mb-flags, .mb-paperbox { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mb-consent, .mb-semr:not(:empty), .mb-ai, .mb-flags { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; }
.mb-chosen { font-size: 13px; color: var(--ink); }
.mb-dir { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
/* The recipient picker (#1235): three ways to address a letter, nothing
   listed until a search or a specialty, one line a doctor under its place.
   A row is never squeezed by the list's height (flex: none), which is what
   cut the first row off. */
.mb-dir > * { flex: none; }
.mb-addr, .mb-chips, .mb-picked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.mb-pane, .mb-chiphost { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mb-addr-b, .mb-chip, .mb-change, .mb-offer, .mb-more { min-height: 30px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 15px; background: var(--panel-2); color: var(--ink); font: 12px var(--display); cursor: pointer; }
.mb-addr-b.is-on, .mb-chip.is-on { border-color: var(--teal); color: var(--teal); }
.mb-addr-b:hover, .mb-chip:hover, .mb-change:hover, .mb-offer:hover { border-color: var(--teal); }
.mb-chip-n { margin-left: 5px; color: var(--dim); }
.mb-r-line { flex-direction: row; align-items: baseline; gap: 8px; }
.mb-r-line .mb-r1 { flex: none; max-width: 55%; }
.mb-r-line .mb-r2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-tag { flex: none; padding: 1px 7px; border: 1px solid var(--rule); border-radius: 9px; font-size: 11px; color: var(--dim); }
.mb-tag:empty { display: none; }
.mb-place { margin-top: 4px; font: 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.mb-picked-where, .mb-nobody { font-size: 12px; color: var(--dim); }
.mb-nobody { color: var(--ink); }
.mb-find, .mb-paper, .mb-ins, .mb-claim, .mb-how, .mb-semr-giver, .mb-semr-how, .mb-semr-on, .mb-want, .mb-t { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.mb-t { min-height: 72px; resize: vertical; width: 100%; line-height: 1.4; }
.mb-copy, .mb-asked, .mb-tick, .mb-flag, .mb-src { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.mb-sec { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mb-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.mb-choice { min-height: 34px; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink-2); font: 13px var(--display); cursor: pointer; }
.mb-choice.is-on { color: var(--teal); border-color: var(--teal); }
.mb-fl { color: var(--amber-ink); }
.mb-checks { display: flex; flex-direction: column; gap: 2px; }
.mb-check { font-size: 12px; }
.mb-check.is-no { color: var(--amber-ink); }
.mb-check.is-ok { color: var(--teal); }
.mb-aisaid { font-size: 12px; color: var(--ink-2); }
.mb-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mb-count { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--amber-ink); }
.mb-outcome { font-size: 13px; color: var(--ink-2); }
/* Where a heading came from is quiet; why one was NOT filled (or a source is
   held back, or Fill waits) is a notice -- never the same look (memo-02). */
.mb-origin { color: var(--dim); font-style: italic; }
.mb-origin.is-edited { color: var(--ink-2); }
.mb-nofill { color: var(--amber-ink); border-left: 3px solid var(--amber); background: rgba(224,164,74,.08); padding: 4px 8px; border-radius: 0 6px 6px 0; }
.mb-t.is-more { border-bottom: 2px solid var(--amber); }
.mb-more { color: var(--amber-ink); }
.mb-src.is-held { color: var(--dim); }
.mb-fillwrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.mb-fillwhy { flex: 1 1 220px; min-width: 0; }
.mb-fillwhy:empty { display: none; }
.mb-err { padding: 8px 10px; border-left: 3px solid var(--red); background: rgba(255,154,141,.12); font-weight: 600; }
.mb-saved { font-weight: 600; }
/* A narrow screen: the kinds and letters sit ABOVE the letter as wrapping
   chips, and every control is a full tap target (memo-06). */
@media (max-width: 760px) {
  .mb { flex-direction: column; align-items: stretch; padding: 8px 0; }
  .mb-side { flex: none; flex-flow: row wrap; gap: 6px; }
  .mb-side .mb-k, .mb-side .mb-g, .mb-side .mb-none { flex: 1 0 100%; }
  .mb-side .mb-kind, .mb-side .mb-letter { flex: 1 1 150px; }
  .mb-addr-b, .mb-chip, .mb-change, .mb-offer, .mb-more { min-height: var(--tap); }
  .mb-kind, .mb-letter, .mb-r, .mb-choice, .mb-find, .mb-paper, .mb-ins, .mb-claim, .mb-how, .mb-semr-giver, .mb-semr-how, .mb-semr-on, .mb-want { min-height: var(--tap); }
  .mb-copy, .mb-asked, .mb-tick, .mb-flag, .mb-src { min-height: var(--tap); align-items: center; }
  .mb-copy input, .mb-asked input, .mb-tick input, .mb-flag input, .mb-src input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0 6px 0 0; }
  .mb-acts .btn, .mb-fillwrap, .mb-fillwrap .btn { flex: 1 1 100%; }
}
.fv-letter-b { align-self: flex-start; margin: 0 0 8px; }
/* 💊 THE DESK'S MEDICINE RECONCILIATION (28 Oct, fdmeds.ts), in the counter's bill. */
.fdm { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 8px; border: 1px solid var(--rule); border-radius: 8px; }
.fdm-h { font: 600 13px var(--display); color: var(--ink); }
.fdm-hint { font-size: 12px; color: var(--dim); }
.fdm-hint.is-warn { color: var(--amber); }
.fdm-lines { display: flex; flex-direction: column; gap: 4px; }
.fdm-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 7px; min-width: 0; }
.fdm-line.is-void .fdm-item, .fdm-line.is-void .fdm-amt { text-decoration: line-through; color: var(--dim); }
.fdm-item { font-size: 13px; color: var(--ink); }
.fdm-amt { font-size: 13px; color: var(--ink-2); }
.fdm-tag { font-size: 11px; color: var(--amber); }
.fdm-change { flex: 1 1 100%; font-size: 11px; color: var(--teal); }
.fdm-acts, .fdm-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fdm-form { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px solid var(--rule); }
.fdm-in { min-height: 34px; box-sizing: border-box; padding: 6px 9px; min-width: 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.fdm-hits { display: flex; flex-wrap: wrap; gap: 6px; }
.fdm-said { font-size: 12px; color: var(--ink-2); }
.fdm-said.is-no { color: var(--amber); }
.gv-none { font-size: 12px; color: var(--dim); }
.gv-flags { display: flex; flex-direction: column; gap: 4px; }
.gv-flag { font-size: 13px; color: var(--amber, #e0a33a); }
.gv-workings { display: flex; flex-direction: column; gap: 2px; }
.gv-working { font-family: var(--mono); font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
.gv-note { margin: 0; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 var(--mono); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.gv-note.is-wait { color: var(--dim); }
.gv-file { align-self: flex-start; }
.gv-prints { display: flex; flex-wrap: wrap; gap: 8px; }
/* WHO PAYS AT A GP PRACTICE (gppayers.ts, GP Phase 2) */
.gpp-split { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.gpp-h { font-size: 13px; font-weight: 600; color: var(--ink); }
.gpp-who { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.gpp-pick, .gpp-act, .gpp-panelform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.gpp-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; min-width: 0; }
.gpp-k { color: var(--ink-2); overflow-wrap: anywhere; }
.gpp-v { font-family: var(--mono); color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.gpp-scheme .gpp-v { color: var(--teal); }
.gpp-patient { font-weight: 600; border-top: 1px solid var(--rule); padding-top: 4px; }
.gpp-cap .gpp-v { color: var(--dim); font-size: 12px; }
.gpp-dim { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.gpp-warn { font-size: 12px; color: var(--amber, #e0a33a); overflow-wrap: anywhere; }
.gpp-claimed { font-size: 12px; color: var(--teal); overflow-wrap: anywhere; }
.gpp-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gpp-rb { flex: 1 1 100%; font-size: 12px; color: var(--ink); }
.gpp-sub { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.gpp-sources { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.gpp-panel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--rule); }
.gpp-in { min-width: 0; max-width: 100%; }
.gpp-table { width: 100%; min-height: 12em; font: 11px/1.4 var(--mono); }
/* VACCINATION (gpvax.ts, GP Phase 3): the due list, the dose form */
.gx-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gx-due { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.gx-st { flex: 0 0 7.5em; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.gx-due.is-overdue .gx-st { color: var(--red, #e06c5a); }
.gx-due.is-due .gx-st, .gx-due.is-review .gx-st { color: var(--amber, #e0a33a); }
.gx-due.is-cannot-tell .gx-st { color: var(--amber, #e0a33a); }
.gx-what { font-size: 13px; font-weight: 600; color: var(--ink); }
.gx-why { flex: 1 1 100%; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.gx-more summary { cursor: pointer; font-size: 12px; color: var(--dim); }
.gx-unread { font-size: 12px; color: var(--amber, #e0a33a); overflow-wrap: anywhere; }
.gx-src { font-family: var(--mono); font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
.gx-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: 6px; min-width: 0; }
.gx-prod { grid-column: 1 / -1; }
.gx-hist { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.gx-here { font-size: 11px; color: var(--teal); }
.gx-past { font-size: 11px; color: var(--amber, #e0a33a); }
.gx-again[hidden] { display: none; }
/* 🧪 Quick bloods (GP Phase 4): order sets, point-of-care entry, graded results. */
.gb-sets .gb-set { font-weight: 600; }
.gb-said { display: flex; flex-direction: column; gap: 3px; }
.gb-said-ok { font-size: 12px; color: var(--teal); }
.gb-said-miss { font-size: 12px; color: var(--amber, #e0a33a); }
.gb-panel { min-width: 0; }
.gb-group { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.gb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: 6px; }
.gb-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gb-cell-l { font-size: 12px; color: var(--dim); }
.gb-results { display: flex; flex-direction: column; gap: 4px; }
.gb-res { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }
.gb-res-l { font-size: 13px; color: var(--ink); min-width: 9em; }
.gb-res-v { font-size: 13px; color: var(--ink); }
.gb-res-g { font-size: 12px; font-weight: 600; color: var(--dim); }
.gb-res-ref, .gb-res-why { font-size: 11px; color: var(--dim); flex-basis: 100%; overflow-wrap: anywhere; }
.gb-borderline .gb-res-g, .gb-abnormal .gb-res-g { color: var(--amber, #e0a33a); }
.gb-critical { border-color: var(--amber, #e0a33a); }
.gb-critical .gb-res-g { color: var(--amber, #e0a33a); text-transform: uppercase; }
.gb-normal .gb-res-g { color: var(--teal); }
/* Referrals through S-EMR (GP Phase 5b/5c): the consent form under a kept
   letter, and the Referrals in page. */
.gb-send { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 8px; }
.gb-crosses, .gb-from, .gb-consent { color: var(--dim); }
.gb-giver.is-dim { opacity: .5; }
.gb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.gb-row, .gb-outrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gb-state { color: var(--teal); }
.gb-replytext { border-left: 3px solid var(--teal); padding-left: 8px; white-space: pre-wrap; }
.gb-reply { min-height: 90px; }
.gb-attach { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
/* The session dashboard (GP Phase 6): counts, time per patient, one row per
   visit (a button: it opens the folder), the owed lists. A missing time is
   dim, never filled. */
.gs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.gs-head .pv-title { margin-right: auto; }
.gs-day { color: var(--ink); }
.gs-counts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.gs-count { border: 1px solid var(--rule); border-radius: 8px; padding: 8px; background: var(--panel-2); }
.gs-count-n { font-size: 22px; color: var(--ink); }
.gs-count-l { font-size: 12px; color: var(--dim); }
.gs-c-held .gs-count-n, .gs-c-left_unpaid .gs-count-n { color: var(--amber, #e0a33a); }
.gs-avg { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.gs-avg-l { min-width: 70px; color: var(--dim); }
.gs-avg-n, .gs-note { font-size: 12px; color: var(--dim); }
.gs-row { display: grid; grid-template-columns: 2fr 2fr repeat(5, 0.8fr) 2fr; gap: 6px; align-items: center;
  width: 100%; text-align: left; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; cursor: pointer; }
.gs-row-h { cursor: default; color: var(--dim); font-size: 12px; }
.gs-s-held .gs-state, .gs-s-left_unpaid .gs-state { color: var(--amber, #e0a33a); }
.gs-s-in_room .gs-state { color: var(--teal); }
.gs-miss { color: var(--dim); opacity: .7; }
.gs-flags { font-size: 12px; color: var(--dim); }
.gs-owedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.gs-who { text-align: left; border: 0; background: none; color: var(--ink); font: inherit; padding: 2px 0; cursor: pointer; }
@media (max-width: 760px) {
  .gs-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gs-row { grid-template-columns: 1fr 1fr; }
  .gs-row-h { display: none; }
}
/* Chronic care (GP Phase 7): the register, one card per enrolled condition
   (a measure per row: reading, target, status, due), the annual checks, the
   care plan; and the 📋 recall list (a row is a button: it opens the folder).
   A status is a word and a symbol, never colour alone. */
.gc-hsg, .gc-left { font-size: 12px; color: var(--dim); }
.gc-said { font-size: 12px; color: var(--teal); }
.gc-warn { font-size: 12px; color: var(--amber, #e0a33a); display: flex; gap: 8px; align-items: center; }
.gc-cond { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.gc-cond-l { min-width: 160px; color: var(--ink); }
.gc-on { color: var(--teal); }
.gc-m, .gc-chk { display: grid; grid-template-columns: 1.2fr 1.6fr 1.2fr 1.2fr 1.8fr; gap: 6px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--line); }
.gc-chk { grid-template-columns: 1.6fr 1.4fr 1.8fr auto; }
.gc-m-l { color: var(--ink); }
.gc-m-t, .gc-m-d { font-size: 12px; color: var(--dim); }
.gc-s-above .gc-m-s, .gc-s-below .gc-m-s, .gc-s-unit .gc-m-s { color: var(--amber, #e0a33a); }
.gc-s-at .gc-m-s { color: var(--teal); }
.gc-sub { margin-top: 8px; }
.gc-bloods { margin-top: 8px; }
.gc-goals { margin: 4px 0 8px 18px; }
.gc-review { font-size: 12px; color: var(--dim); }
.gc-src { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: 12px; }
.gc-src-a { color: var(--dim); }
.gr-row { display: grid; grid-template-columns: 1.4fr 1fr 3fr; gap: 6px; align-items: center; width: 100%;
  text-align: left; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); font: inherit; cursor: pointer; }
.gr-conds, .gr-items { font-size: 12px; color: var(--dim); }
@media (max-width: 760px) {
  .gc-m, .gc-chk, .gr-row { grid-template-columns: 1fr 1fr; }
}

/* 💉 Vaccination, the owed items: withdraw beside a dose, the withdrawn struck, certificates kept. */
.gx-hrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.gx-hrow .gx-hist { flex: 1 1 14em; }
.gx-wd { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.gx-wslot { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.gx-wslot:empty { display: none; }
.gx-wslot .gx-wwhy { flex: 1 1 16em; }
.gx-wyes[hidden] { display: none; }
.gx-wsaid { flex: 1 1 100%; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.gx-gone { font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.gx-gone-why { font-size: 12px; color: var(--amber, #e0a33a); }
.gx-cert-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.gx-dayacts { align-items: center; }

/* 📝 The clinic's GP lists (GP owed items): the seed beside the clinic's own. */
.gl-page { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 16px; }
.gl-head { display: flex; align-items: center; gap: 8px; }
.gl-title { margin-right: auto; font-size: 16px; font-weight: 600; color: var(--ink); }
.gl-note, .gl-meta { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.gl-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gl-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; min-width: 0; }
.gl-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gl-table { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-height: 60vh; overflow: auto; }
.gl-srow { font-size: 12px; color: var(--ink-2); padding: 3px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.gl-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; padding: 4px 0; border-bottom: 1px solid var(--line); }
.gl-in { flex: 1 1 8em; min-width: 6em; font-size: 12px; }
textarea.gl-in { flex-basis: 100%; min-height: 4.5em; resize: vertical; }
.gl-problem { font-size: 12px; color: var(--amber, #e0a33a); overflow-wrap: anywhere; }
.gl-rb { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.gl-yes[hidden], .gl-yes-revert[hidden], .gl-revert[hidden] { display: none; }
@media (max-width: 760px) {
  .gl-cols { grid-template-columns: minmax(0, 1fr); }
}

/* A lab report read into a chart (E10): the panel in the folder's sheet. */
.lc-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lc-h { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lc-means, .lc-note { font-size: 12px; color: var(--dim); }
.lc-note.is-no { color: var(--red); }
.lc-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.lc-grade { font-size: 12px; color: var(--amber); }
.lc-list { display: flex; flex-direction: column; gap: 2px; }
.lc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-size: 13px; color: var(--ink); }
.lc-row > select { max-width: 100%; min-width: 0; }
.lc-source-details { flex: 0 0 100%; min-width: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.lc-source-details label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lc-source-details input { width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.lc-row.is-unsure .lc-val { color: var(--red); }
.lc-unsure { font-family: var(--mono); font-size: 11px; color: var(--red); }
.lc-fix { min-height: 90px; width: 100%; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--rule);
  border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--mono); }
.lc-who, .lc-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.lc-chip { min-height: 34px; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--teal); cursor: pointer;
  border: 1px solid rgba(79,214,200,0.4); background: rgba(79,214,200,0.08); }
.lc-key, .lc-date { min-height: 34px; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--rule); border-radius: 7px;
  background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
.lc-chosen { font-size: 12px; color: var(--ink-2); }
/* EXERCISE PRESCRIPTION (4 Oct, behind its flag): the library, the programme
   and its doses. Fields wrap into as many columns as fit, so one card reads
   as two columns on a phone and a single row on a desktop. */
.ex-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ex-h { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ex-note { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.ex-note.is-no { color: var(--red); }
.ex-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.ex-postop { font-size: 12px; color: var(--amber); border: 1px solid var(--amber); border-radius: 7px; padding: 6px 9px; }
.ex-chips, .ex-acts { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ex-chip { min-height: 34px; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--teal); cursor: pointer;
  border: 1px solid rgba(79,214,200,0.4); background: transparent; }
.ex-chip.is-on { background: rgba(79,214,200,0.16); color: var(--ink); }
.ex-find, .ex-in { min-height: 34px; box-sizing: border-box; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 7px;
  background: var(--panel-2); color: var(--ink); font: 13px var(--display); width: 100%; min-width: 0; }
.ex-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow: auto; }
.ex-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 7px; min-width: 0; }
.ex-row-t { min-width: 0; flex: 1 1 auto; font-size: 12.5px; color: var(--ink); }
.ex-name { font-size: 13px; color: var(--ink); }
.ex-doc { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.ex-cat { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.ex-row-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-diagram { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.ex-pic { width: 100%; max-width: 240px; }
.ex-pic svg { display: block; width: 100%; height: auto; }
.ex-prog { display: flex; flex-direction: column; gap: 6px; }
.ex-item { border: 1px solid var(--rule); border-radius: 9px; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.ex-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ex-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; min-width: 0; }
.ex-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-fl { font-size: 11px; color: var(--dim); }
.ex-warn { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--amber); }
.fv-enc-ex { margin-top: 3px; font-size: 12px; color: var(--teal-2); overflow-wrap: anywhere; }
.rel-hits { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; }
.rel-hit { text-align: left; min-height: 30px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--ink); font-size: 12.5px; cursor: pointer; overflow-wrap: anywhere; }
.rel-chosen { font-size: 12px; color: var(--ink-2); }
.dk-related { margin: 10px 0; }
.pm-to .pm-k { font: 11px var(--mono); color: var(--label); margin-right: 8px; }
.pm-to .pm-v { font-size: 14px; color: var(--ink); }
/* THE ENCOUNTER HEADER'S TABS (encounter-patient.ts, 24 September):
   registration, the bio-social profile, medication, correspondence. */
.ep-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 10px; }
.ep-block { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.ep-h { font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin-bottom: 6px; }
.ep-kv { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 10px; padding: 3px 0; font-size: 13px; }
.ep-k { color: var(--dim); }
.ep-v { color: var(--ink); overflow-wrap: anywhere; }
.ep-kv.is-past .ep-k, .ep-kv.is-past .ep-v { text-decoration: line-through; color: var(--dimmer); }
.ep-kv.is-avoid .ep-k { color: var(--amber-ink); }
.ep-none { font-size: 12.5px; color: var(--dimmer); }
/* #1193: the Registration area in two columns (option B). Layout only; the
   rows reuse .ep-kv / .ep-k / .ep-v for their type. */
.rg-head { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin: -4px 0 10px; }
.rg-missing.is-missing { color: var(--amber-ink); }
.rg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rg-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rg-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.rg-r { grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) auto; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line); }
.rg-r:last-of-type { border-bottom: 0; }
.rg-v.is-missing { color: var(--dimmer); }
.rg-go { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--label); cursor: pointer; }
.rg-insurance, .rg-back { margin-top: 8px; }
@media (max-width: 900px) { .rg-cols { grid-template-columns: minmax(0, 1fr); } }
.ep-line { font-size: 13px; color: var(--ink); padding: 2px 0; }
.ep-dim { color: var(--dimmer); }
.ep-bs, .ep-doc { padding: 6px 0; border-top: 1px solid var(--line); }
.ep-bs:first-of-type, .ep-doc:first-of-type { border-top: 0; }
.ep-bs-top { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.ep-bs-top .ep-k { flex: 0 0 34%; }
.ep-bs-top .ep-v { flex: 1 1 auto; min-width: 0; }
.ep-when { font: 11px var(--mono); color: var(--dim); white-space: nowrap; }
.ep-add { width: 28px; height: 26px; border: 1px solid var(--rule); border-radius: 6px; color: var(--teal); cursor: pointer; }
.ep-earlier { font-size: 12px; color: var(--dim); padding-left: 34%; }
.ep-addform { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 0 34%; }
.ep-addform .tb-in { flex: 1 1 200px; }
.ep-addform .ask-line { flex: 1 1 100%; }
.ep-syn { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; margin-top: 3px; }
.ep-doc.is-past .ep-k { text-decoration: line-through; }
/* SETUP (setup.ts) */
.su-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.su-block > .btn { align-self: flex-start; }
.su-h { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
/* THE HELP BUTTON (Ticket #1178, app/helpbtn.ts): an (i) at the right end of
   a section's heading, and the explanation it opens beneath the heading. One
   block for every section that carries one; tokens only. */
.has-help { display: flex; align-items: center; gap: 8px; }
.has-help > .help-btn { margin-left: auto; }
.help-bar { display: flex; justify-content: flex-end; }
.help-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--dim); font: inherit; line-height: 1; cursor: pointer; }
.help-btn:hover, .help-btn.is-on { color: var(--teal); }
.help-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: -6px; }
.help-panel { margin: 0 0 10px; padding: 8px 12px; border-left: 2px solid var(--teal);
  background: var(--sunk); color: var(--dim); line-height: 1.5; }
.help-panel[hidden] { display: none; }
.help-text { margin: 0; }
.help-text + .help-text { margin-top: 6px; }
.su-sub { font: 11px var(--mono); color: var(--label); letter-spacing: .04em; margin: 8px 0 3px; }
.su-now { font-size: 13px; color: var(--ink); }
.su-dim { color: var(--dimmer); }
.su-note { font-size: 11.5px; color: var(--dim); margin: 4px 0; line-height: 1.45; }
.su-routes { margin-top: 10px; }
.su-route { border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; margin: 5px 0; }
.su-route.is-on { border-color: var(--teal); }
.su-route.is-off { opacity: .75; }
.su-route-h { font-weight: 600; font-size: 12.5px; }
.su-warn { font-size: 12px; color: var(--amber-ink); margin: 4px 0; }
.su-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.su-in { flex: 1 1 auto; min-width: 0; min-height: 34px; box-sizing: border-box; padding: 6px 9px;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2); color: var(--ink); font: 13px var(--display); }
textarea.su-in { resize: vertical; }
.su-logo { margin-bottom: 10px; }
.su-logo-pic { min-height: 48px; display: flex; align-items: center; font-size: 12px; color: var(--dim); margin: 4px 0 6px; }
.su-logo-pic img { max-height: 64px; max-width: 100%; background: #fff; border-radius: 4px; padding: 4px; }
/* A speedinsert's diagram and its [[ ]] blanks (25 September). The text sizes
   come from the classes these sit beside -- tb-item-sub, su-note, su-logo-pic --
   so the generated desktop type scale needs nothing new. */
.spd-blanks { color: var(--teal); font-family: var(--mono); }
.spd-tags { color: var(--label); }
.spd-shape { display: flex; gap: 6px; margin-top: 6px; }
.spd-under { display: flex; flex-direction: column; gap: 6px; }
.spd-diagram { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.spd-pic img { max-height: 240px; }
.sd-coming { display: flex; flex-direction: column; gap: 6px; }
.sd-coming-row { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  padding: 10px 12px; border: 1px dashed var(--rule); border-radius: var(--r); }
.sd-coming-t { font-size: 14px; color: var(--ink); }
.sd-coming-s { font-size: 13px; color: var(--dim); }
.reg-schemes { max-height: 50vh; overflow-y: auto; }
.reg-schemes .reg-card-head .btn { margin-left: auto; }
.sd-coming-tag { font-size: 10.5px; letter-spacing: 0.12em; color: var(--amber); }
.fv-row { padding: 3px 0; }
.fv-row-t { font-size: 13px; color: var(--ink); }
.fv-row-s { font-size: 11.5px; color: var(--dim); }
/* In the tiles and the bar the section's SOURCE note ("the medication tag")
   is the old page's provenance line; here it crowds the drug it annotates. */
#folder.fo-desk .fo-h-r { display: none; }
#folder.fo-desk .fo-enc-l { flex: 0 1 auto; min-width: 0; }
#folder.fo-desk .fo-enc-r { margin-left: auto; flex: 0 0 auto; color: var(--dim); }
.fo-not { font-size: 10.5px; color: var(--dimmer); line-height: 1.45;
  padding-top: 6px; border-top: 1px solid var(--hush); margin-top: 8px; }

/* -- amending the note under review (commit 14) ------------------------ */
.ed { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hush); }
.ed-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-row .is-on { color: var(--teal); border-color: var(--line); }
.ed-on { font-size: 11.5px; color: var(--dim); margin: 6px 0 4px; }
.ed-box { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: var(--r);
  border: 1px solid var(--rule); background: transparent; color: inherit;
  font: inherit; font-size: 12.5px; resize: vertical; }
.ed-note { font-size: 10.5px; color: var(--dimmer); margin-top: 4px; }

/* -- the three tags behind the chart (commit 15) ----------------------- */
.fo-ms { display: flex; flex-direction: column; gap: 2px; }
.fo-m { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; }
.fo-m-n { font-weight: 600; min-width: 90px; }
.fo-m-off { font-size: 11px; color: var(--red-ink); }
.fo-m.is-off .fo-m-v { color: var(--red-ink); }
.fo-m-un { font-size: 10.5px; color: var(--amber); }
.fo-m-w { font-size: 11px; color: var(--dimmer); margin-left: auto; }
.fo-m-t { font-size: 11px; color: var(--dim); padding: 0 0 3px 8px; }
.fo-enc.is-gone .fo-enc-l { text-decoration: line-through; color: var(--dimmer); }

/* -- monitored conditions, pinned by the doctor (24 September) --------- */
.mo-body { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
/* nothing pinned on the Investigations tab: one slim bullet, no heading over nothing (5 Dec) */
.fo-monitoring.is-quiet { margin: 0; padding: 0; border: 0; }
.fo-monitoring.is-quiet > .fo-h { display: none; }
.fo-monitoring.is-quiet .mo-body { margin: 0; }
.mo-card { border: 1px solid var(--rule); border-radius: var(--r); padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px; }
.mo-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.mo-t { font-weight: 600; font-size: 12px; }
.mo-s { font-size: 11px; color: var(--dim); }
.mo-line-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.mo-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.mo-name { font-size: 12px; }
.mo-latest { font-size: 11px; color: var(--ink); }
.mo-band-words { font-size: 10.5px; color: var(--dim); }
.mo-chart { flex: 0 0 150px; width: 150px; height: 44px; }
.mo-svg { width: 100%; height: 44px; display: block; overflow: visible; }
.mo-band { fill: var(--teal); fill-opacity: .10; }
.mo-p50 { stroke: var(--teal); stroke-width: 1; stroke-dasharray: 3 2; stroke-opacity: .6;
  vector-effect: non-scaling-stroke; }
.mo-line { stroke: var(--teal-2); stroke-width: 1.2; stroke-opacity: .8; vector-effect: non-scaling-stroke; }
.mo-dot { fill: var(--teal-2); fill-opacity: .75; }
.mo-dot.is-last { fill: var(--teal); fill-opacity: 1; }
.mo-nopoints { font-size: 11px; color: var(--dimmer); }
.mo-acts { display: flex; gap: 6px; }
.mo-form, .mo-pin, .mo-cal { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mo-pin { border-top: 1px solid var(--rule); padding-top: 6px; }
.mo-form .tb-in, .mo-pin .tb-in { width: auto; flex: 1 1 120px; }
.mo-cal .tb-in { flex: 0 1 90px; min-width: 70px; }
.mo-k { font-size: 11px; color: var(--dim); }
.mo-why { font-size: 11px; color: var(--dimmer); width: 100%; }
.mo-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mo-gone { font-size: 11px; color: var(--dimmer); text-decoration: line-through; }

/* -- correcting one field, read back first (commit 16) ----------------- */
.fo-fix { margin: 6px 0 8px; padding: 8px; border: 1px solid var(--rule);
  border-radius: var(--r); display: flex; flex-direction: column; gap: 6px; }
.fo-fix-h { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); }
.fo-fix-in { padding: 7px 9px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; font-size: 12.5px; }
.fo-fix-note { font-size: 10.5px; color: var(--dimmer); }
.fo-fix-back { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
  font-size: 12px; padding: 6px 0; border-top: 1px solid var(--hush); }
.fo-fix-was { color: var(--dimmer); text-decoration: line-through; }
.fo-fix-arrow { color: var(--dim); }
.fo-fix-now { color: var(--teal); font-weight: 600; }
.fo-fix-acts { display: flex; gap: 6px; flex-wrap: wrap; }
button.fo-v { background: transparent; border: 0; color: inherit; font: inherit;
  font-size: 12px; text-align: left; padding: 0; cursor: pointer; }
button.fo-v:hover { color: var(--teal-2); }
/* The front screen — the console's landing page (mirrors the bot's first screen). */
.home { padding: 18px 16px 24px; }
.home-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 16px; }
.home-t { font-weight: 600; font-size: 18px; }
.home-sub { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.home-key { display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 14px 12px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel); color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .12s, background .12s; min-height: 74px; }
.home-key:hover { border-color: var(--teal-2); background: rgba(79,214,200,0.06); }
.home-key:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.home-key-lab { font-weight: 600; font-size: 15px; }
.home-key-hint { font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.home-key-away { cursor: default; opacity: .62; }
.home-key-away:hover { border-color: var(--rule); background: var(--panel); }
.home-key-tag { font-size: 9px; letter-spacing: .1em; color: var(--amber); margin-top: 2px; }
/* THE PANEL CHROME (24 September) -- the web app's one template: ⛶ full
   view and × close, top right, small icons whose HIT AREA is the 44px floor
   (the transparent ::before), never the drawing. On a router screen it rides
   a zero-height row where the Home bar was, so the screen below keeps every
   pixel it had; the icons sit over its top-right corner. */
.pc-view { position: relative; height: 0; z-index: 250; }
.pc-view > .pc-chrome { position: absolute; top: 6px; right: 12px; }
.pc-chrome { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pc-btn { position: relative; width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hush); border-radius: 7px; background: var(--panel);
  color: var(--dim); font: 16px/1 var(--display, inherit); cursor: pointer; }
.pc-btn::before { content: ''; position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%); }
.pc-btn:hover { border-color: var(--teal-2); color: var(--teal-2); }
.pc-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pc-btn[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
/* FULL VIEW, when the browser will not go fullscreen: the panel is a fixed
   overlay over the whole viewport; and a router screen made full folds the
   top bar and the encounter strip away so the screen is the page. */
.pc-overlay { position: fixed !important; inset: 0 !important; z-index: 300 !important;
  max-height: none !important; width: auto !important; border-radius: 0 !important;
  background: var(--panel); overflow: auto; display: flex; flex-direction: column; }
.is-fullview:fullscreen { background: var(--panel); overflow: auto; display: flex;
  flex-direction: column; width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
body.pc-page-full #spine, body.pc-page-full #encworkspace,
body.pc-page-full #demobanner { display: none !important; }
.home-resume { display: flex; align-items: baseline; gap: 12px; width: 100%;
  margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--teal); border-radius: 10px;
  background: rgba(79,214,200,0.10); color: var(--ink); cursor: pointer; text-align: left;
  transition: background .12s; }
.home-resume:hover { background: rgba(79,214,200,0.18); }
.home-resume:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.home-resume-lab { font-weight: 600; font-size: 15px; color: var(--teal); }
.home-resume-who { font-size: 13px; color: var(--ink-2); }

/* Front screen, clustered by clinic day. */
.home-cluster { margin-bottom: 18px; }
.home-cluster-h { display: flex; gap: 10px; align-items: baseline; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--hush); }
.home-cluster-t { font-weight: 600; font-size: 13.5px; color: var(--ink); letter-spacing: .01em; }
.home-cluster-note { font-size: 10.5px; color: var(--dimmer); }
.home-cluster .home-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.home-cluster .home-key { min-height: 0; padding: 11px 12px; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-cluster .home-key-lab { font-size: 13.5px; }
.home-dial-btn { margin-left: auto; font-size: 12px; padding: 5px 12px; border: 1px solid var(--teal); border-radius: 6px; color: var(--teal); background: transparent; cursor: pointer; }
.home-dial-btn:hover { background: rgba(79,214,200,0.10); }

/* THE PHONE'S SIX PLACES (home.js). One place is shown at a time and the foot
   switches between them, so a thumb reaches every part of the clinic without a
   thirty-two-button scroll. Offered below 900px only -- the desktop keeps the
   whole day down the page, which is what its room is for. */
.home-places { display: block; }
/* Room for the foot bar, so the last row of a place is never under it. */
.home { padding-bottom: 84px; }
/* FIXED, NOT STICKY, and that is a defect found by looking at it. `sticky;
   bottom: 0` only pins once the content is tall enough to scroll, so a place
   holding four buttons left the bar floating in the middle of the screen with
   dead space beneath it -- the one position a thumb bar must never be in.
   Fixed puts it at the foot whatever the place holds. Safe here because the
   only other control over a screen, #viewchrome, is hidden on the home screen (app.js),
   and the capture strip and foot rule belong to the encounter view. */
.home-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--panel); border-top: 1px solid var(--hush);
}
.home-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 6px; min-height: 52px;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--dim); cursor: pointer; font: inherit;
}
.home-tab:active { background: rgba(79,214,200,0.10); }
.home-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.home-tab-icon { font-size: 17px; line-height: 1; }
.home-tab-lab { font-size: 10.5px; letter-spacing: .02em; }
.home-tab-on { color: var(--teal); background: rgba(79,214,200,0.09); }
.home-tab-on .home-tab-lab { font-weight: 600; }

/* The desktop keeps the list and never draws a foot bar. */
@media (min-width: 900px) {
  .home { padding-bottom: 24px; }
  .home-tabs { display: none; }
}
/* wider real estate: more columns on a desktop, tighter rhythm */
@media (min-width: 900px) {
  .home { max-width: 1100px; margin: 0 auto; }
  .home-cluster .home-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
/* -- the cabinet's photographs (commit 17) ----------------------------- */
.fo-films { display: flex; flex-direction: column; gap: 6px; }
.fo-film { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fo-film-b { font-size: 11.5px; text-align: left; }
.fo-film-n { font-size: 11.5px; color: var(--dimmer); }
.fo-film.is-gone .fo-film-n { text-decoration: line-through; }
.fo-film-x { font-size: 10.5px; color: var(--amber); }
.fo-film-img { max-width: 100%; border-radius: var(--r);
  border: 1px solid var(--hush); }

/* ── Stage 2: the desktop full-screen dial view ──────────────────────── */
.dial-view { min-height: 100vh; padding: 14px 18px 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.dl-top { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.dl-who { display: flex; gap: 12px; align-items: baseline; flex: 1 1 auto; flex-wrap: wrap; }
.dl-who-name { font-weight: 600; font-size: 18px; }
.dl-who-line { font-size: 12px; color: var(--dim); }
.dl-allergy { font-size: 10.5px; color: var(--red-ink); border: 1px solid #4a2521; padding: 2px 8px; border-radius: 4px; background: rgba(224,90,74,.07); }
.dl-close { font-size: 12px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 6px; color: var(--dim); background: transparent; cursor: pointer; white-space: nowrap; }
.dl-close:hover { border-color: var(--teal-2); color: var(--teal-2); }
.dl-grid { flex: 1 1 auto; display: grid; grid-template-columns: 300px 1fr 340px; gap: 12px; min-height: 0; }
.dl-left, .dl-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dl-centre { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.dl-corner { border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); padding: 12px 14px; overflow: auto; flex: 1 1 0; min-height: 0; }
.dl-corner-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--hush); }
.dl-corner-t { font-weight: 600; font-size: 13px; }
.dl-corner-sub { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.dl-corner-body { display: flex; flex-direction: column; gap: 2px; }
.dl-wr-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.05); }
.dl-wr-row:first-child { border-top: 0; }
.dl-wr-who { font-size: 12.5px; font-weight: 500; }
.dl-wr-who::before { content: '\25cf'; font-size: 8px; margin-right: 6px; color: var(--dimmer); vertical-align: middle; }
.dl-lamp-green .dl-wr-who::before { color: var(--teal); }
.dl-lamp-amber .dl-wr-who::before { color: var(--amber); }
.dl-lamp-red .dl-wr-who::before { color: var(--red); }
.dl-wr-wait { font-size: 11px; color: var(--dim); }
.dl-dial { position: relative; width: 300px; height: 300px; }
.dl-dial-svg { width: 100%; height: 100%; display: block; }
.dl-hex-outer { fill: var(--panel); stroke: var(--rule); stroke-width: 1; }
.dl-ring { fill: none; stroke: var(--hush); stroke-width: 1; stroke-dasharray: 2 7; }
.dl-hex-inner { fill: rgba(79,214,200,.05); stroke: var(--teal); stroke-width: 1.5; }
.dl-needle { stroke: var(--amber); stroke-width: 2; stroke-linecap: round; }
.dl-hub { fill: var(--amber); }
.dl-dial-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dl-dial-t { font-weight: 600; font-size: 15px; color: var(--ink); }
.dl-dial-sub { font-size: 11px; color: var(--teal-2); margin-top: 4px; }
.dl-rec { width: 100%; max-width: 540px; text-align: center; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
.dl-rec-t { font-size: 10.5px; color: var(--dim); letter-spacing: .06em; }
.dl-note-t { font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: var(--ink); }
.dl-list-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.05); }
.dl-list-row:first-child { border-top: 0; }
.dl-list-code { font-size: 11.5px; color: var(--dim); min-width: 58px; }
.dl-list-name { font-size: 12.5px; }
.dl-list-row.on .dl-list-code, .dl-list-row.on .dl-list-name { color: var(--teal); }
@media (max-width: 899px) { .dl-grid { grid-template-columns: 1fr; } .dl-centre { order: -1; } .dl-dial { width: 240px; height: 240px; } }

/* -- the theatre list (commit 18) -------------------------------------- */
.preclerk { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.pc-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.pc-t { font-weight: 600; }
.pc-n { font-size: 11px; color: var(--dim); }
.pc-row { padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.pc-row:first-of-type { border-top: 0; }
.pc-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; }
.pc-who { font-weight: 600; background: transparent; border: 0; color: inherit;
  font: inherit; font-weight: 600; padding: 0; cursor: pointer; }
.pc-who:hover { color: var(--teal-2); }
.pc-for { color: var(--dim); }
.pc-when { font-size: 11px; color: var(--ink-2); }
.pc-near { font-size: 11px; color: var(--dimmer); }
.pc-prog { font-size: 11px; color: var(--dimmer); margin-left: auto; }
.pc-prog.is-open { color: var(--amber); }
.pc-list { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 0 4px; }
.pc-task { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.pc-tick { background: transparent; border: 0; color: var(--dim); font-size: 14px;
  cursor: pointer; padding: 0; line-height: 1; }
.pc-tick.is-done { color: var(--teal); }
.pc-task-t.is-done { color: var(--dimmer); }
.pc-task-by { font-size: 10.5px; color: var(--dimmer); margin-left: auto; }
.pc-earlier { font-size: 10.5px; color: var(--dimmer); margin-top: 6px; }
.pc-earlier-l { font-size: 10.5px; color: var(--dimmer); padding-left: 8px; }
.pc-none { font-size: 11px; color: var(--dimmer); }
/* PHASE 2 OF THE VENDOR'S THREE (8 Nov 2026): the case card's gates, the
   confirm, and the doctor's request to the vendor once confirmed. */
.pc-confirm { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); }
.pc-confirm-h { color: var(--label); letter-spacing: .06em; text-transform: uppercase; }
.pc-gate { display: grid; grid-template-columns: 18px minmax(110px, auto) minmax(0, 1fr); gap: 8px; align-items: baseline; color: var(--dim); }
.pc-gate.is-ok .pc-gate-mark { color: var(--teal); }
.pc-gate:not(.is-ok) .pc-gate-mark { color: var(--amber); }
.pc-gate-l { color: var(--ink-2); }
.pc-confirm-v { color: var(--dim); line-height: 1.45; }
.pc-confirm-v.is-no { color: var(--amber-ink); }
.pc-confirm-done { color: var(--teal); }
.pc-vendor { margin-top: 6px; }
/* PHASE 3 (8 Nov 2026): the operation's encounter -- the implant card and
   the vendor's invoice. Plain flow: nothing inside scrolls of its own. */
.vp-section { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.vp-h { margin: 0; color: var(--ink); font-weight: 600; }
.vp-body { display: flex; flex-direction: column; gap: 6px; }
/* The desk's Vendors tab (8 Nov, "4 desk"): the vendors' invoices under
   their messages, each approved or queried with a reason. */
.vi-invoices { margin-top: 14px; }
.vi-inv { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--rule); }
.vi-head { margin: 0; color: var(--ink); font-weight: 600; }
.vi-state, .vi-line { margin: 0; color: var(--dim); }
.vi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
/* ── Stage 2b: the dial turns ────────────────────────────────────────── */
.dl-needle { transition: all .32s cubic-bezier(.34,1.4,.5,1); opacity: .35; }
.dl-needle.on { opacity: 1; }
.dl-mark { cursor: pointer; }
.dl-mark-dot { fill: var(--panel); stroke: var(--rule); stroke-width: 1.5; transition: fill .15s, stroke .15s; }
.dl-mark-n { fill: var(--dim); font-size: 11px; font-family: var(--mono, ui-monospace, monospace); pointer-events: none; }
.dl-mark:hover .dl-mark-dot { stroke: var(--teal-2); }
.dl-mark:focus-visible { outline: none; }
.dl-mark:focus-visible .dl-mark-dot { stroke: var(--teal); stroke-width: 2; }
.dl-mark.on .dl-mark-dot { fill: var(--teal); stroke: var(--teal); }
.dl-mark.on .dl-mark-n { fill: #04120f; font-weight: 600; }
.dl-list-row { width: 100%; background: transparent; border: 0; text-align: left; cursor: pointer; border-top: 1px solid rgba(255,255,255,.05); }
.dl-list-row:first-child { border-top: 0; }
.dl-list-row:hover { background: rgba(79,214,200,.06); }
.dl-list-row:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.dl-list-n { font-size: 10.5px; color: var(--dimmer); min-width: 14px; }
.dl-list-row.on .dl-list-n { color: var(--teal); }

/* ── Stage 5: Patient status — pain trend, body map, readings ────────── */
.dl-pain-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.dl-pain-v { font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dl-pain-n { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.dl-spark { width: 100%; height: 46px; display: block; margin-bottom: 4px; }
.dl-spark-area { fill: rgba(79,214,200,.10); stroke: none; }
.dl-spark-line { fill: none; stroke: var(--teal); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dl-spark-dot { fill: var(--teal); }
.dl-bodymap { margin: 8px 0; max-height: 230px; overflow: hidden; }
.dl-reads { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.dl-read { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; border-top: 1px solid rgba(255,255,255,.05); }
.dl-read:first-child { border-top: 0; }
.dl-read-n { font-size: 12px; color: var(--ink-2); }
.dl-read-v { font-size: 12px; font-weight: 600; }
.dl-read.ab .dl-read-v { color: var(--amber); }

/* ── Stage 6: the recording foot — waveform + running transcript ──────── */
.dl-rec { width: 100%; max-width: 560px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
.dl-rec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dl-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dimmer); flex: none; }
.dl-rec-dot.live { background: var(--red); box-shadow: 0 0 0 3px rgba(224,90,74,.18); animation: dl-pulse 1.4s infinite; }
@keyframes dl-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.dl-rec-clock { font-size: 12px; color: var(--amber-ink); letter-spacing: .06em; }
.dl-rec-n { font-size: 10.5px; color: var(--dim); margin-left: auto; }
.dl-wave { width: 100%; height: 40px; display: block; }
.dl-wave-bar { fill: var(--amber); opacity: .5; }
.dl-transcript { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 132px; overflow: auto; text-align: left; }
.dl-tr-line { display: flex; flex-direction: column; gap: 2px; }
.dl-tr-line.on .dl-tr-text { color: var(--ink); }
.dl-tr-src { font-size: 9.5px; color: var(--dimmer); letter-spacing: .08em; text-transform: uppercase; }
.dl-tr-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.dl-takes { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.dl-take { display: flex; justify-content: space-between; padding: 3px 0; }
.dl-take.on .dl-take-src { color: var(--teal); }
.dl-take-src { font-size: 11px; color: var(--dim); }
.dl-take-meta { font-size: 10.5px; color: var(--dimmer); }

/* Stage 7: the dial's save status */
.dl-dial-status { font-size: 10px; margin-top: 4px; min-height: 12px; letter-spacing: .04em; }
.dl-dial-status.save { color: var(--dim); }
.dl-dial-status.ok { color: var(--teal); }
.dl-dial-status.no { color: var(--red-ink); }

/* ── Stage 8: the foot band — From the desk, and Your list ───────────── */
.dl-band { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-band .dl-corner { flex: none; max-height: 200px; }
.dl-desk-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-top: 1px solid var(--hush); }
.dl-desk-line:first-child { border-top: 0; }
.dl-desk-k { font-size: 12.5px; color: var(--ink); }
.dl-desk-v { font-size: 12px; color: var(--dim); text-align: right; }
.dl-task { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-top: 1px solid var(--hush); }
.dl-task:first-child { border-top: 0; }
.dl-task-mark { width: 13px; text-align: center; color: var(--faint); font-size: 12px; flex: 0 0 auto; }
.dl-task.done .dl-task-mark { color: var(--teal); }
.dl-task.done .dl-task-who { color: var(--dim); }
.dl-task-at { font-size: 11px; color: var(--dim); min-width: 44px; flex: 0 0 auto; }
.dl-task-who { font-size: 12.5px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-task.mine { background: var(--hush); border-radius: 6px; margin: 0 -6px; padding: 4px 6px; border-top-color: transparent; }
.dl-task.mine .dl-task-who { font-weight: 600; color: var(--teal); }
@media (max-width: 899px) { .dl-band { grid-template-columns: 1fr; } }

/* ── Stage 9: checking in — the picker that chooses nothing ──────────── */
.checkin { padding: 10px 14px; }
.ci-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.ci-t { font-weight: 600; }
.ci-where { font-size: 11px; color: var(--dim); margin-left: auto; }
.ci-close {
  flex: 0 0 auto; width: 32px; height: 32px; margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--dim); font: 22px/1 var(--display);
  cursor: pointer;
}
.ci-close:hover { color: var(--ink); border-color: var(--teal-2); }
.ci-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── the dedicated registration page ─────────────────────────────────── */
.registration { min-height: 0; overflow: auto; padding: 18px 22px 28px; }
.reg-page { width: min(1240px, 100%); margin: 0 auto; }
.reg-head { display: flex; align-items: flex-start; gap: 18px; }
.reg-title { min-width: 0; }
.reg-kicker { color: var(--teal); font-size: 10px; letter-spacing: .18em; }
.reg-title h1 { margin: 3px 0 2px; font-size: 24px; font-weight: 600; color: var(--ink-2); }
.reg-sub { margin: 0; max-width: 760px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.reg-close {
  margin-left: auto; flex: 0 0 auto; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--dim); font: 23px/1 var(--display); cursor: pointer;
}
.reg-close:hover { color: var(--ink); border-color: var(--teal-2); }
.reg-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.reg-tools { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; }
.reg-mode, .reg-tool { min-height: 32px; padding: 6px 11px; border-radius: 8px; font: 11px var(--mono); }
.reg-mode { border: 1px solid var(--teal); color: var(--teal); background: var(--line); }
.reg-mode-dot { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--teal); }
.reg-tool { border: 1px dashed var(--rule); color: var(--dimmer); background: transparent; }
.reg-tool:disabled { opacity: .72; cursor: not-allowed; }
.reg-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; align-items: start; }
.reg-card { min-width: 0; padding: 15px 16px; border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--panel); }
.reg-core { grid-row: span 2; }
.reg-standard { grid-column: 1 / -1; }
.reg-card-head { display: flex; align-items: baseline; gap: 10px; }
.reg-card h2 { margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.reg-card h3 { margin: 0 0 8px; color: var(--teal); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.reg-required, .reg-optional { margin-left: auto; font-size: 9px; letter-spacing: .12em; }
.reg-required { color: var(--amber); }
.reg-optional { color: var(--dimmer); }
.reg-help { margin: 7px 0 12px; color: var(--dim); font-size: 11px; line-height: 1.5; }
.reg-core-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.reg-active-field, .reg-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.reg-field-label { color: var(--dim); font: 10px var(--mono); letter-spacing: .05em; }
.reg-active-input, .reg-transcript, .reg-input {
  width: 100%; min-height: 38px; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--panel-2);
  color: var(--ink); font: 13px var(--display);
}
.reg-active-input:focus-visible, .reg-transcript:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.reg-active-input.bad { border-color: var(--red-ink); }
.reg-preview { grid-column: 1 / -1; min-height: 34px; display: flex; align-items: center; padding: 8px 10px; border: 1px solid var(--hush); border-radius: 7px; color: var(--teal); background: var(--line); font-size: 11px; }
/* The date of birth: a typed box with a calendar button; the native date
   input sits under the button, invisible, so its picker opens there and is
   narrowed by the age (24 September). */
.reg-dob-box { position: relative; display: flex; align-items: stretch; }
.reg-dob-box .reg-dob-text { padding-right: 44px; }
.reg-dob-text.bad { border-color: var(--red-ink); }
.reg-dob-cal { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; min-height: 38px;
  border: 0; border-left: 1px solid var(--rule); border-radius: 0 7px 7px 0; background: transparent;
  color: var(--ink-2); font-size: 15px; cursor: pointer; z-index: 1; }
.reg-dob-cal:hover, .reg-dob-cal:focus-visible { background: var(--line); outline: none; }
.reg-dob-pick { position: absolute; right: 0; bottom: 0; width: 40px; height: 38px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.reg-age-note { color: var(--amber-ink); font-size: 10.5px; line-height: 1.35; }
.reg-dob-error { grid-column: 1 / -1; margin-top: -5px; color: var(--red-ink); font-size: 10.5px; line-height: 1.35; }
.reg-commit { margin-top: 12px; width: 100%; }
.reg-status { min-height: 16px; margin-top: 10px; color: var(--dim); font-size: 11px; }
.reg-status.is-ok { color: var(--teal); }
.reg-rec-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.reg-rec-row .btn { min-height: 38px; padding: 7px 11px; font-size: 11px; }
.reg-record { color: var(--red-ink); border-color: rgba(224,90,74,.4); }
.reg-review-btn { color: var(--teal); }
.reg-readback { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--amber); color: var(--amber-ink); background: rgba(224,164,74,.08); font-size: 11px; line-height: 1.45; }
.reg-readback.is-complete { border-left-color: var(--teal); color: var(--teal); background: var(--line); }
.reg-readback.is-error { border-left-color: var(--red-ink); color: var(--red-ink); background: rgba(224,90,74,.08); }
/* THE PATIENT'S DETAILS (24 September), live: groups of chart fields. */
.reg-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.reg-detail-group { min-width: 0; }
.reg-detail-group.reg-wide { grid-column: span 2; }
.reg-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.reg-req { margin-left: 6px; padding: 0 5px; border-radius: 4px; color: var(--red-ink); background: rgba(224,90,74,.1); font-size: 9.5px; }
.reg-covers { display: flex; flex-direction: column; gap: 6px; }
.reg-cover { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 6px; align-items: center; }
.reg-cover-x { width: 32px; height: 32px; border: 1px solid var(--rule); border-radius: 50%; color: var(--dim); cursor: pointer; }
.reg-link { margin-top: 6px; padding: 4px 0; border: 0; background: none; align-self: flex-start; color: var(--teal); text-decoration: underline; font-size: 12px; cursor: pointer; }
@media (max-width: 1100px) {
  .reg-main { grid-template-columns: 1fr; }
  .reg-core { grid-row: auto; }
  .reg-standard { grid-column: auto; }
  .reg-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .registration { padding: 12px; }
  .reg-core-fields, .reg-detail-grid, .reg-detail-fields, .reg-cover { grid-template-columns: 1fr; }
  .reg-detail-group.reg-wide { grid-column: auto; }
  .reg-rec-row { grid-template-columns: 1fr; }
  .reg-rec-row .btn, .reg-transcript { width: 100%; }
}
.ci-list { display: flex; flex-direction: column; gap: 4px; }
.ci-row { width: 100%; display: flex; align-items: baseline; gap: 10px;
  text-align: left; padding: 9px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--panel); color: inherit; font: inherit;
  cursor: pointer; }
.ci-row:hover { border-color: var(--teal-2); }
.ci-row:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
/* THE ASKING STATE IS THE SECOND TAP, and it is the only row that changes:
   nothing is ever painted as chosen before he has chosen it. */
.ci-row.is-asking { border-color: var(--amber); }
.ci-row-main { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.ci-name { font-size: 13px; font-weight: 600; }
.ci-kind { font-size: 10.5px; color: var(--dimmer); text-transform: uppercase;
  letter-spacing: .06em; }
.ci-why { font-size: 11px; color: var(--dim); margin-left: auto; }
.ci-confirm { font-size: 11px; color: var(--amber-ink); margin-left: auto; }
.ci-status { font-size: 11px; margin-top: 8px; min-height: 14px;
  letter-spacing: .04em; }
.ci-status.busy { color: var(--dim); }
.ci-status.ask { color: var(--amber-ink); }
.ci-status.ok { color: var(--teal); }
.ci-status.no { color: var(--red-ink); }
.ci-none { font-size: 12px; color: var(--dim); padding: 6px 0; }

/* LISTING FOR AN OPERATION (commit 19). One block, two homes: under the
   chart on a folder, and under a row on the theatre list. The read-back is
   the only part that changes colour, because it is the only part that is
   about to cost something. */
.fo-pre, .pc-listing { margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06); }
.li-head { display: flex; gap: 10px; align-items: baseline; }
.li-t { font-weight: 600; font-size: 12px; }
.li-when { font-size: 11px; color: var(--ink-2); margin-left: auto; }
.li-for { font-size: 12px; color: var(--dim); margin-top: 2px; }
.li-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.li-in { flex: 1 1 180px; min-width: 0; padding: 7px 9px; font: inherit;
  font-size: 12px; color: inherit; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 8px; }
.li-in-d { flex: 0 1 140px; }
.li-in:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.li-note { font-size: 10.5px; color: var(--dimmer); margin-top: 6px; }
.li-back { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--panel); }
.li-was { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
  font-size: 12px; padding: 2px 0; }
.li-was-l { font-size: 10.5px; color: var(--dimmer); flex: 0 0 96px; }
.li-was-a { color: var(--dim); text-decoration: line-through; }
.li-was-x { color: var(--dimmer); }
.li-was-b { font-weight: 600; }
.li-was-r { font-size: 10.5px; color: var(--dimmer); margin-left: auto; }
/* WHAT CONFIRMING COSTS. Amber, and never the same row as an ordinary
   change: re-listing clears every tick on the checklist. */
.li-warn { font-size: 11px; color: var(--amber-ink); margin-top: 6px; }
.li-btns { display: flex; gap: 6px; margin-top: 8px; }
/* ── Stage 9: the week as a grid — days across, his hours down ────────── */
.weekgrid { padding: 10px 14px; }
.wk-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.wk-t { font-weight: 600; font-size: 13px; }
.wk-grid { display: grid; gap: 1px; background: var(--hush);
  border: 1px solid var(--rule); border-radius: 8px; overflow: auto; }
.wk-corner, .wk-dh, .wk-rh, .wk-cell, .wk-band { background: var(--panel); }
.wk-dh { padding: 6px 4px; text-align: center; min-width: 0; }
.wk-dh.is-today { background: rgba(79,214,200,.10); }
.wk-dh.is-today .wk-dh-d { color: var(--ink-2); }   /* --dim on the lit column read 2.8:1 */
.wk-dh-d { display: block; font-size: 11px; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em; }
.wk-dh-n { display: block; font-size: 14px; font-weight: 600; }
.wk-rh { padding: 4px 6px; font-size: 10.5px; color: var(--dimmer);
  text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* a row header that will not fit gives way, never clips (the cancelled row's own count did) */
.wk-rh.wk-edge { color: var(--amber-ink); }
.wk-cell { min-height: 26px; padding: 2px; display: flex;
  flex-direction: column; gap: 2px; min-width: 0; }
/* AN ALL-DAY GROUND, NOT A BLOCK OVER THE APPOINTMENTS. A holiday or a
   leave day still has to show what is booked on it. */
.wk-cell.is-ph { background: rgba(96,150,220,.07); }
.wk-cell.is-leave { background: rgba(150,150,120,.07); }
.wk-band { min-height: 22px; padding: 3px; display: flex;
  flex-wrap: wrap; gap: 3px; align-content: flex-start; }
.wk-chip { font-size: 10px; padding: 1px 5px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent; }
/* A CHIP STAYS IN ITS DAY. The type scale took it from 10px to 13.3px on a
   desktop, and "On call · Gleneagles" measured 134px in a ~102px column: it
   ran over Wednesday and 32px over Saturday's "Annual leave". The clamp was
   the phone's alone. It is every width's now, and week.ts puts the whole
   text on each chip's title so nothing is lost to the ellipsis. */
.wk-band { min-width: 0; }
.wk-band .wk-chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* A CHIP THAT IS A CONTROL. Only the chrome a browser adds is taken off:
   the border, background, colour and padding belong to .wk-chip and
   .wk-deskleave, and zeroing them inline would leave the pill with one
   edge and the wrong font. No width, because a chip sizes to its text --
   a full-width one would push the on-call chips onto a line of their own. */
button.wk-chip { font-family: inherit; text-align: left; cursor: pointer;
                 appearance: none; }
.wk-e { min-height: 28px; font-size: 11px; padding: 2px 4px; border-radius: 4px;
  border-left: 3px solid transparent; display: flex; gap: 4px;
  align-items: center; min-width: 0; }
.wk-e-i { flex: 0 0 auto; }
.wk-e-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.wk-e-w { color: var(--dim); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
/* #1190: an attended appointment is fixed in place -- no drag, and a tick
   (or "?" when attendance could not be read) beside the name. */
.wk-attended, .fd-sc-attended { cursor: default; border-left-style: double; }
.wk-e-lock { color: var(--dim); margin-left: 4px; }
/* #1190 amendment: a past appointment nobody attended is locked too, with
   its own mark (\2717 from the door) and a dashed edge, never colour alone. */
.wk-noshow, .fd-sc-noshow { border-left-style: dashed; }

/* The six, each with a cue that is not its colour. */
.wk-appt { background: rgba(79,214,200,.12); border-left-color: var(--teal); }
.wk-surg { background: rgba(224,168,74,.14); border-left-color: var(--amber); }
.wk-miss { background: rgba(224,90,74,.12); border-left-color: var(--red); }
.wk-miss .wk-e-n { text-decoration: line-through; }
.wk-ph { background: rgba(96,150,220,.16); color: #bcd4f2;
  border-color: rgba(96,150,220,.45); }
.wk-leave { background: rgba(150,150,120,.16); color: #d6d6bd;
  border-color: rgba(150,150,120,.45); }
.wk-call { background: rgba(168,120,214,.16); color: #ddc9f2;
  border-color: rgba(168,120,214,.45); }
/* THE DESK SHORT-HANDED -- neutral, and deliberately not .wk-leave's olive.
   The two chips mean opposite things to a patient trying to book: his leave
   says there is no clinic that day, this says there is one and the counter
   is thin. Built on TOKENS rather than this block's hand-picked literals,
   so it follows the day/dark toggle. */
.wk-deskleave { background: rgba(140,140,140,.16); color: var(--dim);
  border-color: rgba(140,140,140,.45); }

/* The clash is loud on purpose: the roster is already asking which stands. */
.wk-clash { background: rgba(224,90,74,.18); color: var(--red-ink);
  border-color: rgba(224,90,74,.5); font-weight: 600; }

.wk-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px;
  font-size: 10.5px; color: var(--dim); }
.wk-lg { display: inline-flex; gap: 5px; align-items: center; }
/* THE LEGEND STAYS IN VIEW -- Dr Lau, 25 September, pointing at this row:
   "these are the legends - fix it at the bottom for easy reference".
   Measured in Chromium at 1440x900 before this rule: the week overflowed the
   carousel's card by 104px and the legend sat at y=939 under a card that
   ends at 887 -- out of sight exactly while the colours were being read.
   Sticky to the bottom of whatever scrolls. ITS GROUND IS THE PANEL'S TINT
   LAID OVER THE OPAQUE PAGE: --panel alone is translucent glass (0.66 dark,
   0.82 day), and the first version of this rule used it bare -- the 16:00
   label and Saturday's column showed straight through the legend, which a
   position check could not see and a screenshot did. Laid over --bg it is
   the card's own colour and solid, in both themes. DESKTOP ONLY: on the
   phone the week is one card in a scrolling column, where a pinned legend
   would float over the cards below it. */
@media (min-width: 1100px) {
  .wk-legend { position: sticky; bottom: 0; z-index: 2;
    background: linear-gradient(var(--panel), var(--panel)), var(--bg);
    padding: 8px 2px 4px; border-top: 1px solid var(--rule); }
  /* A STICKY BOX STOPS AT ITS SCROLLER'S PADDING, so in the carousel the week
     went on scrolling, visibly, in the 12px strip beneath the legend -- the
     second thing the screenshot showed. It reaches down over that padding,
     and its own padding keeps the words where they were. */
  .dk-car-body .wk-legend { bottom: calc(-1 * var(--car-pad-b));
    padding-bottom: calc(4px + var(--car-pad-b)); }
}
.wk-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
/* Cancelled: struck and dated, below the clinic hours as a reference --
   the slot it held is free again, so it never sits in that cell. */
.wk-cancel { background: rgba(150,150,150,.10);
  border-left-color: var(--dimmer); }
.wk-cancel .wk-e-n { text-decoration: line-through; color: var(--dim); }
.wk-sw.wk-cancel { border: 1px solid var(--dimmer); }
.wk-more { font-size: 11px; color: var(--amber-ink); margin-top: 8px; }
.wk-none { font-size: 12px; color: var(--dim); padding: 8px 0; }
@media (max-width: 899px) { .wk-e-w { display: none; } }
/* THE WEEK IN THE CAROUSEL is ~800px across; the entry's "what" is hidden
   there as it is below 900px, so a name reads whole and the grid, with
   minmax(0,1fr) columns and min-width:0 cells, never scrolls sideways. */
.dk-car .wk-e-w { display: none; }
/* AND THE WEEK FILLS THE CARD, on the desktop only. Its grid stood at its
   content height, so on a screen taller than the 1440x900 this project has
   always measured at, the carousel drew eight hour bands and left the rest
   of the page black -- about 45% of the viewport at 1900x950, measured off
   his own screen on 17 September. The panel takes the card's height and
   week.js's own `1fr` hour rows share it, so the grid grows with the screen
   instead of the page growing a void. Scoped to `.dk-car`: on the phone the
   week is a card in a scrolling column and must keep its natural height. */
.dk-car-panel[data-panel="week"] { height: 100%; min-height: 0;
  display: flex; flex-direction: column; }
/* AND IT FITS THE CARD, NEVER MORE (25 September). With the grid sized to its
   content an hour holding two patients made every `1fr` hour that tall, and
   the week scrolled inside its frame. A zero flex basis gives the grid the
   card's height and no more; a busy hour lays its entries side by side and
   counts the rest on a "+N" (week.ts's fillCell), so no hour is taller than
   its share and nobody is dropped without a count. */
.dk-car-panel[data-panel="week"] .wk-grid { flex: 1 1 0; min-height: 0; overflow: hidden; }
.wk-over { display: none; }
.dk-car .wk-cell { overflow: hidden; min-height: 0; }
.dk-car .wk-cell > .wk-e { flex: 0 0 auto; min-height: 19px; padding: 0 4px; }
.dk-car .wk-cell > .wk-e-over { display: none; }
.dk-car .wk-over { display: inline-flex; align-items: center; font-size: 11px;
  padding: 0 6px; border-radius: 999px; color: var(--amber-ink);
  border: 1px solid var(--rule); cursor: default; }
/* THE ORDERING PANEL (25 September): the home page's top-right corner, two
   faces on its header -- Orders and the front desk -- and inside Orders
   three tabs, one link bar and the tab's form. The corner scrolls inside
   itself, as every corner does; "wide ↗" opens the same panel across the
   grid. */
.dk-faces { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; }
.dk-face { font: inherit; font-size: 11px; letter-spacing: .06em; padding: 3px 6px;
  border-radius: 999px; border: 1px solid transparent; background: none;
  color: var(--dim); cursor: pointer; white-space: nowrap; }
.dk-face.is-on { color: var(--teal); border-color: var(--rule); background: rgba(79,214,200,.08); }
.dk-orders-body { overflow: auto; }
.dk-face-orders .dk-corner-sub, .dk-face-orders .dk-corner-open:not(.dk-orders-wide) { display: none; }
.dk-tr:not(.dk-face-orders) .dk-orders-wide { display: none; }
.or { display: flex; flex-direction: column; gap: 8px; min-width: 0; container-type: inline-size; }
.or-tabs { display: flex; gap: 4px; }
.or-tab { flex: 1 1 0; font: inherit; font-size: 12px; padding: 6px 4px; border-radius: 8px;
  border: 1px solid var(--rule); background: none; color: var(--dim); cursor: pointer; }
.or-tab.is-on { color: var(--ink); border-color: var(--teal); background: rgba(79,214,200,.10); }
.or-link { border: 1px solid var(--rule); border-radius: 8px; padding: 6px 10px; background: rgba(79,214,200,.05); }
.or-link.is-unlinked { border-style: dashed; background: none; }
.or-unlinked { font-size: 12px; color: var(--amber-ink); margin-bottom: 4px; }
.or-who { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.or-who-k { text-transform: uppercase; letter-spacing: .08em; }
.or-who-x { margin-left: auto; }
.or-linkrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.or-linkrow > .or-find { flex: 1 1 220px; min-width: 0; }
.or-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.or-study .or-picks:has(> .or-none:only-child) { padding: 6px 8px; border: 1px dashed var(--rule); border-radius: 6px; }
.or-tab::before { margin-right: 6px; }
.or-tab[data-kind="imaging"]::before { content: "\1FA7B"; }
.or-tab[data-kind="lab"]::before { content: "\1F9EA"; }
.or-tab[data-kind="rx"] { --or-accent: var(--or-rx); }
.or-tab[data-kind="lab"] { --or-accent: var(--amber); }
.or-tab[data-kind="imaging"] { --or-accent: var(--teal); }
.or { --or-rx: #9db8ff; }
[data-theme="day"] .or { --or-rx: #2f4fb0; }
.or-tab { border-bottom-width: 3px; border-bottom-color: color-mix(in srgb, var(--or-accent, var(--rule)) 45%, transparent); }
.or-tab.is-on { border-color: var(--or-accent, var(--teal)); color: var(--ink); font-weight: 600;
  background: color-mix(in srgb, var(--or-accent, var(--teal)) 14%, transparent); }
.or[data-tab="imaging"] > .or-body { --or-accent: var(--teal); }
.or[data-tab="lab"] > .or-body { --or-accent: var(--amber); }
.or[data-tab="rx"] > .or-body { --or-accent: var(--or-rx); }
/* 🩸 VASCULAR AND 🧠 FUNCTION (26 Nov, "use b"): each its symbol and colour. */
.or-tab[data-kind="vascular"]::before { content: "\1FA78"; }
.or-tab[data-kind="function"]::before { content: "\1F9E0"; }
.or-tab[data-kind="vascular"] { --or-accent: #ff8a8a; }
.or-tab[data-kind="function"] { --or-accent: #c9a7ff; }
.or[data-tab="vascular"] > .or-body { --or-accent: #ff8a8a; }
.or[data-tab="function"] > .or-body { --or-accent: #c9a7ff; }
[data-theme="day"] .or-tab[data-kind="vascular"], [data-theme="day"] .or[data-tab="vascular"] > .or-body { --or-accent: #b3261e; }
[data-theme="day"] .or-tab[data-kind="function"], [data-theme="day"] .or[data-tab="function"] > .or-body { --or-accent: #6a3fb5; }
/* 📍 THE POSTAL CODE'S ADDRESS, offered under the box (26 Nov). */
.pc-offer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pc-offer:empty { display: none; }
.pc-use { font: inherit; font-size: .875rem; padding: 4px 10px; border: 1px solid var(--teal); border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.pc-use:hover { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.pc-note { font-size: .8125rem; color: var(--dim); }
.or-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.or-chip { font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule);
  background: none; color: var(--ink-2); cursor: pointer; }
.or-chip.is-on { border-color: var(--or-accent, var(--teal)); color: var(--ink);
  background: color-mix(in srgb, var(--or-accent, var(--teal)) 18%, transparent); }
.or > .or-tabs + .or-body { border-top: 2px solid var(--or-accent, var(--rule)); padding-top: 10px; margin-top: -4px; }
/* SLIM BUTTONS on the ordering form (22 November) -- where a pointer hovers;
   a touch screen keeps the full tap height. */
@media (hover: hover) {
  .or .btn { min-height: 30px; padding: 4px 12px; border-radius: 8px; font-size: 12.5px; }
  .or .or-help-b { min-height: 30px; min-width: 30px; padding: 4px; border-radius: 999px; }
  .or .or-tab { min-height: 30px; padding: 5px 4px; }
}
.or-top { display: flex; gap: 6px; align-items: flex-start; }
.or-top > .or-bar { flex: 1 1 auto; min-width: 0; }
.or-top > .or-bar:empty { display: block; }
.or-help-b { flex: none; min-width: 32px; border-radius: 999px; font-weight: 600; }
.or-help-b.is-on { border-color: var(--teal); color: var(--teal); }
.or-help { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--sunk); }
.or-help[hidden] { display: none; }
.or-help-l { font-size: 12px; color: var(--dim); line-height: 1.4; }
.or-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; margin-top: 4px; }
.or-acts > .or-send { margin-top: 0; }
.or-sendto { margin-top: 4px; }
.or-sendto-note { font-size: .8125rem; color: var(--dim); margin-top: 2px; }
.or-acts .btn { width: 100%; }
.or-clin-h { flex-wrap: nowrap; }
.or-clin-h .btn { white-space: nowrap; }
.or-reg { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgba(79,214,200,.12); }
.or-name { font-size: 12.5px; }
.or-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.or-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.or-k { font-size: 11px; color: var(--dim); }
.or-in { font: inherit; font-size: 12.5px; padding: 5px 7px; border-radius: 6px; min-width: 0;
  border: 1px solid var(--rule); background: var(--sunk); color: var(--ink); width: 100%; box-sizing: border-box; }
.or-area { min-height: 44px; resize: vertical; }
.or-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.or-when { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.or-find { display: flex; flex-direction: column; gap: 4px; }
.or-hits { display: flex; flex-direction: column; gap: 2px; max-height: 160px; overflow: auto; }
.or-hit { font: inherit; font-size: 12px; text-align: left; padding: 5px 7px; border-radius: 6px;
  border: 1px solid var(--rule); background: none; color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-none { font-size: 12px; color: var(--dim); }
.or-portal { margin: 0; display: flex; }
.or-portal .btn { flex: none; }
.or-portal:empty { display: none; }
.or-chosen { display: flex; gap: 6px; align-items: center; min-width: 0; }
.or-desc { font-size: 12px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-ai { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.or-ai-said { font-size: 12px; color: var(--dim); }
.or-ai-said:empty { display: none; }
.or-ai-picks { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.or-ai-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; min-width: 0; }
.or-ai-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.or-ai-words .or-desc { white-space: normal; }
.or-ai-why { font-size: 11px; color: var(--dim); font-style: italic; }
.or-fee { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rule); }
.or-v { font-size: 12.5px; }
.or-plan { color: var(--teal); }
.or-dim { color: var(--dim); }
.or-no { color: var(--red); }
.or-tests { display: flex; flex-wrap: wrap; gap: 4px; }
.or-test { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; padding: 2px 4px 2px 8px;
  border-radius: 999px; border: 1px solid var(--rule); }
.or-x { font: inherit; font-size: 11px; background: none; border: 0; color: var(--dim); cursor: pointer; }
.or-send { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.dk-full-orders { display: flex; flex-direction: column; }
.dk-orders-wide-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px;
  max-width: 1180px; width: 100%; margin: 0 auto; box-sizing: border-box; }
/* One page per tab: two columns, and the search hits drop OVER the page
   rather than pushing it down into a scroll. */
.or-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; align-items: start; }
.or-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.or-col > *, .or-body > * { flex-shrink: 0; }
.or-hits > * { flex-shrink: 0; }
.or-find { position: relative; }
.or-hits:not(:empty) { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin-top: 2px;
  max-height: 280px; padding: 4px; border: 1px solid var(--rule); border-radius: 8px;
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
/* Each hit is read WHOLE -- two spine codes differ only at the end of a long
   description, so an ellipsis hides exactly what he chooses between. On the
   wide page the list spans both columns and takes most of the height. */
.or-hits .or-hit { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
.or-cols .or-hits:not(:empty) { right: calc(-100% - 18px); max-height: 60vh; }
.or-cols .or-area { min-height: 120px; }
.or-clin-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.or-clin-h .or-k { flex: 1 1 auto; }
.or-prec { min-height: 38px; resize: vertical; }
/* the patient's preparation, to the desk -- pre-filled, editable (2 Oct) */
.or-instr { min-height: 38px; resize: vertical; }
.or-form { display: flex; flex-direction: column; gap: 4px; }
.or-total { font-size: 12.5px; color: var(--teal); }
.or-totals { gap: 4px; }
.or-tline { display: flex; gap: 8px; justify-content: space-between; font-size: 12.5px; }
.or-tline .or-tk { color: var(--dim); flex: none; }
.or-tline .or-tv { text-align: right; }
.or-tline.is-total { font-weight: 600; color: var(--teal); border-top: 1px solid var(--rule); padding-top: 4px; }
/* The stay and the vendors (2 October): day surgery or an admission, its
   days ward by ward with the rate beside each, and one card per vendor. */
.or-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.or-seg-b { font: inherit; font-size: 12.5px; padding: 5px 12px; border: 0; background: none; color: var(--dim); cursor: pointer; }
.or-seg-b.is-on { background: rgba(79,214,200,.16); color: var(--teal); font-weight: 600; }
.or-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.or-rate { font-size: 11px; color: var(--dim); }
.or-chk { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.or-vendor { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--rule); }
.or-vendor-top { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.or-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.or-contact a { color: var(--teal); text-decoration: none; }
.or-src { font-size: 11px; color: var(--dim); display: flex; flex-direction: column; gap: 1px; }
/* THE LISTING CARD, SLIM AND EASIER TO READ (23 Nov 2026, batch five ticket
   4: "explanatory note to help symbol right upper corner, slim button;
   improve contrast for easier reading"). The ? sits at the card's top
   right; every button is the slim one with a 44px hit area; a label is
   brighter than the hint under it, a field's ground is darker than its
   box, and an inner box has the quieter line so the sections stand out. */
.or-ltop { display: flex; align-items: flex-start; gap: 0.5rem; }
.or-ltop > .or-link { flex: 1 1 auto; min-width: 0; }
.or-src-state { color: var(--amber); }
.or-listing-card .btn { position: relative; min-height: 1.75rem; height: 1.75rem; padding: 0 0.625rem; font-size: 0.8125rem; line-height: 1; border-radius: 0.4375rem; }
.or-listing-card .btn.or-sym, .or-listing-card .btn.or-help-b { min-width: 1.75rem; width: 1.75rem; padding: 0; }
.or-listing-card .btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; min-width: 2.75rem; height: 2.75rem; transform: translate(-50%, -50%); }
.or-listing-card .or-send .btn { width: 100%; }
.or-listing-card .or-k { color: var(--ink); font-weight: 600; }
.or-listing-card .or-group { border-color: var(--rule); background: var(--panel); }
.or-listing-card .or-group-h { font-weight: 700; }
.or-listing-card .or-fee { border-color: var(--line); background: var(--sunk); }
.or-listing-card .or-v { color: var(--ink); }
.or-listing-card .or-v.or-dim, .or-listing-card .or-none { color: var(--dimmer); font-style: italic; }
.or-listing-card .or-in { color: var(--ink); border-color: var(--rule); }
.or-listing-card .or-in::placeholder { color: var(--faint); font-style: italic; }
.or-listing-card .or-in:focus-visible { outline: 0.125rem solid var(--teal); outline-offset: 0.0625rem; }
.or-listing-card .or-tline .or-tk { color: var(--ink-2); }
/* TICKET 5: one date field, the anaesthetist picked, nothing drawn before
   there is something to read, and List this case always in view. */
.or-anaes { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.or-anaes > .or-in { flex: 1 1 10rem; }
.or-anaes > .or-in[hidden], .or-fee[hidden], .or-tline[hidden] { display: none; }
.or-when-was { color: var(--amber); font-size: 0.8125rem; align-self: center; }
.or-send-pin { position: sticky; bottom: 0; z-index: 2; margin-top: 0; padding: 0.5rem 0 0.25rem; background: var(--panel); border-top: 1px solid var(--line); }
/* EVERY BUTTON OF THE PATIENT FOLDER IS THE SLIM ONE (Dr Lau, 23 Nov 2026,
   batch five ticket 6: "all slim buttons - across the patient folder", and of
   the rail cards' fold button, "the downbutton looks out of place"). Where a
   pointer hovers; a touch screen keeps its 44px controls. The ? is slim too. */
.mcb-why { flex: 1 1 12rem; min-width: 0; min-height: 1.75rem; padding: 0.1875rem 0.5rem; border: 1px solid var(--rule); border-radius: 0.4375rem; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.8125rem; }
.mcb-cancel { color: var(--red); }
@media (hover: hover) {
  #folder .btn, #folder .fv-hbtn, #folder .vb-new, #folder .dt-ch, #folder .dt-sel { min-height: 1.75rem; padding-top: 0.1875rem; padding-bottom: 0.1875rem; padding-left: 0.625rem; padding-right: 0.625rem; font-size: 0.8125rem; line-height: 1.2; border-radius: 0.4375rem; width: auto; }
  #folder .nb-cfold, #folder .nb-fold, #folder .fv-rail-fold { min-height: 1.5rem; height: 1.5rem; min-width: 1.5rem; width: 1.5rem; padding: 0; font-size: 0.75rem; line-height: 1; border-radius: 0.375rem; flex: 0 0 auto; }
  #folder .panel-help-button { width: 1.75rem; height: 1.75rem; font-size: 0.8125rem; }
  #folder .panel-help-body { top: 2rem; }
}
@media (max-width: 560px) { .or-days { grid-template-columns: 1fr; } }

/* ── stats.css — 📊 Clinic statistics, under Settings (26 September) ── */
/* New visits, follow-up visits and revenue over a period, by clinic, and the
   no-shows beneath. The prefix is `cs-`, grepped against app/app.css before
   it was claimed (only `recs-` contains the letters, and it is not a match).

   Values are app.css's own tokens throughout, so the day/dark toggle carries
   this screen with everything else and nothing here has a literal colour.
   The no-shows block reuses My Tasks' own `tk-` rows, so it needs no rule. */

.cs-head { display: flex; gap: 10px; align-items: baseline; margin: 10px 0 8px; }
.cs-head:first-child { margin-top: 0; }
.cs-title { font-weight: 600; }
.cs-n { color: var(--dim); }

.cs-periods, .cs-custom, .cs-clinics {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px;
}
.cs-tab, .cs-btn {
  min-height: var(--tap, 44px); padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; cursor: pointer;
}
.cs-tab.is-active { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.cs-btn { color: var(--teal); }
.cs-lbl { color: var(--dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.cs-date {
  min-height: var(--tap, 44px); padding: 0 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--sunk); color: var(--ink);
}
.cs-chk {
  display: inline-flex; gap: 6px; align-items: center; min-height: var(--tap, 44px);
  padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.cs-chk.is-unknown { border-style: dashed; color: var(--dim); }

.cs-status { color: var(--dim); font-size: 12px; margin: 0 0 8px; min-height: 1.4em; }
.cs-status.is-warn, .cs-note.is-warn, .cs-tr > .is-warn { color: var(--amber); }

.cs-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cs-fig { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); min-width: 0; }
.cs-fig-v { font-size: 22px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-fig-l { color: var(--dim); font-size: 12px; margin-top: 2px; }
.cs-fig-s { color: var(--dim); font-size: 11px; margin-top: 2px; }

.cs-table { display: grid; gap: 0; margin: 0 0 10px; }
.cs-tr {
  display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.cs-tr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-th { color: var(--dim); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.cs-tr.is-unknown .cs-name { color: var(--dim); font-style: italic; }
.cs-sub { color: var(--dim); font-size: 11px; padding: 0 0 6px 12px; }
.cs-none { color: var(--dim); font-size: 12px; padding: 6px 0; }
.cs-notes { margin: 0 0 12px; }
.cs-note { color: var(--dim); font-size: 12px; line-height: 1.45; margin: 2px 0; }

@media (max-width: 700px) {
  .cs-figs { grid-template-columns: minmax(0, 1fr); }
  .cs-tr { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .cs-tr > span:last-child { display: none; }
}
.or-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.or-qchip { display: inline-flex; gap: 6px; align-items: baseline; font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); background: none; color: var(--ink); }
.or-qchip:hover { border-color: var(--teal-2); }
.or-qtag { font-size: 10px; letter-spacing: .08em; color: var(--teal); }
.or-code { font-size: 12px; color: var(--teal); font-family: var(--mono); }
.or-picks { display: flex; flex-direction: column; gap: 3px; max-height: 190px; overflow: auto; }
.or-picks > * { flex-shrink: 0; }
.or-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  font: inherit; font-size: 12.5px; text-align: left; padding: 4px 8px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--hush); background: none; color: var(--ink); }
.or-pick.is-on { border-color: var(--teal); background: rgba(79,214,200,.10); }
/* THE LAB'S TESTS CHOSEN, A TABLE, and its search's hits kept in their own
   column so they never lie over the clinical note (#1220, board Lab1). */
.or-tests-table { width: 100%; border-collapse: collapse; }
.or-tests-table th { font-size: 11px; font-weight: 600; color: var(--dim); text-align: left; padding: 2px 6px;
  border-bottom: 1px solid var(--line); }
.or-test-row > td { padding: 7px 6px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; vertical-align: middle; }
.or-test-code { color: var(--dim); white-space: nowrap; }
.or-test-price { text-align: right; white-space: nowrap; }
.or-test-x { width: 1%; text-align: right; }
.or-test-total > td { padding: 7px 6px; text-align: right; font-weight: 600; color: var(--teal); font-size: 12.5px; }
.or-cols .or-find-inline .or-hits:not(:empty) { position: static; right: auto; margin-top: 0; max-height: 240px; box-shadow: none; }
/* THE CARD AT ITS WIDTH (#1220, board Lst1): an orders or listing card under
   640px wide lays its two columns out as ONE, as the boards stack their
   sections, so nothing is clipped at the card's default 420px. */
@container (max-width: 640px) {
  .or-cols { grid-template-columns: minmax(0, 1fr); }
  .or-cols .or-hits:not(:empty) { right: 0; }
  .or-two { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 420px) { .or-three { grid-template-columns: minmax(0, 1fr); } }
.or-pick-c { font-size: 11px; color: var(--teal); }
.or-pick-p { color: var(--dim); }
.or-form-row { display: flex; gap: 6px; flex-wrap: wrap; }
/* THE LISTING IN FOUR BOXED SECTIONS (#1200) and the TOSP selector's two rows. */
.or-group { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule);
  border-radius: 10px; margin-bottom: 10px; }
.or-group-h { color: var(--teal); letter-spacing: .08em; text-transform: uppercase; }
.or-coderow, .or-srow { display: flex; gap: 6px; align-items: center; }
.or-coderow > .or-chosen, .or-srow > .or-find { flex: 1 1 auto; min-width: 0; }
.or-syms { display: flex; gap: 4px; flex-shrink: 0; }
.or-sym { min-width: 40px; min-height: 40px; }
.or-sym.is-on { border-color: var(--teal); background: rgba(79,214,200,.10); }
.or-sym-menu { display: flex; gap: 8px; flex-wrap: wrap; }
.or-item { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.or-item > .or-desc { flex: 1 1 140px; min-width: 0; }
.or-item > .or-in { max-width: 120px; }
.or-print { position: fixed; width: 0; height: 0; border: 0; left: -9999px; }
.or-launch { display: flex; flex-direction: column; gap: 8px; }
.or-tile { display: flex; gap: 10px; align-items: center; text-align: left; font: inherit;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: none;
  color: var(--ink); cursor: pointer; }
.or-tile:hover { border-color: var(--teal-2); }
.or-tile-i { font-size: 20px; }
.or-tile-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.or-tile-l { font-weight: 600; font-size: 13px; }
.or-tile-s { font-size: 11px; color: var(--dim); }

/* THE FORMS PICKER (commit 20). Above "Write the note", because that is the
   moment the question belongs to: what should come out of this encounter,
   decided once the encounter is known rather than before it. */
.fm { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--panel); }
.fm-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.fm-t { font-weight: 600; font-size: 12px; }
.fm-n { font-size: 10.5px; color: var(--dimmer); margin-left: auto; }
.fm-row { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.fm-tick { background: transparent; border: 0; color: var(--dim); font-size: 14px;
  cursor: pointer; padding: 0; line-height: 1; }
.fm-tick.is-on { color: var(--teal); }
.fm-tick:disabled { opacity: .5; cursor: default; }
.fm-name { font-size: 12px; }
.fm-note { font-size: 10.5px; color: var(--dimmer); margin-top: 4px; }

/* FINDING A PATIENT (commit 21). The front door: recent folders, and the
   bot's own search over the practice. A retired holding number is marked
   rather than hidden — it is off the browsable list already, and a
   tombstoned number that looks like a patient is worse than a missing one. */
.patients { padding: 12px 14px; }
.pt-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.pt-t { font-weight: 600; }
.pt-note { font-size: 10.5px; color: var(--dimmer); text-transform: uppercase;
  letter-spacing: .06em; margin-left: auto; }
.pt-form { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pt-in { flex: 1 1 200px; min-width: 0; padding: 7px 9px; font: inherit;
  font-size: 12px; color: inherit; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 8px; }
.pt-in:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.pt-list { display: flex; flex-direction: column; }
/* Cards in a grid, grouped by when last seen (24 Sept): name, number, visits
   and date together rather than strung across the whole screen. */
.pt-group { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--label); margin: 10px 0 6px; }
.pt-group:first-child { margin-top: 0; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pt-row { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel);
  font-size: 12px; cursor: pointer; min-width: 0; text-align: left; align-items: stretch; }
.pt-row:hover { border-color: var(--teal-2); }
.pt-who { font-weight: 600; background: transparent; border: 0; color: inherit; text-align: left;
  font: inherit; font-weight: 600; padding: 0; cursor: pointer; min-height: 24px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-who:hover { color: var(--teal-2); }
.pt-key { font-size: 10.5px; color: var(--dimmer); }
.pt-tag { font-size: 10px; color: var(--amber-ink); text-transform: uppercase;
  letter-spacing: .06em; }
.pt-row.is-retired .pt-who { color: var(--dim); }
.pt-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.pt-foot > span { white-space: nowrap; }
.pt-n { font-size: 10.5px; color: var(--dimmer); }
.pt-when { font-size: 10.5px; color: var(--dim); }
.pt-none { font-size: 11.5px; color: var(--dim); padding: 8px 0; line-height: 1.5; }

/* WHAT IS OWED (commit 22). My Tasks, and the defaulters under it — the two
   questions the day ends on. Overdue is the one figure that changes colour,
   because it is the one that means something has to happen today. */
.tasks { padding: 12px 14px; }
.tk-head { display: flex; gap: 10px; align-items: baseline; margin: 10px 0 6px; }
.tk-head:first-child { margin-top: 0; }
.tk-t { font-weight: 600; }
.tk-n { font-size: 10.5px; color: var(--dimmer); margin-left: auto; }
.tk-late { font-size: 11px; color: var(--amber-ink); margin-bottom: 6px; }
.tk-tray { font-size: 11px; color: var(--ink-2); padding: 6px 8px; margin-bottom: 6px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
.tk-group { display: flex; gap: 8px; align-items: baseline; font-size: 11px;
  color: var(--dim); margin: 10px 0 2px; letter-spacing: .02em; }
.tk-g-n { color: var(--dimmer); margin-left: auto; }
.tk-row { display: flex; gap: 8px; align-items: baseline; padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,0.06); }
.tk-tick { background: transparent; border: 0; color: var(--dim); font-size: 14px;
  cursor: pointer; padding: 0; line-height: 1; flex: 0 0 auto; }
.tk-tick:hover { color: var(--teal); }
.tk-tick:disabled { opacity: .5; cursor: default; }
.tk-body { min-width: 0; flex: 1 1 auto; }
.tk-what { font-size: 12px; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-top: 2px; }
/* ONE LINE (Dr Lau, 27 Oct: "use symbol and identifier - keep it to 1 line"):
   the symbol and the key hold their place; only the words wrap, and only
   when they are long. */
.tk-line { display: flex; align-items: baseline; gap: 4px 8px; }
.tk-line .tk-sym, .tk-line .tk-key, .tk-line .tk-due, .tk-line .tk-from { flex: 0 0 auto; }
.tk-line .tk-what { flex: 1 1 auto; min-width: 0; }
/* ONE LINE, ALWAYS (11 Nov): nothing in a task row wraps; a long word is cut
   and the row's title carries it whole. */
.tk-line { flex-wrap: nowrap; min-width: 0; overflow: hidden; white-space: nowrap; }
.tk-line .tk-what { overflow: hidden; text-overflow: ellipsis; }
.tk-row .tk-body { min-width: 0; flex: 1 1 auto; }
.tk-key { font-size: 10.5px; background: transparent; border: 0; color: var(--dimmer);
  font-family: inherit; padding: 0; cursor: pointer; }
.tk-key:hover { color: var(--teal-2); }
.tk-from, .tk-tag { font-size: 10px; color: var(--dimmer); }
.tk-tag { text-transform: uppercase; letter-spacing: .06em; }
.tk-due { font-size: 10.5px; color: var(--dimmer); }
.tk-due.is-late, .tk-row.is-late .tk-what { color: var(--amber-ink); }
.tk-line .tk-flag { flex: 0 0 auto; font-size: 11px; line-height: 1; }
.tk-ns { margin-top: 14px; }
.tk-none { font-size: 11.5px; color: var(--dim); padding: 8px 0; }
/* RESULTS TO VERIFY (browser check, 11 Nov). A critical row is marked the way
   the screening sheet marks a critical result (.hs-res.hs-crit: a red rule on
   the left, a red ground, red-ink words) and starts with "‼ CRITICAL" in an
   .hs-chip.hs-crit -- words as well as colour. A row cannot be hidden, so its
   mark stands where other rows have their button. No new type size. */
.tk-vmark { flex: 0 0 auto; color: var(--amber); border-color: var(--amber); }
.tk-row[data-verify="critical"], .dk-quad .tk-row[data-verify="critical"] {
  border-left: 3px solid var(--red-solid); background: rgba(181, 43, 38, 0.18);
  padding-left: 6px; padding-right: 4px; border-radius: 6px; }
.tk-row[data-verify="critical"] .tk-what,
body.is-phone #tasks .tk-row[data-verify="critical"] .tk-what { color: var(--red-ink); font-weight: 700; }
.tk-notice { margin: 2px 0 4px; }
/* THE DUTY BOARD (stage 9). Check-in's other half. Appended, never inserted:
   two sessions editing this file at once is how `main` came to ship it with
   conflict markers still in it -- neither `sweep` nor `attribution` parses
   CSS, so a stylesheet a browser cannot read past went green. */
.duty { padding: 10px 12px; }
.du-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.du-t { font-weight: 600; }
.du-board { display: flex; flex-direction: column; gap: 3px;
            padding: 8px 10px; margin-bottom: 10px;
            border: 1px solid var(--line); border-radius: 6px;
            background: var(--panel); }
.du-line { font-size: 12.5px; color: var(--dim); }
/* THE STATE IS NEVER COLOUR ALONE. Each line says what it is in words; the
   colour only agrees with the words. */
.du-doc.is-in { color: var(--teal); font-weight: 600; }
.du-doc.is-away { color: var(--amber-ink); font-weight: 600; }
.du-desk.is-in { color: var(--ink); }
.du-shut { color: var(--red-ink); font-weight: 600; }
.du-list { display: flex; flex-direction: column; gap: 4px; }
/* SEARCHING THE CATALOGUES, on the Guides screen. Dr Lau, 17 September:
   "pls ensure all the guides are searchable - TOSP and medications within
   inventory." The tabs wrap rather than scroll sideways, because a
   catalogue the thumb cannot see is one he does not know he can search. */
.gs-box { margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.gs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-tab { font: inherit; font-size: 11px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--hush); background: transparent; color: var(--dim);
  cursor: pointer; white-space: nowrap; }
.gs-tab:hover { border-color: var(--teal-2); color: var(--teal-2); }
.gs-tab.is-on { border-color: rgba(79,214,200,.4); background: rgba(79,214,200,.1);
  color: var(--teal); }
.gs-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.gs-bar { display: flex; gap: 6px; }
.gs-find { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 12.5px;
  padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--hush);
  background: var(--sunk); color: var(--ink); }
.gs-find:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.gs-go { font: inherit; font-size: 12px; padding: 8px 14px; border-radius: var(--r);
  border: 1px solid var(--hush); background: transparent; color: var(--dim);
  cursor: pointer; white-space: nowrap; }
.gs-go:hover { border-color: var(--teal-2); color: var(--teal-2); }
.gs-go:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.gs-out { display: flex; flex-direction: column; gap: 6px; }
.gs-count { font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--dimmer); text-transform: uppercase; }
.gs-wait, .gs-none { font-size: 11.5px; color: var(--dim); padding: 6px 0; }
.gs-row { padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--panel); display: flex; flex-direction: column; gap: 3px; }
.gs-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.gs-sub { font-size: 11px; color: var(--dim); }
.gs-fact { display: flex; gap: 8px; font-size: 11px; align-items: baseline; }
.gs-fl { flex: 0 0 auto; min-width: 86px; color: var(--dimmer);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; }
.gs-fv { flex: 1 1 auto; min-width: 0; color: var(--ink-2); }
.du-act { width: 100%; display: flex; align-items: baseline; gap: 10px;
          padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
          background: var(--panel); color: var(--ink); text-align: left;
          font: inherit; cursor: pointer; }
.du-act:hover { border-color: var(--teal-2); }
.du-act:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
/* THE TWO THAT CANNOT BE UNDONE BY TAPPING AGAIN read differently before
   they are tapped, not only after. */
.du-grave { border-style: dashed; }
.du-grave:hover { border-color: var(--red-ink); }
.du-act.is-asking { border-color: var(--amber); border-style: solid; }
.du-act-l { font-size: 13px; }
.du-act-w { font-size: 10.5px; color: var(--dimmer); text-transform: uppercase;
            letter-spacing: .04em; margin-left: auto; }
.du-act-c { font-size: 11px; color: var(--amber-ink); margin-left: auto; }
.du-status { font-size: 11px; margin-top: 8px; min-height: 14px; }
.du-status.busy { color: var(--dim); }
.du-status.ask { color: var(--amber-ink); }
.du-status.ok { color: var(--teal); }
.du-status.no { color: var(--red-ink); }
.du-none { font-size: 12px; color: var(--dim); padding: 6px 0; }

/* ── Stage 9: Safety Rules (Settings), read-only ─────────────────────── */
.safety { padding: 16px 18px 26px; max-width: 720px; margin: 0 auto; }
.sf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.sf-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.sf-sub { font-size: 11px; color: var(--dim); }
.sf-body { margin-top: 14px; display: flex; flex-direction: column; gap: 18px; }
.sf-section-h { font-size: 12px; font-weight: 600; color: var(--teal); letter-spacing: .02em; margin-bottom: 8px; }
.sf-rule { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--rule); border-radius: 9px; padding: 11px 13px; margin-bottom: 7px; cursor: pointer; transition: border-color .12s; }
.sf-rule:hover { border-color: var(--teal); }
.sf-rule.open { border-color: var(--teal); }
.sf-rule-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sf-rule-name { font-size: 13.5px; color: var(--ink); }
.sf-rule-chev { color: var(--dim); font-size: 15px; transition: transform .16s; }
.sf-rule.open .sf-rule-chev { transform: rotate(90deg); color: var(--teal); }
.sf-rule-detail { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--hush); font-size: 12.5px; color: var(--dim); line-height: 1.5; }

/* ── Stage 9: Providers (Team & tasks) — the referral directory, read-only ── */
.providers { padding: 16px 18px 26px; max-width: 760px; margin: 0 auto; }
.pv-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.pv-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.pv-sub { font-size: 11px; color: var(--dim); }
.pv-filter { width: 100%; margin: 12px 0 14px; padding: 9px 12px; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.pv-filter:focus { outline: none; border-color: var(--teal); }
.pv-body { display: flex; flex-direction: column; gap: 8px; }
.pv-cat { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 13px; cursor: pointer; }
.pv-cat:hover, .pv-cat.open { border-color: var(--teal); }
.pv-cat-n { font-size: 13px; font-weight: 600; color: var(--ink); }
.pv-cat-c { font-size: 11px; color: var(--dim); }
.pv-list { padding: 4px 2px 8px; display: flex; flex-direction: column; gap: 9px; }
.pv-contact { border-left: 2px solid var(--hush); padding: 3px 0 3px 12px; }
.pv-contact-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pv-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.pv-person { font-size: 12px; color: var(--dim); }
.pv-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.pv-num { font-size: 12.5px; color: var(--teal); }
.pv-reason { font-size: 11.5px; color: var(--amber-ink); margin-top: 3px; }
.pv-panel { font-size: 11px; color: var(--dimmer); margin-top: 3px; }
/* The referral details (4 Oct): the line, his own marked, and the edit. */
.pv-ref { font-size: 11px; color: var(--dim); margin-top: 3px; }
.pv-his { color: var(--teal); font-weight: 600; }
.pv-ref-edit { margin-top: 6px; }
.pv-ref-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-width: 420px; }
/* PROVIDERS & CONTACTS, EDITED (25 September): his four groups, each entry
   with its Edit and Remove, the form opening beneath the row it edits.
   prt-, because pt- was taken three times over -- the points checklist,
   the PDF templates and the patient list all style it. */
.prt-group { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.prt-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.prt-group-n { font-size: 11px; color: var(--dim); }
.prt-none { font-size: 12px; color: var(--dim); }
.prt-row { border-left: 2px solid var(--hush); padding: 3px 0 3px 12px; display: flex; flex-direction: column; gap: 3px; }
.prt-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prt-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.prt-cat { font-size: 11px; color: var(--dim); }
.prt-reach { font-size: 12.5px; color: var(--teal); overflow-wrap: anywhere; }
.prt-reach.su-dim { color: var(--dim); }
.prt-acts { display: flex; gap: 6px; }
.prt-form { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.prt-field { display: flex; align-items: center; gap: 8px; }
.prt-field-k { flex: 0 0 72px; font-size: 12px; color: var(--dim); }
.prt-field .su-in { flex: 1 1 auto; min-width: 0; }
.prt-form > .btn, .prt-add { align-self: flex-start; }


/* ── Stage 9: Fee Schedule (Money) — the consultation rate card, read-only ── */
.fees { padding: 16px 18px 26px; max-width: 720px; margin: 0 auto; }
.fee-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.fee-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.fee-sub { font-size: 11px; color: var(--dim); }
.fee-body { margin-top: 14px; display: flex; flex-direction: column; gap: 16px; }
.fee-place-h { font-size: 12.5px; font-weight: 600; color: var(--teal); margin-bottom: 4px; }
.fee-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: 6px 0; border-top: 1px solid var(--hush); }
.fee-place .fee-rate:first-of-type { border-top: 0; }
.fee-payor { font-size: 13px; color: var(--ink); flex: 1 1 auto; min-width: 130px; }
.fee-fig { font-size: 12.5px; color: var(--dim); }
.fee-code { font-size: 11px; color: var(--teal); }
.fee-bad { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--amber-ink); border-radius: 8px; background: var(--panel); }
.fee-bad-h { font-size: 12px; color: var(--amber-ink); margin-bottom: 6px; }
.fee-bad-line { font-size: 11.5px; color: var(--dim); padding: 2px 0; }


/* ── Stage 9: National Schemes (Money) — the accreditation status, read-only ── */
.schemes { padding: 16px 18px 26px; max-width: 720px; margin: 0 auto; }
.sc-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.sc-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.sc-sub { font-size: 11px; color: var(--dim); }
.sc-body { margin-top: 14px; display: flex; flex-direction: column; gap: 18px; }
.sc-section-h { font-size: 12px; font-weight: 600; color: var(--teal); margin-bottom: 8px; }
.sc-accred { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.sc-tick { width: 18px; font-size: 13px; text-align: center; }
.sc-accred-n { font-size: 13px; color: var(--dim); }
.sc-accred.held .sc-accred-n { color: var(--ink); }
.sc-act { font-size: 13px; color: var(--ink); }
.sc-blocked { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid var(--hush); }
.sc-blocked:first-of-type { border-top: 0; }
.sc-blocked-n { font-size: 12.5px; color: var(--ink); }
.sc-blocked-why { font-size: 11.5px; color: var(--dim); }
.sc-nehr-line { font-size: 12.5px; color: var(--dim); padding: 2px 0; }


/* ── Stage 9: Inventory & Charges (Money) — the charge catalogue, read-only ── */
.inventory { padding: 16px 18px 26px; max-width: 760px; margin: 0 auto; }
.inv-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.inv-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.inv-sub { font-size: 11px; color: var(--dim); }
.inv-filter { width: 100%; margin: 12px 0 14px; padding: 9px 12px; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.inv-filter:focus { outline: none; border-color: var(--teal); }
.inv-body { display: flex; flex-direction: column; gap: 8px; }
.inv-cat { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 13px; cursor: pointer; }
.inv-cat:hover, .inv-cat.open { border-color: var(--teal); }
.inv-cat-n { font-size: 13px; font-weight: 600; color: var(--ink); }
.inv-cat-c { font-size: 11px; color: var(--dim); }
.inv-list { padding: 4px 2px 8px; display: flex; flex-direction: column; }
.inv-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: 5px 2px; border-top: 1px solid var(--hush); }
.inv-list .inv-item:first-child { border-top: 0; }
.inv-code { font-size: 11px; color: var(--dim); min-width: 74px; }
.inv-name { font-size: 12.5px; color: var(--ink); flex: 1 1 auto; min-width: 120px; }
.inv-price { font-size: 12.5px; color: var(--teal); }
.inv-billto { font-size: 10.5px; color: var(--dimmer); }

/* STOCK ON HAND (2 October) -- stock.js, mounted under Inventory & Charges
   and behind the front desk's Stock button. Its own prefix, as every screen. */
.inv-onhand { font-size: 11px; color: var(--dim); }
.inv-onhand.is-flag { color: var(--amber-ink); }
.inv-stock { margin: 10px 0 16px; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; }
.stk-body { display: flex; flex-direction: column; gap: 8px; }
.stk-tools { display: flex; gap: 8px; align-items: center; }
.stk-tools .inv-filter { margin: 6px 0; }
.stk-which { padding: 8px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.stk-list { display: flex; flex-direction: column; }
.stk-row { display: flex; flex-wrap: wrap; width: 100%; align-items: baseline; gap: 4px 10px; padding: 7px 4px; text-align: left; background: none; border: 0; border-top: 1px solid var(--hush); color: var(--ink); cursor: pointer; }
.stk-row.open { background: var(--panel); }
.stk-code { font-size: 11px; color: var(--dim); min-width: 74px; }
.stk-name { font-size: 12.5px; flex: 1 1 auto; min-width: 120px; }
.stk-qty { font-size: 13px; color: var(--teal); min-width: 40px; text-align: right; }
.stk-qty.is-neg { color: var(--red-ink); }
.stk-marks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.stk-flag { font-size: 10.5px; padding: 1px 6px; border-radius: 9px; border: 1px solid var(--rule); color: var(--dim); }
.stk-count, .stk-expired { color: var(--red-ink); border-color: var(--red-ink); }
.stk-low, .stk-expiring { color: var(--amber-ink); border-color: var(--amber); }
.stk-detail { padding: 6px 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.stk-lots, .stk-soon { display: flex; flex-direction: column; gap: 3px; }
.stk-lot { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; color: var(--ink); }
.stk-lot.is-soon { color: var(--amber-ink); }
.stk-lot.is-expired { color: var(--red-ink); }
.stk-lot-q { min-width: 36px; text-align: right; }
.stk-lot-b { font-size: 11px; color: var(--dim); }
.stk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.stk-form { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.stk-form-h, .stk-hist-h { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.stk-field { display: flex; flex-direction: column; gap: 2px; }
.stk-field-l { font-size: 11.5px; color: var(--dim); }
.stk-input { padding: 7px 9px; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; }
.stk-hist { display: flex; flex-direction: column; gap: 2px; }
.stk-move { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 12px; padding: 3px 0; border-top: 1px solid var(--hush); }
.stk-move-w { font-size: 11px; color: var(--dim); min-width: 130px; }
.stk-move-n { font-size: 11px; color: var(--dim); }

/* THE BLANK-FORM LIBRARY (M5). Per-screen prefix, as every other console
   screen uses, so a rule here cannot reach a row on another. */
.pdfforms { padding: 16px 18px 26px; max-width: 720px; margin: 0 auto; }
.pf-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.pf-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.pf-sub { font-size: 11px; color: var(--dim); margin-left: auto; }
.pf-section { margin-top: 14px; }
.pf-section-h { font-size: 12px; font-weight: 600; color: var(--teal);
                letter-spacing: .02em; margin-bottom: 8px; }
.pf-row { padding: 9px 0; border-top: 1px solid var(--hush); }
.pf-row:first-of-type { border-top: 0; }
.pf-row-top { display: flex; align-items: center; gap: 10px; }
.pf-name { flex: 1 1 auto; font-size: 13.5px; color: var(--ink); }
.pf-meta { display: block; font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.pf-frame { margin-top: 8px; }
/* AN IFRAME NEEDS A TITLE -- it is an accessibility requirement, not a
   control, which is the false finding a control audit made against main. */
.pf-frame iframe { width: 100%; height: 70vh; border: 1px solid var(--rule);
                   border-radius: 8px; }

/* ============================================================ the last ten
 *
 * ⚙️ Settings and its four screens, 📨 Requests, 👥 Meeting, 📞 On call,
 * 🌴 Leave and 📚 Guides. Colour is never the only cue on any of them --
 * a finding's severity and a verdict's level both carry their word beside
 * the band, because six categories is past what colour carries and the
 * week grid settled that already.
 */
.settingsview, .doctorinfo, .clinicinfo, .performance, .auditview,
.requestsview, .meetingview, .oncallview, .leaveview, .guidesview {
  padding: 16px 18px 26px; max-width: 760px; margin: 0 auto; }

/* --- ⚙️ Settings, 👨‍⚕️ Doctor, 🏥 Clinic, 📈 Performance, 🔎 Audit --- */
.st-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.st-t { font-size: 17px; font-weight: 600; color: var(--ink); }
.st-sub { font-size: 11px; color: var(--dim); }
.st-section-t { font-size: 12px; font-weight: 600; color: var(--dim);
                text-transform: uppercase; letter-spacing: 0.04em;
                margin: 16px 0 6px; }
.st-menu { display: flex; flex-direction: column; gap: 6px; }
.st-menu-row { display: flex; align-items: center; justify-content: space-between;
               gap: 10px; background: var(--panel); border: 1px solid var(--rule);
               border-radius: 8px; padding: 9px 12px; font-size: 13px;
               color: var(--ink); }
.st-menu-chip { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.st-card { background: var(--panel); border: 1px solid var(--rule);
           border-radius: 8px; padding: 11px 13px; margin-bottom: 10px; }
.st-card-t { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.st-card-foot { font-size: 10.5px; color: var(--dim); margin-top: 7px; }
.st-field { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
/* A CLINIC'S CARD, EDITABLE (25 September): each field's row carries its
   own Edit, and the box opens beneath it -- so what is being changed is
   read beside the box that changes it. */
.st-edit { padding: 2px 0; }
.st-edit .st-field { align-items: baseline; }
/* An address is lines: the building, the street, the postcode. */
.st-edit .st-field-v { white-space: pre-line; }
.st-edit-b { margin-left: auto; flex: 0 0 auto; }
.st-edit-form { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.st-edit-form .su-in { width: 100%; box-sizing: border-box; }
.st-edit-form > .btn { align-self: flex-start; }
/* The hours as three rows: the day, then its times. */
.su-day { align-items: center; }
.su-day-l { flex: 0 0 64px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.su-day-in { flex: 1 1 auto; min-width: 0; }
.st-add { margin: 4px 0 10px; }
.st-field-k { flex: 0 0 40%; font-size: 11.5px; color: var(--dim); }
.st-field-v { font-size: 13px; color: var(--ink); }

/* SETTINGS › DOCTOR, ONE VIEW (Ticket #1188, Dr Lau, 20 Nov 2026: "keep
   everything within one view rather than scrolling down, adjust the contrast
   so that is not so blinding", option A). The panel's own quieter tokens:
   text is not near-white, and every text pair still clears 4.5:1
   (verify_doctor_settings_view measures them, both themes). The console's
   own dark fields replace the browser's white inputs. Two columns, and the
   two contact cards side by side, only where the host is wide enough: a
   container query, so the Settings page's narrow panel and the phone stack. */
.drp { --drp-card: #132629; --drp-sunk: #0f2023; --drp-edge: #27403f; --drp-field: #35545a;
  --drp-ink: #d3e1df; --drp-strong: #e2ecea; --drp-lab: #93aba8; --drp-sec: #a9c2be;
  --drp-btn: #18302f; --drp-on: #2d6b64; --drp-on-edge: #3d8a80; --drp-on-ink: #eaf4f2;
  --drp-no: #3a3220; --drp-no-ink: #f1d38f; --drp-no-edge: #6b5a2c;
  --drp-ok: #173a35; --drp-ok-ink: #9fe0d4; --drp-ok-edge: #2f6b62;
  container-type: inline-size; color: var(--drp-ink); }
:root[data-theme="day"] .drp { --drp-card: #ffffff; --drp-sunk: #f2f6f6; --drp-edge: #b5c9cc;
  --drp-field: #6f8d90; --drp-ink: #22403c; --drp-strong: #152a2c; --drp-lab: #46625e;
  --drp-sec: #3a5753; --drp-btn: #eef4f3; --drp-on: #0b6b60; --drp-on-edge: #0b6b60;
  --drp-on-ink: #ffffff; --drp-no: #fbf1dc; --drp-no-ink: #6b4a0a; --drp-no-edge: #c9a45a;
  --drp-ok: #e1f3ef; --drp-ok-ink: #0b5c52; --drp-ok-edge: #6fb8ab; }
/* The region sits in body's flex column with auto margins, which shrinks it to
   its content -- and a container measures as no content, so it is given the width. */
.doctorinfo.drp-host { width: 100%; box-sizing: border-box; }
@media (min-width: 1100px) { .doctorinfo.drp-host { max-width: 1344px; } }
.drp-head { flex-wrap: wrap; align-items: center; row-gap: 6px; }
.drp-head .st-t { color: var(--drp-strong); }
.drp-head > div:last-child { margin-left: auto; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: flex-end; gap: 8px; }
.drp-head > div:last-child > .su-row { margin-top: 0; }
.drp-head > div:last-child > .ask-line:empty { display: none; }
.drp-head > div:last-child > .ask-line { flex: 1 0 100%; text-align: right; }
.drp-head .btn { min-height: var(--tap); }
.drp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container (min-width: 900px) {
  .drp-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; } }
.drp .st-card.drp-profile, .drp .ec { background: var(--drp-card); border: 1px solid var(--drp-edge);
  border-radius: 14px; padding: 18px 20px; margin: 0; }
.drp-sec, .drp .ec-h { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--drp-sec); }
.drp-profile .st-field { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 4px 14px; align-items: baseline; padding: 5px 0; }
.drp-profile .st-field-k { font-size: 11.5px; color: var(--drp-lab); }
.drp-profile .st-field-v { font-size: 13px; color: var(--drp-ink); line-height: 1.5; }
.drp-profile .st-edit-b { margin-left: 0; min-height: var(--tap); color: var(--drp-ink);
  border-color: var(--drp-field); }
.drp-profile .st-card-t { color: var(--drp-strong); margin-top: 10px; }
.drp-profile .st-none { color: var(--drp-lab); }
.drp-profile .su-in { background: var(--drp-sunk); color: var(--drp-ink); border: 1px solid var(--drp-field);
  border-radius: 8px; }
.drp .ec .help-panel { color: var(--drp-ink); }
.ec-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@container (min-width: 560px) { .ec-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.drp .ec-card { min-width: 0; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--drp-sunk); border: 1px solid var(--drp-edge); border-radius: 12px; }
.ec-card-t { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; float: left;
  margin-bottom: 2px; }
.ec-card-n { font-size: 13px; font-weight: 600; color: var(--drp-strong); flex: 1 1 auto; min-width: 0; }
.ec-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; white-space: nowrap; border: 1px solid; }
.ec-badge.is-no { background: var(--drp-no); color: var(--drp-no-ink); border-color: var(--drp-no-edge); }
.ec-badge.is-ok { background: var(--drp-ok); color: var(--drp-ok-ink); border-color: var(--drp-ok-edge); }
.ec-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ec-lab { font-size: 11.5px; color: var(--drp-lab); }
.drp .ec-in { height: 40px; box-sizing: border-box; width: 100%; border-radius: 8px; padding: 0 12px;
  border: 1px solid var(--drp-field); background: var(--drp-sunk); color: var(--drp-ink); font: inherit;
  font-size: 13px; }
.drp .ec-in:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.drp .ec-in:disabled { opacity: 0.75; }
.ec-togs { display: flex; gap: 8px; }
.drp .ec-tog { flex: 1 1 0; min-height: var(--tap); background: var(--drp-btn); color: var(--drp-ink);
  border: 1px solid var(--drp-field); }
.drp .ec-tog.is-on { background: var(--drp-on); border-color: var(--drp-on-edge); color: var(--drp-on-ink); }
.ec-consent { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--drp-ink); }
.ec-consent input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--drp-on-edge); }
.drp .ec-save, .drp .ec-verify, .drp .ec-lookup { min-height: var(--tap); align-self: flex-start;
  background: var(--drp-on); border-color: var(--drp-on-edge); color: var(--drp-on-ink); }
.ec-admin { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--drp-edge);
  display: flex; flex-direction: column; gap: 12px; }
.ec-admin-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ec-admin-row > .ec-field { flex: 1 1 220px; }
.ec-status { margin: 8px 0 0; font-size: 12px; color: var(--drp-ink); }
.ec-status:empty { display: none; }
.st-status { font-size: 12px; color: var(--dim); margin: 6px 0; }
.st-none { font-size: 12px; color: var(--dim); font-style: italic; padding: 8px 0; }
.st-more { font-size: 11px; color: var(--dim); margin-top: 6px; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.st-tab { font-size: 12px; padding: 5px 11px; border-radius: 999px;
          border: 1px solid var(--rule); background: var(--panel);
          color: var(--ink); cursor: pointer; }
.st-tab:hover, .st-tab.on { border-color: var(--teal); color: var(--teal); }
.st-lines { display: flex; flex-direction: column; gap: 3px; }
.st-line { font-size: 13px; color: var(--ink); }
.st-line-gap { height: 7px; }
.st-counts { font-size: 11.5px; color: var(--dim); margin: 8px 0 10px; }
.st-banner { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
             background: var(--panel); border: 1px solid var(--rule);
             border-left: 3px solid var(--teal); border-radius: 8px;
             padding: 9px 12px; margin-bottom: 12px; }
.st-banner-l { font-size: 11.5px; color: var(--dim); }
.st-banner-v { font-size: 13px; font-weight: 600; color: var(--ink); }
.st-banner-sched { font-size: 11px; color: var(--dim); width: 100%; }
/* THE WORD IS IN `.st-verdict-h`, always -- the band repeats it, it does
   not replace it. */
.st-verdict { border-radius: 8px; padding: 10px 13px; margin-bottom: 12px;
              border: 1px solid var(--rule); border-left-width: 3px;
              background: var(--panel); }
.st-verdict-h { font-size: 13px; font-weight: 600; color: var(--ink); }
.st-verdict-serious { border-left-color: var(--red); }
.st-verdict-check { border-left-color: var(--amber); }
.st-verdict-note { border-left-color: var(--teal); }
.st-findings { display: flex; flex-direction: column; gap: 7px; }
.st-finding { border-left: 3px solid var(--hush); padding: 4px 0 4px 11px; }
.st-finding-w { font-size: 11px; color: var(--dim); }
.st-finding-what { font-size: 12.5px; color: var(--ink); }
.st-finding-serious { border-left-color: var(--red); }
.st-finding-check { border-left-color: var(--amber); }
.st-finding-note { border-left-color: var(--teal); }
.st-sims { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.st-sim { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px;
          color: var(--ink); }
.st-sim-mark { flex: 0 0 auto; }
.st-sim-n { color: var(--dim); font-size: 11px; }

/* --- 📨 Requests --- */
.rq-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.rq-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.rq-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.rq-sub { font-size: 11px; color: var(--dim); }
.rq-n { font-size: 11px; color: var(--dim); }
.rq-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.rq-row { background: var(--panel); border: 1px solid var(--rule);
          border-radius: 8px; padding: 10px 13px; }
.rq-who { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rq-wants { font-size: 12.5px; color: var(--ink); margin-top: 3px; }
.rq-when { font-size: 11px; color: var(--dim); margin-top: 2px; }
.rq-note { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.rq-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.rq-none { font-size: 12px; color: var(--dim); font-style: italic; padding: 10px 0; }

/* --- 👥 Meeting --- */
.mt-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.mt-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.mt-n { font-size: 11px; color: var(--dim); }
.mt-new { background: var(--panel); border: 1px solid var(--rule);
          border-radius: 8px; padding: 11px 13px; margin: 12px 0; }
.mt-new-t { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.mt-form { display: flex; flex-direction: column; gap: 7px; }
.mt-in { width: 100%; padding: 8px 11px; font-size: 13px; color: var(--ink);
         background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; }
.mt-in:focus { outline: none; border-color: var(--teal); }
.mt-case { background: var(--panel); border: 1px solid var(--rule);
           border-radius: 8px; padding: 10px 13px; margin-bottom: 9px; }
.mt-case-head { display: flex; align-items: baseline; justify-content: space-between;
                gap: 10px; }
.mt-case-who { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mt-case-q { font-size: 12.5px; color: var(--ink); margin-top: 3px; }
.mt-rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
              margin-top: 9px; }
.mt-none { font-size: 12px; color: var(--dim); font-style: italic; padding: 10px 0; }

/* --- 📞 On call, 🌴 Leave, 📚 Guides --- */
.rs-row { padding: 10px 0; border-bottom: 1px solid var(--hush); }
.rs-row:last-child { border-bottom: none; }
.rs-state { font-size: 13px; margin: 2px 0 4px; }
.rs-summary { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }

/* ==================================================== 💊 the mini button
 *
 * Dr Lau, 8 September: a favourite medicine, one tap, under the dictation.
 * PINNED beside the paperclip rather than in the scrolling strip -- see
 * capture.js: the section chips are a thousand pixels of row on a 390px
 * phone, and a control that answers "the drug I just named" cannot live off
 * the right-hand edge.
 */
.meds-btn { flex: 0 0 auto; padding: 5px 9px; font-size: 13px; line-height: 1;
            background: var(--panel); color: var(--ink);
            border: 1px solid var(--rule); border-radius: 999px;
            cursor: pointer; white-space: nowrap; }
.meds-btn:hover, .meds-btn.showing { border-color: var(--teal); }
/* THE COUNT IS ON THE BUTTON, so a note carrying three drugs does not look
   identical to one carrying none without opening anything. */
.meds-btn.on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.meds-drawer { display: flex; flex-direction: column; gap: 7px; padding: 2px 0 4px; }
.meds-h { font-size: 10px; color: var(--dim); letter-spacing: 0.06em; margin-top: 4px; }
.meds-list { display: flex; flex-direction: column; gap: 5px; }
.med-row { display: flex; align-items: center; gap: 6px; }
.med-chip { flex: 1 1 auto; display: flex; align-items: baseline; gap: 6px;
            text-align: left; padding: 7px 11px; font-size: 13px;
            color: var(--ink); background: var(--panel);
            border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.med-chip:hover { border-color: var(--teal); }
/* ✓ AND NOT COLOUR ALONE. The tick is the cue; the border repeats it. */
.med-chip.on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.med-chip:disabled { opacity: 0.55; cursor: default; }
.med-star { flex: 0 0 auto; padding: 6px 8px; font-size: 13px; line-height: 1;
            background: none; border: 1px solid transparent; border-radius: 8px;
            cursor: pointer; }
.med-star:hover { border-color: var(--rule); }
.meds-on { display: flex; flex-wrap: wrap; gap: 5px; }
.med-on { font-size: 11.5px; color: var(--teal); background: var(--panel);
          border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; }
.meds-find { width: 100%; margin-top: 6px; padding: 7px 11px; font-size: 13px;
             color: var(--ink); background: var(--bg);
             border: 1px solid var(--rule); border-radius: 8px; }
.meds-find:focus { outline: none; border-color: var(--teal); }
.meds-classes { display: flex; flex-wrap: wrap; gap: 5px; }
.meds-class { font-size: 11.5px; color: var(--ink); background: var(--panel);
              border: 1px solid var(--rule); border-radius: 999px;
              padding: 4px 10px; cursor: pointer; }
.meds-class:hover { border-color: var(--teal); }

/* ============================== 🩻 Procedures and 💊 Medicines, as screens
 *
 * The last two front-screen buttons that pointed at nothing. Both are a
 * TICK that feeds the note — nothing here is generated and nothing is
 * delivered — so both read as lists of toggles rather than as forms.
 */
.procedures, .medicines { padding: 16px 18px 26px; max-width: 720px; margin: 0 auto; }

.pr-head, .meds-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.pr-t, .meds-t { font-size: 17px; font-weight: 600; color: var(--ink); }
.pr-sub, .meds-sub { font-size: 11.5px; color: var(--dim); }
.pr-list { display: flex; flex-direction: column; gap: 6px; }
.pr-row { display: flex; align-items: center; gap: 8px; }
.pr-tick { flex: 1 1 auto; text-align: left; padding: 9px 12px; font-size: 13.5px;
           color: var(--ink); background: var(--panel);
           border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.pr-tick:hover { border-color: var(--teal); }
/* ☑️ IS THE CUE; the border repeats it. Colour is never the only signal. */
.pr-tick.on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.pr-tick:disabled { opacity: 0.55; cursor: default; }
.pr-code { flex: 0 0 auto; font-size: 11px; color: var(--dim); }
.pr-note { font-size: 12px; color: var(--dim); background: var(--panel);
           border: 1px solid var(--rule); border-left: 3px solid var(--amber);
           border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
.pr-h { font-size: 10px; color: var(--dim); letter-spacing: 0.06em; margin: 14px 0 5px; }
.pr-others { display: flex; flex-wrap: wrap; gap: 5px; }
.pr-other { font-size: 11.5px; color: var(--teal); background: var(--panel);
            border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; }
.pr-count { font-size: 11.5px; color: var(--dim); margin-top: 14px; }

/* The cancelled strip's heading carries the WEEK'S COUNT — a quality
   control indicator, and the only figure on the grid that is a rate rather
   than an event. Dr Lau, 2026-09-09: "a glance to see how many cancellation
   are there per week". */
.wk-rate-i { color: var(--amber-ink); }
.wk-rate { display: flex; align-items: baseline; justify-content: space-between;
           gap: 6px; }
.wk-rate-n { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
             background: var(--panel); border: 1px solid var(--rule);
             border-radius: 999px; padding: 0 6px; line-height: 1.5; }
/* ── the desktop's first page (9 September) ───────────────────────────────
   Dr Lau: "Desktop: large screen - responsive - to fill the page without
   the need to scroll up and down." The region takes the viewport below the
   spine and clips; each corner scrolls inside itself. Appended, never
   inserted, for the reason the duty board's block gives above. Below
   DESK_MIN (desktop.js) none of this applies: the class is not put on. */
.home.is-desk, .deskenc { --dk-side-width: minmax(268px, 21%); --dk-rail-width: 52px;
  max-width: none; margin: 0; padding: 10px 12px 12px;
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: grid; gap: 10px;
  grid-template-columns: var(--dk-left-track, var(--dk-side-width)) minmax(0, 1fr) var(--dk-right-track, var(--dk-side-width));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "tl centre tr" "bl centre br"; }
/* A CORNER OPENED FULL (Dr Lau, 10 September, points 4-6): the grid keeps
   every corner as it was and hides them under the one full host dkfull.js
   paints, so ↙ is a class removed and nothing repainted. */
.home.is-desk.dk-expanded, .deskenc.dk-expanded { display: flex; flex-direction: column; }
.dk-expanded > :not(.dk-full) { display: none !important; }
.dk-corner { display: flex; flex-direction: column; min-height: 0; min-width: 0;
  overflow: hidden; padding: 11px 13px; border: 1px solid var(--rule);
  border-radius: 12px; background: var(--panel); }
.dk-tl { grid-area: tl; } .dk-bl { grid-area: bl; }
/* THE ENCOUNTER PAGE (24 September): the bill down the whole left side, no
   waiting room. */
.dk-enc-layout { grid-template-columns: var(--dk-left-track, var(--dk-side-width)) minmax(0, 1fr);
  grid-template-areas: "tl centre" "bl centre"; }
.dk-enc-layout > .dk-billside { grid-area: auto; grid-column: tl-start / tl-end; grid-row: tl-start / bl-end; }
.dk-tr { grid-area: tr; } .dk-br { grid-area: br; }
.dk-centre { grid-area: centre; display: flex; flex-direction: column; gap: 10px;
  min-height: 0; min-width: 0; }
/* THE HEADER WRAPS, AND THE SUB GIVES WAY FIRST. A nowrap row inside a
   corner that clips pushes whatever sits at its end outside the box once the
   type scale raises the title (measured 31px out at 1300px, LE-58), and the
   corner's ↗ sits at that end. The sub truncates before the row wraps. */
.dk-corner-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--hush); }
.dk-corner-t { font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--teal); }
.dk-corner-sub { font-size: 10.5px; color: var(--dim); margin-left: auto;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-corner-open { font: inherit; font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--hush); background: transparent; color: var(--dim);
  cursor: pointer; white-space: nowrap; }
.dk-corner-open:hover { border-color: var(--teal-2); color: var(--teal-2); }
.dk-corner-open:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-corner-body { flex: 1 1 auto; min-height: 0; overflow: auto;
  -webkit-overflow-scrolling: touch; }
.dk-corner:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* THE LEFT EDGE FOLDS without covering the centre. The two clinical panels
   leave the grid and a narrow, keyboard-operable rail takes their column;
   the weekly schedule and encounter workspace receive the released width. */
.dk-side-rail { display: none; min-height: 0; min-width: 0; padding: 6px 3px;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--panel); overflow-x: hidden; overflow-y: auto;
  flex-direction: column; align-items: stretch; gap: 8px; }
.dk-left-rail { grid-column: 1; grid-row: 1 / -1; }
.dk-right-rail { grid-column: 3; grid-row: 1 / -1; }
.dk-left-collapsed, [data-left-rail="collapsed"] {
  --dk-left-track: var(--dk-rail-width); }
.dk-right-collapsed, [data-right-rail="collapsed"] {
  --dk-right-track: var(--dk-rrail-w, var(--dk-rail-width)); }
.dk-left-collapsed > .dk-tl,
.dk-left-collapsed > .dk-bl { display: none; }
.dk-right-collapsed > .dk-tr,
.dk-right-collapsed > .dk-br { display: none; }
.dk-left-collapsed > .dk-left-rail { display: flex; }
.dk-right-collapsed > .dk-right-rail { display: flex; }
.dk-side-toggle, .dk-side-rail-tab { border: 1px solid var(--hush);
  background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.dk-side-toggle { display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 4px 8px; border-radius: 9px; font-size: 20px;
  line-height: 1; }
.dk-side-rail > .dk-side-toggle { width: 100%; min-width: 0; padding-inline: 0; }
.dk-side-rail > .dk-side-rail-tab { min-width: 0; }
.dk-side-collapse { min-width: 32px; min-height: 28px; margin-left: 2px;
  padding: 1px 7px; font-size: 17px; }
.dk-side-rail-tab { flex: 1 1 0; min-block-size: 88px; padding: 8px 4px;
  border-radius: 9px; color: var(--ink-2); font-family: var(--mono);
  font-size: 9px; font-weight: 600; letter-spacing: .12em;
  line-height: 1.3; text-transform: uppercase; writing-mode: vertical-rl;
  transform: rotate(180deg); }
.dk-right-rail .dk-side-rail-tab { transform: none; }
.dk-side-toggle:hover, .dk-side-rail-tab:hover {
  border-color: var(--teal-2); color: var(--teal-2); }
.dk-side-toggle:focus-visible, .dk-side-rail-tab:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-expanded > .dk-side-rail { display: none !important; }
/* THE WAITING ROOM AS THE LIGHT SYSTEM — one list, the lamp its own, the
   rows COMPACT so a corner holds four before it scrolls rather than one.
   The room's own row is 146px at the phone's size; at ~30px controls it is
   about 86px, which is what lets a corner this tall show more than one. */
.dk-lane-none { font-size: 10.5px; color: var(--faint); padding-top: 2px; }
.dk-lights { display: flex; flex-direction: column; }
.dk-lights .wr-row { padding: 7px 0 6px; border-top: 1px solid rgba(255,255,255,.05); }
.dk-lights .wr-row:first-child { border-top: 0; }
.dk-lights .wr-head { gap: 6px; }
.dk-lights .wr-acts { gap: 5px; margin-top: 5px; }
.dk-lights .wr-acts .btn { min-height: 30px; padding: 3px 9px; font-size: 11px; }
.dk-lights .wr-type { min-height: 30px; padding: 3px 6px; font-size: 11px; }
/* the tasks corner keeps its counts and drops its second title */
.dk-corner .tk-head:first-child .tk-t { display: none; }
.dk-corner .tk-head:first-child { margin-top: 0; }
/* the front desk */
.dk-notice { display: flex; gap: 8px; padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,.05); }
.dk-notice:first-child { border-top: 0; }
.dk-notice-i { flex: 0 0 auto; font-size: 13px; }
.dk-notice-b { min-width: 0; }
.dk-notice-t { font-size: 12px; color: var(--ink); }
.dk-notice-m { font-size: 10px; color: var(--dimmer); margin-top: 1px; }
.dk-notice-n { font-size: 11px; color: var(--dim); margin-top: 2px; }
.dk-desk-room { font-size: 11px; color: var(--dim); padding: 8px 0 2px; }
/* the functional icons */
.dk-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dk-tile { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 64px; padding: 8px 6px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--panel-2); color: var(--ink-2);
  font: inherit; font-size: 11.5px; cursor: pointer; text-align: center; }
.dk-tile:hover { border-color: var(--teal-2); background: rgba(79,214,200,.06); }
.dk-tile:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-tile-i { font-size: 20px; line-height: 1; }
.dk-tile-pair { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; min-height: 64px; }
.dk-tile-pair .dk-tile { min-height: 0; flex-direction: row; gap: 6px; padding: 4px 6px; }
.dk-tile-pair .dk-tile-i { font-size: 14px; }
/* the centre */
.dk-lead { min-height: 0; }
.dk-lead .home-resume { margin: 0; }
.dk-last { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--dim); padding: 2px 4px; }
.dk-last .tk-key { font-size: 12px; color: var(--ink-2); }
/* Selecting a schedule entry gives context in the centre without opening an
   encounter. A checked-in patient is directed to the one existing room row,
   keeping encounter opening an explicit, server-owned action. */
.dk-schedule-context { display: flex; flex-direction: column; gap: 6px;
  padding: 9px 11px; border: 1px solid rgba(79,214,200,.32);
  border-radius: 10px; background: rgba(79,214,200,.06); }
.dk-schedule-context[hidden] { display: none; }
.dk-schedule-select-kicker { font: 600 9px/1.2 var(--mono); letter-spacing: .16em;
  color: var(--teal); }
.dk-schedule-select-head { display: flex; align-items: baseline; gap: 8px; }
.dk-schedule-select-name { min-width: 0; margin-right: auto; font-size: 13px;
  font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.dk-schedule-select-facts { font-size: 10.5px; color: var(--dim); overflow-wrap: anywhere; }
.dk-schedule-select-action { display: flex; flex-direction: column; gap: 5px; }
.dk-schedule-select-action .wr-row { padding: 6px 0 0; }
/* ONE ROW (Dr Lau, 11 Nov: "make it one row"): every tile the doors switch on
   shares the row, however many there are, rather than wrapping at five. */
.dk-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.dk-actions .dk-action { gap: 6px; padding-left: 9px; padding-right: 8px; }
.dk-actions .dk-action-i { font-size: 18px; }
/* NO DEAD ENDS (26 Sept): the router's own card over a page that drew nothing. */
.deadend { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); }
.deadend-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 420px;
  padding: 20px 22px; border-radius: 14px; border: 1px solid var(--rule);
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); box-shadow: var(--z2); }
.deadend-t { font-weight: 600; font-size: 15px; }
.deadend-s { font-size: 12.5px; color: var(--dim); }
#spine .wordmark[role="link"] { cursor: pointer; }
/* Five tiles in the row since Patient check-in joined (26 Sept): the label
   wraps rather than being cut, at the size the row was drawn for. */
.dk-actions .dk-action-l { font-size: 14px; white-space: normal; overflow: visible; }
.dk-actions .dk-action-s { font-size: 11.5px; }
@media (max-width: 1360px) {
  .dk-actions .dk-action-l { font-size: 13px; }
  .dk-actions .dk-action-i { display: none; }
}
.dk-action { display: flex; align-items: center; gap: 10px; min-height: 58px;
  padding: 10px 14px; border: 1px solid rgba(79,214,200,.3); border-radius: 12px;
  background: rgba(79,214,200,.08); color: var(--ink); font: inherit;
  text-align: left; cursor: pointer; }
.dk-action:hover { background: rgba(79,214,200,.14); border-color: var(--teal); }
.dk-action.is-on { border-color: var(--teal); background: rgba(79,214,200,.18); }
.dk-action:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-action-i { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.dk-action-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dk-action-l { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-action-s { font-size: 10.5px; color: var(--dim); }
.dk-reg { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel); }
.dk-reg-h { font-weight: 600; font-size: 12.5px; margin-bottom: 4px; }
.dk-reg .wr-form { margin-top: 8px; }
/* the carousel */
.dk-car { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel);
  overflow: hidden; }
.dk-car-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid var(--hush); }
.dk-car-tab { padding: 5px 12px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--dim); font: inherit; font-size: 12px;
  cursor: pointer; }
.dk-car-tab:hover { color: var(--ink-2); }
.dk-car-tab.is-on { border-color: rgba(79,214,200,.4); background: rgba(79,214,200,.1);
  color: var(--teal); font-weight: 600; }
.dk-car-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* A LABEL IS NEVER BROKEN ACROSS TWO LINES (11 Nov, his screenshot: "Pre- / clerk", "This / week"
   with both rails open). When the row is too narrow, the week's own tools move to a
   second row whole, rather than every word folding inside its pill. */
.dk-car-head { flex-wrap: wrap; row-gap: 6px; }
/* ONE ROW (#1160, his proposal F, 19 Nov 2026): the ‹ › arrows and the
   "n / 5" counter are gone. Where the panel is too narrow the "🗂 LISTS"
   word is left out rather than the row given a second line for it. */
.dk-car { container-type: inline-size; }
@container (max-width: 920px) { .dk-lists-l { display: none; } }
.dk-car-tab, .dk-list-b, .dk-car-tools .btn, .dk-car-tools .wk-t { white-space: nowrap; }
.dk-car-tools { display: flex; align-items: center; min-width: 0; }
.dk-car-tools .wk-head { margin: 0; gap: 4px; }
.dk-car-tools .btn { min-height: 0; padding: 3px 10px; font-size: 12px; }
.dk-car-tools .wk-t { font-size: 12px; white-space: nowrap; }
/* The foot padding is a variable because the week's pinned legend has to
   reach past it: a sticky box stops at its scroller's padding. */
.dk-car-body { --car-pad-b: 12px; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 12px var(--car-pad-b); }
.dk-car-wait, .dk-car-none { font-size: 11.5px; color: var(--dim); padding: 8px 0; }
/* THE WEEK · DAY SWITCH AND THE LISTS (#1160). The switch is a segmented
   control on the left with the view's own controls beside it; the lists sit
   at the row's right end, each its own colour with a count. */
.dk-cal-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--hush); border-radius: 10px; }
.dk-cal-seg .dk-car-tab { border-radius: 8px; }
.dk-cal-seg .dk-car-tab.is-on { background: var(--teal); border-color: var(--teal); color: var(--accent-ink); }
.dk-lists { margin-left: auto; display: flex; align-items: center; gap: 5px; min-width: 0; }
.dk-lists-l { font-size: 11px; letter-spacing: .14em; color: var(--dim); white-space: nowrap; }
.dk-tone-red { --dk-tone: var(--red); }
.dk-tone-amber { --dk-tone: var(--amber); }
.dk-tone-blue { --dk-tone: var(--map-numb); }
.dk-list-b { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--dk-tone, var(--rule)); background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12.5px; cursor: pointer; }
.dk-list-b:hover, .dk-list-b.is-on { background: var(--panel-hover); color: var(--ink); }
.dk-list-b.is-on { box-shadow: inset 0 0 0 1px var(--dk-tone, var(--rule)); }
.dk-list-b:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-list-n { min-width: 18px; padding: 0 6px; border-radius: 999px; text-align: center;
  background: var(--dk-tone, var(--rule)); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
/* A count not read is "?", outlined rather than filled: never a nought. */
.dk-list-n.is-unread { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--dk-tone, var(--rule)); }
/* THE DRAWER over the right of the schedule, about 480px, its left edge the
   list's colour; ⤢ takes it across the whole panel. Opaque, so the week
   does not show through it. */
.dk-car-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dk-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 5;
  display: flex; flex-direction: column; padding: 10px 14px; box-sizing: border-box;
  border-left: 4px solid var(--dk-tone, var(--teal));
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); box-shadow: -12px 0 24px rgba(0,0,0,.45); }
.dk-drawer[hidden] { display: none; }
.dk-drawer.is-full { left: 0; width: auto; }
/* THE FULL TABLE NEVER SCROLLS SIDEWAYS (23 Nov: "full without horizontal scrolling"): every table in it takes the panel's width, its columns share it and their words wrap. The discharged sheet is fitted whatever its ⇿ says in the drawer. */
.dk-drawer.is-full .dk-drawer-b { overflow-x: hidden; }
.dk-drawer.is-full .dc-wrap, .dk-drawer.is-full .dy-sheet-wrap { overflow-x: hidden; }
.dk-drawer.is-full table { width: 100%; max-width: 100%; }
.dk-drawer.is-full .dy-sheet.dc-sheet { table-layout: auto; }
.dk-drawer.is-full .dc-sheet col { width: auto !important; }
.dk-drawer.is-full .dc-sheet .dc-th, .dk-drawer.is-full .dc-sheet .dc-td, .dk-drawer.is-full .pc-sheet th, .dk-drawer.is-full .pc-sheet td { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.dk-drawer.is-full .dc-sheet .dc-rz, .dk-drawer.is-full .dc-fit { display: none; }
.dk-drawer.is-full .dc-chip, .dk-drawer.is-full .dc-tag { white-space: normal; }
.dk-drawer-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.dk-drawer-t { font-size: 15px; white-space: nowrap; }
.dk-drawer-p { font-size: 12px; color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-drawer-tools { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }
.dk-drawer-btn { min-height: 0; padding: 3px 10px; font-size: 12px; white-space: nowrap; }
.dk-drawer-b { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* THE LEFT FOLD ARROW ON THE WAITING ROOM'S HEADER (#1160), after ↗ and ✕. */
.dk-coltoggle-h { border-color: var(--teal); color: var(--teal); font-weight: 700; }
/* the tools along the foot */
.dk-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.dk-tool { display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 58px; padding: 8px 6px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel); color: var(--ink-2); font: inherit; font-size: 11.5px;
  cursor: pointer; text-align: center; }
.dk-tool:hover { border-color: var(--teal-2); background: rgba(79,214,200,.06); }
.dk-tool:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-tool-i { font-size: 20px; line-height: 1; }
/* everything else, as a sheet */
.dk-sheet { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(4,9,10,0.72); }
.dk-sheet-card { width: min(760px, 100%); max-height: 90vh; overflow: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px;
  background: rgba(7,15,16,0.98); border: 1px solid rgba(79,214,200,0.22);
  box-shadow: var(--z2); }
.dk-sheet-h { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--teal); }
.dk-sheet-c { font-size: 11px; color: var(--dimmer); margin-top: 6px; }
.dk-sheet-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dk-sheet-k { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel);
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.dk-sheet-k:hover { border-color: var(--teal-2); }
.dk-sheet-k:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-sheet-k.away { opacity: .62; cursor: default; }
/* the top bar's two new things: the appointment bot's line, and the clock */
.clock { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--dim);
  white-space: nowrap; flex: 0 0 auto; }
.apptbar { display: inline-flex; align-items: center; gap: 7px; max-width: 380px; min-width: 0;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--dim); font-family: var(--display);
  font-size: 11.5px; cursor: pointer; text-align: left; }
.apptbar-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apptbar.has { border-color: rgba(224,164,74,.45); color: var(--amber-ink);
  background: rgba(224,164,74,.08); }
.apptbar:hover { border-color: var(--teal-2); }
.apptbar:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1099px) { .spine .clock, .spine .apptbar { display: none; } }

/* ── the desktop's encounter page (9 September, page 2) ───────────────────
   The same frame; the centre is the note. The phone's own columns are moved
   in and laid out two-up here, flat -- the tilted planes are the widescreen
   cockpit's and would fight a centre that is already a third of the screen. */
.dk-areas { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--panel); color: var(--dim); font: inherit; font-size: 12px;
  cursor: pointer; }
.dk-tab:hover { color: var(--ink-2); border-color: var(--teal-2); }
.dk-tab.is-on { border-color: rgba(79,214,200,.45); background: rgba(79,214,200,.12);
  color: var(--teal); font-weight: 600; }
.dk-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-tab-n { font-size: 10.5px; color: var(--dimmer); }
.dk-tab.is-on .dk-tab-n { color: var(--teal); }
.dk-area { display: flex; flex-direction: column; min-height: 0; max-height: 42%;
  border: 1px solid rgba(79,214,200,.3); border-radius: 12px; background: var(--panel);
  overflow: hidden; }
.dk-area-h { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px;
  border-bottom: 1px solid var(--hush); }
.dk-area-t { font-weight: 600; font-size: 12.5px; color: var(--teal); }
.dk-area-hint { font-size: 10.5px; color: var(--dimmer); margin-right: auto; }
.dk-area-b { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 12px 12px;
  display: flex; flex-direction: column; gap: 8px; }
.dk-body-gone { font-size: 11px; color: var(--dimmer); padding: 8px 10px;
  border: 1px dashed var(--rule); border-radius: 8px; }
.dk-area-b .field { margin-bottom: 0; }
.dk-area-b .map-svg { width: min(52%, 320px); }
/* A TRANSCRIPT ROW IS `dk-trow`, NOT `dk-tr`. It was `dk-tr`, the top-right
   corner's own seat class, and sitting later in the file it won: both pages
   drew that corner with `padding: 6px 0` and its text ran into the border.
   Measured in Chromium on 23 September, found by the render check. */
.dk-trow { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.05); }
.dk-trow:first-child { border-top: 0; }
.dk-trow-h { font-size: 10px; color: var(--dimmer); letter-spacing: .06em; }
.dk-trow-t { font: 400 13px/1.55 "Newsreader", Georgia, serif; color: var(--ink-2);
  white-space: pre-wrap; margin-top: 3px; }
.dk-trow.is-out .dk-trow-t { text-decoration: line-through; color: var(--dim); }
.dk-tosp .pr-head { margin-bottom: 8px; }
/* the imaging screen within the screen */
.dk-img-studies { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-img-study { display: inline-flex; gap: 7px; align-items: center; padding: 3px 9px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2);
  font-size: 11px; color: var(--ink-2); }
.dk-img-study .mono { font-size: 10px; color: var(--dim); }
.dk-img-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* One button a centre; each opens the centre's own portal in its own tab
   (30 October), so nothing here is framed. */
.dk-img-portal { flex: 0 1 auto; min-width: 0; max-width: 100%; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-img-none { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px dashed var(--rule); border-radius: 8px; font-size: 11.5px; color: var(--dim); }
.dk-img-paste { padding: 10px 12px; border: 1px dashed rgba(79,214,200,.45); border-radius: 8px;
  font-size: 11.5px; color: var(--dim); text-align: center; cursor: text; }
.dk-img-paste:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px;
  color: var(--ink-2); }
/* the documents */
.dk-docs { display: flex; flex-direction: column; gap: 2px; }
.dk-doc { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.dk-doc.away { opacity: .62; }
.dk-doc-tick { background: transparent; border: 0; color: var(--dim); font-size: 15px;
  cursor: pointer; padding: 0; line-height: 1; }
.dk-doc-tick.is-on { color: var(--teal); }
.dk-doc-tick:disabled { opacity: .5; cursor: default; }
.dk-doc-t { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.dk-doc-l { font-size: 12.5px; }
.dk-doc-s { font-size: 10.5px; color: var(--dimmer); }
.dk-doc-pdf { margin-top: 6px; }
/* the note, moved in: two columns, flat */
.dk-enc-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); overflow: hidden; }
.dk-enc-main .capture { flex: 0 0 auto; }
.dk-enc-main main { flex: 1 1 auto; min-height: 0; overflow: hidden; perspective: none;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); grid-template-areas: "note fields"; }
.dk-enc-main .col-sources { display: none; }
.dk-enc-main .col-note { display: block; padding: 12px 16px; transform: none;
  background: none; }
.dk-enc-main .col-fields { padding: 12px 14px; transform: none; box-shadow: none;
  background: none; border-left: 1px solid var(--line); }
.dk-enc-main .footrule { flex: 0 0 auto; padding: 7px 14px; }
.dk-enc-main .cap-strip { display: none; }
/* THE STAGE: the note+pass box and any open holding area share one row. With
   no area open the area is [hidden] and the box fills the row. */
.dk-enc-stage { display: flex; gap: 10px; flex: 1 1 auto; min-height: 0; min-width: 0; }
.dk-enc-stage .dk-area { max-height: none; flex: 1 1 0; min-width: 0; }
/* AN OPEN AREA TAKES THE NOTE'S SEAT: the box narrows to just the pass and
   the note column is hidden, so the area gets the note's full-height width. */
.dk-enc-stage.area-open .dk-enc-main { flex: 0 0 clamp(340px, 40%, 460px); }
.dk-enc-stage.area-open .dk-enc-main main {
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "fields"; }
.dk-enc-stage.area-open .dk-enc-main .col-note { display: none; }
.close.is-flash { box-shadow: 0 0 0 2px var(--teal); transition: box-shadow .2s; }
/* the foot: Done, Pend, Close, Cancel */
.dk-enc-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; }
.dk-act { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 8px 12px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dk-act:hover { border-color: var(--teal-2); }
.dk-act:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-act.is-done { border-color: rgba(79,214,200,.44); background: rgba(79,214,200,.12); }
.dk-act.is-done .dk-act-l { color: var(--teal); }
.dk-act.is-quiet { color: var(--dim); }
.dk-act.is-off { opacity: .62; }
.dk-act-i { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.dk-act-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dk-act-l { font-weight: 600; font-size: 13px; }
.dk-act-s { font-size: 10px; color: var(--dim); }
/* THE WRITING BOARD'S BUTTONS ON THE BAR (ticket #1182): one row that wraps. */
.dk-enc-row.has-board { display: flex; flex-wrap: wrap; align-items: stretch; }
.dk-enc-row.has-board > .dk-act { flex: 1 1 150px; min-width: 0; }
.dk-enc-row.has-board > .dk-enc-more { flex: 0 0 auto; }
.wb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dk-enc-row.has-board > .wb-actions { flex: 2 1 auto; padding: 4px 8px; border: 1px solid var(--rule);
  border-radius: 12px; background: var(--panel); }
.dk-pend { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; margin-top: 6px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); }
/* NOTE TO THE DESK (DOCTOR_DESK_NOTE): with its button the row holds one
   more act, so it shares the width in one line instead of dropping More to
   a second line; Cancel keeps a little more room for its longer caption. */
.dk-enc-row:has(> .dk-act-desknote) { display: flex; }
.dk-enc-row:has(> .dk-act-desknote) > .dk-act { flex: 1 1 0; min-width: 0; }
.dk-enc-row:has(> .dk-act-desknote) > .dk-act.is-quiet { flex-grow: 1.35; }
.dk-enc-row:has(> .dk-act-desknote) > .dk-enc-more { flex: 0 0 auto; }
/* ...and its box: a full-width text box, the count and Send under it, then
   what the send said and what this encounter has sent, one row each. */
.dk-pend.dk-desknote { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 8px 12px; padding: 10px 12px; }
.dk-desknote-text { grid-column: 1 / -1; width: 100%; box-sizing: border-box; min-height: 4.6em;
  padding: 8px 10px; font: inherit; line-height: 1.4; color: var(--ink, inherit); resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.dk-desknote-text::placeholder { color: var(--faint); }
.dk-desknote-text:focus { outline: none; border-color: var(--teal-2); }
.dk-desknote-send { justify-self: end; min-height: 0; }
.dk-desknote-send:disabled { opacity: .55; cursor: default; }
.dk-desknote-send[aria-busy="true"] { cursor: progress; }
.dk-desknote .dk-desknote-said { grid-column: 1 / -1; margin-top: 0; }
.dk-desknote .dk-desknote-said:empty { display: none; }
.dk-desknote .dk-desknote-said.is-ok::before { content: "\2713\00a0"; }
.dk-desknote .dk-desknote-said.is-no { padding: 8px 10px; border: 1px solid rgba(224,90,74,.5);
  border-left-width: 4px; border-radius: 6px; background: rgba(224,90,74,.12); font-weight: 600; }
.dk-desknote .dk-desknote-said.is-no::before { content: "\26a0\00a0"; }
.dk-desknote-list { grid-column: 1 / -1; display: flex; flex-direction: column; }
.dk-desknote-list:empty { display: none; }
.dk-desknote-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-top: 1px solid var(--hush); }
.dk-desknote-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
/* under the note: the type, and the two speed buttons */
.dk-under { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dk-types { display: flex; flex-wrap: wrap; gap: 5px; }
.dk-type { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hush);
  color: var(--dimmer); white-space: nowrap; }
.dk-type.is-on { border-color: rgba(79,214,200,.45); background: rgba(79,214,200,.1);
  color: var(--teal); font-weight: 600; }
.dk-speed { display: flex; gap: 6px; margin-left: auto; }
.dk-speed-b { border-color: rgba(224,164,74,.4); color: var(--amber-ink); }
.dk-speed-b.is-on { border-color: var(--amber); background: rgba(224,164,74,.14); color: var(--amber-ink); }
.dk-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dk-two-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dk-two-h { font-weight: 600; font-size: 12.5px; }
/* the bill, top right of the encounter page */
.dk-bill-kinds { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.dk-bill-kind { display: inline-flex; gap: 6px; align-items: baseline; font-size: 10.5px;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--hush); color: var(--dimmer); }
.dk-bill-kind.has { border-color: rgba(79,214,200,.35); color: var(--ink-2); }
.dk-bill-kind-n { color: var(--teal); }
.dk-bill .mn-title { margin-bottom: 4px; }
/* help and about, small, under the clinic's tiles */
.dk-small { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }
.dk-small-b { background: transparent; border: 0; padding: 2px 4px; font: inherit; font-size: 10.5px;
  color: var(--dimmer); cursor: pointer; text-decoration: underline dotted; }
.dk-small-b:hover { color: var(--teal-2); }
.dk-small-b:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dk-info-t { font-weight: 600; font-size: 13px; margin-top: 6px; }
.dk-info-l { font-size: 11.5px; color: var(--ink-2); font-family: var(--mono); }

/* ── DAY VIEW — the desktop's light theme (Dr Lau, 10 September) ───────────
   "allow the toggle on desktop view between darkview and day view - follow
   best practices on contrast and visual colour management."

   Dark is the default and is UNCHANGED by this block: every rule here is an
   override that only bites when the toggle sets data-theme="day" on <html>.
   The palette is measured to WCAG AA (verify_theme_contrast.py drives it):
   body text is >= 4.5:1 on its ground, and every accent keeps its MEANING --
   teal primary, amber warning, red alert and pain, blue numbness -- darkened
   until it is legible on a light ground rather than glowing on a dark one.
   Accents that were bright-on-dark (the teal tints) become dark-on-pale, so
   a chip that read as a teal glow reads as a teal label; nothing is invented.

   Only the tokens and a handful of dark LITERAL grounds are repainted here;
   the great majority of surfaces already draw through var(--...) tokens and
   flip for free. */
:root[data-theme="day"] {
  color-scheme: light;

  --bg:        #f0f5f5;
  --ink:       #152a2c;
  --ink-2:     #223c40;
  --dim:       #375357;
  --dimmer:    #435f63;
  --faint:     #4e6a6f;
  --hush:      #c6d5d7;
  --rule:      #55797d;
  --label:     #24484c;

  --teal:      #006b60;
  --teal-2:    #155f58;
  --amber:     #78520c;
  --amber-ink: #674816;
  --red:       #b72d26;
  --red-ink:   #8c2924;
  --map-numb:  #225bad;
  --map-swell: #b45309;

  --line:      #b5c9cc;
  --line-soft: #d5e1e2;
  --panel:     #ffffff;
  --panel-2:   #f4f8f8;
  --sunk:      #f4f8f8;

  --z1: 0 8px 22px rgba(20,50,47,0.10);
  --z2: 0 18px 44px rgba(20,50,47,0.14);
  --z3: -30px 0 64px rgba(20,50,47,0.16);
  /* Shared with the front desk: opaque grounds and readable secondary text. */
  --panel-hover: #edf5f3;
  --selected-bg: #deefea;
  --accent-ink: #ffffff;
}

/* the page ground: a light radial rather than the dark one */
:root[data-theme="day"],
:root[data-theme="day"] body {
  background:
    radial-gradient(1400px 900px at 44% 34%, #edf1ef 0%, #e5ebe8 58%, #dde4e1 100%),
    var(--bg);
}
/* THE PATIENT CARD ON A DAY PAGE (LE-58, Parcel M's finding): its ground was
   a literal near-black, the one card the day block had not repainted. */
[data-theme="day"] .patient-card { background: var(--panel); color: var(--ink); border-color: var(--hush); }


/* the tilted depth planes (the widescreen cockpit) go pale, not dark */
[data-theme="day"] .col-fields {
  background: linear-gradient(168deg, rgba(243,246,244,0.9), rgba(229,235,232,0.7)); }
[data-theme="day"] .col-sources {
  background: linear-gradient(168deg, rgba(243,246,244,0.75), rgba(229,235,232,0.5)); }

/* raised cards (sheets, the body plane) go white */
[data-theme="day"] .map-plane-card,
[data-theme="day"] .sheet-card,
[data-theme="day"] .dk-sheet-card,
[data-theme="day"] .ch-sheet { background: #f6f8f7; }

/* modal scrims dim the page but stay light-appropriate, not near-black */
[data-theme="day"] .map-plane,
[data-theme="day"] .sheet,
[data-theme="day"] .dk-sheet,
[data-theme="day"] .ch-sheet-wrap { background: rgba(23,38,36,0.42); }

/* the sign-in ground is a whole page, so a light ground rather than a scrim */
[data-theme="day"] .gate { background: rgba(238,243,242,0.96); }
/* the code's white tile on a white card wants an edge */
[data-theme="day"] .gate-qr-img { border: 1px solid var(--line); }

/* bands and bars: the foot, the capture strip, the drawer, the chat brand */
[data-theme="day"] .footrule,
[data-theme="day"] .cap-bar,
[data-theme="day"] .cap-drawer { background: rgba(255,255,255,0.86); }
[data-theme="day"] .ch-brand { background: var(--panel); }
[data-theme="day"] .file-bar {
  background: linear-gradient(180deg, rgba(238,243,242,0) 0%, rgba(238,243,242,0.94) 34%); }

/* the map dial, and a left-out block */
[data-theme="day"] .map-dial { background: rgba(255,255,255,0.7); }
[data-theme="day"] .block.out { background: rgba(20,50,47,0.05); }

/* the pain/numbness inks a touch stronger on white, so a wide 0.5 stroke
   still reads clearly as red or blue */
[data-theme="day"] .map-ink path { stroke-opacity: 0.62; }

/* ── the toggle itself, in the desktop top bar ──────────────────────────── */
.themebtn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  cursor: pointer; white-space: nowrap; }
.themebtn:hover { border-color: var(--teal-2); color: var(--ink-2); }
.themebtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1099px) { .spine .themebtn { display: none; } }

/* ── room.js's own (LE-49, Parcel E) — the registration guard's inline
   sentence, folded in from its fragment ─────────────────────────────────
   His mock-up, point 7 / board FbRegisterGuard: a bad date of birth is
   said HERE, under the whole field row, before anything is sent, in the
   door's own words -- read off `console_room.dob()` and echoed by
   `app/room.js`'s `walkInForm`, never spelled by this stylesheet or that
   screen. Values off the board; the red already in the palette
   (`--red` / `--red-ink`), which is what carries the correct colour
   under the day theme too. */

/* the date field itself, while the guard holds */
.wr-in.bad {
  border-color: var(--red);
  color: var(--red-ink);
  box-shadow: 0 0 0 2px rgba(224,90,74,.18);
}

/* the sentence, a sibling below the form row -- .wr-err */
.wr-err {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid rgba(224,90,74,.5);
  background: rgba(224,90,74,.08);
  color: var(--red-ink);
  font: 500 12px/1.5 var(--mono);
}

/* Register, disabled for exactly as long as the guard holds -- the same
   dimmed convention this sheet already gives a disabled control elsewhere
   (.cho-btn:disabled and the rest), scoped to this form so it touches no
   other button on the page. */
.wr-form .btn:disabled { opacity: .45; cursor: default; }

/* ── a corner, opened full: the four expansions (LE-49, Parcel C) ─────────
   A FRAGMENT. The integrator appends this to app/app.css under its own
   marker; it is not loaded on its own and it declares no token of its own.
   Every colour, radius and size below is app.css's -- so the dark and day
   palettes both follow with nothing to keep in step, and an expansion
   cannot drift from the corner it grew out of.

   IT STYLES ONLY WHAT app/dkfull.js DRAWS: the prefixes are `dk-full`,
   `dk-quad`, `dk-back`, `dk-q` and `q-`. The rows inside a quarter are the
   borrowed modules' own (`wr-`, `tk-`, `fo-`, `rq-`, `st-`) and are styled
   by app.css already; the only rules here that name them are the two
   COMPACTIONS at the foot, which are scoped under `.dk-quad` so nothing
   outside an expansion can be reached by them.

   THE PAGE NEVER SCROLLS. `.dk-full` is the region below the top bar and
   clips; each quarter scrolls inside itself, exactly as a corner does. The
   values are the mock-up's own, measured at 1440x900 --
   design/FbRoomFull.dc.html, FbTasksFull, FbDeskFull, FbClinicFull. */

/* THE HOST. The integrator paints an expansion into the page's own region,
   which is a grid (`.home.is-desk`, `.deskenc`); the grid placement below
   lets the expansion span the whole of it while the corners are hidden, so
   opening one is a class and a paint rather than a second layout. */
.dk-full {
  grid-column: 1 / -1; grid-row: 1 / -1;
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
}

/* the header: what is open, how much of it there is, and the way back */
.dk-full-h {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 14px; border: 1px solid var(--rule);
  border-radius: 12px; background: var(--panel);
}
.dk-full-t { font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  color: var(--teal); }
.dk-full-sub { font-size: 12px; color: var(--dim); }
.dk-back {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(79, 214, 200, .44); background: rgba(79, 214, 200, .12);
  color: var(--teal); font: inherit; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.dk-back:hover { border-color: var(--teal); }
.dk-back:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* the four parts: two by two, each one the frame's own corner */
.dk-quad {
  flex: 1 1 auto; min-height: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
/* a quarter is a `.dk-corner` and takes its box from app.css; what it must
   NOT take is the corner's own grid area, or all four would stack in one */
.dk-quad .dk-corner { grid-area: auto; }

/* what a quarter says about itself */
.q-foot { margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--dimmer); line-height: 1.5; }
.q-empty { font-size: 11px; color: var(--faint); padding: 6px 0; }
/* A ROW THIS PAGE HAD NO RULE FOR, kept and named -- amber, because it is
   something to look at rather than something wrong. */
.q-odd { margin-top: 8px; font-size: 10.5px; color: var(--amber);
  line-height: 1.5; }
/* a painter its module does not export yet, named rather than blank */
.dk-full-seam { font-size: 11px; color: var(--amber-ink);
  border: 1px solid rgba(224, 164, 74, .45); background: rgba(224, 164, 74, .08);
  border-radius: 8px; padding: 8px 10px; line-height: 1.5; }

/* the clinic corner's remaining tiles, beneath the audit */
.q-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.q-link { display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 5px 11px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--panel);
  color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.q-link:hover { border-color: var(--teal-2); color: var(--teal-2); }
.q-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.q-link-i { font-size: 14px; line-height: 1; }
.q-link-l { white-space: nowrap; }

/* ── the two compactions, scoped inside a quarter and nowhere else ────────
   A quarter is about half a corner's width and half the page's height, so
   the borrowed rows come down a size, and the borrowed painters' OWN
   headings go: the quarter's header already says which screen this is, and
   two headings one above the other is the mock-up's one measured misfit. */
.dk-quad .wr-row { padding: 7px 0 6px; }
.dk-quad .wr-acts { gap: 5px; margin-top: 5px; }
.dk-quad .wr-acts .btn { min-height: 30px; padding: 3px 9px; font-size: 11px; }
.dk-quad .wr-type { min-height: 30px; padding: 3px 6px; font-size: 11px; }
.dk-quad .tk-row { padding: 5px 0; }
.dk-quad .tk-what { font-size: 12.5px; }
.dk-quad .tk-group { margin: 6px 0 1px; }
.dk-quad .fo-enc { padding: 6px 0; }
.dk-quad .rq-row { padding: 7px 0; }
.dk-quad .st-card { margin-bottom: 8px; }
.dk-quad .st-field-k { flex: 0 0 44%; }

/* THE BORROWED PAINTER'S OWN TITLE GOES, AND ONLY THE TITLE. The quarter's
   header already says which screen this is, and two headings one above the
   other is the mock-up's one measured misfit -- but the COUNT beside a
   title is a fact the quarter's own header does not carry (how many are
   waiting; which encounter the basket belongs to; that it is the latest
   rather than the open one), so each is left standing. `.tk-head` is left
   whole: in the fourth quarter it is what separates the defaulters from
   the tray above them. */
.dk-quad .st-head,
.dk-quad .rq-title .rq-t,
.dk-quad .mn-title .mn-t { display: none; }

/* THE REGISTRATION FORM under the desk's quarter: the same drawer the
   first page opens, sitting in a quarter rather than in the centre. */
.dk-quad .dk-reg { margin-top: 8px; }

/* ── fb_folder.css — the folder's new sections (LE-49, Parcel D) ─────────
   A DELIVERY VEHICLE, NOT A SECOND STYLESHEET. `app/app.css` is one of the
   eight files the integrator alone touches (LE-37), and it is not parsed by
   either required check — so a parcel that edited it would be the shape
   that put conflict markers on `main`. This block is folded in under the
   marker line above; `verify_console_folder.py` reads it back out of
   app.css by that marker once it has been, and out of this file until then.
   Both markers are load-bearing: the slice is BOUNDED AT BOTH ENDS, so
   whatever is appended after it later cannot be swallowed into it — the
   LE-48 lesson, where a block appended at end-of-file joined the last
   parcel.

   Nothing here restyles a class the folder already had. `.fo-h`, `.fo-enc`,
   `.fo-enc-l`, `.fo-enc-r`, `.fo-encs` and `.fo-enc.is-gone` are the
   folder's own and are reused as they are; what follows is only what the
   five new sections need. Fold it beside the commit-13 folder block. */

/* A HEAD THAT NAMES ITS SOURCE. "the medication tag", "the cabinet, by
   kind", "off each encounter's DIAGNOSIS" — a panel that says where a row
   came from can be checked against the tag it came from, which is the
   habit the rest of these screens already have. It is a SEPARATE class
   rather than a change to `.fo-h`, so every head the folder already draws
   renders exactly as it did. */
.fo-h2 { display: flex; align-items: baseline; gap: 8px; }
.fo-h-r { margin-left: auto; font-size: 10px; letter-spacing: 0.04em;
  text-transform: none; color: var(--dimmer); text-align: right;
  max-width: 58%; line-height: 1.35; }

/* THE FLAG A RESULT ARRIVES WITH. Never raised here — `flagged` is what
   the record carries, and the door passes it through. Amber rather than
   red: this marks a row to READ, it does not grade a result. */
.fo-flag { font-size: 11px; color: var(--amber); flex: 0 0 auto; }

/* The films' seat, claimed while the page paints and filled when the
   cabinet answers, so an async list cannot land under a section drawn
   after it. It lays out nothing of its own. */
.fo-films-slot { display: contents; }

/* A LONG LEFT-HAND CELL MUST NOT PUSH THE DATE OFF THE ROW. A diagnosis, a
   drug with its schedule and a stay with its operation are all longer than
   an encounter label, and `.fo-enc` is a flex row whose right cell is
   pushed out by `margin-left: auto`. Wrapping the left cell keeps the
   stamp where the eye looks for it, at the right, on every width. */
.fo-enc-l { min-width: 0; overflow-wrap: anywhere; }
.fo-enc-r { flex: 0 0 auto; white-space: nowrap; }

/* THE FOLDER AS A CORNER OF THE ENCOUNTER PAGE. `paintFolderInto` draws
   the same rows into a quarter of a 1440-wide page, where the room is
   vertical and not horizontal: the type steps down, the heads sit closer,
   and the corner scrolls INSIDE itself so the page never does. Under the
   desktop width only — the phone's folder is unchanged. */
@media (min-width: 1100px) {
  .dk-corner-body .fo-h { margin: 8px 0 3px; }
  .dk-corner-body .fo-h:first-child { margin-top: 0; }
  .dk-corner-body .fo-enc { font-size: 11.5px; line-height: 1.35; }
  .dk-corner-body .fo-enc-r { font-size: 10.5px; }
  .dk-corner-body .fo-m { font-size: 11.5px; }
  .dk-corner-body .fo-m-n { min-width: 0; }
  .dk-corner-body .fo-fields { gap: 2px 8px; }
}
/* ── end fb_folder.css ──────────────────────────────────────────────── */

/* ── fb_checkin.css — the check-in, grouped by kind (LE-49, Parcel A) ─────
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the eight
   files the integrator alone touches (LE-37); this text is folded into it
   under the marker line above, appended to the EXISTING check-in block
   that begins at `.checkin { padding: 10px 14px; }` rather than dropped at
   end-of-file — the LE-48 lesson, that a block after the last marker joins
   the last parcel, is why this file is bounded at both ends rather than
   left to trail off at EOF.

   NOTHING HERE RESTYLES A CLASS THE SCREEN ALREADY HAD FOR A DIFFERENT
   REASON. `.ci-head`, `.ci-t`, `.ci-where`, `.ci-why`, `.ci-none` and
   `.ci-status` (with its four state classes) are app.css's own, already
   token-driven, and still correct for the new markup — only `.ci-t` gets
   one line here, because the board's card carries a larger title than the
   list it replaces. `.ci-row`, `.ci-list`, `.ci-kind`, `.ci-confirm` and
   `.is-asking` are the OLD list's, now unused by app/checkin.js; left in
   place rather than pruned, because pruning app.css is not this parcel's
   file to touch.

   EVERYTHING BELOW IS NEW, FOR THE THREE-GROUP CARD design/FbCheckin.dc.html
   DRAWS: `.ci` (the card), `.ci-cols` (the three columns), `.ci-group` /
   `.ci-g-t` (a group and its heading), `.ci-entity` (a group's own
   sub-heading, by who invoices — added after delivery, on a coordinator
   follow-up: the board's own look, `#c3ddda` bold, which is `var(--ink-2)`
   exactly), `.ci-places` / `.ci-place` (the wrapping row of name-sized
   buttons — 44px tall, `var(--tap)`), its three marks `.is-here` /
   `.is-ask` / `.is-expected`, `.ci-hint` (the "Opens …" line under a
   group) and `.ci-foot`.

   TOKENS, NOT THE BOARD'S OWN HEX. The board was drawn dark-only, before
   this session's dark/day toggle (also 10 September, same desktop PR);
   every colour below is one of app.css's existing `var(--…)` tokens so
   this card flips with the rest of the page for free, exactly as the
   toggle's own commit made the rest of the shell do — a fragment that
   pasted the board's literals back in would be the one corner of the
   desktop the toggle does not reach. The one deliberate exception is
   `.is-ask`'s ring, a low-alpha decorative box-shadow with no text sitting
   on it, so it is not a contrast question the way a background or a
   border is.

   `.ci-cols` STACKS BELOW THE DESKTOP WIDTH (1099px, `.spine`'s own
   breakpoint) because `app/checkin.js` is the phone's check-in screen
   too — the mock-up is the desktop's, the module is not. */

.ci-t { font-size: 16px; }

.ci {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  gap: 10px; padding: 14px 16px; border: 1px solid var(--rule);
  border-radius: var(--r-l); background: var(--panel);
}
.ci-cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; flex: 1 1 auto; min-height: 0;
}
.ci-group {
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  border: 1px solid var(--hush); border-radius: var(--r);
  background: var(--panel-2); min-height: 0;
}
.ci-g-t {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--teal);
}
/* A GROUP'S OWN SUB-HEADING, BY WHO INVOICES — drawn only when checkin.js
   decides there is more than one entity, or one worth naming, in this
   group; never drawn over a lone hospital or a day surgery centre with
   none. First of a run gets no extra gap above it; app.css's own
   `.ci-group { gap: 8px }` already spaces every child evenly, including
   this one from the `.ci-places` before it. */
.ci-entity { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.ci-places { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-place {
  display: inline-flex; flex-direction: column; gap: 2px;
  min-height: var(--tap); justify-content: center; padding: 7px 14px;
  border-radius: var(--r); border: 1px solid var(--rule);
  background: var(--panel); color: var(--ink); font: 500 13px var(--display);
  text-align: left; cursor: pointer;
}
.ci-place:hover { border-color: var(--teal-2); }
.ci-place:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.ci-place .ci-why { font-size: 10px; color: var(--dimmer); font-weight: 400; }

/* WHERE HE IS. A filled teal tint — `--line`, already theme-adapted, not
   the board's dark-only rgba — and the strongest of the three marks that
   is not mid-confirmation. */
.ci-place.is-here { border-color: var(--teal); background: var(--line); color: var(--teal); }
.ci-place.is-here .ci-why { color: var(--dim); }

/* WHAT THE ROSTER EXPECTS, and not also where he is — a dashed outline
   only, so it reads as a suggestion rather than a state. */
.ci-place.is-expected { border-style: dashed; border-color: var(--amber); }
.ci-place.is-expected .ci-why { color: var(--amber-ink); }

/* THE SECOND TAP IS PENDING HERE. Outranks the other two marks — a row
   asking to be confirmed says so over anything else it also happens to
   be — and carries the strongest signal: a solid border, ink-toned text,
   and a ring with nothing sitting on it for its colour to have to clear. */
.ci-place.is-ask {
  border-color: var(--amber); color: var(--amber-ink);
  box-shadow: 0 0 0 2px rgba(224,164,74,.2);
}
.ci-place.is-ask .ci-why { color: var(--amber); }

.ci-hint {
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--hush);
  font-size: 10.5px; color: var(--dim); line-height: 1.5;
}
.ci-hint b { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.ci-foot { font-size: 11px; color: var(--dimmer); line-height: 1.5; }

/* THE BOTTOM HALF: two columns under the picker. His layout, 24 September --
   "1 on top (check in), 2 columns at the bottom". The picker keeps the whole
   width above; checking out and who is on the desk share the row below. */
.ci-bottom {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.ci-bcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ci-b-t {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dimmer); margin-bottom: 2px;
}
.ci-b-none { font-size: 12px; color: var(--dimmer); line-height: 1.5; }
/* EVERY CONTROL CLEARS THE 44px FLOOR without being DRAWN at 44px, which is
   what `verify_desktop_tap_targets` measures: the hit area grows, the row
   does not, so two columns still fit under the picker at 1440. */
.ci-act, .ci-desk {
  position: relative; text-align: left; font: inherit; font-size: 12px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--sunk); color: var(--ink);
}
.ci-act::before, .ci-desk::before {
  content: ''; position: absolute; left: 0; right: 0;
  top: 50%; transform: translateY(-50%); height: 44px;
}
.ci-act:hover:not(:disabled), .ci-desk:hover:not(:disabled) {
  border-color: var(--teal);
}
.ci-act-end { border-color: var(--amber-ink); color: var(--amber-ink); }
.ci-act-cover { border-style: dashed; }
/* THE STATE IT IS IN reads as a fact, not as a button you failed to press. */
.ci-desk.is-now { border-color: var(--teal); color: var(--teal); }
.ci-desk.is-off { opacity: .45; cursor: default; }

@media (max-width: 1099px) {
  .ci-cols { grid-template-columns: 1fr; }
  /* ONE COLUMN ON A PHONE. Two 12px columns at 390px clip his longest desk
     label -- "No receptionist required (App not activated)" -- and a label
     cut mid-word is the fault the render pass found on the encounter page. */
  .ci-bottom { grid-template-columns: 1fr; }
}
/* ── end fb_checkin.css ─────────────────────────────────────────────── */
/* ── end fb_checkin.css ─────────────────────────────────────────────── */

/* ── the week grid's chips in day view ─────────────────────────────
   MEASURED 17 SEPTEMBER, AND THEY WERE INVISIBLE. The day/dark toggle of 10
   September was measured to WCAG AA across the palette -- but it works on
   TOKENS, and .wk-ph, .wk-leave and .wk-call are hand-picked literals from
   before that toggle existed, so nothing ever checked them. Their pale text
   on a near-white panel measures about 1.26:1 against the 4.5:1 AA asks for:
   drawn, and unreadable.

   Found while adding a fourth chip beside them, and fixed rather than
   matched -- one legible chip next to three invisible ones is worse than
   either state. DARK IS UNTOUCHED: this only bites under
   [data-theme="day"], so the default renders exactly as it did. Each ink is
   a darkened version of that chip's own hue, so what the colour MEANS is
   unchanged and only its legibility moves.

   PLACED HERE, ABOVE THE CHAT SECTIONS, and not at end-of-file where it was
   first written: verify_console_chatenc slices the chat fragment
   marker-to-EOF, so anything appended after the last marker is read as part
   of that fragment and fails its purity checks -- appending at EOF is not
   free in this file. Source order does not change the result;
   [data-theme="day"] .wk-ph outranks a bare .wk-ph wherever it sits. */
:root[data-theme="day"] .wk-ph { color: #1c4a86; border-color: rgba(96,150,220,.55); }
:root[data-theme="day"] .wk-leave { color: #55551f; border-color: rgba(150,150,120,.6); }
:root[data-theme="day"] .wk-call { color: #5a2d86; border-color: rgba(168,120,214,.55); }
:root[data-theme="day"] .wk-deskleave { color: var(--dim); }

/* ── fb_spine.css — the top bar (LE-49, Parcel B) ─────────────────────────
   Folded whole from reference/fragments/fb_spine.css, between its own BEGIN and
   END markers; above the chat sections because verify_console_chatenc slices
   marker-to-EOF. ─────────────────────────────────────────────────────────── */
/* ============================ 👩‍⚕️ THE NURSES (5 October)
   Settings -> Nurses and the per-patient nurse control (app/nurses.ts).
   Above the marked chat sections, not at end-of-file: a block after the last
   marker joins the last parcel (the LE-48 lesson). `.nr-` was free --
   searched before it was claimed. */
.nr-block { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.nr-t { font-weight: 700; font-size: 13px; color: var(--ink); }
.nr-needs .nr-t { color: var(--amber); }
.nr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 4px 0; }
.nr-row.is-off { opacity: .6; }
.nr-name { font-weight: 600; color: var(--ink); }
.nr-sub { color: var(--dim); }
.nr-in { min-height: var(--tap); box-sizing: border-box; width: 100%; max-width: 420px; }
.nr-care:empty { display: none; }
.nr-care { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.nr-chart { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.nr-entry { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ink-2); }
.nr-entry.is-flagged .nr-entry-t { color: var(--amber); }
.nr-entry.is-withdrawn .nr-entry-t { text-decoration: line-through; color: var(--dim); }
.nr-medform { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 420px; }
.nr-sub.is-withdrawn { text-decoration: line-through; }
/* IMAGING REPORTS AWAITED (app/imagingback.ts, browser check 11 Nov): each
   open order one bordered row -- study and centre, then its wait, then the
   two acts apart (receiving left, cancelling right) so they cannot be taken
   for each other. Overdue rows lead, with the console's amber rule; the
   reason box opens only once "Cancel order" is chosen. No font sizes here:
   the type scale's .nr-entry and .btn-small sizes carry it. */
.ib-row { flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r); }
.ib-row.is-overdue { border-left: 3px solid var(--amber); }
.ib-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ib-wait.is-overdue, .ib-warn { color: var(--amber-ink); font-weight: 600; }
.ib-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ib-recv, .ib-cxl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ib-recv { flex: 1 1 320px; }
.ib-recv .nr-in { flex: 1 1 220px; width: auto; }
.ib-cxl-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding-top: 6px; border-top: 1px dashed var(--line-soft); }
.ib-cxl-form[hidden], .ib-cxl .btn[hidden] { display: none; }
.ib-cxl-form .nr-in { flex: 1 1 220px; width: auto; }
.ib-row .ask-line:empty { display: none; }
.ib-row .ask-q, .sheet-card .ask-q { white-space: pre-line; }
.ask-line .file-auto { margin-bottom: 6px; color: var(--amber-ink); }
.sheet-row.is-picked { border-color: var(--teal); background: rgba(79,214,200,0.10);
  box-shadow: inset 3px 0 0 var(--teal); }
.sheet-row.is-mismatch { border-style: dashed; }
@media (max-width: 767px) {
  .ib-cxl { width: 100%; padding-top: 6px; border-top: 1px dashed var(--line-soft); }
}
.nr-photos { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.nr-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.nr-row.is-urgent .nr-name { color: var(--red); }
.nr-msg { width: 100%; color: var(--ink); white-space: pre-wrap; }
.nr-notes { display: flex; flex-direction: column; gap: 8px; }
.nr-note { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.nr-note.is-withdrawn .nr-msg { text-decoration: line-through; color: var(--dim); }
.nr-note.is-flagged .nr-msg { color: var(--amber); }
.nr-record { margin-top: 6px; }
.nr-trend { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
.nr-trend-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nr-trend-t { min-width: 120px; color: var(--ink); font-weight: 600; }
.nr-spark { width: 160px; height: 32px; flex: none; }
.nr-spark-line { fill: none; stroke: var(--teal); stroke-width: 1.5; }
.nr-spark-flag { fill: var(--amber); }
.nr-spark-last { fill: var(--teal); }
.fv-nurse:empty { display: none; }
.fv-nurse { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.fv-nurse-t { font-weight: 700; color: var(--ink); }
.fv-nurse-b { color: var(--ink-2); }
.fv-nurse-b.is-red { color: var(--red); font-weight: 600; }
.fv-nurse-b.is-amber { color: var(--amber); }

/* ============================ RECORDINGS & TRANSCRIPTS, on the console
   Deliberately ABOVE the marked parcels: every fragment below is sliced by
   its own BEGIN/END markers, and a block appended at end-of-file joins
   whichever parcel was last -- the fault the day-theme layer met on
   10 September. This belongs to no parcel, so it sits before them all.

   The screen's point is the gap between two numbers -- files kept, against
   transcripts the model can be given -- so a row with no words is marked
   rather than merely quieter: a file that contributes nothing to the note
   is the one thing he has to be able to see at a glance. */
.rc-open { width: 100%; text-align: left; margin-top: 10px; }
.rc-open.is-open { color: var(--teal); }
.rc-area { margin-top: 8px; }

.rc-top { margin-bottom: 8px; }
.rc-title { margin: 0 0 2px; font-size: 14px; }
.rc-count { font-size: 12px; color: var(--dim); }
.rc-gap { font-size: 12px; color: var(--amber); margin-top: 2px; }

.rc-list { display: flex; flex-direction: column; gap: 8px; }
.rc-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
          background: var(--sunk); }
/* NOT COLOUR ALONE: the row carries the words "No words yet" as well as the
   edge, because six states is past what colour carries and a clinician
   reading quickly must not have to infer it from a shade. */
.rc-row.is-silent { border-left: 3px solid var(--amber); }

.rc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
           font-size: 11px; color: var(--dim); }
.rc-n { font-weight: 600; color: var(--ink); font-size: 12px; }
.rc-secs, .rc-when { font-variant-numeric: tabular-nums; }
.rc-held { margin-left: auto; }

.rc-words { margin-top: 6px; font-size: 13px; line-height: 1.45;
            white-space: pre-wrap; word-break: break-word; }
.rc-none { color: var(--dim); font-style: italic; }

.rc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rc-audio { width: 100%; margin-top: 8px; }
.rc-why { margin-top: 6px; font-size: 12px; color: var(--dim); }

.rc-all { margin-top: 12px; }
.rc-all-b { width: 100%; }
.rc-note { margin-top: 4px; font-size: 11px; color: var(--dim); }
.rc-confirm { border: 1px solid var(--amber); border-radius: 8px;
              padding: 10px; margin-top: 4px; }
.rc-confirm-say { font-size: 13px; line-height: 1.45; }
.rc-yes { background: var(--amber); }

/* ==== fd_appdesk BEGIN — the front desk's Patient app tab (AB-17 §C) ==== */
/* ── fd_appdesk.css — the front desk's Patient app tab (AB-17 §C) ──────────
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is the integrator's;
   this block is folded into it under its own marker, never appended after
   the last chat marker (LE-48: a marker-to-EOF slice swallows whatever
   follows it). Every class is new under `fd-pa-` -- measured unused in
   app/app.css and app/*.ts before it was chosen -- and every colour is a
   token app/app.css's :root already defines. The read-back line is
   asktwice's own `.ask-line`, and the buttons are `.btn .btn-small`, so
   nothing here restyles another screen's class. */
.fd-pa { display: flex; flex-direction: column; gap: 8px; }
.fd-pa-off, .fd-pa-empty, .fd-pa-foot { font-size: 12px; color: var(--dim); line-height: 1.45; }
.fd-pa-said { font-size: 12px; color: var(--teal); }
.fd-pa-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fd-pa-chip { font: inherit; font-size: 11px; padding: 4px 8px; min-height: 28px; border-radius: var(--r);
  border: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; }
.fd-pa-chip[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
.fd-pa-list { display: flex; flex-direction: column; gap: 6px; }
.fd-pa-row { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); }
.fd-pa-row.is-stale { border-left: 3px solid var(--amber); }
/* The Enquiries tabs (15 Nov): CareBee, Website, Log; each row a one-line card. */
.fd-eq { position: relative; margin-bottom: 12px; }
.fd-eq-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.fd-eq-tab { font: inherit; font-size: 13px; min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; }
.fd-eq-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--teal); }
.fd-eq-tab-l { display: inline-flex; align-items: center; gap: 4px; }
.fd-eq-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #1a0705; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.fd-eq-n.is-unknown { background: transparent; color: var(--dim); outline: 1px solid var(--line); }
.fd-eq-list { display: flex; flex-direction: column; gap: 6px; }
.fd-eq-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 10px; }
.fd-eq-row.tappable { cursor: pointer; }
.fd-eq-row.is-stale .fd-eq-age { color: var(--amber); }
.fd-eq-row[aria-expanded="true"] .fd-eq-what { color: var(--teal); }
.fd-eq-sym { flex: 0 0 auto; cursor: help; display: inline-flex; align-items: center; }
.fd-eq-sym.ci-arr-bee::before { margin: 0; }
.fd-eq-tile { flex: 0 0 auto; font-size: 12.5px; color: var(--ink); white-space: nowrap; cursor: grab; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.fd-eq-tile:hover, .fd-eq-tile:focus-visible { border-color: var(--teal); }
.fd-eq-tile.is-none { color: var(--dim); border-style: dashed; cursor: default; }
.fd-eq-what { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.fd-eq-age { flex: 0 0 auto; font-size: 12px; color: var(--dim); white-space: nowrap; cursor: help; }
.fd-eq-two { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fd-eq-two .fd-eq-what { flex: 0 0 auto; max-width: 100%; }
.fd-eq-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.fd-eq-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.fd-eq-log-who, .fd-eq-log-what { display: block; }
.fd-eq-log-who { color: var(--ink); }
.fd-eq-go { flex: 0 0 auto; }
.fd-eq-card, .fd-eq-cal { margin: 0 0 4px 16px; padding: 8px 0 8px 10px; border-left: 2px solid var(--teal); display: flex; flex-direction: column; gap: 8px; }
.fd-eq-card-q, .fd-eq-cal-h { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.fd-eq-note { width: 100%; min-height: 52px; box-sizing: border-box; font: inherit; font-size: 13px; }
.fd-eq-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-eq-said { font-size: 12.5px; color: var(--teal); }
.fd-eq-none { font-size: 12.5px; color: var(--dim); padding: 4px 0; }
.fd-eq-menu { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 16px; }
.fd-eq-menu-i { font: inherit; font-size: 13px; text-align: left; min-height: 36px; color: var(--ink); cursor: pointer; }
.fd-eq-menu-i:hover, .fd-eq-menu-i:focus-visible { color: var(--teal); }
.fd-eq-days { display: flex; flex-wrap: wrap; gap: 4px; }
.fd-eq-day { font: inherit; font-size: 12px; min-height: 44px; min-width: 52px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; border: 1px solid var(--line); border-radius: 8px; }
.fd-eq-day[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
.fd-eq-day:disabled { opacity: .45; cursor: default; }
.fd-eq-day-n { font-size: 10.5px; color: var(--dim); }
.fd-eq-lamp { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; display: inline-block; cursor: help; align-self: center; }
.fd-eq-lamp.is-waiting { background: var(--rule); }
.fd-eq-lamp.is-done { background: var(--bee-connected); }
.fd-eq-logrow { display: grid; grid-template-columns: 12px 96px 20px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.fd-eq-log-t { font-size: 11.5px; color: var(--dim); }
.fd-eq-log-d { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.fd-pa-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 12px; }
.fd-pa-type { color: var(--ink); font-weight: 600; }
.fd-pa-state { color: var(--dim); }
.fd-pa-stale { color: var(--amber-ink); }
.fd-pa-who { font-size: 12px; color: var(--ink); margin-top: 2px; }
.fd-pa-when { color: var(--dimmer); }
.fd-pa-appt, .fd-pa-tpl, .fd-pa-answered, .fd-pa-booking { font-size: 12px; color: var(--dim); margin-top: 2px; }
.fd-pa-note { font-size: 12px; margin-top: 4px; padding: 4px 6px; border-left: 2px solid var(--hush); }
.fd-pa-note-l { color: var(--label); font-weight: 600; }
.fd-pa-note-t { color: var(--ink); }
.fd-pa-acts, .fd-pa-form-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fd-pa-form { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hush); display: flex; flex-direction: column; gap: 4px; }
.fd-pa-field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--dim); }
.fd-pa-offer { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-pa-move { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
/* ==== fd_appdesk END — the front desk's Patient app tab (AB-17 §C) ==== */

/* ==== tc_desk BEGIN — the front desk's Teleconsult tab, redrawn (5 November 2026) ==== */
/* Dr Lau, 5 November 2026, on a screenshot of this tab in the desk's right
   panel: "looks outdated - pls use your design skill to update this against
   the best practices". What changed, and why:
   - ONE CARD FOR THE FORM, its facts in one panel, room between fields: the
     fields were 4px apart and the facts three loose sentences.
   - FIELDS AT --tap HEIGHT with the label above in the label colour: they
     were about 28px high under small grey labels, and the day and the time
     were in the browser's own typewriter face.
   - THE DAY AND THE TIME SIDE BY SIDE once the tab is wide enough -- a
     container query on the tab itself, because the panel is dragged to any
     width and the window's width says nothing about it.
   - LENGTH AND VISIT AS BUTTONS (teleconsult.ts `choices`): five and two
     choices, all in sight, one tap each, the chosen one marked.
   - ONE FILLED BUTTON: Hold for payment is the form's only solid action;
     everything else is outlined or quiet.
   - THE DOOR'S ANSWER AS A CALLOUT: a refusal is a tinted box with a red
     edge and a done one a teal edge, not a bare coloured sentence; the
     read-back keeps its amber box.
   - NOTHING WIDER THAN THE PANEL: every field may shrink and long words
     break, so the panel never scrolls sideways (his screenshot had its left
     edge cut off).
   Scoped under `.tc-desk`, so the Patient app tab's `fd-pa-` classes, which
   this tab borrows, are unchanged everywhere else. Every colour is a token
   this file's :root (and the desk page's own block) already defines. The
   sizes are the phone's; the desktop type scale raises them, as for every
   other rule. */
.tc-desk { container-type: inline-size; gap: 20px; min-width: 0; overflow-wrap: anywhere; }
.tc-desk .fd-pa-said { padding: 10px 12px; border-radius: var(--r); border-left: 3px solid var(--teal);
  background: var(--selected-bg); color: var(--ink); font-size: 13px; line-height: 1.45; }
.tc-desk > .fd-pa-off { font-size: 13px; line-height: 1.5; }

/* the three headings: the app's requests, the form, the list */
.tc-desk .tc-requests > .fd-pa-type, .tc-desk .tc-title, .tc-desk .tc-sec-h {
  font-size: 15px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.tc-desk .tc-sec-h { margin-bottom: -10px; }
.tc-desk .tc-requests { gap: 10px; }

/* the form: one card, its facts one panel */
.tc-desk .tc-book { margin: 0; padding: 12px; gap: 10px; border: 1px solid var(--line);
  border-radius: var(--r-l); background: var(--panel-2); }
/* THE THREE TABS, LIST LEFT, CARD RIGHT (14 Nov, his layout B). */
.tc-desk .tc-facts { margin: 0; font-size: 12px; line-height: 1.5; color: var(--dim); }
.tc-desk .tc-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tc-desk .tc-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--dim);
  font: inherit; font-size: 13px; cursor: pointer; }
.tc-desk .tc-tab.is-on { color: var(--ink); border-color: var(--teal); background: var(--panel); }
.tc-desk .tc-tab-n { min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--line);
  color: var(--ink); font-size: 12px; text-align: center; }
.tc-desk .tc-tab-n.is-loud { background: var(--red-solid); color: #fff; }
.tc-desk .tc-new { margin-left: auto; }
.tc-desk .tc-split { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(0, 3fr); gap: 14px;
  align-items: start; min-width: 0; }
@container (max-width: 520px) { .tc-desk .tc-split { grid-template-columns: minmax(0, 1fr); } }
.tc-desk .tc-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-desk .tc-li { padding: 8px 10px; border-radius: var(--r); border: 1px solid transparent; cursor: pointer;
  min-width: 0; }
.tc-desk .tc-li:hover { background: var(--panel-hover); }
.tc-desk .tc-li.is-on { background: var(--panel); border-color: var(--teal); }
.tc-desk .tc-li:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.tc-desk .tc-li-1 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.tc-desk .tc-li-name { flex: 0 0 auto; max-width: 45%; font-weight: 600; color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tc-desk .tc-li-what { flex: 1 1 auto; min-width: 0; color: var(--dim); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-size: 12px; }
.tc-desk .tc-li-age { margin-left: auto; color: var(--dim); white-space: nowrap; font-size: 12px; }
.tc-desk .tc-li-2 { margin-left: 16px; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.tc-desk .tc-li-said { font-size: 12px; color: var(--dim); padding: 4px 10px; }
.tc-desk .tc-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.tc-desk .tc-dot-red { background: var(--red); }
.tc-desk .tc-dot-amber { background: var(--amber); }
.tc-desk .tc-dot-green { background: var(--teal); }
.tc-desk .tc-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tc-desk .tc-pane .tc-card[hidden], .tc-desk .tc-book[hidden] { display: none; }
.tc-desk .tc-picked { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 4px 4px 12px;
  border: 1px solid var(--teal); border-radius: var(--r); background: var(--selected-bg);
  color: var(--ink); font-size: 13px; line-height: 1.4; }
.tc-desk .tc-picked[hidden] { display: none; }
.tc-desk .tc-picked-t { flex: 1 1 auto; min-width: 0; }
.tc-desk .tc-picked .tc-unpick { flex: 0 0 auto; min-width: 40px; min-height: 40px; padding: 0;
  border-color: transparent; background: transparent; color: var(--dim); font-size: 14px; }
.tc-desk .tc-picked .tc-unpick:hover { background: var(--panel-hover); color: var(--ink); }

/* the fields */
.tc-desk .fd-pa-field, .tc-desk .tc-seg { display: flex; flex-direction: column; gap: 6px; min-width: 0;
  font-size: 12px; color: var(--label); }
.tc-desk .fd-pa-field-l { font-size: 12px; font-weight: 600; color: var(--label); }
.tc-desk .tc-seg { margin: 0; padding: 0; border: 0; }
.tc-desk .tc-seg > legend { padding: 0; margin: 0 0 6px; }
.tc-desk :is(input[type="text"], input[type="date"], input[type="time"], select, textarea) {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 9px 12px;
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel);
}
.tc-desk :is(input, select, textarea):focus-visible {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent);
}
.tc-desk .tc-patient { font-family: var(--mono); letter-spacing: .03em; }
.tc-desk :is(input[type="date"], input[type="time"])::-webkit-calendar-picker-indicator { cursor: pointer; }
.tc-desk .tc-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 12px; }
@container (min-width: 320px) {
  .tc-desk .tc-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* length and visit: a row of buttons over real radio inputs */
/* A grid, not a wrapping row: the buttons stay one width, and a row that
   does not fit breaks into whole columns -- a flex wrap stretched the last
   one alone across the panel. auto-fit lets two choices share the row. */
.tc-desk .tc-seg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; }
.tc-desk .tc-seg-o { position: relative; display: flex; min-width: 0; }
.tc-desk .tc-seg-r { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tc-desk .tc-seg-t { flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 8px 6px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel); color: var(--ink-2); font-size: 14px; line-height: 1.2; text-align: center;
  white-space: nowrap; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.tc-desk .tc-seg-o:hover .tc-seg-t { background: var(--panel-hover); }
.tc-desk .tc-seg-r:checked + .tc-seg-t { border-color: var(--teal); background: var(--selected-bg);
  color: var(--teal); font-weight: 650; box-shadow: inset 0 0 0 1px var(--teal); }
.tc-desk .tc-seg-r:focus-visible + .tc-seg-t { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tc-desk .tc-seg-t { transition: none; } }

/* the one filled button */
.tc-desk .tc-book .tc-book-go { width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--teal); border-radius: var(--r); background: var(--teal); color: var(--accent-ink);
  font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.tc-desk .tc-book .tc-book-go:hover:not(:disabled) { background: var(--teal-2); border-color: var(--teal-2); }
.tc-desk .tc-book .tc-book-go:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* the door's answer, as a callout */
.tc-desk .ask-line { margin-top: 0; font-size: 13px; line-height: 1.5; }
.tc-desk .ask-line:empty { display: none; }
.tc-desk .ask-line.is-no { padding: 10px 12px; border-radius: var(--r); border-left: 3px solid var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--panel)); color: var(--red-ink); }
.tc-desk .ask-line.is-ok { padding: 10px 12px; border-radius: var(--r); border-left: 3px solid var(--teal);
  background: var(--selected-bg); color: var(--ink); }
.tc-desk .ask-line.is-ask { padding: 12px; border-radius: var(--r); color: var(--ink); }
.tc-desk .ask-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* The read-back's own ✅ (Hold it, Schedule it, Cancel it) is the press that
   writes, so it is the filled one beside asktwice's quiet Cancel. */
.tc-desk .ask-acts .btn:not(.btn-quiet) { border-color: var(--teal); background: var(--teal);
  color: var(--accent-ink); font-weight: 650; }

/* the requests and the held and booked list: cards */
.tc-desk .fd-pa-list { gap: 10px; }
.tc-desk .fd-pa-row { padding: 14px; border-color: var(--line); border-radius: var(--r-l); background: var(--panel); }
.tc-desk .fd-pa-row .fd-pa-head { gap: 2px 10px; font-size: 12px; }
.tc-desk .fd-pa-row .fd-pa-type { font-size: 14px; font-weight: 650; }
.tc-desk .fd-pa-row .fd-pa-who { margin-top: 4px; font-size: 13px; font-weight: 500; }
.tc-desk .fd-pa-row .fd-pa-appt { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.tc-desk .fd-pa-note { margin-top: 8px; padding: 6px 10px; border-left: 3px solid var(--line);
  border-radius: 0 var(--r) var(--r) 0; background: var(--panel-2); color: var(--ink-2); font-size: 13px; }
.tc-desk .fd-pa-acts { gap: 8px; margin-top: 12px; }
.tc-desk :is(.fd-pa-acts, .tc-request, .tc-joinbox, .ask-acts) .btn {
  min-height: 40px; padding: 8px 14px; border-radius: var(--r); font-size: 13px; }
.tc-desk .fd-pa-empty { padding: 20px 14px; border: 1px dashed var(--line); border-radius: var(--r-l);
  text-align: center; font-size: 13px; color: var(--dim); }
.tc-desk .tc-joinbox { display: flex; gap: 8px; margin-top: 10px; }
.tc-desk .tc-joinbox .tc-joinurl { flex: 1 1 auto; font-family: var(--mono); font-size: 13px; background: var(--panel-2); }
.tc-desk .tc-joinbox .tc-copy { flex: 0 0 auto; }

/* THE FOLDER PICKER (5 November 2026: "the folder name input should be
   intuitive as the patient is already in clinic"). The patients in the
   clinic as round buttons above the field -- a tag (In the chair, In clinic),
   the name where known, the folder number -- the chosen one marked; under
   the field, the folders matching what is typed, as a list. */
.tc-desk .tc-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-desk .tc-folder { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tc-desk .tc-pick[hidden], .tc-desk .tc-hits[hidden] { display: none; }
.tc-desk .tc-pick-b { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; min-height: 40px;
  padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
  color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.tc-desk .tc-pick-b:hover { background: var(--panel-hover); }
.tc-desk .tc-pick-b[aria-pressed="true"] { border-color: var(--teal); background: var(--selected-bg);
  box-shadow: inset 0 0 0 1px var(--teal); }
.tc-desk .tc-pick-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); }
.tc-desk .tc-pick-who { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-desk .tc-pick-key { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.tc-desk .tc-pick-who.tc-pick-key { color: var(--ink); }
.tc-desk .tc-hits { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); overflow: hidden; }
.tc-desk .tc-hit { display: flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0;
  border-top: 1px solid var(--line-soft); background: transparent; color: var(--ink); font-size: 13px;
  text-align: left; cursor: pointer; }
.tc-desk .tc-hit:first-child { border-top: 0; }
.tc-desk .tc-hit:hover { background: var(--panel-hover); }
.tc-desk :is(.tc-pick-b, .tc-hit):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* DOCAPP'S 📹 PAGE BOOKS TOO (5 November): the desk's tab, folded under one
   summary below the doctor's own list. */
.tc-doc-desk { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.tc-doc-desk-s { min-height: var(--tap); padding: 12px 14px; color: var(--ink); font-size: 14px; font-weight: 650;
  cursor: pointer; }
.tc-doc-desk-s:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.tc-doc-desk[open] > .tc-doc-desk-s { border-bottom: 1px solid var(--line-soft); }
.tc-doc-desk-b { padding: 14px; }
/* ==== tc_desk END — the front desk's Teleconsult tab ==== */

/* ==== fd_appcoverage BEGIN — insurance from the patient app (Wave 3, PA-003a) ==== */
/* ── fd_appcoverage.css — insurance from the patient app, on the front desk's
   Patient app tab (Wave 3 of DrLauApptment's SYNTHETIC_MERGE_PLAN, PA-003a) ──
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is the integrator's;
   this block is folded into it under its own marker, beside fd_appdesk's,
   never appended after the last chat marker (LE-48: a marker-to-EOF slice
   swallows whatever follows it). Every class is new under `fd-cov-` --
   measured unused in app/app.css, app/*.ts and reference/fragments/ before it
   was chosen (`fd-pc-` was the first choice and is fdproc.ts's procedure
   coordination: found by grepping the .ts files too, not only the
   stylesheet). Every colour is a token app/app.css's :root already defines;
   the read-back line is asktwice's own `.ask-line`, and the buttons are
   `.btn .btn-small`, so nothing here restyles another screen's class. */
.fd-cov { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--hush); }
.fd-cov-h { font-size: 12px; font-weight: 600; color: var(--label); }
.fd-cov-empty, .fd-cov-foot { font-size: 12px; color: var(--dim); line-height: 1.45; }
.fd-cov-said { font-size: 12px; color: var(--teal); }
.fd-cov-list { display: flex; flex-direction: column; gap: 6px; }
.fd-cov-row { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); }
.fd-cov-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 12px; }
.fd-cov-kind { color: var(--ink); font-weight: 600; }
.fd-cov-insurer { color: var(--dim); }
.fd-cov-who { font-size: 12px; color: var(--ink); margin-top: 2px; }
.fd-cov-when { color: var(--dimmer); }
.fd-cov-line { font-size: 12px; color: var(--dim); margin-top: 2px; }
.fd-cov-rider { font-size: 12px; color: var(--amber-ink); margin-top: 2px; }
.fd-cov-note { font-size: 12px; color: var(--dim); margin-top: 2px; line-height: 1.45; }
.fd-cov-acts, .fd-cov-form-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fd-cov-form { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hush); display: flex;
  flex-direction: column; gap: 4px; }
.fd-cov-field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--dim); }
/* ==== fd_appcoverage END — insurance from the patient app (Wave 3, PA-003a) ==== */

/* ==== papaindiary BEGIN — the pain diary panels (PA-016, Wave 2) ==== */
/* app/papaindiary.ts: a linked patient's diary report, and who asked to be
   contacted. NO px FONT SIZE is set here, so the generated desktop type scale
   needs no regeneration; every colour is a token, so both themes hold. The
   `pdy-` prefix was free when this was written (grep app.css first). */
/* 🩺 The blood pressure panel (pabp.ts): what the patient SENT this visit,
   then what was shared at check-in; an occasion one entry, its readings
   indented beneath it. The `pbp-` prefix was free (grep app.css first). */
.pbp, .pbp-shared, .pbp-sent, .pbp-send { display: flex; flex-direction: column; gap: 6px; }
.pbp-sent, .pbp-shared { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.pbp-head { font-weight: 600; }
.pbp-label, .pbp-detail, .pbp-plan, .pbp-off, .pbp-occ-words, .pbp-more { color: var(--dim); line-height: 1.45; }
.pbp-send-when { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.pbp-rows, .pbp-members { display: flex; flex-direction: column; gap: 2px; }
.pbp-row, .pbp-sent-row, .pbp-member, .pbp-occ-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.pbp-occ { display: block; border-left: 2px solid var(--teal); padding: 4px 0 4px 10px; }
.pbp-when { font-family: var(--mono); font-size: 12px; color: var(--dim); min-width: 22ch; }
.pbp-bp { font-weight: 600; }
.pbp-avg { color: var(--teal); }
.pbp-member { padding-left: 14px; }
.pbp-member .pbp-bp { font-weight: 400; }
.pbp-withdrawn .pbp-bp { text-decoration: line-through; color: var(--dim); }
/* 📏 the desk panel's height & weight tile sits beside its sections */
.dfc-panel > .pam-seat { padding: 0 20px 24px; }
.pam-seat:empty { display: none; }
.pdy { display: flex; flex-direction: column; gap: 8px; }
.pdy-head { font-weight: 600; }
.pdy-body { display: flex; flex-direction: column; gap: 6px; }
.pdy-off, .pdy-foot, .pdy-label, .pdy-range, .pdy-note { color: var(--dim); line-height: 1.45; }
.pdy-asked { color: var(--amber); }
.pdy-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pdy-chip { font: inherit; padding: 4px 10px; min-height: 44px; border-radius: var(--r);
  border: 1px solid var(--line-soft); background: var(--panel); color: inherit; }
.pdy-chip[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
.pdy-days, .pdy-list { display: flex; flex-direction: column; gap: 4px; }
.pdy-lines { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 2px solid var(--line-soft);
  padding-left: 8px; }
.pdy-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); }
.pdy-folder { align-self: flex-start; min-height: 44px; }
/* ==== papaindiary END ==== */

/* ==== fb_spine BEGIN — the top bar (LE-49 Parcel B) ==== */

/* ── the doctor is a button ─────────────────────────────────────────────
   It was a label. Same block, same three lines, now with the affordance a
   control owes: a ring, a hover, and a focus outline a keyboard can see. */
.who.is-btn {
  padding: 3px 10px 3px 3px; border-radius: 999px;
  border: 1px solid var(--line); background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.who.is-btn:hover { border-color: var(--teal-2); }
.who.is-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.who-lines { display: flex; flex-direction: column; gap: 1px; }
/* where the block goes, said on the block */
.who-sub .go { color: var(--teal); }

/* ── the place, as the check-in door answers it ─────────────────────────
   Two states, and the second is not a failure: amber says the clinic has
   not been told yet, which is a thing to finish. Red would say something
   is wrong, and nothing is. */
.pill-place {
  background: rgba(79,214,200,0.10); border-color: rgba(79,214,200,0.3);
  color: var(--teal);
}
.pill-place .dot { box-shadow: 0 0 6px rgba(79,214,200,0.55); }
/* the KIND, quieter than the name it qualifies */
.pill-place .pk, .pill-nowhere .pk { color: var(--dim); }
.pill-nowhere {
  background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.45);
  color: var(--amber-ink);
}

/* ── one recording control, three faces ─────────────────────────────────
   Ready, recording, and off-with-its-reason sit in the same place, so the
   eye finds one spot whatever the state. The status line beneath carries
   what is happening, which is why the button itself can say one word. */
.recwrap {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 2px; flex: 0 0 auto;
}
.recbtn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 28px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid rgba(224,90,74,0.5); background: none;
  color: var(--red-ink); font: inherit; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.recbtn:hover { border-color: var(--red); }
.recbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* NEVER COLOUR ALONE: the face is a shape as well as a hue — a filled
   circle to start, a square to stop — so the control reads for a colour
   blind clinician and in a photocopy of a screenshot. */
.recbtn .rdot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  background: var(--red); box-shadow: 0 0 6px rgba(224,90,74,0.5);
}
.recbtn.is-on {
  background: rgba(224,90,74,0.18); border-color: var(--red); color: #fff;
  box-shadow: 0 0 0 3px rgba(224,90,74,0.16), 0 0 16px rgba(224,90,74,0.5);
}
.recbtn.is-on .rsq {
  width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; background: #fff;
}
/* DIMMED WITH ITS REASON, not hidden — his ruling, 10 September. A control
   that vanishes teaches him to hunt for it; one that stays and says why is
   an answer. */
.recbtn.dis {
  opacity: .55; border-color: var(--line); color: var(--dim);
  box-shadow: none; cursor: default;
}
.recbtn.dis .rdot { background: var(--dim); box-shadow: none; }

.rec-status {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em;
  color: var(--dimmer); white-space: nowrap;
}
.rec-status.on { color: var(--red-ink); }
/* THE ONE LIVING THING ON THE BAR. Everything else that moves on this app
   is a person's finger — the same reason the old REC orb breathed. */
.rec-status .glow {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 8px rgba(224,90,74,.9);
  margin-right: 4px; vertical-align: middle;
  animation: rec-breathe 2.8s ease-in-out infinite;
}
@keyframes rec-breathe { 50% { box-shadow: 0 0 14px rgba(224,90,74,1); } }
@media (prefers-reduced-motion: reduce) { .rec-status .glow { animation: none; } }

/* ── the appointment line folds to its count with a patient on the bar ──
   Measured, not guessed: 1440px holds the patient or the sentence, not
   both. spine.js sets `has-patient`; desktop.js sets `data-count` to how
   many wait and leaves the whole sentence in the button's own title, so
   nothing is lost — it is a hover away and on the front desk. With no
   `data-count` set the line still reads whole, which is the safe direction
   to be un-wired in. */
.spine.has-patient .apptbar[data-count] { max-width: none; }
.spine.has-patient .apptbar[data-count] .apptbar-t { display: none; }
.spine.has-patient .apptbar[data-count]::after { content: "\1F4E8  " attr(data-count); }
/* AND THE HOME PAGE FOLDS THE SAME WAY BELOW THE WIDTH IT NEEDS. With the
   mail pill added the bar wanted ~1504px on home, so at 1440 the theme toggle
   wrapped onto a second row and the bar grew from 64px to 96px, taking 32px
   off every corner; at 1280 the clock went too. Measured in Chromium, 23
   September. Below 1536px the mail pill and the theme toggle fold as they do
   beside a patient; below 1440px the appointment line folds to its count as
   well. Every word is still in the controls' own titles. */
@media (min-width: 1100px) and (max-width: 1535px) {
  .spine .pill-mail .mw { display: none; }
  .spine .tb-w { display: none; }
}
@media (min-width: 1100px) and (max-width: 1439px) {
  .spine .apptbar[data-count] { max-width: none; }
  .spine .apptbar[data-count] .apptbar-t { display: none; }
  .spine .apptbar[data-count]::after { content: "\1F4E8  " attr(data-count); }
  /* and the who-line folds as it does beside a patient: "DOCTOR ▸". At
     1100 and 1280 the clock and the theme toggle otherwise wrapped to a
     second row (bar 96px, not 65px); the time he signed in is in the
     Doctor card the block opens. */
  .spine .who-sub .wl-in { display: none; }
}
/* THE APPOINTMENT LINE NEVER MOVES ITS NEIGHBOURS (13 October). It is painted
   empty and filled when /api/requests answers; sized by its CONTENT, the
   sentence grew it to 380px a moment after the bar was drawn, so at 1440 and
   1536 the theme toggle wrapped (bar 65 -> 96px, the whole home pushed down:
   CLS 0.94-1.07) and the record button jumped 312px left. Sized by the FREE
   SPACE instead -- basis 0, grow, capped at 380px -- its width is the same
   empty or full, it ellipsises rather than wraps anything, and the whole
   sentence stays in its title. Folded to its count it keeps a reserved
   width for the same reason. */
@media (min-width: 1440px) {
  .spine:not(.has-patient) .apptbar { flex: 100 1 0; min-width: 120px; }
}
@media (min-width: 1100px) {
  .spine.has-patient .apptbar { flex: 0 0 auto; min-width: 4.5em; justify-content: center; }
}
@media (min-width: 1100px) and (max-width: 1439px) {
  .spine .apptbar { flex: 0 0 auto; min-width: 4.5em; justify-content: center; }
}
/* AND A QUEUE THAT COULD NOT BE READ IS NOT A QUEUE OF NONE. Folded, the
   unreadable case rendered "📨 0" -- identical to "nobody waiting", which is
   the one reading a doctor would act on. It says "?" now, and the whole
   sentence is in the title where this comment always claimed it was. */

/* ── the narrow bar ─────────────────────────────────────────────────────
   The clock, the appointment line and the theme toggle already leave below
   1100px. The record control STAYS — it presses the same one recorder, and
   the phone is the device most likely to be in a hand during a case — but
   its caption goes, because eight-point mono under a button is what makes
   a 390px bar wrap. */
@media (max-width: 1099px) {
  .spine .rec-status { display: none; }
}

/* ── day view ───────────────────────────────────────────────────────────
   Dark is unchanged: every rule here bites only when the toggle sets
   data-theme="day" on <html>. The accents keep their MEANING and are
   darkened until they are legible on a light ground — day --red is
   #c0342a (~4.8:1) and --red-ink #a62a1e (~6.4:1), both already measured by
   verify_theme_contrast; what needs repainting is the three GLOW literals,
   which are a dark-ground effect, and the white square, which disappears on
   a pale button. */
[data-theme="day"] .recbtn { background: rgba(255,255,255,0.7); }
[data-theme="day"] .recbtn .rdot { box-shadow: none; }
[data-theme="day"] .recbtn.is-on {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 0 0 3px rgba(192,52,42,0.18);
}
[data-theme="day"] .recbtn.is-on .rsq { background: #fff; }
[data-theme="day"] .rec-status .glow { box-shadow: none; }
/* 0.10 put the place name at 4.49:1 and the mail count at 4.43:1 in day
   view, measured in Chromium on 23 September: a hair under AA both. A
   lighter tint, and the count in the day palette's amber INK. */
[data-theme="day"] .pill-place { background: rgba(11,114,102,0.07); }
[data-theme="day"] .pill-mail.has .mn { color: var(--amber-ink); }
[data-theme="day"] .pill-place .dot { box-shadow: none; }
[data-theme="day"] .pill-nowhere { background: rgba(138,94,12,0.10); }
[data-theme="day"] .who.is-btn { background: rgba(255,255,255,0.55); }

/* ==== fb_spine END — the top bar (LE-49 Parcel B) ==== */

/* ==== apk_frame BEGIN — the phone's frame and its class vocabulary (LE-57, Parcel A) ==== */
/* THE ANDROID FRAME. Dr Lau, 10 September, accepting the 23-board mock-up:
   one top bar, one capture bar, one six-seat footer on every page, and no
   page that scrolls at 412x867.

   WHERE THESE RULES BITE, AND NOWHERE ELSE. Every selector below begins
   `body.is-phone` — the class the router sets from isDesktop() (desktop.js,
   DESK_MIN = 1100px). Width is decided ONCE, in JavaScript, so there is no
   @media rule here re-deciding it: two width tests that can disagree is how
   a bar ends up half laid out. Take the class away and the desktop is
   pixel-identical to what it was before this block existed.

   The one exception is the token block that opens the file. A custom
   property paints nothing on its own; it is defined at :root because the
   phone's lamps are the same green wherever they are drawn.

   THE VOCABULARY IS THE MOCK-UP'S, PREFIXED. design/tools/apk-boards.mjs
   lines 98-366 are the classes all 23 boards share; each becomes `.ph-<x>`
   here, once, and no other parcel redefines one. That is the whole reason
   page 23's row cannot drift from page 1's.

   AND THE COLOURS ARE app.css's OWN. Every value below is a token or one of
   the palette's own colours at another alpha — the house convention (see
   .btn-primary). The single new colour is the lamp, declared and named. */

:root {
  /* THE TRAFFIC LIGHT'S GREEN, and deliberately NOT the brand teal: a lamp
     that is the same colour as every heading and every chip reads as
     decoration, and this one is a clinical fact about where a patient is.
     No day-theme value: the toggle is desktop-only and the phone is always
     dark, so this token never renders on a light ground. */
  --lamp: #43d17a;
}

/* ── 1 · the page is a column ────────────────────────────────────────────
   <body> is already a flex column at full height. On the phone it holds,
   in order: the spine, the ONE region the router is showing, the capture
   bar where a page has one, the footrule where a page has one, and the six
   seats. The region takes what is left and CLIPS — a page that scrolls as
   a whole is the one thing his first principle rules out. What may scroll
   is one region inside it, and that region says so with data-scroll. */
body.is-phone { overflow: hidden; }
body.is-phone > section:not([hidden]),
body.is-phone > main:not([hidden]) {
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
/* The view chrome belongs to the desktop; on the phone the Now seat is the
   way home and the router's back button the way back, and two of them is
   two answers. */
body.is-phone #viewchrome { display: none; }

/* THE CHECK-IN PICKER'S CLOSE CONTROL MEETS THE TAP FLOOR ON A PHONE.
   `.ci-close` is 32x32 -- fine under a mouse, and 12px under `--tap`, whose
   own comment three thousand lines above reads "nothing tappable is
   smaller". Found by _phone_measure.mjs on the merged tree, not by a sweep:
   no harness measures a rendered box. Scoped to the phone because that is
   where the floor is a finger rather than a pointer, so the desktop header
   this control was drawn for is left exactly as it is. The circle stays
   32px; what grows is the box around it. */
body.is-phone .ci-close {
  position: relative; width: var(--tap); height: var(--tap); border: 0;
}
body.is-phone .ci-close::before {
  content: ""; position: absolute; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%;
}

/* ── 2 · the top bar: two rows, and a third only with a patient ──────────
   Built from the spine's own elements by CSS alone (app/index.html lines
   78-157) — no second bar, no second painter. A grid rather than wrapping
   flex, because a bar that wraps by accident is not a design (LE-48). */
body.is-phone .spine {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand who   clock"
    "place place rec"
    "said  said  said";
  align-items: center;
  gap: 2px 8px;
  padding: calc(2px + env(safe-area-inset-top, 0px)) 12px 4px;
  min-height: 0;
}
body.is-phone .spine.has-patient {
  grid-template-areas:
    "brand who   clock"
    "place place rec"
    "pkey  pline allergy"
    "said  said  said";
}
/* WHAT A CLOSE STILL OWES takes a row of its own, and only while anything
   is owed (5 Oct): the whole width, so the word is never folded here. */
body.is-phone .spine.has-owed {
  grid-template-areas:
    "brand who   clock"
    "place place rec"
    "owed  owed  owed"
    "said  said  said";
}
body.is-phone .spine.has-owed.has-patient {
  grid-template-areas:
    "brand who   clock"
    "place place rec"
    "pkey  pline allergy"
    "owed  owed  owed"
    "said  said  said";
}
body.is-phone .spine #owedbtn { grid-area: owed; justify-self: stretch; justify-content: center;
                                  min-height: var(--tap); }

body.is-phone .spine > .wordmark  { grid-area: brand; align-self: center; }
body.is-phone .spine > #who       { grid-area: who; justify-self: start; min-width: 0; max-width: 100%;
                                    padding: 1px 8px 1px 2px; }
body.is-phone #who .avatar        { width: 20px; height: 20px; font-size: 9px; }
body.is-phone #who .who-name      { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ONE LINE, NOT TWO. The board's first row is the name and nothing else;
   "SIGNED IN 07:52 · DOCTOR" is on the Doctor card this block opens, one
   tap away, which is where the board puts it. */
body.is-phone #who .who-sub       { display: none; }
body.is-phone #who .who-lines     { min-width: 0; }

body.is-phone .spine #clock     { grid-area: clock; justify-self: end; display: inline-block;
                                    font-size: 10px; letter-spacing: 0.06em; color: var(--dim); white-space: nowrap; }

body.is-phone .spine > #checkin   { grid-area: place; justify-self: stretch; min-width: 0; max-width: 100%;
                                    min-height: var(--tap); padding: 4px 12px; }
body.is-phone #checkin > span     { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.is-phone #checkin .dot      { flex: 0 0 auto; }
/* the qualifier gives way four times faster than the label, so NOT CHECKED IN
   reads whole before PICK WHERE YOU ARE does (the render at 360 read NO...) */
body.is-phone #checkin .pk       { flex: 0 4 auto; }

body.is-phone .spine > #rec       { grid-area: rec; justify-self: end; max-width: 46%; }
/* THE CAPTION COMES BACK ON THE PHONE. app.css hides it below 1100px
   because eight-point mono under a button is what made a 390px bar wrap —
   but that was a bar laid out in one flex row. In this grid the control has
   a column of its own, the caption sits under the button inside it, and the
   board's own top-right state (WAIT / LIVE 00:42) is what a clinician mid-
   case is actually looking for. It ellipsises rather than pushing. */
body.is-phone .spine .rec-status  { display: block; max-width: 100%; overflow: hidden;
                                    text-overflow: ellipsis; white-space: nowrap; }

/* THE BEE is the desktop bar's (11 Nov); the phone's three-row bar has no
   cell for it, so the element is hidden there and the number pill carries
   the same bee shape, in the same colours, after the number. */
body.is-phone .spine #beestatus { display: none; }
/* The phone's folder is its own nine tiles; the plus on the number is the desktop's (17 Nov). */
body.is-phone .spine #patient-plus { display: none; }
body.is-phone .spine #patient-mrn[data-bee]::after { content: ''; display: inline-block; width: 1.1em; height: 1.1em;
  margin-left: 5px; vertical-align: -0.2em; background-color: var(--bee-connected);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='7.6' cy='7.4' rx='2.6' ry='4.4' transform='rotate(-38 7.6 7.4)' opacity='.62'/%3E%3Cellipse cx='16.4' cy='7.4' rx='2.6' ry='4.4' transform='rotate(38 16.4 7.4)' opacity='.62'/%3E%3Cellipse cx='12' cy='15.4' rx='5.6' ry='6.6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='7.6' cy='7.4' rx='2.6' ry='4.4' transform='rotate(-38 7.6 7.4)' opacity='.62'/%3E%3Cellipse cx='16.4' cy='7.4' rx='2.6' ry='4.4' transform='rotate(38 16.4 7.4)' opacity='.62'/%3E%3Cellipse cx='12' cy='15.4' rx='5.6' ry='6.6'/%3E%3C/svg%3E") center / contain no-repeat; }
body.is-phone .spine #patient-mrn[data-bee="not"]::after { background-color: var(--bee-not); }
body.is-phone .spine #patient-mrn[data-bee="off"]::after { background-color: var(--dimmer); opacity: .55; }
body.is-phone .spine #patient-mrn { grid-area: pkey; justify-self: start; font-size: 11px;
                                      letter-spacing: 0.04em; color: var(--teal); white-space: nowrap; }
body.is-phone .spine #patient-sub { grid-area: pline; justify-self: start; display: block; min-width: 0;
                                      max-width: 100%; font-size: 11px; color: var(--ink-2);
                                      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The MRI alert (30 Oct): no room on the phone's bar -- the card the
   allergy opens lists every implant and its MRI statement. */
body.is-phone .spine #mrialert { display: none !important; }
body.is-phone .spine #allergy     { grid-area: allergy; justify-self: end; min-width: 0; max-width: 52%;
                                      font-size: 9px; padding: 3px 8px; }
body.is-phone #allergy > span       { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.is-phone .spine > #spine-said  { grid-area: said; justify-self: start; min-width: 0; max-width: 100%; }

/* WHAT THE PHONE BAR HAS NO ROOM FOR. Not "less important" — reached
   somewhere else: the appointment line is the Tasks seat's Requests screen,
   the theme toggle is desktop-only by his ruling, the clinic's mailbox is
   mounted on the desktop alone (app.js), the films are the
   folder's Imaging tile, and the patient's NAME is on the page under the
   bar rather than twice. The number stays, because it is the thing a
   clinician checks a document against. */
body.is-phone .spine > .spacer,
body.is-phone .spine #apptbar,
body.is-phone .spine #mailbtn,
body.is-phone .spine #themebtn,
body.is-phone .spine > #studies,
body.is-phone .spine > #meter,
body.is-phone .spine #patient-rule,
body.is-phone .spine #patient-name { display: none; }

/* ── 3 · the capture bar sits ABOVE the foot ─────────────────────────────
   On the desktop it rules off the top of the note; on the phone it is the
   composer, so the rule moves to its top edge. capture.js is untouched. */
body.is-phone #capture { flex: 0 0 auto; }
body.is-phone .cap-bar { border-bottom: 0; border-top: 1px solid var(--line); padding: 6px 12px; }
/* the footrule is inside the encounter page here, and the foot below it
   already carries the gesture-bar inset — counting it twice leaves a band
   of nothing above the seats */
body.is-phone .footrule { padding: 8px 12px; }

/* ── 4 · the six seats ───────────────────────────────────────────────────
   The 24px band Android paints its gesture bar in is NOT drawn: the page is
   given viewport-fit=cover by index.html, so the inset is added as padding
   and the seats sit above whatever the phone puts there. */
body.is-phone .ph-foot {
  flex: 0 0 auto; display: flex;
  height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line); background: rgba(4,9,10,0.88);
}
/* THE ONE RULE THAT IS NOT UNDER body.is-phone, and it takes nothing away
   from the desktop: <nav> defaults to display:block, so a foot left over
   from a phone-width session would paint as six stacked buttons the moment
   the window crossed 1100px. The element is this parcel's own and did not
   exist before, so hiding it where it does not belong is the guarantee
   that the desktop is unchanged, not an exception to it. */
body:not(.is-phone) #phonefoot { display: none; }
body.is-phone .ph-seat {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tap);
  background: none; border: 0; color: var(--dimmer);
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
body.is-phone .ph-seat .l {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
body.is-phone .ph-seat.on { color: var(--teal); }
/* the lit seat carries a bar as well as a colour, so it reads for a colour
   blind clinician — the record button's rule, one row down */
body.is-phone .ph-seat.on::before {
  content: ""; position: absolute; top: -1px; left: 22%; right: 22%;
  height: 2px; background: var(--teal); border-radius: 0 0 2px 2px;
}
body.is-phone .ph-seat .bdg {
  position: absolute; top: 6px; left: 50%; margin-left: 6px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--red-solid); color: #ffffff;
  font-family: var(--mono); font-size: 9px;
  display: flex; align-items: center; justify-content: center;
}
body.is-phone .ph-seat:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
body.is-phone .ph-seat:active { transform: translateY(1px); }

/* ── 5 · the class vocabulary every page shares ──────────────────────────
   apk-boards.mjs lines 98-366, prefixed. Nobody redefines one of these. */

body.is-phone .ph-ic { display: block; flex: 0 0 auto; }
/* an icon name this set does not hold draws an empty box rather than
   nothing at all — a blank is indistinguishable from a layout fault */
body.is-phone .ph-ic-missing { outline: 1px dashed var(--rule); }

/* the page's own column, inside the region */
body.is-phone .ph-content {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; padding: 8px 12px;
}
body.is-phone .ph-work {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 0;
}
/* THE ONE REGION THAT MAY SCROLL, and it says which it is. The attribute
   is what the integrator's headless measurement reads, so carrying it is
   also what gives the region its behaviour — one act, not two. */
body.is-phone .ph-scroll,
body.is-phone [data-scroll] { overflow-y: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
body.is-phone .ph-scroll::-webkit-scrollbar,
body.is-phone [data-scroll]::-webkit-scrollbar { display: none; }
body.is-phone [data-hscroll] { overflow-x: auto; scrollbar-width: none; }
body.is-phone [data-hscroll]::-webkit-scrollbar { display: none; }

/* a page title, with the close his brief puts top right */
body.is-phone .ph-ttl { display: flex; align-items: center; gap: 10px; height: var(--tap); flex: 0 0 auto; }
body.is-phone .ph-ttl .h1 { font-size: 18px; font-weight: 600; color: #ffffff; letter-spacing: -0.01em; white-space: nowrap; }
body.is-phone .ph-ttl .sub { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone .ph-ttl .x {
  margin-left: auto; flex: 0 0 var(--tap); width: var(--tap); height: var(--tap);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--dim); border: 1px solid var(--line); background: var(--sunk); cursor: pointer;
}

/* a section head */
body.is-phone .ph-sh { display: flex; align-items: baseline; gap: 8px; min-height: 18px; flex: 0 0 auto; }
body.is-phone .ph-sh .kicker { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--teal); white-space: nowrap; }
body.is-phone .ph-sh .kicker.amber { color: var(--amber); }
body.is-phone .ph-sh .kicker.red { color: var(--red-ink); }
body.is-phone .ph-sh .n { font-size: 10.5px; color: var(--dimmer); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone .ph-sh .r { margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }

/* the two grids the tiles sit in */
body.is-phone .ph-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.is-phone .ph-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* a tile */
body.is-phone .ph-tile {
  height: 62px; display: flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 6px 10px; border-radius: var(--r); background: var(--panel);
  border: 1px solid var(--line); color: var(--teal); min-width: 0;
  font: inherit; text-align: left; cursor: pointer;
}
body.is-phone .ph-tile .tr { display: flex; align-items: center; gap: 6px; }
body.is-phone .ph-tile .b { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--teal); max-width: calc(100% - 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* the place is never shortened in JS -- now.js -- so it is ellipsised here, never wrapped */
body.is-phone .ph-tile .b.red { color: var(--red-ink); }
body.is-phone .ph-tile .t { font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-tile .s { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-tile.tall { height: 66px; }
body.is-phone .ph-tile.f { height: 72px; }
body.is-phone .ph-tile.wide { grid-column: span 2; }
/* DIMMED IS 0.8 ON THE PHONE, NOT 0.5 (24 Sept): a dimmed tile still
   carries words -- NOT BUILT, IN TELEGRAM -- and half opacity put them
   under 3:1. The dashed edge says "not live"; the fade only has to hint. */
body.is-phone .ph-tile.dimmed { opacity: 0.8; border-style: dashed; }

/* a band of rows */
body.is-phone .ph-band { display: flex; flex-direction: column; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); overflow: hidden; flex: 0 0 auto; min-height: 0; }
body.is-phone .ph-band-h { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; background: var(--panel-2); font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dim); white-space: nowrap; flex: 0 0 auto; }
body.is-phone .ph-band-h .r { margin-left: auto; color: var(--dimmer); display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0.08em; }
body.is-phone .ph-band-h .r.go { color: var(--teal); }
body.is-phone .ph-band-h .r.red { color: var(--red-ink); }
body.is-phone .ph-band-h .pg { display: inline-flex; gap: 4px; align-items: center; }
body.is-phone .ph-band-h .pg i { width: 5px; height: 5px; border-radius: 50%; background: rgba(79,214,200,0.25); display: block; }
body.is-phone .ph-band-h .pg i.on { background: var(--teal); }

/* a row */
body.is-phone button.ph-row { border: 0; border-top: 1px solid var(--line-soft); font-family: inherit; text-align: left; width: 100%; cursor: pointer; }
body.is-phone .ph-row { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 10px; border-top: 1px solid var(--line-soft); font-size: 12.5px; min-width: 0; }
body.is-phone .ph-row .tm { font-family: var(--mono); font-size: 10.5px; color: var(--dim); width: 38px; flex: 0 0 auto; }
body.is-phone .ph-row .nm { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone .ph-row .nm b { font-weight: 600; }
body.is-phone .ph-row .wh { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 0 auto; max-width: 42%; }   /* the name wraps, the day or the kind does not squeeze to N... */
body.is-phone .ph-row .rt { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); white-space: nowrap; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
body.is-phone .ph-row .rt.teal { color: var(--teal); }
body.is-phone .ph-row .rt.amber { color: var(--amber); }
body.is-phone .ph-row .rt.red { color: var(--red-ink); }
body.is-phone .ph-row .two { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
body.is-phone .ph-row.short { min-height: 36px; }
body.is-phone .ph-row.seen .nm { color: var(--dim); }
body.is-phone .ph-row.dimmed { opacity: 0.8; }   /* dimmed, still read: 0.55 put its words under 3:1 */
body.is-phone .ph-row.wrap .nm { white-space: normal; line-height: 1.25; font-size: 12px; }
body.is-phone .ph-row.personal { border-left: 3px dashed rgba(90,162,255,0.6); }

/* the lamp — the room's own light system, four states */
body.is-phone .ph-lp { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
body.is-phone .ph-lp.g { background: var(--lamp); box-shadow: 0 0 6px rgba(67,209,122,0.55); }
body.is-phone .ph-lp.r { background: var(--red); box-shadow: 0 0 6px rgba(224,90,74,0.55); }
body.is-phone .ph-lp.a { background: var(--amber); box-shadow: 0 0 6px rgba(224,164,74,0.5); }
body.is-phone .ph-lp.o { background: transparent; border: 1.5px solid var(--dimmer); }

/* the way into a row */
body.is-phone .ph-open {
  min-height: 36px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--teal); background: rgba(79,214,200,0.14);
  border: 1px solid rgba(79,214,200,0.45); white-space: nowrap; flex: 0 0 auto; font-family: inherit; cursor: pointer;
}
body.is-phone .ph-open.hit { min-height: var(--tap); }
body.is-phone .ph-open.quiet { color: var(--dim); background: var(--sunk); border-color: var(--line); font-weight: 500; }
body.is-phone .ph-open.amber { color: var(--amber-ink); background: rgba(224,164,74,0.10); border-color: rgba(224,164,74,0.4); }

/* chips */
body.is-phone .ph-chips { display: flex; flex-wrap: wrap; gap: 7px; }
body.is-phone .ph-chips.hscroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.is-phone .ph-chips.hscroll::-webkit-scrollbar { display: none; }
body.is-phone .ph-chips.hscroll > .ph-chip { flex: 0 0 auto; }
body.is-phone .ph-chip {
  min-height: var(--tap); min-width: var(--tap); display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line);
  font-size: 13px; font-family: inherit; color: var(--ink); white-space: nowrap; cursor: pointer;
}
body.is-phone .ph-chip.on { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
body.is-phone .ph-chip.sq { border-radius: var(--r); }
body.is-phone .ph-chip.sm { padding: 6px 11px; font-size: 12.5px; }
body.is-phone .ph-chip.num { min-width: var(--tap); justify-content: center; padding: 0 8px; }
body.is-phone .ph-chip .n { font-family: var(--mono); font-size: 10.5px; color: var(--teal); }
body.is-phone .ph-chip.amber { background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.35); color: var(--amber-ink); }
body.is-phone .ph-chip.red { background: rgba(224,90,74,0.10); border-color: rgba(224,90,74,0.4); color: var(--red-ink); }
body.is-phone .ph-chip.blue { background: rgba(90,162,255,0.10); border-color: rgba(90,162,255,0.45); color: var(--map-numb); }
/* NOT BUILT is dashed and faded, never absent: a control that says why it
   cannot act is an answer, and a missing one is a hunt (his ruling, 10 Sept) */
body.is-phone .ph-chip.dimmed { opacity: 0.8; border-style: dashed; }   /* the NOT BUILT tag on it must still be read */

/* a segmented control */
body.is-phone .ph-seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunk); height: var(--tap); flex: 0 0 auto; }
body.is-phone .ph-seg > * { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--dim); white-space: nowrap; border-left: 1px solid var(--line); background: none; cursor: pointer; }
body.is-phone .ph-seg > *:first-child { border-left: 0; }
body.is-phone .ph-seg > .on { background: rgba(79,214,200,0.16); color: var(--teal); font-weight: 600; }
body.is-phone .ph-seg.h36 { height: 36px; }

/* two things side by side */
body.is-phone .ph-split { display: flex; gap: 8px; min-width: 0; }
body.is-phone .ph-split > * { flex: 1 1 0; min-width: 0; }

/* the encounter's tool row, and the review's three tabs */
body.is-phone .ph-tabs { display: flex; gap: 6px; padding: 8px 12px 0; flex: 0 0 auto; }
body.is-phone .ph-tab {
  flex: 1 1 0; min-width: 0; height: var(--tap); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--sunk); color: var(--dim);
  font: inherit; cursor: pointer;
}
body.is-phone .ph-tab .l { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; white-space: nowrap; }
body.is-phone .ph-tab.on { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); }
/* SOMETHING GATHERED, marked with a tick and not only a colour */
body.is-phone .ph-tab.done .l::after { content: " \2713"; }

/* a drawing tool — the body map's inks and its eraser */
body.is-phone .ph-tool {
  width: var(--tap); height: var(--tap); border-radius: var(--r); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line);
  background: var(--sunk); color: var(--dim); font: inherit; cursor: pointer; flex: 0 0 auto;
}
body.is-phone .ph-tool .l { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; }
body.is-phone .ph-tool.on { border-color: rgba(79,214,200,0.5); background: rgba(79,214,200,0.14); color: var(--teal); }
body.is-phone .ph-tool.pain { color: var(--red-ink); }
body.is-phone .ph-tool.pain.on { border-color: rgba(224,90,74,0.55); background: rgba(224,90,74,0.14); }
body.is-phone .ph-tool.numb { color: var(--map-numb); }
body.is-phone .ph-tool.numb.on { border-color: rgba(90,162,255,0.55); background: rgba(90,162,255,0.14); }

/* a card */
body.is-phone .ph-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
body.is-phone .ph-card .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
body.is-phone .ph-card .p { font-family: var(--serif); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
body.is-phone .ph-card.tight { gap: 4px; padding: 8px 12px; }
body.is-phone .ph-card.ask { background: rgba(224,164,74,0.06); border-color: rgba(224,164,74,0.3); }
body.is-phone .ph-card.red { background: rgba(224,90,74,0.06); border-color: rgba(224,90,74,0.35); }
body.is-phone .ph-card.blue { background: rgba(90,162,255,0.06); border-color: rgba(90,162,255,0.3); }

/* a labelled field */
body.is-phone .ph-fld { height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--r); background: var(--sunk); border: 1px solid var(--line); min-width: 0; }
body.is-phone .ph-fld .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dimmer); white-space: nowrap; flex: 0 0 auto; }
body.is-phone .ph-fld .v { font-family: var(--mono); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone .ph-fld .v.ph { color: var(--dimmer); }
body.is-phone .ph-fld.ok { border-color: rgba(79,214,200,0.35); }
body.is-phone .ph-fld.bad { border-color: rgba(224,90,74,0.5); }

/* an unclear point, on its own row */
body.is-phone .ph-pt { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 10px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); min-width: 0; }
body.is-phone .ph-pt .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone .ph-pt .bx { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--rule); display: flex; align-items: center; justify-content: center; color: var(--teal); flex: 0 0 auto; }
body.is-phone .ph-pt .bx.on { border-color: var(--teal); background: rgba(79,214,200,0.16); }
body.is-phone .ph-pt .n { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); flex: 0 0 auto; }

/* the acts across the foot of a page */
body.is-phone .ph-acts { flex: 0 0 auto; display: flex; gap: 8px; padding: 6px 12px 8px; }
body.is-phone .ph-btn {
  flex: 1 1 0; min-width: 0; height: var(--tap); display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 8px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--sunk); font-size: 13px; font-family: inherit; color: var(--ink);
  white-space: nowrap; overflow: hidden; cursor: pointer;
}
body.is-phone .ph-btn.go { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
body.is-phone .ph-btn.warn { background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.35); color: var(--amber-ink); }
body.is-phone .ph-btn.stop { background: rgba(224,90,74,0.10); border-color: rgba(224,90,74,0.4); color: var(--red-ink); }
body.is-phone .ph-btn.blue { background: rgba(90,162,255,0.10); border-color: rgba(90,162,255,0.45); color: var(--map-numb); }
body.is-phone .ph-btn.quiet { color: var(--dim); }
body.is-phone .ph-btn.dimmed { opacity: 0.8; }
body.is-phone .ph-btn.grow2 { flex: 1.6 1 0; }
/* A BUTTON INSIDE THE WORKING AREA KEEPS ITS OWN SIZE. `.ph-btn` is
   `flex: 1 1 0` so a row of them shares the width evenly; the same class in
   a COLUMN would stretch to fill the page — the Send button that grew to
   its whole column at 412 (the mock-up's own measurement). */
body.is-phone .ph-work > .ph-btn,
body.is-phone .ph-btn.own { flex: 0 0 auto; }

/* the small answers under a point */
body.is-phone .ph-mini { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: var(--tap); padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); flex: 1 1 0; min-width: 0; font-family: inherit; cursor: pointer; }
body.is-phone .ph-mini.ok { color: var(--teal); border-color: rgba(79,214,200,0.45); background: rgba(79,214,200,0.12); }
body.is-phone .ph-mini.no { color: var(--dim); }
body.is-phone .ph-mini.say { color: var(--amber-ink); border-color: rgba(224,164,74,0.4); background: rgba(224,164,74,0.08); }
body.is-phone .ph-mini.bin { color: var(--red-ink); border-color: rgba(224,90,74,0.35); background: rgba(224,90,74,0.08); }

/* a hint, and a tag */
body.is-phone .ph-hint { font-size: 11px; line-height: 1.4; color: var(--dim); }
body.is-phone .ph-hint.serif { font-family: var(--serif); font-size: 13px; color: var(--ink-2); }
body.is-phone .ph-hint.red { color: var(--red-ink); }
body.is-phone .ph-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; color: var(--dim); border: 1px solid var(--line); white-space: nowrap; }
body.is-phone .ph-tag.amber { color: var(--amber-ink); border-color: rgba(224,164,74,0.4); background: rgba(224,164,74,0.08); }
body.is-phone .ph-tag.red { color: var(--red-ink); border-color: rgba(224,90,74,0.4); background: rgba(224,90,74,0.10); }
body.is-phone .ph-tag.teal { color: var(--teal); border-color: rgba(79,214,200,0.35); }
body.is-phone .ph-tag.blue { color: var(--map-numb); border-color: rgba(90,162,255,0.4); }

/* a tick list, and the bar above it */
body.is-phone .ph-prog { height: 4px; border-radius: 2px; background: rgba(79,214,200,0.12); overflow: hidden; }
body.is-phone .ph-prog i { display: block; height: 100%; background: var(--teal); }
body.is-phone .ph-tick { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 10px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink); }
body.is-phone .ph-tick .bx { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--rule); display: flex; align-items: center; justify-content: center; color: var(--teal); flex: 0 0 auto; }
body.is-phone .ph-tick .bx.on { border-color: var(--teal); background: rgba(79,214,200,0.16); }
body.is-phone .ph-tick .who { font-family: var(--mono); font-size: 9px; color: var(--dimmer); margin-left: auto; }
body.is-phone .ph-tick.done { color: var(--dim); }

/* the recordings strip */
body.is-phone .ph-recs { flex: 0 0 auto; margin: 0 12px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
body.is-phone .ph-recs .r { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--teal); display: inline-flex; align-items: center; gap: 3px; }

/* key and value */
body.is-phone .ph-kv { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 5px 10px; align-items: baseline; }
body.is-phone .ph-kv .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--dimmer); }
body.is-phone .ph-kv .v { font-size: 13px; color: var(--ink); }
body.is-phone .ph-kv .v.mono { font-family: var(--mono); font-size: 12.5px; }

/* money — every figure the door's own string, never computed here */
body.is-phone .ph-money { font-family: var(--mono); font-size: 13px; color: #ffffff; white-space: nowrap; }
body.is-phone .ph-money.dim { color: var(--dim); font-size: 11px; }
body.is-phone .ph-tot { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px 0; }
body.is-phone .ph-tot .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--dim); }
body.is-phone .ph-tot .v { margin-left: auto; font-family: var(--mono); font-size: 20px; color: #ffffff; }

/* a bottom sheet — the check-in picker, and anything else that asks over a
   page. FIXED rather than the mock-up's absolute: in the app the phone IS
   the viewport. Above the foot, below the gate, which is the one thing
   that must cover everything. */
body.is-phone .ph-veil { position: fixed; inset: 0; z-index: 50; background: rgba(4,9,10,0.62); }
body.is-phone .ph-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: calc(100% - 48px); display: flex; flex-direction: column; gap: 10px;
  padding: 10px 12px calc(14px + var(--safe-b));
  border-radius: 18px 18px 0 0; background: var(--panel-2);
  border-top: 1px solid rgba(79,214,200,0.2); box-shadow: var(--z2);
}
body.is-phone .ph-sheet .grab { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: rgba(79,214,200,0.25); flex: 0 0 auto; }
body.is-phone .ph-sheet .sheet-t { font-weight: 600; font-size: 16px; color: #ffffff; }

/* ── 6 · the three schedule grids ────────────────────────────────────────
   Rows are minmax(0, 1fr) so the grid shrinks to the height it has rather
   than pushing the page taller — the week grid's own lesson, twice. */
body.is-phone .ph-wk { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); grid-template-rows: 30px 18px repeat(10, minmax(0, 1fr)); gap: 2px; min-width: 0; flex: 1 1 auto; min-height: 0; }
body.is-phone .ph-wk .dh { height: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--dim); }
body.is-phone .ph-wk .dh b { font-size: 12px; color: var(--ink); font-weight: 600; }
body.is-phone .ph-wk .dh.today b { color: var(--teal); }
body.is-phone .ph-wk .hr { min-height: 0; font-family: var(--mono); font-size: 9px; color: var(--dimmer); display: flex; align-items: flex-start; justify-content: flex-end; padding-right: 4px; }
body.is-phone .ph-wk .cell { min-height: 0; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line-soft); min-width: 0; padding: 2px 3px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
body.is-phone .ph-wk .cell.off { background: repeating-linear-gradient(135deg, rgba(79,214,200,0.03) 0 4px, transparent 4px 8px); }
body.is-phone .ph-e { height: 14px; border-radius: 3px; padding: 0 3px; font-family: var(--mono); font-size: 8.5px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-e.book { background: rgba(79,214,200,0.18); color: var(--teal); }
body.is-phone .ph-e.seen { background: rgba(79,214,200,0.08); color: var(--dim); }
body.is-phone .ph-e.op { background: rgba(224,164,74,0.22); color: var(--amber-ink); }
body.is-phone .ph-e.pers { background: transparent; border: 1px dashed rgba(90,162,255,0.6); color: var(--map-numb); }
body.is-phone .ph-e.clash { background: rgba(224,90,74,0.22); color: var(--red-ink); }
body.is-phone .ph-e.cancel { background: transparent; color: var(--dimmer); text-decoration: line-through; }
body.is-phone .ph-e.def { background: rgba(224,90,74,0.10); color: var(--red-ink); text-decoration: line-through; }
/* THE DUTY BAND IS DECLARED AT THE TOP LEVEL, not inside the week grid.
   Scoped to .wk in the mock-up's first draft, the month's own LEAVE band
   inherited the day cell's font and read at the wrong size — measured, and
   fixed here rather than repeated. */
body.is-phone .ph-band-c { height: 18px; border-radius: 3px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.06em; line-height: 18px; text-align: center; white-space: nowrap; overflow: hidden; }
body.is-phone .ph-band-c.leave { background: rgba(224,164,74,0.14); color: var(--amber-ink); border: 1px solid rgba(224,164,74,0.35); }
body.is-phone .ph-band-c.oncall { background: rgba(90,162,255,0.14); color: var(--map-numb); border: 1px solid rgba(90,162,255,0.4); }
/* a public holiday. `hol`, not the mock-up's `ph`: `.ph` is already the
   placeholder modifier on a field's value, and one stylesheet cannot hold
   two meanings for one class. */
body.is-phone .ph-band-c.hol { background: rgba(220,235,233,0.08); color: var(--ink-2); border: 1px solid rgba(220,235,233,0.2); }
body.is-phone .ph-band-c.none { border: 1px dashed rgba(79,214,200,0.08); }

body.is-phone .ph-mo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 18px repeat(5, minmax(0, 1fr)); gap: 3px; flex: 1 1 auto; min-height: 0; }
body.is-phone .ph-mo .dow { height: 18px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--dimmer); text-align: center; line-height: 18px; }
body.is-phone .ph-mo .d { min-height: 0; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-soft); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
body.is-phone .ph-mo .d.out { opacity: 0.35; }
body.is-phone .ph-mo .d.today { border-color: rgba(79,214,200,0.5); }
body.is-phone .ph-mo .d.leave { background: rgba(224,164,74,0.10); border-color: rgba(224,164,74,0.3); }
body.is-phone .ph-mo .d.hol { background: rgba(220,235,233,0.05); }
body.is-phone .ph-mo .dn { font-family: var(--mono); font-size: 11px; color: var(--ink); }
body.is-phone .ph-mo .d.today .dn { color: var(--teal); font-weight: 600; }
body.is-phone .ph-mo .m { height: 13px; border-radius: 3px; padding: 0 2px; font-family: var(--mono); font-size: 7.5px; line-height: 13px; white-space: nowrap; overflow: hidden; }

body.is-phone .ph-yr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px; flex: 1 1 auto; min-height: 0; }
body.is-phone .ph-yr .mc { min-height: 0; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); padding: 8px 9px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; }
body.is-phone .ph-yr .mc.now { border-color: rgba(79,214,200,0.45); }
body.is-phone .ph-yr .mn { font-size: 12.5px; font-weight: 600; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
body.is-phone .ph-yr .mn .y { font-family: var(--mono); font-size: 9px; color: var(--dimmer); font-weight: 400; }
body.is-phone .ph-yr .st { font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-yr .st b { color: var(--ink); font-weight: 500; }
body.is-phone .ph-yr .bars { display: flex; gap: 3px; margin-top: auto; }
body.is-phone .ph-yr .bars i { display: block; height: 6px; border-radius: 2px; flex: 0 0 auto; }

/* the legend under a grid — colour is never the only cue, so every band is
   named in words beside its swatch */
body.is-phone .ph-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em; color: var(--dim); }
body.is-phone .ph-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
body.is-phone .ph-legend i { width: 10px; height: 8px; border-radius: 2px; display: block; }
/* THE BAR, MEASURED ON THE REAL APP AFTER THE FOLD (the integrator, LE-57).
   At 412x915 the grid's first column was sized by the registration number
   in the THIRD row (111px), so the name in the first row got what was left
   beside a 152px clock and ellipsised; the Record button (84px) overflowed
   its own 70px wrap and the caption under it was cut; the allergy pill
   wrapped to two lines under a percentage cap that resolved against its own
   auto-sized column; the who-button, the number and the allergy pill sat
   under the 44px tap floor; and at 360x800 the body had no definite height,
   so the column grew with its content and the document scrolled 20px.
   Every rule below is the fit that measurement asked for, and nothing else. */
body.is-phone { height: 100vh; height: 100dvh; }
body.is-phone .spine > .wordmark { width: auto; padding-right: 4px; }
body.is-phone .spine > #who { min-height: var(--tap); justify-self: stretch; }
/* the avatar's two letters cost 26px of a 412px row that has to hold a name and a clock */
body.is-phone #who .avatar { display: none; }
body.is-phone .spine #clock { font-size: 9.5px; }
body.is-phone .spine > #rec { display: flex; flex-direction: column; align-items: flex-end;
                              gap: 2px; width: auto; max-width: none; min-width: 0; }
body.is-phone .spine #recbtn { min-height: var(--tap); flex: 0 0 auto; }
/* THE CAPTION ONLY WHILE RECORDING. Beside the button it widened the third
   column to 177px at 360 and starved the name; under it while READY it said
   what the button already says. spine.js marks the caption .on while a take
   runs, so the timer shows under Stop and nothing shows under Record. */
body.is-phone .spine .rec-status { display: none; min-width: 0; max-width: 110px; }
body.is-phone .spine .rec-status.on { display: block; }
/* the number at 10px keeps the first column narrow enough for the name above it */
body.is-phone .spine #patient-mrn { font-size: 10px; min-height: var(--tap); display: inline-flex; align-items: center; }
body.is-phone .spine #patient-sub { align-self: center; min-height: var(--tap); display: inline-flex; align-items: center; }
body.is-phone .spine #allergy { white-space: nowrap; min-height: var(--tap); display: inline-flex; align-items: center;
                                  max-width: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* A BUTTON IS A TAP TARGET, measured on Now and the schedule after the fold:
   a row that navigates was drawn 36px (the short row is for reading), day.js's
   name buttons are 21px on the phone, and a segment's buttons sat 2px under the
   floor inside the segment's own border. Properties, not pages. */
body.is-phone button.ph-row, body.is-phone .ph-row[role="button"] { min-height: var(--tap); }
body.is-phone .ph-seg { height: calc(var(--tap) + 2px); }
body.is-phone .dy-who { min-height: var(--tap); display: inline-flex; align-items: center; }
body.is-phone button.ph-row.short, body.is-phone .ph-row.short[role="button"] { min-height: var(--tap); }
/* day.js's name button under the frame: a row's name, not a grey box */
body.is-phone .dy-who { background: transparent; border: 0; padding: 0 4px; }
/* THE MODULES' OWN CONTROLS UNDER THE FRAME, measured on the encounter,
   the patients page and the body map after the fold: the capture strip's
   section chips (38px, and the row clipped rather than sliding), note.js's
   section mics (30x24), the body map's arrows and ticks (30x32), the
   medicines' stars (30 wide) and patients.js's name buttons (18px). The
   frame gives each the floor and lets the strip slide, the way it laid the
   spine out -- the modules are untouched. */
body.is-phone .cap-strip { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
body.is-phone .cap-strip .sect, body.is-phone .cap-strip .sect-open, body.is-phone .cap-strip .sect-all,
body.is-phone .cap-bar .meds-btn, body.is-phone .cap-bar .clip { min-height: var(--tap); min-width: var(--tap); }
body.is-phone .blk .mic, body.is-phone button.mic { min-width: var(--tap); min-height: var(--tap); }
body.is-phone .map-arrow, body.is-phone .map-tick { min-height: var(--tap); min-width: var(--tap); }
body.is-phone .med-star { min-width: var(--tap); }
body.is-phone .pt-who { min-height: var(--tap); display: inline-flex; align-items: center; }
body.is-phone .cap-bar .sect-all, body.is-phone .cap-bar .sect-open { min-height: var(--tap); }
body.is-phone .tk-key { min-height: var(--tap); display: inline-flex; align-items: center; }
/* a row's label gives way to its tag rather than clipping (the folder's utilities at 360) */
body.is-phone .ph-row > .nm, body.is-phone .ph-row > .l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* a square chip's label gives way to its tag rather than clipping (the folder's utilities at 360) */
body.is-phone .ph-chip.sq { min-width: 0; }
body.is-phone .ph-chip.sq > span:not(.ph-tag) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
body.is-phone .ph-chip.sq > .ph-tag { flex: 0 0 auto; }
/* a button's label gives way with an ellipsis rather than clipping ("Pend → room" at 412, measured) */
body.is-phone .ph-btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* THE BODY MAP'S ⤢ BIGGER IS NOT FOR THE PHONE. The tool page already fills
   the stage, and the plane it opens is appended to the body outside the
   router -- so the back button would move the page beneath it and leave the
   plane standing. Hidden under the phone frame; the desktop keeps it. */
body.is-phone .bm-big { display: none; }

/* A SCREEN SHORTER THAN A PAGE'S OWN ROWS -- a phone turned sideways in a
   browser (the APK itself is portrait-only). The encounter page's tabs,
   recordings strip, capture bar and acts are 207px on their own, the whole
   column at 412px tall, the folder's header and tiles are 8px over the same
   column and the bill's 3px; so those three pages scroll as a whole there
   (each marked on its section in index.html) rather than clipping what
   nothing can reach.
   The limit is well under any portrait height, so nothing changes where the
   pages were measured. */
@media (max-height: 560px) {
  body.is-phone #phoneenc,
  body.is-phone #folder,
  body.is-phone #money { overflow-y: auto; }
}

/* THE BODY MAP SIDE BY SIDE, as board 11 draws it: the body in the left
   column, the dial, the inks and the acts in the right, so the tools are
   never below a fold the drawing hand has to scroll past -- the whole-app
   render measured 450-540px of scroll before Send to note. The card's own
   children are placed by grid area; nothing is redrawn. */
body.is-phone .tl-body .map-wrap {   /* the tools pane's seat (enctools.js); the classes are bodymap.js's own */
  display: grid; grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  grid-template-areas: "stage tools" "stage dial" "stage meter" "hint hint";
  column-gap: 10px; row-gap: 8px; align-items: start;
}
body.is-phone .tl-body .map-stage { grid-area: stage; }
body.is-phone .tl-body .map-stage .map-svg { width: 100%; }
body.is-phone .tl-body .map-tools { grid-area: tools; }
body.is-phone .tl-body .map-dial { grid-area: dial; flex-wrap: wrap; min-width: 0; }   /* four ticks and two arrows on two lines, never past the edge */
body.is-phone .tl-body .map-meter { grid-area: meter; }
body.is-phone .tl-body .map-wrap > span:last-child { grid-area: hint; }

/* THE WEEK'S BAND CHIPS STAY IN THEIR CELLS: an on-call or leave chip is
   nowrap and a phone's day column is ~50px, so it bled into the next day
   in the whole-app render; it ellipsises in its own cell instead. */
body.is-phone .wk-band { min-width: 0; }
body.is-phone .wk-band .wk-chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* THE FOOT STAYS AT THE FOOT. While the check-in sheet is up nothing is in
   flow between the bar and the foot (the sheet is fixed, every other page
   hidden), and a flex column with nothing to grow lets its last child rise
   -- the six seats showed through the sheet's top in the whole-app render.
   An automatic top margin keeps the foot at the bottom whatever is in flow. */
body.is-phone #phonefoot { margin-top: auto; }

/* THE WEEK'S CANCELLED COUNT reads on two lines in a phone's 56px row
   header -- "cancelled" over the number -- rather than as "cancelled1"
   clipped to nothing; the count is the row's whole point (his 9 September
   ruling: a glance at how many cancellations a week had). */
body.is-phone .wk-rh.wk-rate { white-space: normal; line-height: 1.25; }

/* THE BAND AND THE TOOLS BOX (27 Nov, his choice C) are no cells of the
   phone's grid -- `display: contents`, so their children are. The band's
   edge word, the 🧬 Profile and the ⚙ are desktop-only: the phone keeps the
   folder's Profile and the Settings cluster. */
body.is-phone .spine > #patient-band { display: contents; }
body.is-phone .spine > #spine-tools { display: contents; }
body.is-phone .spine .pband-tag { display: none !important; }
body.is-phone .spine #patient-profile { display: none !important; }
body.is-phone .spine #setbtn { display: none !important; }
/* ==== apk_frame END — the phone's frame and its class vocabulary (LE-57, Parcel A) ==== */

/* ==== apk_tools BEGIN — the five tools' panes (LE-57 Parcel C2) ==== */

body.is-phone .tl-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;                 /* the pane clips; one region inside scrolls */
}

/* THE ONE SCROLLING REGION. Every element the module marks `data-scroll`
   scrolls inside itself and takes the slack; the heads, hints and buttons
   above and below it stay put. */
body.is-phone .tl-pane [data-scroll] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
body.is-phone .tl-pane [data-scroll]::-webkit-scrollbar { display: none; }

body.is-phone .tl-quiet { color: var(--dimmer); }

/* ── a control with no door behind it ───────────────────────────────────── */

body.is-phone .tl-nb { display: flex; flex-direction: column; gap: 6px; }
body.is-phone .tl-nb-b {
  min-height: var(--tap, 44px);
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  opacity: 0.55;
  border-style: dashed;
}
body.is-phone .tl-nb-l {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.is-phone .tl-nb-tag { margin-left: auto; flex: 0 0 auto; }
/* THE SENTENCE A TAP REVEALS. It wraps — it is the whole reason the control
   is dimmed rather than absent, and a clipped explanation explains nothing. */
body.is-phone .tl-said { white-space: normal; }

/* ── 11 · the body map, moved in ────────────────────────────────────────── */

body.is-phone .tl-body { display: flex; flex-direction: column; min-width: 0; }
/* The card is the pass's own `.field`; it fills the seat it was moved into
   and keeps its own internals untouched. */
body.is-phone .tl-body > .field { margin: 0; min-width: 0; }
body.is-phone .tl-body-gone {
  font-size: 11px;
  color: var(--dimmer);
  padding: 8px 0;
}

/* ── 12 · medication ────────────────────────────────────────────────────── */

body.is-phone .tl-allergy {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--amber);
  border: 1px solid rgba(224, 164, 74, 0.4);
  background: rgba(224, 164, 74, 0.08);
}
body.is-phone .tl-allergy.known {
  color: var(--red-ink);
  border-color: rgba(224, 90, 74, 0.5);
  background: rgba(224, 90, 74, 0.14);
}
body.is-phone .tl-allergy-l {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-phone .tl-meds { min-width: 0; }
body.is-phone .tl-back { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }

/* A COMPACTION, scoped inside the pane. meds.js draws its own rows for the
   desktop's holding area; on a phone the same rows need the tap floor and no
   more width than the pane has. Nothing outside `.tl-meds` is reached. */
body.is-phone .tl-meds .med-chip,
body.is-phone .tl-meds .med-star,
body.is-phone .tl-meds .meds-class {
  min-height: var(--tap, 44px);
}
body.is-phone .tl-meds .meds-find {
  min-height: var(--tap, 44px);
  width: 100%;
  min-width: 0;
}
body.is-phone .tl-meds .med-chip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 13 · procedure ─────────────────────────────────────────────────────── */

body.is-phone .tl-procs { min-width: 0; }
/* The same compaction for procedures.js's own ticks. */
body.is-phone .tl-procs .pr-tick { min-height: var(--tap, 44px); min-width: 0; }
body.is-phone .tl-procs .pr-row { gap: 6px; min-width: 0; }

body.is-phone .tl-tosp { flex: 0 0 auto; }
body.is-phone .tl-listing { flex: 0 0 auto; min-width: 0; }
/* listing.js's form is two fields and a button; at 360px they stack rather
   than clipping the date. */
body.is-phone .tl-listing .li-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
body.is-phone .tl-listing .li-in {
  flex: 1 1 100%;
  min-width: 0;
  min-height: var(--tap, 44px);
}
body.is-phone .tl-listing .btn { min-height: var(--tap, 44px); }

/* ── 14 · plan ──────────────────────────────────────────────────────────── */

body.is-phone .tl-said-list { min-width: 0; }
body.is-phone .tl-said-list .rec-list { min-width: 0; }

/* ── 15 · diagnosis ─────────────────────────────────────────────────────── */

/* THE RAIL SLIDES SIDEWAYS rather than wrapping to three rows: the pane's
   height is the screen's, and the folder's diagnoses are a list to browse,
   not a list to read at once. `ph-chips.hscroll` is Parcel A's; what is here
   is only what a folder chip needs. */
body.is-phone .tl-dx { flex: 0 0 auto; }
body.is-phone .tl-dx-c {
  min-height: var(--tap, 44px);
  max-width: 74vw;
  flex: 0 0 auto;
  gap: 6px;
}
body.is-phone .tl-dx-l {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==== apk_tools END — the five tools' panes (LE-57 Parcel C2) ==== */

/* ==== apk_review BEGIN — the phone's review and close (LE-57 Parcel D) ==== */

/* THE PANE FILLS THE WORK HOST AND NEVER SCROLLS AS A WHOLE. One region
   inside it scrolls (`.rv-scroll`, marked `data-scroll`), so the tabs above
   and the three acts below stay under the thumb at 360 as well as 412. */
body.is-phone .rv-pane {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden;
}
body.is-phone .rv-scroll {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 auto; min-height: 0; min-width: 0;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
}
body.is-phone .rv-scroll::-webkit-scrollbar { display: none; }

/* the wrapper for the shape of `ic()` that hands back markup rather than a
   node. Parcel A's ships a node, so this is the path that is not taken —
   kept because an icon set is a dependency and a clinical screen must not
   turn on which of two shapes it hands back. */
body.is-phone .rv-ic { display: inline-flex; flex: 0 0 auto; }

/* the seat a borrowed node leaves behind in the pass's own column */
body.is-phone .rv-seat { display: none; }

/* ── the PDF row (board 17's card, board 18's row) ── */
body.is-phone .rv-pdf { min-height: var(--tap); }
body.is-phone .rv-open { margin-left: auto; flex: 0 0 auto; }

/* ── the blocks this page borrows from pass.js's column ──
   Moved, never redrawn. What changes here is spacing and the size of a
   thumb: every control inside is brought up to 44px, because the same
   button that is fine under a mouse is not fine under a thumb. */
body.is-phone .rv-host { min-width: 0; display: block; }
body.is-phone .rv-host .points,
body.is-phone .rv-host .review,
body.is-phone .rv-host .close { margin: 0; padding: 8px 10px; }
body.is-phone .rv-host .btn { min-height: var(--tap); }
body.is-phone .rv-host .pt-acts { gap: 8px; }
body.is-phone .rv-host .pt-acts .btn { flex: 1 1 0; min-width: 0; justify-content: center; }
body.is-phone .rv-host .review-row { gap: 8px; }
body.is-phone .rv-host .review-row .btn { flex: 1 1 0; min-width: 0; justify-content: center; }
body.is-phone .rv-host .review-pdf { height: 52vh; }
body.is-phone .rv-host .close-grid { gap: 8px; }
body.is-phone .rv-host .close-grid .btn { flex: 1 1 auto; justify-content: center; }
body.is-phone .rv-host .close-line { align-items: center; gap: 8px; }
body.is-phone .rv-host .close-date { min-height: var(--tap); flex: 1 1 auto; min-width: 0; }
body.is-phone .rv-host .say-box,
body.is-phone .rv-host .ed-box { min-height: 76px; }

/* ── plan: the collect row ── */
body.is-phone .rv-collect { min-height: var(--tap); border-radius: 10px; }
body.is-phone .rv-collect.dimmed { opacity: 0.8; }
body.is-phone .rv-tappable { cursor: pointer; }

/* ── schedule: drawn, dimmed, and tagged — never a button into nothing ── */
body.is-phone .rv-sched { gap: 8px; }

/* ── the disposition, and the intervals on his grid ── */
body.is-phone .rv-answers { gap: 8px; }
body.is-phone .rv-answer { justify-content: center; }
body.is-phone .rv-intervals { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* THE UNIT SWITCH IS A BUTTON IN A SEGMENT, and Parcel A's `.ph-seg > *`
   already gives any child the typography, the divider and the lit state --
   so all that is added here is the 44px each one owes a thumb, and the one
   state A's segment has no word for: a unit the door offers nothing in. */
body.is-phone .rv-unit { min-height: var(--tap); }
body.is-phone .rv-unit.dimmed { opacity: 0.8; }
body.is-phone .rv-nums { gap: 8px; }
body.is-phone .rv-rest { gap: 8px; }

/* ── the acts, at the foot, in the board's weights ── */
body.is-phone .rv-acts { margin-top: auto; }
body.is-phone .rv-grow { flex: 1.6 1 0; }
body.is-phone .rv-narrow { flex: 0.8 1 0; }
body.is-phone .rv-dim { opacity: 0.8; }

body.is-phone .rv-said { margin-top: 0; }

/* ==== apk_review END — the phone's review and close (LE-57 Parcel D) ==== */

/* ==== apk_enc BEGIN — the phone's encounter page (LE-57 Parcel C1) ==== */

/* the page: a column between the top bar and the capture bar, clipped --
   the page never scrolls, one region inside it does */
body.is-phone #phoneenc {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* THE ONE SCROLLING REGION on the NOTE state (marked data-scroll): the
   note, what has been gathered and what comes out, with the tabs, the
   strip, the capture bar, the acts and the foot staying put. */
body.is-phone .enc-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
body.is-phone .enc-state::-webkit-scrollbar { display: none; }

/* the note column, moved in. Shown (app.css hides .col-note below 768px)
   and stripped of the desktop's seat, and NOT a scroller of its own. */
body.is-phone .enc-note { flex: 0 0 auto; min-width: 0; }
body.is-phone .enc-note > .col-note {
  display: block;
  grid-area: auto;
  border-right: 0;
  padding: 0;
  min-height: 0;
  overflow: visible;
}
/* the seat it came out of, kept so it can go back: it draws nothing */
body.is-phone .enc-note-gone { display: none; }

/* what has been gathered: one row per tool, so it never needs to scroll */
body.is-phone .enc-gathered { flex: 0 0 auto; }
body.is-phone .enc-empty {
  color: var(--dim);
  font: 400 12px/1.4 var(--display);
  white-space: normal;
}

/* the recordings strip's own text and its one control */
body.is-phone .enc-recs-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.is-phone .enc-recs-b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding: 0 2px;
}

/* the one list of recordings, when it is not in the NOTE state's own seat */
body.is-phone .enc-drawer {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 12px;
  scrollbar-width: none;
}
body.is-phone .enc-drawer::-webkit-scrollbar { display: none; }
body.is-phone .enc-recseat { flex: 0 1 auto; min-height: 0; }

/* the capture bar's seat: capture.js's one strip, where the board puts it */
body.is-phone .enc-cap { flex: 0 0 auto; min-width: 0; }

/* WHERE THE PASS WAITS. `#app` and `#footrule` are moved in here and are
   never drawn: pass.js paints `#col-fields` by id and this page presses its
   Done through it, so the columns must stay IN the document. Parcel D moves
   the review out of here into its own pane, and a node moved out of a
   display:none ancestor draws normally. */
body.is-phone .enc-hold { display: none; }

/* the acts, the reasons the room offered, and the one sentence */
body.is-phone .enc-acts { flex: 0 0 auto; }
body.is-phone .enc-pend {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 12px 6px;
}
body.is-phone .enc-said {
  flex: 0 0 auto;
  margin: 0 12px 6px;
  font: 500 11.5px/1.45 var(--mono);
  color: var(--dim);
}
body.is-phone .enc-said.ok { color: var(--teal); }
body.is-phone .enc-said.no { color: var(--red-ink); }
body.is-phone .enc-wait {
  color: var(--dimmer);
  font: 500 11px/1.45 var(--mono);
}

/* while the model has the note there is nothing to press, so the acts give
   way to one line at the same height -- the row does not jump */
body.is-phone .enc-writing {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 12px 8px;
  color: var(--teal);
  font: 500 13px/1.4 var(--display);
}

/* what comes out of this encounter */
body.is-phone .enc-orders { margin: 6px 0 2px; }   /* #1299: the Orders chip, its own row above what comes out */
body.is-phone .enc-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Parcel A's glyph, in its own seat, so an icon that cannot be drawn leaves
   a gap rather than collapsing the row it is in */
body.is-phone .enc-ic {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

/* ==== apk_enc END — the phone's encounter page (LE-57 Parcel C1) ==== */

/* ==== apk_now BEGIN ==== */
/* LE-57 Parcel B — Now, Schedule and Diary. Fold into `app/app.css` ABOVE
 * the chat sections (LE-49: a marker-to-EOF slice swallows anything after
 * the last marker), and AFTER `apk_frame` — see the cascade note below.
 * Keep the two markers so the harness can read the block back out.
 *
 * IT ADDS WHAT THESE THREE PAGES ALONE NEED AND NOTHING ELSE. Every selector
 * names at least one `.now-` class of this parcel's own, and no rule's last
 * compound is a bare `ph-*`: the vocabulary is Parcel A's. Where a page
 * wanted something A already spells, the MARKUP was changed to use A's class
 * rather than a rule added here — `.ph-content` for the page column,
 * `.ph-row.seen` for a seen patient, `.ph-row.wrap` for a line that wraps,
 * `.ph-seg.h36` for the short segment, `.ph-btn.own` for a button that keeps
 * its own width, `.ph-mo .d.hol` for a public holiday.
 *
 * THE CASCADE, MEASURED RATHER THAN ASSUMED. Every rule in `apk_frame.css`
 * is scoped `body.is-phone .ph-…`, which outranks a bare `.now-…`. So each
 * rule below that has to BEAT one of A's carries the same scope and one
 * class more — `body.is-phone .ph-band.now-pad`, not `.now-pad`. Rules that
 * set something A does not set are left unscoped.
 *
 * IT DECLARES NO TOKEN. No `:root`, no custom property: every colour is
 * app.css's own, so both palettes follow without this file being told.
 */

/* ── the page ─────────────────────────────────────────────────────────── */
/* `.now-page` is `.ph-content` with a name of its own, so these pages can
   be found; the column, the gutter and the gap are A's. */
.now-tiles,
.now-car,
.now-chips,
.now-nbs { flex: 0 0 auto; }

/* A 44px TARGET INSIDE AN 18px ROW. The mock-up's own trick (its `.who` on
   the top bar): full height, pulled back by margin, so a section head keeps
   its height and the thumb still gets its 44px. Scoped to beat A's
   `.ph-sh .r`, which is the same element on the Diary link. */
body.is-phone .ph-sh .r.now-hit,
.now-hit {
  height: var(--tap);
  margin: -13px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  border: 0; padding: 0 2px;   /* a button: no browser outline around the link */
}
.now-hit:active { opacity: 0.7; }

/* ── Now (board 1) ────────────────────────────────────────────────────── */
.now-sched {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.now-more { padding: 6px 10px; }

/* NOT BUILT, and it looks it: a dimmed band with a tag, no rows, and a tap
   that says why -- never a control into nothing. A `.ph-chip` already has
   `.dimmed`; a band has not, so this is the one that is added. */
body.is-phone .ph-band.now-nb { opacity: 0.8; border-style: dashed; }
.now-nb-say { color: var(--dim); font-size: 11.5px; }
.now-nbs { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── the carousel (boards 6–9) ────────────────────────────────────────── */
.now-car { display: flex; align-items: center; gap: 8px; min-width: 0; }
.now-arrow {
  flex: 0 0 var(--tap);
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--sunk);
  color: var(--dim);
  cursor: pointer;
}
.now-arrow:active { background: var(--panel-2); }
.now-seg { flex: 2.2 1 0; min-width: 0; }
.now-lbl-r { display: inline-flex; align-items: center; gap: 8px; }
.now-nb-tag { opacity: 1; }   /* its band is already dimmed; two fades compound to unreadable */

/* the body of whichever scope is on: one region, and only the day scrolls */
.now-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* THE CAROUSEL IS THE SCOPE BAR ON THE PHONE, so the two hosted painters'
   own bars are hidden rather than drawn twice. Both drive the same `ask`,
   so they cannot come to disagree about which day is on screen. */
.now-body .dy-bar,
.now-body .wk-head { display: none; }
.now-body .dy-sum,
.now-body .dy-why { font-size: 11px; color: var(--dim); }
.now-body .dy-list { display: flex; flex-direction: column; gap: 8px; }
.now-body .dy-row { min-height: var(--tap); }
.now-body .wk-grid { flex: 1 1 auto; min-height: 0; }

/* the month's own marks — the colour says what kind of fact it is, and
   every figure in a square is a count the door sent for that day */
.now-m-pt { color: var(--teal); }
.now-m-call { color: var(--map-numb); }
.now-m-lv { color: var(--amber-ink); }
.now-m-ph { color: var(--ink-2); }
.now-m-def { color: var(--red-ink); text-decoration: line-through; }
.now-m-can { color: var(--dimmer); text-decoration: line-through; }

/* the year's twelve cards */
.now-st-pt { color: var(--ink); }
.now-st-lv { color: var(--amber-ink); }

/* the legend's swatches: A sizes the box, this says what each one means */
.now-legend i { border: 1px solid transparent; }
.now-l-pt { background: rgba(79, 214, 200, 0.24); }
.now-l-call { background: rgba(90, 162, 255, 0.24); }
.now-l-lv { background: rgba(224, 164, 74, 0.24); }
.now-l-ph { background: rgba(220, 235, 233, 0.12); }
.now-l-def { border-color: var(--red); }
.now-l-can { border-color: var(--dimmer); }

/* ── the diary (board 10) ─────────────────────────────────────────────── */
/* a `.ph-band` is `flex: 0 0 auto`; these two have to give and grow, so
   both carry A's scope and one class more */
body.is-phone .ph-split > .now-roster { flex: 1 1 0; min-width: 0; }
.now-bad { padding: 4px 10px 8px; color: var(--amber-ink); }
.now-chip { flex: 1 1 0; min-width: 0; justify-content: center; }
body.is-phone .ph-chip.now-conflicts {
  flex: 0 0 auto;
  justify-content: flex-start;
  border-color: rgba(79, 214, 200, 0.45);
}
.now-conflicts .n { margin-left: auto; }
body.is-phone .ph-chip.now-conflicts.red {
  border-color: rgba(224, 90, 74, 0.45);
  color: var(--red-ink);
}

/* ── the note pad ─────────────────────────────────────────────────────── */
body.is-phone .ph-band.now-pad {
  flex: 1 1 auto;
  min-height: 0;
}
.now-pad-new {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 10px;
}
/* NOT `.ph-split`: its `> *` would give the three boxes one width each. */
.now-pad-line { display: flex; gap: 7px; min-width: 0; }
.now-pad-text,
.now-pad-when {
  height: var(--tap);
  min-width: 0;
  font-family: var(--display);
  font-size: 13px;
  color: var(--ink);
}
.now-pad-text { flex: 2.4 1 0; }
.now-pad-when { flex: 1 1 0; font-family: var(--mono); font-size: 12px; }
.now-pad-add { padding: 0 12px; }
.now-pad-rows {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.now-pad-row { padding-block: 4px; }
.now-pad-edit,
.now-pad-rm {
  width: var(--tap);
  height: var(--tap);
  margin: -8px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  cursor: pointer;
}
.now-pad-rm { color: var(--red-ink); }
/* THE READ-BACK, and it is the whole point of the second asking: what
   stands now, beside what would replace it. */
.now-pad-back {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 9px 11px;
  border-radius: var(--r);
  border: 1px solid rgba(224, 164, 74, 0.35);
  background: rgba(224, 164, 74, 0.06);
}
.now-pad-back-h { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.now-pad-back-l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 12px; }
.now-pad-back-l .was { color: var(--dim); text-decoration: line-through; }
.now-pad-back-l .arrow { color: var(--dimmer); }
.now-pad-back-l .now { color: var(--ink); font-weight: 500; }
.now-pad-back-l .when { color: var(--amber-ink); font-family: var(--mono); font-size: 11px; }
.now-pad-back-a { display: flex; gap: 7px; }

/* ── 360×752: the same pages, tighter ─────────────────────────────────── */
@media (max-height: 780px) {
  .now-sched { gap: 8px; }
  .now-pad-new { gap: 6px; padding: 6px 10px; }
}
/* the segment grows between the arrows: A's .ph-seg is flex 0 0 auto at a
   higher specificity than .now-seg, so the class pair is named (integrator) */
body.is-phone .ph-seg.now-seg { flex: 2.2 1 0; }
/* A SECTION HEADER THAT CARRIES A TAP -- the schedule's Diary chip -- is as
   tall as the tap and centres it, where an 18px header let the 44px chip
   overhang the band below (the whole-app render). Headers without one keep
   their 18px. */
body.is-phone .now-sh:has(.now-hit) { align-items: center; min-height: var(--tap); }

/* ==== apk_now END ==== */

/* ==== apk_arrivals BEGIN — the arrivals pages (LE-57, Parcel E1) ==== */
/* THE ARRIVALS PAGES ON THE PHONE: the check-in picker as a bottom sheet
   over Now, the pre-clerk's phone layout, the waiting room's five lanes,
   and the registration page. `checkin.js`, `preclerk.js`, `listing.js` and
   `room.js` are UNCHANGED by this parcel -- everything below styles their
   EXISTING markup, or lays out the two new modules (`roomlanes.js`,
   `register.js`) that paint NEW markup of their own under the `.ar-`
   prefix, per the letter's one-vocabulary rule (section 2).

   EVERY SELECTOR BEGINS `body.is-phone`, the same discipline Parcel A's
   frame keeps: take the class away and the desktop -- `.checkin`, `#room`,
   `#preclerk`, `.ci-*`, `.pc-*`, `.li-*`, `.wr-*` -- is pixel-identical to
   what it was before this file existed. Nothing here redefines a `ph-`
   rule; the `.ar-` prefix is this parcel's own, and the handful of `.wr-`
   / `.ci-` / `.pc-` / `.li-` overrides below are scoped under an id or a
   class this parcel's pages own (#room, #registerview, #checkinview,
   #preclerk), never bare.

   TOKENS, NOT LITERALS -- the house rule (see apk_frame.css's own note):
   every colour below is one of app.css's `var(--…)` tokens, so this page
   is dark on the phone today and would flip for free if the toggle ever
   reached it. */

/* ── 1 · the check-in picker, as a bottom sheet over Now ──────────────────
   `checkin.js` is not this parcel's to edit (LE-57 section 3's hard rule),
   and it paints `.ci` directly into `#checkinview` -- a plain region the
   router shows and hides like any other. So the sheet look is built on the
   EXISTING id and the EXISTING `.ci` card rather than on Parcel A's
   `.ph-veil` / `.ph-sheet` classes, which nothing in checkin.js's own
   markup carries and which this parcel cannot add without touching
   `index.html` or `checkin.js`. The declared VALUES are copied from those
   two classes verbatim (apk_frame.css, "a bottom sheet -- the check-in
   picker, and anything else that asks over a page"), so the two surfaces
   read as the same design language even though they are not, structurally,
   the same two elements.

   PREFERRED, IF THE INTEGRATOR WOULD RATHER: give `#checkinview` the
   literal classes `ph-sheet` and add a sibling `<div class="ph-veil"
   hidden>` that app.js shows and hides in lockstep with it (index.html and
   app.js are the integrator's own files). Nothing below breaks if that is
   done instead -- an id selector and a class selector setting the same
   properties is a harmless duplicate, not a conflict. Until then, this
   fragment is what makes the picker read as a sheet. */
body.is-phone #checkinview {
  /* STARTS UNDER THE BAR, WHATEVER THE BAR'S HEIGHT: the router measures
     #spine on every paint and writes it to --spine-h (99px, or 145 with a
     patient), so the sheet can never paint over the bar's own text -- which
     a sheet fixed at the top did, at every size, in the whole-app render of
     10 September. The veil beneath still covers the bar. */
  position: fixed; inset: var(--spine-h, 0px) 0 0 0; z-index: 51;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; background: transparent;
}
/* the veil -- a pseudo-element rather than a second real node, because
   this parcel draws no new markup into a file it does not own */
body.is-phone #checkinview::before {
  content: ""; position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 9, 10, 0.62);
}
body.is-phone #checkinview .ci {
  position: relative; z-index: 51; width: 100%;
  max-height: calc(100% - 16px);   /* the bar is outside this box now, so only the handle's own headroom */
  margin: 0; padding: 10px 12px calc(14px + var(--safe-b));
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(79, 214, 200, 0.2); border-bottom: 0;
  background: var(--panel-2); box-shadow: var(--z2);
}
/* a decorative grab handle, the sheet's own affordance -- CSS content, so
   no new element is needed for it either */
body.is-phone #checkinview .ci::before {
  content: ""; align-self: center; order: -1;
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(79, 214, 200, 0.25); flex: 0 0 auto;
}
/* ONE REGION SCROLLS INSIDE THE SHEET: the groups of places, never the
   sheet itself. `.ci-head`, `.ci-status` stay put above and below it. */
body.is-phone #checkinview .ci-head,
body.is-phone #checkinview .ci-status { flex: 0 0 auto; }
body.is-phone #checkinview .ci-cols {
  grid-template-columns: 1fr; overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; min-height: 0;
}
body.is-phone #checkinview .ci-cols::-webkit-scrollbar { display: none; }
/* THE EXPLANATORY PARAGRAPH IS THE DRAWER'S, not the sheet's -- a compact
   sheet reached with one tap needs the places, not a paragraph about them;
   the same sentence is still on the desktop's drawer underneath it. */
body.is-phone #checkinview .ci-foot { display: none; }

/* ── 2 · the pre-clerk's phone layout ──────────────────────────────────────
   `preclerk.js` and `listing.js` are unchanged; the theatre list, the
   progress bar, the ticks and Add a task are exactly their own markup
   (`.pc-*`, `.li-*`), sized here for a thumb rather than a mouse. */
body.is-phone #preclerk { padding: 8px 12px; overflow-y: auto; }
body.is-phone #preclerk .pc-head { padding-top: 2px; }
body.is-phone #preclerk .pc-t { font-size: 16px; }
body.is-phone #preclerk .pc-row { padding: 10px 0; }
body.is-phone #preclerk .pc-line { font-size: 13px; }
body.is-phone #preclerk .pc-who,
body.is-phone #preclerk .pc-list .pc-task-t {
  min-height: var(--tap); display: inline-flex; align-items: center;
}
/* a checkbox glyph alone is well under the 44px floor -- the tap area
   grows around it without moving the glyph off its baseline */
body.is-phone #preclerk .pc-tick {
  min-width: var(--tap); min-height: var(--tap); font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
body.is-phone #preclerk .pc-task { align-items: center; }
body.is-phone #preclerk .li-in,
body.is-phone #preclerk .li-in-d { min-height: var(--tap); font-size: 14px; }
body.is-phone #preclerk .li-form { gap: 8px; }

/* ── 3 · the waiting room's five lanes (roomlanes.js) ──────────────────────
   `#room` is the existing section; on a phone the integrator seats
   `paintRoomLanes` into it instead of `paintRoom` (this parcel's message,
   §3). Every ROW below is `personRow`'s own `.wr-*` markup, unchanged --
   only the band chrome and a couple of tap targets are this file's. */
body.is-phone #room { padding: 8px 12px; }
body.is-phone .ar-room-title {
  display: flex; align-items: baseline; gap: 10px; height: var(--tap);
  flex: 0 0 auto;
}
body.is-phone .ar-room-t { font-size: 18px; font-weight: 600; color: #ffffff; }
body.is-phone .ar-room-n { font-size: 11px; color: var(--dim); }
body.is-phone .ar-lanes { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; }
/* `.ph-band` / `.ph-band-h` are Parcel A's own (apk_frame.css); `.ar-lane`
   and `.ar-lane-h` add nothing that rule does not already draw -- they are
   hooks for the two phone-only tweaks below, not a second definition of
   the band's look. */
body.is-phone .ar-lane-h { text-transform: uppercase; }
body.is-phone .ar-lane-b { display: flex; flex-direction: column; padding: 0 2px; }
/* THE ROOM'S OWN ROWS, sized for a thumb. `.wr-acts .btn` already meets
   --tap through app.css's base `.btn` rule; what does not is the type
   picker, which has no min-height of its own outside the desktop's
   compact corners (`.dk-lights` / `.dk-quad`), neither of which wraps
   #room on the phone. */
body.is-phone #room .wr-row { padding: 8px 4px; }
body.is-phone #room select.wr-type { min-height: var(--tap); font-size: 13px; padding: 4px 8px; }
body.is-phone #room .wr-acts { gap: 8px; }
body.is-phone #room .wr-new { display: none; } /* the walk-in lives on its own page here (register.js) */

/* ── 4 · the registration page (register.js) ───────────────────────────────
   `walkInForm` is room.js's own, hosted whole; the assisted card and the
   Singpass section are this parcel's, under `.ar-`. */
body.is-phone #registerview { padding: 0; }
body.is-phone .ar-register {
  display: flex; flex-direction: column; gap: 12px; padding: 8px 12px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* THE TYPED FORM'S OWN FIELDS, sized for a thumb -- the desktop's compact
   corners (`.dk-lights` / `.dk-quad`) do not reach this page, so nothing
   here shrinks anything the desktop relies on. */
body.is-phone #registerview .wr-form { gap: 10px; align-items: stretch; }
body.is-phone #registerview .wr-in,
body.is-phone #registerview select.wr-type,
body.is-phone #registerview select { min-height: var(--tap); font-size: 14px; padding: 0 12px; }
body.is-phone #registerview .wr-walkin { display: flex; flex-direction: column; gap: 8px; }

body.is-phone .ar-dob-hint { margin-top: -2px; }

body.is-phone .ar-assist,
body.is-phone .ar-singpass { display: flex; flex-direction: column; gap: 8px; }
/* THE "SAY IT" AND "SCAN SINGPASS" CONTROLS read as full-width rows in the
   mock (a name-sized chip would read as decorative for an action this
   central) -- `.ph-chip.sq` still gives the corner radius, this is only
   the width and the internal alignment. */
body.is-phone .ar-say-btn,
body.is-phone .ar-nb {
  width: 100%; justify-content: flex-start; min-height: var(--tap);
  gap: 10px;
}
body.is-phone .ar-say-btn .n,
body.is-phone .ar-nb .ph-tag { margin-left: auto; }
/* recording is a state, not decoration -- a distinct tint from the plain
   `.ph-chip.on` selection highlight every chip already carries */
body.is-phone .ar-say-btn.on {
  background: rgba(224, 90, 74, 0.14); border-color: rgba(224, 90, 74, 0.45);
  color: var(--red-ink);
}
body.is-phone .ar-say-typed { display: flex; gap: 8px; }
body.is-phone .ar-say-in { flex: 1 1 auto; min-width: 0; min-height: var(--tap); font-size: 14px; }
body.is-phone .ar-say-send { flex: 0 0 auto; }
body.is-phone .ar-card { gap: 10px; }
body.is-phone .ar-heard i { color: var(--ink-2); font-style: italic; }
body.is-phone .ar-key { font-size: 12px; color: var(--teal); }
body.is-phone .ar-fixes { margin-top: 2px; }
body.is-phone .ar-tick { width: 100%; }
/* ==== apk_arrivals END — the arrivals pages (LE-57, Parcel E1) ==== */

/* ==== apk_folder BEGIN — the folder, patients, billing, tasks & settings (LE-57 Parcel E2) ==== */

/* ── the nine tiles (board 20) and one section open (board 21) ───────────── */

body.is-phone .fd-tiles { flex: 1 1 auto; min-height: 0; align-content: start; }

body.is-phone .fd-section-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The folder already marks itself as a scroll region. Let its content,
   rather than a height cutoff, decide when it needs to scroll. Shrinking
   its grid to zero lets Utilities occupy the Imaging tile's hit area. */
body.is-phone #folder:not(:has(.fd-lab-workspace)) { overflow-y: auto; }
body.is-phone #folder .fd-tiles,
body.is-phone #folder .fd-section-body:not(.fd-lab-workspace) {
  flex: 0 0 auto;
  overflow: visible;
}

/* A participating-lab workspace is a full Results page. The encounter
   launcher otherwise consumes the short phone's stage, leaving its nested
   scroller zero pixels tall. Only this open Lab page yields that launcher. */
body.is-phone:has(#folder:not([hidden]) .fd-lab-workspace) #encworkspace { display: none; }
body.is-phone .fd-lab-workspace > * { flex-shrink: 0; }
body.is-phone .fd-lab-workspace { overflow-y: auto; overflow-x: hidden; }
body.is-phone .fd-lab-workspace label { display: block; overflow-wrap: anywhere; }
body.is-phone .fd-lab-workspace select,
body.is-phone .fd-lab-workspace textarea,
body.is-phone .fd-lab-workspace button { max-width: 100%; white-space: normal; }

body.is-phone .fd-section-body .fo-h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
  padding: 6px 2px 2px;
}
body.is-phone .fd-section-body .fo-h2 { display: flex; align-items: baseline; gap: 8px; }
body.is-phone .fd-section-body .fo-h-r { margin-left: auto; color: var(--dimmer); font-size: 9px; }

body.is-phone .fd-section-body .fo-fields,
body.is-phone .fd-section-body .fo-encs,
body.is-phone .fd-section-body .fo-ms,
body.is-phone .fd-section-body .fo-films { display: flex; flex-direction: column; gap: 6px; }

body.is-phone .fd-section-body .fo-f,
body.is-phone .fd-section-body .fo-enc,
body.is-phone .fd-section-body .fo-m {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap, 44px);
  padding: 0 10px;
  border-radius: var(--r, 10px);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  min-width: 0;
}
body.is-phone .fd-section-body .fo-k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--dimmer);
  flex: 0 0 auto;
}
body.is-phone .fd-section-body .fo-v,
body.is-phone .fd-section-body .fo-enc-l,
body.is-phone .fd-section-body .fo-m-n {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.is-phone .fd-section-body .fo-enc-r,
body.is-phone .fd-section-body .fo-m-v,
body.is-phone .fd-section-body .fo-m-w {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--dim);
}
body.is-phone .fd-section-body .fo-m-off { color: var(--red-ink); font-size: 11px; }
body.is-phone .fd-section-body .fo-m-un { color: var(--amber-ink); font-size: 10px; }
body.is-phone .fd-section-body .fo-m-t { font-size: 10.5px; color: var(--dimmer); padding-left: 2px; }
body.is-phone .fd-section-body .fo-flag { color: var(--red-ink); }
body.is-phone .fd-section-body .is-gone .fo-enc-l,
body.is-phone .fd-section-body .is-off .fo-m-n { text-decoration: line-through; opacity: 0.6; }
body.is-phone .fd-section-body .fo-none,
body.is-phone .fd-section-body .fo-not,
body.is-phone .fd-section-body .fo-more {
  font-size: 12.5px;
  color: var(--dim);
  padding: 6px 2px;
}

/* the photographs (the Imaging tile): a grid of cards, not rows — a film is
   looked at, not read. The BY MODALITY chips hide a card by toggling
   `hidden` on it (phonefolder.js's own filter); `[hidden]` already means
   "gone" everywhere in this app. */
body.is-phone .fd-section-body .fo-films {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.is-phone .fd-section-body .fo-film {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  border-radius: var(--r, 10px);
  border: 1px solid var(--line);
  background: var(--sunk);
  padding: 6px;
}
body.is-phone .fd-section-body .fo-film-n { font-size: 11.5px; color: var(--ink); white-space: normal; }
body.is-phone .fd-section-body .fo-film-x { font-size: 10px; color: var(--dim); }
body.is-phone .fd-section-body .fo-film-b { min-height: var(--tap, 44px); font-size: 12px; }
body.is-phone .fd-section-body .fo-film-img { max-width: 100%; border-radius: 6px; display: block; }

/* the correction box — reached only if a caller ever opens 'bio' or
   'background' through this same drill-down. This parcel's nine tiles do
   not (see apk_folder.md); the styling costs nothing to have ready and
   keeps the read-back legible if a later tile ever reaches it. */
body.is-phone .fd-section-body .fo-fix { display: flex; flex-direction: column; gap: 8px; }
body.is-phone .fd-section-body .fo-fix-in { min-height: var(--tap, 44px); font-size: 14px; width: 100%; }
body.is-phone .fd-section-body .fo-fix-acts { display: flex; gap: 8px; }
body.is-phone .fd-section-body .fo-fix-acts .btn { min-height: var(--tap, 44px); flex: 1 1 0; }
body.is-phone .fd-section-body .fo-fix-back { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }

/* the pre-clerk listing (the Upcoming tile) — listing.js's own form */
body.is-phone .fd-section-body .fo-pre { display: flex; flex-direction: column; gap: 8px; }
body.is-phone .fd-section-body .li-in,
body.is-phone .fd-section-body .li-form .btn,
body.is-phone .fd-section-body .li-add .btn { min-height: var(--tap, 44px); }
body.is-phone .fd-section-body .li-form { display: flex; flex-wrap: wrap; gap: 6px; }
body.is-phone .fd-section-body .li-was { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }

/* ── the bill (board 23): the mock-up's own bands and rows ────────────────── */

body.is-phone .fd-money-lines { flex: 1 1 auto; min-height: 0; }

/* ── patients.js, unchanged, phone-sized (board 22) ───────────────────────── */

body.is-phone #patients { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 6px; min-height: 0; }
body.is-phone #patients .pt-head { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
body.is-phone #patients .pt-t { font-size: 18px; font-weight: 600; color: var(--ink); }
body.is-phone #patients .pt-note { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); }
body.is-phone #patients .pt-form { display: flex; gap: 8px; flex: 0 0 auto; }
body.is-phone #patients .pt-in { flex: 1 1 auto; min-width: 0; min-height: var(--tap, 44px); font-size: 14px; }
body.is-phone #patients .pt-form .btn { min-height: var(--tap, 44px); flex: 0 0 auto; }
body.is-phone #patients .pt-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.is-phone #patients .pt-list::-webkit-scrollbar { display: none; }
body.is-phone #patients .pt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap, 44px);
  padding: 0 10px;
  border-radius: var(--r, 10px);
  border: 1px solid var(--line);
  background: var(--sunk);
  min-width: 0;
}
body.is-phone #patients .pt-who {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--ink);
}
body.is-phone #patients .pt-key { font-size: 10px; color: var(--dim); flex: 0 0 auto; }
body.is-phone #patients .pt-tag {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--amber-ink);
  flex: 0 0 auto;
}
body.is-phone #patients .pt-n,
body.is-phone #patients .pt-when { font-family: var(--mono); font-size: 10px; color: var(--dim); flex: 0 0 auto; }
body.is-phone #patients .pt-none { padding: 10px 2px; color: var(--dim); font-size: 13px; }
body.is-phone #patients .is-retired { opacity: 0.7; border-style: dashed; }

/* ── tasks.js, unchanged, phone-sized ──────────────────────────────────────── */

body.is-phone #tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
body.is-phone #tasks::-webkit-scrollbar { display: none; }
body.is-phone #tasks .tk-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
body.is-phone #tasks .tk-t { font-size: 16px; font-weight: 600; color: var(--ink); }
body.is-phone #tasks .tk-n { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); }
body.is-phone #tasks .tk-late { color: var(--red-ink); font-size: 12.5px; }
body.is-phone #tasks .tk-tray { font-size: 12px; color: var(--amber-ink); }
body.is-phone #tasks .tk-group { display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 11.5px; color: var(--dim); }
body.is-phone #tasks .tk-g-l { display: flex; align-items: center; gap: 6px; }
body.is-phone #tasks .tk-g-n { margin-left: auto; font-family: var(--mono); }
body.is-phone #tasks .tk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap, 44px);
  padding: 6px 4px;
  border-top: 1px solid var(--line-soft);
  min-width: 0;
}
body.is-phone #tasks .tk-tick {
  min-width: var(--tap, 44px);
  min-height: var(--tap, 44px);
  font-size: 18px;
  text-align: center;
  flex: 0 0 auto;
}
body.is-phone #tasks .tk-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.is-phone #tasks .tk-what { font-size: 13.5px; color: var(--ink); }
body.is-phone #tasks .tk-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
body.is-phone #tasks .tk-body.tk-line { flex-direction: row; align-items: center; gap: 6px; }
body.is-phone #tasks .tk-key,
body.is-phone #tasks .tk-from,
body.is-phone #tasks .tk-due,
body.is-phone #tasks .tk-tag { font-size: 10px; color: var(--dim); }
body.is-phone #tasks .tk-due.is-late { color: var(--red-ink); }
body.is-phone #tasks .is-late .tk-what { color: var(--red-ink); }
body.is-phone #tasks .tk-none { padding: 10px 2px; color: var(--dim); font-size: 13px; }
body.is-phone #tasks .tk-ns { padding-top: 4px; }

/* ── settings.js, unchanged, phone-sized ───────────────────────────────────── */

body.is-phone #settingsview,
body.is-phone #doctorinfo,
body.is-phone #clinicinfo,
body.is-phone #performance,
body.is-phone #auditview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
body.is-phone #settingsview::-webkit-scrollbar,
body.is-phone #doctorinfo::-webkit-scrollbar,
body.is-phone #clinicinfo::-webkit-scrollbar,
body.is-phone #performance::-webkit-scrollbar,
body.is-phone #auditview::-webkit-scrollbar { display: none; }

body.is-phone .st-head { flex: 0 0 auto; }
body.is-phone .st-t { font-size: 18px; font-weight: 600; color: var(--ink); }
body.is-phone .st-sub { font-size: 12px; color: var(--dim); }
body.is-phone .st-menu { display: flex; flex-direction: column; gap: 6px; }
body.is-phone .st-menu-row { display: flex; flex-wrap: wrap; gap: 6px; }
body.is-phone .st-menu-chip {
  min-height: var(--tap, 44px);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sunk);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink);
}
body.is-phone .st-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r, 10px);
  border: 1px solid var(--line);
  background: var(--panel);
}
body.is-phone .st-card-t { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
body.is-phone .st-card-foot { font-size: 10.5px; color: var(--dim); }
body.is-phone .st-field { display: flex; align-items: baseline; gap: 8px; min-height: 32px; flex-wrap: wrap; }
body.is-phone .st-field-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--dimmer); flex: 0 0 auto; }
body.is-phone .st-field-v { font-size: 13px; color: var(--ink); }
body.is-phone .st-banner { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--r, 10px); background: var(--panel); border: 1px solid var(--line); }
body.is-phone .st-banner-l { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dim); }
body.is-phone .st-banner-v { font-size: 15px; color: var(--ink); }
body.is-phone .st-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
body.is-phone .st-tab {
  min-height: var(--tap, 44px);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sunk);
  font-size: 12.5px;
  color: var(--dim);
}
body.is-phone .st-tab.is-active { color: var(--teal); border-color: rgba(79,214,200,0.5); background: rgba(79,214,200,0.14); }
body.is-phone .st-line { font-family: var(--mono); font-size: 12px; color: var(--ink); padding: 3px 2px; }
body.is-phone .st-line-gap { height: 6px; }
body.is-phone .st-verdict { padding: 10px 12px; border-radius: var(--r, 10px); border: 1px solid var(--line); background: var(--panel); }
body.is-phone .st-verdict-h { font-size: 14px; color: var(--ink); }
body.is-phone .st-counts { font-size: 11.5px; color: var(--dim); }
body.is-phone .st-section-t { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--dim); padding-top: 6px; }
body.is-phone .st-sim { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 12.5px; }
body.is-phone .st-sim-n { flex: 1 1 auto; min-width: 0; }
body.is-phone .st-finding { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
body.is-phone .st-finding-w { font-size: 12px; }
body.is-phone .st-finding-what { font-size: 13px; color: var(--ink); }
body.is-phone .st-more,
body.is-phone .st-none { font-size: 12.5px; color: var(--dim); padding: 6px 2px; }

/* the everything-else row: the shared row class used as a button here
   (elsewhere it is a `<div>`, so it carries no button reset of its own) —
   appended after the settings menu paints, see apk_folder.md */
body.is-phone .fd-everything-else {
  width: 100%;
  background: none;
  border: 0;
  border-top: 1px solid var(--line-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin-top: 6px;
}

/* ==== apk_folder END — the folder, patients, billing, tasks & settings (LE-57 Parcel E2) ==== */


/* ── fb2_util.css — the three utility planes (LE-58, Parcel U) ── */
/* A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the eight
   files the integrator alone touches (LE-37); this text is folded into it
   under the marker line above and is bounded at BOTH ends, because a block
   left to trail off at EOF joins whatever parcel came last — LE-48's own
   lesson, which cost `verify_console_chatenc` a red run.

   WHERE IT GOES: anywhere among the desktop blocks, and NOT after the last
   chat marker. It reads tokens only and defines none, so
   `verify_theme_contrast.py`, which parses both palettes out of app.css,
   has nothing new to weigh; every colour below is a var() that already
   exists in the dark palette and is already repainted in the day one.

   IT STYLES ONLY WHAT app/utility.js DRAWS. Every selector is prefixed
   `ut-`, and the two shared classes it leans on — `.mono` and `.tappable` —
   are app.css's own and are not touched here.

   THE PAGE NEVER SCROLLS. The plane is fixed over the encounter grid at the
   depth ladder's z2 — the same plane the body map opens on — and the CARD
   scrolls inside itself, exactly as `.map-plane-card` does. Nothing here
   makes the page longer. */

.ut-plane {
  position: fixed; inset: 0; z-index: 54;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(4,9,10,0.72);
}
.ut-card {
  width: min(820px, 100%); max-height: 92vh;
  display: flex; flex-direction: column;
  border-radius: 16px; background: rgba(7,15,16,0.98);
  border: 1px solid rgba(79,214,200,0.22); box-shadow: var(--z2);
  overflow: hidden;
}
/* EACH UTILITY ASKS FOR A DIFFERENT MEASURE, and the card's own kind class
   is where that is said. A précis is a page of monospaced prose and reads
   badly across 820px; a trend is four columns and wants the width; a
   medication review sits between them, its alert sentences wrapping under
   each drug. Three contents, three measures — not one width and a shrug. */
.ut-card.ut-summary   { width: min(700px, 100%); }
.ut-card.ut-trend     { width: min(880px, 100%); }
.ut-card.ut-medreview { width: min(780px, 100%); }
.ut-card.dk-memo-card { width: min(980px, 100%); }
.dk-memo-body { overflow: auto; }

.ut-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.ut-i  { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.ut-ht { flex: 1 1 auto; min-width: 0; }
.ut-t  { font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
         color: var(--ink-2); }
.ut-s  { font-size: 11px; color: var(--dim); margin-top: 2px; }
.ut-back {
  flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--dim); font-family: var(--mono); font-size: 11px;
  white-space: nowrap;
}
.ut-back:hover { border-color: var(--teal-2); color: var(--ink-2); }
.ut-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; }
.ut-wait { font-family: var(--mono); font-size: 11px; color: var(--dimmer); }
.ut-no   { padding: 10px 12px; border-radius: var(--r);
           border: 1px dashed rgba(224,90,74,0.35); color: var(--red-ink);
           font-size: 12.5px; }
.ut-note { margin: 0 0 10px; padding: 8px 10px; border-radius: var(--r);
           background: var(--sunk); border: 1px solid var(--line-soft);
           color: var(--dim); font-size: 11.5px; line-height: 1.5; }
.ut-h    { font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
           color: var(--dimmer); margin: 14px 0 6px; }
.ut-h:first-child { margin-top: 0; }

/* ── 📜 the summary: a PAGE, so it is set as one ───────────────────────── */
/* The précis is a document with its own layout — precis.render_lines
   indents its rows with spaces — so it is set monospaced and `pre-wrap`,
   never re-flowed. A blank line in the middle of it is the page's own
   paragraph break; collapsing it would be re-typesetting a document that
   already has a typesetter. */
.ut-lines { padding: 12px 14px; border-radius: var(--r);
            background: var(--sunk); border: 1px solid var(--line-soft); }
.ut-line  { font-size: 12px; line-height: 1.62; color: var(--ink-2);
            white-space: pre-wrap; min-height: 1em; }
.ut-line.ut-lh { color: var(--teal-2); letter-spacing: .1em; margin-top: 8px; }
.ut-lines + .tiny { display: block; margin-top: 8px; }

/* ── 📈 the trend: one row per series ──────────────────────────────────── */
.ut-series { display: flex; flex-direction: column; gap: 2px; }
.ut-row {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  grid-template-areas: "name spark fig dir" "foot foot foot foot";
  padding: 7px 8px; border-radius: var(--r);
  border-bottom: 1px solid var(--line-soft);
}
.ut-row:hover { background: var(--panel-2); }
.ut-name  { grid-area: name; min-width: 0; }
.ut-n     { display: block; font-size: 12.5px; color: var(--ink); }
.ut-q     { display: block; font-family: var(--mono); font-size: 10px;
            color: var(--dimmer); }
.ut-spark { grid-area: spark; width: 148px; height: 34px; flex: 0 0 auto;
            display: flex; align-items: center; }
.ut-svg   { width: 100%; height: 34px; display: block; overflow: visible; }
.ut-nopoints { font-family: var(--mono); font-size: 10px; color: var(--faint); }
/* THE BAND IS THE CLINIC'S RANGE, and it is drawn as ground rather than as
   a verdict: no point is coloured for being outside it. Whether a reading is
   abnormal is the folder's own word, and a red dot decided here would be a
   second opinion about a lab result. */
.ut-band     { fill: var(--teal); fill-opacity: .10; }
.ut-linepath { stroke: var(--teal-2); stroke-width: 1.2; stroke-opacity: .8;
               vector-effect: non-scaling-stroke; }
.ut-dot      { fill: var(--teal-2); fill-opacity: .75; }
.ut-dot.is-last { fill: var(--teal); fill-opacity: 1; }
.ut-fig    { grid-area: fig; text-align: right; min-width: 84px; }
.ut-latest { font-size: 12.5px; color: var(--ink); }
.ut-when   { font-size: 10px; color: var(--dimmer); }
.ut-dir    { grid-area: dir; min-width: 74px; text-align: right; }
.ut-arrow  { font-size: 14px; color: var(--dim); }
.ut-arrow.is-up   { color: var(--amber); }
.ut-arrow.is-down { color: var(--teal); }
/* ONE READING IS A NUMBER. It is said in words rather than drawn as a flat
   arrow, because a flat arrow is a direction and there is not one. */
.ut-once   { font-family: var(--mono); font-size: 9.5px; color: var(--faint);
             letter-spacing: .06em; }
.ut-rowfoot { grid-area: foot; display: flex; flex-wrap: wrap; gap: 10px;
              padding-top: 2px; }
.ut-range  { font-size: 10px; color: var(--dimmer); }
.ut-skip   { font-size: 10px; color: var(--faint); }

/* ── 💊 the review ─────────────────────────────────────────────────────── */
.ut-allergy {
  padding: 7px 11px; border-radius: 999px; align-self: flex-start;
  display: inline-block; margin-bottom: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--dim);
}
/* KNOWN AND NOT NONE is the only state that shouts. NKDA and NOT ON FILE are
   different facts and neither is an alarm — one is an answer, the other is a
   silence, and the plane says which in words above the list. */
.ut-allergy.has { border-color: rgba(224,90,74,0.45);
                  background: rgba(224,90,74,0.12); color: var(--red-ink); }
.ut-meds { display: flex; flex-direction: column; gap: 6px; }
.ut-med  { padding: 8px 10px; border-radius: var(--r);
           background: var(--sunk); border: 1px solid var(--line-soft); }
.ut-med.is-gone { opacity: .62; }
.ut-med.is-gone .ut-med-i { text-decoration: line-through; }
.ut-med-h { display: flex; align-items: baseline; gap: 10px; }
.ut-med-i { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--ink); }
.ut-med-w { flex: 0 0 auto; font-size: 10px; color: var(--dimmer); }
.ut-med-r { font-size: 11px; color: var(--dim); margin-top: 2px; }
/* THE ALERT SITS UNDER ITS OWN MEDICINE. A list at the foot would make him
   match a warning to a drug by reading, which is the fault the per-point
   checklist was rebuilt to remove on 3 September. */
.ut-alert { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
            margin-top: 6px; padding: 6px 8px; border-radius: 8px;
            border: 1px solid rgba(224,164,74,0.3);
            background: rgba(224,164,74,0.08); }
.ut-alert-r { flex-basis: 100%; font-size: 11px; color: var(--dim); font-style: italic; }  /* the rule's own words, said under the alert */
.ut-alert-k { flex: 0 0 auto; font-size: 9.5px; letter-spacing: .1em;
              color: var(--amber-ink); white-space: nowrap; }
.ut-alert-t { flex: 1 1 auto; min-width: 0; font-size: 11.5px;
              color: var(--ink-2); line-height: 1.5; }
.ut-alert.is-allergy { border-color: rgba(224,90,74,0.4);
                       background: rgba(224,90,74,0.10); }
.ut-alert.is-allergy .ut-alert-k { color: var(--red-ink); }
.ut-avoid { display: flex; flex-direction: column; gap: 4px; }
.ut-av    { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
            padding: 6px 8px; border-radius: 8px;
            border-left: 2px solid rgba(224,90,74,0.45);
            background: var(--panel-2); }
.ut-av-i  { font-size: 12.5px; color: var(--ink); }
.ut-av-w  { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--dim); }
.ut-av-s  { flex: 0 0 auto; font-size: 10px; color: var(--dimmer); }
/* `basis` is the point of the screen, not small print under it. */
.ut-basis { margin-top: 14px; padding: 9px 11px; border-radius: var(--r);
            border: 1px dashed var(--line); background: var(--panel-2);
            color: var(--dim); font-size: 11.5px; line-height: 1.55; }

/* ── the day view ──────────────────────────────────────────────────────── */
/* The same two rules app.css already applies to `.map-plane` and its card:
   the raised card goes white, the scrim dims the page without going
   near-black. Everything else follows the tokens. */
:root[data-theme="day"] .ut-plane { background: rgba(23,38,36,0.42); }
:root[data-theme="day"] .ut-card  { background: #ffffff; }

/* ── narrow ────────────────────────────────────────────────────────────── */
/* The plane is desktop work, but the encounter page is reachable at any
   width and a card that overflows its own scrim is a card nobody can close.
   The sparkline gives up its fixed width first; the figure and the
   direction wrap under the name rather than squeezing the analyte's own. */
@media (max-width: 720px) {
  .ut-plane { padding: 10px; }
  .ut-row { grid-template-columns: minmax(0, 1fr) auto;
            grid-template-areas: "name fig" "spark dir" "foot foot"; }
  .ut-spark { width: 100%; }
  .ut-dir { text-align: left; }
}
/* ── end fb2_util.css ── */


/* ── fb2_mail.css — ✉ the clinic's own mailbox, under the top bar (LE-58, Parcel M) ── */
/* A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the files the
   integrator alone touches (LE-37); this text is folded in under the marker
   line above and is never loaded on its own.

   FOR THE INTEGRATOR — WHERE IT GOES. Anywhere ABOVE the chat sections, and
   NOT at end-of-file: `verify_console_chatenc` reads the chat's CSS fragment
   as "its marker to the next chat marker or EOF", so a block appended after
   the last chat marker is swallowed into that slice and trips its purity
   checks (10 September's own regression, recorded in CLAUDE.md). Next to the
   spine's own block, where `.patient-card` is, is the natural seat: this
   popover hangs off the same `position: relative` header.

   IT DECLARES NO TOKEN OF ITS OWN. Every colour, radius, font and shadow
   below is app.css's, so the day palette (`[data-theme="day"]`) follows with
   nothing to keep in step — a hard-coded `#05...` here would be a black
   popover on a white page, which is the one way this fragment could break a
   theme it never mentions. The three literal rgba() values are the ones the
   board draws and the ones `.patient-card` already uses verbatim beside it;
   they are the popover's own GROUND, and they are redefined in the day block
   at the foot for exactly that reason.

   DESKTOP ONLY, like the theme toggle. ✉ is a desktop control (Parcel B hides
   the button below the desktop width), and a 480px popover has nowhere to
   hang on a 390px phone — so below 1100px it is laid out as a sheet across
   the width instead of a card off the right edge, rather than being hidden:
   `mountMail` falls back to `document.body` where there is no spine, and a
   popover that mounted and could not be seen would be worse than one that
   was never mounted. */

.mail-pop {
  position: absolute; top: calc(100% + 6px); right: 16px; z-index: 40;
  width: min(480px, calc(100vw - 32px));
  max-height: min(70vh, 640px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px; border-radius: var(--r-l);
  background: rgba(5,12,13,0.98);
  border: 1px solid rgba(79,214,200,0.26);
  box-shadow: var(--z2);
}
/* THE BRIDGE. The popover hangs 6px below the bar; without this the pointer
   moving down into it crosses empty space and a hover-driven neighbour closes
   under it. Same `::before` the patient card grew for the same reason. */
.mail-pop::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
}

.mail-h { display: flex; align-items: baseline; gap: 10px; }
.mail-addr { font-family: var(--mono); font-size: 14px; color: var(--teal); }
.mail-tag {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--dimmer); text-align: right;
}

.mail-body { display: flex; flex-direction: column; }

.mail-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--line-soft);
}
.mail-from { flex: 0 0 150px; font-size: 14px; font-weight: 600; color: var(--ink); }
.mail-sub  { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--ink-2); }
.mail-sub-t { display: block; }
.mail-when { font-family: var(--mono); font-size: 12px; color: var(--dimmer); }
/* Unseen is BOLD, and it is not the only cue: the row keeps its ink while a
   read one dims, because weight alone is a poor signal at a glance and
   colour alone is no signal at all to some eyes. */
.mail-row.is-new .mail-sub { color: var(--ink); font-weight: 600; }
.mail-row:not(.is-new) .mail-from { color: var(--dim); font-weight: 500; }
.mail-where {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  overflow-wrap: anywhere;
}

/* An attachment, and the way to file it. */
.mail-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px 160px; }
.mail-att {
  display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0;
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--hush); background: var(--sunk);
}
.mail-att-n {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink-2);
  overflow-wrap: anywhere;
}
.mail-file { flex: 0 0 auto; }
.mail-reply { flex: 0 0 auto; }
/* Not a verified sender (28 Nov): shown, never filed from here. */
.mail-unverified {
  flex: 1 1 auto; min-width: 0; padding: 6px 8px; border-radius: 6px;
  border: 1px dashed var(--hush); color: var(--dim); overflow-wrap: anywhere;
}

/* The ask-twice boxes — filing one attachment, and composing. Same shape as
   folder.js's `.fo-fix`, because it is the same gesture: type it, Check it,
   read it back, Confirm. */
.mail-fix, .mail-compose {
  margin: 6px 0 8px; padding: 9px 10px;
  border: 1px solid var(--rule); border-radius: var(--r);
  display: flex; flex-direction: column; gap: 6px;
}
.mail-fix-h {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim);
}
.mail-f { display: flex; align-items: baseline; gap: 10px; }
.mail-f-k {
  flex: 0 0 84px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--dimmer);
}
.mail-in {
  flex: 1 1 auto; min-width: 0;
  padding: 7px 9px; border-radius: 6px; border: 1px solid var(--rule);
  background: transparent; color: inherit; font: inherit; font-size: 13px;
}
.mail-in:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
textarea.mail-text { resize: vertical; min-height: 44px; font-family: var(--display); }
.mail-fix-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* THE READ-BACK. It is the door's sentence, and it is drawn as the one thing
   in the box that is not a control — nothing reaches a folder, or leaves the
   clinic, from a screen of ticks alone. */
.mail-back {
  font-size: 13px; line-height: 1.45; color: var(--amber-ink);
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid #4d3c22; background: var(--panel);
}
.mail-said {
  font: 500 12px/1.5 var(--mono); margin-top: 4px;
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--hush); color: var(--dim); background: var(--panel);
}
.mail-said.ok { color: var(--teal); border-color: var(--rule); }
.mail-said.no { color: var(--amber); border-color: #4d3c22; }
/* What the door said about the act he just confirmed, kept OUTSIDE the box
   that asked so the re-read it triggers cannot wipe it. */
.mail-done {
  font: 500 12px/1.5 var(--mono); margin-bottom: 6px;
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--rule); color: var(--teal); background: var(--panel);
}

/* Not linked, and unreachable: the sentence is the door's. */
.mail-none {
  padding: 10px 0; font-size: 13px; line-height: 1.5; color: var(--dim);
  display: flex; flex-direction: column; gap: 6px;
}
.mail-none-t { font-size: 14px; font-weight: 600; color: var(--amber-ink); }
.mail-none-d { color: var(--dim); }
.mail-settings { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-set {
  font-family: var(--mono); font-size: 11.5px; color: var(--teal);
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--sunk);
}

.mail-foot {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.mail-foot .tiny { flex: 1 1 200px; min-width: 0; }
.mail-new[disabled] { opacity: 0.45; cursor: default; }

/* Below the desktop width the popover is a sheet across the page rather than
   a 480px card hanging off an edge that is not there. */
@media (max-width: 1099px) {
  .mail-pop {
    position: fixed; top: auto; left: 8px; right: 8px; bottom: 8px;
    width: auto; max-height: 78vh;
  }
  .mail-from { flex-basis: 100%; }
  .mail-acts { padding-left: 0; }
}

/* DAY VIEW. Only the grounds and the two borders that were literal above are
   repainted; every other rule reads a token and follows on its own. */
[data-theme="day"] .mail-pop {
  background: #ffffff;
  border-color: rgba(11,114,102,0.24);
}
[data-theme="day"] .mail-back { border-color: #d8bd86; }
[data-theme="day"] .mail-said.no { border-color: #d8bd86; }
/* ── end fb2_mail.css ── */


/* =========================================================================
   fb2_spine.css — LE-58 Parcel B, the top bar drawn a third time (Dr Lau,
   10 September evening, point 2; board design/Fb2Topbar.dc.html, accepted).

   FOR THE INTEGRATOR — WHERE THIS GOES. Fold it into app/app.css directly
   AFTER the `fb_spine` block (LE-49's), and still ABOVE the chat markers.
   NOT at EOF: verify_console_chatenc reads the chat fragment as ITS MARKER
   TO THE NEXT CHAT MARKER OR EOF, so anything appended at the end of the
   file joins that parcel and trips its purity checks.

   AFTER fb_spine RATHER THAN INSTEAD OF IT. This parcel OVERRIDES rather
   than duplicates: `.pill-place .pk` and the whole record control stay
   LE-49's, and only what his second feedback moved is written again here.
   Two selectors below deliberately restate a rule app.css already has —
   `.pc-k` and `.pc-v` — because app.css defines `.pc-row` twice (the
   patient card's at ~202 and the pre-clerk screen's at ~1085) and the
   later one already reaches this card. Later wins on equal specificity, so
   this block must sit after both; it does.

   EVERY VALUE IS THE BOARD'S, AND THE BOARD'S ARE app.css's — colours
   through the existing tokens so the day theme follows and
   verify_theme_contrast keeps measuring the palette it already measures.

   SIZES ARE TODAY'S, NOT THE BOARD'S. The board is drawn at the stepped-up
   scale (LE-58 §1: base 10pt), and the type scale is the integrator's and
   is done LAST, over the whole stylesheet. Nothing here is padded for it.
   The ONE size that moves on its own account is the registration number:
   it was a 10px caption beside a 16px name, and it is the bar's primary
   identity now, so it takes the name's role at 12px — today's band, which
   the integrator's mapping steps with everything else.
   ========================================================================= */
/* ==== fb2_spine BEGIN — the top bar, third drawing (LE-58 Parcel B) ==== */

/* ── the patient, by number ─────────────────────────────────────────────
   The number leads: it is what the desk, the bill and the letter carry.
   The dotted underline is the name's old affordance, moved with the job —
   it says "there is more under this" without making a pill look like a
   button that navigates. */
.pill-reg {
  background: rgba(79,214,200,0.10); border-color: rgba(79,214,200,0.34);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  border-bottom: 1px dotted rgba(79,214,200,0.6);
  cursor: help;
}
.pill-reg:hover, .pill-reg:focus-visible { background: rgba(79,214,200,0.16); }
.pill-reg:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* the pass's own line, beside the number rather than under a name */
.spine .patient-sub { color: var(--ink-2); }

/* ── ✉ the clinic's own mailbox ─────────────────────────────────────────
   Quiet with nothing waiting, amber with something — the appointment
   line's own vocabulary in the same bar, so two things that both mean
   "somebody is waiting for you" do not read as two different systems. */
.pill-mail {
  background: rgba(79,214,200,0.06); color: var(--dim);
  cursor: pointer; font: inherit; font-family: var(--mono);
  font-size: 10px; letter-spacing: .08em;
}
.pill-mail:hover { border-color: var(--teal-2); }
.pill-mail:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pill-mail.has {
  border-color: rgba(224,164,74,.45); color: var(--amber-ink);
  background: rgba(224,164,74,.08);
}
.pill-mail .mg { font-size: 11px; line-height: 1; }
.pill-mail .mn { color: var(--teal); font-weight: 600; }
.pill-mail.has .mn { color: var(--amber); }
/* IT FOLDS TO ITS GLYPH AND ITS COUNT with a patient on the bar. Measured:
   the spine with a patient on it came to 1560px against 1440, and the word
   is the part that carries no information the count does not. The whole
   sentence stays in the button's own title. */
.spine.has-patient .pill-mail .mw { display: none; }

/* ── 📅 what a close still owes, carried onto every screen (5 Oct) ───────
   Dr Lau: "carry the owed date onto the next screen". Amber, because it is
   an answer somebody is waiting on -- the mail pill's own vocabulary for
   that. It names no patient (owed.js); the questions open over the page. */
.pill-owed {
  background: rgba(224,164,74,.10); border-color: rgba(224,164,74,.5);
  color: var(--amber-ink); cursor: pointer; font: inherit; font-family: var(--mono);
  font-size: 10px; letter-spacing: .08em;
}
.pill-owed:hover { border-color: var(--amber); }
.pill-owed:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.pill-owed .og { font-size: 11px; line-height: 1; }
.pill-owed .on { color: var(--amber); font-weight: 600; }
[data-theme="day"] .pill-owed .on { color: var(--amber-ink); }
/* THE WORD FOLDS WHERE THE MAIL'S DOES: beside a patient, and on a desktop
   narrower than the bar needs. The count stays; the sentence is the title. */
@media (min-width: 1100px) {
  .spine.has-patient .pill-owed .ow { display: none; }
}
@media (min-width: 1100px) and (max-width: 1535px) {
  .spine .pill-owed .ow { display: none; }
}
.ut-card.ut-owed { width: min(560px, 100%); }
.owed-body { overflow: auto; }
.owed-one { padding: 10px 0 2px; border-top: 1px solid var(--rule); }
.owed-one:first-child { border-top: 0; padding-top: 0; }
.owed-who { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.owed-name { font-weight: 600; color: var(--ink); }
.owed-mrn { font-size: 11px; color: var(--teal); letter-spacing: .04em; }
.owed-what { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.owed-none { color: var(--dim); }

/* ── the who-line drops SIGNED IN with a patient on the bar ─────────────
   Two spans, and the separator travels with the first, so what is left
   reads "DOCTOR ▸" rather than "· DOCTOR ▸". */
.spine.has-patient .who-sub .wl-in { display: none; }

/* ── THE CARD THAT STAYS ────────────────────────────────────────────────
   His point 2, and the whole of why it was elusive: the card hangs 6px
   below the bar, and the pointer moving DOWN into it left the number and
   closed the thing it was reaching for. Three parts, and the other two are
   spine.js's (it holds itself open on `mouseenter`, and closes on a ~150ms
   grace). THIS is the third: there is no gap to fall through at all.

   THE BRIDGE IS 8px FOR A 6px GAP, and no more. It is an invisible strip
   above the card, and it sits in the spine's own bottom padding — the
   controls end well above it — so nothing on the bar loses a click to it.
   It exists only while the card is `.on`; `.patient-card` is `display:
   none` otherwise and paints no pseudo-element. */
.patient-card.on::before {
  content: ""; position: absolute; left: 0; right: 0;
  top: -8px; height: 8px;
}

/* the head: who this is, with the allergy beside the name */
.pc-h {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 2px;
}
.pc-name { font-family: var(--display); font-size: 15px; font-weight: 600;
  color: #fff; white-space: nowrap; }
.pc-h .pill { font-size: 10px; }
.pc-pin { margin-left: auto; font-family: var(--mono); font-size: 9px;
  letter-spacing: .12em; color: var(--teal); }

/* the rows. The key column is wider than app.css's 96px because "Date of
   birth" and "Next of kin" wrap at that width once the labels are the
   chart's own rather than this card's four. */
.patient-card .pc-k { width: 104px; font-family: var(--mono);
  letter-spacing: .04em; text-transform: uppercase; }
.patient-card .pc-v { color: var(--ink-2); }
.patient-card .pc-v.payor { color: var(--amber-ink); }

/* the foot: the way into the folder, the pin, and how it closes */
.pc-acts { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; }   /* #1303: the phone card's quick acts */
.pc-kicker { font-size: 11px; letter-spacing: .06em; color: var(--dim); padding-top: 8px; }
.pc-shelves { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 0; }
.pc-shelf { min-height: 44px; text-align: left; padding: 6px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--teal); font: inherit; font-size: 13px; cursor: pointer; }

/* THE PHONE'S PATIENT CARD IS THE PAGE (29 Nov, #1303, board PatientCard):
   the head and the act row stay, only the tiles scroll. Phone only. */
@media (max-width: 1099px) {
  body.is-phone .patient-card.pc-phone.on { position: fixed; top: var(--spine-h, 96px); left: 0; right: 0; bottom: 0;
    width: auto; z-index: 55; border-radius: 0; padding: 10px 12px; overflow: hidden; gap: 6px; }
  body.is-phone .patient-card.pc-phone.on::before { display: none; }
  body.is-phone .pc-phone .pcp-who { flex: none; display: flex; flex-direction: column; gap: 4px; }
  body.is-phone .pc-phone .pc-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
  body.is-phone .pc-phone .pc-v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  body.is-phone .pc-phone .pcp-acts { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
  body.is-phone .pcp-act, body.is-phone .pcp-show, body.is-phone .pcp-call { min-height: 44px; min-width: 44px; padding: 0 10px;
    border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--teal);
    font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap; text-decoration: none; flex: none; }
  body.is-phone .pcp-act.is-off { color: var(--dim); opacity: .6; cursor: default; }
  body.is-phone .pcp-said { flex-basis: 100%; font-size: 12px; color: var(--dim); }
  body.is-phone .pcp-said:empty { display: none; }
  body.is-phone .pc-phone .pcp-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
  body.is-phone .pcp-tiles { grid-template-columns: 1fr 1fr 1fr; }
  body.is-phone .pcp-tile { position: relative; display: flex; align-items: center; min-width: 0; font-size: 12.5px; padding-right: 24px; }
  body.is-phone .pcp-tl { min-width: 0; overflow-wrap: break-word; }
  body.is-phone .pcp-n { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
  body.is-phone .pcp-n.is-unread { color: var(--amber-ink); }
  body.is-phone .pcp-warn { font-size: 12px; color: var(--amber-ink); }
  body.is-phone .pcp-idwrap { display: flex; flex-direction: column; gap: 2px; }
}
@media (max-width: 380px) { body.is-phone .pcp-tiles { grid-template-columns: 1fr 1fr; } }
/* THE FOLDER ON A PHONE, TABBED (29 Nov, #1304): the tabs a strip of their
   own that swipes sideways, a fade with › at the right edge; the page does
   not scroll, only the tab's own list. Phone only. */
@media (max-width: 1099px) {
  body.is-phone #folder.ph-tabbed .fv-bar { flex-wrap: wrap; }
  body.is-phone #folder.ph-tabbed .fv-bar .fv-tabs.fv-tabs-one { order: 9; flex: 1 1 100%; min-width: 0; overflow-x: auto;
    scrollbar-width: none; gap: 4px; padding-bottom: 2px; }
  body.is-phone #folder.ph-tabbed .fv-tabs .fv-tab { min-height: 44px; min-width: 44px; flex: none; padding: 0 12px; }
  body.is-phone #folder.ph-tabbed .fv-tab-grip, body.is-phone #folder.ph-tabbed .fv-tabhint { display: none; }
  body.is-phone #folder.ph-tabbed .fv-tabs::after { content: "\203A"; position: sticky; right: 0; flex: none; align-self: stretch;
    display: flex; align-items: center; padding: 0 6px 0 22px; color: var(--teal); font-size: 20px;
    background: linear-gradient(to right, transparent, var(--bg) 60%); pointer-events: none; }
}
/* EACH FOLDER TAB'S CONTENTS ON A PHONE (Dr Lau, 2 Dec 2026: the tabbed
   folder stays on the phone; #1304's boards). The page never scrolls: the
   folder is a column -- its bar and tab strip, the tab's own list (the one
   region that scrolls), and the tab's foot of actions (phonefoldertabs.ts).
   A board's left column of filters becomes one strip that swipes sideways;
   every control is a finger's size; nothing is pushed past the right edge.
   The boards and every rule are folder.ts's and their own. Phone only. */
@media (max-width: 1099px) {
  body.is-phone #folder.ph-tabbed { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
  body.is-phone #folder.ph-tabbed .fv-bar { height: auto; flex: none; row-gap: 4px; }
  body.is-phone #folder.ph-tabbed .fv-bar .mrp-btn, body.is-phone #folder.ph-tabbed .fv-bar .fv-sec-k, body.is-phone #folder.ph-tabbed .fv-bar .fv-tabmore-b, body.is-phone #folder.ph-tabbed .fv-bar .fv-close { min-height: 44px; min-width: 44px; }
  body.is-phone #folder.ph-tabbed .fv-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  body.is-phone #folder.ph-tabbed .fv-panes { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body.is-phone #folder.ph-tabbed .fv-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  body.is-phone #folder.ph-tabbed .fv-pane * { max-width: 100%; min-width: 0; }
  body.is-phone #folder.ph-tabbed .fv-pane .nb, body.is-phone #folder.ph-tabbed .fv-pane .ivb-wrap, body.is-phone #folder.ph-tabbed .fv-pane .mdb-body, body.is-phone #folder.ph-tabbed .fv-pane .mcb, body.is-phone #folder.ph-tabbed .fv-pane .dt-wrap,
  body.is-phone #folder.ph-tabbed .fv-pane .fv-notes { display: flex; flex-direction: column; width: auto; grid-template-columns: none; }
  body.is-phone #folder.ph-tabbed .fv-pane .fv-rail, body.is-phone #folder.ph-tabbed .fv-pane .fv-main, body.is-phone #folder.ph-tabbed .fv-pane .ivb-main, body.is-phone #folder.ph-tabbed .fv-pane .mdb-main, body.is-phone #folder.ph-tabbed .fv-pane .mcb-main { width: auto; flex: none; }
  /* the boards' left columns of filters: one strip that swipes */
  body.is-phone #folder.ph-tabbed .fv-pane .ivb-kinds, body.is-phone #folder.ph-tabbed .fv-pane .mdb-side, body.is-phone #folder.ph-tabbed .fv-pane .mcb-side, body.is-phone #folder.ph-tabbed .fv-pane .dt-side {
    display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; width: auto; height: auto;
    max-width: none; flex: none; scrollbar-width: none; padding: 4px 0; align-items: stretch; }
  body.is-phone #folder.ph-tabbed .fv-pane .ivb-kinds > *, body.is-phone #folder.ph-tabbed .fv-pane .mdb-side > *, body.is-phone #folder.ph-tabbed .fv-pane .mcb-side > *, body.is-phone #folder.ph-tabbed .fv-pane .dt-side > * { flex: none; width: auto; max-width: none; white-space: nowrap; }
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] > div, body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .ivb-kind-list, body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .ivb-files,
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .mdb-scope { display: contents; }
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .ivb-kinds-h, body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .ivb-kinds-t, body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .mdb-k,
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] .mcb-k, body.is-phone #folder.ph-tabbed .fv-pane .mdb-fold, body.is-phone #folder.ph-tabbed .fv-pane .mcb-fold, body.is-phone #folder.ph-tabbed .fv-pane .mdb-grip { display: none; }
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] { min-height: 0; max-height: 60px; align-items: center; border-right: 0; }
  body.is-phone #folder.ph-tabbed .fv-pane [data-hscroll] button { width: auto; flex: none; gap: 6px; padding: 0 12px; }
  body.is-phone #folder.ph-tabbed .fv-bar { gap: 4px; }
  body.is-phone #folder.ph-tabbed .fv-bar > :not(.fv-tabs) { margin: 0; flex: none; }
  body.is-phone #folder.ph-tabbed .fv-bar .mrp-btn { padding: 0 8px; flex: 0 1 auto; min-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.is-phone #folder.ph-tabbed .fv-pane .ivb-fold, body.is-phone #folder.ph-tabbed .fv-pane .nb-fold, body.is-phone #folder.ph-tabbed .fv-pane .fv-enc-head, body.is-phone #folder.ph-tabbed .fv-pane .fv-enc-h, body.is-phone #folder.ph-tabbed .fv-pane .ivb-grip, body.is-phone #folder.ph-tabbed .fv-pane .nb-grip { display: none; }
  /* every control a finger's size */
  body.is-phone #folder.ph-tabbed .fv-pane button, body.is-phone #folder.ph-tabbed .fv-pane [role="button"], body.is-phone #folder.ph-tabbed .fv-pane select, body.is-phone #folder.ph-tabbed .fv-pane a[href],
  body.is-phone #folder.ph-tabbed .fv-pane input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; min-width: 44px; }
  body.is-phone #folder.ph-tabbed .fv-pane button, body.is-phone #folder.ph-tabbed .fv-pane [role="button"] { display: inline-flex; align-items: center; justify-content: center; }
  body.is-phone #folder.ph-tabbed .fv-pane button:not([data-hscroll] *), body.is-phone #folder.ph-tabbed .fv-pane [role="button"]:not([data-hscroll] *) { white-space: normal; height: auto; }
  body.is-phone #folder.ph-tabbed .fv-pane .fv-enc-top, body.is-phone #folder.ph-tabbed .fv-pane .fv-enc-now { display: flex; align-items: center; }
  body.is-phone #folder.ph-tabbed .fv-pane [class*="-bar"], body.is-phone #folder.ph-tabbed .fv-pane [class*="-row"], body.is-phone #folder.ph-tabbed .fv-pane [class*="-acts"], body.is-phone #folder.ph-tabbed .fv-pane [class*="-chips"],
  body.is-phone #folder.ph-tabbed .fv-pane [class*="-seg"], body.is-phone #folder.ph-tabbed .fv-pane .fv-ver { flex-wrap: wrap; }
  body.is-phone #folder.ph-tabbed .fv-pane [class*="-seg"] { height: auto; overflow: visible; }
  /* Notes leads with the encounters, newest first; the rail's lists follow */
  body.is-phone #folder.ph-tabbed .fv-pane-notes .fv-main { order: -1; }
  body.is-phone #folder.ph-tabbed .fv-pane table { display: block; overflow-x: auto; }
  body.is-phone #folder.ph-tabbed .fv-pane .op-seg, body.is-phone #folder.ph-tabbed .fv-pane .mdb-srcs { display: flex; flex-wrap: wrap; width: auto; }
  body.is-phone #folder.ph-tabbed .fv-pane [style*="nowrap"], body.is-phone #folder.ph-tabbed .fv-pane .fv-enc-syn { white-space: normal; }
  /* the tab's foot of actions */
  body.is-phone #folder.ph-tabbed .ph-ffoot { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 6px 0 2px; border-top: 1px solid var(--line); background: var(--bg); }
  body.is-phone #folder.ph-tabbed .ph-ffoot[hidden] { display: none; }
  body.is-phone #folder.ph-tabbed .ph-ffoot-row { display: flex; gap: 8px; }
  body.is-phone #folder.ph-tabbed .ph-ffoot-b { flex: 1 1 0; min-height: 44px; min-width: 44px; }
  body.is-phone #folder.ph-tabbed .ph-ffoot-b.is-off { opacity: 0.55; }
  body.is-phone #folder.ph-tabbed .ph-ffoot-said { font-size: 12px; color: var(--amber-ink); min-height: 0; }
  body.is-phone #folder.ph-tabbed .ph-ffoot-said:empty { display: none; }
}
/* MEMO WRITING ON THE PHONE (29 Nov, #1306, boards MemoPick and MemoWrite):
   who the memo is for as one strip of tiles that swipes sideways (his own
   ★ templates after them), the board in one column, every control a finger's
   size. The board and every rule are memoboard.ts's. Phone only. */
@media (max-width: 1099px) {
  body.is-phone .pmm-sheet .mb { flex-direction: column; align-items: stretch; padding: 4px 0; gap: 8px; }
  body.is-phone .pmm-sheet .mb-side { flex: none; display: flex; flex-direction: column; gap: 6px; }
  body.is-phone .pmm-sheet .mb, body.is-phone .pmm-sheet .mb-side { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  body.is-phone .pmm-sheet .mb-side > * { flex: none; }
  body.is-phone .pmm-sheet .mb-helpb { min-width: 44px; }
  body.is-phone .pmm-sheet .mb-addt { min-height: 44px; }
  body.is-phone .pmm-sheet .mb-types { max-width: 100%; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; min-height: 0; }
  body.is-phone .pmm-sheet .mb-side .mb-kind { flex: none; min-height: 44px; padding: 0 12px; }
  body.is-phone .pmm-sheet .mb-side .mb-kind .mb-grip { display: none; }
  body.is-phone .pmm-sheet .mb-side .mb-letter { min-height: 44px; }
  body.is-phone .pmm-sheet .mb-col { padding-right: 0; }
  body.is-phone .pmm-sheet .btn, body.is-phone .pmm-sheet .mb-chip, body.is-phone .pmm-sheet select,
  body.is-phone .pmm-sheet input[type="text"], body.is-phone .pmm-sheet input[type="date"] { min-height: 44px; }
  body.is-phone .pmm-sheet .mb-choices { flex-wrap: wrap; gap: 6px; }
}
/* THE MC BOARD ON THE PHONE (29 Nov, #1305, board MCBoard): the six
   certificates as one strip that swipes, one at a time; the live wording
   and 🐝 Send under the area. Phone only. */
@media (max-width: 1099px) {
  body.is-phone .pmc-sheet .mc-board { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  body.is-phone .pmc-sheet .mc-board .mc-tab { flex: none; min-height: 44px; padding: 0 12px; white-space: nowrap; }
  body.is-phone .pmc-sheet .mc-in, body.is-phone .pmc-sheet .btn { min-height: 44px; }
  body.is-phone .pmc-sheet .mc-in-row { display: flex; flex-wrap: wrap; gap: 6px; }
  body.is-phone .pmc-sheet .mc-in-row .mc-in { min-width: 0; flex: 1 1 120px; }
  body.is-phone .mc-phone { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
  body.is-phone .mc-preview { font-family: var(--serif); font-size: 14px; line-height: 1.45; color: var(--dim); padding: 8px 10px; border-radius: var(--r); border: 1px dashed var(--line); }
  body.is-phone .mc-preview.is-ok { color: var(--ink); border-style: solid; }
  body.is-phone .mc-preview.is-no { color: var(--amber-ink); }
  body.is-phone .mc-dx { font-size: 12px; color: var(--dim); }
  body.is-phone .mc-phone-foot .mc-bee { min-height: 44px; }
}
.pc-foot {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 6px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.pc-note { font-size: 10.5px; color: var(--dim); margin-left: auto; }

/* ── day view ───────────────────────────────────────────────────────────
   Dark is unchanged: every rule here bites only when the toggle sets
   data-theme="day" on <html>. The accents keep their MEANING and are
   darkened until they are legible on a light ground — day --teal is
   #0b7266 and --amber-ink #8a5e0c, both already measured by
   verify_theme_contrast. What needs repainting is the two tinted grounds,
   which are dark-ground washes, and the number's white ink, which
   disappears on a pale pill. */
[data-theme="day"] .pill-reg {
  background: rgba(11,114,102,0.10); color: var(--ink);
  border-bottom-color: rgba(11,114,102,0.55);
}
[data-theme="day"] .pill-reg:hover, [data-theme="day"] .pill-reg:focus-visible {
  background: rgba(11,114,102,0.18);
}
[data-theme="day"] .pill-mail { background: rgba(11,114,102,0.06); }
[data-theme="day"] .pill-mail.has { background: rgba(138,94,12,0.10); }
[data-theme="day"] .pc-name { color: var(--ink); }


/* ── THE BAR IN THREE SHAPES (27 Nov, Dr Lau chose mock-up C: "make
   user / patient registration no / settings more distinct") ────────────
   You are a filled teal badge; the patient is a light WRISTBAND -- the only
   light object on the dark bar, PATIENT down its edge; the clinic's tools
   sit in one dashed box ending in ⚙. On the phone the band and the box are
   `display: contents`, so their children stay cells of the phone bar. */
@media (min-width: 1100px) {
  .spine .who { padding: 5px 14px 5px 5px; border-radius: 999px;
    background: rgba(79,214,200,0.12); border: 1px solid var(--teal); }
  .spine .who .avatar { background: var(--teal); color: var(--accent-ink); border-color: var(--teal); font-weight: 700; }
  .spine .who-name { color: var(--ink); }
}
.pband { display: inline-flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0;
  min-height: 40px; padding: 0 6px 0 0; border-radius: 8px; overflow: hidden;
  background: #f2e6c8; color: #1d1a12; box-shadow: 0 0 0 1px rgba(201,139,22,0.55); }
.pband[hidden] { display: none !important; }
.pband-tag { align-self: stretch; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; background: #c98b16; color: #1d1406;
  font: 700 7.5px/1 var(--mono); letter-spacing: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
.pband .rule { display: none; }
.pband .pill-reg { background: transparent; border: 0; border-bottom: 1px dotted #8a6a1c; border-radius: 0;
  color: #1d1a12; font-size: 15px; font-weight: 700; padding: 2px 2px; }
.pband .pill-reg:hover, .pband .pill-reg:focus-visible { background: rgba(201,139,22,0.16); }
.pband .pill-plus { border-color: #8a7a52; color: #4a3d1c; background: transparent; }
.pband .patient-sub { color: #3c3521; font: 600 13px var(--mono); }
.pband .pill-ok { background: transparent; border-color: #6d6142; color: #3c3521; }
.pband .pill-unasked { background: rgba(201,139,22,0.14); border-color: #a5741a; color: #4a3304; }
.pband .pill-alert { background: #b52b26; border-color: #b52b26; color: #fff; }
.pband .bee-connected { color: #1f8a46; }
.pband .bee-not { color: #b4231a; }
.pband .bee-off { color: #6d6142; }
.pband-prof { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  border-radius: 999px; border: 1px solid #6d6142; background: #e6d6ad; color: #2b2414;
  font: 700 11px var(--mono); letter-spacing: .06em; cursor: pointer; position: relative; }
.pband-prof::before { content: ''; position: absolute; inset: -8px -2px; }
.pband-prof:hover { background: #dcc996; }
.pband-prof.on { background: #2b2414; color: #f2e6c8; border-color: #2b2414; }
.pband-prof:focus-visible { outline: 2px solid #8a6a1c; outline-offset: 2px; }
.pband-prof[hidden] { display: none !important; }
@media (min-width: 1100px) {
  .spine-tools { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0;
    padding: 4px; border-radius: 12px; border: 1px dashed var(--line); background: var(--panel-2); }
}
.spine-gear { flex: 0 0 auto; width: 34px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; position: relative; }
.spine-gear::before { content: ''; position: absolute; inset: -7px -3px; }
.spine-gear:hover { border-color: var(--teal-2); }
.spine-gear:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1099px) { .spine-gear { display: none; } }
/* IT FITS ONE ROW AT 1440 (measured: the band, the badge and the box came to
   ~1610px against 1440 and the bar wrapped to two rows). Below 1600px the
   Profile word folds to 🧬 (its name stays the title and the label), the
   band packs tighter, and the box's clock keeps its time. */
@media (min-width: 1100px) and (max-width: 1599px) {
  .spine { column-gap: 7px; }
  .pband { gap: 6px; }
  .pband .pill { padding-left: 8px; padding-right: 8px; }
  .pband-prof .pw { display: none; }
  .pband-prof { padding: 0 6px; }
  .pband-tag { padding: 0 3px; }
  .pband .pill-reg { font-size: 14px; }
  .pband .patient-sub { font-size: 12px; }
  .spine .who { padding-right: 8px; }
  .spine-tools { gap: 4px; padding: 0 0 0 8px; border-width: 0 0 0 1px; border-radius: 0; background: transparent; }
  .pband .pill { letter-spacing: .02em; }
  .pband .patient-sub { letter-spacing: 0; }
  .pband { padding-right: 4px; }
}
/* the profile, hung under the band (profilepop.ts) */
.pprof { position: absolute; top: calc(100% + 6px); left: 16px; z-index: 60; width: min(1240px, calc(100vw - 32px));
  max-height: min(72vh, 680px); overflow: auto; padding: 8px 14px 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid #c98b16; box-shadow: var(--z2); }
.pprof .bps { margin: 0; border: 0; padding: 0; }
.pprof .bps-h { padding-right: 40px; }
.pprof .bps-h .bps-k { color: var(--amber-ink); }
.pprof .bps-col { overflow: hidden; }
.pprof .bps-f { grid-template-columns: 112px minmax(0, 1fr); }
.pprof .bps-f > :not(b) { overflow-wrap: anywhere; }
.pprof-x { position: absolute; top: 9px; right: 12px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.pprof-x:hover { border-color: var(--teal-2); }
[data-theme="day"] .pband { background: #f6e9c4; box-shadow: 0 0 0 1px #c98b16; }

/* 🧍 THE BODY PART ON RADIOLOGY (27 Nov): one small switch in the row of
   controls, the row of parts under it, a heading a part under All. */
.rdb-partbtn { flex: 0 0 auto; width: 34px; padding: 0; font-size: 15px; }
.rdb-partbtn.is-on { border-color: var(--teal); background: var(--selected-bg); box-shadow: inset 0 0 0 1px var(--teal); }
.rdb-parts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; margin: 2px 0 4px;
  border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.rdb-parts[hidden] { display: none; }
.rdb-parts .rdb-flex { flex: 1; }
.rdb-parts-k { font: 500 10px var(--mono); letter-spacing: .14em; color: var(--faint); margin-right: 4px; }
.rdb-part { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.rdb-part .rdb-n { font-family: var(--mono); color: var(--dim); }
.rdb-part.is-on { background: #f2e6c8; color: #1d1a12; border-color: #c98b16; }
.rdb-part.is-on .rdb-n { color: #4a3d1c; }
.rdb-part.is-zero { opacity: .55; }
.rdb-part:focus-visible, .rdb-partbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.rdb-grp { display: block; width: 100%; text-align: left; margin: 10px 0 2px; padding: 5px 8px; border: 0; border-radius: 6px;
  background: var(--panel-2); color: var(--amber-ink); font: 600 11px var(--mono); letter-spacing: .1em; cursor: pointer; }
.rdb-grp:first-child { margin-top: 0; }
.rdb-grp:hover { color: var(--amber); }
[data-theme="day"] .rdb-part.is-on { background: #f6e9c4; }
/* grouped: one table a part, ONE set of column widths, the headings once */
.rdb-body.is-grouped table.rdb-table { table-layout: fixed; width: 100%; }
.rdb-body.is-grouped .rdb-grp ~ .rdb-grp + table.rdb-table thead tr { visibility: collapse; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(1) { width: 34px; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(2) { width: 12%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(3) { width: 9%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(4) { width: 13%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(5) { width: 12%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(6) { width: 9%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(7) { width: 9%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(8) { width: 16%; }
.rdb-body.is-grouped table.rdb-table :is(th, td):nth-child(9) { width: 16%; }
/* ── 👨‍⚕️ THE DOCTOR PAGE (ticket 8): a list on the left in three groups, the
   chosen item's cards on the right, in the Insurance tab's frame. ── */
.dkp { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; min-height: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dkp-side { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); overflow: auto; }
.dkp-group { font: 600 11px/1.2 var(--mono, monospace); letter-spacing: .14em; color: var(--teal); padding: 12px 8px 6px; }
.dkp-item { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 7px 10px; border: 0;
  border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; min-height: 36px; }
.dkp-item:hover { background: var(--sunk); }
.dkp-item.is-on { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.dkp-item-i { width: 20px; flex: none; text-align: center; }
.dkp-item-w { display: flex; flex-direction: column; min-width: 0; }
.dkp-item-l { font-size: 14px; }
.dkp-item-s { font-size: 12px; color: var(--dim); }
.dkp-item-s:empty { display: none; }
.dkp-main { padding: 12px 14px; min-width: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.dkp-host { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dkp-card { border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); min-width: 0; }
.dkp-card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.dkp-card-t { font: 600 12px/1.2 var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.dkp-card-a { margin-left: auto; font-size: 12px; color: var(--dim); }
.dkp-card-b { padding: 8px 12px 12px; min-width: 0; }
.dkp-card > .help-panel { padding: 0 12px; }
.dkp-chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.dkp-chip { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  padding: 2px 10px; min-height: 26px; cursor: pointer; font-size: 12px; }
.dkp-chip.is-on { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 18%, transparent); }
.dkp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dkp-table th { text-align: left; font: 600 11px/1.2 var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dkp-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dkp-unlinked .btn { min-height: 28px; padding: 2px 10px; }
.dkp-src[role="button"], .rf-open { cursor: pointer; }
/* 📊 SETTINGS › STATISTICS (batch 4, T13; statspage.ts): the Doctor page's
   card, the door's tables, a bar row by period and horizontal bars. */
.st-chips { justify-content: flex-end; flex-wrap: wrap; display: flex; gap: 6px; }
.st-custom { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.st-clinics { position: relative; }
.st-clinics > summary { list-style: none; cursor: pointer; }
.st-chk { display: flex; gap: 6px; align-items: center; padding: 2px 6px; }
.st-range { color: var(--dim); margin: 6px 0; }
.st-table tr.st-total td { font-weight: 700; }
.st-bars { display: flex; gap: 4px; align-items: flex-end; height: 110px; margin-top: 12px; }
.st-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 110px; text-align: center; }
.st-bar-f { background: var(--teal); border-radius: 4px 4px 0 0; }
.st-bar-v, .st-bar-l { color: var(--dim); font-size: 0.75em; overflow: hidden; white-space: nowrap; }
.st-hbars { margin-top: 10px; }
.st-hbar { display: grid; grid-template-columns: minmax(120px, 230px) 1fr minmax(90px, auto); gap: 10px; align-items: center; margin: 5px 0; }
.st-hbar-t { height: 14px; background: color-mix(in srgb, var(--teal) 15%, transparent); border-radius: 4px; }
.st-hbar-f { height: 14px; background: var(--teal); border-radius: 4px; }
.st-hbar-n { text-align: right; }
.st-note { margin-top: 8px; }
.st-off { margin: 10px 0; padding: 10px; border: 1px dashed var(--amber, #F2A33A); border-radius: 8px; }
.st-acts { display: flex; gap: 6px; margin-top: 10px; }
.dkp-src[role="button"]:hover, .rf-open:hover { background: var(--panel); }
.dkp-src.is-on { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.dkp-where { color: var(--dim); }
.dkp-n, .dkp-mono { font-family: var(--mono, monospace); }
.dkp-owed { color: var(--amber); }
.dkp-reg { font-family: var(--mono, monospace); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.dkp-thanks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dkp-thank { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.dkp-thank-add { display: flex; gap: 8px; align-items: center; }
.dkp-thank-add .su-in { flex: 1; min-width: 0; }
.dkp-host .prefs-section.is-chosen { border-left: 3px solid var(--teal); padding-left: 10px; }
/* 🔬 Investigations: blood tests read back on an order (batch 4, ticket 11). */
.ivf-days { width: 64px; }
.ivf-name { font-weight: 600; }
.ivf-unit, .ivf-who { color: var(--dim); }
.ivf-kinds { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ivf-kind { cursor: default; }
button.ivf-kind { cursor: pointer; }
.ivf-more, .ivf-only { width: auto; min-height: 26px; padding: 0 6px; }
.ivf-acts, .ivf-sug-row, .ivf-found { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.ivf-find .su-in { margin-top: 8px; max-width: 420px; }
.ivf-sug { margin-top: 12px; }
.ivf-sug-h { color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.or-fresh:empty { display: none; }
/* 🤝 Referrers: his own dates as an overlay, cases and thank-yous in place (batch 4, ticket 12). */
.rp-anchor { position: relative; }
.rp-host { position: absolute; top: 44px; right: 12px; z-index: 5; }
.rp-over { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 6px 24px #0008; max-width: min(760px, 92vw); }
.rp-pre, .rp-row, .rp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.rp-acts { justify-content: flex-end; margin: 8px 0 0; }
.rp-in { width: 120px; }
.rp-days { color: var(--dim); }
.rp-cal { display: flex; gap: 18px; flex-wrap: wrap; }
.rp-mon-h { text-align: center; font-weight: 600; margin-bottom: 4px; }
.rp-grid { display: grid; grid-template-columns: repeat(7, 28px); gap: 3px; }
.rp-wd { text-align: center; color: var(--dim); }
.rp-day { min-height: 24px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.rp-day.is-in { background: color-mix(in srgb, var(--teal) 22%, transparent); }
.rp-day.is-end { background: var(--teal); color: var(--bg); }
.rp-day:disabled { color: var(--faint); cursor: default; }
.rp-chip.is-on { border-color: var(--teal); }
.rfx-caret { color: var(--dim); }
.rfx-bill { text-align: right; white-space: nowrap; }
.rfx-sub td { color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding-left: 34px; }
.rfx-ind { padding-left: 34px !important; }
.rfx-total td { font-weight: 700; }
.rfx-thanks td { padding-left: 34px; background: color-mix(in srgb, var(--amber) 6%, transparent); }
.rfx-gift { grid-template-columns: 130px 1fr 120px 90px 1fr auto; align-items: center; }
.rfx-gift.is-crossed > span { text-decoration: line-through; color: var(--dim); }
.rfx-day { max-width: 120px; }
.rfx-val { max-width: 90px; }
.rfx-tot { color: var(--dim); margin-top: 6px; }
.drp-cols.drp-one { grid-template-columns: minmax(0, 1fr); }
/* 📐 The print area on pre-printed paper (batch 3, ticket 3): the page to scale. */
.pa-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.pa-page { position: relative; width: 260px; flex: none; background: #f4f1ea; color: #3d3a33;
  border-radius: 3px; box-shadow: 0 2px 10px #0008; overflow: hidden; }
.pa-pre { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #c9c2b4 0 6px, #ddd6c8 6px 12px); color: #5b5446;
  font-family: var(--mono, monospace); letter-spacing: .06em; overflow: hidden; white-space: nowrap; }
.pa-pre-top { top: 0; }
.pa-pre-foot { bottom: 0; }
.pa-frame { position: absolute; border: 2px dashed var(--teal); border-radius: 2px; padding: 6px; overflow: hidden; }
.pa-frame-l { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; color: var(--teal);
  font-family: var(--mono, monospace); }
.pa-bar { position: absolute; left: 50%; width: 28px; height: 8px; margin-left: -14px; border-radius: 4px;
  background: var(--teal); cursor: ns-resize; touch-action: none; }
.pa-bar-top { margin-top: -4px; }
.pa-bar-foot { margin-bottom: -4px; }
/* 📨 Letters & forms (batch 4): the PDF forms table, favourite medication
   orders, post-procedure instructions -- slim symbol buttons, one card each. */
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pl-search { max-width: 220px; }
.pl-legend { margin-left: auto; color: var(--dim); }
.pl-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pl-row[draggable="true"] { cursor: grab; }
.pl-row.is-builtin .pl-name { color: var(--dim); }
.pl-row.is-missing .pl-missing { color: var(--amber); }
.pl-acts { white-space: nowrap; text-align: right; }
.pl-sym { min-width: 30px; min-height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer; margin-left: 4px; }
.pl-sym:disabled { opacity: .45; cursor: default; }
.pl-pill { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dim);
  padding: 2px 10px; min-height: 26px; cursor: pointer; white-space: nowrap; }
.pl-pill.is-on { border-color: var(--teal); color: var(--ink); background: color-mix(in srgb, var(--teal) 18%, transparent); }
.pl-show { display: inline-flex; gap: 4px; margin-left: 6px; }
.pl-side-h { font-family: var(--mono, monospace); letter-spacing: .08em; color: var(--dim); margin: 6px 0; }
.pl-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.pl-box-t { font-weight: 600; }
.pl-box-r { display: flex; gap: 8px; }
.pl-more { color: var(--dim); }
.pl-lock { display: inline-block; min-width: 30px; text-align: center; margin-left: 4px; }
.pl-fill { align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--dim); }
.mf-filters { margin-left: 0; }
.mf-new { margin-left: auto; }
.mf-label { font-weight: 600; }
.mf-pi { max-width: 420px; }
.mf-form { margin-bottom: 10px; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 6px 0; }
.mf-f { display: flex; flex-direction: column; gap: 2px; }
.mf-hits { display: flex; gap: 4px; flex-wrap: wrap; grid-column: 1 / -1; }
.mf-pi-in { width: 100%; min-height: 60px; }
.pp-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pp-left { display: flex; flex-direction: column; gap: 2px; }
.pp-proc { text-align: left; border: 0; border-radius: 8px; background: transparent; color: var(--ink); padding: 6px 8px;
  cursor: pointer; min-height: 32px; }
.pp-proc.is-on { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.pp-proc.is-gone { text-decoration: line-through; color: var(--dim); cursor: default; }
.pp-add { align-self: flex-start; margin-top: 6px; }
.pp-top { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.pp-title { font-weight: 600; margin-right: auto; }
.pp-sec { width: 140px; }
.pp-filled { color: var(--teal); }
.pp-f { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.pp-f textarea { min-height: 52px; }
.pp-phone { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f6f4ef; color: #2b2a27; }
.pp-phone-bar { background: #24539a; color: #fff; padding: 6px 10px; }
.pp-phone-b { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.pp-phone-t, .pp-phone-s { font-weight: 600; }
.pp-phone-call { border-left: 3px solid var(--red, #c0342a); background: #fbe9e7; padding: 4px 6px; }
.pp-acts { display: flex; gap: 8px; margin-top: 8px; }
.fm-find { margin-top: 6px; width: 100%; }
.fm-found { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.fm-manage { border: 0; background: transparent; color: var(--dim); cursor: pointer; padding: 4px 0; text-align: left; }
@media (max-width: 1100px) { .pl-grid, .pp-grid { grid-template-columns: minmax(0, 1fr); } }
.pa-right { flex: 1 1 320px; min-width: 0; }
.pa-mm { width: 74px; flex: none; }
.pa-chips .dkp-chips { margin-left: 0; }
/* 🖨 The clinic's stationery (batch 3, ticket 6). */
.stc-clinic { padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.stc-clinic:last-child { border-bottom: 0; }
/* 💲 Settings › Billing & stock (batch 5, ticket 22): billingpage.ts. */
.bs-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.bs-search, .bs-in { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-width: 0; }
.bs-search { flex: 1 1 220px; max-width: 320px; }
.bs-scroll { max-height: 56vh; overflow-y: auto; min-width: 0; }
.bs-table td, .bs-table th { white-space: normal; }
.bs-sym { padding: 2px 8px; }
.bs-amber { color: var(--amber); }
.bs-table tr.is-low td { color: var(--amber); }
.bs-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; }
.bs-count { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; }
@media (max-width: 900px) { .bs-count { grid-template-columns: minmax(0, 1fr); } }
.bs-count-l, .bs-count-r { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bs-scan { border: 2px solid var(--teal); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bs-last, .bs-unknown { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bs-unknown { border-color: var(--amber); }
.bs-n { min-width: 2.5em; text-align: center; }
.bs-act { display: inline-flex; }
.stc-addr { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
/* ── 📝 THE NOTES TAB (batch 4, T14-T17): the Doctor page's frame and cards;
   type in rem so the desktop type scale is untouched. ── */
.nt-soap, .nt-llm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); gap: 14px; align-items: start; }
.nt-soap-l, .nt-llm-l, .nt-llm-r { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nt-heads td { vertical-align: middle; }
.nt-ord { white-space: nowrap; }
.nt-letter-in { width: 2.6rem; text-align: center; font-weight: 600; }
.nt-name-in { width: 100%; min-width: 8rem; }
.nt-bring { display: flex; flex-wrap: wrap; gap: 4px; }
.nt-tail { white-space: nowrap; color: var(--dim); }
.nt-kind { margin-right: 8px; }
.nt-del { margin-right: 6px; }
.nt-sym { border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink);
  min-width: 26px; min-height: 26px; padding: 0 6px; cursor: pointer; }
.nt-sym:disabled { opacity: .35; cursor: default; }
.nt-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nt-ask { border: 1px dashed var(--teal); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.nt-ask-t { font-weight: 600; }
.nt-ask-d, .nt-ask-l { color: var(--dim); }
.nt-prev { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.nt-prev-t { font-weight: 600; }
.nt-prev-r { display: flex; gap: 8px; align-items: flex-start; }
.nt-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; flex: none;
  border-radius: 5px; background: color-mix(in srgb, var(--teal) 30%, transparent); font-weight: 700; }
.nt-prev-w { display: flex; flex-direction: column; min-width: 0; }
.nt-prev-n { font-weight: 600; }
.nt-prev-s { color: var(--dim); font-size: 0.8rem; }
.nt-llm-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-count { color: var(--dim); }
.nt-count.is-over { color: var(--amber); }
.nt-types { display: flex; flex-wrap: wrap; gap: 4px; }
.nt-ta { width: 100%; min-height: 28rem; font-family: var(--mono, monospace); resize: vertical; }
.nt-g-h { font-weight: 600; color: var(--dim); }
.nt-g { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.nt-g-n { width: 1.2rem; color: var(--dim); }
.nt-g-w { flex: 1; min-width: 0; }
.nt-g.is-off { color: var(--amber); }
.nt-sw { border: 1px solid var(--line); border-radius: 999px; min-width: 3.4rem; min-height: 26px; cursor: pointer;
  background: transparent; color: var(--dim); }
.nt-sw.is-on { background: color-mix(in srgb, var(--teal) 40%, transparent); color: var(--ink); }
.nt-g.is-off .nt-sw { border-color: var(--amber); color: var(--amber); }
.nt-sw:disabled { cursor: default; }
.nt-g-k { color: var(--dim); font-size: 0.85rem; }
.nt-behind { color: var(--amber); font-size: 0.85rem; }
.nt-style-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nt-style-t { margin-right: auto; color: var(--dim); }
.nt-style-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.nt-style-raw, .nt-style-nice { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.nt-style-k { color: var(--dim); font-size: 0.8rem; margin-bottom: 4px; }
.nt-pre { white-space: pre-wrap; font-family: var(--mono, monospace); margin: 0; }
.nt-ticks { color: var(--dim); font-size: 0.85rem; }
/* 🏷 Diagnosis favourites (batch 5, T19): three age columns, split by area */
.dx-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.dx-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.dx-q { min-width: 200px; }
.dx-form, .dx-sel, .dx-terms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dx-form:empty { display: none; }
.dx-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 10px; }
.dx-col-t { color: var(--teal); font-family: var(--mono, monospace); letter-spacing: 0.12em; margin-bottom: 4px; }
.dx-area-t { color: var(--dim); margin: 8px 0 2px; }
.dx-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 2px 0; border-bottom: 1px solid var(--rule); }
.dx-name { flex: 1; min-width: 0; }
/* both codes, labelled, on their own line under the name (his 28 Nov ruling) */
.dx-code { color: var(--dim); font-family: var(--mono, monospace); font-size: 0.78rem; flex-basis: 100%; order: 5; }
.dx-code:empty { display: none; }
.dx-find { order: 4; }
.dx-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; order: 6; }
.dx-pick-t, .dx-advice { color: var(--dim); font-size: 0.78rem; }
.dx-advice { flex-basis: 100%; order: 7; }
.dx-dropped { color: var(--amber); font-size: 0.78rem; flex-basis: 100%; order: 6; }
.dx-count { margin: 0 0 6px; }
.dx-chosen { color: var(--dim); }
@media (max-width: 900px) { .dx-cols { grid-template-columns: minmax(0, 1fr); } }

/* ==== fb2_spine END — the top bar, third drawing (LE-58 Parcel B) ==== */




/* ── fb2_forms.css — the PDF forms library in four groups (LE-58, Parcel P) ── */
/* His point 9, 10 September: "the PDF forms library in four groups" -- a.
   Memo, b. Parkway forms + brace ordering + X-ray, c. Essential, d. School
   children -- TWO BY TWO, each form the size of its name with a `how` line
   under it, and what is new drawn dashed.

   Values are app.css's own tokens throughout, so the day/dark toggle carries
   this page with everything else and nothing here has a literal colour.
   Sizes are today's; the type scale is the integrator's and is done last. */

.fl-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 2px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.fl-title {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--teal);
  flex: 0 0 auto;
}
.fl-sub {
  font-size: 11.5px;
  color: var(--dim);
  flex: 1 1 240px;
  min-width: 0;
  line-height: 1.45;
}
.fl-back {
  flex: 0 0 auto;
  min-height: 0;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-size: 11.5px;
  cursor: pointer;
}
.fl-back:hover { color: var(--teal); border-color: rgba(79,214,200,0.34); }

/* The page fills its host and never scrolls itself: `min-height: 0` down the
   chain is what lets a group scroll INSIDE its own box instead of pushing the
   grid past the fold. */
.fl-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
}
/* TWO BY TWO -- the half of his point 9 that a fake DOM cannot measure. */
.fl-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fl-group {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden auto;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sunk);
}
.fl-group-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.fl-group-t {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--teal);
}
.fl-group-sub {
  font-size: 11px;
  color: var(--dim);
  margin-top: 5px;
  line-height: 1.4;
}

/* EACH FORM THE SIZE OF ITS NAME: two per row inside a group, wrapping to one
   column when the group is narrow, and never wider than its box. */
.fl-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.fl-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.fl-form:hover:not([disabled]) { border-color: rgba(79,214,200,0.34); }
.fl-form-l { overflow-wrap: anywhere; }
.fl-form .fl-how {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--faint);
  overflow-wrap: anywhere;
}
/* WHAT IS NEW IS DASHED, and its `how` line is the warning colour: the
   difference between what is there and what he has asked for is the whole
   point of drawing the missing ones at all. */
.fl-form.new {
  border-style: dashed;
  cursor: default;
  opacity: 1;
}
.fl-form.new .fl-how { color: var(--amber); }
/* AND WHAT NEEDS AN ENCOUNTER SAYS SO. Dimmed rather than hidden, so the
   answer to "where is the insurance memo" is on the screen either way. */
.fl-form.fl-dim { opacity: 0.55; cursor: default; }
.fl-form .fl-need {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--amber);
}

/* The free memo's one line, on its own full-width row inside the group's
   grid -- it belongs to the button above it and must not shrink to a column. */
.fl-ask {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(79,214,200,0.34);
  border-radius: 10px;
  background: var(--panel);
}
.fl-ask-l {
  font-size: 11.5px;
  color: var(--dim);
  flex: 0 0 auto;
}
.fl-ask-in {
  flex: 1 1 160px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--sunk);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.fl-more-t {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.fl-foot {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.45;
}

.fl-said {
  font-size: 12px;
  color: var(--dim);
  padding: 6px 2px 0;
}
.fl-said.ok { color: var(--teal); }
.fl-said.no { color: var(--red-ink); }

/* The blank itself, opened in the page under the grid. */
.fl-pdf {
  flex: 0 0 auto;
  height: 44vh;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--sunk);
}
.fl-pdf iframe { width: 100%; height: 100%; border: 0; }

/* Below the desktop width the four groups stack one to a row and scroll,
   because two columns of two-column forms is not readable on a phone -- and
   the library is reachable from the phone's own list. */
@media (max-width: 1099px) {
  .fl-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .fl-forms { grid-template-columns: minmax(0, 1fr); }
}
/* ── end fb2_forms.css ── */


/* ── fb2_home.css — the clinic's tiles filling their seat and the folding
   theme toggle (LE-58, Parcel H) ──

   THE WEEK'S OPENABLE ENTRIES ARE NOT HERE EITHER: main's week already
   opens an entry's folder through its schedule-context panel.

   THE CORNERS' ⋯ MENU (close, move, swap) IS NOT HERE. Dr Lau, 23 Sept:
   main's collapsible side rails are how a corner gets out of the way, and a
   second mechanism for the same thing is not kept beside them.

   FOR THE INTEGRATOR — WHERE THIS GOES. Fold it into `app/app.css` after
   the desktop block that ends with `.dk-last` (the `.dk-*` rules at ~1745
   to ~1825), and ABOVE the chat markers. NOT at EOF: verify_console_chatenc
   reads the chat fragment as its marker TO THE NEXT CHAT MARKER OR EOF, so
   anything appended at the end of the file joins that parcel and trips its
   purity checks (LE-49 recorded this; it costs a red harness, not a bug).

   EVERY COLOUR IS A TOKEN, NO LITERALS. The day theme redefines the tokens
   and nothing here needs a `[data-theme="day"]` rule of its own — which is
   also why verify_theme_contrast has nothing new to weigh.

   AND EVERY SIZE IS TODAY'S, NOT THE BOARD'S. The boards are drawn at the
   stepped-up scale (11.5px reads 13.3px there); LE-58 §1 says the type
   scale is the integrator's and is done last, so these are the sizes the
   stylesheet has now and none of them is padded for it.
   ─────────────────────────────────────────────────────────────────────── */

/* ── the clinic's tiles fill their seat (points 7 and 10) ──
   Two columns rather than three-across with air under them. The rows are
   named for the nine the corner holds AND `grid-auto-rows` repeats the
   measure, so a tile added later gets a sized row instead of overflowing a
   corner that clips. */
.dk-corner-body.col { display: flex; flex-direction: column; }
.dk-icons.fill { flex: 1 1 auto; min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.dk-icons.fill .dk-tile { min-height: 0; height: 100%; padding: 4px 6px; gap: 2px; }
.dk-icons.fill .dk-tile-i { font-size: 18px; }
.dk-icons.fill .dk-tile-pair { min-height: 0; gap: 4px; }
.dk-icons.fill .dk-tile-pair .dk-tile { flex-direction: row; gap: 6px; }
.dk-icons.fill .dk-tile-pair .dk-tile-i { font-size: 13px; }
/* EVERY TILE IN THE SQUARE, NO SCROLL BAR (11 November): eleven tiles in
   six rows, the symbol BESIDE a smaller word, so nothing wraps or clips. */
.dk-icons.fill { grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 5px; overflow: hidden; }
.dk-icons.fill .dk-tile { flex-direction: row; justify-content: flex-start; gap: 7px;
  padding: 2px 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.dk-icons.fill .dk-tile .dk-tile-l { overflow: hidden; text-overflow: ellipsis; }
.dk-icons.fill .dk-tile-i { font-size: 15px; flex: none; }
/* Help and About open a SHEET, not a screen: marked, quietly. */
.dk-tile-info .dk-tile-l { color: var(--dim); }

/* ── the theme toggle folds beside a patient ──
   The spine measured 1560px against 1440 with a patient on the bar, so the
   words go and the glyph stays. What the tap does is still on the button's
   title and aria-label, so nothing is said only in the span that hides. */
.tb-i { flex: 0 0 auto; }
.tb-w { white-space: nowrap; }
.spine.has-patient .tb-w { display: none; }


/* ── end fb2_home.css ── */

/* ── the encounter page's info bar (LE-58, Parcel E, kept) ──
   `dk-ibar`, not #481's `dk-info`: the desktop's About card is already
   `dk-info`, and #481's rules for the bar restyled that card's ground and
   let the week show through it (measured in the browser, 23 Sept).
   Dr Lau, 23 Sept: main's encounter page stays and #481's six tiles do
   not; what came across is the bar of the chart's own facts under the
   patient header, and the three utilities at its right end. */
/* ── the info bar, under the top bar ── */
.dk-ibar { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 4px 22px;
  align-items: baseline; padding: 8px 14px; border: 1px solid var(--rule);
  border-radius: 12px; background: var(--panel); }
.dk-ibar-item { display: inline-flex; align-items: baseline; white-space: nowrap; }
.dk-ibar-k { font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  color: var(--dimmer); text-transform: uppercase; margin-right: 6px; }
.dk-ibar-v { font-size: 12px; color: var(--ink); }
.dk-ibar-links { display: inline-flex; gap: 8px; margin-left: auto; }
.dk-ibar-b { font: inherit; font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--hush); background: transparent; color: var(--dim);
  cursor: pointer; white-space: nowrap; }
.dk-ibar-b:hover { border-color: var(--teal-2); color: var(--teal-2); }
.dk-ibar-b:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* ── end of the encounter info bar ── */

/* fb2_reg.css (LE-58, Parcel R -- the registration drawer by voice) is NOT
   folded: Dr Lau, 23 Sept, kept main's registration PAGE, which already
   records the three facts and reads them back. Its rules would also have
   restyled that page's own `.reg-status`. */


/* ── fb2_folder.css — the folder's five new sections (LE-58, Parcel F) ───
   A DELIVERY VEHICLE, NOT A SECOND STYLESHEET. `app/app.css` is one of the
   files the integrator alone touches (LE-37, LE-58 §2), and it is parsed by
   neither required check — so a parcel that edited it would be the shape
   that put conflict markers on `main`. This block is folded in under the
   marker line above; `verify_console_folder.py` §20 reads it back out of
   app.css by that marker once it has been, and out of this file until then.
   BOTH MARKERS ARE LOAD-BEARING: the slice is bounded at both ends, so
   whatever is appended after it later cannot be swallowed into it — LE-48's
   lesson, where a block appended at end-of-file joined the last parcel.

   Fold it AFTER `fb_folder.css`'s block, which is Parcel D's and is not
   touched here. Nothing below restyles a class the folder already had:
   `.fo-h`, `.fo-h2`, `.fo-encs`, `.fo-enc`, `.fo-enc-l`, `.fo-enc-r` and
   `.fo-enc.is-gone` are reused exactly as they are, so every section drawn
   before today renders exactly as it did. Three new classes, and nothing
   else.

   THE TYPE SCALE IS THE INTEGRATOR'S AND IS DONE LAST (LE-58 §1.1). These
   sizes are today's — 11px beside the folder's own 11px — and step up with
   the rest of the folder when the scale lands. Nothing here is padded for
   it in advance. */

/* WHAT HE MUST NOT BE GIVEN. Red-ink rather than red: the row has to read
   as a warning across a consulting room and must not shout louder than the
   allergy pill on the top bar, which is the one line above it in the
   hierarchy. The colour is a token, so the day theme repaints it with the
   rest — `--red-ink` is the legible-on-either-ground pair of `--red`.

   IT IS A CLASS ON THE ROW, NOT A RULE ABOUT A SOURCE. Which rows are
   avoid rows was decided by the door; the stylesheet colours what it is
   given and asks no question of its own. */
.fo-avoid .fo-enc-l { color: var(--red-ink); }
.fo-avoid .fo-enc-r { color: var(--dimmer); white-space: nowrap; }

/* STILL OUT. Amber, and set as a kicker so "PENDING" reads as a state
   rather than as a date in the column where dates live. Amber rather than
   red for the reason the flag beside a lab result is amber: this marks a
   row to CHASE, it does not grade a result. */
.fo-enc.is-pend .fo-enc-r {
  color: var(--amber); font-size: 10px; letter-spacing: 0.06em;
}

/* THE LINE UNDER A ROW: a blood series' own direction, a scheme's own
   sentence about itself. Shaped exactly like `.fo-m-t`, the trail the
   measurements have carried since commit 15, so a second kind of sub-line
   does not read as a second kind of thing. It sits INSIDE the list beside
   the row it belongs to, which is why it indents rather than aligns. */
.fo-sub { font-size: 11px; color: var(--dim); padding: 0 0 3px 8px; }
/* ── end fb2_folder.css ─────────────────────────────────────────────── */












/* ── desktop tap targets: the hit area, not the drawing ──────────────────
   Dr Lau, 23 September: "Tap targets under 44px". The app's own floor is
   --tap, 44px, and on a desktop about forty controls a page sat under it --
   measured in Chromium, 16px to 38px tall. Drawing them all 44px tall would
   push both pages past the screen, which his first rule forbids.

   So the CLICKABLE area grows and the drawing does not: a transparent box
   centred on the control, never smaller than 44x44, and only on controls
   with room around them. A hit area that reaches a neighbour's own box would
   take a click meant for that neighbour, which is worse than a small target,
   so every selector here was measured for the free space around it first.
   Densely packed lists (the week's entries, the room row's buttons, the
   carousel's tabs, the body map's buttons) are not here: they have 2-9px
   between them and no room to grow without changing the layout. */
@media (min-width: 1100px) {
  #who, #checkin, #recbtn, #mailbtn, #owedbtn, #apptbar, #themebtn,
  .dk-patient-close, .dk-patient-tab, .dk-ibar-b, .dk-side-toggle,
  .deskenc .dk-tab, .dk-corner-open, .tk-tick, .tk-key { position: relative; }
  #who::before, #checkin::before, #recbtn::before, #mailbtn::before, #owedbtn::before,
  #apptbar::before, #themebtn::before,
  .dk-patient-close::before, .dk-patient-tab::before, .dk-ibar-b::before,
  .dk-side-toggle::before, .deskenc .dk-tab::before,
  .dk-corner-open::before, .tk-tick::before, .tk-key::before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: max(100%, var(--tap)); height: max(100%, var(--tap));
    transform: translate(-50%, -50%);
  }
  /* The tick sits against its corner's left edge, which clips a centred box
     to 23px wide; its area runs RIGHT from the glyph instead, over the
     task's own words, which are not a control. */
  .tk-tick::before { left: 0; transform: translate(0, -50%); }
  /* And squeezed between that edge and the patient's key 8px to its right,
     it had 23px of width no hit area could add to without taking the key's
     clicks. The button has no ground and no border, so widening it widens
     nothing anybody sees but the gap before the task's words. */
  .tk-tick { min-width: 38px; text-align: left; }
}


/* THE DOCTOR'S TIME ON THE WEEK (11 Nov, slots.ts): events, blocks and
   provisional bookings; the menu on an empty hour; the read-back beside a
   drop. Placed before the generated type scale so it is read. */
.wk-cell.sl-open { cursor: cell; }
.wk-cell.sl-drop { outline: 2px solid var(--teal); outline-offset: -2px; background: rgba(79,214,200,.10); }
.wk-cell.sl-blocked { background: repeating-linear-gradient(135deg, rgba(224,90,79,.16) 0 6px, rgba(224,90,79,.05) 6px 12px); }
.wk-e-len { font: 600 10px var(--mono); opacity: .8; margin-left: 4px; }
.wk-e[draggable="true"], .wr-who[draggable="true"], #patient-mrn[draggable="true"] { cursor: grab; }
.sl-item { display: block; margin: 2px 3px; padding: 2px 6px; border-radius: 5px; font-size: 12px; line-height: 1.25; cursor: pointer; }
.sl-item small { display: block; font-size: 10.5px; opacity: .85; }
/* The Day view carries the doctor's own time and a "+" (11 Nov). */
.sl-dayitems { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.sl-dayitems .sl-item { margin: 0; }
.sl-dayadd { margin-left: auto; min-width: 32px; }
.dy-row .wk-e-len { margin-left: 6px; }
/* The bottom edge of an item or a booking is a handle that changes its length (11 Nov). */
.sl-item, [data-book] { position: relative; }
.sl-grip { position: absolute; left: 20%; right: 20%; bottom: -2px; height: 7px; cursor: ns-resize; touch-action: none; border-radius: 3px; }
.sl-grip:hover, .sl-sizing .sl-grip { background: var(--teal); opacity: .7; }
.sl-sizing { outline: 1.5px dashed var(--teal); }
/* One line each, so a long name never pushes the time or "did not attend" out of the cell; the whole name is on the hover. */
.sl-item > span, .sl-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-event { background: rgba(143,127,224,.22); border-left: 3px solid #8f7fe0; color: #d9d2ff; }
.sl-block { background: rgba(224,90,79,.18); border-left: 3px solid #e05a4f; color: #ffb3ab; }
.sl-provisional { border: 1.5px dashed #e0a63c; background: rgba(224,166,60,.08); color: #ffd89a; }
.sl-provisional.is-missed { opacity: .7; border-style: dotted; }
.sl-pop { position: fixed; z-index: 70; width: 320px; max-height: 80vh; overflow: auto; background: var(--panel, #0f1d20);
  border: 1px solid var(--line, #2e5a57); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 7px; }
.sl-x { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--dim); font-size: 18px; cursor: pointer; }
.sl-k { font: 600 11px var(--mono); letter-spacing: .14em; color: var(--dim); }
.sl-when { font-size: 15px; font-weight: 600; }
.sl-opt { display: flex; gap: 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--line, #24413f); border-radius: 9px;
  background: transparent; color: inherit; cursor: pointer; font: inherit; }
.sl-opt-i { font-size: 18px; }
.sl-opt-t b { display: block; font-size: 14px; }
.sl-opt-t span { font-size: 12px; color: var(--dim); }
.sl-in { font: inherit; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line, #2e5a57); background: transparent; color: inherit; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sl-chip { font: 12px var(--mono); padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line, #2e5a57); background: transparent; color: inherit; cursor: pointer; }
.sl-chip.is-on { border-color: var(--teal); background: rgba(79,214,200,.18); }
.sl-ask { font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.sl-ask.is-ok { color: var(--teal); }
.sl-ask.is-no { color: var(--red); }
.sl-now { text-decoration: line-through; color: var(--dim); }
.sl-after { font-weight: 600; }
.sl-note { font-size: 12px; color: var(--dim); }
.sl-defs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--dim); }
.sl-prov summary { cursor: pointer; font-size: 13px; color: #e0a63c; }
.sl-prov { display: flex; flex-direction: column; gap: 6px; }
.sl-all { font-size: 13px; }
.or-tile.or-drop { outline: 2px solid #e0a63c; outline-offset: 2px; }

/* THREE CARDS, TWO SEATS on the left (14 Nov). */
.dk-lx { display: none !important; }
/* A seated card closed to its symbol leaves the other the whole column
   (15 Nov 2026). */
.dk-corner.dk-seat-full { grid-area: tl-start / tl-start / bl-end / tl-end !important; }
.dk-seat-full > .dk-grip { display: none; }
.dk-seat-close { padding: 0 8px; }
.dk-tl > .dk-grip, .dk-lx > .dk-grip { display: none; }
.dk-seat-handle { cursor: grab; }
.dk-seat-swap[hidden] { display: none; }
.dk-tele-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 8px; margin-bottom: 6px;
  border: 1px solid var(--hush); border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px;
  cursor: pointer; text-align: left; }
.dk-tele-row:hover { border-color: var(--teal-2); }
.dk-tele-who { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-tele-when { flex: 0 0 auto; font-size: 11px; color: var(--dim); }
.dk-tele-want { flex-basis: 100%; padding-left: 26px; font-size: 12px; color: var(--teal); }
.dk-tele-row { cursor: pointer; }
.dk-tele-reg { text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.dk-tele-reg:hover, .dk-tele-reg:focus-visible { color: var(--teal); outline: none; }
.tc-proposals { align-items: center; flex-wrap: wrap; }
.tc-proposals-t { font-size: 12px; color: var(--dim); }
/* The width grip runs the box's edge but never over its header's buttons
   (the fold arrow sits at the header's very edge). */
.dk-corner > .dk-corner-h { position: relative; z-index: 4; }
/* A crowded left header gives way at its title, never at its buttons. */
.dk-tl > .dk-corner-h > .dk-corner-t, .dk-bl > .dk-corner-h > .dk-corner-t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-tl > .dk-corner-h > button, .dk-bl > .dk-corner-h > button { flex: 0 0 auto; }
.dk-tl > .dk-corner-h > .dk-corner-sub, .dk-bl > .dk-corner-h > .dk-corner-sub { flex: 0 1000 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* THE RIGHT COLUMN, RE-LAID (14 Nov): the front desk's five symbols with
   their count bubbles, its items with ⏰ Now, and Settings as the rail's ⚙️. */
.dk-desk-heads { display: flex; gap: 10px; margin: 8px 0 10px; padding-right: 9px; justify-content: space-between; }
.dk-desk-head { position: relative; flex: 1 1 0; max-width: 56px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hush); border-radius: 10px; background: transparent; font-size: 21px; padding: 0; cursor: pointer; }
.dk-desk-head:hover { border-color: var(--teal-2); }
.dk-desk-head.is-now { border-color: rgba(239, 90, 80, .6); }
.dk-desk-head.is-on { background: rgba(239, 90, 80, .14); }
/* #1175 amended: Held's arrow points IN (teal), To deliver's points OUT
   (amber) -- a different direction and a different colour, each with its
   word on hover. */
.dk-desk-head-i.is-in { color: var(--teal); font-weight: 700; font-size: 20px; }
.dk-desk-head-i.is-out { color: var(--amber); font-weight: 700; font-size: 20px; }
.dk-desk-bub { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--panel); border: 1px solid #5aa9ff; color: #5aa9ff; font: 700 11px/17px var(--mono); text-align: center; }
.dk-desk-bub.is-red { border-color: #ef5a50; color: #ef5a50; }
.dk-desk-items { display: flex; flex-direction: column; min-height: 0; }
.dk-desk-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--rule); border-radius: 6px; }
.dk-desk-item.is-first { background: rgba(232, 163, 61, .12); }
.dk-desk-item-i { flex: 0 0 auto; font-size: 17px; }
.dk-desk-item-b { flex: 1 1 auto; min-width: 0; }
.dk-desk-item-t { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-desk-item-w { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-desk-item.is-first .dk-desk-item-w { color: var(--amber); }
.dk-desk-first { flex: 0 0 auto; min-height: 32px; padding: 2px 10px; border-radius: 9px; border: 1px solid var(--hush);
  background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.dk-desk-first:hover { border-color: var(--amber); }
/* #1174: an item opens its encounter; what it opened is said under it, and
   a locked note's addendum is written there. */
.dk-desk-item { flex-wrap: wrap; }
.dk-desk-item-b[role="button"] { cursor: pointer; border-radius: 6px; }
.dk-desk-item-say { flex: 1 0 100%; color: var(--dim); }
.dk-desk-addbox { flex: 1 0 100%; display: flex; gap: 6px; align-items: flex-start; }
.dk-desk-addtext { flex: 1 1 auto; min-width: 0; }
.dk-desk-first.is-on { border-color: var(--amber); background: rgba(232, 163, 61, .18); color: var(--amber); }
.dk-setrail-gap { flex: 1 1 auto; }
.dk-setgear { flex: 0 0 auto; }
.dk-setfly { position: fixed; z-index: 60; width: 320px; max-height: 80vh; overflow: auto; padding: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6); background: var(--panel); }

/* THE LEFT RAIL'S 📹 (14 Nov): the rail stays open, 📹 at its foot with a
   red count of video consultations asked for; its panel opens beside it. */
/* 💬 MESSAGE THE FRONT DESK (14 Nov): a sixth, smaller symbol on the Front
   Desk card's row, set apart by a hairline; its box opens under the row. */
.dk-desk-heads { gap: 6px; }
.dk-desk-head.is-msg { flex: 0 0 36px; max-width: 36px; margin-left: 4px; border-style: dashed; }
.dk-desk-head.is-msg.is-on { background: rgba(79, 214, 200, .14); border-style: solid; }
.dk-deskmsg { margin: -4px 0 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.dk-deskmsg-bar { display: flex; gap: 6px; align-items: flex-end; }
.dk-deskmsg-text { flex: 1 1 auto; min-width: 0; resize: vertical; font: inherit; font-size: 13.3px;
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel, transparent); color: var(--ink); }
.dk-deskmsg-send { flex: 0 0 auto; }
.dk-deskmsg-said:empty { display: none; }
.dk-deskmsg-row { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.dk-deskmsg-what { min-width: 0; overflow-wrap: anywhere; }
/* PRE-CLERK, PROPOSAL C (14 Nov 2026): the sheet with widths dragged at the
   head, the overdue summary on top, one track of items each dragged, edited
   and removed, a free row, and the card's favourites. */
.pc-sp { flex: 1 1 auto; }
.pc-tool { min-width: 38px; padding: 4px 10px; font-size: 16px; }
.pc-sheet { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 12.5px; }
.pc-sheet th, .pc-sheet td { border-bottom: 1px solid var(--line-soft); padding: 6px 8px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-th { position: relative; color: var(--dim); font-weight: 600; background: var(--panel-2); }
.pc-colgrip { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
.pc-colgrip::after { content: ''; position: absolute; right: 3px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--rule); opacity: .5; }
.pc-th.is-sizing .pc-colgrip::after, .pc-colgrip:hover::after { background: var(--teal); opacity: 1; }
.pc-sheet th.pc-c-days, .pc-sheet td.pc-c-days { width: 44px; }
.pc-sheet th.pc-c-admit { width: 92px; }
.pc-sheet th.pc-c-ready { width: 72px; }
.pc-sheet th.pc-c-kind { width: 112px; }
.pc-tr { cursor: pointer; }
.pc-tr:hover td { background: rgba(114,229,213,.04); }
.pc-tr.is-picked td { background: rgba(114,229,213,.09); }
.pc-kind { font: 600 10.5px var(--mono); letter-spacing: .05em; border-radius: 5px; padding: 1px 6px; color: #9cc4ff; background: rgba(120,160,255,.14); }
.pc-k-investigation { color: var(--amber); background: rgba(227,196,84,.13); }
.pc-k-procedure { color: #d6a6ff; background: rgba(190,140,255,.14); }
.pc-prog.is-late { color: var(--red); }
.pc-prog.is-done { color: var(--teal); }
.pc-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 4px 0 8px; }
.pc-sum.is-late { border-color: rgba(255,154,141,.55); background: rgba(255,154,141,.06); }
.pc-sum-h { font: 600 12px var(--mono); letter-spacing: .06em; color: var(--dim); white-space: nowrap; }
.pc-sum.is-late .pc-sum-h { color: var(--red); }
.pc-sum-c { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; border: 1px solid rgba(255,154,141,.55);
  border-radius: 10px; padding: 3px 9px; background: var(--panel); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.pc-sum-r { font-size: 11px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; color: var(--teal-2); }
.pc-sum-m { font-size: 12px; color: var(--dimmer); white-space: nowrap; }
.pc-full { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: 14px 20px; gap: 6px; }
.pc-full-h { display: flex; align-items: center; gap: 8px; }
.pc-full-t { font-weight: 600; font-size: 18px; }
.pc-full-b { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.pc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pc-tab.is-on { border-color: var(--teal); color: var(--teal); }
.pc-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: var(--pc-left, minmax(320px, 40%)) 8px minmax(360px, 1fr); gap: 4px; }
/* 26 Nov: the divider between the list and the card (preclerk.ts splitGrip). */
.pc-grip { cursor: col-resize; border-radius: 4px; background: transparent; touch-action: none; }
.pc-grip::after { content: ''; display: block; width: 2px; height: 40px; margin: 40vh auto 0; border-radius: 2px; background: var(--line); }
.pc-grip:hover::after, .pc-grip.is-drag::after, .pc-grip:focus-visible::after { background: var(--teal); }
.pc-grip:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.pc-left, .pc-right { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: auto; min-height: 0; }
.pc-right { padding: 0 0 12px; }
.pc-card-h { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.pc-card-n { white-space: nowrap; }
.pc-acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: nowrap; }
.pc-sheet th.pc-c-patient { width: 150px; }
.pc-card-w { color: var(--dimmer); font-size: 12.5px; }
.pc-grp { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); padding: 9px 12px 5px; }
.pc-say { padding: 0 12px; }
.pc-items { display: flex; flex-direction: column; }
.pc-item { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line-soft); font-size: 13.3px; }
.pc-item.is-late { background: rgba(255,154,141,.08); box-shadow: inset 3px 0 var(--red); }
.pc-item.is-due { box-shadow: inset 3px 0 rgba(255,209,122,.6); }
.pc-item .pc-task-t { flex: 1 1 auto; min-width: 0; }
.pc-item.is-own .pc-task-t::after { content: '  \00b7 this patient'; font: 11px var(--mono); color: var(--teal); }
.pc-item .pc-task-by { margin-left: 0; white-space: nowrap; }
/* AN ITEM THAT DOES NOT APPLY TO THIS PATIENT (15 Nov 2026): greyed, in
   italics, its reason beside it -- and counted towards nothing. */
.pc-item.is-na .pc-task-t { color: var(--faint); font-style: italic; }
.pc-item.is-na .pc-task-by { color: var(--faint); white-space: normal; flex: 0 1 45%; text-align: right; }
.pc-item.is-dragging { outline: 1.5px dashed var(--teal); outline-offset: -2px; background: var(--panel-2); }
.pc-item.is-drop-before, .pc-tpl-it.is-drop-before { box-shadow: inset 0 3px var(--teal); }
.pc-item.is-drop-after, .pc-tpl-it.is-drop-after { box-shadow: inset 0 -3px var(--teal); }
.pc-grip-r { background: transparent; border: 0; color: var(--faint); cursor: grab; touch-action: none; font-size: 14px; letter-spacing: -3px; padding: 4px 2px; min-width: 22px; }
.pc-grip-r:hover { color: var(--teal-2); }
.pc-ed { background: transparent; border: 0; color: var(--faint); cursor: pointer; font-size: 13px; padding: 4px 5px; white-space: nowrap; }
.pc-ed:hover { color: var(--teal-2); }
.pc-del.is-arm { color: var(--red); border: 1px solid var(--red); border-radius: 8px; padding: 2px 8px; }
.pc-in { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 6px 9px; font: inherit; font-size: 13px; min-width: 0; }
.pc-in:focus { outline: none; border-color: var(--teal); }
.pc-item .pc-in { flex: 1 1 auto; }
.pc-free { display: flex; gap: 8px; padding: 8px 12px; align-items: center; }
.pc-free .pc-in { flex: 1 1 auto; border-style: dashed; }
.pc-add-b { border-color: var(--teal) !important; color: var(--teal) !important; white-space: nowrap; }
.pc-fav { position: relative; }
.pc-fav-b { border-color: var(--amber) !important; color: var(--amber) !important; white-space: nowrap; }
.pc-fav-add { white-space: nowrap; }
.pc-pop, .pc-ask { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(460px, 80vw); background: var(--panel-2);
  border: 1px solid var(--amber); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.6); overflow: hidden; }
.pc-ask { border-color: var(--teal); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-pop-h { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.pc-ask .pc-pop-h { color: var(--teal); padding: 0; border: 0; }
.pc-pop-r { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.pc-pop-n { flex: 1 1 auto; min-width: 0; }
.pc-pop-s { color: var(--dimmer); font-size: 12px; margin-top: 2px; }
.pc-pop-pad { padding: 8px 12px; }
.pc-kind-chip { font: 600 10.5px var(--mono); color: var(--dim); white-space: nowrap; }
.pc-use { border-color: var(--teal) !important; color: var(--teal) !important; }
.pc-ask-b { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 8px 12px; }
.pc-tpl { display: flex; flex-direction: column; }
.pc-tpl-r { display: grid; grid-template-columns: 26px minmax(0, 1fr) 230px 96px 140px 40px; gap: 8px; align-items: center; padding: 4px 12px; border-top: 1px solid var(--line-soft); }
.pc-tpl-hd { color: var(--dim); font-weight: 600; font-size: 12px; border-top: 0; }
.pc-tpl-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; color: var(--dim); font-size: 12.5px; }
.pc-in-n { width: 80px; }
@media (max-width: 899px) {
  .pc-grid { grid-template-columns: minmax(0, 1fr); }
  .pc-grip { display: none; }
  .pc-full { padding: 10px; }
  .pc-tpl-r { grid-template-columns: 26px minmax(0, 1fr) 120px 64px 40px; }
  .pc-tpl-r > select:last-of-type { display: none; }
}

/* RECENT CASES AS A SHEET (14 Nov), in the day sheet's own look: its
   table, headers and cells are .dy-sheet's; these are the header's sort
   buttons and the cells only this sheet has. */
.rcs-sort { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.rcs-sort:hover, .dy-th.is-on .rcs-sort { color: var(--teal); }
.rcs-sort:focus-visible { outline: 1px solid var(--teal); outline-offset: 2px; }
.rcs-tr { cursor: pointer; }
.rcs-when { color: var(--dim); white-space: nowrap; }
.rcs-n { text-align: right; }
.dy-sheet .dy-td .dy-who.rcs-reg { color: var(--ink); border-color: var(--rule); }
.rcs-sheet .pt-tag { margin-left: 6px; }
.rcs-sheet .dy-c-name { white-space: normal; }
.rcs-sheet .dy-th, .rcs-sheet .dy-td { white-space: nowrap; }
.rcs-sheet .dy-td.dy-c-name, .rcs-sheet .dy-th.dy-c-overdue, .rcs-sheet .dy-td.dy-c-overdue { white-space: normal; }
.rcs-sheet .dy-td.dy-c-overdue .rcs-due-chip { margin: 1px 4px 1px 0; }
.rcs-n + .rcs-due, .rcs-due { white-space: nowrap; }
.rcs-due-chip { display: inline-block; margin-right: 5px; padding: 1px 7px; border-radius: 999px; font: 600 12px var(--mono);
  border: 1px solid rgba(239, 90, 80, .55); color: var(--red); background: rgba(239, 90, 80, .10); }
.rcs-due-none { color: var(--faint); }
.rcs-due-q { color: var(--dim); }
/* The day bar's tools, symbols kept to the right (14 Nov). */
.dy-tools { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.dy-tool { min-width: 44px; justify-content: center; font-size: 17px; padding-left: 10px; padding-right: 10px; }
.dy-tools .dy-cols { display: inline-flex; }
.dy-tools .dy-cols-list { left: auto; right: 0; }
/* On the desk centre's one row (20 Nov 2026: "2nd row buttons are too big"):
   the day's ↻ ⚙ ⤢ are the size of the row's other buttons, not 44px tiles. */
.dk-car-tools .dy-tools { gap: 4px; }
.dk-car-tools .dy-tool { min-width: 0; min-height: 0; font-size: 13px; padding: 3px 8px; line-height: 1.2; }
.dk-telebtn { position: relative; }
/* A rail's panel floats beside its rail: beats .dk-corner's position: relative. */
.dk-corner.dk-setfly, .dk-corner.dk-telefly, .dk-corner.dk-leavefly { position: fixed; }
.dk-leavefly { position: fixed; z-index: 60; width: 380px; max-height: 80vh; overflow: auto; padding: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
/* THE DAY AS A SHEET (14 Nov): rows and columns, ruled like a spreadsheet,
   the header kept in view as the rows scroll. */
.dy-sheet-wrap { overflow-x: hidden; overflow-y: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: 8px; }
.dy-sheet { table-layout: auto; }
.dy-sheet-note { margin-top: 6px; font-size: 12px; color: var(--amber); }
.dy-sheet-note[hidden] { display: none; }
.dy-cols-off { margin-left: auto; font-size: 11px; color: var(--amber); }
/* ⤢ the day over the whole screen (14 Nov). */
.dy-max { position: fixed !important; inset: 0; z-index: 70; overflow-y: auto; padding: 16px 20px;
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); }
.dy-sheet { border-collapse: collapse; width: 100%; font-size: 13px; }
.dy-sheet .dy-th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 6px 8px;
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); color: var(--dim);
  font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--hush); cursor: grab; white-space: nowrap; }
.dy-sheet .dy-td { padding: 5px 8px; border-bottom: 1px solid var(--hush); border-right: 1px solid var(--hush);
  white-space: nowrap; vertical-align: middle; }
.dy-sheet .dy-tr:hover .dy-td { background: rgba(79, 214, 200, 0.06); }
.dy-sheet .dy-td .dy-who { font: inherit; padding: 0; text-align: left; border: 0; background: transparent; color: var(--teal); cursor: pointer; }
.dy-sheet .dy-td .dy-who:hover { text-decoration: underline; }
.dy-cols { position: relative; display: inline-block; }
/* Visit type, the waiting room's colours, and grey where not known (14 Nov). */
/* THE DISCHARGED LIST (15 Nov 2026, app/discharged.ts). The table, headers
   and cells are .dy-sheet's; these are its own: a column keeps the width he
   drags it to, so this sheet may scroll sideways where the day's may not. */
.dc-wrap { overflow-x: auto; }
.dy-sheet.dc-sheet { table-layout: fixed; width: max-content; min-width: 0; }
.dc-sheet .dc-th { position: sticky; padding-right: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-sheet .dc-td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-sort { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dc-rz { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; touch-action: none; border-right: 2px solid transparent; }
.dc-rz:hover, .dc-rz:focus-visible { border-right-color: var(--teal); outline: none; }
.dc-window { display: inline-flex; gap: 4px; margin-right: 6px; }
.dc-win.is-on { border-color: var(--teal); background: var(--selected-bg); color: var(--teal); font-weight: 700; }
.dc-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 600 12px var(--sans, inherit); border: 1px solid var(--rule); background: transparent; color: var(--dim); cursor: pointer; white-space: nowrap; }
.dc-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 600 12px var(--sans, inherit); border: 1px solid var(--rule); color: var(--dim); white-space: nowrap; }
.dc-tag.is-wait { border-color: rgba(224,164,74,.55); color: var(--amber-ink); }
.dc-tag.is-done { border-color: rgba(108,195,142,.55); color: #6cc38e; }
.dc-chip.is-wait { border-color: rgba(224,164,74,.55); color: var(--amber-ink); background: rgba(224,164,74,.10); }
.dc-chip.is-done { border-color: rgba(108,195,142,.55); color: #6cc38e; background: rgba(108,195,142,.10); }
.dc-view { padding: 1px 9px; }
.dc-detail-td { padding: 10px 12px; background: rgba(0,0,0,.14); border-bottom: 1px solid var(--hush); white-space: normal; }
.dc-detail-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.dc-detail-l { font-size: 13px; line-height: 1.6; }
.dc-detail-n { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.dc-detail-v { display: flex; gap: 12px; align-items: center; justify-content: space-between; max-width: 520px; padding: 3px 0; }
.dc-detail-add { display: flex; gap: 6px; max-width: 520px; margin-top: 8px; }
.dc-screen .ask-line:empty { display: none; }
.dy-sheet.dc-sheet.is-fit { table-layout: auto; width: 100%; }
.dc-sheet.is-fit .dc-th, .dc-sheet.is-fit .dc-td { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; padding-left: 6px; padding-right: 6px; }
.dc-sheet.is-fit .dc-rz { display: none; }
.dc-sheet.is-fit .dc-chip, .dc-sheet.is-fit .dc-tag { white-space: normal; }

.dy-visit-new { color: #e3c454; background: rgba(227,196,84,0.13); }
.dy-visit-followup { color: #6cc38e; background: rgba(108,195,142,0.13); }
.dy-visit-unknown { color: var(--dim); background: rgba(150,150,150,0.12); }
.dy-sheet .dy-td .dy-who.wr-visit { padding: 1px 6px; border: 1.5px solid currentColor; }
.dy-sheet .dy-td .dy-who.dy-visit-new { color: #e3c454; }
.dy-sheet .dy-td .dy-who.dy-visit-followup { color: #6cc38e; }
.dy-sheet .dy-td .dy-who.dy-visit-unknown { color: var(--dim); }
.dy-cols > summary { list-style: none; cursor: pointer; }
.dy-cols > summary::-webkit-details-marker { display: none; }
.dy-cols-list { position: absolute; z-index: 40; left: 0; top: calc(100% + 4px); min-width: 210px; padding: 8px;
  display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--rule); border-radius: 10px;
  background: linear-gradient(var(--panel), var(--panel)), var(--bg); box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.dy-cols-row { display: flex; align-items: center; gap: 4px; }
.dy-cols-list { max-height: 60vh; overflow-y: auto; }
.dy-cols-g { margin-top: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.dy-cols-l { flex: 1 1 auto; font-size: 13px; }
.dy-cols-mv { min-width: 28px; min-height: 26px; padding: 0 6px; }
/* The week's key on ONE line, short forms, the full term on hover (14 Nov). */
.wk-legend { flex-wrap: nowrap; overflow: hidden; gap: 8px; }
.wk-lg { white-space: nowrap; flex: 0 0 auto; cursor: help; }
/* The desktop's waiting room, one patient at a glance (14 Nov). */
.wr-row.wr-compact .wr-head { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.wr-row.wr-compact .wr-call { margin-left: auto; min-width: 36px; min-height: 32px; padding: 0 8px; font-size: 16px; }
.dk-pins.dk-pins-steady { border-style: solid; background: var(--panel); }
/* One left rail (14 Nov): the column opens beside it; the side's old fold
   rail is not drawn, and a closed column takes no width. */
.dk-left-onerail > .dk-left-rail { display: none !important; }
.dk-left-onerail .dk-side-collapse[aria-label="Collapse left panels"] { display: none; }
.dk-left-onerail.dk-left-collapsed { --dk-left-track: 0px; }
.dk-seatsyms { display: flex; flex-direction: column; gap: 6px; }
.dk-coltoggle { color: var(--dim); font-size: 15px; }
.dk-seatsym.is-on, .dk-seatfoot.is-on { border-color: var(--teal-2); box-shadow: inset 3px 0 0 var(--teal-2); }
.dk-left-rail > .dk-telebtn { margin-top: auto; }
.dk-telefly { position: fixed; z-index: 60; width: 320px; max-height: 80vh; overflow: auto; padding: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }

/* ── desktop type scale — base 10pt = 13.3px (LE-58, the integrator's parcel) ──
   GENERATED by tools/desktop_type_scale.py from every px font-size above that
   can reach a desktop -- regenerate after a stylesheet change, never edit here.
   The phone keeps the base sizes: this applies at the desktop's width alone.
   1973 selectors; text never under 13.3px, a kicker never under 11px. ── */
@media (min-width: 1100px) {
  .cbb-label { font-size: 13.3px; }  /* was 11px */
  .cbb-foot { font-size: 13.3px; }  /* was 11px */
  .pam-note { font-size: 13.3px; }  /* was 11px */
  .kicker { font-size: 12px; }  /* kicker, was 10px */
  .btn { font-size: 17px; }  /* was 15px */
  .wordmark { font-size: 12px; }  /* kicker, was 10px */
  .avatar { font-size: 13.3px; }  /* was 10px */
  .who-name { font-size: 14px; }  /* was 12px */
  .who-sub { font-size: 11px; }  /* kicker, was 8px */
  .pill { font-size: 12px; }  /* kicker, was 10px */
  .patient { font-size: 18px; }  /* was 16px */
  .patient-sub { font-size: 14px; }  /* was 12px */
  .wr-jt { font-size: 13.3px; }  /* was 11px */
  .wr-route { font-size: 13.3px; }  /* was 11px */
  .study .mod { font-size: 13.3px; }  /* was 10px */
  .study .centre { font-size: 13.3px; }  /* was 11px */
  .study .glyph { font-size: 13.3px; }  /* was 11px */
  .meter { font-size: 13.3px; }  /* was 10px */
  .pc-k { font-size: 13.3px; }  /* was 11px */
  .pc-v { font-size: 14px; }  /* was 12px */
  .demo-banner { font-size: 13.3px; }  /* kicker, was 12px */
  .ew-kicker { font-size: 12px; }  /* kicker, was 11px */
  .ew-name { font-size: 15px; }  /* was 13px */
  .ew-detail { font-size: 13.3px; }  /* was 11px */
  .ew-icon { font-size: 17px; }  /* was 15px */
  .ew-label { font-size: 14px; }  /* was 12px */
  .ew-state { font-size: 13.3px; }  /* was 11px */
  .load-failed-s { font-size: 13.3px; }  /* was 11px */
  .sec-head { font-size: 11px; }  /* kicker, was 9px */
  .sec-note { font-size: 13.3px; }  /* was 11px */
  .field-label { font-size: 16px; }  /* was 14px */
  .field-unit { font-size: 13.3px; }  /* was 9px */
  .field-state { font-size: 11px; }  /* kicker, was 8px */
  .evidence { font-size: 15px; }  /* was 13px */
  .evidence .src { font-size: 11px; }  /* kicker, was 8px */
  .opt { font-size: 17px; }  /* was 15px */
  .confirm .small { font-size: 16px; }  /* was 14px */
  .confirm .src { font-size: 13.3px; }  /* was 10px */
  .alt .alt-detail { font-size: 15px; }  /* was 13px */
  .slide .lab { font-size: 16px; }  /* was 14px */
  .map-arrow, .map-tick { font-size: 12px; }  /* kicker, was 10px */
  .map-arrow { font-size: 14px; }  /* was 12px */
  .map-lab { font-size: 11px; }  /* kicker, was 9px */
  .map-meter { font-size: 13.3px; }  /* was 10px */
  .map-wrap.is-big .map-tick { font-size: 13.3px; }  /* was 11px */
  .wb-sym { font-size: 13.3px; }  /* was 11px */
  .wb-sym-n { font-size: 13.3px; }  /* was 11px */
  .wb-none, .wb-hint { font-size: 13.3px; }  /* was 11px */
  .wb-editor h2 { font-size: 18px; }  /* was 16px */
  .wb-editor .wb-base-from { font-size: 13.3px; }  /* was 11px */
  .wb-said { font-size: 13.3px; }  /* was 11px */
  .wb-float-grip { font-size: 13.3px; }  /* kicker, was 12px */
  .tcu-k { font-size: 13.3px; }  /* was 11px */
  .tcu-why, .tcu-said { font-size: 13.3px; }  /* was 11px */
  .tcu-mode-s { font-size: 13.3px; }  /* was 11px */
  .tcu-pend-say { font-size: 14px; }  /* was 12.5px */
  .tcu .tcu-b, .tcu .tcu-st { font-size: 14px; }  /* was 12.5px */
  .lb-kind, .lb-who, .lb-by, .lb-none, .lb-said, .lb-patient { font-size: 13.3px; }  /* was 11px */
  .lb-lane-who { font-size: 13.3px; }  /* was 11px */
  .tx-confirm .tx-k { font-size: 13.3px; }  /* was 11px */
  .tx-when, .tx-n, .tx-meta, .tx-none, .tx-said, .tx-snip-l { font-size: 13.3px; }  /* was 11px */
  .ans-k, .ans-said, .ans-src, .ans-tag { font-size: 13.3px; }  /* was 11px */
  .wb-imp::before { font-size: 13.3px; }  /* was 11px */
  .wb-rgrip { font-size: 11px; }  /* kicker, was 9px */
  .waiting { font-size: 16px; }  /* was 14px */
  .tick { font-size: 13.3px; }  /* was 10px */
  .kind { font-size: 11px; }  /* kicker, was 8px */
  .block-h { font-size: 11px; }  /* kicker, was 9px */
  .block-src { font-size: 13.3px; }  /* was 8px */
  .block-t { font-size: 16px; }  /* was 14px */
  .mic { font-size: 12px; }  /* kicker, was 10px */
  .take-section { font-size: 11px; }  /* kicker, was 9px */
  .take-where { font-size: 14px; }  /* was 12px */
  .take-when { font-size: 13.3px; }  /* was 10px */
  .take-src { font-size: 11px; }  /* kicker, was 8px */
  .footrule { font-size: 14px; }  /* was 12px */
  .sect-h { font-size: 12px; }  /* kicker, was 11px */
  .sect-n { font-size: 13.3px; }  /* was 10px */
  .sheet-h { font-size: 11px; }  /* kicker, was 9px */
  .sheet-t1 { font-size: 17px; }  /* was 15px */
  .sheet-t2 { font-size: 13.3px; }  /* was 11.5px */
  .sheet-cancel { font-size: 16px; }  /* was 14px */
  .file-said { font-size: 14px; }  /* was 12px */
  .take-text { font-size: 15px; }  /* was 13px */
  .spine-said { font-size: 13.3px; }  /* was 11px */
  .rec-n { font-size: 12px; }  /* kicker, was 10.5px */
  .rec-state { font-size: 12px; }  /* kicker, was 10px */
  .rec-sub { font-size: 13.3px; }  /* was 10.5px */
  .rec-text { font-size: 15px; }  /* was 13px */
  .rec-say { font-size: 13.3px; }  /* was 10.5px */
  .btn-small { font-size: 13.3px; }  /* was 11.5px */
  .file-auto { font-size: 13.3px; }  /* was 11px */
  .sect-open { font-size: 12px; }  /* kicker, was 10.5px */
  .cap-drawer-h { font-size: 11px; }  /* kicker, was 9px */
  .sect-all { font-size: 12px; }  /* kicker, was 11px */
  .review-red { font-size: 13.3px; }  /* was 11px */
  .points-n { font-size: 13.3px; }  /* was 11px */
  .pt-n { font-size: 13.3px; }  /* was 10.5px */
  .pt-kind { font-size: 12px; }  /* kicker, was 10px */
  .pt-was, .pt-mark { font-size: 12px; }  /* kicker, was 10px */
  .pt-heard { font-size: 13.3px; }  /* was 11.5px */
  .pt-heard-note { font-size: 13.3px; }  /* was 10.5px */
  .pt-sug { font-size: 14px; }  /* was 12px */
  .pt-sug-l { font-size: 12px; }  /* kicker, was 10px */
  .pt-unc { font-size: 13.3px; }  /* was 11.5px */
  .say-q { font-size: 14px; }  /* was 12px */
  .close-n { font-size: 13.3px; }  /* was 11px */
  .close-why { font-size: 13.3px; }  /* was 11.5px */
  .wd-menu-h { font-size: 14px; }  /* was 12px */
  .wd-read { font-size: 13.3px; }  /* was 11px */
  .wd-strip-svg .wd-ax, .wd-strip-svg .wd-lab { font-size: 13.3px; }  /* was 11px */
  .wd-strip-svg .wd-val { font-size: 13.3px; }  /* was 11px */
  .wd-strip-svg .wd-note { font-size: 14px; }  /* was 12px */
  .mn-n { font-size: 13.3px; }  /* was 11px */
  .mn-latest { font-size: 12px; }  /* kicker, was 10px */
  .mn-to { font-size: 12px; }  /* kicker, was 10px */
  .mn-vr { font-size: 13.3px; }  /* was 10px */
  .mn-rm { font-size: 13.3px; }  /* was 10px */
  .mn-sum-n { font-size: 13.3px; }  /* was 11px */
  .wr-n { font-size: 13.3px; }  /* was 11px */
  .wr-comm { font-size: 15px; }  /* was 13px */
  .pp-t { font-size: 15px; }  /* was 13px */
  .pp-check { font-size: 14px; }  /* was 12px */
  .pp-row { font-size: 14px; }  /* was 12.5px */
  .pp-head { font-size: 13.3px; }  /* was 11px */
  .pp-in { font-size: 14px; }  /* was 12.5px */
  .pp-note { font-size: 13.3px; }  /* was 11.5px */
  .wr-lamp { font-size: 13.3px; }  /* was 10px */
  .wr-why { font-size: 14px; }  /* was 12px */
  .wr-wait { font-size: 13.3px; }  /* was 11px */
  .wr-note { font-size: 13.3px; }  /* was 11.5px */
  .wr-new-t { font-size: 14px; }  /* was 12px */
  .dy-sum { font-size: 13.3px; }  /* was 11.5px */
  .dy-why { font-size: 13.3px; }  /* was 11px */
  .dy-date { font-size: 14px; }  /* was 12.5px */
  .dy-away { font-size: 13.3px; }  /* was 11px */
  .dy-call { font-size: 13.3px; }  /* was 11px */
  .dy-deskshort { font-size: 13.3px; }  /* was 11px */
  .dy-count { font-size: 13.3px; }  /* was 11px */
  .dy-row { font-size: 14px; }  /* was 12px */
  .dy-at { font-size: 13.3px; }  /* was 11px */
  .dy-icon { font-size: 13.3px; }  /* was 11px */
  .dy-note { font-size: 13.3px; }  /* was 11px */
  .dy-clip { font-size: 13.3px; }  /* was 11px */
  .dy-more, .dy-empty { font-size: 13.3px; }  /* was 11px */
  .fo-mrn { font-size: 13.3px; }  /* was 11px */
  .fo-allergy { font-size: 13.3px; }  /* was 11px */
  .fo-test { font-size: 13.3px; }  /* was 11px */
  .fo-review-k { font-size: 12px; }  /* kicker, was 11px */
  .fo-review-t { font-size: 15px; }  /* was 13px */
  .fo-h { font-size: 12px; }  /* kicker, was 11px */
  .fo-k { font-size: 13.3px; }  /* was 11.5px */
  .fo-v { font-size: 14px; }  /* was 12px */
  .fo-enc { font-size: 14px; }  /* was 12px */
  .fo-enc-r { font-size: 13.3px; }  /* was 11px */
  .fo-more, .fo-none { font-size: 13.3px; }  /* was 11px */
  .fv-h1 .fo-mrn { font-size: 15px; }  /* was 13px */
  .fv-who { font-size: 16px; }  /* was 14px */
  .fv-h1 .fo-allergy { font-size: 13.3px; }  /* kicker, was 12px */
  .fv-review-t { font-size: 14px; }  /* was 12.5px */
  .fv-k { font-size: 12px; }  /* kicker, was 11px */
  .fv-v { font-size: 16px; }  /* was 14px */
  .fv-prog { font-size: 14px; }  /* was 12px */
  .fv-hbtn { font-size: 15px; }  /* was 13px */
  .fv-tab { font-size: 15px; }  /* was 13px */
  .fv-tab-n { font-size: 13.3px; }  /* was 11px */
  .fv-write-t { font-size: 14px; }  /* was 12px */
  .fv-rail-fold { font-size: 14px; }  /* was 12px */
  .fv-tile-t { font-size: 12px; }  /* kicker, was 11px */
  .fv-tile-s { font-size: 13.3px; }  /* was 11px */
  .fv-sub { font-size: 12px; }  /* kicker, was 10.5px */
  .fv-none { font-size: 14px; }  /* was 12.5px */
  .fv-icard-fact .fv-k { font-size: 14px; }  /* was 12px */
  .fv-icard-x { font-size: 14px; }  /* was 12.5px */
  .fv-icard-cap { font-size: 14px; }  /* was 12.5px */
  .fv-icard-w { font-size: 14px; }  /* was 12px */
  .fv-st { font-size: 15px; }  /* was 13px */
  .fv-st-hb { font-size: 13.3px; }  /* kicker, was 12px */
  .fv-st-arrow { font-size: 13.3px; }  /* was 10px */
  .iv-older { font-size: 14px; }  /* was 12px */
  .dt-bullet { font-size: 15px; }  /* was 13px */
  .or-egfr { font-size: 15px; }  /* was 13px */
  .cbt-k { font-size: 12px; }  /* kicker, was 11px */
  .cbt-chip, .cbt-filter { font-size: 13.3px; }  /* was 11.5px */
  .cb-conn { font-size: 14px; }  /* was 12px */
  .cb-k { font-size: 12px; }  /* kicker, was 10px */
  .cb-sec { font-size: 14px; }  /* was 12px */
  .cb-sec-n { font-size: 13.3px; }  /* was 11px */
  .cb-tab.is-folded .cb-sec-n { font-size: 13.3px; }  /* was 10px */
  .cb-title { font-size: 15px; }  /* was 13px */
  .cb-foot { font-size: 13.3px; }  /* was 11px */
  .cb-pill { font-size: 13.3px; }  /* was 11px */
  .cb-act { font-size: 14px; }  /* was 12px */
  .fv-enc-when { font-size: 14px; }  /* was 12px */
  .fv-enc-what { font-size: 15px; }  /* was 13.5px */
  .fv-enc-by { font-size: 14px; }  /* was 12px */
  .fv-enc-spec { font-size: 15px; }  /* was 13px */
  .fv-enc-now { font-size: 14px; }  /* was 12px */
  .fv-enc-tech-say { font-size: 14px; }  /* was 12px */
  .fv-enc-where, .fv-enc-dxc, .fv-enc-syn { font-size: 15px; }  /* was 13px */
  .fv-enc-h { font-size: 12px; }  /* kicker, was 10.5px */
  .fv-shelf-b { font-size: 13.3px; }  /* was 11.5px */
  .fv-appt-when { font-size: 14px; }  /* was 12px */
  .fv-appt-what { font-size: 15px; }  /* was 13px */
  .fv-appt-spec { font-size: 14px; }  /* was 12.5px */
  .fv-appt-by { font-size: 14px; }  /* was 12px */
  .smf-q { font-size: 15px; }  /* was 13px */
  .smf-chip { font-size: 15px; }  /* was 13px */
  .smf-say { font-size: 14px; }  /* was 12px */
  .fv-ne-note { font-size: 15px; }  /* was 13px */
  .fv-ne-b { font-size: 15px; }  /* was 13px */
  .fv-ne-say { font-size: 14px; }  /* was 12.5px */
  .fv-enc-dx { font-size: 14px; }  /* was 12.5px */
  .fv-enc-ctl { font-size: 14px; }  /* was 12px */
  .fv-ver-b { font-size: 14px; }  /* was 12px */
  .fv-sum-pt { font-size: 15px; }  /* was 13px */
  .fv-sum-from { font-size: 13.3px; }  /* was 11.5px */
  .fv-cn-h { font-size: 13.3px; }  /* kicker, was 13.5px */
  .fv-cn-sub { font-size: 15px; }  /* was 13px */
  .fv-cn-pt { font-size: 15px; }  /* was 13px */
  .fv-cn-p { font-size: 15px; }  /* was 13px */
  .fv-sum-said { font-size: 14px; }  /* was 12px */
  .fv-sum-on { font-size: 14px; }  /* was 12px */
  .fv-sum-n { font-size: 13.3px; }  /* was 11.5px */
  .fv-sum-l { font-size: 14px; }  /* was 12.5px */
  .fv-sec-h { font-size: 12px; }  /* kicker, was 10.5px */
  .fv-sec-t { font-size: 15px; }  /* was 13px */
  .fv-pdf-said { font-size: 14px; }  /* was 12px */
  .fv-sheet-t { font-size: 17px; }  /* was 15px */
  .pp-compact .pp-remove { font-size: 13.3px; }  /* was 11px */
  .fv-dcard-k { font-size: 12px; }  /* kicker, was 11px */
  .fv-card .fv-kv, .fv-card .fv-prog { font-size: 15px; }  /* was 13px */
  .fv-headgrip { font-size: 15px; }  /* was 13px */
  .fv-sec-k { font-size: 12px; }  /* kicker, was 10px */
  .fv-acc { font-size: 14px; }  /* was 12px */
  .fv-lang { font-size: 14px; }  /* was 12px */
  .fv-comm { font-size: 14px; }  /* was 12px */
  .pp-large .pp-remove { font-size: 15px; }  /* was 13px */
  .fv-grp > .btn, .fv-grp > button { font-size: 15px; }  /* was 13px */
  .fv-bee { font-size: 17px; }  /* was 15px */
  .fv-tree { font-size: 13.3px; }  /* was 11px */
  .ft-k { font-size: 12px; }  /* kicker, was 10px */
  .ft-rel { font-size: 11px; }  /* kicker, was 9px */
  .ft-name { font-size: 13.3px; }  /* was 11px */
  .ft-key { font-size: 13.3px; }  /* was 9px */
  .pp-remove { font-size: 16px; }  /* was 14px */
  .pp-ask-q { font-size: 15px; }  /* was 13px */
  .pp-ask-k { font-size: 13.3px; }  /* was 11px */
  .pp-ask-said { font-size: 14px; }  /* was 12px */
  .pp-words { font-size: 14px; }  /* was 12px */
  .sd-phone-h { font-size: 12px; }  /* kicker, was 11px */
  .sd-phone-s { font-size: 14px; }  /* was 12px */
  .sd-phone-g { font-size: 12px; }  /* kicker, was 11px */
  .sd-bar-h { font-size: 12px; }  /* kicker, was 11px */
  .sd-nav { font-size: 16px; }  /* was 14px */
  .sd-view-b { font-size: 14px; }  /* was 12px */
  .sd-tab { font-size: 15px; }  /* was 13px */
  .su-k { font-size: 14px; }  /* was 12px */
  .st-subtab { font-size: 14px; }  /* was 12.5px */
  .ci-arr-t { font-size: 16px; }  /* was 14px */
  .ci-arr-sub { font-size: 14px; }  /* was 12px */
  .ci-arr-reg { font-size: 15px; }  /* was 13px */
  .ci-arr-grip { font-size: 13.3px; }  /* kicker, was 13px */
  .ci-arr-sym { font-size: 17px; }  /* was 15px */
  .ci-arr-lapsed { font-size: 14px; }  /* was 12.5px */
  .ci-arr-at { font-size: 14px; }  /* was 12px */
  .ci-arr-drop { font-size: 14px; }  /* was 12.5px */
  .ci-arr-how { font-size: 14px; }  /* was 12px */
  .ci-arr-scan-t { font-size: 14px; }  /* was 12.5px */
  .ci-arr-scan-in { font-size: 14px; }  /* was 12.5px */
  .ci-arr-said { font-size: 14px; }  /* was 12px */
  .ci-arr-none { font-size: 14px; }  /* was 12.5px */
  .dp-cap { font-size: 12px; }  /* kicker, was 11px */
  .dp-l { font-size: 16px; }  /* was 14px */
  .dp-sub { font-size: 14px; }  /* was 12px */
  .sd-note { font-size: 15px; }  /* was 13px */
  .ask-line { font-size: 14px; }  /* was 12px */
  .ask-change { font-size: 15px; }  /* was 13px */
  .ask-dialog-h { font-size: 12px; }  /* kicker, was 11px */
  .ask-dialog .ask-q { font-size: 14px; }  /* was 12px */
  .rad-h { font-size: 12px; }  /* kicker, was 11px */
  .rad-sec-h { font-size: 12px; }  /* kicker, was 10.5px */
  .rad-alert-key { font-size: 12px; }  /* kicker, was 11px */
  .rad-pill { font-size: 12px; }  /* kicker, was 10px */
  .rad-unseen { font-size: 12px; }  /* kicker, was 10px */
  .fpt-tab, .fpt-btn, .fpt-help { font-size: 14px; }  /* was 12px */
  .fpt-n { font-size: 13.3px; }  /* was 11px */
  .fpt-help-note { font-size: 14px; }  /* was 12px */
  .fpt-when { font-size: 13.3px; }  /* was 11px */
  .fpt-l2 { font-size: 14px; }  /* was 12px */
  .fpt-none, .fpt-note { font-size: 14px; }  /* was 12px */
  .far-f { font-size: 14px; }  /* was 12px */
  .far-l { font-size: 13.3px; }  /* was 11px */
  .far-in { font-size: 14px; }  /* was 12px */
  .fpt-in { font-size: 15px; }  /* was 13px */
  .fpt-urgent { font-size: 14px; }  /* was 12px */
  .fpt-sent-h { font-size: 12px; }  /* kicker, was 11px */
  .qd { font-size: 15px; }  /* was 13px */
  .qd-status { font-size: 14px; }  /* was 12px */
  .qd-place { font-size: 17px; }  /* was 15px */
  .qd-clock { font-size: 17px; }  /* was 15px */
  .qd-doc { font-size: 14px; }  /* was 12.5px */
  .qd-facts { font-size: 14px; }  /* was 12px */
  .qd-h { font-size: 12px; }  /* kicker, was 11px */
  .qd-empty { font-size: 14px; }  /* was 12px */
  .qd-pin { font-size: 15px; }  /* was 13px */
  .qd-name { font-size: 16px; }  /* was 14px */
  .qd-sub { font-size: 14px; }  /* was 12px */
  .qd-times { font-size: 13.3px; }  /* was 11.5px */
  .qd-eta { font-size: 14px; }  /* was 12.5px */
  .qd-for { font-size: 14px; }  /* was 12.5px */
  .qd-mark { font-size: 13.3px; }  /* was 11.5px */
  .qd-flag { font-size: 13.3px; }  /* was 11.5px */
  .qd-assign-pick { font-size: 14px; }  /* was 12.5px */
  .qd-pace-row { font-size: 14px; }  /* was 12.5px */
  .qd-set { font-size: 14px; }  /* was 12.5px */
  .qd-set-pick { font-size: 14px; }  /* was 12.5px */
  .qd-set-num { font-size: 15px; }  /* was 13px */
  .qd-set-b { font-size: 13.3px; }  /* was 11px */
  .qd-screen-s { font-size: 13.3px; }  /* was 11px */
  .qd-mint-label, .qd-export-day { font-size: 15px; }  /* was 13px */
  .qd-minted-t { font-size: 14px; }  /* was 12.5px */
  .qd-copy-field { font-size: 14px; }  /* was 12px */
  .qd-notes { font-size: 14px; }  /* was 12px */
  .ld { font-size: 15px; }  /* was 13px */
  .ld-status { font-size: 14px; }  /* was 12px */
  .ld-tab { font-size: 16px; }  /* was 14px */
  .ld-period-l { font-size: 17px; }  /* was 15px */
  .ld-period-d { font-size: 13.3px; }  /* was 11.5px */
  .ld-period-cut { font-size: 14px; }  /* was 12px */
  .ld-seg { font-size: 13.3px; }  /* was 11px */
  .ld-tile-k { font-size: 12px; }  /* kicker, was 11px */
  .ld-tile-u { font-size: 14px; }  /* was 12px */
  .ld-flabel { font-size: 12px; }  /* kicker, was 11px */
  .ld-chip { font-size: 14px; }  /* was 12.5px */
  .ld-chip-n { font-size: 13.3px; }  /* was 11.5px */
  .ld-from, .ld-to { font-size: 15px; }  /* was 13px */
  .ld-custom-to { font-size: 14px; }  /* was 12px */
  .ld-custom-said { font-size: 14px; }  /* was 12px */
  .ld-waiting-t { font-size: 15px; }  /* was 13px */
  .ld-q, .ld-link-key, .ld-note-input { font-size: 15px; }  /* was 13px */
  .ld-showing { font-size: 14px; }  /* was 12.5px */
  .ld-pageof { font-size: 13.3px; }  /* was 11.5px */
  .ld-table th { font-size: 12px; }  /* kicker, was 11px */
  .ld-name { font-size: 16px; }  /* was 14px */
  .ld-phone { font-size: 14px; }  /* was 12.5px */
  .ld-email { font-size: 14px; }  /* was 12px */
  .ld-ref { font-size: 13.3px; }  /* was 11px */
  .ld-mark { font-size: 13.3px; }  /* was 11.5px */
  .ld-att-k { font-size: 12px; }  /* kicker, was 10.5px */
  .ld-att-v { font-size: 14px; }  /* was 12.5px */
  .ld-gclick { font-size: 13.3px; }  /* was 11.5px */
  .ld-pill { font-size: 14px; }  /* was 12px */
  .ld-chan { font-size: 14px; }  /* was 12px */
  .ld-patient { font-size: 14px; }  /* was 12px */
  .ld-visited { font-size: 13.3px; }  /* was 11px */
  .ld-value { font-size: 15px; }  /* was 13px */
  .ld-unpriced { font-size: 13.3px; }  /* was 11.5px */
  .ld-date { font-size: 14px; }  /* was 12px */
  .ld-matched { font-size: 13.3px; }  /* was 11.5px */
  .ld-expected { font-size: 13.3px; }  /* was 11.5px */
  .ld-suggest-title { font-size: 14px; }  /* was 12.5px */
  .ld-suggest-for, .ld-suggest-said { font-size: 13.3px; }  /* was 11.5px */
  .ld-cand-verdict { font-size: 12px; }  /* kicker, was 11px */
  .ld-cand-who { font-size: 14px; }  /* was 12.5px */
  .ld-cand-meta { font-size: 13.3px; }  /* was 11.5px */
  .ld-cand-facts { font-size: 13.3px; }  /* was 11.5px */
  .ld-cand-why { font-size: 13.3px; }  /* was 11.5px */
  .ld-note-text { font-size: 14px; }  /* was 12.5px */
  .ld-empty { font-size: 14px; }  /* was 12.5px */
  .ld-how { font-size: 14px; }  /* was 12px */
  .ld-rhead { font-size: 15px; }  /* was 13px */
  .ld-rn { font-size: 14px; }  /* was 12.5px */
  .ld-rfoot { font-size: 14px; }  /* was 12px */
  .ld-journey { font-size: 13.3px; }  /* was 11.5px */
  .ld-episode .ld-sub { font-size: 13.3px; }  /* was 11px */
  .ld-graph-t { font-size: 15px; }  /* was 13px */
  .ld-graph-w { font-size: 13.3px; }  /* was 11.5px */
  .ld-graph-none { font-size: 14px; }  /* was 12px */
  .ld-registration-key { font-size: 14px; }  /* was 12px */
  .ip-num { font-size: 14px; }  /* was 12px */
  .ip-btn { font-size: 15px; }  /* was 13px */
  .ip-allergy { font-size: 17px; }  /* was 15px */
  .ip-al { font-size: 13.3px; }  /* kicker, was 12px */
  .ip-chip { font-size: 14px; }  /* was 12px */
  .ip-tools-l { font-size: 14px; }  /* was 12px */
  .ip-lab-t { font-size: 14px; }  /* was 12px */
  .ip-lab-s { font-size: 13.3px; }  /* was 11px */
  .ip-lab-x { font-size: 13.3px; }  /* was 11px */
  .ip-lsaid { font-size: 14px; }  /* was 12px */
  .ip-dl { font-size: 13.3px; }  /* was 11px */
  .ip-hl { font-size: 13.3px; }  /* was 10px */
  .ip-bar-t { font-size: 13.3px; }  /* was 11px */
  .ip-clipmk { font-size: 14px; }  /* was 12px */
  .ip-fmk { font-size: 13.3px; }  /* was 11px */
  .ip-v { font-size: 13.3px; }  /* was 10px */
  .ip-arrow { font-size: 14px; }  /* was 12px */
  .ip-none { font-size: 14px; }  /* was 12px */
  .ip-score-t { font-size: 14px; }  /* was 12px */
  .ip-score-ns .ip-score-t, .ip-score-wd .ip-score-t { font-size: 13.3px; }  /* was 10px */
  .ip-panel-h { font-size: 13.3px; }  /* kicker, was 12px */
  .ip-panel-w { font-size: 15px; }  /* was 13px */
  .ip-prow { font-size: 15px; }  /* was 13px */
  .ip-prow-x { font-size: 14px; }  /* was 12px */
  .ip-panel-f { font-size: 14px; }  /* was 12px */
  .ip-dv { font-size: 13.3px; }  /* was 10px */
  .ip-bal { font-size: 14px; }  /* was 12px */
  .ip-dwords { font-size: 13.3px; }  /* was 11px */
  .ip-dlabel { font-size: 13.3px; }  /* was 10px */
  .ip-hint { font-size: 14px; }  /* was 12px */
  .ip-d-title { font-size: 17px; }  /* was 15px */
  .ip-d-when { font-size: 14px; }  /* was 12px */
  .ip-d-line { font-size: 15px; }  /* was 13px */
  .ip-fs-h { font-size: 15px; }  /* was 13px */
  .ip-fs { font-size: 14px; }  /* was 12px */
  .ip-fs-more { font-size: 14px; }  /* was 12px */
  .ip-said { font-size: 14px; }  /* was 12px */
  .ip-list-h { font-size: 18px; }  /* was 16px */
  .ip-pnum { font-size: 14px; }  /* was 12px */
  .ip-pmeta { font-size: 14px; }  /* was 12px */
  .ip-pflag { font-size: 14px; }  /* was 12px */
  .ip-r-group .ip-lab-t { font-size: 12px; }  /* kicker, was 11px */
  .ipa-t { font-size: 12px; }  /* kicker, was 11px */
  .ipa-qh { font-size: 14px; }  /* was 12px */
  .ipa-qt { font-size: 16px; }  /* was 14px */
  .ipa-in { font-size: 15px; }  /* was 13px */
  .ipa-seen { font-size: 15px; }  /* was 13px */
  .ipb-btn { font-size: 15px; }  /* was 13px */
  .ipb-loading, .ipb-none { font-size: 16px; }  /* was 14px */
  .ipb-quiet { font-size: 15px; }  /* was 13px */
  .ipb-said { font-size: 15px; }  /* was 13px */
  .ipb-h { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-num { font-size: 15px; }  /* was 13px */
  .ipb-meta { font-size: 16px; }  /* was 14px */
  .ipb-pill { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-stayline { font-size: 16px; }  /* was 14px */
  .ipb-card-l { font-size: 15px; }  /* was 13px */
  .ipb-card-v { font-size: 16px; }  /* was 14px */
  .ipb-card-said { font-size: 15px; }  /* was 13px */
  .ipb-chh { font-size: 15px; }  /* was 13px */
  .ipb-chd, .ipb-chp { font-size: 15px; }  /* was 13px */
  .ipb-chn { font-size: 15px; }  /* was 13px */
  .ipb-itr { font-size: 15px; }  /* was 13px */
  .ipb-fw { font-size: 15px; }  /* was 13px */
  .ipb-ftag { font-size: 15px; }  /* was 13px */
  .ipb-wdw { font-size: 15px; }  /* was 13px */
  .ipb-nowm { font-size: 15px; }  /* was 13px */
  .ipb-cl { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-cu { font-size: 15px; }  /* was 13px */
  .ipb-cw { font-size: 15px; }  /* was 13px */
  .ipb-co2 { font-size: 15px; }  /* was 13px */
  .ipb-cr { font-size: 15px; }  /* was 13px */
  .ipb-ct { font-size: 15px; }  /* was 13px */
  .ipb-cfw { font-size: 16px; }  /* was 14px */
  .ipb-note-t { font-size: 17px; }  /* was 15px */
  .ipb-note-m { font-size: 15px; }  /* was 13px */
  .ipb-note-h { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-note-x { font-size: 16px; }  /* was 14px */
  .ipb-tn { font-size: 16px; }  /* was 14px */
  .ipb-ts { font-size: 15px; }  /* was 13px */
  .ipb-tsum { font-size: 16px; }  /* was 14px */
  .ipb-tsaid { font-size: 15px; }  /* was 13px */
  .ipb-row { font-size: 15px; }  /* was 13px */
  .ipb-rsrc { font-size: 15px; }  /* was 13px */
  .ipb-grp { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-empty { font-size: 15px; }  /* was 13px */
  .ipb-fday { font-size: 16px; }  /* was 14px */
  .ipb-disc { font-size: 13.3px; }  /* kicker, was 13px */
  .ipb-fat { font-size: 16px; }  /* was 14px */
  .ipb-fwho { font-size: 16px; }  /* was 14px */
  .ipb-ftitle { font-size: 16px; }  /* was 14px */
  .ipb-fet { font-size: 16px; }  /* was 14px */
  .ipb-fsay { font-size: 15px; }  /* was 13px */
  .ipb-wht { font-size: 18px; }  /* was 16px */
  .ipb-whs { font-size: 15px; }  /* was 13px */
  .ipb-ta { font-size: 17px; }  /* was 15px */
  .ipb-palh { font-size: 15px; }  /* was 13px */
  .ipb-palo { font-size: 16px; }  /* was 14px */
  .ipb-palp { font-size: 15px; }  /* was 13px */
  .ipb-palpt { font-size: 16px; }  /* was 14px */
  .ipb-wcount { font-size: 15px; }  /* was 13px */
  .ipb-wencw { font-size: 15px; }  /* was 13px */
  .ipb-wsay { font-size: 15px; }  /* was 13px */
  .ipb-inl { font-size: 15px; }  /* was 13px */
  .ipb-cl, .ipb-cw, .ipb-co2, .ipb-cr, .ipb-ct { font-size: 14px; }  /* was 12px */
  .ipb-grip { font-size: 18px; }  /* was 16px */
  .ipb-morecue { font-size: 15px; }  /* was 13px */
  .fv-switch { font-size: 14px; }  /* was 12px */
  .ipf-t { font-size: 17px; }  /* was 15px */
  .ipf-where { font-size: 14px; }  /* was 12px */
  .ims-h { font-size: 12px; }  /* kicker, was 11px */
  .sp-sees, .sp-looked { font-size: 15px; }  /* was 13px */
  .sp-pick-h { font-size: 13.3px; }  /* kicker, was 13px */
  .sp-pick-r { font-size: 15px; }  /* was 13px */
  .sp-pick-s { font-size: 15px; }  /* was 13px */
  .sp-new-n { font-size: 15px; }  /* was 13px */
  .sp-act-at { font-size: 15px; }  /* was 13px */
  .sp-act-new { font-size: 14px; }  /* was 12px */
  .pfs-kind { font-size: 13.3px; }  /* was 11px */
  .pfs-hint { font-size: 15px; }  /* was 13.3px */
  .smb-q { font-size: 13.3px; }  /* was 11px */
  .smb-not-here { font-size: 13.3px; }  /* was 10.5px */
  .smb-toggle { font-size: 14px; }  /* was 12px */
  .smb-line-n { font-size: 14px; }  /* was 12.5px */
  .smb-line-q { font-size: 13.3px; }  /* was 11.5px */
  .tb-licence { font-size: 14px; }  /* was 12px */
  .tb-src { font-size: 13.3px; }  /* was 11.5px */
  .tb-item-name { font-size: 15px; }  /* was 13.5px */
  .tb-item-sub { font-size: 13.3px; }  /* was 11.5px */
  .tb-form-h { font-size: 16px; }  /* was 14px */
  .tb-l { font-size: 12px; }  /* kicker, was 11px */
  .tb-in { font-size: 15px; }  /* was 13px */
  .tb-mini { font-size: 14px; }  /* was 12px */
  .tb-scale { font-size: 14px; }  /* was 12px */
  .pt-field { font-size: 13.3px; }  /* was 11.5px */
  .pt-ess-l { font-size: 13.3px; }  /* was 11.5px */
  .rel-k { font-size: 12px; }  /* kicker, was 11px */
  .rel-chip { font-size: 14px; }  /* was 12px */
  .rel-h { font-size: 15px; }  /* was 13px */
  .rel-none { font-size: 14px; }  /* was 12px */
  .rel-rel { font-size: 12px; }  /* kicker, was 11px */
  .rel-name { font-size: 15px; }  /* was 13px */
  .rel-key { font-size: 14px; }  /* was 12px */
  .rel-q { font-size: 15px; }  /* was 13px */
  .gd-h { font-size: 15px; }  /* was 13px */
  .gd-none { font-size: 14px; }  /* was 12px */
  .gd-needed { font-size: 15px; }  /* was 13px */
  .gd-rel { font-size: 12px; }  /* kicker, was 11px */
  .gd-name { font-size: 15px; }  /* was 13px */
  .gd-phone, .gd-email { font-size: 14px; }  /* was 12px */
  .gd-basis { font-size: 14px; }  /* was 12px */
  .gd-k { font-size: 12px; }  /* kicker, was 11px */
  .gd-field input, .gd-pick { font-size: 15px; }  /* was 13px */
  .dk-gp-h { font-size: 12px; }  /* kicker, was 11px */
  .gv-who { font-size: 15px; }  /* was 13px */
  .gv-h { font-size: 12px; }  /* kicker, was 11px */
  .gv-chip { font-size: 14px; }  /* was 12px */
  .gv-text, .gv-date, .gv-pick { font-size: 15px; }  /* was 13px */
  .gv-vital { font-size: 15px; }  /* was 13px */
  .gv-sys { font-size: 14px; }  /* was 12px */
  .gv-mc-next { font-size: 14px; }  /* was 12px */
  .mc-h { font-size: 16px; }  /* was 14px */
  .mc-sh { font-size: 12px; }  /* kicker, was 11px */
  .mc-now { font-size: 15px; }  /* was 13px */
  .mc-span { font-size: 15px; }  /* was 13px */
  .mc-days { font-size: 14px; }  /* was 12px */
  .mc-kind { font-size: 14px; }  /* was 12px */
  .mc-sub { font-size: 13.3px; }  /* was 11px */
  .mc-gap { font-size: 14px; }  /* was 12px */
  .mc-next { font-size: 14px; }  /* was 12px */
  .mc-check-k { font-size: 13.3px; }  /* was 11px */
  .mc-check-v { font-size: 15px; }  /* was 13px */
  .mc-in { font-size: 15px; }  /* was 13px */
  .fv-mc { font-size: 14px; }  /* was 12px */
  .fo-mc-now { font-size: 14px; }  /* was 12px */
  .fo-mc-gap { font-size: 13.3px; }  /* was 11px */
  .fo-mc-sub { font-size: 13.3px; }  /* was 11px */
  .mb-k { font-size: 12px; }  /* kicker, was 11px */
  .mb-g { font-size: 13.3px; }  /* was 11px */
  .mb-kind, .mb-letter, .mb-r, .mb-addt { font-size: 15px; }  /* was 13px */
  .mb-l1, .mb-r1 { font-size: 15px; }  /* was 13px */
  .mb-l2, .mb-r2 { font-size: 13.3px; }  /* was 11px */
  .mb-wait, .mb-none, .mb-hint { font-size: 14px; }  /* was 12px */
  .mb-no { font-size: 15px; }  /* was 13px */
  .mb-title { font-size: 17px; }  /* was 15px */
  .mb-state { font-size: 14px; }  /* was 12px */
  .mb-pd { font-size: 13.3px; }  /* was 11px */
  .mb-pl { font-size: 14px; }  /* was 12px */
  .mb-pi[data-tip]:hover::after, .mb-pi[data-tip]:focus-visible::after { font-size: 13.3px; }  /* was 11px */
  .mb-older { font-size: 14px; }  /* was 12px */
  .mb-segb { font-size: 14px; }  /* was 12px */
  .mb-zoomw { font-size: 14px; }  /* was 12px */
  .mb-dh { font-size: 12px; }  /* kicker, was 11px */
  .mb-vchip { font-size: 14px; }  /* was 12px */
  .mb-corr { font-size: 14px; }  /* was 12px */
  .mb-h, .mb-sh { font-size: 12px; }  /* kicker, was 11px */
  .mb-chosen { font-size: 15px; }  /* was 13px */
  .mb-addr-b, .mb-chip, .mb-change, .mb-offer, .mb-more { font-size: 14px; }  /* was 12px */
  .mb-tag { font-size: 13.3px; }  /* was 11px */
  .mb-place { font-size: 12px; }  /* kicker, was 11px */
  .mb-picked-where, .mb-nobody { font-size: 14px; }  /* was 12px */
  .mb-find, .mb-paper, .mb-ins, .mb-claim, .mb-how, .mb-semr-giver, .mb-semr-how, .mb-semr-on, .mb-want, .mb-t { font-size: 15px; }  /* was 13px */
  .mb-copy, .mb-asked, .mb-tick, .mb-flag, .mb-src { font-size: 15px; }  /* was 13px */
  .mb-choice { font-size: 15px; }  /* was 13px */
  .mb-check { font-size: 14px; }  /* was 12px */
  .mb-aisaid { font-size: 14px; }  /* was 12px */
  .mb-count { font-size: 15px; }  /* was 13px */
  .mb-outcome { font-size: 15px; }  /* was 13px */
  .fdm-h { font-size: 15px; }  /* was 13px */
  .fdm-hint { font-size: 14px; }  /* was 12px */
  .fdm-item { font-size: 15px; }  /* was 13px */
  .fdm-amt { font-size: 15px; }  /* was 13px */
  .fdm-tag { font-size: 13.3px; }  /* was 11px */
  .fdm-change { font-size: 13.3px; }  /* was 11px */
  .fdm-in { font-size: 15px; }  /* was 13px */
  .fdm-said { font-size: 14px; }  /* was 12px */
  .gv-none { font-size: 14px; }  /* was 12px */
  .gv-flag { font-size: 15px; }  /* was 13px */
  .gv-working { font-size: 13.3px; }  /* was 11px */
  .gv-note { font-size: 14px; }  /* was 12px */
  .gpp-h { font-size: 15px; }  /* was 13px */
  .gpp-who { font-size: 14px; }  /* was 12px */
  .gpp-row { font-size: 15px; }  /* was 13px */
  .gpp-cap .gpp-v { font-size: 14px; }  /* was 12px */
  .gpp-dim { font-size: 14px; }  /* was 12px */
  .gpp-warn { font-size: 14px; }  /* was 12px */
  .gpp-claimed { font-size: 14px; }  /* was 12px */
  .gpp-rb { font-size: 14px; }  /* was 12px */
  .gpp-sub { font-size: 14px; }  /* was 12px */
  .gpp-sources { font-size: 13.3px; }  /* was 11px */
  .gpp-panel { font-size: 14px; }  /* was 12px */
  .gpp-table { font-size: 13.3px; }  /* was 11px */
  .gx-st { font-size: 12px; }  /* kicker, was 11px */
  .gx-what { font-size: 15px; }  /* was 13px */
  .gx-why { font-size: 14px; }  /* was 12px */
  .gx-more summary { font-size: 14px; }  /* was 12px */
  .gx-unread { font-size: 14px; }  /* was 12px */
  .gx-src { font-size: 13.3px; }  /* was 11px */
  .gx-hist { font-size: 15px; }  /* was 13px */
  .gx-here { font-size: 13.3px; }  /* was 11px */
  .gx-past { font-size: 13.3px; }  /* was 11px */
  .gb-said-ok { font-size: 14px; }  /* was 12px */
  .gb-said-miss { font-size: 14px; }  /* was 12px */
  .gb-group { font-size: 14px; }  /* was 12px */
  .gb-cell-l { font-size: 14px; }  /* was 12px */
  .gb-res-l { font-size: 15px; }  /* was 13px */
  .gb-res-v { font-size: 15px; }  /* was 13px */
  .gb-res-g { font-size: 14px; }  /* was 12px */
  .gb-res-ref, .gb-res-why { font-size: 13.3px; }  /* was 11px */
  .gs-count-l { font-size: 14px; }  /* was 12px */
  .gs-avg-n, .gs-note { font-size: 14px; }  /* was 12px */
  .gs-row-h { font-size: 14px; }  /* was 12px */
  .gs-flags { font-size: 14px; }  /* was 12px */
  .gc-hsg, .gc-left { font-size: 14px; }  /* was 12px */
  .gc-said { font-size: 14px; }  /* was 12px */
  .gc-warn { font-size: 14px; }  /* was 12px */
  .gc-m-t, .gc-m-d { font-size: 14px; }  /* was 12px */
  .gc-review { font-size: 14px; }  /* was 12px */
  .gc-src { font-size: 14px; }  /* was 12px */
  .gr-conds, .gr-items { font-size: 14px; }  /* was 12px */
  .gx-wd { font-size: 14px; }  /* was 12px */
  .gx-wsaid { font-size: 14px; }  /* was 12px */
  .gx-gone { font-size: 15px; }  /* was 13px */
  .gx-gone-why { font-size: 14px; }  /* was 12px */
  .gx-cert-row { font-size: 15px; }  /* was 13px */
  .gl-title { font-size: 18px; }  /* was 16px */
  .gl-note, .gl-meta { font-size: 14px; }  /* was 12px */
  .gl-srow { font-size: 14px; }  /* was 12px */
  .gl-in { font-size: 14px; }  /* was 12px */
  .gl-problem { font-size: 14px; }  /* was 12px */
  .gl-rb { font-size: 14px; }  /* was 12px */
  .lc-h { font-size: 15px; }  /* was 13px */
  .lc-means, .lc-note { font-size: 14px; }  /* was 12px */
  .lc-k { font-size: 12px; }  /* kicker, was 11px */
  .lc-grade { font-size: 14px; }  /* was 12px */
  .lc-row { font-size: 15px; }  /* was 13px */
  .lc-source-details input { font-size: 15px; }  /* was 13px */
  .lc-unsure { font-size: 13.3px; }  /* was 11px */
  .lc-fix { font-size: 15px; }  /* was 13px */
  .lc-chip { font-size: 14px; }  /* was 12px */
  .lc-key, .lc-date { font-size: 15px; }  /* was 13px */
  .lc-chosen { font-size: 14px; }  /* was 12px */
  .ex-h { font-size: 15px; }  /* was 13px */
  .ex-note { font-size: 14px; }  /* was 12px */
  .ex-k { font-size: 12px; }  /* kicker, was 11px */
  .ex-postop { font-size: 14px; }  /* was 12px */
  .ex-chip { font-size: 14px; }  /* was 12px */
  .ex-find, .ex-in { font-size: 15px; }  /* was 13px */
  .ex-row-t { font-size: 14px; }  /* was 12.5px */
  .ex-name { font-size: 15px; }  /* was 13px */
  .ex-doc { font-size: 14px; }  /* was 12px */
  .ex-cat { font-size: 13.3px; }  /* was 11px */
  .ex-fl { font-size: 13.3px; }  /* was 11px */
  .ex-warn { font-size: 14px; }  /* was 12px */
  .fv-enc-ex { font-size: 14px; }  /* was 12px */
  .rel-hit { font-size: 14px; }  /* was 12.5px */
  .rel-chosen { font-size: 14px; }  /* was 12px */
  .pm-to .pm-k { font-size: 13.3px; }  /* was 11px */
  .pm-to .pm-v { font-size: 16px; }  /* was 14px */
  .ep-h { font-size: 12px; }  /* kicker, was 11px */
  .ep-kv { font-size: 15px; }  /* was 13px */
  .ep-none { font-size: 14px; }  /* was 12.5px */
  .ep-line { font-size: 15px; }  /* was 13px */
  .ep-bs-top { font-size: 15px; }  /* was 13px */
  .ep-when { font-size: 13.3px; }  /* was 11px */
  .ep-earlier { font-size: 14px; }  /* was 12px */
  .ep-syn { font-size: 14px; }  /* was 12.5px */
  .su-h { font-size: 15px; }  /* was 13px */
  .su-sub { font-size: 12px; }  /* kicker, was 11px */
  .su-now { font-size: 15px; }  /* was 13px */
  .su-note { font-size: 13.3px; }  /* was 11.5px */
  .su-route-h { font-size: 14px; }  /* was 12.5px */
  .su-warn { font-size: 14px; }  /* was 12px */
  .su-in { font-size: 15px; }  /* was 13px */
  .su-logo-pic { font-size: 14px; }  /* was 12px */
  .sd-coming-t { font-size: 16px; }  /* was 14px */
  .sd-coming-s { font-size: 15px; }  /* was 13px */
  .sd-coming-tag { font-size: 12px; }  /* kicker, was 10.5px */
  .fv-row-t { font-size: 15px; }  /* was 13px */
  .fv-row-s { font-size: 13.3px; }  /* was 11.5px */
  .fo-not { font-size: 13.3px; }  /* was 10.5px */
  .ed-on { font-size: 13.3px; }  /* was 11.5px */
  .ed-box { font-size: 14px; }  /* was 12.5px */
  .ed-note { font-size: 13.3px; }  /* was 10.5px */
  .fo-m { font-size: 14px; }  /* was 12px */
  .fo-m-off { font-size: 13.3px; }  /* was 11px */
  .fo-m-un { font-size: 13.3px; }  /* was 10.5px */
  .fo-m-w { font-size: 13.3px; }  /* was 11px */
  .fo-m-t { font-size: 13.3px; }  /* was 11px */
  .mo-t { font-size: 14px; }  /* was 12px */
  .mo-s { font-size: 13.3px; }  /* was 11px */
  .mo-name { font-size: 14px; }  /* was 12px */
  .mo-latest { font-size: 13.3px; }  /* was 11px */
  .mo-band-words { font-size: 13.3px; }  /* was 10.5px */
  .mo-nopoints { font-size: 13.3px; }  /* was 11px */
  .mo-k { font-size: 13.3px; }  /* was 11px */
  .mo-why { font-size: 13.3px; }  /* was 11px */
  .mo-gone { font-size: 13.3px; }  /* was 11px */
  .fo-fix-h { font-size: 12px; }  /* kicker, was 11px */
  .fo-fix-in { font-size: 14px; }  /* was 12.5px */
  .fo-fix-note { font-size: 13.3px; }  /* was 10.5px */
  .fo-fix-back { font-size: 14px; }  /* was 12px */
  button.fo-v { font-size: 14px; }  /* was 12px */
  .home-sub { font-size: 12px; }  /* kicker, was 11px */
  .home-key-lab { font-size: 17px; }  /* was 15px */
  .home-key-hint { font-size: 13.3px; }  /* was 11.5px */
  .home-key-tag { font-size: 11px; }  /* kicker, was 9px */
  .pc-btn { font-size: 18px; }  /* was 16px */
  .home-resume-lab { font-size: 17px; }  /* was 15px */
  .home-resume-who { font-size: 15px; }  /* was 13px */
  .home-cluster-t { font-size: 13.3px; }  /* kicker, was 13.5px */
  .home-cluster-note { font-size: 13.3px; }  /* was 10.5px */
  .home-cluster .home-key-lab { font-size: 15px; }  /* was 13.5px */
  .home-dial-btn { font-size: 14px; }  /* was 12px */
  .home-tab-lab { font-size: 12px; }  /* kicker, was 10.5px */
  .fo-film-b { font-size: 13.3px; }  /* was 11.5px */
  .fo-film-n { font-size: 13.3px; }  /* was 11.5px */
  .fo-film-x { font-size: 13.3px; }  /* was 10.5px */
  .dl-who-line { font-size: 14px; }  /* was 12px */
  .dl-allergy { font-size: 13.3px; }  /* was 10.5px */
  .dl-close { font-size: 14px; }  /* was 12px */
  .dl-corner-t { font-size: 15px; }  /* was 13px */
  .dl-corner-sub { font-size: 12px; }  /* kicker, was 10px */
  .dl-wr-who { font-size: 14px; }  /* was 12.5px */
  .dl-wr-who::before { font-size: 13.3px; }  /* was 8px */
  .dl-wr-wait { font-size: 13.3px; }  /* was 11px */
  .dl-dial-t { font-size: 17px; }  /* was 15px */
  .dl-dial-sub { font-size: 13.3px; }  /* was 11px */
  .dl-rec-t { font-size: 12px; }  /* kicker, was 10.5px */
  .dl-note-t { font-size: 15px; }  /* was 13.5px */
  .dl-list-code { font-size: 13.3px; }  /* was 11.5px */
  .dl-list-name { font-size: 14px; }  /* was 12.5px */
  .pc-n { font-size: 13.3px; }  /* was 11px */
  .pc-line { font-size: 14px; }  /* was 12px */
  .pc-when { font-size: 13.3px; }  /* was 11px */
  .pc-near { font-size: 13.3px; }  /* was 11px */
  .pc-prog { font-size: 13.3px; }  /* was 11px */
  .pc-task { font-size: 14px; }  /* was 12px */
  .pc-tick { font-size: 16px; }  /* was 14px */
  .pc-task-by { font-size: 13.3px; }  /* was 10.5px */
  .pc-earlier { font-size: 13.3px; }  /* was 10.5px */
  .pc-earlier-l { font-size: 13.3px; }  /* was 10.5px */
  .pc-none { font-size: 13.3px; }  /* was 11px */
  .dl-mark-n { font-size: 13.3px; }  /* was 11px */
  .dl-list-n { font-size: 13.3px; }  /* was 10.5px */
  .dl-pain-n { font-size: 12px; }  /* kicker, was 10px */
  .dl-read-n { font-size: 14px; }  /* was 12px */
  .dl-read-v { font-size: 14px; }  /* was 12px */
  .dl-rec-clock { font-size: 13.3px; }  /* kicker, was 12px */
  .dl-rec-n { font-size: 13.3px; }  /* was 10.5px */
  .dl-tr-src { font-size: 11px; }  /* kicker, was 9.5px */
  .dl-tr-text { font-size: 14px; }  /* was 12.5px */
  .dl-take-src { font-size: 13.3px; }  /* was 11px */
  .dl-take-meta { font-size: 13.3px; }  /* was 10.5px */
  .dl-dial-status { font-size: 12px; }  /* kicker, was 10px */
  .dl-desk-k { font-size: 14px; }  /* was 12.5px */
  .dl-desk-v { font-size: 14px; }  /* was 12px */
  .dl-task-mark { font-size: 14px; }  /* was 12px */
  .dl-task-at { font-size: 13.3px; }  /* was 11px */
  .dl-task-who { font-size: 14px; }  /* was 12.5px */
  .ci-where { font-size: 13.3px; }  /* was 11px */
  .reg-kicker { font-size: 12px; }  /* kicker, was 10px */
  .reg-sub { font-size: 14px; }  /* was 12px */
  .reg-mode, .reg-tool { font-size: 13.3px; }  /* was 11px */
  .reg-card h2 { font-size: 17px; }  /* was 15px */
  .reg-card h3 { font-size: 12px; }  /* kicker, was 10px */
  .reg-required, .reg-optional { font-size: 11px; }  /* kicker, was 9px */
  .reg-help { font-size: 13.3px; }  /* was 11px */
  .reg-field-label { font-size: 12px; }  /* kicker, was 10px */
  .reg-active-input, .reg-transcript, .reg-input { font-size: 15px; }  /* was 13px */
  .reg-preview { font-size: 13.3px; }  /* was 11px */
  .reg-dob-cal { font-size: 17px; }  /* was 15px */
  .reg-age-note { font-size: 13.3px; }  /* was 10.5px */
  .reg-dob-error { font-size: 13.3px; }  /* was 10.5px */
  .reg-status { font-size: 13.3px; }  /* was 11px */
  .reg-rec-row .btn { font-size: 13.3px; }  /* was 11px */
  .reg-readback { font-size: 13.3px; }  /* was 11px */
  .reg-req { font-size: 13.3px; }  /* was 9.5px */
  .reg-link { font-size: 14px; }  /* was 12px */
  .ci-name { font-size: 15px; }  /* was 13px */
  .ci-kind { font-size: 12px; }  /* kicker, was 10.5px */
  .ci-why { font-size: 13.3px; }  /* was 11px */
  .ci-confirm { font-size: 13.3px; }  /* was 11px */
  .ci-status { font-size: 12px; }  /* kicker, was 11px */
  .ci-none { font-size: 14px; }  /* was 12px */
  .li-t { font-size: 14px; }  /* was 12px */
  .li-when { font-size: 13.3px; }  /* was 11px */
  .li-for { font-size: 14px; }  /* was 12px */
  .li-in { font-size: 14px; }  /* was 12px */
  .li-note { font-size: 13.3px; }  /* was 10.5px */
  .li-was { font-size: 14px; }  /* was 12px */
  .li-was-l { font-size: 13.3px; }  /* was 10.5px */
  .li-was-r { font-size: 13.3px; }  /* was 10.5px */
  .li-warn { font-size: 13.3px; }  /* was 11px */
  .wk-t { font-size: 15px; }  /* was 13px */
  .wk-dh-d { font-size: 12px; }  /* kicker, was 11px */
  .wk-dh-n { font-size: 16px; }  /* was 14px */
  .wk-rh { font-size: 13.3px; }  /* was 10.5px */
  .wk-chip { font-size: 13.3px; }  /* was 10px */
  .wk-e { font-size: 13.3px; }  /* was 11px */
  .wk-legend { font-size: 13.3px; }  /* was 10.5px */
  .wk-more { font-size: 13.3px; }  /* was 11px */
  .wk-none { font-size: 14px; }  /* was 12px */
  .dk-car .wk-over { font-size: 13.3px; }  /* was 11px */
  .dk-face { font-size: 12px; }  /* kicker, was 11px */
  .or-tab { font-size: 14px; }  /* was 12px */
  .or-unlinked { font-size: 14px; }  /* was 12px */
  .or-chip { font-size: 14px; }  /* was 12.5px */
  .or .btn { font-size: 14px; }  /* was 12.5px */
  .or-help-l { font-size: 14px; }  /* was 12px */
  .or-reg { font-size: 14px; }  /* was 12px */
  .or-name { font-size: 14px; }  /* was 12.5px */
  .or-k { font-size: 13.3px; }  /* was 11px */
  .or-in { font-size: 14px; }  /* was 12.5px */
  .or-hit { font-size: 14px; }  /* was 12px */
  .or-none { font-size: 14px; }  /* was 12px */
  .or-desc { font-size: 14px; }  /* was 12px */
  .or-ai-said { font-size: 14px; }  /* was 12px */
  .or-ai-why { font-size: 13.3px; }  /* was 11px */
  .or-v { font-size: 14px; }  /* was 12.5px */
  .or-test { font-size: 14px; }  /* was 12px */
  .or-x { font-size: 13.3px; }  /* was 11px */
  .or-total { font-size: 14px; }  /* was 12.5px */
  .or-tline { font-size: 14px; }  /* was 12.5px */
  .or-seg-b { font-size: 14px; }  /* was 12.5px */
  .or-rate { font-size: 13.3px; }  /* was 11px */
  .or-chk { font-size: 14px; }  /* was 12.5px */
  .or-contact { font-size: 14px; }  /* was 12px */
  .or-src { font-size: 13.3px; }  /* was 11px */
  .cs-lbl { font-size: 12px; }  /* kicker, was 11px */
  .cs-status { font-size: 14px; }  /* was 12px */
  .cs-fig-l { font-size: 14px; }  /* was 12px */
  .cs-fig-s { font-size: 13.3px; }  /* was 11px */
  .cs-th { font-size: 12px; }  /* kicker, was 11px */
  .cs-sub { font-size: 13.3px; }  /* was 11px */
  .cs-none { font-size: 14px; }  /* was 12px */
  .cs-note { font-size: 14px; }  /* was 12px */
  .or-qchip { font-size: 14px; }  /* was 12.5px */
  .or-qtag { font-size: 12px; }  /* kicker, was 10px */
  .or-code { font-size: 14px; }  /* was 12px */
  .or-pick { font-size: 14px; }  /* was 12.5px */
  .or-tests-table th { font-size: 13.3px; }  /* was 11px */
  .or-test-row > td { font-size: 14px; }  /* was 12.5px */
  .or-test-total > td { font-size: 14px; }  /* was 12.5px */
  .or-pick-c { font-size: 13.3px; }  /* was 11px */
  .or-tile-i { font-size: 17px; }  /* was 15px */
  .or-tile-l { font-size: 15px; }  /* was 13px */
  .or-tile-s { font-size: 13.3px; }  /* was 11px */
  .fm-t { font-size: 14px; }  /* was 12px */
  .fm-n { font-size: 13.3px; }  /* was 10.5px */
  .fm-tick { font-size: 16px; }  /* was 14px */
  .fm-name { font-size: 14px; }  /* was 12px */
  .fm-note { font-size: 13.3px; }  /* was 10.5px */
  .pt-note { font-size: 12px; }  /* kicker, was 10.5px */
  .pt-in { font-size: 14px; }  /* was 12px */
  .pt-group { font-size: 12px; }  /* kicker, was 10.5px */
  .pt-row { font-size: 14px; }  /* was 12px */
  .pt-key { font-size: 13.3px; }  /* was 10.5px */
  .pt-tag { font-size: 12px; }  /* kicker, was 10px */
  .pt-when { font-size: 13.3px; }  /* was 10.5px */
  .pt-none { font-size: 13.3px; }  /* was 11.5px */
  .tk-n { font-size: 13.3px; }  /* was 10.5px */
  .tk-late { font-size: 13.3px; }  /* was 11px */
  .tk-tray { font-size: 13.3px; }  /* was 11px */
  .tk-group { font-size: 12px; }  /* kicker, was 11px */
  .tk-tick { font-size: 16px; }  /* was 14px */
  .tk-what { font-size: 14px; }  /* was 12px */
  .tk-key { font-size: 13.3px; }  /* was 10.5px */
  .tk-from, .tk-tag { font-size: 13.3px; }  /* was 10px */
  .tk-due { font-size: 13.3px; }  /* was 10.5px */
  .tk-line .tk-flag { font-size: 13.3px; }  /* was 11px */
  .tk-none { font-size: 13.3px; }  /* was 11.5px */
  .du-line { font-size: 14px; }  /* was 12.5px */
  .gs-tab { font-size: 13.3px; }  /* was 11px */
  .gs-find { font-size: 14px; }  /* was 12.5px */
  .gs-go { font-size: 14px; }  /* was 12px */
  .gs-count { font-size: 12px; }  /* kicker, was 10px */
  .gs-wait, .gs-none { font-size: 13.3px; }  /* was 11.5px */
  .gs-title { font-size: 14px; }  /* was 12.5px */
  .gs-sub { font-size: 13.3px; }  /* was 11px */
  .gs-fact { font-size: 13.3px; }  /* was 11px */
  .gs-fl { font-size: 11px; }  /* kicker, was 9.5px */
  .du-act-l { font-size: 15px; }  /* was 13px */
  .du-act-w { font-size: 12px; }  /* kicker, was 10.5px */
  .du-act-c { font-size: 13.3px; }  /* was 11px */
  .du-status { font-size: 13.3px; }  /* was 11px */
  .du-none { font-size: 14px; }  /* was 12px */
  .sf-sub { font-size: 13.3px; }  /* was 11px */
  .sf-section-h { font-size: 13.3px; }  /* kicker, was 12px */
  .sf-rule-name { font-size: 15px; }  /* was 13.5px */
  .sf-rule-chev { font-size: 17px; }  /* was 15px */
  .sf-rule-detail { font-size: 14px; }  /* was 12.5px */
  .pv-sub { font-size: 13.3px; }  /* was 11px */
  .pv-filter { font-size: 15px; }  /* was 13px */
  .pv-cat-n { font-size: 15px; }  /* was 13px */
  .pv-cat-c { font-size: 13.3px; }  /* was 11px */
  .pv-name { font-size: 15px; }  /* was 13px */
  .pv-person { font-size: 14px; }  /* was 12px */
  .pv-num { font-size: 14px; }  /* was 12.5px */
  .pv-reason { font-size: 13.3px; }  /* was 11.5px */
  .pv-panel { font-size: 13.3px; }  /* was 11px */
  .pv-ref { font-size: 13.3px; }  /* was 11px */
  .prt-group-h { font-size: 15px; }  /* was 13px */
  .prt-group-n { font-size: 13.3px; }  /* was 11px */
  .prt-none { font-size: 14px; }  /* was 12px */
  .prt-name { font-size: 15px; }  /* was 13px */
  .prt-cat { font-size: 13.3px; }  /* was 11px */
  .prt-reach { font-size: 14px; }  /* was 12.5px */
  .prt-field-k { font-size: 14px; }  /* was 12px */
  .fee-sub { font-size: 13.3px; }  /* was 11px */
  .fee-place-h { font-size: 14px; }  /* was 12.5px */
  .fee-payor { font-size: 15px; }  /* was 13px */
  .fee-fig { font-size: 14px; }  /* was 12.5px */
  .fee-code { font-size: 13.3px; }  /* was 11px */
  .fee-bad-h { font-size: 14px; }  /* was 12px */
  .fee-bad-line { font-size: 13.3px; }  /* was 11.5px */
  .sc-sub { font-size: 13.3px; }  /* was 11px */
  .sc-section-h { font-size: 14px; }  /* was 12px */
  .sc-tick { font-size: 15px; }  /* was 13px */
  .sc-accred-n { font-size: 15px; }  /* was 13px */
  .sc-act { font-size: 15px; }  /* was 13px */
  .sc-blocked-n { font-size: 14px; }  /* was 12.5px */
  .sc-blocked-why { font-size: 13.3px; }  /* was 11.5px */
  .sc-nehr-line { font-size: 14px; }  /* was 12.5px */
  .inv-sub { font-size: 13.3px; }  /* was 11px */
  .inv-filter { font-size: 15px; }  /* was 13px */
  .inv-cat-n { font-size: 15px; }  /* was 13px */
  .inv-cat-c { font-size: 13.3px; }  /* was 11px */
  .inv-code { font-size: 13.3px; }  /* was 11px */
  .inv-name { font-size: 14px; }  /* was 12.5px */
  .inv-price { font-size: 14px; }  /* was 12.5px */
  .inv-billto { font-size: 13.3px; }  /* was 10.5px */
  .inv-onhand { font-size: 13.3px; }  /* was 11px */
  .stk-code { font-size: 13.3px; }  /* was 11px */
  .stk-name { font-size: 14px; }  /* was 12.5px */
  .stk-qty { font-size: 15px; }  /* was 13px */
  .stk-flag { font-size: 13.3px; }  /* was 10.5px */
  .stk-lot { font-size: 14px; }  /* was 12px */
  .stk-lot-b { font-size: 13.3px; }  /* was 11px */
  .stk-form-h, .stk-hist-h { font-size: 14px; }  /* was 12.5px */
  .stk-field-l { font-size: 13.3px; }  /* was 11.5px */
  .stk-input { font-size: 15px; }  /* was 13px */
  .stk-move { font-size: 14px; }  /* was 12px */
  .stk-move-w { font-size: 13.3px; }  /* was 11px */
  .stk-move-n { font-size: 13.3px; }  /* was 11px */
  .pf-sub { font-size: 13.3px; }  /* was 11px */
  .pf-section-h { font-size: 13.3px; }  /* kicker, was 12px */
  .pf-name { font-size: 15px; }  /* was 13.5px */
  .pf-meta { font-size: 13.3px; }  /* was 10.5px */
  .st-sub { font-size: 13.3px; }  /* was 11px */
  .st-section-t { font-size: 13.3px; }  /* kicker, was 12px */
  .st-menu-row { font-size: 15px; }  /* was 13px */
  .st-menu-chip { font-size: 13.3px; }  /* was 10.5px */
  .st-card-t { font-size: 15px; }  /* was 13px */
  .st-card-foot { font-size: 13.3px; }  /* was 10.5px */
  .su-day-l { font-size: 14px; }  /* was 12px */
  .st-field-k { font-size: 13.3px; }  /* was 11.5px */
  .st-field-v { font-size: 15px; }  /* was 13px */
  .drp-sec, .drp .ec-h { font-size: 13.3px; }  /* kicker, was 12px */
  .drp-profile .st-field-k { font-size: 13.3px; }  /* was 11.5px */
  .drp-profile .st-field-v { font-size: 15px; }  /* was 13px */
  .ec-card-n { font-size: 15px; }  /* was 13px */
  .ec-badge { font-size: 13.3px; }  /* was 11.5px */
  .ec-lab { font-size: 13.3px; }  /* was 11.5px */
  .drp .ec-in { font-size: 15px; }  /* was 13px */
  .ec-consent { font-size: 14px; }  /* was 12px */
  .ec-status { font-size: 14px; }  /* was 12px */
  .st-status { font-size: 14px; }  /* was 12px */
  .st-none { font-size: 14px; }  /* was 12px */
  .st-more { font-size: 13.3px; }  /* was 11px */
  .st-tab { font-size: 14px; }  /* was 12px */
  .st-line { font-size: 15px; }  /* was 13px */
  .st-counts { font-size: 13.3px; }  /* was 11.5px */
  .st-banner-l { font-size: 13.3px; }  /* was 11.5px */
  .st-banner-v { font-size: 15px; }  /* was 13px */
  .st-banner-sched { font-size: 13.3px; }  /* was 11px */
  .st-verdict-h { font-size: 15px; }  /* was 13px */
  .st-finding-w { font-size: 13.3px; }  /* was 11px */
  .st-finding-what { font-size: 14px; }  /* was 12.5px */
  .st-sim { font-size: 14px; }  /* was 12.5px */
  .st-sim-n { font-size: 13.3px; }  /* was 11px */
  .rq-t { font-size: 15px; }  /* was 13px */
  .rq-sub { font-size: 13.3px; }  /* was 11px */
  .rq-n { font-size: 13.3px; }  /* was 11px */
  .rq-who { font-size: 15px; }  /* was 13.5px */
  .rq-wants { font-size: 14px; }  /* was 12.5px */
  .rq-when { font-size: 13.3px; }  /* was 11px */
  .rq-note { font-size: 13.3px; }  /* was 11.5px */
  .rq-none { font-size: 14px; }  /* was 12px */
  .mt-t { font-size: 15px; }  /* was 13px */
  .mt-n { font-size: 13.3px; }  /* was 11px */
  .mt-new-t { font-size: 14px; }  /* was 12px */
  .mt-in { font-size: 15px; }  /* was 13px */
  .mt-case-who { font-size: 15px; }  /* was 13.5px */
  .mt-case-q { font-size: 14px; }  /* was 12.5px */
  .mt-none { font-size: 14px; }  /* was 12px */
  .rs-state { font-size: 15px; }  /* was 13px */
  .meds-btn { font-size: 15px; }  /* was 13px */
  .meds-h { font-size: 12px; }  /* kicker, was 10px */
  .med-chip { font-size: 15px; }  /* was 13px */
  .med-star { font-size: 15px; }  /* was 13px */
  .med-on { font-size: 13.3px; }  /* was 11.5px */
  .meds-find { font-size: 15px; }  /* was 13px */
  .meds-class { font-size: 13.3px; }  /* was 11.5px */
  .pr-sub, .meds-sub { font-size: 13.3px; }  /* was 11.5px */
  .pr-tick { font-size: 15px; }  /* was 13.5px */
  .pr-code { font-size: 13.3px; }  /* was 11px */
  .pr-note { font-size: 14px; }  /* was 12px */
  .pr-h { font-size: 12px; }  /* kicker, was 10px */
  .pr-other { font-size: 13.3px; }  /* was 11.5px */
  .pr-count { font-size: 13.3px; }  /* was 11.5px */
  .dk-corner-t { font-size: 12px; }  /* kicker, was 10px */
  .dk-corner-sub { font-size: 13.3px; }  /* was 10.5px */
  .dk-corner-open { font-size: 13.3px; }  /* was 10.5px */
  .dk-side-rail-tab { font-size: 11px; }  /* kicker, was 9px */
  .dk-lane-none { font-size: 13.3px; }  /* was 10.5px */
  .dk-lights .wr-acts .btn { font-size: 13.3px; }  /* was 11px */
  .dk-lights .wr-type { font-size: 13.3px; }  /* was 11px */
  .dk-notice-i { font-size: 15px; }  /* was 13px */
  .dk-notice-t { font-size: 14px; }  /* was 12px */
  .dk-notice-m { font-size: 13.3px; }  /* was 10px */
  .dk-notice-n { font-size: 13.3px; }  /* was 11px */
  .dk-desk-room { font-size: 13.3px; }  /* was 11px */
  .dk-tile { font-size: 13.3px; }  /* was 11.5px */
  .dk-tile-pair .dk-tile-i { font-size: 16px; }  /* was 14px */
  .dk-last { font-size: 13.3px; }  /* was 11.5px */
  .dk-last .tk-key { font-size: 14px; }  /* was 12px */
  .dk-schedule-select-kicker { font-size: 11px; }  /* kicker, was 9px */
  .dk-schedule-select-name { font-size: 15px; }  /* was 13px */
  .dk-schedule-select-facts { font-size: 13.3px; }  /* was 10.5px */
  .deadend-t { font-size: 17px; }  /* was 15px */
  .deadend-s { font-size: 14px; }  /* was 12.5px */
  .dk-actions .dk-action-l { font-size: 15px; }  /* was 13px */
  .dk-actions .dk-action-s { font-size: 13.3px; }  /* was 11.5px */
  .dk-action-l { font-size: 16px; }  /* was 14px */
  .dk-action-s { font-size: 13.3px; }  /* was 10.5px */
  .dk-reg-h { font-size: 14px; }  /* was 12.5px */
  .dk-car-tab { font-size: 14px; }  /* was 12px */
  .dk-car-tools .btn { font-size: 14px; }  /* was 12px */
  .dk-car-tools .wk-t { font-size: 14px; }  /* was 12px */
  .dk-car-wait, .dk-car-none { font-size: 13.3px; }  /* was 11.5px */
  .dk-lists-l { font-size: 12px; }  /* kicker, was 11px */
  .dk-list-b { font-size: 14px; }  /* was 12.5px */
  .dk-list-n { font-size: 13.3px; }  /* was 11px */
  .dk-drawer-t { font-size: 17px; }  /* was 15px */
  .dk-drawer-p { font-size: 14px; }  /* was 12px */
  .dk-drawer-btn { font-size: 14px; }  /* was 12px */
  .dk-tool { font-size: 13.3px; }  /* was 11.5px */
  .dk-sheet-h { font-size: 12px; }  /* kicker, was 10px */
  .dk-sheet-c { font-size: 13.3px; }  /* was 11px */
  .dk-sheet-k { font-size: 15px; }  /* was 13px */
  .clock { font-size: 12px; }  /* kicker, was 11px */
  .apptbar { font-size: 13.3px; }  /* was 11.5px */
  .dk-tab { font-size: 14px; }  /* was 12px */
  .dk-tab-n { font-size: 13.3px; }  /* was 10.5px */
  .dk-area-t { font-size: 14px; }  /* was 12.5px */
  .dk-area-hint { font-size: 13.3px; }  /* was 10.5px */
  .dk-body-gone { font-size: 13.3px; }  /* was 11px */
  .dk-trow-h { font-size: 12px; }  /* kicker, was 10px */
  .dk-trow-t { font-size: 15px; }  /* was 13px */
  .dk-img-study { font-size: 13.3px; }  /* was 11px */
  .dk-img-study .mono { font-size: 13.3px; }  /* was 10px */
  .dk-img-portal { font-size: 14px; }  /* was 12px */
  .dk-img-none { font-size: 13.3px; }  /* was 11.5px */
  .dk-img-paste { font-size: 13.3px; }  /* was 11.5px */
  .dk-doc-tick { font-size: 17px; }  /* was 15px */
  .dk-doc-l { font-size: 14px; }  /* was 12.5px */
  .dk-doc-s { font-size: 13.3px; }  /* was 10.5px */
  .dk-act-l { font-size: 15px; }  /* was 13px */
  .dk-act-s { font-size: 13.3px; }  /* was 10px */
  .dk-type { font-size: 13.3px; }  /* was 10.5px */
  .dk-two-h { font-size: 14px; }  /* was 12.5px */
  .dk-bill-kind { font-size: 13.3px; }  /* was 10.5px */
  .dk-small-b { font-size: 13.3px; }  /* was 10.5px */
  .dk-info-t { font-size: 15px; }  /* was 13px */
  .dk-info-l { font-size: 13.3px; }  /* was 11.5px */
  .themebtn { font-size: 12px; }  /* kicker, was 11px */
  .wr-err { font-size: 14px; }  /* was 12px */
  .dk-full-t { font-size: 12px; }  /* kicker, was 11px */
  .dk-full-sub { font-size: 14px; }  /* was 12px */
  .dk-back { font-size: 14px; }  /* was 12px */
  .q-foot { font-size: 13.3px; }  /* was 10.5px */
  .q-empty { font-size: 13.3px; }  /* was 11px */
  .q-odd { font-size: 13.3px; }  /* was 10.5px */
  .dk-full-seam { font-size: 13.3px; }  /* was 11px */
  .q-link { font-size: 14px; }  /* was 12px */
  .q-link-i { font-size: 16px; }  /* was 14px */
  .dk-quad .wr-acts .btn { font-size: 13.3px; }  /* was 11px */
  .dk-quad .wr-type { font-size: 13.3px; }  /* was 11px */
  .dk-quad .tk-what { font-size: 14px; }  /* was 12.5px */
  .fo-h-r { font-size: 12px; }  /* kicker, was 10px */
  .fo-flag { font-size: 13.3px; }  /* was 11px */
  .dk-corner-body .fo-enc { font-size: 13.3px; }  /* was 11.5px */
  .dk-corner-body .fo-enc-r { font-size: 13.3px; }  /* was 10.5px */
  .dk-corner-body .fo-m { font-size: 13.3px; }  /* was 11.5px */
  .ci-t { font-size: 18px; }  /* was 16px */
  .ci-g-t { font-size: 12px; }  /* kicker, was 10px */
  .ci-entity { font-size: 13.3px; }  /* was 11.5px */
  .ci-place { font-size: 15px; }  /* was 13px */
  .ci-place .ci-why { font-size: 13.3px; }  /* was 10px */
  .ci-hint { font-size: 13.3px; }  /* was 10.5px */
  .ci-foot { font-size: 13.3px; }  /* was 11px */
  .ci-b-t { font-size: 12px; }  /* kicker, was 11px */
  .ci-b-none { font-size: 14px; }  /* was 12px */
  .ci-act, .ci-desk { font-size: 14px; }  /* was 12px */
  .nr-t { font-size: 15px; }  /* was 13px */
  .nr-row { font-size: 14px; }  /* was 12px */
  .nr-entry { font-size: 14px; }  /* was 12px */
  .rc-title { font-size: 16px; }  /* was 14px */
  .rc-count { font-size: 14px; }  /* was 12px */
  .rc-gap { font-size: 14px; }  /* was 12px */
  .rc-head { font-size: 13.3px; }  /* was 11px */
  .rc-n { font-size: 14px; }  /* was 12px */
  .rc-words { font-size: 15px; }  /* was 13px */
  .rc-why { font-size: 14px; }  /* was 12px */
  .rc-note { font-size: 13.3px; }  /* was 11px */
  .rc-confirm-say { font-size: 15px; }  /* was 13px */
  .fd-pa-off, .fd-pa-empty, .fd-pa-foot { font-size: 14px; }  /* was 12px */
  .fd-pa-said { font-size: 14px; }  /* was 12px */
  .fd-pa-chip { font-size: 13.3px; }  /* was 11px */
  .fd-eq-tab { font-size: 15px; }  /* was 13px */
  .fd-eq-n { font-size: 13.3px; }  /* was 11px */
  .fd-eq-tile { font-size: 14px; }  /* was 12.5px */
  .fd-eq-what { font-size: 15px; }  /* was 13px */
  .fd-eq-age { font-size: 14px; }  /* was 12px */
  .fd-eq-card-q, .fd-eq-cal-h { font-size: 15px; }  /* was 13px */
  .fd-eq-note { font-size: 15px; }  /* was 13px */
  .fd-eq-said { font-size: 14px; }  /* was 12.5px */
  .fd-eq-none { font-size: 14px; }  /* was 12.5px */
  .fd-eq-menu-i { font-size: 15px; }  /* was 13px */
  .fd-eq-day { font-size: 14px; }  /* was 12px */
  .fd-eq-day-n { font-size: 13.3px; }  /* was 10.5px */
  .fd-eq-logrow { font-size: 15px; }  /* was 13px */
  .fd-eq-log-t { font-size: 13.3px; }  /* was 11.5px */
  .fd-pa-head { font-size: 14px; }  /* was 12px */
  .fd-pa-who { font-size: 14px; }  /* was 12px */
  .fd-pa-appt, .fd-pa-tpl, .fd-pa-answered, .fd-pa-booking { font-size: 14px; }  /* was 12px */
  .fd-pa-note { font-size: 14px; }  /* was 12px */
  .fd-pa-field { font-size: 13.3px; }  /* was 11px */
  .tc-desk .fd-pa-said { font-size: 15px; }  /* was 13px */
  .tc-desk > .fd-pa-off { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-requests > .fd-pa-type, .tc-desk .tc-title, .tc-desk .tc-sec-h { font-size: 17px; }  /* was 15px */
  .tc-desk .tc-facts { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-tab { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-tab-n { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-li-1 { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-li-what { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-li-age { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-li-2 { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-li-said { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-picked { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-picked .tc-unpick { font-size: 16px; }  /* was 14px */
  .tc-desk .fd-pa-field, .tc-desk .tc-seg { font-size: 14px; }  /* was 12px */
  .tc-desk .fd-pa-field-l { font-size: 14px; }  /* was 12px */
  .tc-desk :is(input[type="text"], input[type="date"], input[type="time"], select, textarea) { font-size: 16px; }  /* was 14px */
  .tc-desk .tc-seg-t { font-size: 16px; }  /* was 14px */
  .tc-desk .ask-line { font-size: 15px; }  /* was 13px */
  .tc-desk .fd-pa-row .fd-pa-head { font-size: 14px; }  /* was 12px */
  .tc-desk .fd-pa-row .fd-pa-type { font-size: 16px; }  /* was 14px */
  .tc-desk .fd-pa-row .fd-pa-who { font-size: 15px; }  /* was 13px */
  .tc-desk .fd-pa-row .fd-pa-appt { font-size: 14px; }  /* was 12px */
  .tc-desk .fd-pa-note { font-size: 15px; }  /* was 13px */
  .tc-desk :is(.fd-pa-acts, .tc-request, .tc-joinbox, .ask-acts) .btn { font-size: 15px; }  /* was 13px */
  .tc-desk .fd-pa-empty { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-joinbox .tc-joinurl { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-pick-b { font-size: 15px; }  /* was 13px */
  .tc-desk .tc-pick-tag { font-size: 12px; }  /* kicker, was 10px */
  .tc-desk .tc-pick-key { font-size: 14px; }  /* was 12px */
  .tc-desk .tc-hit { font-size: 15px; }  /* was 13px */
  .tc-doc-desk-s { font-size: 16px; }  /* was 14px */
  .fd-cov-h { font-size: 14px; }  /* was 12px */
  .fd-cov-empty, .fd-cov-foot { font-size: 14px; }  /* was 12px */
  .fd-cov-said { font-size: 14px; }  /* was 12px */
  .fd-cov-head { font-size: 14px; }  /* was 12px */
  .fd-cov-who { font-size: 14px; }  /* was 12px */
  .fd-cov-line { font-size: 14px; }  /* was 12px */
  .fd-cov-rider { font-size: 14px; }  /* was 12px */
  .fd-cov-note { font-size: 14px; }  /* was 12px */
  .fd-cov-field { font-size: 13.3px; }  /* was 11px */
  .pbp-send-when { font-size: 14px; }  /* was 12px */
  .pbp-when { font-size: 14px; }  /* was 12px */
  .recbtn { font-size: 14px; }  /* was 12px */
  .rec-status { font-size: 11px; }  /* kicker, was 8.5px */
  body.is-phone #who .avatar { font-size: 13.3px; }  /* was 9px */
  body.is-phone #who .who-name { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .spine #clock { font-size: 13.3px; }  /* was 9.5px */
  body.is-phone .spine #patient-mrn { font-size: 13.3px; }  /* was 10px */
  body.is-phone .spine #patient-sub { font-size: 13.3px; }  /* was 11px */
  body.is-phone .spine #allergy { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-seat .l { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-seat .bdg { font-size: 13.3px; }  /* was 9px */
  body.is-phone .ph-ttl .sub { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ph-sh .kicker { font-size: 11px; }  /* kicker, was 9.5px */
  body.is-phone .ph-sh .n { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .ph-sh .r { font-size: 11px; }  /* kicker, was 9.5px */
  body.is-phone .ph-tile .b { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-tile .t { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-tile .s { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-band-h { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-row { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-row .tm { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .ph-row .wh { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .ph-row .rt { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-row.wrap .nm { font-size: 14px; }  /* was 12px */
  body.is-phone .ph-open { font-size: 14px; }  /* was 12px */
  body.is-phone .ph-chip { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-chip.sm { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-chip .n { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .ph-seg > * { font-size: 12px; }  /* kicker, was 10px */
  body.is-phone .ph-tab .l { font-size: 11px; }  /* kicker, was 8.5px */
  body.is-phone .ph-tool .l { font-size: 11px; }  /* kicker, was 7.5px */
  body.is-phone .ph-card .t { font-size: 15px; }  /* was 13.5px */
  body.is-phone .ph-card .p { font-size: 15px; }  /* was 13.5px */
  body.is-phone .ph-fld .k { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-fld .v { font-size: 16px; }  /* was 14px */
  body.is-phone .ph-pt { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-pt .n { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-btn { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-mini { font-size: 14px; }  /* was 12px */
  body.is-phone .ph-hint { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ph-hint.serif { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-tag { font-size: 11px; }  /* kicker, was 8.5px */
  body.is-phone .ph-tick { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-tick .who { font-size: 13.3px; }  /* was 9px */
  body.is-phone .ph-recs { font-size: 14px; }  /* was 12px */
  body.is-phone .ph-recs .r { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ph-kv .k { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-kv .v { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-kv .v.mono { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-money { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-money.dim { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ph-tot .k { font-size: 11px; }  /* kicker, was 9.5px */
  body.is-phone .ph-sheet .sheet-t { font-size: 18px; }  /* was 16px */
  body.is-phone .ph-wk .dh { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-wk .dh b { font-size: 14px; }  /* was 12px */
  body.is-phone .ph-wk .hr { font-size: 13.3px; }  /* was 9px */
  body.is-phone .ph-e { font-size: 13.3px; }  /* was 8.5px */
  body.is-phone .ph-band-c { font-size: 11px; }  /* kicker, was 8px */
  body.is-phone .ph-mo .dow { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-mo .dn { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ph-mo .m { font-size: 13.3px; }  /* was 7.5px */
  body.is-phone .ph-yr .mn { font-size: 14px; }  /* was 12.5px */
  body.is-phone .ph-yr .mn .y { font-size: 13.3px; }  /* was 9px */
  body.is-phone .ph-yr .st { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .ph-legend { font-size: 11px; }  /* kicker, was 8.5px */
  body.is-phone .tl-body-gone { font-size: 13.3px; }  /* was 11px */
  body.is-phone .tl-allergy { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .enc-empty { font-size: 14px; }  /* was 12px */
  body.is-phone .enc-said { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .enc-wait { font-size: 13.3px; }  /* was 11px */
  body.is-phone .enc-writing { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-sh .r.now-hit, .now-hit { font-size: 11px; }  /* kicker, was 9.5px */
  .now-nb-say { font-size: 13.3px; }  /* was 11.5px */
  .now-body .dy-sum, .now-body .dy-why { font-size: 13.3px; }  /* was 11px */
  .now-pad-text, .now-pad-when { font-size: 15px; }  /* was 13px */
  .now-pad-when { font-size: 14px; }  /* was 12px */
  .now-pad-back-h { font-size: 14px; }  /* was 12.5px */
  .now-pad-back-l { font-size: 14px; }  /* was 12px */
  .now-pad-back-l .when { font-size: 13.3px; }  /* was 11px */
  body.is-phone #preclerk .pc-t { font-size: 18px; }  /* was 16px */
  body.is-phone #preclerk .pc-line { font-size: 15px; }  /* was 13px */
  body.is-phone #preclerk .li-in, body.is-phone #preclerk .li-in-d { font-size: 16px; }  /* was 14px */
  body.is-phone .ar-room-n { font-size: 13.3px; }  /* was 11px */
  body.is-phone #room select.wr-type { font-size: 15px; }  /* was 13px */
  body.is-phone #registerview .wr-in, body.is-phone #registerview select.wr-type, body.is-phone #registerview select { font-size: 16px; }  /* was 14px */
  body.is-phone .ar-say-in { font-size: 16px; }  /* was 14px */
  body.is-phone .ar-key { font-size: 14px; }  /* was 12px */
  body.is-phone .fd-section-body .fo-h { font-size: 12px; }  /* kicker, was 10px */
  body.is-phone .fd-section-body .fo-h-r { font-size: 13.3px; }  /* was 9px */
  body.is-phone .fd-section-body .fo-f, body.is-phone .fd-section-body .fo-enc, body.is-phone .fd-section-body .fo-m { font-size: 15px; }  /* was 13px */
  body.is-phone .fd-section-body .fo-k { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .fd-section-body .fo-enc-r, body.is-phone .fd-section-body .fo-m-v, body.is-phone .fd-section-body .fo-m-w { font-size: 13.3px; }  /* was 11px */
  body.is-phone .fd-section-body .fo-m-off { font-size: 13.3px; }  /* was 11px */
  body.is-phone .fd-section-body .fo-m-un { font-size: 13.3px; }  /* was 10px */
  body.is-phone .fd-section-body .fo-m-t { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .fd-section-body .fo-none, body.is-phone .fd-section-body .fo-not, body.is-phone .fd-section-body .fo-more { font-size: 14px; }  /* was 12.5px */
  body.is-phone .fd-section-body .fo-film-n { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .fd-section-body .fo-film-x { font-size: 13.3px; }  /* was 10px */
  body.is-phone .fd-section-body .fo-film-b { font-size: 14px; }  /* was 12px */
  body.is-phone .fd-section-body .fo-fix-in { font-size: 16px; }  /* was 14px */
  body.is-phone .fd-section-body .fo-fix-back { font-size: 15px; }  /* was 13px */
  body.is-phone .fd-section-body .li-was { font-size: 14px; }  /* was 12.5px */
  body.is-phone #patients .pt-note { font-size: 13.3px; }  /* was 10px */
  body.is-phone #patients .pt-in { font-size: 16px; }  /* was 14px */
  body.is-phone #patients .pt-who { font-size: 16px; }  /* was 14px */
  body.is-phone #patients .pt-key { font-size: 13.3px; }  /* was 10px */
  body.is-phone #patients .pt-tag { font-size: 11px; }  /* kicker, was 8.5px */
  body.is-phone #patients .pt-n, body.is-phone #patients .pt-when { font-size: 13.3px; }  /* was 10px */
  body.is-phone #patients .pt-none { font-size: 15px; }  /* was 13px */
  body.is-phone #tasks .tk-t { font-size: 18px; }  /* was 16px */
  body.is-phone #tasks .tk-n { font-size: 13.3px; }  /* was 10px */
  body.is-phone #tasks .tk-late { font-size: 14px; }  /* was 12.5px */
  body.is-phone #tasks .tk-tray { font-size: 14px; }  /* was 12px */
  body.is-phone #tasks .tk-group { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone #tasks .tk-what { font-size: 15px; }  /* was 13.5px */
  body.is-phone #tasks .tk-key, body.is-phone #tasks .tk-from, body.is-phone #tasks .tk-due, body.is-phone #tasks .tk-tag { font-size: 13.3px; }  /* was 10px */
  body.is-phone #tasks .tk-none { font-size: 15px; }  /* was 13px */
  body.is-phone .st-sub { font-size: 14px; }  /* was 12px */
  body.is-phone .st-menu-chip { font-size: 14px; }  /* was 12.5px */
  body.is-phone .st-card-t { font-size: 16px; }  /* was 14px */
  body.is-phone .st-card-foot { font-size: 13.3px; }  /* was 10.5px */
  body.is-phone .st-field-k { font-size: 11px; }  /* kicker, was 9.5px */
  body.is-phone .st-field-v { font-size: 15px; }  /* was 13px */
  body.is-phone .st-banner-l { font-size: 11px; }  /* kicker, was 9px */
  body.is-phone .st-banner-v { font-size: 17px; }  /* was 15px */
  body.is-phone .st-tab { font-size: 14px; }  /* was 12.5px */
  body.is-phone .st-line { font-size: 14px; }  /* was 12px */
  body.is-phone .st-verdict-h { font-size: 16px; }  /* was 14px */
  body.is-phone .st-counts { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .st-section-t { font-size: 12px; }  /* kicker, was 10px */
  body.is-phone .st-sim { font-size: 14px; }  /* was 12.5px */
  body.is-phone .st-finding-w { font-size: 14px; }  /* was 12px */
  body.is-phone .st-finding-what { font-size: 15px; }  /* was 13px */
  body.is-phone .st-more, body.is-phone .st-none { font-size: 14px; }  /* was 12.5px */
  .ut-t { font-size: 13.3px; }  /* kicker, was 12px */
  .ut-s { font-size: 13.3px; }  /* was 11px */
  .ut-back { font-size: 13.3px; }  /* was 11px */
  .ut-wait { font-size: 13.3px; }  /* was 11px */
  .ut-no { font-size: 14px; }  /* was 12.5px */
  .ut-note { font-size: 13.3px; }  /* was 11.5px */
  .ut-h { font-size: 12px; }  /* kicker, was 10px */
  .ut-line { font-size: 14px; }  /* was 12px */
  .ut-n { font-size: 14px; }  /* was 12.5px */
  .ut-q { font-size: 13.3px; }  /* was 10px */
  .ut-nopoints { font-size: 13.3px; }  /* was 10px */
  .ut-latest { font-size: 14px; }  /* was 12.5px */
  .ut-when { font-size: 13.3px; }  /* was 10px */
  .ut-arrow { font-size: 16px; }  /* was 14px */
  .ut-once { font-size: 11px; }  /* kicker, was 9.5px */
  .ut-range { font-size: 13.3px; }  /* was 10px */
  .ut-skip { font-size: 13.3px; }  /* was 10px */
  .ut-allergy { font-size: 12px; }  /* kicker, was 11px */
  .ut-med-i { font-size: 14px; }  /* was 12.5px */
  .ut-med-w { font-size: 13.3px; }  /* was 10px */
  .ut-med-r { font-size: 13.3px; }  /* was 11px */
  .ut-alert-r { font-size: 13.3px; }  /* was 11px */
  .ut-alert-k { font-size: 11px; }  /* kicker, was 9.5px */
  .ut-alert-t { font-size: 13.3px; }  /* was 11.5px */
  .ut-av-i { font-size: 14px; }  /* was 12.5px */
  .ut-av-w { font-size: 13.3px; }  /* was 11.5px */
  .ut-av-s { font-size: 13.3px; }  /* was 10px */
  .ut-basis { font-size: 13.3px; }  /* was 11.5px */
  .mail-addr { font-size: 16px; }  /* was 14px */
  .mail-tag { font-size: 12px; }  /* kicker, was 11px */
  .mail-from { font-size: 16px; }  /* was 14px */
  .mail-sub { font-size: 16px; }  /* was 14px */
  .mail-when { font-size: 14px; }  /* was 12px */
  .mail-where { font-size: 14px; }  /* was 12px */
  .mail-att-n { font-size: 15px; }  /* was 13px */
  .mail-fix-h { font-size: 12px; }  /* kicker, was 11px */
  .mail-f-k { font-size: 12px; }  /* kicker, was 11px */
  .mail-in { font-size: 15px; }  /* was 13px */
  .mail-back { font-size: 15px; }  /* was 13px */
  .mail-said { font-size: 14px; }  /* was 12px */
  .mail-done { font-size: 14px; }  /* was 12px */
  .mail-none { font-size: 15px; }  /* was 13px */
  .mail-none-t { font-size: 16px; }  /* was 14px */
  .mail-set { font-size: 13.3px; }  /* was 11.5px */
  .pill-reg { font-size: 13.3px; }  /* kicker, was 12px */
  .pill-mail { font-size: 12px; }  /* kicker, was 10px */
  .pill-mail .mg { font-size: 13.3px; }  /* was 11px */
  .pill-owed { font-size: 12px; }  /* kicker, was 10px */
  .pill-owed .og { font-size: 13.3px; }  /* was 11px */
  .owed-mrn { font-size: 12px; }  /* kicker, was 11px */
  .owed-what { font-size: 13.3px; }  /* was 10.5px */
  .pc-name { font-size: 17px; }  /* was 15px */
  .pc-h .pill { font-size: 13.3px; }  /* was 10px */
  .pc-pin { font-size: 11px; }  /* kicker, was 9px */
  .pc-kicker { font-size: 12px; }  /* kicker, was 11px */
  .pc-shelf { font-size: 15px; }  /* was 13px */
  .pc-note { font-size: 13.3px; }  /* was 10.5px */
  .pband-tag { font-size: 11px; }  /* kicker, was 7.5px */
  .pband .pill-reg { font-size: 16px; }  /* was 14px */
  .pband .patient-sub { font-size: 14px; }  /* was 12px */
  .pband-prof { font-size: 12px; }  /* kicker, was 11px */
  .spine-gear { font-size: 18px; }  /* was 16px */
  .pprof-x { font-size: 18px; }  /* was 16px */
  .rdb-partbtn { font-size: 17px; }  /* was 15px */
  .rdb-parts-k { font-size: 12px; }  /* kicker, was 10px */
  .rdb-part { font-size: 14px; }  /* was 12.5px */
  .rdb-grp { font-size: 12px; }  /* kicker, was 11px */
  .dkp-group { font-size: 12px; }  /* kicker, was 11px */
  .dkp-item-l { font-size: 16px; }  /* was 14px */
  .dkp-item-s { font-size: 14px; }  /* was 12px */
  .dkp-card-t { font-size: 13.3px; }  /* kicker, was 12px */
  .dkp-card-a { font-size: 14px; }  /* was 12px */
  .dkp-chip { font-size: 14px; }  /* was 12px */
  .dkp-table { font-size: 15px; }  /* was 13px */
  .dkp-table th { font-size: 12px; }  /* kicker, was 11px */
  .fl-title { font-size: 13.3px; }  /* kicker, was 12px */
  .fl-sub { font-size: 13.3px; }  /* was 11.5px */
  .fl-back { font-size: 13.3px; }  /* was 11.5px */
  .fl-group-t { font-size: 12px; }  /* kicker, was 10.5px */
  .fl-group-sub { font-size: 13.3px; }  /* was 11px */
  .fl-form { font-size: 16px; }  /* was 14px */
  .fl-form .fl-how { font-size: 12px; }  /* kicker, was 11.5px */
  .fl-form .fl-need { font-size: 12px; }  /* kicker, was 10.5px */
  .fl-ask-l { font-size: 13.3px; }  /* was 11.5px */
  .fl-ask-in { font-size: 15px; }  /* was 13px */
  .fl-more-t { font-size: 12px; }  /* kicker, was 10px */
  .fl-foot { font-size: 13.3px; }  /* was 11.5px */
  .fl-said { font-size: 14px; }  /* was 12px */
  .dk-icons.fill .dk-tile-i { font-size: 17px; }  /* was 15px */
  .dk-icons.fill .dk-tile-pair .dk-tile-i { font-size: 15px; }  /* was 13px */
  .dk-icons.fill .dk-tile { font-size: 13.3px; }  /* was 11.5px */
  .dk-ibar-k { font-size: 11px; }  /* kicker, was 9px */
  .dk-ibar-v { font-size: 14px; }  /* was 12px */
  .dk-ibar-b { font-size: 13.3px; }  /* was 10.5px */
  .fo-enc.is-pend .fo-enc-r { font-size: 12px; }  /* kicker, was 10px */
  .fo-sub { font-size: 13.3px; }  /* was 11px */
  .wk-e-len { font-size: 13.3px; }  /* was 10px */
  .sl-item { font-size: 14px; }  /* was 12px */
  .sl-item small { font-size: 13.3px; }  /* was 10.5px */
  .sl-k { font-size: 12px; }  /* kicker, was 11px */
  .sl-when { font-size: 17px; }  /* was 15px */
  .sl-opt-t b { font-size: 16px; }  /* was 14px */
  .sl-opt-t span { font-size: 14px; }  /* was 12px */
  .sl-chip { font-size: 14px; }  /* was 12px */
  .sl-ask { font-size: 15px; }  /* was 13px */
  .sl-note { font-size: 14px; }  /* was 12px */
  .sl-defs { font-size: 14px; }  /* was 12px */
  .sl-prov summary { font-size: 15px; }  /* was 13px */
  .sl-all { font-size: 15px; }  /* was 13px */
  .dk-tele-row { font-size: 15px; }  /* was 13px */
  .dk-tele-when { font-size: 13.3px; }  /* was 11px */
  .dk-tele-want { font-size: 14px; }  /* was 12px */
  .tc-proposals-t { font-size: 14px; }  /* was 12px */
  .dk-desk-item-t { font-size: 15px; }  /* was 13px */
  .dk-desk-item-w { font-size: 13.3px; }  /* was 11.5px */
  .dk-desk-first { font-size: 14px; }  /* was 12.5px */
  .dk-deskmsg-text { font-size: 15px; }  /* was 13.3px */
  .dk-deskmsg-row { font-size: 14px; }  /* was 12px */
  .pc-tool { font-size: 18px; }  /* was 16px */
  .pc-sheet { font-size: 14px; }  /* was 12.5px */
  .pc-kind { font-size: 12px; }  /* kicker, was 10.5px */
  .pc-sum-h { font-size: 13.3px; }  /* kicker, was 12px */
  .pc-sum-c { font-size: 14px; }  /* was 12.5px */
  .pc-sum-r { font-size: 13.3px; }  /* was 11px */
  .pc-sum-m { font-size: 14px; }  /* was 12px */
  .pc-card-w { font-size: 14px; }  /* was 12.5px */
  .pc-grp { font-size: 12px; }  /* kicker, was 11px */
  .pc-item { font-size: 15px; }  /* was 13.3px */
  .pc-item.is-own .pc-task-t::after { font-size: 13.3px; }  /* was 11px */
  .pc-ed { font-size: 15px; }  /* was 13px */
  .pc-in { font-size: 15px; }  /* was 13px */
  .pc-pop-h { font-size: 12px; }  /* kicker, was 10.5px */
  .pc-pop-s { font-size: 14px; }  /* was 12px */
  .pc-kind-chip { font-size: 13.3px; }  /* was 10.5px */
  .pc-tpl-hd { font-size: 14px; }  /* was 12px */
  .pc-tpl-meta { font-size: 14px; }  /* was 12.5px */
  .rcs-due-chip { font-size: 14px; }  /* was 12px */
  .dk-car-tools .dy-tool { font-size: 15px; }  /* was 13px */
  .dy-sheet-note { font-size: 14px; }  /* was 12px */
  .dy-cols-off { font-size: 13.3px; }  /* was 11px */
  .dy-sheet { font-size: 15px; }  /* was 13px */
  .dc-chip { font-size: 14px; }  /* was 12px */
  .dc-tag { font-size: 14px; }  /* was 12px */
  .dc-detail-h { font-size: 12px; }  /* kicker, was 11px */
  .dc-detail-l { font-size: 15px; }  /* was 13px */
  .dc-detail-n { font-size: 14px; }  /* was 12px */
  .dy-cols-g { font-size: 12px; }  /* kicker, was 11px */
  .dy-cols-l { font-size: 15px; }  /* was 13px */
  .wr-row.wr-compact .wr-call { font-size: 18px; }  /* was 16px */
  .dk-coltoggle { font-size: 17px; }  /* was 15px */
  .fd-hdr-seg { font-size: 14px; }  /* was 12.5px */
  button.fd-hdr-loc { font-size: 13.3px; }  /* kicker, was 12.5px */
  .fd-hdr-clock { font-size: 14px; }  /* was 12px */
  .fd-hdr-act { font-size: 14px; }  /* was 12px */
  .fd-tag { font-size: 11px; }  /* kicker, was 9px */
  .fd-tool-h { font-size: 12px; }  /* kicker, was 11px */
  .fd-rail-tab { font-size: 13.3px; }  /* kicker, was 12px */
  .fd-rail-badge { font-size: 12px; }  /* kicker, was 11px */
  .fd-side-t { font-size: 12px; }  /* kicker, was 10px */
  .fd-away-block { font-size: 13.3px; }  /* was 11.5px */
  .fd-side-note { font-size: 13.3px; }  /* was 11.5px */
  .fd-side-sec-h { font-size: 12px; }  /* kicker, was 10px */
  .fd-ftr-item { font-size: 14px; }  /* was 12px */
  .fd-ftr-detail { font-size: 13.3px; }  /* was 11px */
  .fd-set-h { font-size: 11px; }  /* kicker, was 9.5px */
  .fd-set-row { font-size: 14px; }  /* was 12px */
  .fd-sc-sum { font-size: 13.3px; }  /* was 11.5px */
  .fd-sc-why { font-size: 13.3px; }  /* was 11px */
  .fd-sc-none { font-size: 14px; }  /* was 12px */
  .fd-sc-gap { font-size: 13.3px; }  /* was 11px */
  .fd-sc-dh-d { font-size: 13.3px; }  /* was 11px */
  .fd-sc-dh-n { font-size: 15px; }  /* was 13px */
  .fd-sc-rh { font-size: 13.3px; }  /* was 10.5px */
  .fd-sc-chip { font-size: 13.3px; }  /* was 10px */
  .fd-sc-e { font-size: 13.3px; }  /* was 11px */
  .fd-sc-e-clip { font-size: 13.3px; }  /* was 10px */
  .fd-sc-e .dfc-bell { font-size: 14px; }  /* was 12px */
  .fd-sc-more { font-size: 13.3px; }  /* was 10.5px */
  .fd-sc-lg-t { font-size: 13.3px; }  /* was 10.5px */
  .fd-dl-h { font-size: 12px; }  /* kicker, was 11px */
  .fd-dl-row { font-size: 14px; }  /* was 12px */
  .fd-dl-x { font-size: 13.3px; }  /* was 11px */
  .fd-dl-none { font-size: 14px; }  /* was 12px */
  .fd-dl-bad { font-size: 13.3px; }  /* was 11.5px */
  .fd-dl-note { font-size: 13.3px; }  /* was 11.5px */
  .fd-dl-help .panel-help-button { font-size: 14px; }  /* was 12px */
  .fd-dl-l { font-size: 13.3px; }  /* was 11px */
  .fd-dl-whonote { font-size: 13.3px; }  /* was 11.5px */
  .fd-dl-ro { font-size: 13.3px; }  /* was 11.5px */
  .fd-dl-far { font-size: 13.3px; }  /* was 11px */
  .fd-bk-h { font-size: 12px; }  /* kicker, was 11px */
  .fd-bk-in { font-size: 14px; }  /* was 12px */
  .fd-bk-note { font-size: 13.3px; }  /* was 11.5px */
  .fd-sc-count-d { font-size: 13.3px; }  /* was 11px */
  .fd-sc-count-n { font-size: 17px; }  /* was 15px */
  .fd-sc-count-marks span { font-size: 13.3px; }  /* was 9.5px */
  .fda-btn { font-size: 15px; }  /* was 13px */
  .fda-link { font-size: 14px; }  /* was 12px */
  .fda-means { font-size: 14px; }  /* was 12px */
  .fda-note { font-size: 14px; }  /* was 12px */
  .fda-co-title { font-size: 13.3px; }  /* kicker, was 13px */
  .fda-co-sub { font-size: 14px; }  /* was 12px */
  .fd-doc-input { font-size: 14px; }  /* was 12.5px */
  .fd-wk-title { font-size: 15px; }  /* was 13px */
  .fd-wk-count { font-size: 13.3px; }  /* was 11px */
  .fd-wk-none { font-size: 13.3px; }  /* was 11.5px */
  .fd-wk-group-t { font-size: 12px; }  /* kicker, was 11.5px */
  .fd-wk-task-sub { font-size: 13.3px; }  /* was 10.5px */
  .fd-wk-instr { font-size: 14px; }  /* was 12px */
  .fd-wk-btn { font-size: 14px; }  /* was 12.5px */
  .fd-wk-when { font-size: 14px; }  /* was 12.5px */
  .fd-wk-said { font-size: 14px; }  /* was 12px */
  .fd-wk-lane-t { font-size: 13.3px; }  /* kicker, was 12px */
  .fd-wk-chip { font-size: 13.3px; }  /* was 11px */
  .fd-wk-log-row { font-size: 14px; }  /* was 12.5px */
  .fd-wk-log-when { font-size: 13.3px; }  /* was 11.5px */
  .fd-wk-form-t { font-size: 12px; }  /* kicker, was 11px */
  .fd-wk-sel, .fd-wk-date { font-size: 14px; }  /* was 12.5px */
  .fd-wk-hint { font-size: 14px; }  /* was 12px */
  .fd-wk-de-t { font-size: 13.3px; }  /* kicker, was 12px */
  .fd-wk-de-line { font-size: 14px; }  /* was 12.5px */
  .fd-wk-de-row { font-size: 14px; }  /* was 12.5px */
  .fd-sum-badge { font-size: 15px; }  /* was 13px */
  .fd-sum-days-t { font-size: 15px; }  /* was 13px */
  .fd-sum-day { font-size: 16px; }  /* was 14px */
  .fd-sum-h { font-size: 13.3px; }  /* kicker, was 12px */
  .fd-sum-who { font-size: 14px; }  /* was 12.5px */
  .fd-sum-what { font-size: 16px; }  /* was 14px */
  .fd-sum-sub { font-size: 14px; }  /* was 12px */
  .fd-sum-late { font-size: 14px; }  /* was 12px */
  .fd-sum-none, .fd-sum-later { font-size: 15px; }  /* was 13px */
  .fd-wk-gap-t { font-size: 12px; }  /* kicker, was 11px */
  .fd-wk-gap-row { font-size: 13.3px; }  /* was 11.5px */
  .fd-wk-tag { font-size: 11px; }  /* kicker, was 9.5px */
  .fd-bot-title { font-size: 15px; }  /* was 13px */
  .fd-bot-tag { font-size: 11px; }  /* kicker, was 9.5px */
  .fd-bot-dim-note { font-size: 13.3px; }  /* was 11.5px */
  .fd-chat-title { font-size: 15px; }  /* was 13px */
  .fd-chat-count { font-size: 13.3px; }  /* was 11px */
  .fd-chat-honest { font-size: 13.3px; }  /* was 11px */
  .fd-chat-empty { font-size: 13.3px; }  /* was 11.5px */
  .fd-chat-warn { font-size: 14px; }  /* was 12px */
  .fd-chat-row-sub { font-size: 13.3px; }  /* was 10.5px */
  .fd-chat-tag { font-size: 11px; }  /* kicker, was 9.5px */
  .fd-chat-back { font-size: 14px; }  /* was 12px */
  .fd-chat-turn-who { font-size: 13.3px; }  /* was 10.5px */
  .fd-chat-turn-at { font-size: 13.3px; }  /* was 10px */
  .fd-chat-turn-said { font-size: 15px; }  /* was 13px */
  .fd-chat-reply-status { font-size: 13.3px; }  /* was 11.5px */
  .fd-chat-reply-quote { font-size: 13.3px; }  /* was 11.5px */
  .fd-chat-input { font-size: 15px; }  /* was 13px */
  .fd-chat-btn { font-size: 14px; }  /* was 12.5px */
  .fd-chat-said { font-size: 14px; }  /* was 12px */
  .mm-sub { font-size: 15px; }  /* was 13.3px */
  .mm-name { font-size: 16px; }  /* was 14px */
  .mm-l { font-size: 12px; }  /* kicker, was 11px */
  .mm-intent { font-size: 15px; }  /* was 13.3px */
  .mm-b { font-size: 15px; }  /* was 13.3px */
  .mm-say { font-size: 14px; }  /* was 12.5px */
  .mm-was { font-size: 14px; }  /* was 12.5px */
  .mm-now { font-size: 14px; }  /* was 12.5px */
  .outsideview .ow-fld .k { font-size: 11px; }  /* kicker, was 9px */
  .outsideview .ow-in { font-size: 17px; }  /* was 15px */
  .outsideview .ow-figs { font-size: 14px; }  /* was 12px */
  .fr-intro { font-size: 14px; }  /* was 12.5px */
  .fr-h { font-size: 16px; }  /* was 14px */
  .fr-blurb { font-size: 14px; }  /* was 12px */
  .fr-when { font-size: 15px; }  /* was 13px */
  .fr-tag { font-size: 12px; }  /* kicker, was 10.5px */
  .fr-what { font-size: 14px; }  /* was 12px */
  .fr-up-h { font-size: 14px; }  /* was 12.5px */
  .fr-hint { font-size: 13.3px; }  /* was 11px */
  .dfc-bell { font-size: 17px; }  /* was 15px */
  .dfc-sub { font-size: 15px; }  /* was 13px */
  .dfc-kind-chip { font-size: 12px; }  /* kicker, was 11px */
  .dfc-kind-t { font-size: 15px; }  /* was 13px */
  .dfc-clash-t { font-size: 16px; }  /* was 14px */
  .dfc-clash-line { font-size: 15px; }  /* was 13px */
  .dfc-sec-t { font-size: 12px; }  /* kicker, was 11px */
  .dfc-sec-n { font-size: 13.3px; }  /* was 11px */
  .dfc-none { font-size: 15px; }  /* was 13px */
  .dfc-badge { font-size: 14px; }  /* was 12px */
  .prefs-intro { font-size: 17px; }  /* was 15px */
  .prefs-description { font-size: 16px; }  /* was 14px */
  .prefs-label { font-size: 16px; }  /* was 14px */
  .prefs-form .su-in { font-size: 17px; }  /* was 15px */
  .prefs-help { font-size: 15px; }  /* was 13px */
  .prefs-status { font-size: 15px; }  /* was 13px */
  .prefs-form .btn { font-size: 16px; }  /* was 14px */
  .pr-tosp { font-size: 15px; }  /* was 13px */
  .pr-tosp-source { font-size: 14px; }  /* was 12px */
  .report-intro { font-size: 17px; }  /* was 15px */
  .report-tile-meta { font-size: 15px; }  /* was 13px */
  .report-host .st-tab, .stats-host .cs-tab, .stats-host .cs-btn { font-size: 16px; }  /* was 14px */
  .report-status { font-size: 16px; }  /* was 14px */
  .report-metric-label, .stats-host .cs-fig-l { font-size: 16px; }  /* was 14px */
  .audit-host .st-sim-n { font-size: 16px; }  /* was 14px */
  .audit-host .st-finding-what { font-size: 16px; }  /* was 14px */
  .stats-host .cs-chk { font-size: 15px; }  /* was 13px */
  .stats-host .cs-date-label { font-size: 14px; }  /* was 12px */
  .stats-host .cs-date { font-size: 16px; }  /* was 14px */
  .stats-host .cs-status { font-size: 14px; }  /* was 12px */
  .stats-host .cs-fig-s { font-size: 14px; }  /* was 12px */
  .stats-host .cs-tr > span { font-size: 15px; }  /* was 13px */
  .stats-host .cs-th > span { font-size: 13.3px; }  /* was 11px */
  .stats-host .cs-note, .stats-host .cs-none, .stats-host .cs-sub { font-size: 14px; }  /* was 12px */
  .stats-host .cs-n { font-size: 16px; }  /* was 14px */
  .procedure-host .pr-sub { font-size: 17px; }  /* was 15px */
  .procedure-host .meds-find { font-size: 17px; }  /* was 15px */
  .procedure-host .pr-note { font-size: 15px; }  /* was 13px */
  .procedure-host .pr-count { font-size: 15px; }  /* was 13px */
  .procedure-host .pr-tick { font-size: 16px; }  /* was 14px */
  .procedure-host .pr-open { font-size: 16px; }  /* was 14px */
  .procedure-host .pr-tosp { font-size: 14px; }  /* was 12px */
  .pr-template-field { font-size: 15px; }  /* was 13px */
  .pr-template-input { font-size: 16px; }  /* was 14px */
  .pr-level { font-size: 15px; }  /* was 13px */
  .pr-template-group > summary, .pr-template-advanced > summary { font-size: 16px; }  /* was 14px */
  .pr-code-confirm { font-size: 15px; }  /* was 13px */
  .pr-template-preview { font-size: 15px; }  /* was 13px */
  .pr-template-status { font-size: 15px; }  /* was 13px */
  .note-host .tb-in { font-size: 16px; }  /* was 14px */
  .note-host .btn, .fee-host .btn { font-size: 15px; }  /* was 13px */
  .note-library-status { font-size: 15px; }  /* was 13px */
  .note-complaint-name { font-size: 16px; }  /* was 14px */
  .note-pagination { font-size: 15px; }  /* was 13px */
  .note-name-label { font-size: 15px; }  /* was 13px */
  .note-heading-tab { font-size: 14px; }  /* was 12px */
  .note-editor-field { font-size: 16px; }  /* was 14px */
  .note-enable { font-size: 15px; }  /* was 13px */
  .memo-library-host .mm-name, .memo-library-host .tb-in, .memo-library-host textarea { font-size: 16px; }  /* was 14px */
  .mm-field { font-size: 15px; }  /* was 13px */
  .mm-hint { font-size: 14px; }  /* was 12px */
  .pdf-library-host .tb-item-name { font-size: 16px; }  /* was 14px */
  .fee-host .fr-description > summary, .fee-host .fr-history > summary { font-size: 15px; }  /* was 13px */
  .fee-host .fr-when { font-size: 16px; }  /* was 14px */
  .fee-host .fr-up-h { font-size: 16px; }  /* was 14px */
  .fee-host .fr-up .or-in { font-size: 16px; }  /* was 14px */
  .fee-host .fr-hint { font-size: 15px; }  /* was 13px */
  .fee-host .fr-blurb, .fee-host .fr-what { font-size: 15px; }  /* was 13px */
  .safety-host .sf-rule-name { font-size: 16px; }  /* was 14px */
  .safety-host .sf-rule-detail { font-size: 15px; }  /* was 13px */
  .fr-source-meta, .contact-meta { font-size: 15px; }  /* was 13px */
  .fr-source-action { font-size: 15px; }  /* was 13px */
  .fr-current { font-size: 15px; }  /* was 13px */
  .fr-review-date { font-size: 15px; }  /* was 13px */
  .fee-workspace .su-in { font-size: 16px; }  /* was 14px */
  .fr-rate-table { font-size: 16px; }  /* was 14px */
  .fr-rate-table th { font-size: 14px; }  /* was 12px */
  .fr-paging { font-size: 15px; }  /* was 13px */
  .contact-host .prt-name { font-size: 17px; }  /* was 15px */
  .contact-host .prt-reach, .contact-host .prt-none { font-size: 15px; }  /* was 13px */
  .contact-host .prt-field-k { font-size: 15px; }  /* was 13px */
  .contact-host .su-in { font-size: 16px; }  /* was 14px */
  .procedure-workspace .pr-workspace-intro { font-size: 16px; }  /* was 14px */
  .procedure-workspace .pr-count { font-size: 15px; }  /* was 13px */
  .procedure-workspace .meds-find { font-size: 16px; }  /* was 14px */
  .pr-family-description { font-size: 15px; }  /* was 13px */
  .pr-family-meta { font-size: 14px; }  /* was 12px */
  .pr-workspace-scope, .pr-selected-count { font-size: 14px; }  /* was 12px */
  .pr-mode, .pr-section { font-size: 16px; }  /* was 14px */
  .pr-variant-label { font-size: 15px; }  /* was 13px */
  .procedure-workspace .pr-template-input { font-size: 16px; }  /* was 14px */
  .pr-workspace-help { font-size: 14px; }  /* was 12px */
  .pr-wording-view, .pr-section-preview { font-size: 16px; }  /* was 14px */
  .pr-field-index span { font-size: 14px; }  /* was 12px */
  .procedure-workspace .pr-template-field { font-size: 15px; }  /* was 13px */
  .pr-wording-edit { font-size: 16px; }  /* was 14px */
  .procedure-workspace .pr-level { font-size: 14px; }  /* was 12px */
  .pr-preview-tile summary { font-size: 15px; }  /* was 13px */
  .pr-preview-tile .pr-section-preview { font-size: 15px; }  /* was 13px */
  .procedure-workspace .pr-template-status { font-size: 15px; }  /* was 13px */
  .pr-candidate { font-size: 14px; }  /* was 12px */
  .stats-host .report-intro { font-size: 16px; }  /* was 14px */
  .stats-host .report-tile-heading .report-tile-meta { font-size: 14px; }  /* was 12px */
  .stats-host .report-card-title { font-size: 17px; }  /* was 15px */
  .stats-host .cs-clinics > .cs-lbl { font-size: 14px; }  /* was 12px */
  .stats-host .cs-tab, .stats-host .cs-btn { font-size: 15px; }  /* was 13px */
  .stats-host .cs-fig-l { font-size: 15px; }  /* was 13px */
  .stats-host .cs-noshows .cs-title { font-size: 17px; }  /* was 15px */
  .cs-pager { font-size: 14px; }  /* was 12px */
  .stats-host .cs-no-show-list .tk-group { font-size: 14px; }  /* was 12px */
  .stats-host .cs-no-show-list .tk-key { font-size: 15px; }  /* was 13px */
  .stats-host .cs-no-show-list .tk-tag { font-size: 13.3px; }  /* was 10px */
  .hs-lede, .hs-hint { font-size: 15px; }  /* was 13.3px */
  .hs-btn { font-size: 16px; }  /* was 14px */
  .hs-in { font-size: 16px; }  /* was 14px */
  .hs-ta { font-size: 16px; }  /* was 14px */
  .hs-h3 { font-size: 17px; }  /* was 15px */
  .hs-lab { font-size: 12px; }  /* kicker, was 11px */
  .hs-row-s { font-size: 14px; }  /* was 12px */
  .hs-pline { font-size: 15px; }  /* was 13px */
  .hs-pkg-a { font-size: 14px; }  /* was 12.5px */
  .hs-tick { font-size: 15px; }  /* was 13.5px */
  .hs-sched-r { font-size: 15px; }  /* was 13px */
  .hs-sched-t { font-size: 14px; }  /* was 12px */
  .hs-sched-s { font-size: 13.3px; }  /* was 11.5px */
  .hs-chip { font-size: 14px; }  /* was 12px */
  .hs-panel { font-size: 15px; }  /* was 13.5px */
  .hs-res-n { font-size: 16px; }  /* was 14px */
  .hs-unit-l { font-size: 14px; }  /* was 12.5px */
  .hs-res-f { font-size: 15px; }  /* was 13px */
  .hs-res-r { font-size: 14px; }  /* was 12px */
  .hs-prev { font-size: 13.3px; }  /* was 11.5px */
  .hs-note { font-size: 14px; }  /* was 12px */
  .hs-crit-done { font-size: 15px; }  /* was 13px */
  .hs-due-r { font-size: 15px; }  /* was 13.5px */
  .hs-dirty { font-size: 15px; }  /* was 13px */
  .hs-say { font-size: 15px; }  /* was 13.5px */
  .pd-fl { font-size: 15px; }  /* was 13px */
  .pd-fu { font-size: 14px; }  /* was 12px */
  .pd-fg-h { font-size: 13.3px; }  /* kicker, was 12px */
  .pd-chip, .pd-ans { font-size: 15px; }  /* was 13px */
  .pd-green { font-size: 15px; }  /* was 13px */
  .pd-light { font-size: 17px; }  /* was 15px */
  .pd-reason, .pd-band, .pd-action, .pd-note, .pd-screen, .pd-src, .pd-pace { font-size: 15px; }  /* was 13px */
  .pd-lines { font-size: 14px; }  /* was 12px */
  .pd-dom { font-size: 13.3px; }  /* kicker, was 12px */
  .pd-ms-w { font-size: 15px; }  /* was 13px */
  .rx-bar-reg { font-size: 13.3px; }  /* kicker, was 12.5px */
  .rx-bar-line { font-size: 14px; }  /* was 12.5px */
  .rx-bar-name { font-size: 14px; }  /* was 12px */
  .rx-dosing, .rx-badge { font-size: 14px; }  /* was 12px */
  .rx-bar-allergy { font-size: 13.3px; }  /* kicker, was 12px */
  .rx-bar-differs { font-size: 14px; }  /* was 12px */
  .rx-q { font-size: 14px; }  /* was 12.5px */
  .rx-caret { font-size: 14px; }  /* was 12px */
  .rx-hit { font-size: 14px; }  /* was 12.5px */
  .rx-hit-none { font-size: 14px; }  /* was 12px */
  .rx-group { font-size: 14px; }  /* was 12.5px */
  .rx-tpl-n { font-size: 14px; }  /* was 12.5px */
  .rx-tpl-w { font-size: 13.3px; }  /* was 11px */
  .rx-table th { font-size: 14px; }  /* was 12px */
  .rx-line > td { font-size: 14px; }  /* was 12.5px */
  .rx-in, .rx-sel { font-size: 14px; }  /* was 12.5px */
  .rx-banner { font-size: 14px; }  /* was 12.5px */
  .cw-wait, .cw-off { font-size: 14px; }  /* was 12px */
  .cw-title { font-size: 12px; }  /* kicker, was 11px */
  .cw-status { font-size: 12px; }  /* kicker, was 10px */
  .cw-test { font-size: 13.3px; }  /* was 10px */
  .cw-who { font-size: 13.3px; }  /* was 11px */
  .cw-sec-h { font-size: 12px; }  /* kicker, was 11px */
  .cw-badge { font-size: 11px; }  /* kicker, was 9px */
  .cw-ta { font-size: 15px; }  /* was 13px */
  .cw-sec-said { font-size: 13.3px; }  /* was 10px */
  .cw-stale-t, .cw-extra-t { font-size: 14px; }  /* was 12px */
  .cw-chip { font-size: 14px; }  /* was 12px */
  .cw-in { font-size: 14px; }  /* was 12px */
  .cw-panel-h { font-size: 12px; }  /* kicker, was 11px */
  .cw-dx-l, .cw-rx-l { font-size: 15px; }  /* was 13px */
  .cw-uncoded, .cw-draft { font-size: 11px; }  /* kicker, was 9px */
  .cw-coded { font-size: 11px; }  /* kicker, was 9px */
  .cw-term-c { font-size: 13.3px; }  /* was 9px */
  .cw-visit-h { font-size: 13.3px; }  /* was 11px */
  .cw-visit-l, .cw-visit-p { font-size: 14px; }  /* was 12px */
  .cw-issued { font-size: 12px; }  /* kicker, was 10px */
  .cw-rec-on { font-size: 14px; }  /* was 12px */
  .cw-line { font-size: 14px; }  /* was 12px */
  .cw-picked { font-size: 14px; }  /* was 12px */
  .cw-tray-who { font-size: 15px; }  /* was 13px */
  .cw-tray-st { font-size: 12px; }  /* kicker, was 10px */
  .cw-review-who { font-size: 13.3px; }  /* kicker, was 12px */
  .cw-review-date { font-size: 13.3px; }  /* was 11px */
  .cw-story-t { font-size: 15px; }  /* was 13px */
  .dk-actions .dk-action .dk-action-i { font-size: 17px; }  /* was 15px */
  .dk-actions .dk-action .dk-action-l { font-size: 14px; }  /* was 12px */
  .has-short::after { font-size: 14px; }  /* was 12px */
  .dk-notice-one .dk-notice-t.has-short::after { font-size: 14px; }  /* was 12px */
  .dk-pin { font-size: 18px; }  /* was 16px */
  .dk-pins-fold { font-size: 16px; }  /* was 14px */
  .dk-tile .has-short::after { font-size: 15px; }  /* was 13.3px */
  .inf-withheld { font-size: 15px; }  /* was 13px */
  .inf-th { font-size: 15px; }  /* was 13px */
  .inf-item { font-size: 15px; }  /* was 13px */
  .inf-k, .inf-said { font-size: 15px; }  /* was 13px */
  .inf-pre { font-size: 14px; }  /* was 12px */
  .ans-legend .ans-src { font-size: 14px; }  /* was 12px */
  .wb-pane-h { font-size: 15px; }  /* was 13px */
  .inf-bar-l { font-size: 14px; }  /* was 12px */
  .inf-tok { font-size: 14px; }  /* was 12px */
  .inf-win { font-size: 15px; }  /* was 13px */
  .inf-num { font-size: 15px; }  /* was 13px */
  .inf-ttok { font-size: 14px; }  /* was 12px */
  .inf-set .inf-win { font-size: 14px; }  /* was 12px */
  .inf-bar-w { font-size: 13.3px; }  /* was 11px */
  .inf-set .inf-bar-k { font-size: 14px; }  /* was 12px */
  .inf-row-k { font-size: 14px; }  /* was 12px */
  .inf-set .inf-dx .inf-k { font-size: 14px; }  /* was 12px */
  .inf-set .inf-chip { font-size: 15px; }  /* was 13px */
  .inf-set .inf-seg .inf-chip { font-size: 14px; }  /* was 12.5px */
  .inf-facenote { font-size: 14px; }  /* was 12px */
  .inf-acc-h { font-size: 12px; }  /* kicker, was 11px */
  .inf-set .inf-th { font-size: 15px; }  /* was 13px */
  .inf-set .inf-num { font-size: 13.3px; }  /* was 11px */
  .inf-caret { font-size: 13.3px; }  /* was 11px */
  .inf-set .inf-item { font-size: 15px; }  /* was 13px */
  .inf-tid { font-size: 14px; }  /* was 12px */
  .inf-pick-n { font-size: 14px; }  /* was 12px */
  .inf-set .inf-pick-b { font-size: 14px; }  /* was 12px */
  .inf-set .inf-insrow { font-size: 15px; }  /* was 13px */
  .inf-mark { font-size: 13.3px; }  /* was 11px */
  .llm-k { font-size: 15px; }  /* was 13px */
  .llm-pre { font-size: 14px; }  /* was 12px */
  .llm-said { font-size: 15px; }  /* was 13px */
  .llm-fixed-h { font-size: 15px; }  /* was 13px */
  .inf-cb-boxh { font-size: 13.3px; }  /* kicker, was 12px */
  .wr-answer { font-size: 13.3px; }  /* was 11px */
  .inf-runs { font-size: 14px; }  /* was 12px */
  .inf-run-id { font-size: 13.3px; }  /* was 11px */
  .inf-run-old { font-size: 13.3px; }  /* was 11px */
  .pc-cardex-meta { font-size: 14px; }  /* was 12px */
  .pc-cardex-note { font-size: 14px; }  /* was 12px */
  .pc-tab-w { font-size: 14px; }  /* was 12px */
  .pcn-bee { font-size: 14px; }  /* was 12px */
  .pcn-lg { font-size: 13.3px; }  /* was 11px */
  .pcn-h { font-size: 12px; }  /* kicker, was 11px */
  .pcn-bt { font-size: 15px; }  /* was 13px */
  .pcn-b { font-size: 14px; }  /* was 12px */
  .pcn-tpv { font-size: 14px; }  /* was 12px */
  .pcn-ftags { font-size: 14px; }  /* was 12px */
  .pcn-k, .pcn-empty { font-size: 14px; }  /* was 12px */
  .pcn-unread { font-size: 14px; }  /* was 12px */
  .pcn-said { font-size: 14px; }  /* was 12px */
  .pcd-lock { font-size: 13.3px; }  /* was 11px */
  .pcd-chip { font-size: 13.3px; }  /* was 11px */
  .pcd-li { font-size: 15px; }  /* was 13px */
  .pcd-was { font-size: 13.3px; }  /* was 11px */
  .pcd-mini { font-size: 14px; }  /* was 12px */
  .pcd-hint { font-size: 13.3px; }  /* was 11px */
  .bps-src { font-size: 12px; }  /* kicker, was 10px */
  .wb-stpick { font-size: 13.3px; }  /* was 11.5px */
  .wb-tb-title, .wb-modelpane > .wb-pane-h .wb-pane-t { font-size: 13.3px; }  /* kicker, was 12px */
  .wb-face { font-size: 16px; }  /* was 14px */
  .tcu .tcu-pend { font-size: 14px; }  /* was 12.5px */
  .wb-boardcol > .wb-toolbar .wb-tool, .wb-boardcol > .wb-toolbar .wb-size { font-size: 16px; }  /* was 14px */
  .wb-boardcol .wb-bps-h { font-size: 15px; }  /* was 13px */
  .mc-board .mc-tab { font-size: 14px; }  /* was 12px */
  .mc-timel { font-size: 13.3px; }  /* was 11px */
  .mn-explanation { font-size: 14px; }  /* was 12px */
  .mn-table { font-size: 14px; }  /* was 12px */
  .mn-table .mn-act { font-size: 14px; }  /* was 12px */
  .mn-totals .mn-sum { font-size: 14px; }  /* was 12px */
  .mn-notice, .mn-locked { font-size: 14px; }  /* was 12px */
  .fd-pa-guidance { font-size: 14px; }  /* was 12px */
  .fd-pa-feedrow .fd-pa-who { font-size: 14px; }  /* was 12px */
  .fd-pa-feedrow .fd-pa-state { font-size: 13.3px; }  /* was 11px */
  .fd-pa-feedrow .fd-pa-when, .fd-pa-feedrow .fd-pa-stale { font-size: 13.3px; }  /* was 11px */
  .fd-pa-summary { font-size: 14px; }  /* was 12px */
  .fd-pa-feedrow .fd-pa-acts .btn { font-size: 13.3px; }  /* was 11px */
  .fd-pa-filter-label { font-size: 13.3px; }  /* was 11px */
  .fd-pa-filter { font-size: 14px; }  /* was 12px */
  .fd-pa-feedrow .fd-pa-head .fd-pa-stale::before { font-size: 14px; }  /* was 12px */
  .fd-pa-log-entry { font-size: 14px; }  /* was 12px */
  .edx-heading { font-size: 16px; }  /* was 14px */
  .edx-note, .edx-code { font-size: 14px; }  /* was 12px */
  .edx-table { font-size: 14px; }  /* was 12px */
  .edx-button { font-size: 14px; }  /* was 12px */
  .edx-input { font-size: 15px; }  /* was 13px */
  .dk-bottom-rail .wb-sym-n { font-size: 13.3px; }  /* was 9px */
  .panel-help { font-size: 15px; }  /* was 13px */
  .dt-field-info { font-size: 14px; }  /* was 12px */
  .fd-pa-feedrow .fd-pa-open { font-size: 14px; }  /* was 12px */
  .dk-bottom-rail .dk-pin, .dk-bottom-rail .wb-sym, .wb-actions > .btn, .dk-enc-acts .wb-actions .btn, .dk-enc-acts .dk-act, .dk-enc-acts .dk-bottom-rail button { font-size: 14px; }  /* was 12px */
  .wb-procedure-cell, .wb-procedure-head>span { font-size: 14px; }  /* was 12px */
  .wb-procedure-source { font-size: 13.3px; }  /* was 11px */
  .ai-record-table { font-size: 14px; }  /* was 12px */
  .ai-records .ai-record-button { font-size: 14px; }  /* was 12px */
  .ai-record-status { font-size: 14px; }  /* was 12px */
  .dt-field-columns { font-size: 14px; }  /* was 12px */
  .dt-fields-table .dt-ro { font-size: 15px; }  /* was 13px */
  .dk-rail-foot > .dk-side-more { font-size: 17px; }  /* was 15px */
  .dk-side-rail > .dk-side-rail-tab.dk-rail-menu-b { font-size: 11px; }  /* kicker, was 9px */
  .dk-side-rail > .dk-side-rail-tab.dk-rail-menu-b > .dk-rail-word { font-size: 13.3px; }  /* was 9px */
  .dk-side-rail.is-labelled > .dk-side-rail-tab > .dk-rail-word { font-size: 15px; }  /* was 13px */
  .dk-side-rail.is-labelled > .dk-side-rail-tab > .dk-rail-desc { font-size: 13.3px; }  /* was 11px */
  .wb-symmenu-i { font-size: 15px; }  /* was 13px */
  .pc-right .btn, .pc-right .li-in, .pc-right select { font-size: 15px; }  /* was 13px */
  .or-soon-l { font-size: 15px; }  /* was 13px */
  .or-soon-s { font-size: 13.3px; }  /* was 11px */
  .drp .ec-tog, .drp .ec-save, .drp .ec-verify, .drp .ec-lookup { font-size: 15px; }  /* was 13px */
  .dkp-login-url { font-size: 14px; }  /* was 12px */
  .po-help { font-size: 18px; }  /* was 16px */
  .po-sub { font-size: 14px; }  /* was 12px */
  .po-helptext { font-size: 15px; }  /* was 13px */
  .po-tab { font-size: 15px; }  /* was 13px */
  .po-count { font-size: 15px; }  /* was 13px */
  .po-t { font-size: 16px; }  /* was 14px */
  .po-s { font-size: 13.3px; }  /* was 11px */
  .po-add { font-size: 16px; }  /* was 14px */
  .po-sel, .po-in { font-size: 16px; }  /* was 14px */
  .po-found { font-size: 14px; }  /* was 12px */
  .po-pill { font-size: 14px; }  /* was 12px */
  .po-save { font-size: 16px; }  /* was 14px */
  .po-said { font-size: 15px; }  /* was 13px */
  .po-line { font-size: 15px; }  /* was 13px */
  .pr-k { font-size: 12px; }  /* kicker, was 11px */
  .pr-badge { font-size: 11px; }  /* kicker, was 9px */
  .pr-l { font-size: 14px; }  /* was 12px */
  .pr-pill { font-size: 15px; }  /* was 13px */
  .pr-back { font-size: 16px; }  /* was 14px */
  .pr-r1 { font-size: 16px; }  /* was 14px */
  .pr-r2, .pr-r3 { font-size: 14px; }  /* was 12px */
  body.is-phone .spine > #checkin { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ph-status .ps-last { font-size: 13.3px; }  /* was 11.5px */
  body.is-phone .ph-status .ps-when { font-size: 13.3px; }  /* was 9px */
  body.is-phone .ph-status .ps-new { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ps-sheet .ps-t { font-size: 15px; }  /* was 13px */
  body.is-phone .ps-sheet .ps-w { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ps-sheet .ps-empty { font-size: 15px; }  /* was 13px */
  body.is-phone .ph-pair > button { font-size: 17px; }  /* was 15px */
  body.is-phone .ph-pair .ph-rec .ps-clock { font-size: 14px; }  /* was 12px */
  body.is-phone #patients.is-ptp .ptp-tab { font-size: 14px; }  /* was 12px */
  body.is-phone #patients.is-ptp .ptp-num { font-size: 16px; }  /* was 14px */
  body.is-phone #patients.is-ptp .ptp-st { font-size: 14px; }  /* was 12px */
  body.is-phone #patients.is-ptp .ptp-sa, body.is-phone #patients.is-ptp .ptp-seen { font-size: 14px; }  /* was 12px */
  body.is-phone #patients.is-ptp .ptp-mark { font-size: 13.3px; }  /* was 11px */
  body.is-phone .now-help { font-size: 15px; }  /* was 13px */
  body.is-phone .now-roster-k { font-size: 13.3px; }  /* was 10px */
  body.is-phone .now-roster-more, body.is-phone .now-roster-l .now-bad { font-size: 13.3px; }  /* was 11px */
  body.is-phone .now-glance-l .kicker { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ar-long { font-size: 13.3px; }  /* was 11px */
  body.is-phone .ar-chip { font-size: 13.3px; }  /* was 10px */
  body.is-phone .ar-walk-b { font-size: 14px; }  /* was 12px */
  body.is-phone .now-view-sw > .now-vs-on, body.is-phone .now-view-sw > button.fv-switch { font-size: 14px; }  /* was 12px */
  body.is-phone .now-clinic-line .rt .now-clinic-n { font-size: 13.3px; }  /* was 11px */
  body.is-phone .now-et .now-et-n { font-size: 15px; }  /* was 13px */
  body.is-phone .pf-k { font-size: 12px; }  /* kicker, was 10px */
  body.is-phone .pf-wait { font-size: 14px; }  /* was 12px */
  body.is-phone .pf-tile .pf-t { font-size: 15px; }  /* was 13px */
  body.is-phone .pf-tile .pf-s { font-size: 13.3px; }  /* was 10px */
  body.is-phone .pf-part .pf-pk { font-size: 13.3px; }  /* was 10px */
  body.is-phone .pf-part .pf-pr { font-size: 15px; }  /* was 13px */
  body.is-phone .pf-part .pf-pn { font-size: 13.3px; }  /* was 11px */
  body.is-phone .pf-edit { font-size: 15px; }  /* was 13px */
  body.is-phone .pf-said { font-size: 14px; }  /* was 12px */
  body.is-phone .pf-row .pf-n { font-size: 13.3px; }  /* was 11px */
  body.is-phone .pf-row .pf-l { font-size: 15px; }  /* was 13px */
  body.is-phone .pf-mv, body.is-phone .pf-x { font-size: 18px; }  /* was 16px */
  body.is-phone .pf-x.ask { font-size: 14px; }  /* was 12px */
  .tiny { font-size: 13.3px; }  /* dom.js tiny(): the floor */
}
/* ── end desktop type scale ────────────────────────────────────────── */

/* ── THE PHONE AS A CHAT (Dr Lau, 9 September; LE-48) ────────────────────
   Two regions that ARE the viewport on a phone, like the desktop's two
   pages: the chat scrolls inside itself, the composer stays at the foot, the
   page never scrolls. chat.js's own classes (ch-) and chatenc.js's (ce-)
   follow; these are the front screen's own (cho-). */
.chathome, .chatenc { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.chathome[hidden], .chatenc[hidden] { display: none; }
.cho-eg { font-size: 12px; color: var(--teal); }
.cho-line { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0;
  font: inherit; color: var(--ink); cursor: pointer; }
.cho-back { display: flex; }
.cho-btn { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 0;
  padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sunk);
  font-family: var(--display); font-size: 14px; color: var(--ink); cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent; }
.cho-btn:disabled { opacity: 0.45; cursor: default; }
.cho-go { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
.cho-quiet { opacity: 0.6; min-height: 38px; }
.cho-away { opacity: 0.55; }
.cho-who { font-size: 12px; color: var(--ink-2); }
.cho-readback, .cho-done, .cho-next { display: flex; flex-direction: column; gap: 8px; }
.cho-row { display: flex; gap: 8px; }
.cho-k { display: block; }
.cho-heard { font-family: var(--serif); font-size: 13.5px; color: var(--ink-2); }
.cho-kv { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 10px; align-items: baseline; }
.cho-kk { font-size: 12px; color: var(--dim); }
.cho-kv-v { font-size: 15px; color: #fff; }
.cho-miss { color: var(--amber-ink); font-size: 12px; font-style: italic; }
.cho-key { font-size: 12px; color: var(--teal); }
.cho-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cho-chip { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: var(--sunk); border: 1px solid var(--line); font-family: var(--display); font-size: 13px; color: var(--ink); cursor: pointer; }
.cho-chip.on { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
.cho-done-h { display: flex; align-items: center; gap: 8px; }
.cho-tick { color: var(--teal); }
.cho-tag { font-size: 8.5px; letter-spacing: 0.14em; color: var(--faint); }
.cho-detail { font-size: 12.5px; color: var(--dim); }

/* ===================== THE FRONT DESK'S DESKTOP (LE-50) =====================
   Five parcels' fragments, folded under one hand, ABOVE THE CHAT SECTIONS.
   That placement is load-bearing and it is not a style choice:
   verify_console_chatenc reads chatenc's fragment as its marker TO EOF, so
   anything appended after the last chat marker is swallowed into that slice
   and judged by its purity rules. This block declares two variables of its
   own and touches the side rail's `dk-` classes, both of which that slice
   forbids -- so appended at the end it turned the chat harness red. The
   estate already records this exact fault from 10 September, and the
   fb_spine block thirty lines above carries the same note. Specificity is
   unaffected: nothing here and nothing there share a selector. Every colour here is a :root token -- three parcel
   harnesses and verify_frontdesk section 10 all refuse an invented one.
   ========================================================================= */

/* ==== fd_frame BEGIN (LE-50) ==== */
/* ==== fd_frame BEGIN — the front desk's desktop frame (LE-50 Parcel A) ====
 * Folded whole into app.css by the integrator, between its own BEGIN and
 * END markers (rule 2 of LE-50 section 3: fragments, never edits).
 *
 * EVERY VALUE HERE IS A TOKEN app.css ALREADY DEFINES -- none invented, so
 * the day/dark toggle (`[data-theme="day"]`, app.css:2216) moves this frame
 * with the rest of the app for free. One custom property is this
 * fragment's OWN, `--fd-rail-w`, the width of the strip of tabs down each
 * edge -- under its own name so this frame never reads the doctor's.
 *
 * TWO RAILS, NOT FOUR CORNERS (Dr Lau, 2 October: "Vertical bar x 2 on both
 * sides"). The corners' collapse-to-rail borrowed desktop-side-rail.js and
 * its `.dk-*` classes; a rail of tabs IS the collapsed state now, so neither
 * appears on this page any more and nothing here depends on the doctor's
 * frame at all.
 */

/* THE HOST, and its absence is the whole of "the panels should stretch near
 * the full height of the screen". `.fd-desk` below asks for `height: 100%`,
 * and 100% of an AUTO-HEIGHT parent is auto -- so every corner shrank to its
 * own content and a busy waiting room scrolled inside a 200px box with the
 * screen half empty beneath it. `#fd-board` carried no rule at all.
 *
 * This is the one line fdframe.js's own header says it cannot write for
 * itself -- "giving `host` a definite height inside a full-height flex
 * column ... is the integrator's" -- and it was never written. `body` is
 * already `display: flex; flex-direction: column` at full height
 * (app.css:50-61), so the host only has to claim the rest of it.
 * `min-height: 0` is what lets it SHRINK below its content, which is what
 * makes the corners' own `overflow: auto` bite instead of the page growing. */
.fd-deskhost {
  flex: 1 1 auto; min-height: 0; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.fd-deskhost[hidden] { display: none; }

.fd-desk {
  --fd-rail-w: 52px;
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0; height: 100%; overflow: hidden;
  font-family: var(--display); color: var(--ink);
}

/* ── the header: S-EMR, the user, the clinic, the e-mail, the clock ──────── */
.fd-hdr {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hush);
}
.fd-brand {
  font-family: var(--mono); font-weight: 700; font-size: 18px;
  letter-spacing: .04em; color: var(--teal);
}
.fd-hdr-seg { font-size: 12.5px; color: var(--ink-2); }
.fd-hdr-loc { color: var(--ink); }
/* THE DESK'S CHECK-IN PILL (2 October): the doctor's CHECKED IN pill, on
   the desk's header. A button, so it is reachable by keyboard; drawn as a
   pill, so it reads as the place it is and not as a call to action. */
button.fd-hdr-loc {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: 12.5px; letter-spacing: .04em;
  padding: 4px 10px; min-height: 32px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sunk); color: var(--ink);
}
button.fd-hdr-loc:hover, button.fd-hdr-loc:focus-visible { border-color: var(--teal); }
.fd-hdr-pk { color: var(--dim); }
.fd-hdr-clock { margin-left: auto; font-size: 12px; color: var(--dim); white-space: nowrap; }
/* Refresh and Sign out, handed in by the page. `--tap` is this stylesheet's
   own minimum target: a counter is used standing up, often with one hand. */
.fd-hdr-act {
  font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--hush); background: transparent; color: var(--ink-2);
  cursor: pointer; min-height: var(--tap);
}
.fd-hdr-act:hover { border-color: var(--teal-2); color: var(--ink); }
.fd-hdr-act:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* A present-dimmed-named fact: never invented, never silently dropped.
 * `--amber` is this stylesheet's own warning/notice tone (used the same
 * way by `home.js`'s "IN TELEGRAM" tag, app.css:1070), reused for the same
 * meaning rather than a colour of this fragment's own invention. */
.fd-away { opacity: .62; }
.fd-tag {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); margin-left: 6px;
}

/* ── the body: left strip, left panel, the centre, right panel, right strip
 *    (Dr Lau, 2 October: "a slim strip of labelled tabs down each edge.
 *    Tapping a tab slides its panel open beside the strip ... The calendar
 *    in the middle gets the space back when panels are closed.") A flex
 *    row, so a closed panel (`[hidden]`) simply takes no width and the
 *    centre's `flex: 1 1 0` has all of it. */
.fd-body {
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden;
  display: flex; flex-direction: row; align-items: stretch; gap: 10px;
  padding: 10px 12px;
  position: relative;
}
.fd-centre {
  flex: 1 1 0;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0; min-width: 0; overflow: hidden;
}
/* WHAT THE CENTRE HOLDS, and neither class had a rule until now -- because
 * until now nothing ever painted into the centre at all (see fdframe.js's
 * own note). The acts row keeps its height; the schedule takes the rest and
 * scrolls inside itself, so a twelve-hour week never pushes the footer off
 * the bottom of the screen. */
.fd-centre-acts {
  flex: 0 0 auto; min-height: 0;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel); padding: 10px 12px;
}
.fd-centre-grid {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel); padding: 10px 12px;
}

/* ── a rail: the strip of tabs down one edge ─────────────────────────────
 * Read sideways, the way a book's spine is: the left strip from the bottom
 * up, the right one from the top down, so each reads toward the board.
 * Every tab is at least --tap both ways -- a counter is used standing up. */
/* Front desk, slice 1: the waiting room's tools, ⇄ swap, 💳 on a row. */
.fd-room-tools { position: relative; display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.fd-tool { min-width: 32px; min-height: 32px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.fd-tool:hover { border-color: var(--teal-2); }
.fd-tool-menu { position: absolute; top: 36px; right: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: 4px; }
.fd-tool-opt { text-align: left; padding: 6px 10px; background: transparent; border: 0; color: var(--ink); cursor: pointer; }
.fd-tool-opt.is-on { color: var(--teal); }
.fd-tool-opt.is-on::before { content: '\2713  '; }
.fd-tool-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 2px; }
.fd-tool-opt:disabled { color: var(--dim); cursor: default; }
.fd-bill-tile { margin-left: 6px; align-self: center; }
.fd-setup { min-width: 240px; }
.fd-setup-h { font-weight: 600; padding: 4px 6px; }
.fd-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fd-body.fd-swapped > [class~="fd-centre"] { order: 1; }
.fd-body.fd-swapped > [class~="fd-side-left"] { order: 2; }
.fd-body.fd-swapped > [class~="fd-rail-left"] { order: 3; }
.fd-body.fd-swapped > [class~="fd-side-right"], .fd-body.fd-swapped > [class~="fd-rail-right"] { order: 4; }

.fd-rail {
  flex: 0 0 var(--fd-rail-w);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  /* 4px all round so a tab's count bubble, which stands 3px proud of the
     tab's corner, is inside the strip's padding box and so is not clipped
     by the strip's own scroll. A tab stays 44px wide, --tap. */
  padding: 4px;
}
/* A TAB NEVER SHRINKS (5 November): it did, to share out a strip too short
 * for thirteen of them, and its sideways word -- which cannot wrap -- ran
 * into the next tab's. Too many for the screen is fdframe.ts's fitStrips:
 * a second column, below. 10px above and below the word, not 14: measured,
 * that is what lets eight tabs stand in one column on a 1080p screen's
 * browser (about 880px of page), and the tab is still far past --tap. */
.fd-rail-tab {
  flex: 0 0 auto;
  font: inherit; font-family: var(--mono); font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  writing-mode: vertical-rl;
  min-width: var(--tap); min-height: var(--tap); padding: 10px 8px;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel); color: var(--ink-2); cursor: pointer;
}
.fd-rail-left .fd-rail-tab { transform: rotate(180deg); }
/* THE RAIL'S FOOT (14 Nov): Teleconsult on the left, Setting on the right,
   fixed at the bottom of the strip whatever the rail holds above. */
.fd-rail-foot { margin-top: auto; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--hush); }
.fd-rail-foot .fd-ftr-cell { position: static; }
.fd-rail-foot .fd-setting-sheet { position: fixed; top: auto; margin: 0; }
.fd-rail-foot .fd-setting-btn { width: 100%; min-height: 44px; padding: 0; justify-content: center; }
.fd-rail-set .fd-set-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fd-rail-tab:hover { border-color: var(--teal-2); color: var(--ink); }
.fd-rail-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* OPEN IS SAID TWICE: the colour, and the tab joined to its panel by the
   sunk ground they share -- never colour alone. */
.fd-rail-tab.is-open {
  border-color: var(--teal); color: var(--teal); background: var(--sunk);
}
/* TWO COLUMNS, only while one does not fit (fdframe.ts sets the class and
 * the row count): down the first column, then the second, the way the one
 * column read. Twice the strip's width plus the gap between the tabs. */
.fd-rail.fd-rail-two {
  flex-basis: calc(var(--fd-rail-w) * 2 + 6px);  /* the padding above is inside it */
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 6px; align-content: start;
}
.fd-rail-label { white-space: nowrap; }
.fd-rail-badge {
  font-size: 11px; letter-spacing: 0; color: var(--amber);
  writing-mode: horizontal-tb;
}
/* HOW MANY WAIT FOR THE DESK (Dr Lau, 5 November: "a little bubble with the
 * number ... use red"), over the tab's top corner on the side that faces the
 * board -- the mock-up he chose, variant B. White on --red-solid, measured
 * 6.3:1. None at nought, "99+" past ninety-nine (fdframe.ts's countText). A
 * count that could not be read is "?" on the tab's own ground, not red: an
 * unanswered question is not an alarm, and the word differs as well as the
 * colour. The left strip's tabs are turned half round, so its bubble sits in
 * the corner that turning brings to the top, and is turned back to read. */
.fd-rail-tab { position: relative; }
.fd-count {
  position: absolute; top: -3px; right: -3px;
  writing-mode: horizontal-tb;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--red-solid); color: #fff;
  font-family: var(--mono); font-size: .85em; font-weight: 700; line-height: 18px;
  letter-spacing: 0; text-align: center; text-transform: none;
  box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
  /* .85 of the tab's own size, not a px size, so the generated desktop type
     scale is untouched and the bubble grows with the tab it sits on. */
}
.fd-count[hidden] { display: none; }
.fd-count.is-unknown {
  background: var(--panel); color: var(--ink-2); border: 1px solid var(--rule); line-height: 16px;
}
.fd-rail-left .fd-rail-tab .fd-count {
  top: auto; right: auto; bottom: -3px; left: -3px; transform: rotate(180deg);
}
/* "99+" is wider than the corner, so its tab moves its word clear of it --
   on the right strip below the bubble, on the turned left strip the padding
   that turning brings to the top. */
.fd-rail-right .fd-rail-tab.has-wide-count { padding-top: 24px; }
.fd-rail-left .fd-rail-tab.has-wide-count { padding-bottom: 24px; }
/* The same bubble on a card's heading (the stacked page's waiting room, the
   CareBee registrations), after its words rather than over a corner. A rem
   size, not px, so the generated desktop type scale is untouched and a big
   heading does not draw a big bubble. */
.fd-count.fd-count-head {
  position: static; display: inline-block; vertical-align: middle;
  margin-left: 8px; font-size: .7rem; box-shadow: none;
}
.fd-count.fd-count-head[hidden] { display: none; }

/* ── a side panel: the open tab's own screen, as wide as the desk dragged
 *    it (the width is set on the element; these are its bounds) ────────── */
.fd-side {
  position: relative;
  flex: 0 0 auto; min-width: 280px; max-width: 60%;
  display: flex; flex-direction: column; min-height: 0; overflow: visible;
  padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel);
}
.fd-side-h {
  display: flex; align-items: center; gap: 8px; padding-bottom: 6px;
  margin-bottom: 6px; border-bottom: 1px solid var(--hush);
}
.fd-side-t {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal);
}
.fd-side-body {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.fd-away-block { font-size: 11.5px; color: var(--dim); opacity: .74; line-height: 1.5; }
.fd-side-empty { opacity: .84; }

/* THE GRIP, on the panel's inner edge and centred on the gap between the
 * panel and the board, so it never covers a panel's own scrollbar. Wide
 * enough to find with a finger; drawn as a line only when it is found. */
.fd-side-grip {
  position: absolute; top: 0; bottom: 0; width: 14px;
  cursor: col-resize; touch-action: none; z-index: 2;
}
.fd-side-left .fd-side-grip { right: -12px; }
.fd-side-right .fd-side-grip { left: -12px; }
.fd-side-grip::after {
  content: ""; position: absolute; top: 12px; bottom: 12px; left: 6px;
  width: 2px; border-radius: 2px; background: transparent;
}
.fd-side-grip:hover::after,
.fd-side-grip.is-dragging::after,
.fd-side-grip:focus-visible::after { background: var(--teal); }
.fd-side-grip:focus-visible { outline: none; }

/* ── what the Enquiries panel holds: three parts, each its own screen ── */
.fd-side-note {
  margin: 0 0 8px; font-size: 11.5px; color: var(--dim); font-style: italic;
}
.fd-side-sec { padding: 8px 0 10px; border-top: 1px solid var(--hush); }
.fd-side-sec:first-of-type { border-top: 0; padding-top: 0; }
.fd-side-sec-h {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 6px;
}
.fd-side-owed { margin-top: 10px; }

/* ── the footer: provider / vendor / hospital contacts, Setting ─────────── */
.fd-ftr {
  flex: 0 0 auto; padding: 8px 14px; border-top: 1px solid var(--hush);
}
.fd-ftr-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.fd-ftr-cell { position: relative; display: flex; flex-direction: column; gap: 2px; }
.fd-ftr-item {
  font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap;
}
.fd-ftr-item:hover { border-color: var(--teal-2); color: var(--teal-2); }
.fd-ftr-item:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* 44px of hit area for the footer's Setting (12 Nov test: 59x30) -- the
   desktop's transparent ::before, drawn no bigger; the footer has the room. */
.fd-setting-btn { position: relative; }
.fd-setting-btn::before { content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 44px; }
.fd-away.fd-ftr-item { color: var(--dim); }
.fd-away.fd-ftr-item:hover { border-color: var(--teal-2); }
.fd-ftr-detail {
  font-size: 11px; color: var(--dim); line-height: 1.4; max-width: 260px;
  margin-top: 2px;
}

/* the Setting sheet: user's info, system's info -- never `/api/settings`,
 * which a scheduler may not reach (roles.py:57). Opens upward from the
 * footer, because the footer sits at the foot of the page, and RIGHTWARD
 * from the button: Setting is the footer's first item, at the left edge,
 * so a sheet anchored on its right ran off the screen (Dr Lau, 11 Nov). */
.fd-setting-sheet {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
  width: min(320px, 90vw); padding: 12px 14px; border-radius: var(--r-l);
  border: 1px solid var(--rule); background: var(--panel); box-shadow: var(--z2);
  z-index: 5;
}
.fd-set-h {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); margin: 10px 0 6px;
}
.fd-set-h:first-child { margin-top: 0; }
.fd-set-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 4px 0;
  font-size: 12px;
}
.fd-set-k { color: var(--dim); }
.fd-set-v { color: var(--ink); text-align: right; }
.fd-set-v.fd-away { color: var(--dimmer); font-style: italic; opacity: .9; }

/* ── phone width: this frame is desktop-only. The integrator's page picks
 *    it by width the way app.js picks the doctor's (DESK_MIN, 1100px); this
 *    rule is a second line of defence, not the switch itself. */
@media (max-width: 1099px) {
  .fd-desk { display: none; }
}
/* ==== fd_frame END — the front desk's desktop frame (LE-50 Parcel A) ==== */
/* ==== fd_frame END ==== */

/* ==== fd_sched BEGIN (LE-50) ==== */
/* ── fd_sched.css — the front desk's central schedule (LE-50, Parcel B) ────
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the eight
   files the integrator alone touches; this text is folded into it (or into
   the desk's own inline stylesheet in app/frontdesk/index.html — the
   integrator's call, per the letter) under a marker.

   THIS IS A NEW BLOCK, NOTHING IS APPENDED INTO ANOTHER FRAGMENT'S SLICE.
   Every class below is new (`fd-sc-` prefix, chosen so it cannot collide
   with app/frontdesk.js's existing `fd-*` classes, week.js's `wk-*`, or
   day.js's `dy-*`), so there is no existing rule block to extend and
   nothing here restyles a class another screen already owns. LE-48's own
   lesson is why this matters: a marker-to-EOF fragment reader swallows
   whatever is appended after the last marker into the PREVIOUS parcel's
   slice — so this is written to be folded as its OWN marker-bounded block,
   not tacked onto end-of-file where some other fragment's reader ends.

   EVERY TOKEN BELOW IS ONE app/app.css:6-45 DEFINES — none is invented,
   and none is a literal hex or rgba of this file's own choosing. The colour
   mapping follows two screens that already ship rather than picking afresh:
   app/day.js's own .dy-away is var(--amber) and its .dy-call is
   var(--teal-2), so a day's leave and on-call marks use those same two
   tokens here. app/week.js draws surgery apart from an ordinary
   appointment in its own hand-picked (non-token) colour; the DISTINCTION
   is kept, in var(--amber) rather than an invented rgba. var(--map-numb),
   the palette's one blue, stands in for a public holiday, which has no
   token of its own — the same trade this project already makes rather
   than adding a tenth colour for one use. var(--red) is the alert token,
   for a default and for the on-call/leave clash. Muted tones
   (var(--dimmer)/var(--faint)) mark an absence: a cancelled slot, and the
   two rows this door cannot fill (tasks to be done, front-desk leave).

   THE GRID USES minmax(0, 1fr) COLUMNS, NOT A BARE 1fr — the desktop
   mock-up history in this project (10 September) found `1fr` columns
   cannot shrink below a nowrap name and scroll the page sideways in a
   narrower carousel; `min-width: 0` on the cells is the fix that was
   found there, copied here rather than rediscovered. */

.fd-sc-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.fd-sc-bar .is-on { color: var(--teal); border-color: var(--line); }
.fd-sc-sum { font-size: 11.5px; color: var(--dim); margin: 4px 0 2px; }
.fd-sc-why { font-size: 11px; color: var(--dimmer); margin-bottom: 4px; }
.fd-sc-none { font-size: 12px; color: var(--dim); padding: 8px 0; }

/* THE TWO ROWS THIS DOOR CANNOT FILL, drawn once and named rather than
   invented or silently dropped — see app/fdsched.js's own doc comment for
   what was measured. Muted, not alarmed: this is an honest gap, not a
   fault the clinic needs to act on today. */
.fd-sc-gaps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.fd-sc-gap { font-size: 11px; color: var(--faint); font-style: italic; }

/* ── the half-hour grid (day / week scope, spelled out) ─────────────────── */
.fd-sc-grid { display: grid; gap: 1px; background: var(--hush);
              border-radius: var(--r); overflow: hidden; }
.fd-sc-corner, .fd-sc-dh, .fd-sc-rh, .fd-sc-cell, .fd-sc-band { background: var(--panel); }
.fd-sc-dh { padding: 6px 4px; text-align: center; min-width: 0; }
.fd-sc-dh.is-today { background: rgba(79, 214, 200, 0.1); }
.fd-sc-dh-d { display: block; font-size: 11px; color: var(--dim); }
.fd-sc-dh-n { display: block; font-size: 13px; font-weight: 600; }
.fd-sc-rh { padding: 4px 6px; font-size: 10.5px; color: var(--dimmer);
            display: flex; align-items: center; }
.fd-sc-rh.fd-sc-edge { color: var(--amber-ink); }
.fd-sc-cell { min-height: 26px; padding: 2px; display: flex; flex-direction: column;
              gap: 2px; min-width: 0; }
.fd-sc-cell.is-ph { background: rgba(90, 162, 255, 0.07); }
.fd-sc-cell.is-leave { background: rgba(224, 164, 74, 0.07); }

.fd-sc-band { min-height: 20px; padding: 3px; display: flex; flex-wrap: wrap;
              gap: 3px; align-items: flex-start; min-width: 0; }
.fd-sc-chip { font-size: 10px; padding: 1px 5px; border-radius: 999px; line-height: 1.5; }

.fd-sc-e { min-height: 26px; font-size: 11px; padding: 2px 4px; border-radius: 4px;
           border-left: 3px solid transparent; display: flex; align-items: center;
           gap: 3px; flex-wrap: wrap; min-width: 0; }
.fd-sc-e-i { flex: 0 0 auto; }
.fd-sc-e-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-sc-e-w { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-sc-e-clip { color: var(--dimmer); font-size: 10px; }
/* The desk folder's 🛎 on a calendar row (4 October) -- the board's own
   .dfc-bell, shrunk to the row's height and pushed to its right edge so the
   name keeps the room. */
.fd-sc-e .dfc-bell { min-width: 24px; min-height: 22px; padding: 0 3px; margin-left: auto;
                     font-size: 12px; line-height: 1; flex: 0 0 auto; }

/* colour is never the only cue: every one of these also carries a word or
   a strike, from app/fdsched.js's own markup. */
.fd-sc-appt { background: rgba(79, 214, 200, 0.12); border-left-color: var(--teal); }
.fd-sc-surg { background: rgba(224, 164, 74, 0.14); border-left-color: var(--amber); }
.fd-sc-miss { background: rgba(224, 90, 74, 0.12); border-left-color: var(--red); color: var(--red-ink); }
.fd-sc-miss .fd-sc-e-n { text-decoration: line-through; }
.fd-sc-cancel { background: rgba(150, 150, 150, 0.1); border-left-color: var(--rule); }
.fd-sc-cancel .fd-sc-e-n { text-decoration: line-through; color: var(--dim); }
.fd-sc-leave { color: var(--amber); }
/* THE DESK'S LEAVE IS NOT THE DOCTOR'S, AND THE COLOUR SAYS SO. Amber
   above means the clinic is SHUT that day (a doctor's leave closes it,
   all the way out to the public appointment bot). The desk being
   short-handed is a fact and not a warning -- the clinic is open and
   patients are still booked -- so it takes the neutral family rather
   than a second alarm colour. It was var(--faint) while the row was
   untracked, which is this stylesheet's mark for an absence; it carries
   data now, so it reads as present. The chip names the person, so the
   colour is never the only cue. */
.fd-sc-staffleave { color: var(--dim); }
.fd-sc-ph { color: var(--map-numb); }
.fd-sc-call { color: var(--teal-2); }
.fd-sc-clash { color: var(--red-ink); font-weight: 600; }
/* the band's own chips get a tinted pill; the same modifier classes are
   reused bare (no .fd-sc-chip) as small marks in the counts view below,
   which is why each is colour-only rather than owning its own background. */
.fd-sc-chip.fd-sc-leave { background: rgba(224, 164, 74, 0.16); }
.fd-sc-chip.fd-sc-staffleave { background: rgba(150, 150, 150, 0.14); }
.fd-sc-chip.fd-sc-ph { background: rgba(90, 162, 255, 0.16); }
.fd-sc-chip.fd-sc-call { background: rgba(127, 196, 189, 0.16); }
.fd-sc-chip.fd-sc-clash { background: rgba(224, 90, 74, 0.18); }

/* WHAT HAS TO BE DONE THAT DAY. Its own tone, distinct from the doctor's
   leave and from on-call, because the band now carries five different kinds
   of fact and a receptionist reads it at a glance; an overdue job is marked
   by WEIGHT as well as colour, since a tint alone is the one cue a
   colour-blind reader cannot take. */
.fd-sc-task { color: var(--ink); }
.fd-sc-chip.fd-sc-task { background: rgba(127, 196, 189, 0.10);
                         border: 1px solid var(--hush); }
.fd-sc-chip.fd-sc-task-late { border-color: var(--red-ink); font-weight: 650; }

.fd-sc-more { font-size: 10.5px; color: var(--amber-ink); }

/* ── the legend ───────────────────────────────────────────────────────── */
.fd-sc-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.fd-sc-lg { display: inline-flex; gap: 5px; align-items: center; }
.fd-sc-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block;
            background: var(--panel-2); border: 1px solid var(--rule); }
.fd-sc-sw.fd-sc-appt { background: var(--teal); border-color: var(--teal); }
.fd-sc-sw.fd-sc-surg { background: var(--amber); border-color: var(--amber); }
.fd-sc-sw.fd-sc-miss { background: var(--red); border-color: var(--red); }
.fd-sc-sw.fd-sc-cancel { border: 1px solid var(--dimmer); }
.fd-sc-sw.fd-sc-leave { background: var(--amber); border-color: var(--amber); }
.fd-sc-sw.fd-sc-staffleave { background: var(--dimmer); border-color: var(--dim); }
.fd-sc-sw.fd-sc-ph { background: var(--map-numb); border-color: var(--map-numb); }
.fd-sc-sw.fd-sc-call { background: var(--teal-2); border-color: var(--teal-2); }
.fd-sc-sw.fd-sc-clash { background: var(--red-ink); border-color: var(--red-ink); }
.fd-sc-lg-t { font-size: 10.5px; color: var(--dim); }

/* ── the desk's own leave roster (his ruling, 17 Sept) ─────────────── */
/* Every colour here is a token this file already defines. The rows are
   NEUTRAL, like the .fd-sc-staffleave chips they correspond to and unlike
   the doctor's amber: his leave shuts the clinic, this does not. */
.fd-dl { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fd-dl-h { font-size: 11px; font-weight: 600; color: var(--dim);
           text-transform: uppercase; letter-spacing: 0.04em; }
.fd-dl-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.fd-dl-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.fd-dl-who { font-weight: 600; color: var(--ink); }
.fd-dl-when { color: var(--dim); flex: 1 1 auto; min-width: 0; }
.fd-dl-x { flex: 0 0 auto; padding: 2px 8px; font-size: 11px; }
.fd-dl-none { font-size: 12px; color: var(--faint); }
/* A line the roster could not read is shown in the alert token -- it is the
   one thing on this panel that needs doing something about. */
.fd-dl-bad { font-size: 11.5px; color: var(--red-ink); }
.fd-dl-note { font-size: 11.5px; color: var(--dim); margin-top: 6px; min-height: 1em; }
.fd-dl-note.is-bad { color: var(--red-ink); }
.fd-dl-add { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
/* THE FORM (26 Nov 2026, his "consistent drop down - use slim button"):
   one control shape for every field -- the date boxes, Who, Reason and Day
   alike, 28px and rounded like the boards' slim set -- and its notes behind
   the ? in the panel's upper right corner. A finger keeps its target. */
.fd-dl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; }
.fd-dl-help { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .fd-dl-help .panel-help-button { width: 24px; height: 24px; font-size: 12px; }
  .fd-dl-x { min-height: 0; height: 24px; width: 24px; padding: 0; border-radius: 12px; } }
.fd-dl-r { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
.fd-dl-r > .fd-dl-go { margin-top: 15px; }
.fd-dl-f { display: flex; flex-direction: column; gap: 2px; flex: 1 1 120px; min-width: 0; }
.fd-dl-l { font-size: 11px; color: var(--dim); }
.fd-dl-pair { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fd-dl-ctl { box-sizing: border-box; width: 100%; height: 28px; min-height: 28px; margin: 0;
             padding: 0 10px; border: 1px solid var(--line); border-radius: 14px;
             background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.82rem; }
.fd-dl-ctl:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.fd-dl-sel { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px;
             background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%),
                               linear-gradient(135deg, var(--dim) 50%, transparent 50%);
             background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
             background-size: 5px 5px; background-repeat: no-repeat; }
.fd-dl-sel option { background: var(--panel); color: var(--ink); }
.fd-dl-go { flex: 0 0 auto; height: 28px; min-height: 28px; padding: 0 16px; border-radius: 14px; font-size: 0.82rem; }
.fd-dl-whonote { font-size: 11.5px; color: var(--dim); }
.fd-dl-ro { margin-top: 8px; font-size: 11.5px; color: var(--dim); }
/* THE FRONT DESK'S 🌴 (26 Nov): the editor over the board, under the button. */
.fd-leavefly { position: fixed; z-index: 60; width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 80px); overflow: auto;
               box-sizing: border-box; padding: 4px 14px 14px; border: 1px solid var(--line); border-radius: 14px;
               background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.fd-leavefly .fd-dl { margin-top: 0; border-top: 0; }
.fd-dl-whonote:empty { display: none; }
@media (hover: none) { .fd-dl-ctl, .fd-dl-go { min-height: var(--tap); height: auto; } }
/* HOW FAR OFF A PERIOD STARTS, when the door says it is far off.
   NEUTRAL, not amber and not red. A fortnight booked a year out is a
   wedding, and a screen that cries error at one teaches whoever reads it
   to stop looking -- so it is the same grey the .wk-deskleave chip wears,
   with a stronger ink than the row around it. It states a fact and lets a
   wrong year be the thing that looks odd. Both halves are tokens, so the
   day/dark toggle carries it. */
.fd-dl-far { flex: 0 0 auto; font-size: 11px; color: var(--ink-2);
             background: rgba(140,140,140,.16); border-radius: 999px;
             padding: 1px 7px; white-space: nowrap; }
.fd-dl-row.is-far .fd-dl-when { color: var(--ink-2); }
/* THE DESK BOOKS, MOVES AND CANCELS (E14) -- the leave editor's shape, below
   it. `fd-bk-` was free (grepped). */
.fd-bk { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fd-bk-h { font-size: 11px; font-weight: 600; color: var(--dim);
           text-transform: uppercase; letter-spacing: 0.04em; }
.fd-bk-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fd-bk-in { flex: 1 1 120px; min-width: 0; padding: 6px 8px; font-size: 12px;
            border: 1px solid var(--line); border-radius: 6px;
            background: var(--panel-2); color: var(--ink); }
.fd-bk-acts { display: flex; gap: 6px; margin-top: 8px; }
.fd-bk-note { font-size: 11.5px; color: var(--dim); margin-top: 6px; min-height: 1em; }
.fd-bk-note.is-bad { color: var(--red-ink); }
.fd-bk-note.is-ok { color: var(--ink); }

/* ── the counts view (month / year scope, or spelledOut === false) ──────── */
.fd-sc-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
                gap: 6px; }
.fd-sc-count-cell { border: 1px solid var(--line-soft); border-radius: var(--r);
                     background: var(--panel-2); padding: 6px 8px; min-width: 0; }
.fd-sc-count-cell.is-today { border-color: var(--teal); }
.fd-sc-count-d { display: block; font-size: 11px; color: var(--dim); }
.fd-sc-count-n { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.fd-sc-count-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.fd-sc-count-marks span { font-size: 9.5px; }

@media (max-width: 899px) { .fd-sc-e-w { display: none; } }
/* ==== fd_sched END ==== */

/* ==== fd_acts BEGIN (LE-50) ==== */
/* ── fd_acts.css — the three acts on top: Registration, Check-in, Check-out
   (LE-50, Parcel C) ───────────────────────────────────────────────────────
   A FRAGMENT, NOT A SECOND STYLESHEET. This is CSS text for the integrator
   to fold in, never a file this app links to on its own. It styles
   `app/fdacts.js`'s own markup and nothing else's.

   WHERE THIS BELONGS: the desk's own shell, alongside the `.fd-*` rules
   already in `app/frontdesk/index.html`'s <style> block (or wherever the
   desktop view's stylesheet ends up living) — not `app/app.css`, because
   none of this is a fact about the clinical console. `app/frontdesk/index.html`
   already says why that page carries its own layout block rather than
   reading app.css's component classes: "app.css carries the colours, the
   dark/day switch and the type scale" and the page draws its own shapes
   from them. This fragment follows the same rule.

   A NEW PREFIX ON PURPOSE. `.fd-*` is `app/frontdesk.js`'s own, for the
   narrow (phone/counter-strip) page. `.fda-*` ("front desk, acts") is
   this parcel's alone, so folding this fragment in is a pure append —
   nothing here can be shadowed by, or shadow, an existing `.fd-*` rule,
   and the two pages can carry both class families at once without either
   reading the other's styling. Parcel A's and Parcel B's own fragments
   are expected to pick their own prefixes for the same reason.

   TOKENS ONLY, NOTHING INVENTED. Every colour, radius and the minimum tap
   target below is one of app.css's own `var(--…)` custom properties, so
   this bar and its panels move with the dark/day toggle for free instead
   of being the one corner it does not reach. `--tap` (44px, "nothing
   tappable is smaller") sets the floor on every button here — this is a
   counter, worked on a touchscreen at a stand-up desk as often as a
   keyboard.

   THE SHAPE: `.fda-bar` is the three buttons; `.fda-body` holds at most
   one open `.fda-panel` at a time (registration, the imported check-in
   screen, or this parcel's own check-out picker), and is `hidden` when
   none is open, matching how every other collapsible surface in this app
   is toggled. `.fda-co-*` is the check-out picker's own — the one screen
   this parcel actually draws from scratch, because none exists anywhere
   else to import (see app/fdacts.js's own header comment). Nothing below
   sets a fixed height on the page itself; `.fda-co-list` scrolls inside
   its own box past a sensible cap, the same "a corner scrolls inside
   itself" rule Parcel A's frame follows, so this panel never depends on
   how much room the centre column happens to have. */

.fda-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 0; }

.fda-bar { display: flex; gap: 8px; flex-wrap: wrap; }

.fda-btn {
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  padding: 0 16px; min-height: var(--tap); border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.fda-btn:hover { border-color: var(--teal-2); }
.fda-btn:disabled { opacity: .55; cursor: default; }
.fda-btn.is-active { border-color: var(--teal); color: var(--ink); background: var(--hush); }
.fda-btn-primary { border-color: var(--teal); }
.fda-link {
  font: inherit; font-size: 12px; background: none; border: 0; padding: 4px 2px;
  color: var(--dim); cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px; min-height: var(--tap); min-width: var(--tap);
}
.fda-link:hover { color: var(--ink-2); }

.fda-body {
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--panel); padding: 12px 14px 14px; min-height: 0;
}
.fda-panel { min-height: 0; }

/* WHAT THE ACT MEANS -- his ruling of 18 September, one sentence per panel,
   above whatever the panel draws. Deliberately NOT `.fda-note`, which is a
   panel's live status line: one is a definition that never changes and the
   other is an answer to what just happened. */
.fda-means {
  font-size: 12px; color: var(--ink-2); margin: 0 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--hush);
}

.fda-note { font-size: 12px; color: var(--dim); margin: 6px 0; }
.fda-note.fda-warn { color: var(--red-ink); }
.fda-note.fda-ok { color: var(--teal-2); }

/* --- the check-out picker, this parcel's own ---------------------------- */
.fda-co { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.fda-co-head { display: flex; align-items: baseline; gap: 10px; }
.fda-co-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 700; color: var(--ink-2); opacity: .9;
}

.fda-co-list {
  list-style: none; margin: 2px 0 0; padding: 0;
  max-height: min(48vh, 420px); overflow-y: auto;
}
.fda-co-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 2px; border-top: 1px solid var(--line-soft);
}
.fda-co-row:first-child { border-top: 0; }
.fda-co-main { flex: 1 1 auto; min-width: 0; }
.fda-co-who { font-weight: 650; color: var(--ink); }
.fda-co-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* THE LAMP IS THE ROOM'S OWN ANSWER, colour never its only cue -- the red
   ring differs in shape as well as hue from the green fill, matching
   frontdesk.js's own #fd-lamp rule and for the same reason: a colour-blind
   receptionist reads the ring, not the hue. */
.fda-lamp {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 5px;
  flex: 0 0 auto; border: 2px solid var(--line);
}
.fda-lamp-green { background: var(--teal); border-color: var(--teal); }
/* THE ONE DELIBERATE EXCEPTION TO "TOKENS ONLY": a low-alpha decorative
   ring with no text sitting on it is not a contrast question the way a
   background or a border is -- fb_checkin.css's own words for the same
   exception on the same kind of mark. It is --red's own dark-theme RGB
   (#e05a4a) at low alpha; app/frontdesk/index.html's #fd-lamp-red carries
   the identical, equally untranslated shadow for its own red, so this
   ring keeps the fixed tint that page's lamp already has rather than
   drifting from it under the day theme -- a difference to raise with the
   integrator if day-theme parity for this one ring matters more than
   matching the narrow page's own lamp. */
.fda-lamp-red { background: var(--red); border-color: var(--red);
                box-shadow: 0 0 0 2px rgba(224,90,74,.22); }
.fda-lamp-none { background: transparent; }
.fd-lamp-amber, .fda-lamp-amber { background: #e0a63c; border-color: #e0a63c; }
.fd-lamp.fd-lamp-saysback, body.fd-console .fd-lamp.fd-lamp-saysback { background: #e0a63c; border-color: #e0a63c; animation: fd-saysback 1.2s ease-in-out infinite; }
@keyframes fd-saysback { 50% { box-shadow: 0 0 0 5px rgba(224, 166, 60, .35); } }
.fd-lamp-lost, body.fd-console .fd-lamp.fd-lamp-lost { background: repeating-linear-gradient(45deg, #e0a63c 0 3px, transparent 3px 6px); border-color: #e0a63c; }

/* --- the counter: a bill under a Check-out row, a payment, the takings ----
   (30 September 2026 -- "allow receptionist to see and deal with payment").
   app/fdacts.js's own markup and nothing else's.

   THE TYPE IS IN rem, NOT px, ON PURPOSE. tools/desktop_type_scale.py writes a
   desktop override for EVERY px font-size in this stylesheet, and
   verify_desktop_type_scale goes red until the generated block is written
   again -- a second edit, away from this section, for text that already
   reads at the desktop's floor. So nothing below declares a px size: body text
   is 14px (.875rem), the quieter lines 13.4px (.84rem, over the 13.3px floor
   his ten-point ruling sets) and the small capitals heads 12px (.75rem, a
   kicker's own floor is 11). The type follows the page's root size, which is
   what a person who has enlarged their browser's text asked for.

   TOKENS ONLY, and every edge is --line, --line-soft or --rule -- never
   --faint, which is a text ink and is held to the contrast a border is not.
   Every control is at least --tap tall: this is a counter, worked on a
   touchscreen as often as a keyboard.

   PHONE WIDTH FIRST. Everything wraps -- a row's two buttons drop beneath
   its name, a line's amount beneath its label -- and nothing has a fixed
   width, so the bill reads at 320px with no sideways scroll. `min-width: 0`
   on the flex children and `overflow-wrap: anywhere` are what let a long
   label or a payer's long name shrink instead of pushing the box wider. */

/* The row now carries a second button and a box beneath it. */
.fda-co-row { flex-wrap: wrap; }
.fda-co-acts { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
/* A BILL OPEN UNDER A ROW GETS MORE ROOM -- BUT NEVER MORE THAN THE CENTRE
   COLUMN HAS. Measured in a browser at 900px tall: the frame's centre clips
   its overflow, and its acts block does not shrink (`flex: 0 0 auto`), so a
   panel taller than the column is cut off at the bottom with no way to scroll
   to the rest -- an open bill's payment form and its read-back simply went
   out of reach. So the list's own cap (which keeps a long roster inside its
   corner) is raised while a bill is open to the viewport less the desk's own
   chrome -- about 340px measured (the header, the footer, the bar and this
   panel's head), 380 allowed so a header that wraps on a narrow desk still
   fits -- and the list scrolls inside itself beyond that. Where :has() is not
   known the list keeps its ordinary cap and the bill scrolls inside it: a
   worse read, not a broken one. */
.fda-co-list:has(.fda-bill:not([hidden])) { max-height: max(300px, calc(100vh - 380px)); }
/* THE TAKINGS SCROLL INSIDE THEMSELVES for the same reason -- a busy day is
   dozens of receipts -- and the day's controls above stay where they are. */
.fda-tk-body { max-height: max(240px, calc(100vh - 460px)); overflow-y: auto; }

.fda-bill {
  flex: 0 0 100%; min-width: 0; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel-2); color: var(--ink);
  font-size: .875rem; line-height: 1.4;
}
.fda-bill-status { margin: 4px 0; color: var(--dim); }
.fda-bill-warn { color: var(--red-ink); }
.fda-bill-hint { margin: 4px 0 0; color: var(--dim); font-size: .84rem; }
/* WHY NO GST IS ON THE BILL is a standing fact about the practice, said to
   staff -- a rule at its left marks it as that, not as a warning about
   this patient. */
.fda-bill-gstnote { border-left: 2px solid var(--line); padding-left: 9px; }

/* THE BILL CARD AS PICTURED (12 Nov): a four-column heading, a button row,
   a line table, right-hand totals and a Collect bar. The card is its own
   container, so the table folds by the CARD's width, not the window's. */
.fda-billpane-box { container-type: inline-size; }
.fda-bill-head { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 10px 22px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.fda-bill-hc { min-width: 0; }
.fda-bill-hk { font-family: var(--mono); font-size: .7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.fda-bill-hk:not(:first-child) { margin-top: 6px; }
.fda-bill-hv { font-size: 1.02rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fda-bill-hc:first-child .fda-bill-hv { font-size: 1.2rem; font-weight: 700; }
.fda-bill-hv.is-missing { font-size: .88rem; font-weight: 400; font-style: italic; color: var(--amber); }
.fda-bill-hs { font-size: .76rem; color: var(--dim); overflow-wrap: anywhere; }
.fda-bill-head + .fda-bill-tools ~ .fda-bill-visit { display: none; }
.fda-bill-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
/* ONE ROW OF BUTTONS, as pictured: the print row's own buttons, Add item and
   the calendar sit side by side; its sentences and the invoice's form fall
   beneath them, full width. */
/* FD-15 (25 Nov): ONE Print menu. The toggle sits in the button row; its
   items drop below it (the sheet's own [hidden] rule, !important, keeps it shut). */
.fda-bill-tools .fda-bill-printwrap { display: contents; }
.fda-print-anchor { position: relative; display: inline-flex; }
.fda-bill-tools .fda-print-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 15rem;
  padding: 6px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.fda-bill-tools .fda-print-menu .fda-btn { text-align: left; }
.fda-bill-tools .fda-print-menu .fda-bill-hint { flex: none; order: 0; }
/* the bill's Outside prescription button (FD-15) takes the row's own button look */
.fda-bill-tools .fda-bill-outrx { white-space: nowrap; }
.fda-outrx-lines { margin: 4px 0 6px 1.2rem; padding: 0; }
.fda-outrx-line { margin: 2px 0; }
/* 📝 The outside prescription sent to a pharmacy branch (27 Nov 2026, #1071; outsiderx.ts),
   under the desk's bill and the doctor's bill corner. Tokens only. */
.orx { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; }
.orx-h { font-weight: 600; margin-bottom: 4px; }
.orx-note, .orx-state, .orx-to { color: var(--dim); margin: 3px 0; }
.orx-to { color: var(--ink); }
.orx-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 6px 0; }
.orx-code-k { color: var(--dim); }
.orx-code-v { font-size: 1.5em; letter-spacing: 0.08em; color: var(--ink); }
.orx-item { margin: 6px 0; padding-top: 6px; border-top: 1px solid var(--rule); }
.orx-words { margin-bottom: 4px; }
.orx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 6px; }
.orx-field { display: flex; flex-direction: column; gap: 2px; }
.orx-k { color: var(--dim); }
.orx-in { min-width: 0; }
.orx-branches { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.orx-branch { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.orx-ba { color: var(--dim); }
.orx-cancel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mn-outrx-btn { margin-top: 6px; }
.fda-bill-tools .fda-bill-hint { flex: 1 0 100%; order: 9; margin: 0; }
.fda-bill-tools .fda-bill-formhost { flex: 1 0 100%; order: 10; }
.fda-bill-addhost { margin: 8px 0; }
.fda-bill-top { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.fda-bill-additem { flex: 0 0 auto; }
.fda-bill-addfirst { margin-top: 8px; }
.fda-bill-th { min-width: 0; overflow-wrap: anywhere; }
.fda-bill-collect-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.fda-bill-lines.is-table .fda-bill-cols,
.fda-bill-lines.is-table .fda-bill-line { display: grid; grid-template-columns: minmax(5.5rem, 1.1fr) minmax(11rem, 3.2fr) minmax(7rem, 2fr) 2.6rem 5rem 3rem 5.5rem minmax(4.5rem, 1fr) 7.6rem; gap: 4px 10px; align-items: center; }
.fda-bill-lines.is-table .fda-bill-cols { padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--label); font-size: .78rem; font-weight: 700; }
.fda-bill-lines.is-table .fda-bill-line { padding: 8px 0; flex-wrap: nowrap; }
.fda-bill-th3, .fda-bill-th4, .fda-bill-th5, .fda-bill-th6, .fda-bill-q, .fda-bill-p, .fda-bill-dc, .fda-bill-lines.is-table .fda-bill-a { text-align: right; }
.fda-bill-lines.is-table .fda-bill-code { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.fda-bill-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.fda-bill-item .fda-bill-l { flex: 0 1 auto; }
.fda-bill-item .fda-bill-src { margin: 0; }
.fda-bill-d { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink-2); font-size: .84rem; overflow-wrap: anywhere; }
.fda-bill-dk { color: var(--dim); }
.fda-bill-dc { color: var(--dim); }
.fda-bill-py { justify-self: start; padding: 1px 9px; border: 1px solid var(--amber); border-radius: var(--r-l); color: var(--amber); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fda-bill-py.is-other { border-color: var(--line); color: var(--dim); }
.fda-bill-ac { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
/* THE GIVE TICK (12 Nov, FD-12): a box on each medicine, teal once ticked;
   and the collect bar's reminder, amber while any is still to hand over. */
.fda-bill-give { min-height: 28px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; font-size: .84rem; cursor: pointer; white-space: nowrap; }
.fda-bill-give.is-on { border-color: var(--teal); background: var(--selected-bg); color: var(--teal); font-weight: 700; }
.fda-bill-give:disabled { cursor: progress; color: var(--dim); }
.fda-bill-give-note { margin-top: 4px; color: var(--teal); font-size: .88rem; }
.fda-bill-give-note.is-left { color: var(--amber); font-weight: 700; }
.fda-bill-pickslot { flex: 0 0 auto; }
/* THE DISCOUNT (12 Nov): the cell's button, the line's own words for a
   discount given, and one asked of the doctor -- amber, and said in words. */
.fda-bill-disc { min-height: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; cursor: pointer; white-space: nowrap; }
.fda-bill-dr { color: var(--teal); }
.fda-bill-da { color: var(--amber); }
.fdm-disc { padding: 8px; border: 1px solid var(--teal); border-radius: var(--r); background: var(--sunk); }
.fdm-pct { max-width: 9rem; }
.fda-bill-pick { min-width: 28px; min-height: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.fdm-itempick { display: flex; flex-direction: column; gap: 6px; flex: 1 0 100%; padding: 8px; border: 1px solid var(--teal); border-radius: var(--r); background: var(--sunk); }
.fdm-itemlist { display: flex; flex-direction: column; }
.fdm-itemopt { padding: 6px 8px; border: 0; border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fdm-itemopt:hover, .fdm-itemopt:focus-visible { background: var(--selected-bg); color: var(--teal); }
.fdm-itemopt.is-now { color: var(--teal); cursor: default; }
.fdm-itemopt.is-taken { color: var(--dim); cursor: not-allowed; }
.fdm-itemopt.is-taken:hover { background: transparent; color: var(--dim); }
.fdm-itemwhy { font-style: italic; }
.fdm-itemform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fda-bill-pen { min-width: 28px; min-height: 28px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--ink-2); cursor: pointer; }
.fda-bill-lines.is-table .fda-bill-line > .fdm-edit { grid-column: 1 / -1; }
.fda-bill-sums.is-table { margin-left: auto; max-width: 24em; border-top: 0; }
.fda-bill-sums.is-table .fda-bill-sum { justify-content: space-between; padding: 2px 0; }
.fda-bill-sums.is-table .fda-bill-k { font-weight: 700; }
.fda-bill-sums.is-table .is-total .fda-bill-k, .fda-bill-sums.is-table .is-total .fda-bill-v { font-size: 1.12rem; font-weight: 700; }
.fda-bill-collect { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--sunk); }
.fda-bill-collect-t { font-family: var(--mono); font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); }
.fda-bill-collect-v { font-weight: 700; letter-spacing: 0.12em; color: var(--teal); }
.fda-bill-collect-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.fda-collect-m.is-on { border-color: var(--teal); color: var(--teal); }
/* A NARROWER CARD drops the description and discount columns; narrower still,
   each line stacks, code and item first. */
@container (max-width: 860px) {
  .fda-bill-head { grid-template-columns: 1fr 1fr; }
  .fda-bill-lines.is-table .fda-bill-cols,
  .fda-bill-lines.is-table .fda-bill-line { grid-template-columns: minmax(5rem, 1fr) minmax(9rem, 3fr) 2.4rem 4.6rem 5.2rem minmax(4.2rem, 1fr) 7.4rem; }
  .fda-bill-th2, .fda-bill-th5, .fda-bill-dc { display: none; }
  .fda-bill-lines.is-table .fda-bill-d { grid-column: 2 / -1; grid-row: 2; }
  .fda-bill-lines.is-table .fda-bill-d:empty { display: none; }
}
@container (max-width: 520px) {
  .fda-bill-lines.is-table .fda-bill-cols { display: none; }
  .fda-bill-lines.is-table .fda-bill-line { grid-template-columns: 1fr auto auto; }
  .fda-bill-lines.is-table .fda-bill-code { grid-column: 1 / -1; }
  .fda-bill-lines.is-table .fda-bill-item { grid-column: 1 / -1; }
  .fda-bill-lines.is-table .fda-bill-d { grid-column: 1 / -1; grid-row: auto; }
  .fda-bill-q::before { content: "Qty "; color: var(--dim); }
  .fda-bill-p { display: none; }
  .fda-bill-py, .fda-bill-ac { grid-column: auto; }
}
.fda-bill-visit { margin-bottom: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.fda-bill-t { color: var(--dim); }
.fda-bill-ref { color: var(--dim); }

/* A small-capitals head over a group -- the hospital's lines, the cancelled
   payments, the takings' lists. */
.fda-bill-h {
  margin: 10px 0 2px; font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--label);
}

.fda-bill-lines { margin-top: 2px; }
.fda-bill-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 5px 0; border-top: 1px solid var(--line-soft);
}
.fda-bill-line:first-child { border-top: 0; }
.fda-bill-l { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }
.fda-bill-a { flex: 0 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.fda-bill-to { color: var(--dim); }
/* A LINE STRUCK, NOT HIDDEN: the label and the amount are crossed out and
   the reason sits beneath them, whole, so a bill already sent can still be
   reconciled against this one. */
.fda-bill-line.is-void .fda-bill-l,
.fda-bill-line.is-void .fda-bill-a { text-decoration: line-through; color: var(--dim); }
.fda-bill-vr { flex: 1 0 100%; color: var(--dim); font-size: .84rem; }
.fda-bill-rm { flex: 1 0 100%; color: var(--teal); font-size: .84rem; }
/* What is billed to the hospital is shown and is not the desk's to collect,
   so it reads one step quieter than what is. */
.fda-bill-lines-hosp { color: var(--dim); }

.fda-bill-sums { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.fda-bill-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.fda-bill-k { color: var(--dim); }
.fda-bill-v { font-variant-numeric: tabular-nums; }
.fda-bill-sum.is-total .fda-bill-k { color: var(--ink); font-weight: 650; }
.fda-bill-sum.is-total .fda-bill-v { font-size: 1.15em; font-weight: 700; }
/* A LINE NOBODY HAS PRICED holds the payment back, so it is the one thing on
   the bill drawn in the caution tone -- the same amber the doctor's own bill
   gives "not in the total". */
.fda-bill-unpriced { margin: 8px 0 0; color: var(--amber); }

.fda-bill-pay { margin-top: 10px; }
.fda-bill-paidwrap { padding: 8px 10px; border: 1px solid var(--teal); border-radius: var(--r); }
.fda-bill-paid { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.fda-bill-when { margin-left: 4px; color: var(--dim); font-weight: 400; }
.fda-bill-claim { margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.fda-bill-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* The visit's invoice (22 Oct): the patient's request for the diagnosis is a
   tick on its own line, the size of the text around it. */
.fda-inv { margin-top: 6px; }
.fda-inv-dx { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: var(--tap, 44px); }
.fda-bill-formhost { margin-top: 8px; }
/* #1069: 🐝 the bill sent to CareBee -- its read-back and its line. */
.fda-bill-appbill { margin-top: 8px; }

.fda-bill-form {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel);
}
.fda-bill-payor { color: var(--ink-2); font-weight: 650; }
.fda-bill-field { display: flex; flex-direction: column; gap: 4px; align-self: stretch; }
.fda-bill-fk { color: var(--dim); font-size: .84rem; }
.fda-bill-in {
  font: inherit; box-sizing: border-box; width: 100%; min-height: var(--tap);
  padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--sunk); color: var(--ink);
}
.fda-bill-in:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.fda-bill-in:disabled { opacity: .6; }

/* THE READ-BACK, on the panel and in the door's own words: what stands now,
   and what confirming would make of it, ruled in the teal of the one action
   that follows. */
.fda-bill-rb {
  align-self: stretch; padding: 10px 12px; border: 1px solid var(--teal);
  border-radius: var(--r); background: var(--panel-2);
}
.fda-bill-rb-line { margin: 2px 0; overflow-wrap: anywhere; }
.fda-bill-rb-line b { margin-right: 4px; color: var(--teal-2); }
.fda-bill-rb-note { margin-top: 4px; color: var(--dim); font-size: .84rem; }

/* A CANCELLED PAYMENT IS KEPT AND DRAWN MUTED -- present, dated, its reason
   beside it and its receipt one tap away, but a step back from the one that
   stands. */
/* PAST PAYMENTS (FD-17, 12 Nov 2026): a collapsed section at the foot of the
   bill card. A payer's part is told apart by its WORDS and its mark; the
   edge only repeats what the words say. No px font size here: the desktop
   type scale is generated from those. */
.fda-past { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.fda-past-toggle {
  background: none; border: 0; padding: 6px 0; min-height: var(--tap);
  color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer;
}
.fda-past-toggle::before { content: "\25B8\00a0"; }
.fda-past-toggle[aria-expanded="true"]::before { content: "\25BE\00a0"; }
.fda-past-sum { margin: 4px 0 8px; font-weight: 600; color: var(--ink); }
.fda-past-list { display: grid; gap: 8px; }
.fda-past-row { padding: 6px 0 6px 10px; border-left: 3px solid var(--rule); }
.fda-past-row.is-awaiting-payer { border-left-style: dashed; border-left-color: var(--amber); }
.fda-past-row.is-overdue { border-left-style: double; border-left-width: 5px; border-left-color: var(--red); }
.fda-past-head { color: var(--dim); font-size: .84rem; }
.fda-past-this { font-size: .78rem; border: 1px solid var(--rule); border-radius: 999px; padding: 0 6px; }
.fda-past-status { font-weight: 600; color: var(--ink); }
.fda-past-mark { display: inline-block; min-width: 1.1em; text-align: center; }
.fda-past-detail { color: var(--ink-2); font-size: .9rem; }
.fda-past-note { margin-top: 8px; }
.fda-bill-oldwrap { margin-top: 10px; }
.fda-bill-old {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 4px 0; border-top: 1px solid var(--line-soft); color: var(--dim);
}
.fda-bill-oldtxt { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
/* 📹 a video follow-up held at the close, paid here on its own receipt (5 Nov). */
.fda-bill-video { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.fda-bill-video-row { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }

/* --- the takings view, in the Check-out panel ---------------------------- */
.fda-tk { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; line-height: 1.4; }
.fda-tk-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fda-tk-day { flex: 1 1 auto; text-align: center; font-weight: 650; }
.fda-tk-status { margin: 0; color: var(--dim); }
.fda-tk-sums { padding: 8px 0; border-top: 1px solid var(--line); }
.fda-tk-count { margin: 2px 0 6px; color: var(--dim); font-size: .84rem; }
.fda-tk-list { list-style: none; margin: 0; padding: 0; }
.fda-tk-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 6px 0; border-top: 1px solid var(--line-soft);
}
.fda-tk-row:first-child { border-top: 0; }
.fda-tk-no { font-weight: 650; }
.fda-tk-who { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.fda-tk-when, .fda-tk-how { color: var(--dim); }
.fda-tk-amt { margin-left: auto; font-variant-numeric: tabular-nums; }
.fda-tk-sub { flex: 1 0 100%; color: var(--dim); font-size: .84rem; overflow-wrap: anywhere; }
.fda-tk-row.is-cancelled { color: var(--dim); }
.fda-tk-row.is-cancelled .fda-tk-amt { text-decoration: line-through; }
.fda-tk-none { margin: 8px 0 0; color: var(--dim); }

/* --- the Payment act (2 October 2026) ------------------------------------
   Dr Lau: "(a) a permanent Payment button on the desk bar". Its panel is
   three sections -- to collect, paid today, left today without a payment --
   each a small-capitals head (.fda-bill-h) over the same rows the Check-out
   panel and the takings already draw, so almost nothing here is new. The
   same rules as the counter's: rem type, tokens only, everything wraps.

   THE PANEL SCROLLS AS ONE, inside the centre column's room, for the reason
   the check-out list's cap gives: a column that clips its overflow cuts off
   whatever is taller than it, and three lists on a busy day are. */
.fda-pay-body { max-height: max(300px, calc(100vh - 380px)); overflow-y: auto; }
.fda-pay-sec { margin-top: 2px; font-size: .875rem; line-height: 1.4; }
.fda-pay-sec .fda-co-list { max-height: none; overflow: visible; }
.fda-pay-status { margin: 4px 0; color: var(--dim); }
/* HOW A VISIT LEFT UNPAID IS SETTLED -- the door's own sentence, a standing
   fact about every row under it, so it is ruled at its left like the GST
   note rather than coloured as a warning. */
.fda-pay-settle {
  margin: 6px 0 0; padding-left: 9px; border-left: 2px solid var(--line);
  color: var(--ink-2); font-size: .84rem; overflow-wrap: anywhere;
}
/* A ROW THAT CANNOT BE PAID HERE carries no button, and reads quieter than
   one that can. */
.fda-pay-left .fda-co-who { color: var(--ink-2); }
/* CHECK-OUT'S ONE QUESTION, on the row it is about: "Not paid yet -- check
   out anyway?" A full-width line under the buttons, so it wraps at phone
   width and is never pushed beside a name. */
.fda-co-ask { flex: 0 0 100%; margin: 6px 0 0; font-size: .84rem; overflow-wrap: anywhere; }
/* Slice 2: one patient's bill, opened from the row's 💳. */
.fda-billpane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fda-billpane-takings { flex: 0 0 auto; }
.fda-billpane-box { min-height: 0; }
.fda-billpane { display: block; }
.fda-billpane-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.fda-todoc { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
/* Slice 6: the CareBee connect panel reads as a form, one field a line. */
.fda-panel label.fd-cb-note { display: block; margin: 8px 0; }
.fda-panel .fd-cb-in:not([type=checkbox]) { display: block; width: 100%; max-width: 420px; min-height: 40px;
  box-sizing: border-box; font: inherit; background: var(--sunk); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r); padding: 6px 8px; margin-top: 4px; }
.fda-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fda-chip { border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink); padding: 4px 10px; cursor: pointer; font: inherit; }
.fda-chip.is-on { border-color: var(--teal); color: var(--teal); }
.fda-taskrow { display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.fda-tasklab { color: var(--dim); }
.fd-tile-drag { cursor: grab; }
.fd-takes-patient.is-drop { outline: 2px dashed var(--teal); outline-offset: 2px; }
/* The wide board's symbol-only row (11 Nov). */
.fd-row-sym { flex-wrap: nowrap; }
/* A PAID VISIT (12 Nov): the room's own green (--teal, the green lamp's), and
   never by colour alone -- the bill station carries a tick and the word in
   its title. */
li.fd-row.fd-row-paid { background: var(--selected-bg); box-shadow: inset 3px 0 0 var(--teal); }
li.fd-row.fd-row-paid .fd-reg { color: var(--teal); padding-left: 8px; }
.fd-bill-tile.is-paid { color: var(--teal); border-color: var(--teal); font-weight: 700; }
.fda-bill-sums .is-paid { color: var(--teal); }
.fd-sym-line { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.fd-reg { font-family: var(--mono, monospace); white-space: nowrap; }
.fd-payers { display: inline-flex; gap: 2px; }
.fd-payer { display: inline-block; min-width: 1.4em; text-align: center; font-weight: 600; border: 1px solid var(--rule); border-radius: 4px; padding: 0 3px; }
.fd-payer-first { box-shadow: 0 0 0 2px var(--teal, currentColor); }
.fd-steps { display: inline-flex; gap: 3px; }
.fd-step { position: relative; display: inline-block; padding: 1px 3px; border-radius: 4px; border: 1px solid var(--rule); }
.fd-step-now { border-color: var(--amber, currentColor); }
.fd-step-tick { position: absolute; right: -4px; top: -6px; font-size: 0.7em; }
.fd-clock { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-clock-lost { color: var(--red, inherit); }
.fd-acts-sym .fd-ico { min-width: 2.2em; padding: 2px 6px; }
/* One line that does not overlap: the patient's facts take what is left,
   the act and bill buttons are fixed squares at the end. */
li.fd-row.fd-row-sym { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.fd-row-sym .fd-row-main { flex: 1 1 auto; min-width: 0; overflow: hidden; margin: 0; }
.fd-row-sym .fd-acts { flex: 0 0 auto; display: flex; gap: 4px; flex-wrap: nowrap; }
.fd-row-sym .fd-btn, .fd-row-sym .fd-bill-tile, .fd-row-sym .dfc-bell {
  flex: 0 0 auto; width: 34px; height: 34px; min-width: 34px; min-height: 34px;
  padding: 0; margin: 0; position: static; display: inline-flex; align-items: center; justify-content: center; }
.fd-row-sym .fd-lamp { flex: 0 0 auto; margin-top: 0; }
/* The bill mock-up (11 Nov): codes on every line, a tapped line's editor,
   the master-list drop-down, the one print row, the next appointment. */
.fda-bill-code { flex: 0 0 auto; min-width: 6em; color: var(--dim); margin-right: 8px; }
/* THE PAD TAG (12 Nov, #1067): a small outlined word beside the item. A line
   the desk changed is amber, and says "desk" -- never by colour alone. */
.fda-bill-src { flex: 0 0 auto; margin: 0 8px; padding: 1px 8px; border: 1px solid var(--line); border-radius: var(--r); color: var(--teal); font-size: .78rem; white-space: nowrap; }
.fda-bill-src.is-desk { color: var(--amber); border-color: var(--amber); }
.fda-bill-code.is-none { color: var(--dim); font-style: italic; }
.fda-bill-line.is-editable { cursor: pointer; border-radius: 4px; }
.fda-bill-line.is-editable:hover, .fda-bill-line.is-editable:focus-visible { background: var(--sunk); outline: none; }
.fda-bill-printwrap { margin-top: 10px; }
.fda-bill-print { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fda-bill-memo { flex-basis: 100%; }
.fda-nextappt { margin: 8px 0; }
.fda-nextappt-note { margin-top: 6px; }
.fdm-edit, .fdm-addline, .fdm-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; flex-basis: 100%; }
.fdm-kind, .fdm-master { max-width: 100%; }
.fdm-add-go { flex: 0 0 auto; }
/* THE STATION COLUMNS (11 Nov, his approved wide board). */
.fd-bee { flex: 0 0 auto; opacity: 0.35; filter: grayscale(1); }
.fd-bee.fd-bee-on { opacity: 1; filter: none; }
.fd-clock { display: inline-flex; flex-direction: column; flex: 0 0 auto; min-width: 6.5em; line-height: 1.15; }
.fd-row-sym .fd-reg { flex: 0 0 11.5em; overflow: hidden; text-overflow: ellipsis; }
.fd-clock-big { font-weight: 700; color: var(--amber, inherit); }
.fd-clock-sub { font-size: 0.8em; color: var(--dim); }
.fd-clock-lost .fd-clock-big { color: var(--red, inherit); }
.fd-stations { flex: 0 0 auto; display: inline-flex; gap: 4px; align-items: center; }
.fd-row-sym .fd-stations::after { content: ""; flex: 0 0 34px; }
.fd-st { position: relative; flex: 0 0 34px; width: 34px; height: 34px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; }
.fd-st-ico { line-height: 1; }
.fd-st-tick { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--teal); color: var(--bg); font-size: 0.6em; line-height: 13px; text-align: center; }
.fd-st-is-done { background: var(--sunk); }
.fd-st-is-next { border-color: var(--amber, currentColor); }
.fd-st-is-current { border-color: var(--teal, currentColor); }
.fd-st-is-out { border-color: var(--red, currentColor); background: var(--sunk); }
.fd-st-is-back { border-color: var(--teal, currentColor); background: var(--sunk); }
.fd-st-is-faded { opacity: 0.25; }
.fd-st-act .fd-btn, .fd-st-act .fd-bill-tile { width: 34px; height: 34px; }
/* FINANCIAL COUNSELLING (17 Nov): the row's tile, and the estimate sheet. */
.fd-row-sym .fd-fc-tile, .fd-st-act .fd-fc-tile { flex: 0 0 auto; width: 34px; height: 34px; min-width: 34px; min-height: 34px;
  padding: 0; margin: 0; position: static; display: inline-flex; align-items: center; justify-content: center; }
.fd-fc-tile[data-fc="due"], .fd-fc-tile[data-fc="again"] { border-color: var(--amber); }
.fd-fc-tile[data-fc="again"] { border-style: dashed; }
.fd-fc-tile[data-fc="done"] { color: var(--teal); border-color: var(--teal); font-weight: 700; }
.fd-st-is-faded.fd-st-act:has(.fd-fc-tile) { opacity: 1; }
.fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.fc-status { margin: 0 0 8px; color: var(--dim); }
.fc-status[data-state="due"], .fc-status[data-state="again"] { color: var(--amber); }
.fc-status[data-state="done"] { color: var(--teal); }
.fc-op { font-weight: 700; color: var(--ink); }
.fc-facts { color: var(--dim); margin-bottom: 8px; }
.fc-lines { display: grid; grid-template-columns: minmax(160px, 30%) 1fr; gap: 4px 12px; margin: 0 0 8px;
  padding: 8px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fc-lines dt { color: var(--label); margin: 0; }
.fc-lines dd { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-lines dd.fc-total { font-weight: 700; }
.fc-note, .fc-mark, .fc-said { margin: 0 0 6px; color: var(--dim); }
.fc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.fc-foot .fc-said { flex: 1 1 100%; }
.fc-how { min-height: 36px; background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); padding: 0 8px; font: inherit; }
.fd-st-head { display: flex; align-items: center; gap: 6px; padding: 0 0 4px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.fd-st-head-lead { flex: 0 0 430px; }
.fd-row-sym .fd-row-main.fd-sym-line { flex: 0 0 430px; width: 430px; overflow: hidden; }
li.fd-row.fd-row-sym, .fd-st-head { min-width: max-content; }
.fd-st-scroll { overflow-x: auto; overflow-y: auto; min-width: 0; max-width: 100%; flex: 1 1 auto; }
.fd-st-scroll .fd-worklist { overflow: visible; }
.fd-st-head-tail { flex: 0 0 40px; }
.fd-st-h { border: 1px dashed var(--rule); height: 24px; font-size: 0.85em; }
.fd-st-add { border: 1px dashed var(--teal, var(--rule)); height: 24px; background: transparent; color: var(--teal, var(--ink)); cursor: pointer; font: inherit; }
.fd-row-sym .fd-acts { min-width: 40px; justify-content: flex-end; }
/* ---- FD-2 BEGIN: the DOCTORS strip and the header (fddoctors.ts, fdframe.ts) ---- */
.fd-doc-strip { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.fd-doc-label { font-family: var(--mono); letter-spacing: .16em; color: var(--teal); }
.fd-doc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fd-doc-none { color: var(--dim); }
.fd-doc-chip { display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 2px 12px; border-radius: 999px; cursor: pointer; font: inherit;
  border: 1px solid var(--teal); color: var(--teal); background: var(--sunk); }
.fd-doc-c1 { border-color: var(--amber); color: var(--amber); }
.fd-doc-c2 { border-color: var(--map-numb); color: var(--map-numb); }
.fd-doc-c3 { border-color: var(--red); color: var(--red); }
.fd-doc-c4 { border-color: var(--teal-2); color: var(--teal-2); }
.fd-doc-c5 { border-color: var(--ink-2); color: var(--ink-2); }
.fd-doc-chip.is-out { border-style: dashed; opacity: .55; }
.fd-doc-chip.is-off { background: transparent; color: var(--dim); }
.fd-doc-tick { min-width: 1ch; }
.fd-doc-ini { font-family: var(--mono); }
.fd-doc-name { white-space: nowrap; }
/* The held file's one line (15 Nov): symbol, file, the patient's tile, days waiting. */
.fd-doc-line { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.fd-doc-line .fd-who { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-doc-sym { cursor: help; }
.fd-doc-tile { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 0.78rem; color: var(--ink); white-space: nowrap; cursor: grab; }
.fd-doc-age { flex: 0 0 auto; font-size: 0.75rem; color: var(--dim); white-space: nowrap; cursor: help; }
.fd-doc-wait { flex: 0 0 auto; cursor: help; }
.fd-doc-hdr-ic { margin-right: 4px; }
.fd-brand-sub { letter-spacing: .2em; color: var(--ink-2); }
.fd-hdr-docs { border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; color: var(--ink); }
.fd-hdr-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.fd-hdr > .fd-hdr-act { padding: 2px 8px; }
.fd-hdr-date { color: var(--dim); white-space: nowrap; }
.fd-hdr .fd-hdr-right .fd-hdr-clock { margin-left: 0; color: var(--ink); font-weight: 700; font-size: 1.3em; }
.fd-hdr-count { font: inherit; min-height: var(--tap); padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.fd-hdr-n { margin-left: 4px; }
.fd-hdr-who { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.fd-who-name { color: var(--ink); }
.fd-who-sub { color: var(--dim); font-family: var(--mono); letter-spacing: .06em; }
.fda-bar .fda-btn[data-act="carebee"].is-active { border-color: var(--amber); color: var(--amber); }
.fd-brand, .fd-brand-sub, .fd-hdr-loc, .fd-hdr-docs, .fd-who-name, .fd-who-sub, .fd-hdr-act { white-space: nowrap; }
.fd-hdr { gap: 10px; }
/* #1210: whose desk this is. One line, never wrapping the bar: the name
   clamps with an ellipsis and the group's words fold first when short. */
.fd-hdr-clinic { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0;
  max-width: 24vw; white-space: nowrap; overflow: hidden; color: var(--ink); font-weight: 700; }
.fd-clinic-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fd-clinic-group { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; color: var(--dim); font-weight: 400; }
.fd-hdr-clinic.is-unread .fd-clinic-name { color: var(--amber); cursor: help; }
@media (max-width: 1500px) { .fd-hdr .fd-hdr-clinic { max-width: 16vw; } }
@media (max-width: 1300px) { .fd-hdr .fd-clinic-group { display: none; } }
@media (max-width: 700px) { .fd-top .fd-hdr-clinic { max-width: 60vw; } }
/* ---- FD-2 END ---- */

/* ---- FD-3 TODAY ⇄ (app/fdtoday.ts) BEGIN ---- */
.fd-td { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 8px; }
.fd-td-head { display: flex; align-items: center; gap: 4px; }
.fd-td-title { flex: 1; font-family: var(--mono, monospace); letter-spacing: .18em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.fd-td-btn { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 2px 6px; min-width: 24px; }
.fd-td-btn:hover { color: var(--ink); }
.fd-td-reopen { color: var(--teal); }
.fd-td-body { overflow-x: auto; }
.fd-td-grid { border-collapse: collapse; width: 100%; table-layout: fixed; margin-top: 6px; }
.fd-td-wide .fd-td-grid { table-layout: auto; }
.fd-td-corner { width: 4.5em; }
.fd-td-corner, .fd-td-col { color: var(--teal); font-weight: 500; text-align: left; padding: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-td-slot { color: var(--dim); font-weight: 400; text-align: left; padding: 4px 8px 4px 4px; width: 4.5em; white-space: nowrap; }
.fd-td-hr { border-bottom: 1px solid var(--rule); }
.fd-td-row { border-top: 1px solid var(--rule); }
.fd-td-cell { color: var(--amber, var(--ink)); padding: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.fd-td-wide .fd-td-cell { max-width: none; }
.fd-td-note { color: var(--dim); margin-top: 6px; }
/* ---- FD-3 TODAY ⇄ END ---- */
/* ---- FD-4 stacked panels (fdframe.ts buildStacked) BEGIN ---- */
.fd-stack {
  flex: 0 0 260px; width: 260px; min-height: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.fd-stack[hidden] { display: none; }
.fd-stk {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel);
}
.fd-stk[hidden] { display: none; }
.fd-stk.is-folded { flex: 0 0 auto; }
.fd-stk-h { display: flex; align-items: center; gap: 6px; padding-bottom: 6px;
  margin-bottom: 6px; border-bottom: 1px solid var(--hush); }
.fd-stk-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-stk-fold, .fd-stk-x {
  flex: 0 0 auto; min-width: 24px; height: 24px; padding: 0 4px;
  border: 0; border-radius: 6px; background: transparent; color: var(--dim);
  font: inherit; cursor: pointer;
}
.fd-stk-fold:hover, .fd-stk-x:hover { color: var(--teal); background: var(--hush); }
.fd-stk-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.fd-stk.is-folded .fd-stk-body { display: none; }
.fd-stk.is-folded .fd-stk-h { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.fd-stack-slot { flex: 1 1 0; min-height: 0; }
.fd-stack-slot:empty { flex: 0 0 0; }
/* 14 Nov: the column's width and its divider are movable (fdframe.ts
   mountStackSizing). */
.fd-stack.fd-stack-sized { position: relative; gap: 0;
  --fd-share: 50%; /* the top card's share; fdframe.ts sets it on the top card when the divider moves */ }
.fd-stack-sized > .fd-stack-top:not(.is-folded) { flex: 0 0 var(--fd-share, 50%); }
.fd-stack-split { flex: 0 0 10px; cursor: row-resize; position: relative; touch-action: none; }
.fd-stack-split::after { content: ''; position: absolute; left: 30%; right: 30%; top: 4px;
  height: 2px; border-radius: 2px; background: var(--rule); }
.fd-stack-split:hover::after, .fd-stack-split.is-dragging::after,
.fd-stack-split:focus-visible::after { background: var(--teal-2); }
.fd-stack-wgrip { position: absolute; top: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none; z-index: 2; }
.fd-stack-wgrip-left { right: -10px; }
.fd-stack-wgrip-right { left: -10px; }
.fd-stack-wgrip:hover, .fd-stack-wgrip.is-dragging, .fd-stack-wgrip:focus-visible {
  background: linear-gradient(90deg, transparent 4px, var(--teal-2) 4px, var(--teal-2) 6px, transparent 6px); outline: none; }
/* ---- FD-4 stacked panels END ---- */
/* THE SUBHEADING (15 Nov): the day, today's hours, the doctors, Pre-clerk
   and the counts, one line under the header. */
/* .fd-subhead since 5 Dec: .fd-sub alone is also a row's second line on the
   front desk page, which this padding and border pushed 25px past a phone. */
.fd-sub.fd-subhead { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 6px 16px;
  border-bottom: 1px solid var(--hush); min-width: 0; }
.fd-sub-day { color: var(--teal); letter-spacing: .12em; text-transform: uppercase; font-size: 0.75rem; white-space: nowrap; }
.fd-sub-hours { color: var(--dim); font-size: 0.8125rem; white-space: nowrap; }
.fd-sub-docs { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.fd-sub-title { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border: 1px solid var(--rule);
  border-radius: 14px; font-size: 0.8125rem; color: var(--ink); white-space: nowrap; }
.fd-sub-title.is-out { color: var(--dim); }
.fd-sub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.fd-sub-dot.is-in { background: var(--teal); }
.fd-sub-none { color: var(--dim); font-size: 0.8125rem; }
.fd-sub-sp { flex: 1 1 auto; }
.fd-sub-counts { display: flex; gap: 6px; }
.fd-sub-btn { position: relative; display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 0 10px;
  font: inherit; font-size: 0.8125rem; color: var(--ink); background: transparent; border: 1px solid var(--rule);
  border-radius: 8px; cursor: pointer; white-space: nowrap; }
.fd-sub-btn:hover { border-color: var(--teal-2); }
.fd-sub-btn .fd-sub-n { position: static; }
.fd-pc-plane { position: fixed; inset: 56px 24px 24px; z-index: 50; background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--r-l); box-shadow: var(--z2); padding: 16px; overflow: auto; }
.fd-pc-close { position: absolute; top: 10px; right: 10px; }
.fd-pc-h { color: var(--teal); font-family: var(--mono); letter-spacing: .18em; font-size: 0.75rem; margin-bottom: 12px; }
.fd-pc-none { color: var(--dim); }
@media (max-width: 1500px) { .fd-sub-w { display: none; } }
.fd-sub .fd-doc-chip { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; min-height: 30px;
  height: 30px; padding: 0 10px; border-radius: 15px; font-size: 0.8125rem; white-space: nowrap; }
.fd-sub .fd-doc-chip .fd-doc-name { margin: 0; }
/* ---- FD-5 his approved layout (11 Nov) BEGIN ----
   Header one line; slim icon rails; Live chat + Enquiries and To do + Today
   as compact stacks; the centre is the DOCTORS card over the WAITING ROOM,
   wide, with the acts' panels (CareBee's three steps) under it. */
.fd-desk { --fd-rail-w: 44px; }
.fd-rail-tab.has-icon { writing-mode: horizontal-tb; transform: none; padding: 0;
  width: 36px; min-width: 36px; height: 36px; min-height: 36px; font-size: 1rem; align-self: center; }
.fd-rail-left .fd-rail-tab.has-icon { transform: none; }
.fd-rail-tab.has-icon .fd-rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* FD-7: the rail icon's name, beside it on hover and focus (one label, on the body). */
.fd-rail-tip { position: fixed; z-index: 60; transform: translateY(-50%); pointer-events: none;
  background: var(--panel); color: var(--ink); border: 1px solid var(--teal-2); border-radius: var(--r);
  padding: 4px 10px; font-size: 0.8125rem; white-space: nowrap; }
/* A symbol in a row: its name is placed by its own top-left corner, above the symbol. */
.fd-rail-tip.fd-rail-tip-over { transform: none; padding: 2px 8px; line-height: 1.25; }
.fd-rail-ic { line-height: 1; }
.fd-rail { padding: 6px 4px; border: 1px dashed var(--rule); border-radius: var(--r); align-items: center; }
.fd-hdr { flex-wrap: nowrap; padding: 8px 16px; }
.fd-hdr .fd-brand { font-size: 1.25rem; }
.fd-hdr .fd-hdr-act[data-theme] { min-width: 32px; padding: 2px 8px; }
.fd-hdr .fd-who-sub { font-size: 0.625rem; }
.fd-hdr .fd-who-name { font-size: 0.8125rem; }
.fd-hdr .fd-hdr-date { font-size: 0.75rem; letter-spacing: .08em; }
.fd-stack { flex-basis: 268px; width: 268px; }
.fd-stk-compact { overflow: auto; }
.fd-cmp { display: flex; flex-direction: column; gap: 2px; }
.fd-cmp-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 4px;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 0.75rem; text-align: left; cursor: pointer; }
.fd-cmp-row:hover { background: var(--hush); color: var(--ink); }
.fd-cmp-ic { flex: 0 0 auto; }
.fd-cmp-t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cmp-age { flex: 0 0 auto; color: var(--dim); }
.fd-cmp-chip { flex: 0 0 auto; padding: 0 5px; border: 1px solid var(--teal-2); border-radius: 6px;
  color: var(--teal); font-size: 0.625rem; }
.fd-cmp-none { color: var(--dim); font-size: 0.75rem; padding: 3px 4px; }
.fd-centre { gap: 10px; }
/* 15 Nov: the acts' panels open UNDER the waiting room; with a full room
   they were below a column that did not scroll -- cut off, so a tap on
   Message Dr looked like nothing. The centre scrolls now. */
.fd-desk .fd-centre { overflow-y: auto; }
.fd-side-h { display: flex; align-items: center; gap: 6px; }
.fd-side-h .fd-side-t { flex: 1 1 auto; min-width: 0; }
.fd-centre .fd-centre-acts { padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); }
.fd-centre .fd-doc-label { color: var(--teal); font-family: var(--mono); letter-spacing: .18em; font-size: 0.6875rem; }
.fd-centre .fda-bar { flex-wrap: nowrap; }
.fd-centre .fda-bar .fda-btn { flex: 1 1 0; }
.fd-centre .fda-bar .fda-btn[data-act="stock"] { display: none; }
.fd-centre .fda-bar .fda-btn[data-act="carebee"] { border-color: var(--amber); color: var(--amber); }
.fd-centre-room { flex: 0 0 auto; display: flex; flex-direction: column; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); }
.fd-centre-room-h { color: var(--teal); font-family: var(--mono); letter-spacing: .18em; font-size: 0.6875rem; margin-bottom: -26px; }
.fd-centre-room-b { min-width: 0; }
/* WAITING · PRE-CLERK · DISCHARGED on the card's heading line (15 Nov,
   fdroomtabs.ts). The line is its own row, so the heading no longer rides
   up over the station symbols. One body shows, chosen by data-view. */
.fd-centre-room-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fd-centre-room-head .fd-centre-room-h { margin-bottom: 0; margin-right: auto; }
.fd-rt-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fd-rt-tab { border: 1px solid var(--rule); background: transparent; color: var(--ink); border-radius: 999px;
  padding: 4px 12px; min-height: 32px; font: inherit; font-size: 0.8125rem; cursor: pointer; white-space: nowrap; }
.fd-rt-tab.is-on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.fd-rt-n { margin-left: 6px; color: var(--dim); font-size: 0.75rem; }
.fd-rt-body { display: none; min-width: 0; }
.dc-up { display: inline-flex; margin-left: 6px; vertical-align: middle; }
/* The upload and open buttons are the size of the chips beside them (16 Nov). */
.dc-td .dc-up-go, .dc-td .dc-loc-open { padding: 1px 9px; min-height: 0; height: auto; line-height: inherit; border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: 0.75rem; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.dc-loc-open { margin-left: 6px; }
/* A header station that can be dragged onto another to swap them. */
.fd-st-h.fd-st-drag { cursor: grab; }
/* DONE IS DULL (16 Nov, "once completed the station the symbols become dull
   colour"): a finished station keeps its tick and loses its colour. */
.fd-st-is-done { opacity: 0.45; filter: grayscale(1); }
.fd-st-is-done .fd-st-tick { filter: none; }
/* ...so a station still to go is in full colour: the desk can send there. */
.fd-st-is-faded.fd-st-act { opacity: 1; }
.dc-amt { margin-right: 8px; color: var(--ink); font-size: 0.8125rem; white-space: nowrap; }
.fd-centre-room[data-view="preclerk"] > .fd-centre-room-b,
.fd-centre-room[data-view="discharged"] > .fd-centre-room-b { display: none; }
.fd-centre-room[data-view="preclerk"] > .fd-rt-body[data-view="preclerk"],
.fd-centre-room[data-view="discharged"] > .fd-rt-body[data-view="discharged"] { display: block; }
.fd-centre-room.is-occupied .fd-rt-tabs, .fd-centre-room.is-occupied[data-view] > .fd-rt-body[data-view] { display: none; }
.fd-centre-room .fd-room-tools { justify-content: flex-end; }
.fd-centre-room .fd-st-scroll { overflow-x: hidden; }
.fd-centre-room li.fd-row.fd-row-sym, .fd-centre-room .fd-st-head { min-width: 0; }
.fd-centre-room .fd-stations { flex: 1 1 auto; justify-content: space-around; }
.fd-centre > .fda-body { flex: 0 0 auto; }
/* NARROW DESKS (11 Nov, the review). The station columns are never dropped:
   below 1500px the row's lead shrinks and the cells with it, and the room
   scrolls sideways INSIDE its own panel -- header and rows together -- rather
   than clipping a column off its right edge. The header folds its words to
   glyphs so Sign out is never pushed off the screen; CareBee's button keeps
   one line. */
.fd-centre-room .fd-st-scroll { overflow-x: auto; }
.fd-centre-room li.fd-row.fd-row-sym, .fd-centre-room .fd-st-head { min-width: max-content; }
.fd-hdr > *, .fd-hdr-right > * { flex-shrink: 0; }
.fd-hdr .fd-hdr-loc, .fd-hdr .fd-hdr-docs { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fda-bar .fda-btn[data-act="carebee"], .fd-centre .fda-bar .fda-btn { white-space: nowrap; }
@media (max-width: 1500px) {
  .fd-st-head-lead, .fd-row-sym .fd-row-main.fd-sym-line { flex-basis: 330px; width: 330px; }
  .fd-row-sym .fd-reg { flex-basis: 9.5em; }
  .fd-st { flex-basis: 30px; width: 30px; height: 30px; }
  .fd-hdr .fd-hdr-date, .fd-hdr .fd-who-sub { display: none; }
  .fd-hdr .fd-hdr-loc { max-width: 16vw; }
  .fd-hdr .fd-hdr-docs { max-width: 18vw; }
}
@media (max-width: 1300px) {
  .fd-hdr .fd-brand-sub, .fd-hdr .fd-hdr-who { display: none; }
  .fd-hdr .fd-hdr-loc { max-width: 11vw; }
  .fd-hdr .fd-hdr-docs { max-width: 8vw; }
  .fd-st-head-lead, .fd-row-sym .fd-row-main.fd-sym-line { flex-basis: 290px; width: 290px; }
  .fd-centre .fda-bar { flex-wrap: wrap; }
  .fd-centre .fda-bar .fda-btn { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; letter-spacing: 0; }
}
/* NO SIDEWAYS SCROLL IN THE WAITING ROOM (Dr Lau, 27 Nov 2026: "remove the
   horizontal scroll bar, keep everything visible within the bar"). This
   SUPERSEDES the 11 Nov narrow-desk rule above (scroll inside the panel):
   the lead of the header and of every row is one flexible width, so the
   station columns sit at the right of the card at any width; header and
   rows keep the same columns because their leads share one rule and every
   station is one fixed width (34px, 30px under 1500px, 26px under 1250px). */
.fd-st-scroll, .fd-centre-room .fd-st-scroll { overflow-x: hidden; }
li.fd-row.fd-row-sym, .fd-st-head,
.fd-centre-room li.fd-row.fd-row-sym, .fd-centre-room .fd-st-head { min-width: 0; }
.fd-st-head-lead, .fd-row-sym .fd-row-main.fd-sym-line { flex: 1 1 0; width: auto; min-width: 0; }
.fd-st-head-lead, .fd-row-sym .fd-row-main.fd-sym-line { flex-wrap: wrap; gap: 4px; }
.fd-row-sym .fd-reg { flex: 0 1 11.5em; min-width: 0; }
.fd-st-head .fd-st, .fd-row-sym .fd-st,
.fd-row-sym .fd-stations::after { flex: 0 0 34px; width: 34px; min-width: 0; }
@media (max-width: 1500px) {
  .fd-st-head .fd-st, .fd-row-sym .fd-st, .fd-row-sym .fd-stations::after { flex-basis: 30px; width: 30px; }
}
@media (max-width: 1250px) {
  .fd-st-head .fd-st, .fd-row-sym .fd-st, .fd-row-sym .fd-stations::after { flex-basis: 26px; width: 26px; height: 30px; }
  .fd-st-head .fd-stations, .fd-row-sym .fd-stations { gap: 2px; }
}
/* ⇅ ARRANGE (27 Nov): the menu is drawn over the page, under the button,
   so the room's scrolling box can never clip it. */
.fd-room-tools .fd-tool-menu { position: fixed; right: auto; z-index: 60; min-width: 12rem;
  box-shadow: 0 6px 20px var(--bg); }
/* THE STACKED PAGE (phone, tablet): a field a finger fills is a tap tall. */
@media (max-width: 1099px) {
  .fd-input, .fda-bill-in, .fd-bk-in, .wr-in, .fd-cbx-in, .fd-cbx-qrin { min-height: var(--tap); }
}
.fd-takes-patient.is-drop, .fd-st.is-drop { outline: 2px dashed var(--teal); outline-offset: 2px; }
.ci-arr-row.is-picked { outline: 2px solid var(--teal); }
.fd-doc-drop { border: 2px dashed var(--rule); border-radius: var(--r); padding: 10px 12px; margin: 6px 0; color: var(--dim); }
.fd-doc-drop.is-drop { border-color: var(--teal); color: var(--ink); }
.fd-doc-drop-line { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fd-cbx-match.is-warn { color: var(--amber); }
.fd-cbx-match.is-ok { color: var(--teal); }
.fd-rail-left .fd-rail-tab.has-icon .fd-count { top: -5px; right: -5px; bottom: auto; left: auto; transform: none; font-size: 0.625rem; }
.fd-rail-tab.has-icon .fd-count { top: -5px; right: -5px; font-size: 0.625rem; }
.fd-rail-tab.has-icon.has-wide-count { padding: 0; }
.fd-stack-slot[data-slot="today"] { flex: 1 1 0; overflow: auto; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); font-size: 0.6875rem; }
.fd-stack-slot[data-slot="today"] .fd-td { margin-top: 0; border-top: 0; padding-top: 0; }
.fd-stack-slot[data-slot="today"] .fd-td-note, .fd-stack-slot[data-slot="today"] table { font-size: 0.6875rem; }
.fd-centre .fd-doc-chip { padding: 2px 10px; font-size: 0.6875rem; min-height: 0; }
.fd-centre .fd-doc-row { gap: 6px; }
.fd-centre .fd-centre-acts .fda-btn { min-height: 34px; }
/* 🐝 CAREBEE CONNECT, three cards under the waiting room (his mock-up, 11 Nov).
   The centre was overflow:hidden, so with a full room the opened panel sat
   below the fold and drew nowhere; the centre scrolls now. */
.fd-centre { overflow-y: auto; }
.fd-cbx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fd-cbx-card { border: 1px solid var(--rule); border-radius: var(--r); background: var(--sunk); padding: 12px 14px; min-width: 0; }
.fd-cbx-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.875rem; color: var(--ink); }
.fd-cbx-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: var(--accent-ink); font-size: 0.75rem; }
.fd-cbx-b { min-width: 0; }
.fd-cbx-qr { display: grid; place-items: center; width: 128px; height: 128px; margin: 8px auto; border: 2px dashed var(--amber); border-radius: var(--r); background: none; color: var(--ink); font-size: 2.5rem; cursor: pointer; }
.fd-cbx-ask { text-align: center; color: var(--dim); font-size: 0.8125rem; }
.fd-cbx-qrin { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; min-height: 32px; font: inherit; font-size: 0.75rem; background: var(--panel); color: var(--dim); border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 8px; }
.fd-cbx-cam { display: block; width: 100%; max-height: 180px; }
.fd-cbx-said { margin-top: 6px; font-size: 0.8125rem; }
.fd-cbx-wait, .fd-cbx-sub { color: var(--dim); font-size: 0.8125rem; margin: 4px 0 8px; }
.fd-cbx-from { margin: 0 0 4px; font-size: 0.875rem; }
.fd-cbx-tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.fd-cbx-tbl td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fd-cbx-val { text-align: center; }
.fd-cbx-st { color: var(--dim); text-align: center; }
.fd-cbx-st.is-warn { color: var(--amber); }
.fd-cbx-row.is-off .fd-cbx-lab, .fd-cbx-row.is-off .fd-cbx-val { opacity: .45; }
.fd-cbx-own { display: block; margin: 8px 0; font-size: 0.8125rem; }
.fd-cbx-in { display: block; width: 100%; box-sizing: border-box; min-height: 34px; margin: 4px 0; font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 8px; }
.fd-cbx-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fd-cbx-btn { font: inherit; font-size: 0.8125rem; min-height: 32px; padding: 4px 12px; background: none; color: var(--teal); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; }
.fd-cbx-btn.is-go { border-color: var(--teal); }
.fd-cbx-rb { font-size: 0.8125rem; margin: 4px 0; }
.fd-cbx-no { color: var(--red); font-size: 0.8125rem; }
.fd-cbx-key { font-size: 1rem; margin: 4px 0 8px; }
.fd-cbx-bee { color: var(--teal); }
.fd-cbx-code { font-size: 1.25rem; letter-spacing: .1em; margin: 6px 0; }
/* The boxes for what a QR did not share (12 Nov): one labelled box per
   missing fact, side by side while the card is wide enough, stacked when not. */
.fd-cbx-type { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 8px; margin: 8px 0 4px; }
.fd-cbx-tl { display: block; min-width: 0; font-size: 0.8125rem; }
.fd-cbx-tn { display: block; color: var(--dim); font-size: 0.75rem; }
.fd-cbx-tl .fd-cbx-in { margin: 2px 0 0; }
/* The folder-match line and the typed boxes read at the card's size, not the page's. */
.fd-cbx-match { font-size: 0.8125rem; margin: 6px 0; }
.fd-cbx-type .fd-cbx-in, .fd-cbx-other .fd-cbx-in { font-size: 0.8125rem; }
/* Confirm and Back sat touching under the read-back. */
.fd-cbx-said .fd-cbx-btn { margin: 6px 8px 0 0; }
/* 📁 CONNECT FROM THE PATIENT'S FOLDER (12 Nov): the same three cards. They
   stack when the panel is too narrow to hold a card's words. */
.fd-cbx.fd-cbf { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: start; }
.fd-cbf-tile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--teal); border-radius: var(--r); background: var(--panel); font-size: 0.8125rem; }
.fd-cbf-tile.is-empty { justify-content: center; align-items: center; min-height: 44px; border: 2px dashed var(--rule); background: none; color: var(--dim); }
.fd-cbf-tile.is-want { border-color: var(--amber); color: var(--amber); }
.fd-cbf-tile-i { font-size: 1.125rem; }
.fd-cbf-tile-t { font-size: 0.8125rem; }
.fd-cbf-tile-l { color: var(--dim); font-size: 0.75rem; }
.fd-cbf-tile-k { color: var(--ink); font-size: 0.9375rem; overflow-wrap: anywhere; }
.fd-cbf-tile-h { flex-basis: 100%; color: var(--dim); font-size: 0.75rem; }
.fd-cbf-acct { margin: 0 0 6px; font-size: 0.8125rem; overflow-wrap: anywhere; }
.fd-cbf-acct strong { display: inline-block; }
.fd-cbf-tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.fd-cbf-hd { border: 0; }
.fd-cbf-tbl th { padding: 2px 4px 4px; color: var(--dim); font-size: 0.75rem; font-weight: 400; text-align: left; }
.fd-cbf-tbl td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: baseline; }
.fd-cbf-lab { color: var(--dim); }
.fd-cbf-val.is-none { color: var(--dim); font-style: italic; }
.fd-cbf-row.is-diff .fd-cbf-val { color: var(--amber); }
.fd-cbf-mark { color: var(--dim); white-space: nowrap; text-align: right; }
.fd-cbf-mark.is-ok { color: var(--teal); }
.fd-cbf-mark.is-warn { color: var(--amber); }
.fd-cbf-verdict { margin: 8px 0; padding: 6px 8px; border-left: 3px solid var(--rule); font-size: 0.8125rem; color: var(--dim); }
.fd-cbf-verdict.is-same { border-left-color: var(--teal); color: var(--teal); }
.fd-cbf-verdict.is-differs { border-left-color: var(--amber); color: var(--amber); }
.fd-cbf-consent { margin: 10px 0 6px; }
.fd-cbf-lead { margin: 0 0 4px; color: var(--dim); font-size: 0.75rem; }
.fd-cbf-words { margin: 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); color: var(--ink); font-size: 0.875rem; line-height: 1.45; max-height: 220px; overflow: auto; }
.fd-cbf-note { margin: 4px 0 0; color: var(--dim); font-size: 0.75rem; }
.fd-cbf-tick { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; font-size: 0.8125rem; line-height: 1.35; }
.fd-cbf-tick input { flex: none; width: 18px; height: 18px; margin: 0; }
.fd-cbf-tick.is-warn { color: var(--amber); }
.fd-cbf-no { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--red); color: var(--red); font-size: 0.8125rem; line-height: 1.4; }
.fd-cbf-hold { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--amber); color: var(--amber); font-size: 0.8125rem; line-height: 1.4; }
.fd-cbf-done { margin: 4px 0; color: var(--teal); font-size: 0.8125rem; }
.fd-cbf-steps { margin: 8px 0 4px; padding-left: 20px; font-size: 0.8125rem; line-height: 1.4; }
.fd-cbf-steps li { margin: 2px 0; }
.fd-cbf-code { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--teal); border-radius: var(--r); background: var(--panel); color: var(--ink); font-size: 1.25rem; letter-spacing: .08em; text-align: center; overflow-wrap: anywhere; }
.fd-cbf-after { margin: 6px 0 8px; font-size: 0.8125rem; color: var(--ink); }
@media (max-width: 1099px) {
  .fd-cbf-tick input { width: 22px; height: 22px; }
  .fd-cbf .fd-cbx-btn { min-height: var(--tap); }
}
/* ---- FD-5 END ---- */
/* ⚙ SET UP THIS PANEL (12 Nov): the sheet over the waiting room. */
.fd-tool-wide { padding: 0 10px; color: var(--teal); border-color: var(--teal); }
.fdp-sheet { position: absolute; z-index: 30; left: 8px; right: 8px; top: 44px; max-height: calc(100vh - 140px); overflow: auto;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-l); padding: 14px; }
.fd-room-host { position: relative; }
/* 15 Nov (Dr Lau: "pop up card for the stations - let it pop up properly
   showing the full card without scroll"): the waiting room's tools moved
   onto its first row, a narrow strip, and the sheet opened inside it,
   squeezed into tall columns. It pops up over the whole desk now, wide
   enough for its three columns. */
.fd-room-tools .fdp-sheet { position: fixed; z-index: 60; top: 64px; left: 50%; right: auto;
  transform: translateX(-50%); width: min(1180px, calc(100vw - 48px)); max-height: calc(100vh - 88px);
  box-shadow: var(--z2); }
.fdp-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.fdp-x { margin-left: auto; min-width: 32px; min-height: 32px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.fdp-title { letter-spacing: .18em; font-weight: 700; color: var(--teal); font-size: 0.8125rem; }
.fdp-sub, .fdp-note, .fdp-hint, .fdp-said { color: var(--dim); font-size: 0.8125rem; }
.fdp-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fdp-card { border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; background: var(--panel-2); min-width: 0; }
.fdp-h { margin-bottom: 6px; }
.fdp-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); min-height: 36px; }
.fdp-row.is-off .fdp-name, .fdp-row.is-off .fdp-sym { opacity: .55; }
.fdp-fixed .fdp-name { font-weight: 600; }
.fdp-name { color: var(--ink); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdp-meta { color: var(--dim); font-size: 0.8125rem; flex: 1 1 auto; white-space: nowrap; }
.fdp-sym { width: 1.6em; text-align: center; }
.fdp-move { display: inline-flex; gap: 2px; }
.fdp-grip { min-width: 24px; min-height: 24px; border: 0; background: transparent; color: var(--dim); cursor: grab; }
.fdp-grip:disabled { opacity: .3; }
.fdp-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; background: currentColor; padding: 0; cursor: pointer; }
.fdp-switch { margin-left: auto; width: 44px; height: 24px; border-radius: 999px; border: 1px solid var(--rule); background: var(--sunk); position: relative; cursor: pointer; flex: none; }
.fdp-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); }
.fdp-switch.is-on { background: var(--teal); border-color: var(--teal); }
.fdp-switch.is-on::after { left: 23px; background: var(--bg); }
.fdp-addwrap { margin-top: 10px; }
.fdp-add { width: 100%; min-height: 40px; border: 1px dashed var(--teal); border-radius: var(--r); background: transparent; color: var(--teal); cursor: pointer; }
.fdp-addform { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fdp-in { flex: 1 1 120px; min-height: 32px; background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 0 8px; }
.fdp-ok, .fdp-save { min-height: 36px; padding: 0 18px; border: 1px solid var(--teal); border-radius: var(--r); background: transparent; color: var(--teal); cursor: pointer; }
.fdp-preview { margin-top: 12px; }
.fdp-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fdp-tile { min-width: 36px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: 6px; background: var(--sunk); }
.fdp-tile.is-untracked { opacity: .45; border-style: dashed; }
.fdp-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.fdp-bar { margin-top: 10px; }
.fd-st-is-untracked { opacity: 0.25; filter: grayscale(1); outline: 1px dashed var(--rule); outline-offset: -2px; }
@media (max-width: 1099px) { .fdp-cols { grid-template-columns: 1fr; } }
.fda-bill-cover, .fda-bill-adjust { font-size: .875em; padding: 4px 8px; white-space: normal; }
.fda-bill-payer-edit { padding: 2px 5px; margin-left: 4px; min-width: 28px; }
/* ==== fd_acts END ==== */
/* THE S-EMR STATION SYMBOLS (2 Dec, "adopt the symbols in docapp front desk").
   One line symbol and one colour per station, the same as every S-EMR app
   (semr-symbols.css is the s-emr set's own copy; the cell's st-<key> class
   sets --st, the ink, and --st-bg, its pale tint). The colour is the
   station, the fill is the state: solid while the patient is there, pale
   once back, dashed while sent there next, and done stays dull with its
   tick (16 Nov). A station a clinic typed for itself has no --st and keeps
   the borders it had. */
.fd-st-ico { display: inline-flex; align-items: center; justify-content: center; }
.fd-st .st-sym, .fd-ico .st-sym, .fdp-sym .st-sym, .fdp-tile .st-sym { display: block; flex: 0 0 auto; color: var(--st, currentColor); }
.fdp-sym, .fdp-tile { display: inline-flex; align-items: center; justify-content: center; }
.fd-st-is-current:not(.fd-st-act) { background: var(--st, transparent); border-color: var(--st, var(--teal)); }
.fd-st-is-out:not(.fd-st-act) { background: var(--st, var(--sunk)); border-color: var(--st, var(--red)); }
.fd-st-is-current:not(.fd-st-act) .st-sym, .fd-st-is-out:not(.fd-st-act) .st-sym { color: var(--panel); }
.fd-st-is-back { background: var(--st-bg, var(--sunk)); border-color: var(--st, var(--teal)); }
.fd-st-is-next { border-style: dashed; border-color: var(--st, var(--amber)); }
.fd-st-act .fd-ico { border-color: var(--st, currentColor); }
.fd-st-is-current.fd-st-act .fd-ico, .fd-st-is-out.fd-st-act .fd-ico { background: var(--st); border-color: var(--st); }
.fd-st-is-current.fd-st-act .fd-ico .st-sym, .fd-st-is-out.fd-st-act .fd-ico .st-sym { color: var(--panel); }
/* THE DOCTOR'S WAITING ROOM IN THE SAME SYMBOLS (2 Dec, "adopt the symbols
   in the doctor's waiting room too"). A reason, a route stop or a journey
   tile that stands for a station draws the set's symbol in that station's
   ink; the reasons that are a state of the note keep their emoji. Sized in
   em, so the desktop's larger type (1100px and wider) carries the symbol with
   it, and inline, so the wait beside the station keeps its space. The
   tiles' own states (ticked green, due amber, not yet grey) are unchanged. */
.wr-sym .st-sym, .wr-stop .st-sym, .wr-jt .st-sym { display: inline-block; vertical-align: -0.2em; color: var(--st, currentColor); }
.wr-sym .st-sym { width: 1.2em; height: 1.2em; }
.wr-stop .st-sym, .wr-jt .st-sym { width: 1.15em; height: 1.15em; }

/* ==== fd_left BEGIN (LE-50) ==== */
/* ── the front desk's left corners (LE-50, Parcel D) — the waiting room and
   what patients have sent in ─────────────────────────────────────────────
   Every base class here (.fd-row, .fd-who, .fd-sub, .fd-btn, .fd-primary,
   .fd-readback, .fd-readback-line, .fd-ok, .fd-warnline, .fd-note,
   .fd-hint, .fd-input, .fd-h2, .fd-list, .fd-row-quiet) is already defined
   in app/frontdesk/index.html's own <style> block, because this corner
   renders on the SAME page as the stacked view (LE-50 §2: one URL, two
   widths). What follows is only the classes this parcel's two files
   introduce that the shared block does not carry -- values off the
   clinic's own tokens (app.css's :root), nothing invented. */

/* Left lower's one honest line: "this clinic does not scan files for
   viruses or read their text automatically" -- said once, quietly, rather
   than a badge on every row implying a check that never ran
   (console_deskdocs.py's own docstring: "draw nothing that implies a file
   has been scanned"). A left rule marks it as a standing fact about the
   screen, not a warning about any one file. */
.fd-doc-hint {
  border-left: 2px solid var(--line);
  padding-left: 9px;
  margin: 0 0 10px;
}

/* Spacing under the hint, above the Waiting/Filed/Withdrawn sections --
   nothing else about the corner's own layout, which is the frame's
   (LE-50, Parcel A). */
.fd-doc-body { margin-top: 2px; }

/* The one write this screen offers, under a held-and-unnamed row: the
   input-and-button row (.fd-form, already defined) plus the read-back
   that follows it (.fd-readback, already defined) -- this wrapper only
   spaces the two apart from the row above. */
.fd-doc-name { margin-top: 8px; }

/* A patient reference reads as a code, not a sentence, and this corner is
   narrower than the stacked page's 860px card -- 220px (.fd-input's own
   flex-basis) is too wide to sit beside a button in a quarter of a
   desktop screen. */
.fd-doc-input {
  flex: 1 1 140px;
  font-family: var(--mono);
  font-size: 12.5px;
}

/* TOMBSTONED, NEVER ERASED. A withdrawn document keeps its row; this is
   the one visual difference between it and a live one -- struck through,
   not hidden, not greyed to the point of unreadable. */
.fd-doc-struck {
  text-decoration: line-through;
  opacity: .78;
}

/* THE DESK FILES, CLASSIFIED (2 October, Dr Lau's ruling): "File it" opens
   the two steps -- the group, then the test -- under the row, as the
   approved design draws them: numbered kickers, choices that wrap, and the
   one picked marked by its fill as well as its edge. */
.fd-doc-file { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.fd-doc-step { letter-spacing: .06em; text-transform: uppercase; }
.fd-doc-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-doc-choice[aria-pressed="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--bg);
  font-weight: 700;
}
.fd-doc-chip { border-radius: 999px; }
.fd-doc-when { display: flex; align-items: center; gap: 8px; }
.fd-doc-file-open { margin-left: 8px; }
/* ==== fd_left END ====

/* ==== fd_right BEGIN (LE-50) ==== */
/* ── fd_right.css — the front desk's right corners (LE-50, Parcel E) ──────
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the eight
   files the integrator alone touches; this text is folded into it (or into
   the desk's own inline stylesheet in app/frontdesk/index.html — the
   integrator's call, per the letter, the same choice Parcel B's own
   fd_sched.css leaves open) under a marker.

   THIS IS A NEW BLOCK, NOTHING IS APPENDED INTO ANOTHER FRAGMENT'S SLICE.
   Every class below is new (`fd-wk-` for the right-lower "desk's own work"
   screen, `fd-bot-` for the right-upper "what the bot has sent" screen —
   chosen so neither collides with app/frontdesk.js's existing `fd-*`
   classes, `fd-sc-` from Parcel B's central schedule, or whatever prefix
   Parcels A/C/D chose), so there is no existing rule block to extend and
   nothing here restyles a class another screen already owns. LE-48's own
   lesson is why this matters: a marker-to-EOF fragment reader swallows
   whatever is appended after the last marker into the PREVIOUS parcel's
   slice, so this is written to be folded as its own marker-bounded block,
   never tacked onto end-of-file where some other fragment's reader ends.

   EVERY TOKEN BELOW IS ONE app/app.css:6-45 DEFINES (measured against that
   exact range) — none is invented, and none is a literal hex or rgba of
   this file's own choosing. --red / --red-ink mark an overdue job and a
   refusal, the same pair the rest of this console uses for an alert;
   --teal marks the one primary action (settle); --dim / --dimmer / --faint
   step down for a count, a sub-line and an empty state, in the order the
   rest of the app already uses them. --line / --line-soft / --hush are the
   three border weights already in use elsewhere (app/requests.js's own
   inline styles, app/frontdesk/index.html's `.fd-card`), so a border here
   reads as the same weight of line as everything beside it.

   THE "GAP" SECTIONS (`.fd-wk-gap`) ARE DELIBERATELY QUIET. Dr Lau asked
   for jobs grouped by source and by type; neither field exists on a task
   today (console_deskwork.py's own docstring, "ON HIS SOURCES AND HIS
   TYPES"), so these two blocks are named, present and empty rather than
   populated with invented data — a dashed top border and the dimmest two
   tokens in the palette, so the eye reads them as "not live" without a
   second colour being invented for the purpose.

   THE BOT'S "NOT AVAILABLE" TAG USES --amber, NOT --red. It is not a
   refusal or a fault — there genuinely is no live chat room anywhere in
   this system to be unavailable FROM — so it is marked with the same
   caution tone the rest of this console reserves for "notable, not
   broken", never the alert colour a real error gets. */

/* ── fd-wk- : the desk's own work (right lower) ─────────────────────────── */
.fd-wk-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fd-wk-title { font-weight: 700; font-size: 13px; }
.fd-wk-count { font-size: 11px; color: var(--dim); margin-left: auto; }
.fd-wk-none { color: var(--faint); font-size: 11.5px; }

.fd-wk-group { margin-bottom: 14px; }
.fd-wk-group-t {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); margin-bottom: 6px;
}
.fd-wk-list { list-style: none; margin: 0; padding: 0; }
.fd-wk-task {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line-soft);
}
.fd-wk-task:first-child { border-top: 0; }
.fd-wk-task-main { flex: 1 1 auto; min-width: 0; }
.fd-wk-task-who { font-weight: 650; margin-right: 6px; }
.fd-wk-task-what { color: var(--ink-2); }
.fd-wk-task-sub { font-size: 10.5px; color: var(--dimmer); margin-top: 2px; }
/* colour is never the only cue -- an overdue row also gets a left rule, so
   it is readable without relying on the red/ink contrast alone. */
.fd-wk-overdue { border-left: 2px solid var(--red); padding-left: 8px; }
.fd-wk-overdue .fd-wk-task-sub { color: var(--red-ink); }
/* AN ORDER'S SPECIAL INSTRUCTION (2 Oct): amber, and SAID in words --
   "Special instruction:" leads the line, so colour is never the only cue. */
.fd-wk-instr { font-size: 12px; color: var(--amber-ink); margin-top: 3px;
  border-left: 2px solid var(--amber); padding-left: 6px; }
.fd-wk-instr-k { font-weight: 650; color: var(--amber); }

.fd-wk-btn {
  font: inherit; font-size: 12.5px; padding: 5px 10px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: inherit; flex: 0 0 auto;
}
.fd-wk-btn:disabled { opacity: .55; cursor: default; }
/* An imaging job is ARRANGED: walk in, or pre-arrange with when and where. */
.fd-wk-arrange { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fd-wk-when { font: inherit; font-size: 12.5px; padding: 5px 7px; border-radius: 6px; min-width: 0;
  flex: 1 1 220px; border: 1px solid var(--rule); background: var(--sunk); color: var(--ink); }
.fd-wk-primary { border-color: var(--teal); color: var(--teal); font-weight: 650; }

.fd-wk-undo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line-soft);
}

.fd-wk-said { margin-top: 10px; font-size: 12px; }
.fd-wk-said.ok { color: var(--teal); }
.fd-wk-said.no { color: var(--red-ink); }

/* A JOB THAT WAITS ON SEVERAL PEOPLE (1 October, the desk task design).
   The lane headings, the state chip -- words first, colour second, so a
   late job reads as late without the red -- the step log and its two forms. */
.fd-wk-lane-t {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--label); margin: 14px 0 8px; padding-top: 8px; border-top: 1px solid var(--line);
}
.fd-wk-chip {
  display: inline-block; font-size: 11px; padding: 1px 7px; margin-left: 6px;
  border-radius: 999px; border: 1px solid var(--rule); color: var(--dim); white-space: nowrap;
}
.fd-wk-chip.late { border-color: var(--red); color: var(--red-ink); }
.fd-wk-chip.wait { border-color: var(--amber); color: var(--amber-ink); }
.fd-wk-chip.ok, .fd-wk-chip.desk { border-color: var(--teal); color: var(--teal); }
.fd-wk-steps { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--sunk); display: grid; gap: 10px; }
.fd-wk-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fd-wk-log-row { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.fd-wk-log-when { flex: 0 0 74px; font-size: 11.5px; color: var(--dimmer); }
.fd-wk-log-did { min-width: 0; }
.fd-wk-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fd-wk-form[hidden] { display: none; }
.fd-wk-form-t { flex: 0 0 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); }
.fd-wk-sel, .fd-wk-date { font: inherit; font-size: 12.5px; padding: 5px 7px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--sunk); color: var(--ink); min-width: 0; }
/* Answering an insurer (19 Oct, insureranswer.js): the box keeps the desk's own type. */
textarea.fd-ins-answer-text { box-sizing: border-box; width: 100%; min-height: 66px; font: inherit; padding: 5px 7px; border-radius: 6px; resize: vertical; }
.fd-wk-hint { flex: 0 0 100%; font-size: 12px; color: var(--amber-ink); }
.fd-wk-add { margin-bottom: 10px; display: grid; gap: 8px; }
/* BEFORE YOU CLOSE (1 October, part 4): from 17:00, at the top of the list.
   Boxed and amber-ruled so it reads as the day's summary, not one more job;
   each row keeps its words-first chip, so late reads as late without red. */
.fd-wk-de { margin-bottom: 12px; padding: 8px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 8px; background: var(--sunk);
  display: grid; gap: 6px; }
.fd-wk-de-t { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--label); }
.fd-wk-de-line { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.fd-wk-de-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px;
  padding: 4px 2px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.fd-wk-de-row:first-child { border-top: 0; }

/* THE OUTSTANDING SUMMARY (2 October, Dr Lau: "make it prominent"). The
   button's face carries what is due now; its state is said in words (the
   title) and in colour together. The pop-up is a plain dialog over a shade. */
.fd-sum-btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  padding: 8px 14px; min-height: 44px; border-radius: 10px;
  border: 2px solid var(--teal); background: var(--sunk); color: var(--ink);
}
.fd-sum-btn[data-state="due"] { border-color: var(--amber); }
.fd-sum-btn[data-state="late"] { border-color: var(--red); }
.fd-sum-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fd-sum-badge {
  min-width: 26px; height: 26px; padding: 0 7px; box-sizing: border-box;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--teal); color: var(--bg);
}
.fd-sum-btn[data-state="due"] .fd-sum-badge { background: var(--amber); }
.fd-sum-btn[data-state="late"] .fd-sum-badge { background: var(--red-solid); color: #fff; }
.fd-sum-shade {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px;
}
.fd-sum-box {
  width: min(640px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px;
}
.fd-sum-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 8px; }
.fd-sum-title { margin: 0; font-size: 18px; flex: 1 1 auto; }
.fd-sum-x {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule);
  background: transparent; color: var(--ink-2); font-size: 18px; cursor: pointer;
}
.fd-sum-days { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 18px 12px; border-bottom: 1px solid var(--line); }
.fd-sum-days-t { font-size: 13px; color: var(--dim); }
.fd-sum-day {
  min-width: 40px; min-height: 40px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
}
.fd-sum-day[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: var(--bg); font-weight: 700; }
.fd-sum-body { overflow: auto; padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.fd-sum-h { margin: 6px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--label); }
.fd-sum-h.is-late { color: var(--red-ink); }
.fd-sum-list { list-style: none; margin: 0; padding: 0; }
.fd-sum-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line-soft); }
.fd-sum-row:first-child { border-top: 0; }
.fd-sum-row.is-late { border-left: 2px solid var(--red); padding-left: 8px; }
.fd-sum-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fd-sum-who { font-size: 12.5px; color: var(--ink-2); }
.fd-sum-what { font-size: 14px; }
.fd-sum-sub { font-size: 12px; color: var(--dim); }
.fd-sum-late { font-size: 12px; color: var(--red-ink); white-space: nowrap; }
.fd-sum-none, .fd-sum-later { margin: 6px 0; font-size: 13px; color: var(--dim); }

/* the two honest gaps -- present, named, empty (see the header note) */
.fd-wk-gap { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fd-wk-gap-t {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dimmer); margin-bottom: 6px;
}
.fd-wk-gap-list { list-style: none; margin: 0; padding: 0; }
.fd-wk-gap-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 3px 2px;
  font-size: 11.5px; color: var(--dim);
}
.fd-wk-tag {
  font-size: 9.5px; letter-spacing: .04em; color: var(--dimmer);
  border: 1px solid var(--hush); border-radius: 5px; padding: 1px 6px;
  white-space: nowrap; flex: 0 0 auto;
}

/* ── fd-bot- : what the bot has sent (right upper) ──────────────────────── */
.fd-bot-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fd-bot-title { font-weight: 700; font-size: 13px; }

.fd-bot-dim {
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 10px 11px; margin-bottom: 14px; background: var(--panel-2);
}
.fd-bot-dim-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fd-bot-dim-t { font-weight: 650; color: var(--dim); }
/* amber, not red -- named in the file header: this is not a fault. */
.fd-bot-tag {
  font-size: 9.5px; letter-spacing: .04em; color: var(--amber-ink);
  border: 1px solid var(--amber); border-radius: 5px; padding: 1px 6px;
  white-space: nowrap;
}
.fd-bot-dim-note { font-size: 11.5px; color: var(--dimmer); margin: 0; line-height: 1.5; }
/* ==== fd_right END ==== */

/* ==== fd_chat BEGIN (LE-52, Parcel C) ====
   ABOVE the chat sections, for the reason the LE-50 block above says:
   verify_console_chatenc slices chatenc's fragment marker-to-EOF, so
   anything appended after the last chat marker is swallowed into it and
   judged by its purity rules. ==== */
/* ── fd_chat.css — the front desk's live chat room (LE-52, Parcel C) ─────
   A FRAGMENT, NOT A SECOND STYLESHEET. `app/app.css` is one of the eight
   files the integrator alone touches (LE-50/LE-52's own rule); this text
   is folded into it under its own marker.

   THIS IS A NEW BLOCK, NOTHING IS APPENDED INTO ANOTHER FRAGMENT'S SLICE.
   Every class below is new, under `fd-chat-` — chosen so it collides with
   none of `fd-wk-`/`fd-bot-` (fd_right.css, LE-50 Parcel E), `fd-sc-`
   (Parcel B's schedule), the bare `fd-*` classes `app/frontdesk.js` and
   `app/frontdesk/index.html` already own, or whatever prefix Parcels A/D
   of LE-52 chose for the store's doors and the folder's own screens. So
   there is no existing rule block to extend, and this is written to be
   folded as its own marker-bounded region rather than tacked onto
   end-of-file — LE-48/LE-49's own lesson, that a marker-to-EOF fragment
   reader swallows whatever is appended after the LAST marker into the
   PREVIOUS parcel's slice, applies here exactly as it did there.

   EVERY TOKEN BELOW IS ONE app/app.css:6-45 DEFINES (measured against
   that exact range) — none is invented, and none is a literal hex or
   rgba of this file's own choosing:

     --teal / --teal-2   the caller's own turns (a real person, given the
                          console's one "this matters" colour), and the
                          "collected" reply state (informative, not an
                          alert)
     --amber / --amber-ink  the "held, waiting" reply state — caution,
                          not fault, the same tone fd_right.css already
                          uses for "not available"
     --red-ink            a refusal or an unreadable door — this console's
                          one alert tone, used nowhere else in this file
     --dim / --dimmer / --faint  a count, a sub-line, an empty state, and
                          the bot's own (automated, lower-emphasis) turns
                          — the same step-down order every other screen in
                          this app already uses them in
     --hush / --line / --line-soft  the three border weights already in
                          use elsewhere (fd_right.css's own note: these are
                          the SAME three weights, not a fourth invented
                          here)
     --sunk                the one token meant for exactly this: "sunken
                          input/control ground" (app/app.css:26) — the
                          reply textarea's own background, so a place to
                          type reads as a control and not as another card
     --panel / --panel-2   row and card backgrounds, matching every other
                          list in this app
     --r                   the corner radius every card/control in this
                          console already uses

   COLOUR IS NEVER THE ONLY CUE, this estate's own standing rule
   (fd_right.css's own comment on `.fd-wk-overdue`, and CLAUDE.md's own
   "assert the property" family of lessons applied to design rather than
   to code). A caller's turn and the bot's turn are told apart by a text
   label ("Caller" / "Bot") AND a left border; "live" and "ended" are told
   apart by the tag's own WORD and by colour together; the held-reply and
   collected-reply states are two different SENTENCES, not two colours
   standing in for one. */

/* ── the shell --------------------------------------------------------- */
.fd-chat-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.fd-chat-title { font-weight: 700; font-size: 13px; }
.fd-chat-count { font-size: 11px; color: var(--dim); margin-left: auto; }

/* THE ONE HONEST LINE, SAID ONCE. Quiet on purpose -- it is context, not
   a warning, so it takes the dimmest legible tone rather than the alert
   or caution colours below. */
.fd-chat-honest {
  font-size: 11px; line-height: 1.5; color: var(--dim);
  margin: 0 0 12px; padding: 8px 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--panel-2);
}

.fd-chat-body { min-height: 0; }
.fd-chat-empty { color: var(--faint); font-size: 11.5px; }
.fd-chat-warn { color: var(--red-ink); font-size: 12px; }

/* ── the listing ---------------------------------------------------------- */
.fd-chat-list { list-style: none; margin: 0; padding: 0; }
.fd-chat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-top: 1px solid var(--line-soft);
}
.fd-chat-row:first-child { border-top: 0; }
.fd-chat-row-main { flex: 1 1 auto; min-width: 0; }
.fd-chat-row-about { color: var(--ink-2); }
.fd-chat-row-sub {
  font-size: 10.5px; color: var(--dimmer); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* live vs ended — a word AND a colour, never the colour alone */
.fd-chat-tag {
  font-size: 9.5px; letter-spacing: .04em; border-radius: 5px;
  padding: 1px 6px; white-space: nowrap; flex: 0 0 auto;
}
.fd-chat-tag-open { color: var(--teal-2); border: 1px solid var(--teal); }
.fd-chat-tag-ended { color: var(--dimmer); border: 1px solid var(--hush); }
.fd-chat-tag-held { color: var(--amber-ink); border: 1px solid var(--amber); }
.fd-chat-held {
  margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ── one open conversation -------------------------------------------- */
.fd-chat-back {
  display: block; background: transparent; border: 0; cursor: pointer;
  color: var(--dim); font: inherit; font-size: 12px; padding: 2px 0 10px;
}

.fd-chat-conv-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
}
.fd-chat-conv-about { color: var(--ink); font-weight: 600; }

.fd-chat-turns { list-style: none; margin: 0 0 12px; padding: 0; }
.fd-chat-turn {
  padding: 6px 0 6px 9px; margin-bottom: 4px;
  border-left: 2px solid var(--hush);
}
/* the caller is the one turn this desk exists to notice */
.fd-chat-turn-caller { border-left-color: var(--teal); }
.fd-chat-turn-bot { border-left-color: var(--hush); }
.fd-chat-turn-head { display: flex; align-items: baseline; gap: 8px; }
.fd-chat-turn-who { font-size: 10.5px; font-weight: 650; color: var(--dim); }
.fd-chat-turn-bot .fd-chat-turn-who { color: var(--dimmer); }
.fd-chat-turn-at { font-size: 10px; color: var(--dimmer); }
.fd-chat-turn-said { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.fd-chat-turn-bot .fd-chat-turn-said { color: var(--dim); }

/* ── the reply ------------------------------------------------------------ */
.fd-chat-reply { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px; }

.fd-chat-reply-status { font-size: 11.5px; margin: 0 0 4px; }
.fd-chat-reply-wait { color: var(--amber-ink); }
.fd-chat-reply-collected { color: var(--teal-2); }
.fd-chat-reply-quote {
  font-size: 11.5px; font-style: italic; color: var(--dim);
  margin: 0 0 8px; padding-left: 8px; border-left: 2px solid var(--amber);
}

.fd-chat-input {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink); font: inherit;
  font-size: 13px; padding: 8px 10px; margin-bottom: 8px;
}
.fd-chat-input::placeholder { color: var(--dimmer); }

.fd-chat-btn {
  font: inherit; font-size: 12.5px; padding: 6px 12px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: inherit;
}
.fd-chat-btn:disabled { opacity: .55; cursor: default; }
.fd-chat-primary { border-color: var(--teal); color: var(--teal); font-weight: 650; }

.fd-chat-said { margin-top: 8px; font-size: 12px; }
.fd-chat-said.ok { color: var(--teal); }
.fd-chat-said.no { color: var(--red-ink); }
/* ==== fd_chat END ==== */

/* Console readability, 4 Oct 2026. Decorative separators stay quieter than
   control edges; state is expressed by colour, border style and existing
   labels instead of fading the entire control and its text. Frontdesk has
   its own scoped rules and keeps the contrast already deployed there. */
body:not(.fd-console), :root[data-theme="day"] body:not(.fd-console) {
  background: var(--bg); color: var(--ink);
}
body:not(.fd-console) :is(button, input, select, textarea) { border-color: var(--rule); }
body:not(.fd-console) :is(.who.is-btn, .apptbar, .deskenc .dk-enc-more) { border-color: var(--rule); }
body:not(.fd-console) :is(.dk-car-tab.is-on, .sd-nav.is-on, .dk-act.is-done) { border-color: var(--teal); }
body:not(.fd-console) .apptbar.has { border-color: var(--amber); }
body:not(.fd-console) .prefs-form .su-in { color-scheme: inherit; }
body:not(.fd-console) :is(input, textarea)::placeholder { color: var(--dimmer); opacity: 1; }
body:not(.fd-console) :is(button, input, select, textarea):focus-visible,
body:not(.fd-console) summary:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}
body:not(.fd-console) :is(button, input, select, textarea):disabled {
  opacity: 1 !important; color: var(--dimmer); border-color: var(--rule); background: var(--panel-2);
  border-style: dashed; cursor: not-allowed;
}
body:not(.fd-console) :is(.sect.nomic, .rec-out, .tick-off, .pt-settled,
  .su-route.is-off, .home-key-away, .dk-sheet-k.away, .dk-doc.away,
  .dk-act.is-off, .ci-desk.is-off, .recbtn.dis, .ut-med.is-gone,
  .fl-form.fl-dim, .cho-quiet, .cho-away, .ch-key.ch-away, .ce-type.is-dim,
  .report-host [aria-busy="true"], .ph-tile.dimmed, .ph-row.dimmed,
  .ph-chip.dimmed, .ph-btn.dimmed, .rv-collect.dimmed, .rv-unit.dimmed,
  .rv-dim, .tl-nb-b, .ph-band.now-nb, #patients .is-retired) { opacity: 1; }
body:not(.fd-console) :is(.ph-mo .d.out, .fd-section-body .is-gone .fo-enc-l,
  .fd-section-body .is-off .fo-m-n) { opacity: 1; color: var(--dimmer); }
body:not(.fd-console) :is(.btn-primary, .pill-teal, .pill-ok, .study.open,
  .pr-level[aria-pressed="true"], .pr-mode.on, .pr-section.on,
  .cs-tab.is-active, .st-tab.is-active) { border-color: var(--teal); }
body:not(.fd-console) :is(.pill-alert, .pill-rec) { border-color: var(--red); color: var(--red-ink); }
/* The allergy on the patient band is white on its red (5 Dec: the rule above
   made it red on red, 1.36:1 in the day theme). */
body:not(.fd-console) .pband .pill-alert { color: #fff; }
body:not(.fd-console) .pill-unasked { border-color: var(--amber); }
body:not(.fd-console) :is(.pr-primary:enabled, .procedure-host .pr-template-save:enabled) { color: var(--accent-ink); }
body:not(.fd-console) .procedure-workspace .pr-family { border-color: var(--rule); }

/* ── the memo types, and what each tells the model ─────────────────────── */
/* A card per memo: its name, and the instruction handed to the model when a
   memo of that kind is written. The box is wide and tall because what goes
   in it is a paragraph of instruction, not a label -- the shipped ones run
   to forty words. */
.memosview { padding: 12px 16px 28px; }
.mm-sub { color: var(--dim); font-size: 13.3px; margin: 2px 0 14px; max-width: 62ch; }
.mm-card { background: var(--sunk); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.mm-card.is-edited { border-left: 3px solid var(--amber); }
.mm-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mm-name { flex: 1; min-width: 0; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px;
  font-size: 14px; font-weight: 600; }
.mm-l { display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--dim); margin-bottom: 4px; }
.mm-intent { width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 10px; font-size: 13.3px; line-height: 1.45; }
.mm-foot { display: flex; gap: 8px; margin-top: 8px; }
/* 44px of hit area without drawing 44px -- the same transparent ::before the
   desktop's other small controls use, centred and never over a neighbour. */
.mm-b { position: relative; border-radius: 7px; padding: 7px 14px; font-size: 13.3px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.mm-b::before { content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 44px; }
.mm-save { border-color: var(--teal); color: var(--teal); }
.mm-undo { color: var(--dim); }
.mm-say { margin-top: 8px; font-size: 12.5px; color: var(--amber); }
/* WHAT STANDS NOW, beside what would replace it -- the 422's own read-back. */
.mm-was { color: var(--dim); font-size: 12.5px; white-space: pre-wrap; }
.mm-now { color: var(--amber); font-size: 12.5px; margin-top: 3px; }
.mm-add { border-style: dashed; }
.mm-add-t { font-weight: 600; margin-bottom: 8px; }
.mm-add .mm-name { margin-bottom: 8px; }

/* ── Outside work (app/outside.js, 30 Sep) ───────────────────────────────
   The packaged app's alone; every rule is scoped to its own region, and the
   page borrows the phone's .ph- vocabulary for everything but its fields. */
.outsideview .ow-page { display: flex; flex-direction: column; gap: 10px; padding: 8px 12px 24px; overflow-y: auto; min-height: 0; }
.outsideview .ow-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outsideview .ow-bigbtn { min-height: 120px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.outsideview .ow-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.outsideview .ow-fld .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dimmer); }
.outsideview .ow-in { min-height: var(--tap, 44px); width: 100%; box-sizing: border-box; padding: 0 10px; border-radius: var(--r, 8px); border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 15px; min-width: 0; }
.outsideview .ow-line, .outsideview .ow-own, .outsideview .ow-visit, .outsideview .ow-addpayer, .outsideview .ow-addclinic { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.outsideview .ow-line .ow-in, .outsideview .ow-own .ow-in { flex: 1 1 120px; }
.outsideview .ow-line .ow-in[type="number"], .outsideview .ow-own .ow-in[type="number"] { flex: 0 1 96px; }
.outsideview .ow-hits { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.outsideview .ow-hit { min-height: var(--tap, 44px); text-align: left; }
.outsideview .ow-note { color: var(--dim); }
.outsideview .ow-say.bad { color: var(--red-ink); }
.outsideview .ow-say.ok { color: var(--teal); }
.outsideview .ph-chip.on { border-color: var(--teal); color: var(--teal); }
.outsideview .ow-save, .outsideview .ow-stmts, .outsideview .ow-shoot { flex: 0 0 auto; width: 100%; }
.outsideview .ow-figs { font-size: 12px; color: var(--dim); }
.outsideview .ow-paid .ow-sthead { color: var(--teal); }
.outsideview .ow-part .ow-sthead { color: var(--amber-ink); }
.outsideview .ow-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.now-outside .ow-entry { width: 100%; flex: 0 0 auto; }

/* ── Fee references, under Settings (2 October) ── */
/* The MOH benchmarks and the Shield plan rates, each edition with the day it
   takes effect. The prefix is `fr-`, grepped against app/app.css first. */
.fr-intro { font-size: 12.5px; color: var(--dim); margin-bottom: 10px; max-width: 72ch; }
.fr-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--rule); border-radius: 10px; }
.fr-h { font-weight: 600; font-size: 14px; }
.fr-blurb { font-size: 12px; color: var(--dim); }
.fr-ver { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rule); }
.fr-ver.is-live { border-color: var(--teal); }
.fr-ver-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fr-when { font-weight: 600; font-size: 13px; }
.fr-tag { font-size: 10.5px; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--rule); color: var(--dim); }
.fr-tag.is-live { color: var(--teal); border-color: var(--teal); }
.fr-what { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.fr-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.fr-up { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--rule); }
.fr-up-h { font-size: 12.5px; font-weight: 600; }
.fr-up .or-field { max-width: 220px; }
.fr-hint { font-size: 11px; color: var(--dim); }
.fr-up > .btn { align-self: flex-start; }
.fr-ver .ask-line:empty { display: none; }
/* A phone: the listing's two columns become one, and the search hits stay
   inside it rather than reaching across a column that is no longer there. */
@media (max-width: 700px) {
  .or-cols { grid-template-columns: minmax(0, 1fr); }
  .or-cols .or-hits:not(:empty) { right: 0; }
}

/* ── Desk coordination: one patient's desk folder page (3 October) ── */
/* Dr Lau's ruling 7: a DESK-ONLY folder page, and the same section in his
   folder. A side panel over the board or the folder; the rows inside are
   fddocs', fdwork's and fdproc's own, styled where they always were. The
   prefix is `dfc-`, grepped against app/app.css first. */
.dfc-bell {
  min-width: 36px; min-height: 36px; margin-left: 6px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--rule); background: transparent; color: var(--teal);
  font-size: 15px; cursor: pointer; vertical-align: middle;
}
.dfc-bell:focus-visible, .dfc-x:focus-visible, .dfc-open:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}
.dfc-shade {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5);
  display: flex; justify-content: flex-end;
}
.dfc-panel {
  width: min(500px, 100%); height: 100%; box-sizing: border-box; overflow: auto;
  display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  border-left: 1px solid var(--rule);
}
.dfc-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--rule);
}
.dfc-head-words { flex: 1 1 auto; min-width: 0; }
.dfc-title { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.dfc-sub { margin: 4px 0 0; font-size: 13px; color: var(--dim); line-height: 1.45; }
.dfc-x {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--rule);
  background: transparent; color: var(--ink-2); font-size: 18px; cursor: pointer;
}
.dfc-body { padding: 14px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.dfc-kind {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 10px; background: var(--panel);
}
.dfc-kind-chip {
  font-size: 11px; letter-spacing: .08em; padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--teal); color: var(--teal);
}
.dfc-kind-chip.is-new { background: var(--teal); color: var(--bg); }
.dfc-kind-t { font-size: 13px; color: var(--ink-2); }
.dfc-clash {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--amber);
}
.dfc-clash.is-firm { border-color: var(--red); }
.dfc-clash-t { font-size: 14px; font-weight: 700; color: var(--amber-ink); }
.dfc-clash.is-firm .dfc-clash-t { color: var(--red-ink); }
.dfc-clash-list { margin: 0; padding-left: 18px; }
.dfc-clash-line { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.dfc-sec { display: flex; flex-direction: column; gap: 8px; }
.dfc-sec-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dfc-sec-t { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--label); }
.dfc-sec-n { font-size: 11px; color: var(--amber-ink); }
.dfc-none { margin: 0; font-size: 13px; color: var(--dim); }
.dfc-warn { color: var(--amber-ink); }
.dfc-docs, .dfc-jobs { margin: 0; padding: 0; }
.dfc-ticks { display: flex; flex-wrap: wrap; gap: 6px; }
.dfc-open { display: inline-flex; align-items: center; gap: 8px; }
.dfc-badge {
  min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--teal); color: var(--bg);
}
.dfc-open[data-state="open"] .dfc-badge { background: var(--amber); }
.dfc-open[data-state="clash"] .dfc-badge { background: var(--red-solid); color: #fff; }
@media (max-width: 700px) {
  .dfc-head, .dfc-body { padding-left: 16px; padding-right: 16px; }
}

/* Preferences: a focused form within the existing settings shell. */
.prefs-host { width: 100%; box-sizing: border-box; }
.prefs-form { max-width: 800px; margin: 0 auto; padding: 24px 20px 12px;
  color: var(--ink); font-family: system-ui, -apple-system, sans-serif; }
.prefs-intro { margin: 0 0 28px; color: var(--dim); font-size: 15px; line-height: 1.6; }
.prefs-section { padding: 24px; margin-bottom: 20px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); }
.prefs-heading { margin: 0 0 6px; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.prefs-description { margin: 0 0 22px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.prefs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 24px; }
.prefs-field { min-width: 0; }
.prefs-full { grid-column: 1 / -1; }
.prefs-label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.prefs-form .su-in { display: block; width: 100%; min-height: 46px; padding: 11px 13px;
  background: var(--sunk); border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink); font: 15px system-ui, -apple-system, sans-serif; color-scheme: dark; }
.prefs-form .su-in::placeholder { color: var(--dimmer); opacity: 1; }
.prefs-form .su-in:focus-visible, .prefs-form button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.prefs-help { color: var(--dim); font-size: 13px; line-height: 1.6; margin: 10px 0 0; }
.prefs-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0 8px; border-top: 1px solid var(--line); }
.prefs-status { color: var(--dim); font-size: 13px; }
.prefs-actions { display: flex; gap: 10px; }
.prefs-form .btn { min-height: 44px; padding: 10px 18px; border-radius: 8px; font: 500 14px system-ui, sans-serif; }
.prefs-form .prefs-cancel { color: var(--ink-2); border: 1px solid var(--rule); background: transparent; }
.prefs-form .prefs-save { background: var(--teal); color: var(--accent-ink); border: 1px solid var(--teal); }
.prefs-form .btn:disabled { opacity: .5; cursor: default; }
.prefs-form .ask-q { white-space: pre-line; color: var(--ink); line-height: 1.6; }
.prefs-form .ask-line:not(:empty) { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
@media (max-width: 620px) {
  .prefs-form { padding: 16px 4px 8px; }
  .prefs-section { padding: 20px 16px; }
  .prefs-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .prefs-footer { flex-wrap: wrap; }
  .prefs-actions { width: 100%; }
  .prefs-actions .btn { flex: 1; }
}

/* Group the spine catalogue for scanning without changing encounter ticks. */
.pr-category { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pr-category-title { margin: 0 0 14px; color: var(--ink); font: 600 17px system-ui, sans-serif; }
.pr-category .pr-row { border-bottom: 1px solid var(--line); padding: 4px 0; }
.pr-category .pr-row:last-child { border-bottom: 0; }
.pr-category .pr-tick { min-height: 44px; color: var(--ink-2); text-align: left; line-height: 1.5; }
.pr-category .pr-tick:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pr-category .pr-tick:disabled { opacity: .65; cursor: default; }

.pr-category .pr-tick.on { color: var(--teal); }

.pr-procedure { padding: 5px 0 9px; border-bottom: 1px solid var(--line); }
.pr-procedure:last-child { border-bottom: 0; }
.pr-procedure .pr-row { border-bottom: 0; }
.pr-tosp { margin: 7px 12px 0; color: var(--dim); font: 13px system-ui, sans-serif; }
.pr-tosp summary { cursor: pointer; min-height: 32px; line-height: 1.6; }
.pr-tosp summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pr-tosp-note, .pr-tosp-source { line-height: 1.6; margin: 8px 0; }
.pr-tosp-candidate { border-left: 2px solid var(--teal); padding: 8px 12px; margin: 8px 0; }
.pr-tosp-candidate strong { color: var(--ink); }
.pr-tosp-candidate p { margin: 6px 0 0; line-height: 1.5; }
.pr-tosp-source { color: var(--dim); font-size: 12px; }

/* A shared tile and disclosure vocabulary for clinic settings and reports.
   Native details/summary keeps mouse, touch and keyboard behaviour together. */
.report-host, .procedure-host { box-sizing: border-box; width: 100%; max-width: 1160px;
  margin: 0 auto; padding: 24px; color: var(--ink); font-family: system-ui, -apple-system, sans-serif;
  container-type: inline-size; }
.sd-tabbed .sd-panel-b.report-host, .sd-tabbed .sd-panel-b.procedure-host { columns: auto; }
.report-intro { margin: 0 0 24px; color: var(--dim); font-size: 15px; line-height: 1.6; }
.report-host .st-head, .stats-host > .cs-head { margin: 0 0 12px; }
.report-host .st-t, .stats-host > .cs-head .cs-title { color: var(--ink); font-size: 20px; }
.sd-tabbed .report-host > .st-head, .sd-panel-b.stats-host > .cs-head,
.sd-panel-b.procedure-host .pr-t { display: none; }
.report-card, .report-tile { min-width: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--ink); overflow-wrap: anywhere; }
.report-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px; align-items: start; }
.report-tile-grid > .report-tile[open] { grid-column: 1 / -1; }
.report-tile { margin: 0; padding: 0; }
.report-tile-heading { position: relative; display: flex; flex-direction: column; justify-content: center;
  gap: 8px; min-height: 100px; padding: 22px 54px 22px 22px; box-sizing: border-box;
  cursor: pointer; list-style: none; border-radius: 14px; text-align: left; }
.report-tile-heading::-webkit-details-marker { display: none; }
.report-tile-heading::after { content: '+'; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); color: var(--teal); font-size: 24px; font-weight: 400; }
.report-tile[open] > .report-tile-heading::after { content: '−'; }
.report-tile[open] > .report-tile-heading { border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.report-tile-heading:hover { background: var(--panel-hover); }
.report-tile-heading:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; }
.report-card-title, .report-tile .pr-category-title { margin: 0; color: var(--ink);
  font: 600 17px/1.45 system-ui, -apple-system, sans-serif; letter-spacing: -.01em; }
.report-tile-meta { color: var(--dim); font-size: 13px; line-height: 1.5; }
.report-tile-body { padding: 20px 22px; }
.report-tile:not([open]) > .report-tile-body { display: none; }
.report-host .st-line { color: var(--ink-2); line-height: 1.6; white-space: normal; }
.report-host .st-line.report-card-title { color: var(--ink); }
.report-card-line + .report-card-line { margin-top: 8px; }
.report-periods { margin: 0 0 24px; gap: 8px; }
.report-host .st-tab, .stats-host .cs-tab, .stats-host .cs-btn {
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--sunk); color: var(--ink-2); font: 500 14px system-ui, sans-serif; cursor: pointer; }
.report-host .st-tab.is-active, .stats-host .cs-tab.is-active {
  background: var(--selected-bg); color: var(--teal-2); border-color: var(--teal); }
.report-host button:focus-visible, .report-host input:focus-visible, .procedure-host input:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 3px; }
.report-status { color: var(--dim); font-size: 14px; line-height: 1.6; margin-top: 16px; }
.report-host [aria-busy="true"] { opacity: .6; }
.report-summary, .stats-host .cs-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin: 0 0 24px; }
.report-metric, .stats-host .cs-fig { padding: 22px; }
.report-metric-label, .stats-host .cs-fig-l { color: var(--dim); font-size: 14px; margin: 0 0 12px; }
.report-metric-value, .stats-host .cs-fig-v { color: var(--ink); font: 600 30px/1.25 system-ui, sans-serif;
  letter-spacing: -.025em; white-space: normal; overflow: visible; font-variant-numeric: tabular-nums; }
.report-audit-section { margin: 20px 0; }
.audit-host .st-verdict { background: var(--panel); border-color: var(--line); padding: 20px; }
.audit-host .st-verdict-serious { border-left-color: var(--red); }
.audit-host .st-verdict-check { border-left-color: var(--amber); }
.audit-host .st-verdict-note { border-left-color: var(--teal); }
.audit-host .st-verdict-h { color: var(--ink); font-size: 17px; line-height: 1.5; }
.audit-host .st-sims { margin: 0; gap: 0; }
.audit-host .st-sim { flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.audit-host .st-sim:first-child { padding-top: 0; }
.audit-host .st-sim:last-child { border-bottom: 0; padding-bottom: 0; }
.audit-host .st-sim-n { color: var(--ink); font-size: 14px; }
.audit-host .st-sim .tiny { flex-basis: 100%; margin-left: 24px; color: var(--dim) !important; }
.audit-host .st-finding { padding: 14px 16px; background: var(--sunk); border-radius: 6px; }
.audit-host .st-finding-what { color: var(--ink); font-size: 14px; line-height: 1.6; }
.audit-host .st-finding-w { margin-bottom: 8px; color: var(--dim); }
.audit-host .st-none { color: var(--dim); line-height: 1.6; }
.stats-host .cs-filters, .stats-host .cs-breakdown { margin-bottom: 20px; }
.stats-host .cs-periods, .stats-host .cs-custom, .stats-host .cs-clinics { gap: 10px; margin-bottom: 18px; }
.stats-host .cs-clinics { margin-bottom: 0; align-items: stretch; }
.stats-host .cs-clinics > .cs-lbl { width: 100%; color: var(--dim); margin: 4px 0; }
.stats-host .cs-chk { gap: 10px; padding: 10px 14px; background: var(--sunk); border-color: var(--rule);
  color: var(--ink-2); font-size: 14px; line-height: 1.5; min-width: 0; }
.stats-host .cs-chk input { flex-shrink: 0; accent-color: var(--teal); width: 18px; height: 18px; }
.stats-host .cs-chk.is-unknown { color: var(--dim); }
.stats-host .cs-date-label { display: grid; gap: 8px; color: var(--dim); font-size: 14px; }
.stats-host .cs-custom { align-items: end; }
.stats-host .cs-date { background: var(--sunk); border-color: var(--rule); color: var(--ink);
  color-scheme: dark; font: 14px system-ui, sans-serif; max-width: 100%; box-sizing: border-box; }
.stats-host .cs-status { margin: 0 0 20px; color: var(--dim); font-size: 14px; line-height: 1.6; }
.stats-host .cs-status.is-warn { color: var(--amber); }
.stats-host .cs-fig-s { color: var(--dim); font-size: 13px; line-height: 1.6; margin-top: 10px; }
.stats-host .cs-table { margin: 0; }
.stats-host .cs-tr { grid-template-columns: minmax(0, 2.5fr) minmax(0, .65fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 14px; padding: 16px 0; border-color: var(--line); align-items: start; }
.stats-host .cs-tr > span { white-space: normal; overflow: visible; font: 14px/1.6 system-ui, sans-serif;
  color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stats-host .cs-tr > span:last-child { display: block; }
.stats-host .cs-th > span { color: var(--dim); font-size: 12px; }
.stats-host .cs-tr > .is-warn { color: var(--amber); }
.stats-host .cs-notes { padding-top: 16px; margin: 0; }
.stats-host .cs-note, .stats-host .cs-none, .stats-host .cs-sub { color: var(--dim); font-size: 13px; line-height: 1.6; }
.stats-host .cs-note.is-warn { color: var(--amber); }
.stats-host .cs-noshows .cs-head { margin: 0; display: flex; align-items: center; justify-content: space-between; }
.stats-host .cs-n { background: var(--panel-2); color: var(--ink-2); padding: 3px 10px; border-radius: 6px; font-size: 14px; }
.procedure-host .pr-sub { color: var(--dim); font-size: 15px; line-height: 1.6; }
.procedure-host .pr-head { margin-bottom: 24px; }
.procedure-host .meds-find { box-sizing: border-box; min-height: 46px; padding: 12px 14px;
  background: var(--sunk); border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); font: 15px system-ui, sans-serif; }
.procedure-host .pr-note { background: transparent; border: 0; padding: 0; margin: 12px 0;
  color: var(--dim); font: 13px/1.6 system-ui, sans-serif; }
.procedure-host .pr-count { color: var(--dim); margin: 16px 0; font: 13px/1.6 system-ui, sans-serif; }
.procedure-host .report-tile.pr-category { margin: 0; padding: 0; }
.procedure-host .pr-tick { background: var(--sunk); border-color: var(--rule); font: 14px/1.6 system-ui, sans-serif; }
@container (max-width: 650px) {
  .report-summary, .stats-host .cs-figs { grid-template-columns: minmax(0, 1fr); }
  .stats-host .cs-th { display: none; }
  .stats-host .cs-tr:not(.cs-th) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; padding: 20px 0; }
  .stats-host .cs-tr .cs-name { grid-column: 1 / -1; font-weight: 600; }
  .stats-host .cs-tr > span:not(.cs-name)::before { content: attr(data-label); display: block; color: var(--dim); font-size: 12px; margin-bottom: 4px; }
}
@media (max-width: 620px) {
  .report-host, .procedure-host { padding: 16px 4px; }
  .report-tile-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .report-tile-heading { min-height: 88px; padding: 18px 48px 18px 18px; }
  .report-tile-body { padding: 18px; }
  .stats-host .cs-chk { width: 100%; box-sizing: border-box; }
}

/* Focus on the chosen procedure; its category heading returns to the tiles. */
.pr-list:has(> .pr-category[open]) > .pr-category:not([open]) { display: none; }
.pr-category > .report-tile-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.pr-category .pr-procedure { min-width: 0; }
.pr-category > .report-tile-body:has(.pr-editor-host:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.pr-category > .report-tile-body:has(.pr-editor-host:not([hidden])) > .pr-procedure:not(:has(.pr-editor-host:not([hidden]))) { display: none; }
.procedure-host .pr-row { display: flex; align-items: center; gap: 12px; border-bottom: 0; }
.procedure-host .pr-open { flex: 1; min-width: 0; min-height: 44px; padding: 10px 0; border: 0;
  background: none; color: var(--ink); text-align: left; cursor: pointer; font: 500 14px/1.5 system-ui, sans-serif; }
.procedure-host .pr-open:hover { color: var(--teal-2); }
.procedure-host .pr-open:focus-visible, .procedure-host .pr-template button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.procedure-host .pr-tick { flex: 0 0 auto; min-height: 36px; width: auto; padding: 6px 12px; border-radius: 8px; }
.procedure-host .pr-tosp { margin-left: 0; margin-right: 0; font-size: 12px; }
.pr-editor-host[hidden] { display: none; }
.pr-template { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.pr-template-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 16px 0; }
.pr-template-field { display: grid; gap: 8px; color: var(--ink-2); font: 13px/1.5 system-ui, sans-serif; min-width: 0; }
.pr-template-field.pr-template-full { grid-column: auto; }
.pr-template-input { width: 100%; box-sizing: border-box; min-height: 42px; padding: 10px 12px;
  background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; font: 14px/1.5 system-ui, sans-serif; }
.pr-template textarea.pr-template-input { min-height: 90px; resize: vertical; }
.pr-template-input::placeholder { color: var(--dimmer); opacity: 1; }
.pr-template-levels { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: end; }
.pr-level-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-level { min-height: 40px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink-2); background: var(--sunk); cursor: pointer; font: 13px system-ui, sans-serif; }
.pr-level[aria-pressed="true"] { border-color: var(--teal); background: var(--selected-bg); color: var(--teal-2); }
.pr-template-group, .pr-template-advanced { border-top: 1px solid var(--line); margin: 12px 0; padding-top: 12px; }
.pr-template-group > summary, .pr-template-advanced > summary { cursor: pointer; min-height: 36px;
  color: var(--ink-2); font: 500 14px/1.5 system-ui, sans-serif; }
.pr-code-confirm { display: flex; gap: 10px; align-items: start; margin: 16px 0; font-size: 13px; line-height: 1.5; }
.pr-code-confirm input { accent-color: var(--teal); width: 18px; height: 18px; flex-shrink: 0; }
.pr-template-text { margin-top: 8px; }
.pr-template-preview { background: var(--sunk); color: var(--ink-2); padding: 14px; border-radius: 8px;
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: 13px/1.6 system-ui, sans-serif; }
.pr-template-status { color: var(--dim); margin: 12px 0; font-size: 13px; line-height: 1.6; }
.procedure-host .pr-template-save { background: var(--teal); color: var(--accent-ink); min-height: 44px; border-radius: 8px; }

/* Complaint categories are the home view; only one instruction is edited. */
.sd-tabbed .sd-panel-b.note-host, .sd-tabbed .sd-panel-b.fee-host, .sd-tabbed .sd-panel-b.safety-host { columns: auto; }
.sd-panel-b.note-host { padding: 16px; }
.note-toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.note-search { flex: 1; min-width: 0; }
.note-host .tb-in { background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
  box-sizing: border-box; width: 100%; min-height: 42px; padding: 10px 12px; font: 14px/1.5 system-ui, sans-serif; }
.note-host .tb-in::placeholder { color: var(--dimmer); opacity: 1; }
.note-host .btn, .fee-host .btn { min-height: 40px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink-2); background: var(--sunk); font: 500 13px/1.5 system-ui, sans-serif; }
.note-host .note-add, .note-host .note-save { border-color: var(--teal); background: var(--teal); color: var(--accent-ink); }
.note-library-status { margin-bottom: 16px; color: var(--dim); font-size: 13px; line-height: 1.5; }
.note-category, .note-complaint { display: flex; flex-direction: column; justify-content: center; gap: 10px;
  cursor: pointer; text-align: left; padding: 22px; min-height: 112px; }
.note-category:hover, .note-complaint:hover { background: var(--panel-hover); border-color: var(--rule); }
.note-complaints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.note-complaint { padding: 16px; min-height: 88px; }
.note-complaint-name { color: var(--ink); font: 500 14px/1.5 system-ui, sans-serif; }
.note-library-heading, .note-editor-top { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.note-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; color: var(--dim); font-size: 13px; }
.note-name-label { display: grid; gap: 8px; color: var(--dim); font-size: 13px; margin-bottom: 8px; }
.note-editor-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.note-editor-nav { display: flex; flex-direction: column; gap: 4px; }
.note-heading-tab { cursor: pointer; border: 1px solid transparent; border-radius: 8px; background: none;
  text-align: left; padding: 6px 12px; min-height: 40px; color: var(--dim); font: 500 12px/1.5 system-ui, sans-serif; }
.note-heading-tab.is-active { color: var(--teal-2); background: var(--selected-bg); border-color: var(--teal); }
.note-editor-pane { padding: 22px; }
.note-editor-field { display: grid; gap: 10px; margin-bottom: 16px; color: var(--ink-2); font-size: 14px; }
.note-editor-pane textarea { resize: vertical; min-height: 160px; }
.note-row-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.note-editor-footer { display: flex; justify-content: end; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.note-editor-footer .note-remove { margin-right: auto; }
.note-enable { display: flex; gap: 10px; align-items: center; font-size: 13px; margin: 14px 0; }
.note-enable input { accent-color: var(--teal); }
.consent-metadata { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 12px; }
.consent-editor-grid { grid-template-columns: 310px minmax(0, 1fr); gap: 16px; }
.consent-section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
.consent-section-nav .note-heading-tab { border-color: var(--line); min-height: 54px; padding: 8px 10px; }
.consent-add-section { grid-column: 1 / -1; }
.consent-host .note-editor-pane { padding: 16px; }
.consent-host .note-editor-field { margin-bottom: 12px; gap: 6px; }
.consent-host .note-editor-pane textarea { min-height: 220px; height: 220px; resize: vertical; }
.consent-host .note-editor-footer { margin-top: 14px; padding-top: 12px; flex-wrap: wrap; }
.memo-library-host, .pdf-library-host { columns: auto !important; font-family: system-ui, sans-serif; }
.memo-library-host .st-head { margin: 0 0 12px; }
.memo-library-host .mm-sub { margin: 0 0 16px; }
.mm-toolbar { display: flex; gap: 8px; margin-bottom: 16px; }
.mm-toolbar input { flex: 1; min-width: 0; }
.mm-type-grid, .pdf-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mm-type { padding: 12px; min-height: 72px; text-align: left; display: grid; gap: 6px; cursor: pointer; }
.memo-library-host .mm-card { padding: 14px; margin: 12px 0 0; }
.memo-library-host .mm-top { margin-bottom: 8px; }
.memo-library-host .mm-name, .memo-library-host .tb-in, .memo-library-host textarea {
  box-sizing: border-box; width: 100%; background: var(--sunk); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 8px; padding: 8px 10px; font: 14px/1.5 system-ui, sans-serif; }
.memo-library-host .mm-intent, .memo-library-host .mm-context { height: 68px; min-height: 68px; resize: vertical; }
.memo-library-host .mm-guidance { height: 110px; min-height: 110px; resize: vertical; }
.mm-field { display: grid; gap: 6px; margin: 10px 0; color: var(--ink-2); font-size: 13px; }
.mm-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mm-hint { color: var(--dim); font-size: 12px; line-height: 1.5; margin: 8px 0; }
.pdf-library-host > .report-card-title { margin-bottom: 12px; }
.pdf-library-host .pdf-upload { padding: 12px; margin-bottom: 12px; }
.pdf-upload-title { cursor: pointer; font-weight: 600; }
.pdf-library-host .pdf-type-grid .tb-item { display: grid; gap: 8px; padding: 12px; margin: 0; min-height: 100px; align-content: start; }
.pdf-library-host .tb-item-acts { justify-content: start; }
.pdf-library-host .tb-item-name { font-size: 14px; }
.pdf-search { margin-bottom: 12px; }
.pdf-library-host .pt-row { min-width: 0; }
@media (max-width: 760px) {
  .mm-choice-grid { grid-template-columns: minmax(0, 1fr); }
  .mm-type-grid, .pdf-type-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .consent-metadata, .consent-editor-grid { grid-template-columns: minmax(0, 1fr); }
}
.note-host .ask-line:not(:empty) { color: var(--ink); line-height: 1.6; padding: 16px; margin-top: 12px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }

/* Two source cards, two rule groups: common actions stay within reach. */
.fee-host .fr-sources, .safety-host .sf-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.fee-host .fr-card, .safety-host .sf-section { margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); min-width: 0; }
.fee-host .fr-card { gap: 16px; }
.fee-host .fr-h, .safety-host .sf-section-h { margin: 0; color: var(--ink); font: 600 17px/1.5 system-ui, sans-serif; }
.fee-host .fr-description > summary, .fee-host .fr-history > summary { color: var(--dim); font-size: 13px; cursor: pointer; min-height: 30px; line-height: 1.6; }
.fee-host .fr-description > div { margin: 10px 0; color: var(--dim); line-height: 1.6; }
.fee-host .fr-ver { padding: 14px; background: var(--sunk); border-color: var(--rule); gap: 10px; }
.fee-host .fr-ver.is-live { border-color: var(--teal); }
.fee-host .fr-when { color: var(--ink); font-size: 14px; }
.fee-host .fr-acts { margin-top: 4px; }
.fee-host .fr-history .fr-ver { margin-top: 12px; }
.fee-host .fr-up { gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.fee-host .fr-up-h { color: var(--ink); font-size: 14px; }
.fee-host .fr-up .or-field { max-width: none; }
.fee-host .fr-up .or-in { box-sizing: border-box; width: 100%; min-height: 42px; color-scheme: dark;
  background: var(--sunk); border-color: var(--rule); color: var(--ink); font-size: 14px; }
.fee-host .fr-hint { color: var(--dim); font-size: 13px; line-height: 1.6; }
.fee-host .fr-up > .btn { width: 100%; }
.fee-host .fr-blurb, .fee-host .fr-what { color: var(--dim); font-size: 13px; }
.fee-host .ask-line:empty { display: none; }
.safety-host .sf-head { display: none; }
.safety-host > .tiny { display: block; margin-bottom: 24px; color: var(--dim) !important; }
.safety-host .sf-section-heading { display: flex; gap: 12px; align-items: baseline; margin-bottom: 18px; }
.safety-host .sf-rule { width: 100%; box-sizing: border-box; padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); color: var(--ink); cursor: pointer; }
.safety-host .sf-rule:last-child { margin-bottom: 0; }
.safety-host .sf-rule-name { white-space: normal; font: 500 14px/1.5 system-ui, sans-serif; }
.safety-host .sf-rule-detail { color: var(--dim); font: 13px/1.6 system-ui, sans-serif; margin-top: 12px; }
.safety-host .sf-rule-chev { color: var(--teal); }
.report-host summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@container (max-width: 650px) {
  .note-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .note-editor-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-complaints { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fr-sources, .sf-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .pr-category > .report-tile-body, .pr-template-fields { grid-template-columns: minmax(0, 1fr); }
  .pr-template-levels { grid-template-columns: minmax(0, 1fr); }
  .note-toolbar, .note-editor-footer, .note-editor-top { flex-wrap: wrap; }
  .note-complaints { grid-template-columns: minmax(0, 1fr); }
  .note-editor-pane, .fee-host .fr-card, .safety-host .sf-section { padding: 18px; }
  .note-editor-footer .note-remove { margin-right: 0; }
  .fee-host .fr-sources, .safety-host .sf-body { grid-template-columns: minmax(0, 1fr); }
}

/* Fees, partners and vendors use one focused workspace instead of tall parallel lists. */
.fr-source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fr-source, .contact-tile { text-align: left; padding: 20px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--rule); min-height: 128px; cursor: pointer; font-family: system-ui, sans-serif; }
.fr-source:hover, .contact-tile:hover { background: var(--panel-hover); border-color: var(--teal); }
.fr-source-title, .contact-title { display: block; font-size: 17px; font-weight: 600; line-height: 1.4; }
.fr-source-meta, .contact-meta { display: block; font-size: 13px; color: var(--dim); line-height: 1.5; margin-top: 10px; }
.fr-source-action { display: block; color: var(--teal-2); font-size: 13px; margin-top: 14px; }
.fr-focus-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.fr-focus-head .fr-h { margin: 0; font: 600 21px/1.4 system-ui, sans-serif; }
.fr-current { color: var(--dim); font: 13px/1.6 system-ui, sans-serif; margin: 0 0 14px; }
.fr-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fr-tabs button[aria-pressed="true"] { background: var(--selected-bg); border-color: var(--teal); color: var(--ink); }
.fr-review-tools { display: flex; gap: 18px; align-items: end; margin-bottom: 14px; }
.fr-review-tools > input { flex: 1; min-width: 0; }
.fr-review-date { display: grid; gap: 6px; color: var(--dim); font: 13px system-ui, sans-serif; }
.fee-workspace .su-in { font: 14px system-ui, sans-serif; min-height: 42px; background: var(--sunk); border-color: var(--rule); color: var(--ink); box-sizing: border-box; }
.fr-rate-table { width: 100%; table-layout: fixed; border-collapse: collapse; color: var(--ink); font: 14px/1.45 system-ui, sans-serif; }
.fr-rate-table th { text-align: left; color: var(--dim); font-weight: 500; font-size: 12px; }
.fr-rate-table td, .fr-rate-table th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.fr-rate-table th:first-child { width: 17%; }
.fr-rate-table th:nth-child(2) { width: 37%; }
.fr-paging { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0; color: var(--dim); font: 13px system-ui, sans-serif; }
.fee-workspace .fr-up { border: 1px solid var(--rule); border-radius: 10px; padding: 20px; margin-top: 18px; background: var(--panel); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-tile { min-height: 152px; }
.contact-host .prt-group { background: var(--panel); padding: 20px; border: 1px solid var(--rule); border-radius: 10px; }
.contact-host .prt-group-h { color: var(--ink); border-color: var(--rule); font: 600 17px/1.5 system-ui, sans-serif; align-items: center; }
.contact-host .prt-group-n { margin-left: auto; }
.contact-host .prt-row { background: var(--sunk); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; margin: 12px 0; }
.contact-host .prt-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-host .prt-rows .prt-row { margin: 0; }
.contact-host .prt-rows .ask-line:empty { display: none; }
.contact-host .prt-name { font: 600 15px/1.5 system-ui, sans-serif; }
.contact-host .prt-reach, .contact-host .prt-none { color: var(--dim); font: 13px/1.6 system-ui, sans-serif; }
.contact-host .prt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; background: var(--panel); padding: 18px; }
.contact-host .prt-field { margin: 0; min-width: 0; }
.contact-host .prt-field-k { color: var(--dim); font: 13px/1.5 system-ui, sans-serif; }
.contact-host .su-in { width: 100%; box-sizing: border-box; background: var(--sunk); border-color: var(--rule); color: var(--ink); font: 14px system-ui, sans-serif; }
.contact-host .prt-form > .ask-line { grid-column: 1 / -1; }
.contact-host .pv-title, .contact-host .inv-title { font: 600 18px/1.5 system-ui, sans-serif; color: var(--ink); }
@container (max-width: 1000px) { .fr-source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 720px) { .fr-source-grid, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .fr-source-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .fr-review-tools { align-items: stretch; flex-direction: column; }
  .fr-rate-table thead { display: none; }
  .fr-rate-table, .fr-rate-table tbody, .fr-rate-table tr, .fr-rate-table td { display: block; width: 100%; box-sizing: border-box; }
  .fr-rate-table tr { margin: 14px 0; border: 1px solid var(--rule); padding: 12px; border-radius: 8px; }
  .fr-rate-table td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; padding: 8px 0; }
  .fr-rate-table td::before { content: attr(data-label); color: var(--dim); }
  .contact-host .prt-form { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .contact-host .prt-rows { grid-template-columns: minmax(0, 1fr); }
}

/* Compact procedure families: one chosen template and one section at a time. */
.procedure-host.procedure-workspace { max-width: none; padding: 12px 18px; }
.procedure-workspace .pr-workspace-intro { margin: 0 0 10px; color: var(--dim); font: 14px/1.5 system-ui; }
.procedure-workspace .pr-count { margin: 10px 0; font-size: 13px; }
.procedure-workspace .meds-find { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.pr-family-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.procedure-workspace .pr-family { display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-width: 0; min-height: 145px; padding: 18px; text-align: left; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; white-space: normal; width: 100%; }
.pr-family strong { font: 600 17px/1.35 system-ui; }
.pr-family-description { color: var(--dim); font: 13px/1.5 system-ui; flex: 1; }
.pr-family-meta { color: var(--teal-2); font: 12px/1.5 system-ui; }
.pr-family:hover { border-color: var(--teal); background: var(--panel-hover); }
.pr-workspace-scope, .pr-selected-count { color: var(--dim); font: 12px/1.5 system-ui; margin: 10px 0 0; }
.pr-workspace-top { display: flex; gap: 16px; align-items: center; margin: 0 0 10px; }
.pr-workspace-top .btn { min-height: 34px; padding: 6px 12px; }
.pr-modes, .pr-sections { display: flex; gap: 8px; margin: 8px 0; }
.pr-mode, .pr-section { min-height: 36px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--sunk); color: var(--ink-2); cursor: pointer; font: 14px/1.4 system-ui; }
.pr-mode.on, .pr-section.on { background: var(--selected-bg); border-color: var(--teal); color: var(--teal-2); }
.pr-variant-label { display: grid; grid-template-columns: 160px minmax(0,1fr); align-items: center; gap: 12px;
  color: var(--dim); font: 13px/1.4 system-ui; }
.procedure-workspace .pr-template-input { min-height: 36px; padding: 7px 10px; font: 14px/1.4 system-ui; }
.pr-workspace-help { margin: 8px 0; color: var(--dim); font: 12px/1.5 system-ui; }
.pr-pane { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pr-wording-view, .pr-section-preview { margin: 0; color: var(--ink-2); font: 14px/1.7 system-ui; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-field-index { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; }
.pr-field-index span { color: var(--dim); font: 12px/1.5 system-ui; padding: 4px 8px; background: var(--sunk); border-radius: 5px; }
.procedure-workspace .pr-template-field { gap: 4px; font: 13px/1.4 system-ui; }
.pr-wording-edit { box-sizing: border-box; width: 100%; height: 208px; padding: 12px; resize: vertical;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); color: var(--ink); font: 14px/1.65 system-ui; }
.pr-wildcards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.procedure-workspace .pr-level { min-height: 30px; padding: 4px 10px; font: 12px/1.4 system-ui; }
.pr-encounter-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 14px; }
.pr-encounter-fields .pr-area { grid-column: span 1; }
.pr-encounter-fields textarea { box-sizing: border-box; height: 66px; min-height: 66px; resize: vertical; }
.pr-encounter-fields [hidden] { display: none; }
.pr-level-shortcuts { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.pr-level-shortcuts .pr-region { width: 165px; flex: 0 0 auto; }
.pr-level-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-preview-tile { margin-top: 10px; }
.pr-preview-tile summary { cursor: pointer; color: var(--teal-2); font: 13px/1.5 system-ui; }
.pr-preview-tile .pr-section-preview { margin-top: 8px; font-size: 13px; }
.pr-workspace-footer { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 10px; }
.procedure-workspace .pr-template-status { margin: 0; font: 13px/1.4 system-ui; }
.pr-primary { flex: 0 0 auto; background: var(--teal); color: var(--accent-ink); border-color: var(--teal); min-height: 38px; }
.pr-candidates { display: grid; gap: 8px; }
.pr-candidate { display: flex; align-items: flex-start; gap: 10px; font: 12px/1.5 system-ui; }
.pr-candidate .pr-level { flex: 0 0 auto; }
.pr-code-confirm { font: 13px/1.5 system-ui; margin: 12px 0 0; }
.procedure-workspace button:focus-visible, .procedure-workspace select:focus-visible,
.procedure-workspace textarea:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1100px) { .pr-family-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) {
  .pr-family-grid, .pr-encounter-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pr-modes, .pr-sections { flex-wrap: wrap; }
  .pr-variant-label { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .pr-level-shortcuts { flex-direction: column; align-items: stretch; }
}
@media (max-width: 460px) { .pr-family-grid, .pr-encounter-fields { grid-template-columns: minmax(0,1fr); } }

/* Clinic statistics: filters, three totals, and two useful detail panels. */
.report-host.stats-host { max-width: none; padding: 12px 18px; }
.stats-host .report-intro { margin-bottom: 10px; font-size: 14px; line-height: 1.4; }
.stats-host .report-tile-heading { min-height: 38px; padding: 10px 42px 10px 14px; gap: 2px;
  flex-direction: row; justify-content: flex-start; align-items: center; }
.stats-host .report-tile-heading .report-tile-meta { margin-left: 10px; font-size: 12px; }
.stats-host .report-card-title { font-size: 15px; }
.stats-host .report-tile-heading::after { right: 14px; font-size: 20px; }
.stats-host .report-tile-body { padding: 10px 14px; }
.stats-host .cs-filters { margin-bottom: 10px; }
.stats-host .cs-periods, .stats-host .cs-custom { gap: 6px; margin: 0 0 8px; }
.stats-host .cs-clinics { gap: 6px; margin: 0; }
.stats-host .cs-clinics > .cs-lbl { width: auto; align-self: center; margin: 0 6px 0 0; font-size: 12px; }
.stats-host .cs-tab, .stats-host .cs-btn { min-height: 32px; padding: 6px 12px; font-size: 13px; }
.stats-host .cs-chk { padding: 6px 10px; gap: 6px; font-size: 13px; }
.stats-host .cs-chk input { width: 15px; height: 15px; }
.stats-host .cs-date-label { gap: 3px; font-size: 12px; }
.stats-host .cs-date { padding: 5px 8px; min-height: 32px; }
.stats-host .cs-status { margin: 0 0 10px; font-size: 12px; }
.stats-host .cs-figs { gap: 12px; margin-bottom: 12px; }
.stats-host .cs-fig { padding: 12px 16px; }
.stats-host .cs-fig-l { margin-bottom: 4px; font-size: 13px; }
.stats-host .cs-fig-v { font-size: 26px; line-height: 1.25; }
.stats-host .cs-fig-s { margin-top: 4px; font-size: 12px; }
.cs-detail-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.stats-host .cs-breakdown { margin-bottom: 0; }
.stats-host .cs-tr { gap: 10px; padding: 9px 0; grid-template-columns: minmax(0,2.8fr) .5fr .8fr 1.2fr .7fr; }
.stats-host .cs-tr > span { font-size: 13px; line-height: 1.45; }
.stats-host .cs-th > span { font-size: 11px; }
.stats-host .cs-notes { padding-top: 8px; }
.stats-host .cs-note, .stats-host .cs-none, .stats-host .cs-sub { font-size: 12px; line-height: 1.45; }
.stats-host .cs-noshows .cs-title { font-size: 15px; }
.stats-host .cs-noshows .cs-head { width: 100%; gap: 10px; }
.stats-host .cs-noshows .cs-note { margin: 0 0 8px; }
.stats-host .cs-noshows .ns-row { margin: 6px 0; }
.cs-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; color: var(--dim); font: 12px/1.4 system-ui; }
.cs-pager:empty { display: none; }
@media (max-width: 850px) { .cs-detail-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 620px) {
  .stats-host .cs-figs { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .stats-host .cs-fig { padding: 10px 8px; }
  .stats-host .cs-fig-v { font-size: 20px; }
  .stats-host .cs-fig-s, .stats-host .cs-fig-l { font-size: 11px; }
  .stats-host .cs-chk { width: auto; }
  .stats-host .report-tile-heading .report-tile-meta { display: none; }
}
.stats-host .cs-no-show-list .tk-head { display: none; }
.stats-host .cs-no-show-list .tk-group { margin: 8px 0 2px; padding: 0; font-size: 12px; line-height: 1.4; }
.stats-host .cs-no-show-list .tk-row { padding: 4px 0; min-height: 26px; }
.stats-host .cs-no-show-list .tk-key { font-size: 13px; }
.stats-host .cs-no-show-list .tk-tag { font-size: 10px; }

/* ── 🩺 HEALTH SCREENING (5 October) -- console_screening / screening.ts ──
   Grades are a word and a symbol as well as a colour (▲ ▼ ● ‼ ?), so a row
   never depends on the colour alone. */
.screeningview { padding: 12px 16px 28px; overflow-y: auto; min-height: 0; }
.hs-page { display: flex; flex-direction: column; gap: 12px; max-width: 1180px; }
/* RESULT SCREENING -- THE BOARD (25 Nov 2026). One left list, one row of
   controls in the shared slim set (ivx-), one table. A state is a lamp SHAPE
   and a word, never a colour alone. */
.hs-page.hsb-page { max-width: none; }
.hsb-day { color: var(--dimmer); font-size: 0.8125rem; }
section.hsb { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.hsb-side { flex: 1 1 200px; max-width: 240px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hsb-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; container-type: inline-size; }
.hsb-k { padding: 6px 8px 3px; color: var(--dimmer); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; }
.hsb-lane { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 2px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-family: var(--display); font-size: 0.8125rem; text-align: left; cursor: pointer; }
.hsb-lane.is-on { background: var(--selected-bg); color: var(--ink); font-weight: 600; }
.hsb-lane.is-zero { color: var(--dimmer); }
.hsb-lane-l { flex: 1 1 auto; }
.hsb-lane-n { font-size: 0.75rem; }
/* SETTINGS › SCREENING (oppsettings.ts): a list on the left in groups, the
   chosen item's card on the right, in the standard form look. */
.osr { display: grid; grid-template-columns: 15rem minmax(0, 1fr); border: 1px solid var(--line); border-radius: 0.625rem; background: var(--panel); min-width: 0; }
.osr-side { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.625rem 0.5rem; border-right: 1px solid var(--line); }
.osr-group { padding: 0.75rem 0.5rem 0.375rem; color: var(--teal-2); font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; }
.osr-item { display: flex; align-items: flex-start; gap: 0.625rem; min-height: 2.25rem; padding: 0.4375rem 0.625rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.osr-item:hover { background: var(--sunk); }
.osr-item.is-on { background: var(--selected-bg); }
.osr-item-i { flex: none; width: 1.25rem; text-align: center; }
.osr-item-w { display: flex; flex-direction: column; min-width: 0; }
.osr-item-l { font-size: 0.875rem; }
.osr-item-s { color: var(--dim); font-size: 0.75rem; }
.osr-main { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; padding: 0.75rem 0.875rem; container-type: inline-size; }
.osr-card { border: 1px solid var(--line); border-radius: 0.625rem; background: var(--sunk); min-width: 0; }
.osr-card-h { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; padding: 0.5625rem 0.75rem; border-bottom: 1px solid var(--line); }
.osr-card-t { color: var(--teal-2); font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.osr-card-a { margin-left: auto; color: var(--dim); font-size: 0.75rem; }
.osr-card > .help-panel { padding: 0 0.75rem; }
.osr-card-b { display: flex; flex-direction: column; gap: 0.625rem; min-width: 0; padding: 0.625rem 0.75rem 0.75rem; }
.osr-bar, .osr-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.osr-pair { flex-wrap: nowrap; }
.osr-flex { flex: 1 1 auto; }
.osr-in { box-sizing: border-box; width: 100%; min-width: 0; min-height: var(--tap); padding: 0.25rem 0.625rem; border: 1px solid var(--line); border-radius: 0.4375rem; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.8125rem; }
.osr-search { flex: 1 1 12rem; max-width: 22rem; }
.osr-num { flex: 0 0 3.5rem; width: 3.5rem; }
.osr-seg { display: inline-flex; }
.osr-seg-b { min-height: var(--tap); padding: 0 0.625rem; margin-left: -1px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font: inherit; font-size: 0.8125rem; cursor: pointer; }
.osr-seg-b:first-child { margin-left: 0; border-radius: 0.4375rem 0 0 0.4375rem; }
.osr-seg-b:last-child { border-radius: 0 0.4375rem 0.4375rem 0; }
.osr-seg-b.is-on { position: relative; border-color: var(--teal); background: var(--selected-bg); color: var(--ink); font-weight: 600; }
.osr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.625rem 0.75rem; }
.osr-f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.osr-f.w2 { grid-column: span 2; }
.osr-f.w4 { grid-column: 1 / -1; }
.osr-l { color: var(--dim); font-size: 0.75rem; }
.osr-l.is-required::after { content: " \00b7 required"; }
.osr-reads { padding: 0.25rem 0.625rem; border-left: 2px solid var(--teal); border-radius: 0 0.375rem 0.375rem 0; background: var(--panel); font-size: 0.8125rem; }
.osr-table { border: 1px solid var(--line); border-radius: 0.5rem; background: var(--panel); overflow: hidden; }
.osr-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.2fr) 4.5rem 5.5rem minmax(0, 1.1fr) auto; gap: 0.625rem; align-items: center; padding: 0.4375rem 0.625rem; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; overflow-wrap: anywhere; }
.osr-row:last-child { border-bottom: 0; }
.osr-try-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 6.5rem; }
.osr-hd { color: var(--dimmer); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; }
.osr-row.is-off .osr-name { color: var(--dim); }
.osr-dim, .osr-hint, .osr-none { color: var(--dim); font-size: 0.75rem; }
.osr-none { padding: 0.75rem; }
.osr-pill { justify-self: start; padding: 0.0625rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 0.75rem; white-space: nowrap; }
.osr-show-due { border-color: var(--amber); color: var(--amber-ink); }
.osr-ok { border-color: var(--teal); color: var(--teal-2); }
.osr-sw { position: relative; box-sizing: border-box; width: 1.875rem; height: 1rem; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; }
.osr-sw::before { content: ""; position: absolute; inset: -0.75rem -0.375rem; }
.osr-sw::after { content: ""; position: absolute; top: 0.125rem; left: 0.125rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--bg); }
.osr-sw.is-on { background: var(--teal); }
.osr-sw.is-on::after { left: auto; right: 0.125rem; }
.osr-sw:disabled { opacity: 0.6; cursor: default; }
.osr-open.dt-bullet { min-height: 0; }
.osr-bullets { display: flex; flex-wrap: wrap; gap: 0.25rem 1.125rem; }
.osr-tryform { display: flex; flex-direction: column; gap: 0.625rem; }
@media (hover: hover) and (pointer: fine) {
  .osr-in, .osr-seg-b { min-height: 1.75rem; }
  .osr .btn.btn-small { min-height: 1.75rem; padding-top: 0.125rem; padding-bottom: 0.125rem; }
}
@media (max-width: 860px) { .osr { grid-template-columns: minmax(0, 1fr); } .osr-side { border-right: 0; border-bottom: 1px solid var(--line); } }
@container (max-width: 700px) {
  .osr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .osr-f.w2 { grid-column: 1 / -1; }
  .osr-row, .osr-try-row { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .osr-try-row { grid-template-columns: minmax(0, 1fr); }
  .osr-hd { display: none; }
}
/* THE SCREENING PAGE'S THREE FUNCTIONS (29 Nov 2026): the tab strip, and the
   results-to-sign and today's-patients tables (screenmore.ts). */
.hsb-tabs { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0 0 0.625rem; }
.hsb-tab { min-height: 1.75rem; padding: 0.125rem 0.875rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); font-family: var(--display); font-size: 0.8125rem; cursor: pointer; }
.hsb-tab.is-on { border-color: var(--teal); background: var(--teal); color: var(--bg); font-weight: 600; }
@media (pointer: coarse) { .hsb-tab { min-height: var(--tap); } }
.hsb-s-due .hsb-lamp, .hsb-s-abnormal .hsb-lamp { border-color: var(--amber); background: var(--amber); }
.hsb-s-overdue .hsb-lamp { border-radius: 0; border-color: var(--red); background: var(--red); transform: rotate(45deg); }
.hsb-s-normal .hsb-lamp, .hsb-s-clear .hsb-lamp { border-color: var(--teal); }
.hsb-s-due .hsb-state, .hsb-s-abnormal .hsb-state { color: var(--amber-ink); }
.hsb-s-overdue .hsb-state { color: var(--red-ink); }
.sm-gap { height: 0.5rem; }
.sm-row { display: grid; gap: 0.625rem; align-items: start; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; }
.sm-row:last-child { border-bottom: 0; }
.sm-res { grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 1.6fr) 8rem auto; align-items: center; }
.sm-today { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.6fr) auto; }
.sm-what { min-width: 0; overflow-wrap: anywhere; }
.sm-acts { display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: flex-end; }
.sm-due { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.sm-one { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sm-pill { display: inline-block; align-self: flex-start; padding: 0.0625rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; color: var(--ink-2); overflow-wrap: anywhere; }
.sm-show-due { border-color: var(--amber); color: var(--amber-ink); }
.sm-show-alert { border-color: var(--red); color: var(--red-ink); }
.sm-clear { border-color: var(--teal); color: var(--teal-2); }
.sm-set, .sm-unread { color: var(--dimmer); }
.sm-why { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; color: var(--dim); font-size: 0.75rem; }
.sm-why-l { overflow-wrap: anywhere; }
.sm-note { color: var(--amber-ink); }
.sm-not.dt-bullet { min-height: 0; font-size: 0.75rem; }
@container (max-width: 760px) {
  .sm-res, .sm-today { grid-template-columns: minmax(0, 1fr); }
  .sm-acts { justify-content: flex-start; }
}
.hsb-lamp { flex: 0 0 auto; box-sizing: border-box; width: 10px; height: 10px; border: 2px solid transparent; border-radius: 50%; }
.hsb-s-critical .hsb-lamp, .hsb-crit .hsb-lamp { border-radius: 0; border-color: var(--red); background: var(--red); transform: rotate(45deg); }
.hsb-s-progress .hsb-lamp { border-color: var(--amber); }
.hsb-s-ready .hsb-lamp { border-color: var(--teal); background: var(--teal); }
.hsb-s-signed .hsb-lamp { border-radius: 2px; border-color: var(--map-numb); background: var(--map-numb); }
section.hsb .ivx-bar { flex-wrap: wrap; }
section.hsb .ivx-bar .hsb-search { flex: 1 1 220px; max-width: 380px; }
section.hsb .ivx-btn.hsb-new { border-color: var(--teal); background: var(--teal); color: var(--bg); font-weight: 600; }
.hsb-band { display: flex; flex-direction: column; gap: 8px; }
.hsb-band[hidden], .hsb-foot[hidden] { display: none; }
.hsb-crit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--red); border-radius: 12px; background: var(--panel-2); }
.hsb-crit-w { flex: 1 1 280px; min-width: 0; }
.hsb-crit-h { color: var(--red-ink); font-weight: 700; }
.hsb-crit-l { margin-top: 2px; color: var(--ink); font-size: 0.8125rem; }
section.hsb .ivx-btn.hsb-act { border-color: var(--teal); color: var(--teal-2); font-weight: 600; }
section.hsb .hsb-s-ready .ivx-btn.hsb-act { background: var(--teal); color: var(--bg); }
section.hsb .ivx-btn.hsb-act-crit, section.hsb .hsb-s-critical .ivx-btn.hsb-act { border-color: var(--red); background: var(--red); color: var(--bg); }
.hsb-table { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.hsb-row { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) 120px 130px minmax(0, 1.5fr) 96px auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; }
.hsb-row:last-child { border-bottom: 0; }
.hsb-hd { color: var(--dimmer); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; border-bottom-color: var(--line); }
.hsb-state { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hsb-s-critical .hsb-state { color: var(--red-ink); }
.hsb-s-progress .hsb-state { color: var(--amber-ink); }
.hsb-s-ready .hsb-state { color: var(--teal-2); }
.hsb-who { min-width: 0; overflow-wrap: anywhere; }
.hsb-line, .hsb-pack, .hsb-on { color: var(--dim); }
.hsb-res { display: flex; align-items: center; gap: 8px; }
.hsb-prog { flex: 0 0 48px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.hsb-prog-f { display: block; height: 100%; background: var(--teal); }
.hsb-find { color: var(--ink-2); }
.hsb-find.is-flagged { color: var(--amber-ink); }
.hsb-s-critical .hsb-find { color: var(--red-ink); }
.hsb-row > .hsb-act { justify-self: end; }
.hsb-none { padding: 14px 12px; color: var(--dim); font-size: 0.8125rem; }
.hsb-foot { color: var(--dimmer); font-size: 0.78rem; }
.hsb-list { display: flex; flex-direction: column; gap: 6px; }
.hsb-person { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 0.8125rem; }
/* A NARROW PANE (a phone): the lanes become a row of chips, a row a card. */
@container (max-width: 760px) {
  .hsb-hd { display: none; }
  .hsb-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .hsb-row > .hsb-find { grid-column: 1 / -1; }
  .hsb-row > .hsb-act { grid-column: 1 / -1; justify-self: stretch; }
}
@media (max-width: 760px) {
  .hsb-side { flex: 1 1 100%; max-width: none; flex-direction: row; flex-wrap: wrap; }
  .hsb-side .hsb-k { display: none; }
  .hsb-lane { width: auto; border: 1px solid var(--line); border-radius: 16px; }
}
@media (hover: none) { .hsb-lane { min-height: var(--tap); } section.hsb .ivx-btn.hsb-act { min-height: var(--tap); } }
.hs-head { display: flex; align-items: center; gap: 10px; }
.hs-title { flex: 1; margin: 0; font-family: var(--display); font-size: 20px; color: var(--ink); }
.hs-lede, .hs-hint { color: var(--dim); font-size: 13.3px; margin: 2px 0; }
.hs-bar, .hs-actions, .hs-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hs-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); }
.hs-btn { min-height: var(--tap, 44px); padding: 0 14px; border-radius: var(--r, 8px); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.hs-btn:hover { border-color: var(--teal); }
.hs-go { background: var(--teal); color: var(--bg); border-color: var(--teal); font-weight: 600; }
.hs-sign { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.hs-ghost { background: transparent; }
.hs-x { min-width: var(--tap, 44px); font-size: 20px; }
.hs-in { min-height: 38px; box-sizing: border-box; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--sunk); color: var(--ink); font: inherit; font-size: 14px; min-width: 0; }
.hs-wide { flex: 1 1 320px; }
/* A SIGNED screening is locked: its boxes say so by look as well as by refusing input. */
.hs-in:disabled, .hs-ta:disabled { opacity: 0.7; cursor: not-allowed; border-style: dashed; }
.hs-ta { width: 100%; min-height: 110px; box-sizing: border-box; padding: 8px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 14px; }
.hs-ta-s { min-height: 64px; }
.hs-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-l, 12px); padding: 12px 14px; }
.hs-h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.hs-lab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dimmer); margin: 10px 0 4px; }
.hs-field { display: flex; flex-direction: column; gap: 2px; max-width: 220px; }
.hs-list { display: flex; flex-direction: column; gap: 4px; }
.hs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--panel);
  color: var(--ink); font: inherit; cursor: pointer; }
.hs-row:hover { border-color: var(--teal); }
.hs-row-n { font-weight: 600; }
.hs-row-s { color: var(--dim); font-size: 12px; }
.hs-pbar { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.hs-pname { font-size: 17px; font-weight: 700; color: var(--ink); }
.hs-pline { color: var(--dim); font-size: 13px; }
.hs-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hs-pkg { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.hs-pkg.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.hs-pkg-n { font-weight: 700; }
.hs-pkg-a { color: var(--dim); font-size: 12.5px; }
.hs-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; }
.hs-tick { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.hs-sched { margin-top: 6px; }
.hs-sched-r { display: grid; grid-template-columns: 82px 1.4fr 1fr 0.9fr; gap: 8px; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.hs-sched-t { color: var(--ink-2); font-size: 12px; }
.hs-sched-s { color: var(--dimmer); font-size: 11.5px; }
.hs-chip { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid currentColor; white-space: nowrap; }
.hs-chip.hs-plain { color: var(--dim); }
.hs-due { color: var(--teal); } .hs-disc { color: var(--amber); }
.hs-crit { color: #fff; background: var(--red-solid); border-color: var(--red-solid); }
.hs-chip.hs-abn, .hs-res.hs-abn .hs-res-f, .hs-find.hs-abn .hs-find-f { color: var(--red); }
.hs-chip.hs-bord, .hs-res.hs-bord .hs-res-f, .hs-find.hs-bord .hs-find-f { color: var(--amber); }
.hs-chip.hs-ok, .hs-res.hs-ok .hs-res-f { color: var(--teal); }
.hs-chip.hs-ung, .hs-res.hs-ung .hs-res-f { color: var(--dimmer); }
.hs-panel { margin: 12px 0 4px; font-weight: 700; color: var(--teal-2); font-size: 13.5px; }
.hs-res { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(260px, 1.6fr) minmax(150px, 1fr) minmax(90px, 0.6fr);
  gap: 8px; align-items: center; padding: 5px 6px; border-radius: 6px; border-left: 3px solid transparent; }
.hs-res.hs-abn { border-left-color: var(--red); background: rgba(255, 154, 141, 0.06); }
.hs-res.hs-bord { border-left-color: var(--amber); background: rgba(255, 209, 122, 0.05); }
.hs-res.hs-crit { border-left-color: var(--red-solid); background: rgba(181, 43, 38, 0.18); color: var(--ink); }
.hs-res.hs-crit .hs-res-f { color: var(--red-ink); font-weight: 700; }
.hs-res-n { font-size: 14px; color: var(--ink); }
.hs-res-in { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hs-res-in .hs-in { width: 96px; }
.hs-res-in select.hs-in { width: auto; max-width: 240px; }
.hs-res-in .hs-find-in { flex: 1 1 200px; width: auto; }
.hs-range { width: 92px; }
.hs-unit-l { color: var(--dim); font-size: 12.5px; min-width: 56px; }
.hs-res-f { font-size: 13px; font-weight: 600; }
.hs-res-r { color: var(--dimmer); font-size: 12px; }
.hs-prev { display: block; font-weight: 400; color: var(--dimmer); font-size: 11.5px; }
.hs-find { display: grid; grid-template-columns: minmax(170px, 1fr) 120px minmax(160px, 1fr) minmax(260px, 2fr);
  gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.hs-find-n { font-weight: 600; color: var(--ink); }
.hs-find.hs-crit .hs-find-f { color: var(--red-ink); font-weight: 700; }
.hs-note { grid-column: 1 / -1; color: var(--dim); font-size: 12px; }
.hs-critcard { border-color: var(--red-solid); background: rgba(181, 43, 38, 0.16); }
.hs-crit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.hs-crit-t { font-weight: 700; color: var(--red-ink); min-width: 200px; }
.hs-crit-done { color: var(--red-ink); font-size: 13px; margin: 0; }
.hs-due-r { font-size: 13.5px; color: var(--ink-2); padding: 2px 0; }
.hs-dirty { color: var(--amber); font-size: 13px; }
.hs-say { font-size: 13.5px; padding: 6px 10px; border-radius: 7px; }
.hs-say-bad { color: var(--red-ink); background: rgba(181, 43, 38, 0.16); }
.hs-say-ok { color: var(--teal); }
@media (max-width: 900px) {
  .hs-res, .hs-find, .hs-sched-r { grid-template-columns: 1fr; }
}

/* 👶 PAEDIATRICS (sub-specialty modules, P0): app/paeds.ts. `.pd-` claimed
   here; grep found no other rule using it (7 Oct). */
/* 🫀 CARDIOLOGY (C0) reuses the paediatric page's classes; these are its own. */
.pd-chip.on.cr-tick { border-color: var(--teal); color: var(--teal-2); }
.cr-series { width: 100%; max-width: 360px; min-height: 80px; font-family: inherit; }
.pd-page { padding: 12px 16px 28px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.pd-head { display: flex; justify-content: space-between; align-items: center; }
.pd-title { font-size: 18px; color: var(--ink); }
.pd-who { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ink-2); }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pd-f { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pd-fl { color: var(--dim); font-size: 13px; min-width: 70px; }
.pd-fu { color: var(--dimmer); font-size: 12px; }
.pd-in { width: 64px; min-height: 36px; background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
/* 👶 PAEDIATRIC TRIAGE AT CHECK-IN (P2) -- the row's badge and its folded form. */
.tri-box { display: flex; flex-direction: column; gap: 6px; flex: 1 1 100%; }
.tri-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tri-form[hidden] { display: none; }
.tri-badge { flex: none; }
.tri-badge.tri-red { color: var(--red); }
.tri-badge.tri-amber, .tri-badge.tri-band { color: var(--amber); }
.tri-o2 { min-height: 36px; background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
.tri-from { color: var(--dim); }
/* 👶 THE WELL-CHILD REVIEW (P3), inside the visit sheet's paediatric part. */
.pd-well { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
/* 💊 DOSE SAFETY (P4): the checker under the paediatric part; the words are the door's. */
.pd-dose { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pd-dose .pd-dom, .pd-dose .pd-screen, .pd-dose .pd-src { width: 100%; }
.pd-dose .pd-screen[data-level="over"], .pd-dose .pd-screen[data-level="refused"] { color: var(--red); }
.pd-feats { display: flex; flex-direction: column; gap: 6px; }
.pd-fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-fg-h { width: 100%; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.pd-chip, .pd-ans { min-height: 44px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; text-align: left; }
.pd-chip.on.pd-c-red { border-color: var(--red); color: var(--red-ink); }
.pd-chip.on.pd-c-amber, .pd-ans.on { border-color: var(--amber); color: var(--amber-ink); }
.pd-green { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 13px; }
.pd-out { display: flex; flex-direction: column; gap: 4px; }
.pd-light { font-size: 15px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); }
.pd-light.pd-red { border-color: var(--red); color: var(--red-ink); }
.pd-light.pd-amber { border-color: var(--amber); color: var(--amber-ink); }
.pd-light.pd-green { border-color: var(--teal); color: var(--teal-2); }
.pd-r-red { color: var(--red-ink); }
.pd-r-amber { color: var(--amber-ink); }
.pd-reason, .pd-band, .pd-action, .pd-note, .pd-screen, .pd-src, .pd-pace { font-size: 13px; color: var(--ink-2); }
.pd-b-above, .pd-b-below { color: var(--amber-ink); }
.pd-src, .pd-note { color: var(--dimmer); }
.pd-lines { font-size: 12px; color: var(--dim); padding: 6px; border: 1px dashed var(--line); border-radius: 6px; }
.pd-dom { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); margin-top: 6px; }
.pd-ms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-ms-w { flex: 1 1 240px; color: var(--ink-2); font-size: 13px; }
.pd-cp { color: var(--ink); }
/* O&G O2: the antenatal flow sheet -- the door's rows, eight columns, scrolled inside its panel. */
.og-flow { overflow-x: auto; max-width: 100%; }
.og-r { display: grid; grid-template-columns: 6.5em 4em 5.5em 5.5em 4.5em 3.5em 7em 6em; gap: 4px; color: var(--ink-2); }
.og-hd { color: var(--dimmer); border-bottom: 1px solid var(--line); }
.og-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-flags { color: var(--amber-ink); padding-left: 6.5em; }
/* O&G O3: a screening row; the state is the door's word, the colour only echoes it. */
.og-scr { border-top: 1px solid var(--line); padding: 4px 0; }
.og-scr-due .pd-cp, .og-scr-late .pd-cp { color: var(--amber-ink); }
/* 🧾 The Insurance & TPA folder and its claim cases (claimcases.ts, 19 Oct).
   The words and states are the door's; this only lays them out. */
.cc-row { display: flex; gap: 8px; padding: 2px 0; }
.cc-k { color: var(--dim); min-width: 9em; }
.cc-v { color: var(--ink); overflow-wrap: anywhere; }
.cc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cc-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cc-in { min-height: 36px; max-width: 100%; }
.cc-case-btn { display: block; width: 100%; text-align: left; margin: 2px 0; white-space: normal; }
.cc-plane { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55); display: flex; justify-content: center; align-items: flex-start; overflow: auto; padding: 24px 16px; }
.cc-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: min(920px, 100%); padding: 16px; }
.cc-close { float: right; }
.cc-title { margin: 0 0 4px; color: var(--teal); }
.cc-state { color: var(--dim); margin-bottom: 8px; }
.cc-alert { border-left: 3px solid var(--red); padding: 4px 8px; margin: 4px 0; }
.cc-warn { border-left: 3px solid var(--amber); padding: 4px 8px; margin: 4px 0; }
.cc-missing { color: var(--amber-ink); }
.cc-note { color: var(--dim); font-style: italic; }
.cc-group { color: var(--teal); margin-top: 6px; }
.cc-field { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
.cc-field .cc-in { flex: 1 1 auto; }
.cc-text { width: 100%; min-height: 7em; }
.cc-quote { white-space: pre-wrap; border-left: 2px solid var(--line); padding-left: 8px; }
.cc-pick { display: flex; gap: 6px; align-items: center; }
.cc-cost { display: flex; gap: 8px; align-items: center; padding: 2px 0; border-bottom: 1px solid var(--line-soft); }
.cc-cost .cc-k { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cc-found { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.cc-pick-item { white-space: normal; text-align: left; }
.cc-doc.is-withdrawn { text-decoration: line-through; color: var(--dim); }
.cc-log { max-height: 16em; overflow: auto; border-top: 1px solid var(--line-soft); }
.cc-event { padding: 2px 0; border-bottom: 1px solid var(--line-soft); color: var(--dim); }
.rx-pharmacy { border: 1px solid var(--line); padding: 12px; margin: 12px 0; }
.pharmacy-order { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; min-width: 0; }
.pharmacy-field { display: flex; flex-direction: column; gap: 3px; flex: 1 1 130px; min-width: 0; }
.pharmacy-field input, .pharmacy-field select { width: 100%; min-height: 36px; box-sizing: border-box; }
.pharmacy-selected, .pharmacy-matches { width: 100%; overflow-wrap: anywhere; }
.pharmacy-matches { display: flex; flex-wrap: wrap; gap: 6px; }
.pharmacy-matches button { white-space: normal; text-align: left; }
.pharmacy-findings { overflow-wrap: anywhere; }
.pharmacy-alert { border-left: 3px solid var(--amber); padding: 6px 10px; margin: 8px 0; }
.pharmacy-coverage { padding: 6px 0; }
.pharmacy-checked-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* THE PAD (RX_PAD_FILES). Its children never shrink in the area's scrolling
   flex column -- the textarea collapsed to a sliver the moment the repeat
   list or the filing preview made the pad taller than the area; the area
   scrolls instead. Favourites are a wrapping row of chips; every tick sits on
   a row a thumb can hit; filing that BILLS is a bordered, labelled block. */
.rx-pad > * { flex-shrink: 0; }
.rx-text { min-height: 8.5em; resize: vertical; }
.rx-favs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rx-favs > .tiny { flex: 1 0 100%; }
.rx-repeat-row, .rx-file-confirm { display: flex; align-items: center; gap: 10px;
  min-height: var(--tap); cursor: pointer; }
.rx-repeat-words { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rx-repeat-tick, .rx-file-tick { width: 20px; height: 20px; flex: 0 0 auto; margin: 0;
  accent-color: var(--teal); cursor: pointer; }
.rx-repeat .btn { display: inline-flex; margin-top: 4px; }
.rx-file-ask { display: flex; flex-direction: column; gap: 4px; margin: 6px 0;
  padding: 9px 12px; border: 1px solid var(--amber); border-radius: 8px;
  background: rgba(230,180,90,0.06); }
.rx-file-ask .rx-file-tick { accent-color: var(--amber); }
.rx-blocked { display: flex; flex-direction: column; gap: 2px;
  border-left: 3px solid var(--amber); padding: 6px 10px; }

/* ℞ THE PRESCRIPTION BOARD STYLED TO ITS BOARD (#1220, Rx2 and his picture
   46). One patient bar at the top of the card; the SDD search is one field
   with its ▾ and a drop-down under it; the favourites are a tab strip over
   template cards; the pad is a table whose controls read as the app's own
   fields, never the browser's grey ones; a refusal is a red banner; the
   pharmacy's form opens from a button. */
.rx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 10px;
  border: 1px solid var(--teal); border-radius: 8px; background: rgba(79,214,200,.08); min-width: 0; }
.rx-bar-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; flex: 0 1 auto; }
.rx-bar-reg { font-size: 12.5px; color: var(--ink); letter-spacing: .02em; }
.rx-bar-line { font-size: 12.5px; color: var(--ink-2); }
.rx-bar-name { font-size: 12px; color: var(--dim); }
.rx-dosing, .rx-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--amber); color: var(--amber-ink);
  background: rgba(230,180,90,.12); }
.rx-bar-allergy { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--red); letter-spacing: .03em; }
.rx-bar-allergy.is-unknown { color: var(--amber); }
.rx-bar-differs { flex: 1 0 100%; font-size: 12px; color: var(--red-ink); padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--red); background: rgba(181,43,38,.16); }
.rx-bar.is-differs { border-color: var(--red); }
.or-bar:empty { display: none; }
.rx-tools { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin-top: 6px; }
.rx-finder { position: relative; flex: 1 1 240px; min-width: 0; }
.rx-q { font: inherit; font-size: 12.5px; width: 100%; box-sizing: border-box; min-height: 40px;
  padding: 8px 30px 8px 10px; border-radius: 8px; border: 1px solid var(--teal); background: var(--sunk); color: var(--ink); }
.rx-q:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.rx-caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--dim);
  pointer-events: none; font-size: 12px; }
.rx-hits:not(:empty) { position: absolute; top: 100%; left: 0; right: 0; z-index: 6; margin-top: 2px;
  display: flex; flex-direction: column; max-height: 260px; overflow: auto; padding: 4px;
  border: 1px solid var(--teal); border-radius: 8px; background: linear-gradient(var(--panel), var(--panel)), var(--bg);
  box-shadow: var(--z1); }
.rx-hit { font: inherit; font-size: 12.5px; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.rx-hit:hover, .rx-hit:focus { background: var(--panel-hover); outline: none; }
.rx-hit-none { font-size: 12px; color: var(--dim); padding: 6px 10px; }
.rx-fav-open.is-on { border-color: var(--teal); color: var(--teal); }
.rx-favourites { border: 1px solid var(--rule); border-radius: 8px; padding: 0 10px 10px; margin-top: 6px; }
.rx-groups { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--line); margin: 0 -10px 8px; padding: 0 10px; }
.rx-group { font: inherit; font-size: 12.5px; padding: 8px 10px; border: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--dim); cursor: pointer; }
.rx-group:hover { color: var(--ink-2); }
.rx-group.is-on { color: var(--ink); border-bottom-color: var(--teal); }
.rx-group-body { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--panel-2); min-width: 0; max-width: 100%; }
.rx-tpl { font: inherit; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  padding: 6px 10px; border: 0; background: none; color: var(--ink); cursor: grab; min-width: 0; }
.rx-tpl:hover { background: var(--panel-hover); }
.rx-tpl-n { font-size: 12.5px; }
.rx-tpl-w { font-size: 11px; color: var(--dim); }
.rx-tpl-edit, .rx-tpl-del { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none;
  color: var(--dim); padding: 0 8px; }
.rx-table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.rx-table th { font-size: 12px; font-weight: 600; color: var(--label); text-align: left; padding: 4px 6px;
  border-bottom: 1px solid var(--line); }
.rx-line > td { padding: 6px; vertical-align: top; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.rx-line > td:first-child { min-width: 0; overflow-wrap: anywhere; }
.rx-in, .rx-sel { font: inherit; font-size: 12.5px; min-height: 30px; padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--sunk); color: var(--ink); box-sizing: border-box; max-width: 100%; }
.rx-in:focus, .rx-sel:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.rx-sel { cursor: pointer; }
.rx-perkg { margin-top: 4px; }
.rx-x, .rx-keep { border-color: var(--hush); background: transparent; color: var(--dim); }
.rx-line > td:last-child { white-space: nowrap; text-align: right; }
.rx-line > td:last-child > .btn { display: inline-flex; vertical-align: top; margin-left: 4px; }
.rx-perkg { border-color: var(--hush); background: transparent; color: var(--dim); }
.rx-end > td { padding: 8px 6px; }
.rx-banners { display: flex; flex-direction: column; gap: 6px; }
.rx-banners:empty { display: none; }
.rx-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--red); background: rgba(181,43,38,.18); color: var(--red-ink); font-size: 12.5px; margin: 4px 0; }
.rx-banner b { color: var(--red); }
.rx-banner-i { color: var(--red); }
.rx-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.rx-send { border-color: var(--teal); background: rgba(79,214,200,.16); color: var(--teal); }
.rx-pharm-open.is-on { border-color: var(--teal); color: var(--teal); }

/* 🩺 THE CONSULTATION WORKSPACE (AWS-96, consult.ts) -- the minimum record in
   the room. Typed is teal and solid, the note writer's is amber and dashed,
   empty is quiet; a required box says so. Drawn only while admin has the
   add-on on for this encounter. */
.cw { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.cw-wait, .cw-off { color: var(--dim); font: 500 12px/1.5 var(--mono); padding: 10px 0; }
.cw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cw-title { font: 600 11px/1 var(--mono); letter-spacing: 0.08em; color: var(--label); }
.cw-status { font: 600 10px/1 var(--mono); letter-spacing: 0.06em; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line); }
.cw-status.is-open { color: var(--teal-2); background: var(--selected-bg); }
.cw-status.is-signed { color: var(--accent-ink); background: var(--teal); border-color: var(--teal); }
.cw-status.is-closed { color: var(--ink-2); background: var(--hush); }
.cw-test { font: 600 10px/1 var(--mono); color: var(--amber-ink); border: 1px dashed var(--amber); border-radius: 5px; padding: 4px 7px; }
.cw-who { margin-left: auto; color: var(--dim); font-size: 11px; }
.cw-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--amber); border-radius: var(--r); color: var(--amber-ink); background: rgba(255,209,122,0.06); }
.cw-sections { display: flex; flex-direction: column; gap: 8px; }
.cw-sec { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--panel-2); }
.cw-sec.is-required { border-color: var(--rule); }
.cw-sec.is-extra { border-style: dashed; border-color: var(--amber); }
.cw-sec-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cw-sec-h { font: 600 11px/1.2 var(--mono); letter-spacing: 0.06em; color: var(--label); }
.cw-badge { margin-left: auto; font: 600 9px/1 var(--mono); letter-spacing: 0.06em; padding: 3px 6px; border-radius: 4px; }
.cw-badge.is-typed { color: var(--teal); border: 1px solid var(--teal); }
.cw-badge.is-written { color: var(--amber); border: 1px dashed var(--amber); }
.cw-badge.is-empty { color: var(--faint); border: 1px solid var(--line); }
.cw-ta { width: 100%; box-sizing: border-box; resize: vertical; min-height: 2.6em; background: var(--sunk); color: var(--ink); border: 1px solid var(--line-soft); border-radius: 6px; padding: 6px 8px; font: 400 13px/1.45 var(--display); }
.cw-ta:disabled { opacity: 0.55; cursor: not-allowed; }
.cw-sec-said { font-size: 10px; color: var(--faint); min-height: 1em; margin-top: 3px; }
.cw-stale { margin-top: 6px; padding: 6px 8px; border: 1px solid var(--amber); border-radius: 6px; display: flex; flex-direction: column; gap: 6px; }
.cw-stale-t, .cw-extra-t { white-space: pre-wrap; color: var(--ink-2); font-size: 12px; }
.cw-picks, .cw-row, .cw-found, .cw-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.cw-chip { font-size: 12px; }
.cw-chip.is-edit { border-color: var(--red); color: var(--red-ink); }
.cw-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.cw-in { background: var(--sunk); color: var(--ink); border: 1px solid var(--line-soft); border-radius: 6px; padding: 5px 7px; font: 400 12px/1.4 var(--display); min-width: 12em; }
.cw-f { min-width: 7em; flex: 1 1 7em; }
/* the prescription form's numbers: the as-needed tick sits in its own label */
.cw-prn { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.cw-tick { flex: 0 0 auto; }
.cw-rx-supply, .cw-rx-freq, .cw-rx-needs, .cw-rx-was { display: block; flex-basis: 100%; }
.cw-panel { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--panel); }
.cw-panel-h { font: 600 11px/1.2 var(--mono); letter-spacing: 0.06em; color: var(--label); margin-bottom: 4px; }
.cw-dx-row, .cw-rx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid var(--line-soft); }
.cw-dx-l, .cw-rx-l { color: var(--ink); font-size: 13px; }
.cw-uncoded, .cw-draft { font-size: 9px; letter-spacing: 0.06em; color: var(--amber); }
/* THE DICTIONARIES (28 Oct): a code from the loaded release, said beside the words. */
.cw-coded { font-size: 9px; letter-spacing: 0.06em; color: var(--teal); }
.cw-chip.is-coded { border-color: var(--teal); }
/* FROM THIS PATIENT: one card per diagnosis -- its words, codes, origin and
   both taps together -- in a wrapping grid; a card already on today's list
   says so. Sizes are the board's own (.cw-dx-l, .cw-coded, .btn-small). */
.cw-pdx { margin-top: 8px; }
.cw-pdx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 4px; }
.cw-pdx-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.cw-pdx-card.is-coded { border-left: 3px solid var(--teal); }
.cw-pdx-card.is-added { border-color: var(--teal); background: var(--selected-bg); }
.cw-pdx-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.cw-pdx-acts .btn { flex: 1 1 0; min-height: var(--tap); }
.cw-pdx-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.cw-pdx-fail .cw-line { color: var(--red-ink); flex: 1 1 20em; }
/* Where a diagnosis came from: muted, the same on a card and on today's row. */
.cw-origin, .cw-line.cw-origin { color: var(--dim); }
/* TODAY'S ROW: how sure reads as a state (the lit word is today's), and the
   remove sits apart and quiet. */
.cw-seg { display: inline-flex; }
.cw-seg .btn { border-radius: 0; }
.cw-seg .btn:first-child { border-radius: var(--r-l) 0 0 var(--r-l); }
.cw-seg .btn + .btn { margin-left: -1px; border-radius: 0 var(--r-l) var(--r-l) 0; }
.cw-seg .btn.is-on { background: var(--selected-bg); border-color: var(--teal); color: var(--teal); font-weight: 600; position: relative; }
.cw-seg .btn:not(.is-on) { color: var(--faint); }
.cw-dx-x { margin-left: auto; border-color: transparent; }
/* DUAL CODING (30 Oct): the ICD-10 the release's map gives, beside its SNOMED CT code. */
.cw-icd10 { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cw-terms { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.cw-term { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-term-l { flex: 1 1 auto; min-width: 0; }
.cw-term-c { font-size: 9px; color: var(--dimmer); }
.cw-sddmap { margin: 4px 0 8px; }
/* THE PREVIOUS VISITS, read back from the clinic's FHIR store. */
.cw-visit { border-left: 2px solid var(--rule); padding: 4px 8px; margin: 4px 0; }
.cw-visit-h { font-size: 11px; color: var(--dim); }
.cw-visit-l, .cw-visit-p { font-size: 12px; }
.cw-fhir.is-kept { color: var(--teal); }
.cw-fhir.is-held { color: var(--amber); }
.btn.is-on { border-color: var(--teal); color: var(--teal); }
.btn-warn { background: rgba(255,209,122,0.14); border-color: var(--amber); color: var(--amber-ink); font-weight: 600; }
.cw-issued { font: 600 10px/1.3 var(--mono); color: var(--teal); letter-spacing: 0.06em; }
.cw-rec-on { color: var(--red); font-size: 12px; }
.cw-sheet { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cw-line { font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.cw-check { padding: 6px 8px; border-left: 3px solid var(--line); background: var(--panel-2); }
.cw-check.is-stop { border-left-color: var(--red); color: var(--red-ink); }
.cw-check.is-warn { border-left-color: var(--amber); color: var(--amber-ink); }
.cw-signed { color: var(--teal); font-weight: 600; }
.cw-picked { color: var(--teal-2); font-size: 12px; }

/* 🩺 THE TWO TRACKS (AWS-96 Phase 2): the tray's count, its list, and the
   earlier patient's review under a band that names them. Key words are lit by
   kind; every word stays on the page. */
.cw-traybar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cw-traybtn.has-ready { border-color: var(--amber); color: var(--amber-ink); }
.cw-tray-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cw-tray { width: 100%; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; background: var(--panel); }
.cw-tray-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line-soft); }
.cw-tray-who { color: var(--ink); font-size: 13px; }
.cw-tray-st { color: var(--dim); font-size: 10px; letter-spacing: 0.06em; }
.cw-speak { margin-left: 4px; }
.cw-review { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.cw-review-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r);
  border: 2px solid var(--amber); background: rgba(255,209,122,0.10); }
.cw-review-who { font: 600 12px/1.3 var(--mono); letter-spacing: 0.06em; color: var(--amber-ink); }
.cw-review-date { margin-left: auto; color: var(--dim); font-size: 11px; }
.cw-story-t { white-space: pre-wrap; color: var(--ink); font-size: 13px; line-height: 1.5; }
.cw-k { border-radius: 3px; padding: 0 2px; color: var(--accent-ink); font-weight: 600; }
.cw-k-side { background: var(--amber); }
.cw-k-negative { background: var(--red); }
.cw-k-number { background: var(--teal); }
.cw-k-medicine { background: var(--map-numb); }

/* The stacked desk page (a phone) draws the Leads board inside its own section
   (#fd-mobile-leads, 2 Nov): the table reads as cards there. The page's layout,
   not the screen's, so it sits outside the folded leads block. */
@media (max-width: 700px) {
  #fd-mobile-leads .ld-table, #fd-mobile-leads .ld-table tbody, #fd-mobile-leads .ld-row, #fd-mobile-leads .ld-table td { display: block; min-width: 0; width: auto; }
  #fd-mobile-leads .ld-table thead { display: none; }
  #fd-mobile-leads .ld-row { padding: 12px 0; border-bottom: 2px solid var(--line); }
  #fd-mobile-leads .ld-table-wrap { overflow: visible; }
  #fd-mobile-leads .ld-registration-review { min-width: 0; }
}

/* Clinic connection controls share the console palette and 44px targets. */
.fd-connections{overflow-wrap:anywhere}.fd-connections .fd-cb{padding:16px;margin:16px 0;border:1px solid var(--line);border-radius:var(--r-l);background:var(--panel)}
.fd-connections label{display:block;margin:12px 0;color:var(--ink)}
.fd-connections .fd-cb-in:not([type=checkbox]){display:block;width:100%;min-height:44px;box-sizing:border-box;font:inherit;background:var(--sunk);color:var(--ink);border:1px solid var(--rule);border-radius:var(--r);padding:8px}
.fd-connections input[type=checkbox]{width:22px;height:22px;accent-color:var(--teal)}
.fd-connections .fd-cb-btn{min-height:44px;max-width:100%;white-space:normal;font:inherit;background:var(--teal);color:var(--accent-ink);border:0;border-radius:var(--r);padding:8px 14px;margin:8px 8px 8px 0}
.fd-connections .fd-cb-said{white-space:pre-line}.fd-connections :focus-visible,.fd-connections [role=status]:focus{outline:3px solid var(--teal);outline-offset:3px}

.fd-checkin-qr{display:block;width:min(100%,32rem);height:auto;aspect-ratio:1;background:#fff;border:8px solid #fff}


/* ONE LINE PER FOLDER (Dr Lau, 11 November): the acts ride the number's
   line as symbols, their words on hover; the wait sits at the end. */
.wr-row .wr-head { flex-wrap: nowrap; min-width: 0; }
.wr-row .wr-head .wr-acts { order: 1; margin-left: auto; display: flex; gap: 4px;
  flex: 0 1 auto; min-width: 0; align-items: center; }
.wr-row .wr-head .wr-wait { order: 2; flex: none; }
.wr-row .wr-head .wr-acts { flex-wrap: nowrap; }
.wr-row .wr-head > * { flex-shrink: 0; }
.wr-row .wr-head { gap: 5px; }
.wr-row .wr-head .wr-acts { gap: 3px; }
.wr-row .wr-head .wr-acts > .wr-type { min-width: 0; max-width: none; width: 46px; flex: none; padding: 0 0 0 4px;
  min-height: 0; height: 26px; appearance: none; -webkit-appearance: none; background-image: none; }
.wr-row .wr-head .wr-acts .btn { width: 26px; height: 26px; padding: 0; min-height: 0; min-width: 0;
  display: grid; place-items: center; }

/* THE ACTIONS ROW (Dr Lau, 11 Nov, choice A): thin, symbol beside one word. */
.dk-actions .dk-action { flex-direction: row; align-items: center; justify-content: center;
  gap: 6px; min-height: 0; height: 34px; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.dk-actions .dk-action .dk-action-i { font-size: 15px; flex: none; }
.dk-actions .dk-action .dk-action-l { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
/* THE ORDERS TILES: symbol and word, the rest on hover. */
.or-tile { min-height: 0; padding: 6px 10px; }

/* A ROW WITH ACTS GIVES ITS WAIT TO THE NUMBER'S HOVER (11 Nov), so the
   line never overlaps; a row without acts keeps it at the end. */
.wr-row .wr-head:has(.wr-acts) .wr-wait { display: none; }

/* A SHORT WORD DRAWN OVER THE WHOLE NAME (11 Nov). */
.has-short { font-size: 0 !important; }
.has-short::after { content: attr(data-short); font-size: 12px; }

/* THE DESK'S NOTICES, ONE LINE EACH (11 Nov). */
.dk-notice-one { align-items: center; }
.dk-notice-one .dk-notice-t.has-short::after { font: 12px var(--mono, ui-monospace), monospace; }

/* THE GRIP ON A BOTTOM CORNER'S TOP EDGE: drag to resize it against the box above. */
.dk-corner { position: relative; }
.dk-grip { position: absolute; left: 30%; right: 30%; top: 0; height: 9px; cursor: row-resize;
  z-index: 3; touch-action: none; }
.dk-grip::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 3px;
  border-radius: 2px; background: var(--rule); }
.dk-grip:hover::after { background: var(--teal); }

/* ONE WIDTH PER SIDE, PINNED-TILE RAILS, AND A TALLER HEADER (11 Nov). */
.home.is-desk, .deskenc { --dk-pin-w: 52px;
  grid-template-columns: var(--dk-pl,) var(--dk-left-track, var(--dk-lw, var(--dk-side-width))) minmax(0, 1fr) var(--dk-right-track, var(--dk-rw, var(--dk-side-width))) var(--dk-pr,) var(--dk-sr,); }
/* THE ENCOUNTER PAGE HAS NO RIGHT COLUMN (Dr Lau, 20 Nov, ticket #1182:
   "pls remove the empty space on the right"). Its folder cards went the same
   day ("remove these"), and the column they sat in stayed: 369px of nothing
   at 1780. The centre -- the writing board -- takes it. */
.deskenc.dk-enc-layout {
  grid-template-columns: var(--dk-pl,) var(--dk-left-track, var(--dk-lw, var(--dk-side-width))) minmax(0, 1fr) var(--dk-pr,) var(--dk-sr,); }
.dk-left-rail { grid-column: tl; }
.dk-right-rail { grid-column: tr; }
.dk-pins-left-folded { --dk-pin-w: 18px; }
.dk-pins-right-folded { --dk-pin-w: 18px; }
.dk-pins { grid-row: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-height: 0;
  padding: 4px 3px; border: 1px dashed var(--rule); border-radius: 10px; overflow-y: auto; }
.dk-pins-left { grid-area: pl; } .dk-pins-right { grid-area: pr; }
.dk-setrail { grid-area: sr; grid-row: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-height: 0;
  padding: 4px 3px; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); overflow-y: auto; }
.dk-setrail.is-folded { padding: 4px 0; }
/* The settings rail's symbols at the foot of the closed right rail -- one
   bar on the right while its cards are closed (15 Nov). */
.dk-setrail-in { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto;
  padding-top: 6px; border-top: 1px solid var(--rule); }
.dk-setrail-in .dk-setrail-gap { display: none; }
/* The folded side rail's panels as symbols, the names on hover (13 Nov). */
.dk-side-rail-tab.dk-side-rail-sym { flex: 0 0 auto; min-block-size: 44px; writing-mode: horizontal-tb; transform: none;
  font-family: inherit; font-size: 20px; letter-spacing: 0; text-transform: none; }
.dk-pin { border: 1px solid var(--hush); border-radius: 8px; background: var(--panel);
  font-size: 16px; cursor: pointer; padding: 0; }
.dk-pin:hover { border-color: var(--teal-2); }
.dk-pins-fold { border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 14px; padding: 0; }
/* Pinned tiles inside a folded side's own rail -- one rail a side. */
.dk-rail-pins { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.dk-rail-pins[hidden] { display: none; }
.dk-wgrip { position: absolute; top: 0; height: 100%; width: 9px; cursor: col-resize; z-index: 3; touch-action: none; }
.dk-wgrip-l { right: -2px; } .dk-wgrip-r { left: -2px; }
.dk-wgrip::after { content: ''; position: absolute; top: 35%; height: 30%; left: 3px; width: 3px; border-radius: 2px; background: var(--rule); }
/* THE SYMBOL RAILS WIDEN from their inner edge (13 Nov); wide, each symbol
   shows its words. */
.dk-side-rail, .dk-setrail { position: relative; }
.dk-railgrip { position: absolute; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 3; touch-action: none; }
.dk-railgrip-l { right: -1px; } .dk-railgrip-r { left: -1px; }
.dk-railgrip::after { content: ''; position: absolute; top: 40%; height: 20%; left: 3px; width: 3px; border-radius: 2px; background: var(--rule); }
.dk-railgrip:hover::after { background: var(--teal); }
.dk-rail-word { display: none; }
.dk-wgrip:hover::after { background: var(--teal); }
.dk-hgrip { height: 9px; flex: 0 0 auto; cursor: row-resize; position: relative; touch-action: none; }
.dk-hgrip::after { content: ''; position: absolute; left: 35%; right: 35%; top: 3px; height: 3px; border-radius: 2px; background: var(--rule); }
.dk-hgrip:hover::after { background: var(--teal); }
/* THE FOLD ARROW ON THE HEADING'S OWN LINE, outlined in teal. */
.dk-corner-h:has(.dk-side-collapse) { flex-wrap: nowrap; }
.dk-side-collapse { border-color: var(--teal); color: var(--teal); }
/* A short settings name the same size as the rest. */
.dk-tile .has-short::after { font-size: 13.3px; }
/* NEW YELLOW, REPEAT GREEN, UNKNOWN TEAL. */
.wk-new .wk-e-n { color: #e3c454; }
.wk-repeat .wk-e-n { color: #6cc38e; }
.wk-visit-unknown .wk-e-n { color: var(--teal); }
.dk-corner-t { white-space: nowrap; }

/* EVERY RAIL SYMBOL SMALL AND ONE STANDARD SIZE (Dr Lau, 20 Nov 2026, #1194:
   "keep all the symbols small and standard size"). One rule for every symbol
   on every rail -- the pinned tiles, the settings rail and its 🌴 and ⚙️ at
   the foot, the folded side rails, the home page's left rail, the writing
   board's left and right symbols on the page's rails, parked or in the
   folded strip: a --tap square (44px) holding the symbol alone, centred.
   The name is the button's title and aria-label; the words are never drawn
   on the rail, widened or not. Counts and the drag grip keep their corners.
   Each rail is that square plus its 3px padding and 1px border (52px). */
.dk-pin, .dk-side-rail-tab.dk-side-rail-sym, .wb-rail .wb-sym, .wb-rrail .wb-sym {
  box-sizing: border-box; flex: 0 0 var(--tap); width: var(--tap); height: var(--tap);
  min-width: var(--tap); min-height: var(--tap); min-block-size: var(--tap); max-width: var(--tap);
  align-self: center; padding: 0; gap: 0;
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center;
  writing-mode: horizontal-tb; transform: none; overflow: hidden; }
.dk-rail-word, .wb-rail .wb-sym-l, .wb-rrail .wb-sym-l { display: none !important; }
.dk-setrail-in, .dk-rail-pins, .dk-lrail-tools, .dk-setrail-tools, .dk-seatsyms { align-items: center; gap: 4px; }

/* ── chat.js's own (LE-48, Parcel A) — appended from its fragment ─────────── */
/* chat.js — the messenger surface. LE-48 Parcel A.
   A FRAGMENT, appended to app.css by the integrating session; not linked on
   its own. Values are app.css's own tokens wherever a token exists, and the
   mock-up's own literals (design/ChatHome.dc.html, ChatEncounter.dc.html,
   ChatMenu.dc.html) where none does — those artboards ARE app.css's
   palette, carried as inline hex because a static mock-up loads no
   stylesheet of its own.

   Class prefix ch-, and every selector in this file starts with it: a
   fragment appended into a much larger sheet must not be able to redefine
   something it was never told about. */

.ch-root { display: flex; flex-direction: column; height: 100%; min-height: 0; position: relative; }

/* ── the stream ──────────────────────────────────────────────────────── */
.ch-stream {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 12px 10px;
}

.ch-bot, .ch-me, .ch-sys, .ch-brand-slot { flex: 0 0 auto; }

.ch-bot {
  align-self: flex-start; max-width: 86%;
  padding: 10px 13px; border-radius: 14px 14px 14px 4px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.45; color: var(--ink);
}
.ch-me {
  align-self: flex-end; max-width: 86%;
  padding: 10px 13px; border-radius: 14px 14px 4px 14px;
  background: rgba(79,214,200,0.12); border: 1px solid rgba(79,214,200,0.3);
  font-size: 14px; line-height: 1.45; color: var(--ink);
}
.ch-sys {
  align-self: center; text-align: center; max-width: 84%;
  font-size: 11.5px; line-height: 1.4; color: var(--dim);
}
.ch-from {
  display: block; font-size: 8.5px; letter-spacing: 0.16em; color: var(--label);
  margin-bottom: 4px;
}

/* ── a full-width card ───────────────────────────────────────────────── */
.ch-card {
  align-self: stretch; padding: 12px 13px; border-radius: var(--r-l);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.ch-card.ch-ask { background: rgba(224,164,74,0.06); border-color: rgba(224,164,74,0.3); }

/* ── chips, under the last bot bubble ───────────────────────────────── */
.ch-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.ch-chip {
  min-height: 44px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--sunk); border: 1px solid var(--line);
  font-family: var(--display); font-size: 13px; color: var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ch-chip.ch-on { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
.ch-chip-n { font-size: 11px; color: var(--teal); }
.ch-chip:active { transform: scale(.97); filter: brightness(1.25); }
.ch-chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── a voice bubble ──────────────────────────────────────────────────── */
.ch-voice { display: flex; align-items: center; gap: 10px; }
.ch-play {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,214,200,0.16); border: 1px solid rgba(79,214,200,0.45); color: var(--teal);
}
.ch-play.ch-rec { background: rgba(224,90,74,0.16); border-color: rgba(224,90,74,0.55); color: #ff8a7a; }
.ch-wave { display: flex; align-items: center; gap: 2px; height: 22px; }
.ch-wave .ch-bar { display: block; width: 3px; border-radius: 2px; background: var(--teal); opacity: 0.75; }
.ch-wave.ch-rec .ch-bar { background: #ff8a7a; }
.ch-len { font-size: 11px; color: var(--dim); }
.ch-len.ch-rec { color: #ff8a7a; }
.ch-words { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; }
.ch-tag { font-size: 8.5px; letter-spacing: 0.14em; color: var(--label); margin-top: 4px; }
.ch-state-recording .ch-tag { color: #ff8a7a; }

/* ── the pinned row, above the composer ──────────────────────────────── */
.ch-pinned { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 12px 0; }
.ch-pinned[hidden] { display: none; }
.ch-btn {
  flex: 1 1 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--sunk);
  font-family: var(--display); font-size: 14px; color: var(--ink); text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ch-btn.ch-go   { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5); color: var(--teal); font-weight: 600; }
.ch-btn.ch-warn { background: rgba(224,164,74,0.08); border-color: rgba(224,164,74,0.35); color: var(--amber-ink); }
.ch-btn.ch-stop { background: rgba(224,90,74,0.10); border-color: rgba(224,90,74,0.4); color: var(--red-ink); }
.ch-btn:active { transform: scale(.97); filter: brightness(1.25); }
.ch-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── the composer ─────────────────────────────────────────────────────── */
.ch-composer {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line); background: rgba(4,9,10,0.82);
}
.ch-ctl {
  flex: 0 0 auto; width: 44px; height: 44px; min-height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,214,200,0.1); border: 1px solid rgba(79,214,200,0.3); color: var(--teal);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ch-ctl.ch-quiet { background: transparent; border-color: var(--line); color: var(--dim); }
.ch-ctl.ch-mic  { background: rgba(224,90,74,0.12); border-color: rgba(224,90,74,0.4); color: #ff8a7a; }
.ch-ctl.ch-live { background: rgba(224,90,74,0.22); border-color: rgba(224,90,74,0.6); color: #ff8a7a; }
.ch-ctl.ch-send { background: rgba(79,214,200,0.2); border-color: rgba(79,214,200,0.55); }
.ch-ctl:active { transform: scale(.97); filter: brightness(1.25); }
.ch-ctl:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ch-icon { display: flex; align-items: center; justify-content: center; line-height: 0; }

.ch-field {
  flex: 1 1 auto; min-width: 0; min-height: 44px;
  padding: 10px 14px; border-radius: 22px;
  background: var(--sunk); border: 1px solid var(--line);
  font-family: var(--display); font-size: 14px; color: var(--ink);
}
.ch-field::placeholder { color: var(--dimmer); }
.ch-field.ch-typing { border-color: rgba(79,214,200,0.3); }
.ch-field:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.ch-file-input { display: none; }

/* ── the branding card, lower quarter ────────────────────────────────── */
.ch-brand-slot { margin-top: auto; align-self: stretch; }
.ch-brand {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 16px 14px; border-radius: var(--r-l);
  background: rgba(7,15,16,0.55); border: 1px solid var(--line-soft);
}
.ch-brand-mark { display: flex; align-items: center; gap: 10px; }
.ch-brand-s {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,214,200,0.14); border: 1px solid rgba(79,214,200,0.4);
  font-size: 15px; font-weight: 600; color: var(--teal);
}
.ch-brand-lines { min-width: 0; }
.ch-brand-name { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -0.01em; line-height: 1; }
.ch-brand-sub { font-size: 9px; letter-spacing: 0.18em; color: var(--teal); margin-top: 4px; }
.ch-brand-line { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ch-brand-foot { font-size: 9px; letter-spacing: 0.12em; color: var(--dimmer); }

/* ── the bottom sheet ────────────────────────────────────────────────── */
.ch-sheet-wrap {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4,9,10,0.62);
}
.ch-sheet-wrap[hidden] { display: none; }
.ch-sheet {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px 12px calc(16px + var(--safe-b));
  border-radius: 18px 18px 0 0;
  background: #071012; border-top: 1px solid rgba(79,214,200,0.2);
  box-shadow: var(--z2);
  max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.ch-grab { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: rgba(79,214,200,0.25); flex: 0 0 auto; }
.ch-sheet-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-sheet-t { font-weight: 600; font-size: 15px; color: #fff; }

.ch-grp-h { display: flex; gap: 10px; align-items: baseline; padding-bottom: 4px; border-bottom: 1px solid var(--hush); }
.ch-grp-t { font-weight: 600; font-size: 12px; color: var(--ink); letter-spacing: 0.01em; }
.ch-grp-n { font-size: 10px; color: var(--dimmer); }
.ch-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ch-key {
  min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  padding: 8px 9px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--rule);
  font-family: var(--display); font-size: 12.5px; line-height: 1.2; color: var(--ink); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ch-key.ch-go   { border-color: rgba(79,214,200,0.5); background: rgba(79,214,200,0.12); color: var(--teal); font-weight: 600; }
.ch-key.ch-more { border-style: dashed; color: var(--dim); cursor: pointer; }
.ch-key.ch-away { cursor: default; opacity: .62; }
.ch-key:active  { transform: scale(.97); filter: brightness(1.25); }
.ch-key:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ch-key .ch-tag { margin-top: 1px; color: var(--amber); }

.ch-sheet-cancel {
  min-height: 44px; margin-top: 3px;
  padding: 11px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line);
  font-family: var(--display); font-size: 14px; color: var(--dim);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ch-sheet-cancel:active { transform: scale(.97); filter: brightness(1.25); }

/* A patient row picked up whole (14 Nov). */
.wr-drag { cursor: grab; }
.wr-drag:active { cursor: grabbing; }

/* 14 Nov, Dr Lau: "move to first row of the card; all symbols". The title,
   the station symbols and ⇅ ⇄ ⚙ share the waiting room's first row. */
.fd-centre-room { position: relative; }
.fd-centre-room-h { position: absolute; margin: 0; top: 22px; left: 14px; }
.fd-centre-room-head .fd-centre-room-h { position: static; margin: 0; }
.fd-centre-room-head .fd-rt-docs { display: inline-flex; gap: 6px; align-items: center; margin-right: auto; }
.fd-rt-doc { border: 1px solid currentColor; border-radius: 999px; padding: 1px 9px; font: 600 0.6875rem/1.5 var(--mono, ui-monospace, Menlo, monospace); letter-spacing: .08em; }
.fd-rt-doc.fd-doc-c0 { color: var(--teal); }
.fd-rt-doc.is-out { border-style: dashed; opacity: .55; }
.fd-centre-room.is-occupied .fd-rt-docs { display: none; }
.fd-st-head-lead { display: flex; align-items: center; }
.fd-st-head .fd-room-tools { margin: 0 8px 0 auto; }
.fd-rail-foot .fd-setting-btn { width: 36px; min-width: 36px; height: 36px; min-height: 36px; align-self: center; font-size: 1rem; border-radius: 8px; }

/* 14 Nov: cards drag by their heading, swap, and take a rail icon. */
.fd-card-handle { cursor: grab; }
.fd-stk.is-drop, .fd-centre-room.is-drop { outline: 2px dashed var(--teal-2); outline-offset: 2px; }
.fd-centre-room.is-swapped, .fd-stk.is-swapped { flex: 1 1 0; min-height: 0; overflow: auto; }
.fd-occupy { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fd-occupy-back { flex: 0 0 auto; margin-left: 6px; }
.fd-stk.is-folded .fd-occupy { display: none; }
.fd-centre-room-h .fd-occupy-back { float: right; }
.fd-occupy-b { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* The encounter body map's picture picker: one select, the body diagram chosen. */
.dg-pickrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; color: var(--dim); }
.dg-picker { min-height: var(--tap); background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 0 10px; max-width: 100%; }
/* THE MODEL & CONTEXT BOARD (16 Nov, ticket 6) */
.wb-model { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; margin: 6px 0; max-height: 46vh; overflow: auto; }
.inf-h { font-weight: 600; margin-bottom: 4px; }
.inf-withheld { color: var(--dim); font-size: 13px; margin-bottom: 6px; }
.inf-dx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.inf-chip { border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; background: none; color: var(--ink); cursor: pointer; }
.inf-chip.is-on { border-color: var(--teal); color: var(--teal); }
.inf-tier { margin: 6px 0; }
.inf-th { font-weight: 600; font-size: 13px; }
.inf-item { display: flex; gap: 8px; font-size: 13px; }
.inf-src { color: var(--dim); min-width: 64px; }
.inf-k, .inf-said { color: var(--dim); font-size: 13px; }
.inf-pre { white-space: pre-wrap; font-size: 12px; max-height: 30vh; overflow: auto; }
/* THE SOURCE'S COLOUR (16 Nov): board teal, recording blue, amendment amber,
   carried grey, background grey, his comment rose. */
.ans-src.is-direct, .inf-src.is-direct { border-color: var(--teal); color: var(--teal); }
.ans-src.is-rec, .inf-src.is-rec { border-color: var(--map-numb); color: var(--map-numb); }
.inf-src.is-amd { color: var(--amber); }
.ans-src.is-carried { color: var(--dim); }
.ans-src.is-comment, .inf-src.is-comment { border-color: var(--red-ink); color: var(--red-ink); }
.inf-src.is-bg { color: var(--dim); }
.inf-tier { border-left: 3px solid var(--rule); padding-left: 8px; }
.inf-tier.is-direct { border-left-color: var(--teal); }
.inf-tier.is-rec { border-left-color: var(--map-numb); }
.inf-tier.is-comment { border-left-color: var(--red-ink); }
.ans-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ans-legend .ans-src { cursor: default; font-size: 12px; }
.ans-ln.is-commented .ans-text { text-decoration: underline wavy var(--red-ink); }
.ans-cbar, .ans-comment { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.ans-cq { color: var(--dim); font-style: italic; }
.ans-ct { color: var(--red-ink); }
.ans-cin { flex: 1; min-width: 200px; min-height: var(--tap); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 0 8px; }
.ans-cx { background: none; border: 0; color: var(--dim); cursor: pointer; min-width: var(--tap); min-height: var(--tap); }
.inf-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
/* THE MODEL PANEL AND THE BOARD: stacked (2×1) or side by side (1×2), 16 Nov */
.wb-panes { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.wb-boardcol { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; }
.wb-panes.is-cols { flex-direction: row; align-items: stretch; }
.wb-panes.is-cols > * { flex: 1 1 0; min-width: 0; }
.wb-panes.is-cols > .wb-modelpane > .wb-model { max-height: none; margin: 0; overflow: auto; flex: 1; }
/* BRING IN (16 Nov): a symbol dropped here brings its data onto the board */
/* Ticket #1195 (option B): ➕ Bring in and ⭐ Favourites at the toolbar's right end, each a drop-down over the board. */
.wb-tb-end { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.wb-tb-pop { position: relative; display: inline-flex; }
.wb-bring-menu { position: absolute; top: 100%; left: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; width: min(360px, 80vw); padding: 6px; margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.wb-bring-menu[hidden] { display: none; }
.wb-bps { display: flex; align-self: flex-start; }
/* 23 Nov (#1239): the profile opens INSIDE the writing board, at its upper part, as a Bring in -- in the flow under the toolbar, never a drop-down below the board. */
.wb-bps-b { position: static; flex: 0 1 auto; min-height: 0; max-height: 45%; overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--teal); border-radius: var(--r); }
.wb-bps-b[hidden] { display: none; }
/* the Bring in row: below the board text, a 44px dotted row (ticket #1195, "use dot line") */
.wb-bring { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; height: 44px; flex: 0 0 auto; box-sizing: border-box; border: 2px dotted var(--line); border-radius: var(--r); padding: 0 8px; }
.wb-bring.is-over { border-color: var(--teal); background: var(--selected-bg); }
.wb-bring-add { background: none; border: 0; color: var(--teal); font-weight: 700; cursor: pointer; min-height: var(--tap); padding: 0 4px; }
.wb-modelbtn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.wb-bring-srcs { display: flex; gap: 4px; align-items: center; overflow-x: auto; min-width: 0; }
.wb-src { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 99px; padding: 0 2px 0 8px; white-space: nowrap; color: var(--ink); }
.wb-src-x { background: none; border: 0; color: var(--dim); cursor: pointer; min-width: 32px; min-height: 32px; }
/* the board's scroll area holds the editor and the Bring in row */
.wb-boardcol > .wb-scroll { flex: 1 1 auto; min-height: 120px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
/* (until 23 Nov the row followed the text down, never pinned; his #1239 ruling replaces that) */
/* 23 Nov (#1239): the Bring in bar is the board's LAST line; the board text grows above it and the area scrolls when it must. */
.wb-scroll > .wb-editor { flex: 1 0 auto; overflow: visible; min-height: 120px; }
/* 25 Nov (ticket 1): the bar sits UNDER the scroll area, never over the text being typed. */
.wb-boardcol > .wb-bring { flex: 0 0 auto; background: var(--panel); }
.wb-boardcol { position: relative; }
.wb-boardcol > .wb-scroll { overflow-y: auto; scrollbar-gutter: stable; }
/* the board column's teal edge, only while a list or a panel's symbol is dragged over it */
.wb-boardcol.is-over { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: var(--r); background: var(--selected-bg); }
.wb-bring-chip { min-height: var(--tap); padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
/* THE TWO PANES' HANDLES (16 Nov) */
.wb-pane, .wb-modelpane { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.wb-pane-h { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.wb-pane-t { flex: 1; }
.wb-pane-grip { cursor: grab; }
.wb-pane-swap { background: none; border: 1px solid var(--line); border-radius: var(--r); color: var(--dim); min-width: var(--tap); min-height: 32px; cursor: pointer; }
/* STACKED WITH THE MODEL OPEN (16 Nov, found by rendering): the model pane
   takes at most 45% and scrolls inside, the board shrinks to a third of its
   floor, so Send and Inference stay on the card. */
.wb-panes.is-rows > .wb-modelpane:not([hidden]) { max-height: 45%; flex: 0 1 auto; }
.wb-panes.is-rows > .wb-modelpane > .wb-model { max-height: none; flex: 1 1 auto; min-height: 0; overflow: auto; }
.wb-panes.is-rows > .wb-modelpane:not([hidden]) ~ .wb-boardcol > .wb-scroll,
.wb-panes.is-rows > .wb-boardcol:has(~ .wb-modelpane:not([hidden])) > .wb-scroll,
.wb-panes.is-rows > .wb-modelpane:not([hidden]) ~ .wb-boardcol .wb-scroll > .wb-editor,
.wb-panes.is-rows > .wb-boardcol:has(~ .wb-modelpane:not([hidden])) .wb-scroll > .wb-editor { min-height: 80px; }
.wb-boardcol, .wb-panes { min-height: 0; }
.wb-panes { overflow-y: auto; }
.wb-panes.is-cols { overflow-y: hidden; }
.wb-boardcol > .wb-foot { position: sticky; bottom: 0; background: var(--panel); padding: 4px 0; z-index: 1; }
.wb-pane-when { color: var(--dim); margin-left: 8px; font-variant-numeric: tabular-nums; }
/* TICKET 7: the token bar, each item's tick and tokens, the answer's length and task */
.inf-bar-t { display: flex; height: 10px; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); margin: 4px 0; }
.inf-bar-s { display: block; height: 100%; }
.inf-bar-s.is-ins { background: var(--dim); }
.inf-bar-s.is-direct { background: var(--teal); }
.inf-bar-s.is-rec { background: var(--map-numb); }
.inf-bar-s.is-bg { background: var(--hush); }
.inf-bar-s.is-comment { background: var(--red-ink); }
.inf-bar-l { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.inf-bar-k.is-direct { color: var(--teal); } .inf-bar-k.is-rec { color: var(--map-numb); } .inf-bar-k.is-comment { color: var(--red-ink); }
.inf-out, .inf-srcs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.inf-seg { display: inline-flex; gap: 4px; }
.inf-form { min-height: var(--tap); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); }
.inf-item { align-items: baseline; }
.inf-item.is-off .inf-text { text-decoration: line-through; color: var(--dim); }
.inf-tick { width: 18px; height: 18px; flex: none; }
.inf-tok { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.inf-fields { display: flex; flex-direction: column; gap: 6px; }
.inf-field { display: flex; gap: 8px; align-items: center; }
.inf-fn { min-width: 140px; color: var(--dim); }
.inf-fv { flex: 1; min-height: var(--tap); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 0 8px; }
/* TICKET 7, HIS TEMPLATE (16 Nov): the window line, the tiers as numbered
   cards on the left, the instruction broken down on the right. */
.inf-win { color: var(--dim); font-size: 13px; }
.inf-bar-t { height: 14px; background: var(--sunk); }
.inf-dot { color: var(--dim); }
.inf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 8px; }
.inf-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inf-card { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin: 0; }
.inf-tier.inf-card { border-left-width: 1px; }
.inf-card .inf-th { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.inf-num { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 99px; background: var(--hush); color: var(--bg); font-size: 13px; font-weight: 700; }
.inf-tier.is-direct .inf-num { background: var(--teal); }
.inf-tier.is-rec .inf-num { background: var(--amber); }
.inf-tier.is-comment .inf-num { background: var(--red-ink); }
.inf-tag { color: var(--teal); }
.inf-ttok { margin-left: auto; color: var(--dim); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.inf-card .inf-item, .inf-insrow { display: grid; grid-template-columns: 9em minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 3px 0; }
.inf-card .inf-src { min-width: 0; }
.inf-right { display: inline-flex; gap: 6px; align-items: center; justify-self: end; color: var(--dim); }
/* THE PANEL, ARRANGED (24 Nov, his "looks messy ... use slim buttons, all
   explanatory note on the right upper corner help symbol"): one label column,
   one thin bar, what is sent as rows that open; two columns only when the
   panel itself is wide. */
.inf-set { position: relative; container-type: inline-size; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inf-set .inf-helpbar { position: absolute; top: 0; right: 0; z-index: 1; }
.inf-set .inf-help { margin-right: 40px; }
.inf-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inf-set .inf-col { gap: 10px; }
.inf-meter { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inf-set .inf-win { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding-right: 40px; min-height: 28px; align-items: center; }
.inf-fig { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inf-set .inf-bar-t { height: 6px; margin: 0; }
.inf-set .inf-bar-l { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 0; }
.inf-bar-c { display: flex; flex-direction: column; min-width: 0; }
.inf-bar-w { font-size: 11px; color: var(--dim); white-space: nowrap; }
.inf-set .inf-bar-k { font-size: 12px; font-variant-numeric: tabular-nums; }
.inf-rows { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.inf-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 6px; align-items: start; justify-items: start; }
.inf-row-k { font-size: 12px; line-height: 26px; white-space: nowrap; }
.inf-row-c { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inf-set .inf-srcs, .inf-set .inf-dx { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0; min-width: 0; }
.inf-set .inf-dx .inf-k { line-height: 26px; font-size: 12px; }
.inf-set .inf-chip { font-size: 13px; line-height: 1.2; padding: 4px 10px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.inf-set .inf-chip.is-on { background: color-mix(in srgb, var(--teal) 12%, transparent); }
.inf-sym[data-state="empty"], .inf-sym[data-state="unread"], .inf-sym[data-state="reading"] { color: var(--dim); border-style: dashed; }
.inf-sym-q { color: var(--amber); }
/* one joined switch, one line */
.inf-set .inf-seg { display: inline-flex; gap: 0; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; max-width: 100%; }
.inf-set .inf-seg .inf-chip { border: 0; border-radius: 0; border-left: 1px solid var(--rule); flex: 0 1 auto; padding-left: 9px; padding-right: 9px; font-size: 12.5px; }
.inf-set .inf-seg .inf-chip:first-child { border-left: 0; }
.inf-set .inf-seg .inf-chip.is-on { background: var(--teal); color: var(--bg); font-weight: 600; }
.inf-facenote { font-size: 12px; }
.inf-acc { display: flex; flex-direction: column; min-width: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.inf-acc-h { font-size: 11px; letter-spacing: .14em; color: var(--dim); padding-bottom: 4px; }
.inf-set .inf-tier, .inf-set .inf-ins, .inf-set .inf-sent { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line); }
.inf-set .inf-th { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 2px 0; margin: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.inf-set .inf-tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-set .inf-num { min-width: 18px; width: 18px; height: 18px; font-size: 11px; flex: none; }
.inf-set .inf-num.is-none { background: none; }
.inf-set .inf-tier.is-bg .inf-num { background: var(--dim); }
.inf-set .inf-ttok { margin-left: 0; white-space: nowrap; }
.inf-caret { color: var(--dim); font-size: 11px; width: 10px; flex: none; }
.inf-tb { padding: 0 0 6px 26px; min-width: 0; }
.inf-tb[hidden] { display: none; }
.inf-set .inf-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; cursor: pointer; }
.inf-set .inf-idrow { grid-template-columns: auto minmax(0, 1fr); cursor: default; }
.inf-set .inf-item .inf-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-set .inf-item .inf-src { min-width: 0; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-set .inf-tick { width: 15px; height: 15px; min-height: 0; margin: 0; }
.inf-tid { font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace; font-size: 12px; }
.inf-set .inf-item.is-off .inf-src { text-decoration: line-through; }
.inf-pick { display: flex; gap: 6px; align-items: center; padding: 2px 0 4px; }
.inf-pick-n { flex: 1; font-size: 12px; }
.inf-set .inf-pick-b { font-size: 12px; padding: 2px 9px; }
.inf-set .inf-insrow { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 13px; }
.inf-set .inf-insrow .inf-text { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-mark { font-size: 11px; color: var(--dim); border: 1px solid var(--rule); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.inf-mark.is-yours { color: var(--teal); border-color: var(--teal); }
.inf-insacts { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.inf-set .inf-inspre { margin: 6px 0; }
@container (min-width: 600px) {
  .inf-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .inf-body > .inf-acc { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 16px; }
  .inf-body > .inf-acc > .inf-acc-h { min-height: 28px; display: flex; align-items: center; padding-right: 40px; }
  .inf-set .inf-win { padding-right: 0; }
}
/* slim where a pointer hovers; a finger keeps its full target */
@media (hover: hover) and (pointer: fine) {
  .inf-set .inf-chip { min-height: 26px; height: 26px; padding-top: 0; padding-bottom: 0; }
  .inf-set .inf-pick-b { min-height: 22px; height: 22px; }
  .inf-set .inf-helpb { min-height: 28px; height: 28px; min-width: 28px; padding: 0; }
}
/* Settings, Instructions to LLM */
.llm { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.llm-k { color: var(--dim); font-size: 13px; }
.llm-ta { width: 100%; box-sizing: border-box; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; font: inherit; line-height: 1.45; resize: vertical; }
.llm-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.llm-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.llm-ask { border: 1px solid var(--amber); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.llm-ask[hidden] { display: none; }
.llm-ask-t { font-weight: 600; }
.llm-pre { white-space: pre-wrap; font-size: 12px; margin: 0; padding: 8px 10px; border-radius: var(--r); background: var(--sunk); border: 1px solid var(--line); max-height: 30vh; overflow: auto; }
.llm-next { border-left: 3px solid var(--teal); }
.llm-said { color: var(--dim); font-size: 13px; }
.llm-fixed-h { cursor: pointer; font-size: 13px; color: var(--dim); }
.inf-idrow .inf-withheld { margin: 0; }
.inf-inspre { border-left: 3px solid var(--teal); padding-left: 10px; margin: 8px 0; max-height: 26vh; }
@media (max-width: 1200px) { .inf-grid { grid-template-columns: minmax(0, 1fr); } }
/* TICKET 8: the post-consult note's preview before it goes to CareBee */
.inf-cbbox:empty { display: none; }
.inf-cb { margin-top: 10px; border-color: var(--amber); }
.inf-cb-doc { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.inf-cb-ln { line-height: 1.45; }
/* Ticket 9: the patient's note laid out as the paper -- the diagnosis boxed first, the instructions numbered in a box. */
.inf-cb-doc { gap: 6px; padding: 14px 18px; }
.inf-cb-intro { color: var(--dim); }
.inf-cb-h { color: var(--teal); font-weight: 700; margin-top: 6px; }
.inf-cb-dx, .inf-cb-do { border-left: 3px solid var(--teal); border-radius: var(--r); padding: 8px 12px; margin: 4px 0; background: color-mix(in srgb, var(--teal) 10%, transparent); }
.inf-cb-do { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.inf-cb-boxh { color: var(--teal); font-weight: 700; letter-spacing: .06em; font-size: 12px; margin-bottom: 4px; }
.inf-cb-dxl { font-weight: 700; font-size: 17px; line-height: 1.35; }
.inf-cb-ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.inf-cb-li { line-height: 1.45; }
.inf-cb-li::marker { color: var(--teal); font-weight: 700; }
.inf-speed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.inf-speed select { min-height: var(--tap); }
.ans-src.is-speed, .inf-src.is-speed { border-color: var(--amber); color: var(--amber); }
/* ✨ TICKET 13: an answer kept on a waiting patient's own encounter. */
.wr-answer { font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--rule); white-space: nowrap; }
.wr-answer.is-ready { color: var(--teal); border-color: var(--teal); font-weight: 600; }
.wr-answer.is-running { color: var(--dim); }
.inf-running { color: var(--dim); }
.inf-runs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: 12px; }
.inf-run-n { font-weight: 600; }
.inf-run-id { color: var(--dim); font-size: 11px; }
.inf-run-pick { max-width: 380px; }
.inf-run-old { color: var(--amber); font-size: 11px; }
/* 🗂 TICKET 14: the cardex for the OT nurses, in the pre-clerk checklist. */
.pc-cardex { border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.pc-cardex-h { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.pc-cardex-h .pc-gate-mark.is-ok { color: var(--teal); }
.pc-cardex-ot.is-ok { color: var(--teal); }
.pc-cardex-ot.is-no, .pc-cardex-meta.is-no { color: var(--amber); }
.pc-cardex-meta { color: var(--dim); font-size: 12px; }
.pc-cardex-due { color: var(--amber); font-weight: 600; }
.pc-cardex-text { white-space: pre-wrap; border-left: 3px solid var(--teal); padding: 4px 10px; }
.pc-cardex-note { font-size: 12px; color: var(--dim); }
.pc-cardex .btn { align-self: flex-start; }
.pc-cardex-form { display: flex; flex-direction: column; gap: 6px; }
.pc-cardex-form[hidden] { display: none; }
.pc-cardex-input { width: 100%; box-sizing: border-box; font: inherit; }
.pc-tabs { margin: 10px 0; }
.pc-tabs-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: var(--tap); border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pc-tab.is-open { border-color: var(--teal); background: rgba(114, 229, 213, 0.08); }
.pc-tab .pc-gate-mark.is-ok { color: var(--teal); }
.pc-tab-l { font-weight: 600; }
.pc-tab-w { color: var(--dim); font-size: 12px; }
.pc-tab-c { color: var(--dim); transition: transform .15s; }
.pc-tab.is-open .pc-tab-c { transform: rotate(180deg); }
.pc-tabs-body[hidden] { display: none; }
.pc-tabs-body > section { margin-top: 8px; }
/* Ticket 11: 📋 the patient instructions library on the right rail. */
.pi-h { font-weight: 700; color: var(--teal); margin-bottom: 6px; }
.pi-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.pi-q { flex: 1; min-width: 0; min-height: var(--tap); }
.pi-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pi-form[hidden] { display: none; }
.pi-fname, .pi-ftext { width: 100%; box-sizing: border-box; }
.pi-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.pi-item { border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--r); padding: 8px 10px; }
.pi-name { font-weight: 700; margin-bottom: 4px; }
.pi-lines { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.pi-line::marker { color: var(--teal); font-weight: 700; }
.pi-acts, .pi-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.pi-ask:empty { display: none; }
.pi-empty, .pi-k { color: var(--dim); }
.pi-star.is-on { color: var(--amber); border-color: var(--amber); }
.pi-favrow { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-favs-h { color: var(--teal); font-weight: 700; }
/* Ticket #1217: 📋 post-consult notes on the right rail (board PI1) -- six
   headings of bullets, ＋ templates per heading, 🌐 / 👁 / 🐝 at the foot. */
.pcn-bee { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--r); font-size: 12px; color: var(--dim); }
.pcn-chips { display: inline-flex; gap: 4px; margin-left: auto; }
.pcn-lg { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.pcn-lg.is-ok { border-color: var(--teal); color: var(--teal); }
.pcn-lg.is-dr, .pcn-lg.is-q { border-color: var(--amber); color: var(--amber); }
.pcn-sec { border-bottom: 1px solid var(--line); padding: 6px 2px; }
.pcn-h { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pcn-ht { color: var(--teal); font-weight: 600; }
.pcn-from { flex: 1; min-width: 0; }
.pcn-ul { margin: 2px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 1px; }
.pcn-li { display: flex; align-items: flex-start; gap: 2px; }
.pcn-li::marker { color: var(--teal); }
.pcn-bt { flex: 1; min-width: 0; resize: none; font-family: inherit; line-height: 1.3; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--ink); font-size: 13px; padding: 2px 4px; }
.pcn-bt:hover, .pcn-bt:focus { border-color: var(--line); }
.pcn-b { position: relative; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 12px; padding: 1px 6px; cursor: pointer; }
.pcn-b::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 44px; }
.pcn-plus { border-color: var(--teal); color: var(--teal); }
.pcn-up, .pcn-dn, .pcn-del { border-color: transparent; color: var(--dim); }
.pcn-b:disabled { opacity: .35; cursor: default; }
.pcn-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.pcn-trw { display: inline-flex; gap: 2px; align-items: center; }
.pcn-lang { min-height: 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.pcn-send { margin-left: auto; }
.pcn-pop { border: 1px solid var(--teal); border-radius: var(--r); padding: 8px; margin: 6px 0; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.pcn-pop[hidden], .pcn-tr[hidden], .pcn-form[hidden] { display: none; }
.pcn-pop-h { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pcn-where { flex: 1; min-width: 0; min-height: 32px; }
.pcn-pop-top { display: flex; gap: 6px; align-items: center; }
.pcn-q { flex: 1; min-width: 0; min-height: 32px; }
.pcn-trow { border-top: 1px solid var(--line); padding: 4px 0; }
.pcn-tline { display: flex; align-items: center; gap: 6px; }
.pcn-tname { flex: 1; min-width: 0; font-weight: 600; }
.pcn-tpv { font-size: 12px; color: var(--dim); }
.pcn-star.is-on { border-color: var(--amber); }
.pcn-form { display: flex; flex-direction: column; gap: 4px; }
.pcn-fname, .pcn-ftext { width: 100%; box-sizing: border-box; }
.pcn-ftags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.pcn-ask:empty { display: none; }
.pcn-k, .pcn-empty { color: var(--dim); font-size: 12px; }
.pcn-empty { margin: 6px 0; }
.pcn-unread { color: var(--amber); font-size: 12px; }
.pcn-said { color: var(--dim); font-size: 12px; margin-top: 4px; }
.pcn-said:empty, .pcn-prev:empty { display: none; }
.pcn-fill { margin-top: 6px; color: var(--dim); }
.pcn-bee .or-help-b { min-height: 26px; min-width: 26px; padding: 0 6px; }
.pcn-help { margin-bottom: 6px; }
.pcn-k:empty { display: none; }
@media (hover: hover) {
  .pcn-lang, .pcn-q, .pcn-where { min-height: 26px; }
  .pcn-foot .pcn-b, .pcn-pop-top .pcn-b, .pcn-fill { padding: 2px 8px; }
}
/* Ticket #1218: the post-consult note beside the counter's bill -- a sticky
   column ~430px wide; the bill keeps its own scroll, the page none. */
.fda-billpane.pcd-on { display: grid; grid-template-columns: minmax(0, 1fr) 430px; column-gap: 12px; align-items: start; }
.fda-billpane.pcd-on > * { grid-column: 1; }
.fda-billpane.pcd-on > .pcd { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 0; align-self: start; }
.pcd { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 136px); overflow: hidden; }
.pcd-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.pcd-lock { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--dim); }
.pcd-chip { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--amber); color: var(--amber); }
.pcd-body { overflow: auto; min-height: 0; padding: 0 12px; }
.pcd .pcn-sec.is-desk { border-left: 3px solid var(--amber); padding-left: 9px; }
.pcd-li { display: list-item; font-size: 13px; line-height: 1.32; }
.pcd-li.is-removed .pcd-bt { text-decoration: line-through; color: var(--dim); }
.pcd-was { font-family: var(--mono); font-size: 11px; color: var(--amber); }
.pcd-mini { position: relative; min-height: 26px; padding: 0 8px; font-size: 12px; margin-left: 4px; }
.pcd-mini::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 44px; }
.pcd-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.pcd-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.pcd-hint { font-size: 11px; color: var(--dim); }
.pcd-doc:empty { display: none; }
.pcd-doc { padding: 0 12px 8px; overflow: auto; max-height: 30vh; }
.wb-favs-b { position: absolute; top: 100%; right: 0; z-index: 5; width: min(420px, 85vw); max-height: 50vh; overflow: auto; margin-top: 4px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.wb-favs-b[hidden] { display: none; }
/* Ticket 15: 🧬 the biopsychosocial profile card, above the writing board. */
.wb-profile:empty { display: none; }
.bps { border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; margin: 0 0 10px; }
.bps-h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.bps.bps-fold .bps-h { margin-bottom: 0; }
.bps-h .sp { flex: 1; }
.bps-k { color: var(--dim); font-weight: 400; }
.bps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bps-grid[hidden], .bps-bar[hidden] { display: none; }
.bps-col { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-width: 0; }
.bps-col h5 { margin: 0 0 6px; letter-spacing: .08em; color: var(--teal); }
.bps-f { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 6px; padding: 3px 0; border-top: 1px dashed var(--line); }
.bps-f:first-of-type { border-top: 0; }
.bps-f b { color: var(--dim); font-weight: 500; }
.bps-src { padding: 0 5px; border-radius: 7px; border: 1px solid var(--rule); color: var(--dim); margin-left: 4px; white-space: nowrap; }
.bps-src.today { border-color: var(--teal); color: var(--teal); }
.bps-src.new { border-color: var(--amber); color: var(--amber); }
.bps-src.empty { border-style: dashed; }
/* TIDY, AND DATED (27 Nov, his "this looks messy - pls date the entry"):
   the chip sits on its own line under the value, small, so a value is never
   broken by its source; an earlier entry carries its day. */
.bps-f > .bps-v { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bps-src { margin-left: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .03em; line-height: 1.5; }
.bps-src.dated { border-color: var(--line); color: var(--faint); }
.bps-drag { cursor: grab; }
.bps-f.bps-drag:hover { background: var(--panel-hover); border-radius: 6px; }
.bps-col h5.bps-drag:hover { color: var(--teal-2); }
.bps-drag.is-dragging { opacity: .55; }
.bps-col h5.bps-drag::after { content: ' \2807'; color: var(--faint); font-weight: 400; }
.bps-empty { color: var(--dim); font-style: italic; }
.bps-edit { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bps-in { flex: 1; min-width: 0; }
.bps-bar { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.bps-btn { border: 1px solid var(--rule); border-radius: var(--r); padding: 5px 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; min-height: 32px; }
.bps-btn.pri, .bps-btn.is-on { border-color: var(--teal); color: var(--teal); }
.bps-line:empty, .bps-said:empty { display: none; }
.bps-said { color: var(--dim); margin-top: 6px; }
.bps-none { grid-column: 1 / -1; color: var(--dim); font-style: italic; }
.bps-addmenu { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; }
.bps-addgrp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* Ticket 17: 🏁 Closed and ⏸ Pend at the board's foot, each with its station. */
.wb-stbtn { display: inline-flex; align-items: stretch; gap: 0; }
.wb-stbtn .wb-stgo { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wb-stpick { border: 1px solid var(--rule); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: transparent; color: inherit; font-family: inherit; font-size: 11.5px; padding: 0 6px; min-height: 32px; max-width: 160px; }
.wb-pendslot { display: inline-flex; }
/* Ticket 16: the top row (🕒 the care timeline, 🧬 the profile) above the
   toolbar, its grip, the columns' grip, and the answer's waiting line. The
   foot stays one row: it scrolls sideways rather than wrapping (17 Nov). */
.wb-boardcol > .wb-foot { flex-wrap: nowrap; overflow-x: auto; }
.wb-top { overflow: auto; flex: 0 0 auto; }
.wb-top[hidden], .wb-topgrip[hidden], .wb-tl[hidden], .wb-colgrip[hidden] { display: none; }
.wb-topgrip { height: 10px; cursor: row-resize; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.wb-topgrip::before { content: ''; width: 46px; height: 4px; border-radius: 2px; background: var(--rule); }
/* the columns' grip, plainly visible (ticket #1195, "allow the width of the card to be dynamically adjusted"): a teal 4px bar ~56px tall in a 12px hit area */
.wb-colgrip { flex: 0 0 12px !important; min-width: 12px; cursor: col-resize; display: flex; align-items: center; justify-content: center; }
.wb-colgrip::before { content: ''; height: 56px; width: 4px; border-radius: 2px; background: var(--teal); }
.wb-topgrip:focus-visible, .wb-colgrip:focus-visible { outline: 2px solid var(--teal); }
.wb-model-wait { color: var(--dim); padding: 10px 4px; display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 120px; }
.wb-wait-run { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--dim); opacity: 0.55; font-size: 24px; cursor: pointer; }
.wb-wait-run:hover, .wb-wait-run:focus-visible { opacity: 1; color: var(--teal); border-color: var(--teal); }
.wb-model-wait[hidden] { display: none; }
.wb-sym-tl .wb-sym-n { background: var(--amber); color: var(--bg); }
/* BOARD B AS DRAWN (ticket #1213; Dr Lau, 21 Nov: "current view ; expected
   view"). The board card is a frame holding two cards side by side: the
   writing board, its name and tools one header row, the text flowing down
   it with no inner box; and the inference board, its own full-height card,
   ⚙ in its heading and ▶ centred. Sizes from board B2. */
.wb-card.wb-frame { background: transparent; border: 0; padding: 0; gap: 0; }
.wb-frame > .wb-panes { overflow: hidden; gap: 0; }
.wb-pcard { background: var(--panel); border-radius: 12px; min-height: 0; overflow: hidden; }
.wb-boardcol.wb-pcard { border: 2px solid var(--teal); gap: 0; }
.wb-modelpane.wb-pcard { border: 1px solid var(--line); gap: 0; }
.wb-panes.is-cols > .wb-modelpane.wb-pcard { align-self: stretch; }
.wb-boardcol > .wb-toolbar, .wb-modelpane > .wb-pane-h { flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center;
  gap: 2px; min-height: 48px; padding: 2px 8px; border-bottom: 1px solid var(--line-soft); box-sizing: border-box; }
.wb-tb-title, .wb-modelpane > .wb-pane-h .wb-pane-t { font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); margin: 0 8px; white-space: nowrap; flex: 0 0 auto; }
.wb-modelpane > .wb-pane-h .wb-pane-t { flex: 1; }
/* THE BOARD'S THREE FACES (22 Nov): three symbols, one lit. */
.wb-faces { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; margin-right: 6px; vertical-align: middle; }
.wb-face { position: relative; min-width: 30px; height: 26px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent;
  cursor: pointer; font-size: 14px; line-height: 1; filter: grayscale(1); opacity: .6; }
.wb-face::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 44px; min-width: 36px; }
.wb-face:hover { opacity: 1; }
.wb-face.is-on { background: var(--selected-bg); filter: none; opacity: 1; box-shadow: inset 0 0 0 1px var(--teal); }
.wb-face-n { position: absolute; top: -5px; right: -4px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 99px;
  background: var(--amber); color: var(--bg); font: 700 10px/14px var(--mono); text-align: center; filter: none; }
.wb-face:focus-visible { outline: 2px solid var(--teal); }
.wb-boardcol.is-letter > :not(.wb-toolbar):not(.wb-letter) { display: none; }
.wb-boardcol.is-letter > .wb-toolbar > :not(.wb-tb-grip):not(.wb-tb-title) { display: none; }
.wb-letter { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; }
.wb-letter[hidden] { display: none; }
@container (max-width: 820px) { .wb-boardcol.is-letter .wb-tb-name .wb-word { display: inline; } }
@media (hover: hover) { .tcu .tcu-pend { min-height: 32px; font-size: 12.5px; } }
.wb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.wb-boardcol > .wb-toolbar .wb-tool, .wb-boardcol > .wb-toolbar .wb-size {
  position: relative; min-width: 36px; min-height: 32px; height: 32px; padding: 0 6px; border: 1px solid transparent;
  border-radius: 8px; background: transparent; color: var(--dim); font: 600 14px var(--display); cursor: pointer; }
.wb-boardcol > .wb-toolbar .wb-size { appearance: none; -webkit-appearance: none; width: 36px; text-align: center; text-align-last: center; }
.wb-boardcol > .wb-toolbar .wb-size option { background: var(--panel); color: var(--ink); }
.wb-boardcol > .wb-toolbar .wb-tool:hover, .wb-boardcol > .wb-toolbar .wb-size:hover { background: var(--panel-hover); color: var(--ink); }
.wb-boardcol > .wb-toolbar .wb-tool:focus-visible, .wb-boardcol > .wb-toolbar .wb-size:focus-visible { outline: 2px solid var(--teal); }
.wb-tb-sep { width: 1px; height: 24px; background: var(--line-soft); margin: 0 6px; flex: 0 0 auto; }
.wb-boardcol > .wb-toolbar > .wb-tb-end { flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; min-width: 0; gap: 4px; }
.wb-boardcol > .wb-toolbar .wb-cont { flex: 0 1 auto; min-width: 0; max-width: 200px; min-height: 36px; text-overflow: ellipsis; }
.wb-boardcol { container-type: inline-size; }
@container (max-width: 820px) { .wb-boardcol .wb-conf-h .wb-word, .wb-boardcol .wb-tb-name .wb-word { display: none; } }
.wb-boardcol > .wb-toolbar .wb-favs-h { min-height: 36px; white-space: nowrap; }
.wb-boardcol > .wb-scroll { overflow-x: hidden; overflow-y: auto; padding: 0 16px 12px; gap: 0; }
.wb-scroll > .wb-editor { border: 0; background: transparent; padding: 0; min-height: 0; border-radius: 0; }
.wb-scroll > .wb-editor:focus { border: 0; }
.wb-editor .wb-h-soap { color: var(--ink); font-weight: 700; margin: 10px 0 2px; }
.wb-editor .wb-sline { min-height: 1.5em; color: var(--ink-2); }
.wb-boardcol .wb-bring { margin-top: 10px; height: auto; min-height: 44px; flex-wrap: wrap; padding: 4px 6px; }
.wb-boardcol .wb-bring-srcs { flex: 1 1 0; min-width: 0; flex-wrap: wrap; overflow: visible; gap: 8px; }
.wb-src { gap: 4px; min-height: 32px; padding: 0 4px 0 10px; border-color: var(--teal); background: var(--selected-bg); }
.wb-src[data-state="empty"], .wb-src[data-state="unread"], .wb-src[data-state="reading"] { border-style: dashed; border-color: var(--line); background: transparent; }
.wb-src-t { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; min-height: 32px; }
.wb-src-s { color: var(--faint); }
.wb-src-x { min-width: 28px; min-height: 28px; }
.wb-modelpane > .wb-model-wait { flex: 1 1 auto; }
/* A LEFT-RAIL LIST FLOATS over the page as the right rail's panels do (#1197). */
.wb-dock.wb-float { position: fixed; z-index: 50; flex: none; box-sizing: border-box; overflow: hidden;
  border-color: var(--teal); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); padding-bottom: 22px; }
.wb-dock-b { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.wb-boardcol > .wb-toolbar .wb-tool::before { content: ''; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
.wb-tb-grip { flex: 0 0 auto; padding: 0 2px; }
.wb-size-menu { position: absolute; top: 100%; left: 0; z-index: 6; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--z1); }
.wb-size-menu[hidden] { display: none; }
/* #1225: the bar's four, and "Send to ▾" opening upward over the board */
.wb-held[hidden] { display: none; }
.wb-sendto { position: relative; display: inline-flex; }
.wb-sendto-menu { position: absolute; bottom: 100%; right: 0; z-index: 7; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px;
  padding: 4px; min-width: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--z1); }
.wb-sendto-menu[hidden] { display: none; }
.wb-sendto-k { min-height: 44px; padding: 0 10px; text-align: left; white-space: nowrap; background: transparent; color: var(--ink);
  border: 0; border-radius: var(--r); cursor: pointer; }
.wb-sendto-k:hover, .wb-sendto-k:focus-visible { background: var(--sunk); }
.wb-boardcol > .wb-toolbar .wb-size-menu .wb-tool { width: auto; text-align: left; }
.wb-conf-h { min-height: 36px; white-space: nowrap; }
.wb-conf-h.is-on { border-color: var(--amber); color: var(--amber); background: rgba(255, 209, 122, 0.08); }
.wb-conf-h[data-state="unread"] { border-style: dashed; }
.wb-conf-b { position: absolute; top: 100%; right: 0; z-index: 5; width: min(420px, 85vw); max-height: 60vh; overflow: auto; margin-top: 4px;
  padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--z1); }
.wb-conf-b[hidden] { display: none; }
/* the profile is a small chip right above S (Dr Lau, 21 Nov: "you are wasting space in here") */
.wb-boardcol > .wb-bps { margin: 6px 16px 0; }
.wb-editor .wb-imp + .wb-sline[data-skel="line"] { min-height: 0; height: 4px; overflow: hidden; }
.wb-boardcol .wb-bps-h { min-height: 32px; height: 32px; padding: 0 10px; font-size: 13px; border-style: dashed; border-radius: var(--r); }
.wb-boardcol > .wb-scroll > .wb-editor > .wb-h-soap:first-child { margin-top: 6px; }
.ct { border: 1px solid var(--rule); border-radius: var(--r); padding: 6px 10px 4px; margin: 0 0 6px; position: relative; }
.ct-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ct-title, .ct-n { font-weight: 700; }
.ct-sp { flex: 1; }
.ct-dx { border: 1px solid var(--teal); color: var(--teal); border-radius: 9px; padding: 1px 8px; background: transparent; font-family: inherit; }
.ct-who { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 1px 8px; }
.ct-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--teal); flex: 0 0 auto; }
.ct-c1 .ct-dot { background: var(--map-numb); }
.ct-c2 .ct-dot { background: var(--label); }
.ct-c3 .ct-dot { background: var(--amber); }
.ct-c4 .ct-dot { background: var(--red); }
.ct-c5 .ct-dot { background: var(--dim); }
.ct-who.is-ref .ct-dot, .ct-ev.is-ref .ct-dot { background: transparent; border: 2px dashed var(--amber); }
/* THE NEXT BOOKED VISIT (ticket 9): a hollow dot, solid ring -- not yet happened, and not a referral's dashed ring. */
.ct-booked .ct-dot { background: transparent; border: 2px solid var(--teal); }
.ct-booked .ct-l { font-style: italic; }
.ct-next-line { margin-top: 4px; }
.ct-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ct-form[hidden] { display: none; }
.ct-in { flex: 1; min-width: 200px; }
.ct-scroll { overflow-x: auto; overflow-y: visible; margin-top: 4px; padding-bottom: 4px; }
.ct-track { position: relative; height: 44px; min-width: 100%; }
.ct-track::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; border-top: 1px solid var(--rule); }
.ct-ev { position: absolute; top: 2px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; cursor: default; color: var(--dim); }
.ct-ev:focus-visible, .ct-ev:hover { color: var(--ink); outline: none; }
.ct-ev:hover .ct-dot, .ct-ev:focus-visible .ct-dot { box-shadow: 0 0 0 4px var(--line); }
.ct-ev .ct-l { max-width: 124px; overflow: hidden; text-overflow: ellipsis; }
.ct-tip { position: absolute; top: 40px; z-index: 5; background: var(--sunk); border: 1px solid var(--teal); border-radius: var(--r); padding: 8px 10px; width: 330px; white-space: normal; }
.ct-tip[hidden] { display: none; }
.ct-tip b { color: var(--teal); }
.ct-tip small { display: block; color: var(--dim); margin-top: 2px; }
.ct-none { color: var(--dim); font-style: italic; }
.ct-empty, .ct-said { color: var(--dim); padding: 6px 0; }

/* 🩺 THE MC BOARD (ticket 20): one tab a certificate, above the MC form. */
.mc-board { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.mc-board .mc-tab { font-size: 12px; padding: 4px 8px; min-height: 30px; }
.mc-board .mc-tab.is-on { background: var(--teal); color: var(--bg); border-color: var(--teal); }
.mc-in.mc-time { width: 7.5em; }
.mc-timebox { display: inline-flex; flex-direction: column; gap: 2px; }
.mc-timebox[hidden] { display: none; }
.mc-timel { font-size: 11px; color: var(--dim); }

/* 🔪 THE SURGERY TAB AS A TABLE (Ticket #1145): a row per operation, its
   listing and pre-op folded under it. app/ftabsurgery.js's own markup.
   rem, never px (see the counter's note above); tokens only. */
.fs-wrap { display: flex; flex-direction: column; gap: 10px; }
.fs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fs-hint, .fs-said, .fs-dim { color: var(--dim); font-size: .84rem; }
.fs-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.fs-h { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.fs-c { padding: 8px 10px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.fs-op.is-listed { background: var(--sunk); }
.fs-op[draggable="true"] { cursor: grab; }
.fs-op.is-dragging { opacity: .5; }
.fs-grip { color: var(--dim); margin-right: 6px; cursor: grab; }
.fs-fold { padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; text-align: left; min-height: 30px; }
.fs-both { display: flex; gap: 10px; margin-top: 4px; }
.fs-link { padding: 0 4px 0 0; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: .84rem; cursor: pointer; text-align: left; min-height: 28px; }
.fs-state, .fs-item .fs-imark.is-due { color: var(--amber); }
.fs-op:not(.is-listed) .fs-state { color: var(--dim); }
.fs-item { color: var(--dim); }
.fs-item .fs-ilabel { padding-left: 26px; }
.fs-item .fs-imark.is-done { color: var(--teal); }
.fs-item[hidden] { display: none; }
.fs-imp.is-warn { color: var(--amber); }
.fs-doc-img { max-width: 100%; }
.fs-doc-pdf { width: 100%; height: 70vh; border: 0; }
@media (max-width: 899px) {
  .fs-table thead { display: none; }
  .fs-table, .fs-table tbody, .fs-op, .fs-item, .fs-c { display: block; }
}

/* 🔪 OPERATIONS AS ONE TABLE (Ticket #1222): the folder's Surgery tab and
   the writing board's Procedures panel. app/ftabops.js's own markup; rem,
   never px; tokens only. Every control is the tap size. */
.op .fv-tile-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.op-n { color: var(--dim); }
.op-copyall { margin-left: auto; }
.op-copyall, .op-add, .op-readit, .op-confirm, .op-cancel, .op-openchart, .op-tonote { min-height: var(--tap); }
.op-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 6px 0 8px; }
.op-search { flex: 1 1 240px; min-height: var(--tap); }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.op-chip { min-height: var(--tap); }
.op-range, .op-surgeon, .op-order { width: auto; min-height: var(--tap); }
.op-order-k { color: var(--dimmer); display: inline-flex; align-items: center; gap: 6px; }
.op-count, .op-foot, .op-hint, .op-note { color: var(--dimmer); font-size: .84rem; }
.op-said { color: var(--dim); font-size: .84rem; }
.op-row.op-listed .fv-st-c { background: var(--sunk); }
.op-row.is-withdrawn .fv-st-c { color: var(--dimmer); text-decoration: line-through; }
.op-row.is-held .fv-st-c { color: var(--dimmer); font-style: italic; }
.op-date { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.op-grip { cursor: grab; min-height: var(--tap); display: inline-flex; align-items: center; }
.op .fs-link, .op .fs-fold, .op-x, .op-pickc { min-height: var(--tap); }
.op-pick { width: 22px; height: 22px; }
.op-pickc { display: inline-flex; align-items: center; }
.op-tosp { color: var(--dim); }
.op-items[hidden] { display: none; }
.op-item { font-size: .84rem; padding-left: 14px; }
.op-item.is-due { color: var(--amber); }
.op-item.is-done { color: var(--teal); }
.op-recs { display: flex; flex-direction: column; align-items: flex-start; }
.op-anaes.is-none { color: var(--dim); }
.op-src { font-size: .75rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.op-src-patient_reported { border-color: var(--amber); color: var(--amber); }
.op-src-listed { border-color: var(--line); color: var(--dim); }
.op-src-op_note { border-color: var(--teal); color: var(--teal); }
.op-card, .op-form { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); display: flex; flex-direction: column; gap: 8px; }
.op-card[hidden], .op-form[hidden] { display: none; }
.op-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.op-x { min-width: var(--tap); border: 0; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.op-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.op-k { color: var(--dim); font-size: .84rem; }
.op-page { min-height: 120px; }
.op-page-img { max-width: 100%; max-height: 360px; }
.op-page-pdf { width: 100%; height: 360px; border: 0; }
.op-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.op-in { min-height: var(--tap); }
.op-readback { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.op-refused { color: var(--amber); }
/* The writing board's 🔪 dock, when it holds the operations table, takes the
   width the table needs; the table scrolls sideways inside it, never the page. */
.wb-dock:has(.op) { flex: 0 0 min(760px, 60%); }
.wb-dock .op-body { overflow-x: auto; }
.op-panel-h { color: var(--dim); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; margin: 8px 0 4px; }
@media (max-width: 899px) {
  .op-t thead { display: none; }
}

/* 🩻 THE RADIOLOGY TAB AS A TABLE (Ticket #1146): a row per study, the
   verified state in words beside its colour. app/ftabradiology.js's own
   markup; rem, never px; tokens only. */
.fr-wrap { display: flex; flex-direction: column; gap: 10px; }
.fr-chips, .fr-order { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fr-chip { min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--dim); font: inherit; font-size: .84rem; cursor: pointer; }
.fr-chip.is-on { border-color: var(--teal); color: var(--teal); }
.fr-copyall { margin-left: auto; }
.fr-dim, .fr-said { color: var(--dim); font-size: .84rem; }
.fr-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.fr-h { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.fr-hb { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; min-height: 28px; }
.fr-hb.is-on { color: var(--teal); }
.fr-c { padding: 8px 10px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.fr-verify.is-unverified { color: var(--amber); }
.fr-verify.is-critical { color: var(--red); }
.fr-verify.is-verified, .fr-r.is-withdrawn { color: var(--dim); }
.fr-link { padding: 0; border: 0; background: transparent; color: var(--teal); font: inherit; cursor: pointer; text-align: left; min-height: 28px; }
@media (max-width: 899px) {
  .fr-table thead { display: none; }
  .fr-table, .fr-table tbody, .fr-r, .fr-c { display: block; }
}

/* THE LEAVE LANE (#1206): who is away from the front desk, under "all day",
   in the doctor's week and the desk's schedule alike. One chip per person;
   its size and colour are the grid's own chip classes (wk-chip, fd-sc-chip),
   so the type scale raises it with them. */
.lv-cell { display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-start; min-width: 0; }
.lv-chip { font-family: inherit; border: 0; cursor: pointer; max-width: 100%; align-self: flex-start;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-unread { color: var(--dim); padding: 1px 5px; cursor: help; }
.fd-dl-row.is-on { outline: 1px solid var(--teal-2); border-radius: 4px; }
/* THE RETIRED FOLDER (Ticket #1216): Settings, Others. */
.rt-h { color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.rt-note { color: var(--dim); margin-bottom: 8px; }
.rt-list { display: flex; flex-direction: column; gap: 6px; }
.rt-row { display: block; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.rt-row.is-on { border-color: var(--teal); }
.rt-row.rt-closed { cursor: default; opacity: 0.85; }
.rt-title { color: var(--ink); font-weight: 600; }
.rt-what, .rt-when, .rt-by, .rt-where, .rt-why { color: var(--dim); }
.rt-why { font-style: italic; }
.rt-body { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
.rt-body-h { color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.rt-open { min-height: 44px; padding: 0 14px; }

/* 21 Nov, his "keep as symbols" (the board's header), "keep this as 1 line
   at the bottom - keep it small font" and "remove the wordings" (Bring in),
   "use the symbol" (🧬): symbols with their words as titles. The type is in rem (see the
   counter section's note): small on purpose, never scaled by the generated block. */
.wb-tb-sym { min-width: 34px; padding: 0 6px; justify-content: center; }
.wb-tb-end .wb-cont { width: 3.2em; min-width: 3.2em; }
.wb-boardcol .wb-bring { flex-wrap: nowrap; min-height: 32px; height: 32px; padding: 0 6px; gap: 6px; font-size: .75rem; border-width: 1px; }
.wb-boardcol .wb-bring-srcs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; }
.wb-boardcol .wb-bring-add { min-height: 28px; font-size: .8125rem; }
.wb-boardcol .wb-bring-menu { top: auto; bottom: 100%; margin: 0 0 4px; }
.wb-boardcol .wb-src { min-height: 26px; padding: 0 2px 0 6px; gap: 2px; font-size: .75rem; }
.wb-boardcol .wb-src-t { min-height: 26px; font-size: .8125rem; }
.wb-boardcol .wb-src-s { font-size: .6875rem; }
.wb-boardcol .wb-src-x { min-width: 20px; min-height: 26px; font-size: .6875rem; opacity: 0; }
.wb-boardcol .wb-src:hover .wb-src-x, .wb-boardcol .wb-src:focus-within .wb-src-x { opacity: 1; }
.bps-sym { min-width: 34px; padding: 0 6px; }

/* 🔪 THE PROCEDURES HEADER (Dr Lau, 21 Nov 2026, "redesign the header - it is
   ugly", mock-up B: "keep the header very slim"): two tight rows of 24px
   controls, about 64px in all, every control one height and one style (the
   two pickers too: no grey native look). The ⧉ Copy all sits in the table's
   heading row. The type is in rem (see the counter section's note): small on
   purpose, never scaled by the generated block. app/ftabops.js draws it. */
.op .fv-tile-h.op-head { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px 0 5px; margin: 0; border-bottom: 1px solid var(--line-soft); }
.op-hrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.op-hrow2.op-bar { margin: 0; flex-wrap: nowrap; }
.op-grow { flex: 1 1 auto; }
.op-title { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.op-head .op-n { font-family: var(--mono); font-size: .6875rem; color: var(--dim); }
.op-head .op-said { font-size: .75rem; }
.op-ctl, .op-head .op-copyall, .op-head .op-add, .op-t .op-copyall { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  box-sizing: border-box; height: 24px; min-height: 24px; margin: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--label); font-family: inherit; font-size: .75rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; }
.op-ctl:hover { background: var(--panel-hover); }
.op-sq { width: 24px; min-width: 24px; padding: 0; }
.op-hrow2 .op-search { flex: 0 1 240px; min-width: 120px; min-height: 24px; height: 24px; cursor: text; background: var(--sunk); color: var(--ink); }
.op-seg { display: inline-flex; flex-wrap: nowrap; gap: 0; height: 24px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.op-seg .op-seg-b { display: inline-flex; align-items: center; gap: 5px; height: 100%; min-height: 0; margin: 0; padding: 0 8px; border: 0;
  border-right: 1px solid var(--line-soft); border-radius: 0; background: transparent; color: var(--dim); font-family: inherit; font-size: .71875rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; }
.op-seg .op-seg-b:last-child { border-right: 0; }
.op-seg .op-seg-b[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.op-seg-n { font-family: var(--mono); font-style: normal; font-size: .6875rem; color: var(--dimmer); }
.op-selbox { position: relative; padding: 0; }
.op-selbox::after { content: '▾'; position: absolute; right: 7px; pointer-events: none; color: var(--dim); font-size: .6875rem; }
.op-selbox .op-sel { appearance: none; -webkit-appearance: none; height: 22px; min-height: 0; width: auto; margin: 0; padding: 0 20px 0 8px; border: 0;
  background: transparent; color: var(--label); font-family: inherit; font-size: .75rem; font-weight: 500; line-height: 1; cursor: pointer; }
.op-hrow2 .op-count { font-size: .6875rem; white-space: nowrap; }
.op-info { margin: 2px 0 0; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--sunk); color: var(--dim); font-size: .75rem; }
.op-info[hidden] { display: none; }
.op-info-p { margin: 0; }
.op-info-p + .op-info-p { margin-top: 4px; }
.op-t th.op-copyth { text-align: right; }
.op-copyc { display: inline-flex; justify-content: flex-end; width: 100%; }
@media (max-width: 899px) {
  .op-hrow2.op-bar { flex-wrap: wrap; }
  .op-ctl, .op-seg, .op-selbox .op-sel { min-height: var(--tap); height: auto; }
  .op-t thead { display: table-header-group; }
  .op-t thead th:not(.op-copyth) { display: none; }
}
/* THE DETAILS TAB, REDESIGNED (Dr Lau, 21 Nov 2026: "the tabs are not
   aligned with the rest - the page itself - pls make it easier for entry";
   board DT4, "change it into a subheadings in vertical column"). ONE tab
   row that scrolls sideways at the height of Act / Open / Add, its hint the
   row's title and a screen-reader line, ↺ Reset under ⋯; the patient and
   family as one slim line; the chart as a form: subheadings down the left,
   one column of label-and-value. Type in rem (the counter section's note),
   never scaled by the generated block. */
.fv-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fv-bar .fv-tabs.fv-tabs-one { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; align-items: center; scrollbar-width: thin; }
.fv-bar .fv-tabs.fv-tabs-one .fv-tab { min-height: 34px; box-sizing: border-box; border-radius: 8px; line-height: 1.2; }
.fv-bar .fv-tabs.fv-tabs-one .fv-tabtail { flex: 0 0 0; width: 0; overflow: hidden; }
.fv-tabmore { position: relative; flex: 0 0 auto; }
.fv-tabmore-b { min-height: 34px; min-width: 34px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel-2);
  color: var(--ink-2); cursor: pointer; line-height: 1.2; }
.fv-tabmore-b.is-on { color: var(--ink); border-color: var(--teal); }
.fv-tabmore-m { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; padding: 6px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.fv-tabmore-m[hidden] { display: none; }
.fv-tabmore-m .fv-tabreset { white-space: nowrap; }

.fv-dcards.fv-dline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.fv-dline .fv-dcard { flex: 0 1 auto; min-width: 0; border: 0; padding: 0; background: transparent; }
.fv-dline .fv-dcard-pt > .fv-icard { display: flex; align-items: center; gap: 10px; width: auto; border: 0; background: transparent; }
.fv-dline .fv-icard-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.fv-dline .fv-h1, .fv-dline .fv-h2 { gap: 4px 12px; padding-bottom: 0; border-bottom: 0; }
.fv-dline .fv-dcard-fam { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fv-dline .fv-dcard-k { margin-right: 0; font-size: .8125rem; text-transform: none; letter-spacing: 0; }
.fv-fam-words { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.fv-fam-none { color: var(--dim); }
.fv-dline .fv-fam-b { min-height: 28px; }

.dt-form { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 24px; align-items: start; }
.dt-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 8px 0; border-right: 1px solid var(--line); }
.dt-nav-k { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 0 6px 6px; }
.dt-nav-l { display: flex; flex-direction: column; gap: 2px; }
.dt-nav-b { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); font-size: .875rem; text-align: left; cursor: pointer; }
.dt-nav-b.is-on { background: var(--panel-2); color: var(--ink); }
.dt-nav-b.is-changed .dt-nav-t::after { content: ' \2022'; color: var(--amber); }
.dt-nav-b.is-empty { opacity: .45; }
.dt-nav-sp { flex: 1 1 auto; }
.dt-nav-n { font-size: .75rem; color: var(--dim); }
.dt-nav-n.is-done { color: var(--teal); }
.dt-nav-tools { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.dt-blankonly { width: auto; align-self: flex-start; }
.dt-blankonly.is-on { border-color: var(--teal); color: var(--teal); }
.dt-find { min-height: 32px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); color: var(--ink); font-size: .875rem; }
.dt-col { max-width: 760px; min-width: 0; }
/* 26 Nov: the Details board as Investigations is -- PEOPLE under the groups
   in the one left column, the chosen view in the main area, the controls in
   one row with the ? at its right end. */
.dt-nav-k2 { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.dt-view { min-width: 0; padding-top: 4px; }
.dt-col:has(> .dt-view:not([hidden])) { max-width: none; }
.dt-search-top { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.dt-search-top > .dt-find { flex: 0 1 260px; min-width: 120px; }
.dt-g { margin-bottom: 6px; }
.dt-gh { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
.dt-gt { font-size: .9375rem; color: var(--ink); }
.dt-gsp { flex: 1 1 auto; }
.dt-undo, .dt-save { width: auto; min-height: 28px; }
.dt-undo[hidden], .dt-save[hidden] { display: none; }
.dt-f { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 34px; padding: 2px 0; }
.dt-f[hidden] { display: none; }
.dt-lab { color: var(--dim); font-size: .875rem; }
.dt-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.dt-in { width: 100%; max-width: 440px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--sunk); color: var(--ink); font-size: .9375rem; box-sizing: border-box; }
.dt-in::placeholder { color: var(--faint); }
.dt-v { max-width: 440px; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: var(--ink); font-size: .9375rem; text-align: left; cursor: text; }
.dt-v:hover, .dt-v:focus { border-color: var(--rule); }
.dt-ro { color: var(--ink-2); font-size: .9375rem; }
.dt-q { color: var(--amber); font-weight: 600; }
.dt-g.is-changed .dt-gh { border-bottom-color: var(--amber); }
.dt-ask:empty { display: none; }
.dt-ask { margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); font-size: .875rem; }
.dt-ask.is-no { border-color: var(--red); }
.dt-ask.is-ok { border-color: var(--teal); }
.dt-ask-h { color: var(--ink); margin-bottom: 4px; }
.dt-back { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.dt-back-r { display: flex; flex-wrap: wrap; gap: 8px; }
.dt-back-k { color: var(--dim); min-width: 140px; }
.dt-back-was { color: var(--dimmer); text-decoration: line-through; }
.dt-back-now { color: var(--ink); }
.dt-ask-acts { display: flex; gap: 8px; }
.dt-unread { display: flex; gap: 6px; align-items: baseline; }
@media (max-width: 899px) { .dt-form { grid-template-columns: 1fr; } .dt-nav { position: static; border-right: 0; } .dt-f { grid-template-columns: 1fr; } }

/* ✉️ CORRESPONDENCE, REDESIGNED (21 Nov 2026, ftabcorr.ts): the kinds as a
   left column (its width dragged, folded to a slim side tab), one slim row
   (24px controls, the Procedures header's op- classes), the list beside a
   reading pane (the split dragged; ⤢ widens the letter). Type in rem, as
   the counter section's note asks; tokens only. */
.cor { display: flex; align-items: stretch; gap: 0; min-height: 320px; min-width: 0; }
.cor-kinds { flex: 0 0 auto; width: 180px; min-width: 120px; max-width: 360px; display: flex; flex-direction: column; gap: 2px;
  padding: 4px 6px 6px 0; border-right: 1px solid var(--line-soft); box-sizing: border-box; overflow: auto; }
.cor-kinds-h { display: flex; align-items: center; gap: 6px; padding: 2px 0 4px; }
.cor-kinds-t { flex: 1; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.cor-kinds .cor-fold { min-height: 22px; padding: 0 6px; font-size: .6875rem; }
.cor-kind-list { display: flex; flex-direction: column; gap: 1px; }
.cor-kind { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font-size: .8125rem; text-align: left; cursor: pointer; }
.cor-kind:hover { background: var(--panel-hover); }
.cor-kind[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.cor-kind.is-empty { color: var(--dimmer); }
.cor-kind-w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cor-kind-n { font-family: var(--mono); font-style: normal; font-size: .6875rem; color: var(--dimmer); }
.cor-kinds .cor-cab { margin-top: auto; justify-content: flex-start; font-size: .75rem; }
.cor-rail { flex: 0 0 auto; width: 22px; padding: 6px 0; border: 0; border-right: 1px solid var(--line-soft); background: var(--sunk);
  color: var(--dim); font-size: .6875rem; letter-spacing: .06em; writing-mode: vertical-rl; cursor: pointer; }
.cor-rail:hover { color: var(--teal); }
.cor-grip { flex: 0 0 6px; cursor: col-resize; background: transparent; touch-action: none; }
.cor-grip:hover, .cor-grip:focus { background: var(--line-soft); outline: none; }
.cor-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.cor-bar { flex-wrap: nowrap; padding: 2px 0 4px; border-bottom: 1px solid var(--line-soft); }
.cor-bar .op-ctl { min-height: 24px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px;
  background: transparent; color: var(--ink); font-size: .75rem; }
.cor-bar .cor-search { flex: 0 1 240px; min-width: 120px; cursor: text; background: var(--sunk); }
.cor-bar .op-seg { height: 24px; }
.cor-bar .op-seg .op-seg-b { font-size: .75rem; background: transparent; color: var(--ink-2); border-right: 1px solid var(--line); cursor: pointer; }
.cor-bar .op-seg .op-seg-b.is-empty { color: var(--dimmer); }
.cor-said { font-size: .6875rem; color: var(--dim); white-space: nowrap; }
.cor-write { position: relative; }
.cor-menu { position: absolute; right: 0; top: 28px; z-index: 5; display: flex; flex-direction: column; min-width: 200px; padding: 4px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.cor-menu .cor-menu-i { justify-content: flex-start; font-size: .8125rem; }
.cor-note { font-size: .75rem; color: var(--amber); }
.cor-split { display: flex; align-items: stretch; min-height: 280px; min-width: 0; }
.cor-list { flex: 0 0 auto; width: 55%; min-width: 0; overflow: auto; }
.cor-split.is-wide .cor-pane { flex: 1 1 auto; }
.cor-table { width: 100%; font-size: .8125rem; }
.cor-table .cor-row.is-sel .fv-st-c { background: var(--selected-bg); }
.cor-table .cor-row.is-failed .fv-st-c { color: var(--red); }
.cor-table .cor-row.is-gone .fv-st-c { text-decoration: line-through; color: var(--dimmer); }
.cor-table .cor-row.is-held .fv-st-c { color: var(--dim); font-style: italic; }
.cor-st-box { display: flex; flex-direction: column; gap: 1px; }
.cor-why { font-size: .75rem; color: var(--red); }
.cor-pane { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 4px 8px; border-left: 1px solid var(--line-soft); overflow: auto; }
.cor-pane-h { display: flex; align-items: center; gap: 8px; }
.cor-pane-t { flex: 1; min-width: 0; font-size: .9375rem; font-weight: 600; color: var(--ink); }
.cor-acts { display: flex; gap: 4px; }
.cor-acts .btn { min-height: 24px; min-width: 28px; padding: 0 6px; font-size: .8125rem; }
.cor-meta { display: flex; flex-direction: column; gap: 2px; font-size: .75rem; color: var(--dim); }
.cor-held { font-size: .8125rem; color: var(--dim); font-style: italic; }
.cor-out:empty { display: none; }
.cor-out { font-size: .75rem; color: var(--ink-2); }
.cor-text { font-size: .875rem; color: var(--ink); line-height: 1.45; }
.cor-text-h { margin-top: 6px; font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.cor-text-p { margin: 2px 0; white-space: pre-wrap; }
.cor-foot { margin-top: 8px; font-size: .6875rem; color: var(--dimmer); }
@media (max-width: 899px) {
  .cor { flex-direction: column; }
  .cor-kinds { width: auto !important; max-width: none; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .cor-grip { display: none; }
  .cor-split { flex-direction: column; }
  .cor-list { width: auto !important; }
  .cor-bar { flex-wrap: wrap; }
  .cor-bar .op-ctl, .cor-kind { min-height: var(--tap); height: auto; }
}
/* ===== 📄 THE MC BOARD (21 Nov 2026, "build the MC board"; mcboard.ts) =====
   A left column of states and the cover, a slim header row, the list beside
   the certificate as printed. Its own prefix, mcb-. */
.mcb { display: flex; align-items: stretch; min-height: 24rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.mcb-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.5rem 0.375rem; border-right: 1px solid var(--line-soft); min-width: 0; overflow: auto; }
.mcb-side[hidden], .mcb-tab[hidden], .mcb-grip[hidden], .mcb-pop[hidden], .mcb-menu[hidden] { display: none; }
.mcb-k { font: 600 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); padding: 0.25rem 0.5rem 0.5rem; }
.mcb-state { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border: 0; border-radius: 8px; background: none; color: var(--dim); font: 500 0.85rem var(--display); text-align: left; cursor: pointer; }
.mcb-state.is-on { background: #173a35; color: var(--ink); }
.mcb-state.is-zero { color: var(--faint); }
.mcb-state-l { flex: 1 1 auto; }
.mcb-n { font: 500 0.75rem var(--mono); color: var(--dimmer); }
.mcb-cover { margin: 0.6rem 0.5rem 0; padding-top: 0.5rem; border-top: 1px dashed var(--line-soft); font-size: 0.8rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 0.2rem; }
.mcb-next { color: var(--dimmer); }
.mcb-gap { color: var(--amber); }
.mcb-unread { margin: 0.4rem 0.5rem 0; color: var(--amber); font-size: 0.8rem; }
.mcb-fold { margin: auto 0.5rem 0.25rem; align-self: flex-start; min-height: 1.5rem; height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }
.mcb-tab { flex: 0 0 auto; writing-mode: vertical-rl; border: 0; border-right: 1px solid var(--line-soft); background: var(--panel-2); color: var(--dim); font: 500 0.8rem var(--display); padding: 0.5rem 0.25rem; cursor: pointer; }
.mcb-grip, .mcb-split { flex: 0 0 6px; cursor: col-resize; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.mcb-grip::after, .mcb-split::after { content: ""; width: 2px; height: 2.5rem; border-radius: 2px; background: #3d8a80; }
.mcb-grip:focus-visible, .mcb-split:focus-visible { outline: 2px solid var(--teal); }
.mcb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; position: relative; }
.mcb-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.mcb-bar .btn, .mcb-search, .mcb-when, .mcb-doctor { height: 24px; min-height: 24px; padding: 0 0.5rem; border-radius: 6px; font-size: 0.75rem; }
.mcb-search { width: 13.75rem; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); }
.mcb-when, .mcb-doctor { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.mcb-seg { display: inline-flex; height: 24px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mcb-type { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.5rem; border: 0; border-right: 1px solid var(--line-soft); background: none; color: var(--dim); font: 500 0.72rem var(--display); white-space: nowrap; cursor: pointer; }
.mcb-type:last-child { border-right: 0; }
.mcb-type.is-on { background: #173a35; color: var(--teal-2); }
.mcb-flex { flex: 1 1 auto; }
.mcb-issue:disabled { opacity: 0.55; cursor: not-allowed; }
.mcb-pop, .mcb-menu { position: absolute; right: 0.75rem; top: 2.25rem; z-index: 5; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--z1); padding: 0.5rem; }
.mcb-pop { width: 22rem; }
.mcb-menu { display: flex; flex-direction: column; gap: 0.25rem; }
.mcb-menu-i { border: 0; background: none; color: var(--ink-2); text-align: left; font: 500 0.85rem var(--display); padding: 0.35rem 0.5rem; border-radius: 6px; cursor: pointer; }
.mcb-menu-i:hover { background: #173a35; }
.mcb-body { flex: 1 1 auto; min-height: 0; display: flex; }
.mcb-list { flex: 1 1 56%; min-width: 0; overflow: auto; }
.mcb-pane { flex: 1 1 44%; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.mcb.is-wide .mcb-list, .mcb.is-wide .mcb-split { display: none; }
.mcb.is-wide .mcb-pane { flex-basis: 100% !important; }
.mcb-row.is-sel { background: #173a35; }
.mcb-row.is-withdrawn .fv-st-c { text-decoration: line-through; color: var(--dimmer); }
.mcb-pick { padding: 1rem; color: var(--dimmer); font-size: 0.85rem; }
.mcb-ph { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.mcb-pt { font-size: 0.85rem; color: var(--ink); }
.mcb-acts { display: inline-flex; gap: 0.25rem; }
.mcb-b { width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 6px; font-size: 0.8rem; }
.mcb-sub { padding: 0.5rem 0.75rem 0; font-size: 0.8rem; color: var(--dimmer); }
.mcb-gone { margin: 0.5rem 0.75rem 0; color: var(--amber); font-size: 0.8rem; }
.mcb-cert { margin: 0.5rem 0.75rem; padding: 0.875rem; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--sunk); font-size: 0.8rem; line-height: 1.7; color: var(--ink-2); }
.mcb-cert.is-withdrawn { text-decoration: line-through; color: var(--dimmer); }
.mcb-cert-t { display: block; letter-spacing: 0.08em; }
.mcb-never { padding: 0 0.75rem; font-size: 0.75rem; color: var(--dimmer); }
.mcb-said { margin: 0.5rem 0.75rem; }
@media (max-width: 899px) { .mcb, .mcb-body { flex-direction: column; } .mcb-grip, .mcb-split, .mcb-tab { display: none; } .mcb-side { width: auto !important; border-right: 0; } }
/* The folder boards' side items, dragged into his order (21 Nov 2026):
   the Correspondence kinds, the MC states, the Details subheadings. */
.cor-kind[data-side-id], .mcb-state[data-side-id], .dt-nav-b[data-side-id] { cursor: grab; }
.cor-kind.is-dragging, .mcb-state.is-dragging, .dt-nav-b.is-dragging { opacity: 0.5; cursor: grabbing; }
.cor-kind.side-over, .mcb-state.side-over, .dt-nav-b.side-over { outline: 0.125rem dashed var(--teal); outline-offset: -0.125rem; }
.mcb-cover [role="button"] { cursor: pointer; border-radius: 0.375rem; }
.mcb-cover [role="button"]:hover, .mcb-cover [role="button"]:focus-visible { background: var(--panel-2); outline: 0.125rem solid var(--teal); outline-offset: 0.0625rem; }

/* 21 Nov, his "slim and one line - remove unnecessary instruction - use
   symbol if necessary": the folder's tab row at 32px, no grips drawn (the
   whole tab drags), the chosen tab underlined, Act · Open · Add as symbols. */
.fv-bar .fv-tabs.fv-tabs-one { min-height: 32px; gap: 2px; }
.fv-bar .fv-tabs.fv-tabs-one .fv-tab { min-height: 28px; height: 28px; padding: 0 9px; gap: 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; font-size: .8125rem; }
.fv-bar .fv-tabs.fv-tabs-one .fv-tab.is-on { border-bottom-color: var(--teal); color: var(--ink); }
.fv-bar .fv-tabs.fv-tabs-one .fv-tab-grip { display: none; }
.fv-bar .fv-tabs.fv-tabs-one .fv-tab-n { font-size: .6875rem; }
.fv-bar .fv-sec-k { min-height: 26px; height: 26px; padding: 0 8px; font-size: .8125rem; }
/* 26 Nov, "pls tidy up action, open, add buttons on the right side": the
   three menus are one segmented control (⚡ · 📂 · ＋, each with one small ▾),
   and the ⋯ and the × beside it share its height, so the row's right end is
   one even set rather than four sizes. */
.fv-bar .fv-right { gap: 0; align-items: center; }
.fv-bar .fv-sec-k { display: inline-flex; align-items: center; gap: 3px; height: 30px; min-height: 30px; min-width: 42px;
  justify-content: center; padding: 0 8px; border-radius: 0; font-size: .875rem; line-height: 1; }
.fv-bar .fv-sec-k::after { content: '\25BE'; font-size: .7em; color: var(--dim); }
.fv-bar .fv-right > .fv-sec:not([hidden]) + .fv-sec:not([hidden]) .fv-sec-k { border-left-width: 0; }
.fv-bar .fv-right > .fv-sec:first-child .fv-sec-k { border-radius: 8px 0 0 8px; }
.fv-bar .fv-right > .fv-sec:last-child .fv-sec-k, .fv-bar .fv-right > .fv-sec:has(+ .fv-sec[hidden]) .fv-sec-k { border-radius: 0 8px 8px 0; }
.fv-bar .fv-tabmore { margin-left: 6px; }
.fv-bar .fv-tabmore-b { height: 30px; min-height: 30px; min-width: 30px; padding: 0 6px; line-height: 1; }
.fv-bar .fv-close { position: relative; top: auto; right: auto; flex: 0 0 auto; margin-left: 6px;
  width: 30px; height: 30px; font-size: 17px; line-height: 26px; }
.fv-bar:has(> .fv-close) { padding-right: 8px; }

/* The DocApp bill: compact, aligned cells, never cards on a narrow rail. */
.mn-title { gap: 6px; margin-bottom: 6px; flex-wrap: wrap; align-items: center; }
.mn-help { margin-left: auto; padding: 2px 8px; }
.mn-explanation { padding: 6px 0; font-size: 12px; color: var(--dim); }
.mn-table-wrap { max-width: 100%; overflow-x: auto; }
.mn-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mn-table th, .mn-table td { border: 1px solid var(--rule); padding: 4px 6px; text-align: left; vertical-align: middle; }
.mn-table th { color: var(--dim); font-weight: 500; white-space: nowrap; }
.mn-table .mn-row { display: table-row; }
.mn-table td:nth-child(3), .mn-table td:nth-child(4), .mn-table td:nth-child(5), .mn-table td:nth-child(6) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mn-table .mn-l { min-width: 140px; }
.mn-table .mn-actions { white-space: nowrap; }
.mn-table .mn-act { display: inline-flex; width: auto; min-height: 24px; padding: 2px 5px; margin-right: 3px; border-radius: 3px; font-size: 12px; }
@media (pointer: coarse) { .mn-table .mn-act { min-height: 44px; } }
.mn-totals { margin: 6px 0 0 auto; max-width: 300px; }
.mn-totals .mn-sum { margin-top: 3px; padding-top: 3px; font-size: 12px; }
.mn-notice, .mn-locked { font-size: 12px; color: var(--dim); }
.mn-editor:empty, .mn-notice:empty { display: none; }

/* Carebee Connect is a two-line incoming feed; details open on demand. */
.fd-pa-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fd-pa-help { min-height: 28px; padding: 2px 9px; }
.fd-pa-guidance { padding: 8px; border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--dim); }
.fd-pa-feedrow { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.fd-pa-feedrow .fd-pa-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.fd-pa-feedrow .fd-pa-who { margin: 0; font-size: 12px; font-family: var(--mono); }
.fd-pa-feedrow .fd-pa-state { margin-left: auto; font-size: 11px; }
.fd-pa-feedrow .fd-pa-when, .fd-pa-feedrow .fd-pa-stale { font-size: 11px; }
.fd-pa-feedrow .fd-pa-acts { display: flex; gap: 4px; align-items: center; margin-top: 2px; flex-wrap: nowrap; }
.fd-pa-summary { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.fd-pa-feedrow .fd-pa-acts .btn { flex: none; width: auto; padding: 2px 5px; min-height: 24px; font-size: 11px; border-radius: 3px; }
.fd-pa-detail, .fd-pa-history { margin-top: 6px; border-top: 1px solid var(--rule); padding-top: 6px; }
@media (pointer: coarse) { .fd-pa-feedrow .fd-pa-acts .btn { min-height: 44px; } }

.fd-pa-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.fd-pa-filters .fd-pa-chips { display: grid; gap: 2px; margin: 0; min-width: 0; flex: 1; }
.fd-pa-filter-label { font-size: 11px; color: var(--dim); }
.fd-pa-filter { width: 100%; min-width: 0; padding: 4px; font: inherit; font-size: 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; }

.fd-pa-feedrow .fd-pa-head { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,.8fr) auto; }
.fd-pa-feedrow .fd-pa-head > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-pa-feedrow .fd-pa-head .fd-pa-stale { font-size: 0; }
.fd-pa-feedrow .fd-pa-head .fd-pa-stale::before { content: '⚠'; font-size: 12px; }
.fd-pa-log-entry { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 12px; }

.fd-pa-title { float: right; margin-left: 6px; }
.fd-pa-filters { overflow: hidden; }
.fd-pa-list:has(> .fd-pa-feedrow) { gap: 0; }
.fd-pa-row.fd-pa-feedrow { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; padding: 6px 0; }
.fd-pa-row.fd-pa-feedrow.is-stale { border-left: 0; }

.fd-pa-panel { position: relative; }
.fd-pa-panel, .fd-pa, .fd-pa-list { min-width: 0; max-width: 100%; }
.fd-pa-title { float: none; position: absolute; right: 0; top: 0; margin: 0; }
.fd-pa-filters { padding-right: 36px; }
.fd-pa-feedrow .fd-pa-form select, .fd-pa-feedrow .fd-pa-form input { max-width: 100%; }

/* Historical evidence (left) and this encounter's coded entry (right). */
.wb-dock[data-list="dx"] { border-style: dashed; }
.edx-panel { min-width: 0; display: grid; gap: 10px; }
.edx-heading { color: var(--teal); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--rule); padding-bottom: 7px; }
.edx-note, .edx-code { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.edx-current { overflow-x: auto; max-width: 100%; }
.edx-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.edx-table td, .edx-table th { padding: 5px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.edx-table th { color: var(--dim); font-weight: 500; }
.edx-actions, .edx-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.edx-button { padding: 3px 6px; min-height: 26px; width: auto; font-size: 12px; }
.edx-tabs [aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
.edx-options { display: grid; gap: 7px; }
.edx-choice { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.edx-choice > div { min-width: 0; overflow-wrap: anywhere; }
.edx-input { min-width: 0; width: 100%; font: inherit; font-size: 13px; padding: 7px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
.edx-past { display: grid; gap: 5px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
@media (pointer: coarse) { .edx-button { min-height: 44px; } }

/* Ticket 4: one unbroken rail; its surplus tools live on the bottom bar. */
.dk-enc-layout .dk-lrail-tools { overflow: hidden; flex-shrink: 0; }
.dk-enc-layout .dk-setrail-tools { overflow: hidden; flex-shrink: 0; border-bottom: 0; padding-bottom: 0; }
.dk-enc-layout .dk-enc-lrail, .dk-enc-layout .dk-side-rail,
.dk-enc-layout .dk-setrail, .dk-enc-layout .dk-pins { overflow: hidden; }
.dk-enc-row { display: flex; flex-wrap: wrap; align-items: center; }
.dk-bottom-rail { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 4px; margin-left: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; }
.dk-bottom-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 4px; min-width: 32px; min-height: 36px; }
.dk-bottom-tools:empty { border: 1px dashed var(--rule); border-radius: 7px; }
.dk-bottom-rail .wb-sym, .dk-bottom-rail .dk-pin { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 0; }
.dk-bottom-rail .wb-sym-l, .dk-bottom-rail .dk-rail-word { display: none; }
.dk-bottom-rail .wb-sym-i { font-size: 18px; }
.dk-bottom-rail .wb-sym-n { font-size: 9px; }
.dk-bottom-rail .dk-deskleave, .dk-bottom-rail .dk-setgear { order: 2; }

/* Compact help in the upper-right corner of working panels. */
.panel-help { position: relative; flex: 0 0 auto; margin-left: auto; font-size: 13px; }
.panel-help-button { display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--rule); border-radius: 50%; color: var(--dim); cursor: pointer; list-style: none; }
.panel-help-button::-webkit-details-marker { display: none; }
.panel-help-body { position: absolute; right: 0; top: 48px; width: min(340px, 70vw); max-height: 55vh;
  overflow: auto; padding: 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 8px; z-index: 15; box-shadow: 0 8px 28px rgba(0,0,0,.25); white-space: normal; }
.panel-help-body > * + * { margin-top: 8px; }

/* Answer provenance: text labels and a matching colour marker on each line. */
.ans-ln { border-left: 3px solid var(--rule); padding-left: 8px; }
.ans-ln.is-direct { border-left-color: var(--teal); }
.ans-ln.is-rec { border-left-color: var(--map-numb); }
.ans-ln.is-amd, .ans-ln.is-speed { border-left-color: var(--amber); }
.ans-ln.is-carried, .ans-ln.is-unknown { border-left-color: var(--rule); }
.ans-ln.is-comment { border-left-color: var(--red-ink); }

/* Details: top search, category panes and slim field controls. */
.dt > .fv-tile-h { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.dt-search-top { grid-column: 1 / -1; grid-row: 1; width: 100%; }
.dt-search-top .dt-find { width: 100%; max-width: none; min-height: 30px; }
.dt .dt-nav-b { min-height: 30px; padding: 4px 7px; }
.dt .dt-nav-tools .btn, .dt .dt-gh .btn, .dt-pages .btn { min-height: 28px; padding: 3px 8px; }
.dt .dt-f { padding: 3px 0; gap: 8px; }
.dt .dt-in, .dt .dt-v { min-height: 30px; padding: 3px 7px; max-width: 100%; }
.dt-field-handle { background: transparent; border: 0; color: var(--dim); text-align: left; font: inherit; cursor: grab; }
.dt-field-handle:hover { color: var(--teal); }
.dt-field-info { color: var(--faint); font-size: 12px; }
.dt-pages { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.dt-pages[hidden], .dt-g[hidden], .dt-f[hidden] { display: none; }
@media(max-width:899px) {
  .dt .dt-form { grid-template-columns: minmax(100px, 28%) minmax(0,1fr); gap: 12px; }
  .dt .dt-nav { position: static; }
  .dt .dt-f { grid-template-columns: 1fr; }
  .dt .dt-nav-b { font-size: 12px; }
}

.dt .dt-v { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Approved CareBee request box: two closed lines, reply expands in place. */
.fd-pa-feedrow .fd-pa-head { display:flex; align-items:center; gap:7px; flex-wrap:nowrap; }
.fd-pa-feedrow .fd-pa-who { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fd-pa-feedrow .fd-pa-open { flex:none; min-height:26px; padding:2px 9px; font-size:12px; }
.fd-pa-feedrow .fd-pa-summary { display:block; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.fd-pa-inline-answer { border-top:1px solid var(--rule); padding-top:8px; margin-top:7px; }

/* One slim design for all encounter bottom-bar actions and utilities. */
.dk-bottom-rail .dk-pin, .dk-bottom-rail .wb-sym, .wb-actions > .btn,
.dk-enc-acts .wb-actions .btn, .dk-enc-acts .dk-act, .dk-enc-acts .dk-bottom-rail button {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-height:30px; height:30px; width:auto; min-width:30px; flex:0 0 auto;
  border:1px solid var(--rule); border-radius:5px; padding:3px 9px; font-size:12px;
  background:var(--panel); color:var(--ink); }
@media(pointer:coarse) { .dk-enc-acts .btn, .dk-enc-acts .dk-bottom-rail button { min-height:44px; height:44px; } }

.wb-procedure-table { overflow-x:auto; padding:0; }
.wb-procedure-table .wb-row, .wb-procedure-head { display:grid; grid-template-columns:minmax(140px,2fr) 100px 110px 130px 36px; gap:0; align-items:stretch; min-width:520px; padding:0; }
.wb-procedure-cell, .wb-procedure-head>span { padding:6px; border:1px solid var(--rule); font-size:12px; }
.wb-procedure-head { list-style:none; color:var(--dim); }
.wb-procedure-source { display:block; color:var(--faint); font-size:11px; }
.wb-procedure-table .wb-row-grip { position:absolute; left:0; top:0; }

.ai-record-controls { display:flex; align-items:center; gap:5px; margin-bottom:8px; }
.ai-record-table-wrap { max-width:100%; overflow-x:auto; }
.ai-record-table { width:100%; border-collapse:collapse; font-size:12px; }
.ai-record-table th, .ai-record-table td { border:1px solid var(--rule); padding:5px 7px; text-align:left; overflow-wrap:anywhere; }
.ai-record-table th { color:var(--dim); font-weight:500; }
.ai-record-table .is-withdrawn { color:var(--faint); }
.ai-record-table input { accent-color:var(--teal); }
.ai-records .ai-record-button { min-height:28px; padding:3px 8px; font-size:12px; }
.ai-file-viewer { margin-top:12px; border:1px solid var(--rule); border-radius:6px; }
.ai-file-head { padding:7px 10px; border-bottom:1px solid var(--rule); overflow-wrap:anywhere; font-weight:600; }
.ai-file-contents { padding:10px; min-height:100px; }
.ai-transcript-text { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; margin:0; }
.ai-check.is-pass { color:var(--teal); }
.ai-check.is-fail { color:var(--red-ink); }
.ai-check.is-not_checked { color:var(--faint); }
.ai-record-status { color:var(--dim); font-size:12px; margin:6px 0; }

/* Approved Details compact table. Blank values open an editor only on click. */
.dt > .fv-tile-h { grid-template-columns:minmax(0,1fr) auto auto; }
.dt .dt-search-top { grid-column:1 / -1; }
.dt-fields-table { border:1px solid var(--rule); }
.dt .dt-fields-table .dt-f, .dt-field-columns { display:grid; grid-template-columns:minmax(120px,35%) minmax(0,1fr); padding:0; gap:0; }
.dt-field-columns { background:var(--sunk); color:var(--dim); font-size:12px; }
.dt-field-columns>span, .dt-fields-table .dt-lab, .dt-fields-table .dt-slot { padding:5px 8px; border-bottom:1px solid var(--rule); }
.dt-field-columns>span:first-child, .dt-fields-table .dt-lab { border-right:1px solid var(--rule); }
.dt .dt-fields-table .dt-v { border:0; padding:0; min-height:24px; width:100%; text-align:left; }
/* THE DETAILS TAB'S SELECTORS, AND ITS LEFT COLUMN ON ONE LINE (23 Nov 2026,
   batch five ticket 3): every heading one line at one height, Blank only a
   slim button, and each choice a slim button, list or chip. */
.dt .dt-nav-b { height: 1.875rem; min-height: 1.875rem; white-space: nowrap; overflow: hidden; }
.dt .dt-nav-b .dt-nav-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dt .dt-nav-b .dt-nav-n { flex: 0 0 auto; }
.dt .dt-nav-tools .dt-blankonly { height: 1.75rem; min-height: 1.75rem; padding: 0 0.625rem; font-size: 0.8125rem; line-height: 1; border-radius: 0.4375rem; }
.dt-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; min-width: 0; width: 100%; }
.dt-ch, .dt-sel { position: relative; height: 1.75rem; min-height: 1.75rem; padding: 0 0.625rem; border: 1px solid var(--rule); border-radius: 0.4375rem; background: transparent; color: var(--ink); font: inherit; font-size: 0.8125rem; line-height: 1; cursor: pointer; }
.dt-sel { background: var(--sunk); max-width: 100%; }
.dt-ch.is-on { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.dt-ch.dt-chip { border-radius: 0.875rem; }
.dt-ch:focus-visible, .dt-sel:focus-visible { outline: 0.125rem solid var(--teal); outline-offset: 0.0625rem; }
.dt-ch::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2.75rem; transform: translateY(-50%); }
.dt-add, .dt-grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; min-width: 0; }
.dt-grp-k { color: var(--dim); font-size: 0.75rem; }
.dt .dt-in.dt-other { width: 11rem; max-width: 100%; min-height: 1.75rem; height: 1.75rem; font-size: 0.8125rem; }
.dt-fields-table .dt-v.is-blank { color:var(--dim); }
.dt-fields-table .dt-ro { font-size:13px; }
.dt .dt-gh .dt-save { display:none; }
.dt-global-save { min-height:28px; padding:3px 9px; }
@media(max-width:650px) { .dt .dt-form { grid-template-columns:1fr; } .dt .dt-nav-l { display:flex; flex-wrap:wrap; gap:4px; } .dt .dt-fields-table .dt-f,.dt-field-columns { grid-template-columns:minmax(100px,35%) minmax(0,1fr); } }
/* DETAILS, OPTION A (26 Nov 2026, his "build A" on the mock-up, after "yellow
   is hard to read"): the controls in ONE row -- the title, then the search,
   Blank only, Save changes and the ? at the right end; a blank count is a
   neutral badge, white on the panel, never yellow text; a blank field's label
   stays white and carries a small "blank" badge. */
.dt > .fv-tile-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dt .dt-search-top { grid-column: auto; grid-row: auto; flex: 0 1 auto; width: auto; margin-left: auto; }
.dt .dt-search-top .dt-find { width: 17.5rem; max-width: 100%; min-height: 28px; }
.dt .dt-nav-n:not(.is-done) { padding: 1px 7px; border: 1px solid var(--rule); border-radius: 9px; background: var(--panel-hover); color: var(--ink); font-size: .6875rem; }
.dt .dt-f.is-blank .dt-lab { color: var(--ink); }
.dt .dt-f.is-blank .dt-lab::after { content: "blank"; margin-left: 6px; padding: 0 6px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel-hover); color: var(--ink); font-size: .625rem; vertical-align: middle; }
.dt-nav-b.is-changed .dt-nav-t::after { color: var(--teal); }
/* DETAILS, 28 Nov 2026 (his screenshot of the left column, names cut to
   "Allergies ...", "Registrat..."): a name is read WHOLE, on as many lines as
   it needs; every row of the column drags, the PEOPLE rows too; the column's
   width and the board's height are his, by a grip on each edge. */
.dt .dt-nav-b { height: auto; min-height: 1.875rem; white-space: normal; overflow: visible; align-items: flex-start; text-align: left; }
.dt .dt-nav-b .dt-nav-t { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; min-width: 0; line-height: 1.25; }
.dt .dt-nav-b .dt-nav-n { white-space: nowrap; }
.dt .dt-nav { position: relative; }
.dt-grip { flex: 0 0 auto; touch-action: none; }
.dt-grip-w { position: absolute; top: 0; bottom: 0; right: 0; width: 6px; cursor: col-resize; }
.dt-grip-h { height: 10px; margin-top: 4px; border-top: 1px solid var(--line); cursor: row-resize; }
.dt-grip-h::after { content: ""; display: block; width: 36px; height: 3px; margin: 3px auto 0; border-radius: 2px; background: var(--rule); }
.dt-grip:hover, .dt-grip.is-dragging, .dt-grip:focus-visible { background: var(--teal); outline: 0; opacity: .55; }
.dt-grip-h:hover::after, .dt-grip-h.is-dragging::after, .dt-grip-h:focus-visible::after { background: var(--ink); }
@media (min-width: 900px) {
  .dt .dt-form { grid-template-columns: var(--dt-nav-w, minmax(180px, max-content)) minmax(0, 1fr); }
  .dt .dt-nav { max-width: var(--dt-nav-w, 20rem); }
}
.dt .dt-form.has-h { height: var(--dt-h); align-items: stretch; }
.dt .dt-form.has-h > .dt-nav, .dt .dt-form.has-h > .dt-col { min-height: 0; overflow-y: auto; }
@media (max-width: 650px) { .dt-grip-w { display: none; } }
/* RESULT SCREENING (28 Nov, his screenshot): the day sits beside the title,
   clear of the page's own close button in the top right corner. */
.hsb-page .hs-title { flex: 0 1 auto; }
/* THE PASSPORT COPY (26 Nov 2026, "allow saving of the passport copy"): under
   the IC/Passport row, across both columns -- the copies filed, then Upload
   and Take a photo, slim where a pointer hovers. */
.dt .dt-f.has-idcopy { grid-template-rows: auto auto; }
.dt-idcopy-host { grid-column: 1 / -1; padding: 4px 8px 6px; border-bottom: 1px solid var(--rule); }
.dt-idcopy { display: flex; flex-direction: column; gap: 4px; }
.dt-idcopy-list, .dt-idcopy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dt-idcopy-none { color: var(--dim); font-size: .8125rem; }
.dt-idcopy-open.is-withdrawn { text-decoration: line-through; }
@media (hover: hover) and (pointer: fine) { .dt-idcopy .btn { min-height: 28px; padding: 3px 9px; font-size: .8125rem; } }

.ai-records { display:block; min-width:0; width:100%; max-width:100%; }
.ai-record-controls { flex-wrap:wrap; }
.ai-record-table { min-width:640px; }
/* 🩻 THE RADIOLOGY BOARD (21 Nov, "re-design this - vertical column - horizontal row"): the
   types column, one slim row of 1.5rem controls, the table; ftabradiology.ts. */
.rdb { display: flex; align-items: stretch; min-height: 22rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.rdb-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.5rem 0.375rem; border-right: 1px solid var(--line-soft); min-width: 0; overflow: auto; }
.rdb-side[hidden], .rdb-tab[hidden], .rdb-grip[hidden], .rdb-pop[hidden], .rdb-menu[hidden] { display: none; }
.rdb-k { font: 600 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); padding: 0.25rem 0.5rem 0.5rem; }
.rdb-type { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border: 0; border-radius: 0.5rem; background: none; color: var(--dim); font: 500 0.85rem var(--display); text-align: left; cursor: grab; }
.rdb-type.is-on { background: var(--panel-2); color: var(--ink); box-shadow: inset 0.1875rem 0 0 var(--teal); }
.rdb-type.is-zero { color: var(--faint); }
.rdb-type:focus-visible { outline: 0.125rem solid var(--teal); }
.rdb-type-l { flex: 1 1 auto; }
.rdb-n { font: 500 0.75rem var(--mono); color: var(--dimmer); }
.rdb-fold { margin: auto 0.5rem 0.25rem; align-self: flex-start; min-height: 1.5rem; height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }
.rdb-tab { flex: 0 0 auto; writing-mode: vertical-rl; border: 0; border-right: 1px solid var(--line-soft); background: var(--panel-2); color: var(--dim); font: 500 0.8rem var(--display); padding: 0.5rem 0.25rem; cursor: pointer; }
.rdb-grip { flex: 0 0 0.375rem; cursor: col-resize; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.rdb-grip::after { content: ""; width: 0.125rem; height: 2.5rem; border-radius: 0.125rem; background: var(--teal); }
.rdb-grip:focus-visible { outline: 0.125rem solid var(--teal); }
.rdb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rdb-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.rdb-search, .rdb-sel, .rdb-info { height: 1.5rem; min-height: 1.5rem; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 0.375rem; background: var(--sunk); color: var(--ink); font-size: 0.75rem; }
.rdb-search { width: 13.75rem; }
.rdb-seg { display: inline-flex; height: 1.5rem; border: 1px solid var(--line); border-radius: 0.375rem; overflow: hidden; }
.rdb-state { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.5rem; border: 0; border-right: 1px solid var(--line-soft); background: none; color: var(--dim); font: 500 0.72rem var(--display); white-space: nowrap; cursor: pointer; }
.rdb-state:last-child { border-right: 0; }
.rdb-state.is-on { background: var(--panel-2); color: var(--teal); }
.rdb-state.is-zero { color: var(--faint); }
.rdb-flex { flex: 1 1 auto; }
.rdb-said { font-size: 0.75rem; color: var(--dim); }
.rdb-infobox, .rdb-open { position: relative; display: inline-block; }
.rdb-info { cursor: pointer; padding: 0 0.4rem; }
.rdb-pop, .rdb-menu { position: absolute; right: 0; top: 1.75rem; z-index: 5; min-width: 14rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--panel); color: var(--ink-2); font-size: 0.8rem; box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35); }
.rdb-menu { display: flex; flex-direction: column; gap: 0.25rem; min-width: 11rem; }
.rdb-menu-i { border: 0; background: none; color: var(--ink-2); text-align: left; font: 500 0.85rem var(--display); padding: 0.35rem 0.5rem; border-radius: 0.375rem; cursor: pointer; }
.rdb-menu-i:hover, .rdb-menu-i:focus-visible { background: var(--panel-2); }
.rdb-notes { display: flex; flex-direction: column; gap: 0.25rem; padding: 0 0.75rem; }
.rdb-note { font-size: 0.8rem; color: var(--amber); padding-top: 0.375rem; }
.rdb-body { flex: 1 1 auto; overflow: auto; padding: 0.25rem 0.5rem 0.75rem; }
.rdb-table .fv-st-c { font-size: 0.8rem; vertical-align: top; }
.rdb-table .fv-st-h:last-child { display: flex; align-items: center; gap: 0.375rem; }
.rdb-copyall { height: 1.5rem; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 0.375rem; background: none; color: var(--teal); font-size: 0.72rem; white-space: nowrap; cursor: pointer; }
.rdb-copyall:disabled { color: var(--faint); cursor: default; }
.rdb-r.is-withdrawn .fv-st-c { color: var(--dimmer); }
.rdb-r.is-pending { background: var(--panel-2); }
.rdb-gone { color: var(--dimmer); }
.rdb-v.is-unverified, .rdb-v.is-critical { color: var(--amber); }
.rdb-v.is-verified { color: var(--teal); }
.rdb-v.is-pending { color: var(--dim); }
.rdb-link { border: 0; background: none; padding: 0 0.25rem; color: var(--teal); font: inherit; cursor: pointer; }
.rdb-link:hover, .rdb-link:focus-visible { text-decoration: underline; }
.rdb-sum { color: var(--ink-2); }
.rdb-dim { color: var(--dim); }
.rdb-imgs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.rdb-unread { margin: 0.75rem; }
.rdb-store-r { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.375rem 0; border-top: 1px solid var(--line-soft); font-size: 0.85rem; }
.rdb-store-r.is-same { color: var(--teal); }
@media (max-width: 899px) { .rdb { flex-direction: column; } .rdb-grip, .rdb-tab { display: none; } .rdb-side { width: auto !important; border-right: 0; } }
.rdb-wait { color: var(--amber); font-weight: 600; }
.rdb-photos { margin-top: 0.5rem; min-height: 1.5rem; height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }

/* 💊 THE MEDICATION BOARD (21 Nov 2026, medboard.ts): the allergy row as
   bubbles on one line, a left column of episodes and states, one slim row,
   the table beside a reading pane, ⚡ the interaction check. */
.mdb { display: flex; flex-direction: column; min-height: 24rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); overflow: visible; /* 27 Nov: the one line's cards open below it */ }
.mdb-allergy { display: flex; align-items: center; gap: 0.375rem; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.mdb-more { display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.mdb-more[hidden], .mdb-side[hidden], .mdb-tab[hidden], .mdb-grip[hidden], .mdb-pop[hidden], .mdb-list[hidden], .mdb-split[hidden] { display: none; }
.mdb-lead { font: 600 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; flex: 0 0 auto; }
.mdb-lead.is-allergy { color: var(--red); }
.mdb-lead.is-side { color: #91bdff; }
[data-theme="day"] .mdb-lead.is-side { color: #1d4f9e; }
.mdb-bub { flex: 0 0 auto; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--line); color: var(--ink-2); }
.mdb-bub.is-allergy { border-color: var(--red); color: var(--red); }
.mdb-bub.is-side { border-color: #2f6fd0; background: #0f2240; color: #91bdff; }
[data-theme="day"] .mdb-bub.is-side { border-color: #2f6fd0; background: #e8f0fc; color: #1d4f9e; }
.mdb-bub.is-none, .mdb-bub.is-nkda { color: var(--dim); }
.mdb-bub.is-unread { color: var(--amber); }
.mdb-bub.is-held { font-style: italic; }
.mdb-plus { height: 1.5rem; min-height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }
/* The board's one line (27 Nov): 💊 · ⚠ · ⊘ · ⧉ · ?, each part's card on hover, focus or a pin. */
.mdb-strip { position: relative; display: flex; align-items: center; gap: 0.625rem; min-height: 2.5rem; padding: 0.25rem 0.625rem; border-bottom: 1px solid var(--line-soft); }
.mdb-part { position: relative; display: flex; align-items: center; gap: 0.375rem; flex: 0 1 auto; min-width: 0; white-space: nowrap; padding: 0.125rem 0.375rem; border-radius: 0.5rem; cursor: default; outline-offset: 2px; }
.mdb-part + .mdb-part { border-left: 1px solid var(--line-soft); padding-left: 0.625rem; border-radius: 0; }
.mdb-part:hover, .mdb-part:focus-visible { background: var(--panel-2, rgba(255,255,255,0.04)); }
.mdb-ic { font-size: 0.9375rem; line-height: 1; }
.mdb-ic.is-allergy { color: var(--red); }
.mdb-ic.is-side { color: #91bdff; }
[data-theme="day"] .mdb-ic.is-side { color: #1d4f9e; }
.mdb-num { font: 600 0.875rem var(--mono); color: var(--ink); }
.mdb-lab { font-size: 0.75rem; color: var(--dim); }
.mdb-strip .mdb-bub { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.mdb-strip .mdb-plus { display: inline-flex; align-items: center; height: 1.375rem; min-height: 0; padding: 0 0.375rem; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.mdb-chip { flex: 0 0 auto; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--line); }
.mdb-chip.is-none { color: var(--amber); border-color: var(--amber); border-style: dashed; }
.mdb-chip.is-nkda { color: var(--green, #5fbf8a); border-color: var(--green, #5fbf8a); }
.mdb-chip.is-unread { color: var(--amber); }
.mdb-sp { flex: 1 1 auto; }
.mdb-said { font-size: 0.75rem; color: var(--dim); }
.mdb-said:empty { display: none; }
.mdb-slim, .mdb-strip .ivx-help { height: 1.625rem; min-height: 1.625rem; min-width: 1.625rem; padding: 0 0.375rem; font-size: 0.8125rem; line-height: 1; }
.mdb-tip { display: none; position: absolute; top: calc(100% + 0.375rem); left: 0; z-index: 20; min-width: 15rem; max-width: 22rem; white-space: normal; padding: 0.5rem 0.625rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--panel); box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.35); font-size: 0.8125rem; color: var(--ink-2); }
.mdb-part:hover > .mdb-tip, .mdb-part:focus-within > .mdb-tip, .mdb-part.is-pinned > .mdb-tip { display: block; }
.mdb-tip-t { font-weight: 600; margin-bottom: 0.25rem; color: var(--ink); }
.mdb-tip-l { margin: 0; padding-left: 1rem; }
.mdb-tip-i.is-allergy { color: var(--red); }
.mdb-tip-i.is-held { font-style: italic; }
.mdb-tip-src { margin-top: 0.375rem; font-size: 0.75rem; color: var(--dim); }
.mdb-help-note { padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; }
.mdb-help-note[hidden] { display: none; }
@media (max-width: 600px) { .mdb-strip { flex-wrap: wrap; row-gap: 0.375rem; } .mdb-part + .mdb-part { border-left: 0; padding-left: 0.375rem; } .mdb-tip { max-width: calc(100vw - 2rem); } }
.mdb-body { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; border-radius: 0 0 var(--r) var(--r); }
.mdb-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.5rem 0.375rem; border-right: 1px solid var(--line-soft); min-width: 0; overflow: auto; }
.mdb-scope { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 0 0.25rem 0.375rem; }
.mdb-scope-b { flex: 1 1 0; height: 1.5rem; border: 0; background: none; color: var(--dim); font: 500 0.75rem var(--display); cursor: pointer; }
.mdb-scope-b.is-on, .mdb-state.is-on, .mdb-ep.is-on, .mdb-src.is-on { background: #173a35; color: var(--ink); }
.mdb-k { font: 600 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); padding: 0.375rem 0.5rem 0.25rem; }
.mdb-state, .mdb-ep { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border: 0; border-radius: 8px; background: none; color: var(--dim); font: 500 0.85rem var(--display); text-align: left; cursor: grab; }
.mdb-ep { flex-wrap: wrap; }
.mdb-ep-l, .mdb-state-l { flex: 1 1 auto; }
.mdb-ep-w { font-size: 0.72rem; color: var(--dimmer); }
.mdb-state.is-zero { color: var(--faint); }
.mdb-n { font: 500 0.75rem var(--mono); font-style: normal; color: var(--dimmer); }
.mdb-none { color: var(--dimmer); font-size: 0.8rem; padding: 0.25rem 0.5rem; }
.mdb-fold { margin: auto 0.5rem 0.25rem; align-self: flex-start; min-height: 1.5rem; height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; }
.mdb-tab { flex: 0 0 auto; writing-mode: vertical-rl; border: 0; border-right: 1px solid var(--line-soft); background: var(--panel-2); color: var(--dim); font: 500 0.8rem var(--display); padding: 0.5rem 0.25rem; cursor: pointer; }
.mdb-grip, .mdb-split { flex: 0 0 6px; cursor: col-resize; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.mdb-grip::after, .mdb-split::after { content: ""; width: 2px; height: 2.5rem; border-radius: 2px; background: #3d8a80; }
.mdb-grip:focus-visible, .mdb-split:focus-visible { outline: 2px solid var(--teal); }
.mdb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; position: relative; }
.mdb-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; padding: 0.375rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.mdb-bar .btn, .mdb-search, .mdb-when, .mdb-who { height: 24px; min-height: 24px; padding: 0 0.5rem; border-radius: 6px; font-size: 0.75rem; }
.mdb-search { width: 13rem; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); }
.mdb-when, .mdb-who { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.mdb-seg { display: inline-flex; height: 24px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mdb-src { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.5rem; border: 0; border-right: 1px solid var(--line-soft); background: none; color: var(--dim); font: 500 0.72rem var(--display); white-space: nowrap; cursor: pointer; }
.mdb-src:last-child { border-right: 0; }
.mdb-src.is-zero { color: var(--faint); }
.mdb-flex { flex: 1 1 auto; }
.mdb-zap { width: 24px; padding: 0; }
.mdb-rx:disabled { opacity: 0.55; cursor: not-allowed; }
.mdb-pop { position: absolute; right: 0.75rem; top: 2.25rem; z-index: 5; width: 30rem; max-width: calc(100% - 1.5rem); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--z1); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.375rem; }
.mdb-pop-h { display: flex; align-items: center; justify-content: space-between; font: 600 0.85rem var(--display); }
.mdb-pop-w, .mdb-pop-foot { font-size: 0.75rem; color: var(--dim); }
.mdb-pop-acts { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.mdb-ix-r.lv-avoid .fv-st-level { color: var(--red); }
.mdb-ix-r.lv-caution .fv-st-level { color: var(--amber); }
.mdb-split2 { flex: 1 1 auto; min-height: 0; display: flex; }
.mdb-list { flex: 1 1 56%; min-width: 0; overflow: auto; }
.mdb-pane { flex: 1 1 44%; min-width: 0; overflow: auto; display: flex; flex-direction: column; gap: 0.375rem; padding: 0.5rem 0.75rem; }
.mdb.is-wide .mdb-pane { flex-basis: 100% !important; }
.mdb-row.is-sel { background: #173a35; }
.mdb-row.is-held, .mdb-row.is-unread { color: var(--dim); font-style: italic; }
.mdb-med { display: inline-flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.mdb-med-b { border: 0; background: none; color: var(--ink); font: 500 0.85rem var(--display); text-align: left; padding: 0; cursor: pointer; }
.mdb-ward { font-size: 0.7rem; padding: 0 0.375rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.mdb-course { display: inline-flex; align-items: center; gap: 0.375rem; }
.mdb-track { display: inline-block; width: 3rem; height: 0.375rem; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.mdb-fill { display: block; height: 100%; background: var(--teal); }
.mdb-course-w { font-size: 0.78rem; color: var(--ink-2); }
.mdb-pane-h { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.mdb-pane-t { font: 600 0.95rem var(--display); }
.mdb-acts { display: inline-flex; gap: 0.25rem; }
.mdb-acts .btn { height: 24px; min-height: 24px; padding: 0 0.5rem; }
.mdb-out { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; font-size: 0.8rem; }
.mdb-why { height: 24px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); border-radius: 6px; padding: 0 0.5rem; font-size: 0.75rem; }
.mdb-kv-k { text-align: left; font-weight: 500; color: var(--dim); padding: 0.25rem 0.5rem; width: 7rem; }
.mdb-kv-v { padding: 0.25rem 0.5rem; }
.mdb-alerts { display: flex; flex-direction: column; gap: 0.25rem; }
.mdb-alert { color: var(--amber); font-size: 0.8rem; }
.mdb-alert-w, .mdb-foot, .mdb-held { color: var(--dimmer); font-size: 0.75rem; }

/* ℞ THE PRESCRIBING BOARD (21 Nov 2026, rxboard.ts): the favourites column,
   the two bubble lines (allergies red, intolerable side effects in the
   numbness blue), one slim row, the lines beside the print preview. */
.rxb { display: flex; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); overflow: hidden; margin-bottom: .5rem; }
.rxb-side { flex-shrink: 0; display: flex; flex-direction: column; gap: .125rem; padding: .5rem .375rem; border-right: 1px solid var(--line); min-width: 0; overflow-y: auto; }
.rxb-side-h { display: flex; align-items: center; padding: .25rem .5rem .5rem; }
.rxb-k { font: 600 .6875rem var(--mono); letter-spacing: .1em; color: var(--teal); text-transform: uppercase; }
.rxb-b { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-height: 1.5rem; padding: 0 .5rem; border-radius: .375rem; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: 500 .75rem var(--display); white-space: nowrap; cursor: pointer; }
.rxb-b:disabled { opacity: .55; cursor: not-allowed; }
.rxb-b.is-on { background: var(--selected-bg); color: var(--teal); border-color: var(--teal); }
.rxb-group, .rxb-fav { width: 100%; justify-content: flex-start; min-height: 1.875rem; border-color: transparent; background: transparent; font-size: .8125rem; }
.rxb-group.is-on { background: var(--selected-bg); color: var(--ink); }
.rxb-group.side-over, .rxb-fav.side-over { outline: 2px dashed var(--teal); }
.rxb-group.is-dragging, .rxb-fav.is-dragging { opacity: .5; }
.rxb-grip-dots { color: var(--faint); font-size: .6875rem; cursor: grab; }
.rxb-g-n { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.rxb-count { font: 500 .6875rem var(--mono); color: var(--dim); font-style: normal; }
.rxb-favs { margin: .5rem .25rem; border-top: 1px dashed var(--line); padding-top: .5rem; display: flex; flex-direction: column; gap: .125rem; }
.rxb-favrow { display: flex; align-items: center; gap: .125rem; }
.rxb-fav { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rxb-favdel { border-color: transparent; background: transparent; }
.rxb-hint { font: 500 .6875rem var(--mono); color: var(--dim); }
.rxb-newfav, .rxb-fold { align-self: flex-start; margin: .25rem .5rem; font-size: .6875rem; }
.rxb-grow { flex-grow: 1; }
.rxb-rail { writing-mode: vertical-rl; min-height: 6rem; border-radius: 0; border-width: 0 1px 0 0; font: 600 .6875rem var(--mono); letter-spacing: .1em; }
.rxb-grip, .rxb-pgrip { flex-shrink: 0; width: .375rem; background: var(--sunk); cursor: col-resize; position: relative; }
.rxb-grip::after, .rxb-pgrip::after { content: ""; position: absolute; left: .125rem; top: 50%; width: 2px; height: 2.5rem; margin-top: -1.25rem; border-radius: 2px; background: var(--rule); }
.rxb-grip:focus-visible, .rxb-pgrip:focus-visible { outline: 2px solid var(--teal); }
.rxb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rxb-line { display: flex; align-items: center; gap: .375rem; padding: .3125rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.rxb-line.is-open { white-space: normal; flex-wrap: wrap; }
.rxb-lead { font-size: .75rem; flex-shrink: 0; }
.rxb-l1 .rxb-lead { color: var(--red); }
.rxb-l2 .rxb-lead { color: var(--map-numb); }
.rxb-bubbles { display: inline-flex; gap: .375rem; min-width: 0; overflow: hidden; align-items: center; }
.rxb-line.is-open .rxb-bubbles { flex-wrap: wrap; }
.rxb-bub { display: inline-flex; align-items: center; min-height: 1.375rem; padding: 0 .5625rem; border-radius: 999px; font-size: .75rem; color: var(--ink); }
.rxb-l1 .rxb-bub { border: 1px solid var(--red); background: color-mix(in srgb, var(--red) 16%, transparent); }
.rxb-l2 .rxb-bub { border: 1px solid var(--map-numb); background: color-mix(in srgb, var(--map-numb) 16%, transparent); }
.rxb-more { min-height: 1.375rem; border-radius: 999px; font-size: .6875rem; }
.rxb-facts { margin-left: auto; font: 500 .6875rem var(--mono); color: var(--dim); flex-shrink: 0; }
.rxb-none { font-size: .75rem; color: var(--dim); }
.rxb-none.is-amber { color: var(--amber); }
.rxb-slim { display: flex; align-items: center; gap: .375rem; padding: .375rem .75rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rxb-slim .rxb-b { height: 1.5rem; min-height: 1.5rem; }
.rxb-q, .rxb-in, .rxb-sel { height: 1.5rem; box-sizing: border-box; border-radius: .375rem; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: 500 .75rem var(--display); padding: 0 .5rem; }
.rxb-q { width: 15rem; }
.rxb-seg { display: inline-flex; border: 1px solid var(--line); border-radius: .375rem; overflow: hidden; }
.rxb-seg .rxb-b { border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.rxb-seg .rxb-b:last-child { border-right: 0; }
.rxb-zap { width: 1.5rem; padding: 0; border-color: var(--teal); }
.rxb-printwrap { position: relative; }
.rxb-menu { position: absolute; right: 0; top: 1.75rem; z-index: 5; display: flex; flex-direction: column; gap: .25rem; padding: .375rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--panel); }
.rxb-menu .rxb-b { justify-content: flex-start; }
.rxb-hits, .rxb-check, .rxb-new, .rxb-sheet { padding: .5rem .75rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; }
.rxb-hitrow { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; }
.rxb-hn { flex: 1; min-width: 0; color: var(--ink); }
.rxb-hf { font: 500 .6875rem var(--mono); color: var(--dim); }
.rxb-hf.is-dim { color: var(--faint); }
.rxb-alert { font-size: .8125rem; }
.rxb-alert.is-red { color: var(--red); }
.rxb-alert.is-amber { color: var(--amber); }
.rxb-say { padding: 0 .75rem; }
.rxb-split { display: flex; min-height: 0; flex: 1; }
.rxb-lines { min-width: 0; display: flex; flex-direction: column; overflow-x: auto; }
.rxb-lines.is-over { outline: 2px solid var(--teal); }
.rxb-lines.is-sdd { display: none; }
.rxb-lines.is-sdd + .rxb-pgrip { display: none; }
.rxb-table, .rxb-ftable { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.rxb-table th, .rxb-ftable th { font: 600 .6875rem var(--mono); letter-spacing: .06em; color: var(--dim); text-transform: uppercase; text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); }
.rxb-table td, .rxb-ftable td { padding: .375rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink); }
.rxb-src-w, .rxb-from { font: 500 .6875rem var(--mono); color: var(--dim); }
.rxb-chk.is-ok { color: var(--teal); }
.rxb-chk.is-red { color: var(--red); }
.rxb-chk.is-dim { color: var(--dim); font-size: .75rem; }
.rxb-x { border-color: transparent; background: transparent; }
.rxb-foot { display: flex; align-items: center; gap: .375rem; padding: .375rem .5rem; flex-wrap: wrap; }
.rxb-send { border-color: var(--teal); background: var(--selected-bg); }
.rxb-preview { flex: 1; min-width: 12rem; padding: .5rem .75rem; display: flex; flex-direction: column; gap: .375rem; }
.rxb-paper { border: 1px solid var(--line); border-radius: .5rem; padding: .625rem .75rem; background: var(--sunk); display: flex; flex-direction: column; gap: .25rem; font-size: .8125rem; color: var(--ink); }
.rxb-p-clinic { font-weight: 600; }
.rxb-p-doc, .rxb-p-pt { font-size: .75rem; color: var(--dim); }
.rxb-p-rx { font-family: var(--serif); }
.rxb-p-cd { color: var(--red); font-size: .75rem; }
.rxb-p-sig { margin-top: .75rem; font-size: .75rem; color: var(--dim); }
.rxb-pad { padding: 0 .25rem; }
.rxb:not(.is-sdd) .rxb-pad .rx-row .rx-send, .rxb:not(.is-sdd) .rxb-pad .rx-row .rx-print { display: none; }
.rxb-new-h { display: flex; align-items: center; gap: .375rem; }
.rxb-req { width: 100%; box-sizing: border-box; font: 500 .8125rem var(--display); background: var(--sunk); color: var(--ink); border: 1px solid var(--line); border-radius: .375rem; padding: .375rem .5rem; }
.rxb-sheet-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rxb-sheet-l { width: 6rem; font-size: .75rem; color: var(--dim); }
.rxb-copies { width: 4rem; }
.rxb-fname { width: 14rem; }
.rxb-fhits { display: flex; flex-wrap: wrap; gap: .25rem; }
.rxb-ask { padding: 0 .375rem; }
/* THE BOARDS' ONE ROW OF CONTROLS (24 Nov, "search buttons are different
   design"; then "using the same format for investigation, pls rebuild the
   visits"): one slim rounded set -- search, joined switch, selects, buttons
   and the one ? -- shared by the investigations board and the visit board
   (section.ivx). A finger keeps its target. */
section.ivx .ivb-main, section.ivx .vb-main { container-type: inline-size; }
@container (max-width: 860px) { section.ivx .ivx-bar { flex-wrap: wrap; } }
section.ivx .ivx-bar { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; padding: 2px 0 6px; border-bottom: 1px solid var(--line-soft); position: relative; }
section.ivx .ivx-flex { flex: 1 1 auto; }
section.ivx .ivx-bar .ivx-search, section.ivx .ivx-bar .ivx-sel, section.ivx .ivx-btn, section.ivx .ivx-bar .ivx-help {
  box-sizing: border-box; height: 28px; min-height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 14px;
  background: transparent; color: var(--ink-2); font-size: 0.78rem; font-family: inherit; }
section.ivx .ivx-bar .ivx-search { flex: 1 1 130px; max-width: 240px; width: auto; min-width: 110px; background: var(--sunk); color: var(--ink); }
section.ivx .ivx-bar .ivx-sel { flex: 0 1 auto; width: auto; min-width: 0; max-width: 150px; padding: 0 8px; cursor: pointer; }
section.ivx .ivx-bar .ivx-seg, section.ivx .ivx-bar .ivx-btn, section.ivx .ivx-bar .ivx-help { flex: 0 0 auto; }
section.ivx .ivx-btn { cursor: pointer; white-space: nowrap; }
section.ivx .ivx-btn:disabled { color: var(--dimmer); cursor: default; }
section.ivx .ivx-bar .ivx-help { width: 28px; padding: 0; border-color: var(--teal); color: var(--teal); font-weight: 600; cursor: pointer; }
section.ivx .ivx-bar .ivx-help[aria-expanded="true"] { background: var(--teal); color: var(--bg); }
section.ivx .ivx-help-note { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--teal); border-radius: 10px; background: var(--panel); color: var(--ink-2); font-size: 0.78rem; line-height: 1.4; }
section.ivx .ivx-bar .ivx-seg { display: inline-flex; flex-wrap: nowrap; box-sizing: border-box; height: 28px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
section.ivx .ivx-seg .ivx-seg-b { display: inline-flex; align-items: center; gap: 5px; height: 100%; min-height: 0; margin: 0; padding: 0 10px; border: 0; border-right: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--ink-2); font-size: 0.78rem; font-family: inherit; font-weight: 400; white-space: nowrap; cursor: pointer; }
section.ivx .ivx-seg .ivx-seg-b:last-child { border-right: 0; }
section.ivx .ivx-seg .ivx-seg-b.is-empty, section.ivx .ivx-seg .ivx-seg-b.is-zero { color: var(--dimmer); }
section.ivx .ivx-seg .ivx-seg-b[aria-pressed="true"] { background: var(--teal); color: var(--bg); font-weight: 600; }
section.ivx .ivx-seg .ivx-seg-b[aria-pressed="true"] .op-seg-n, section.ivx .ivx-seg .ivx-seg-b[aria-pressed="true"] .rdb-n { color: var(--bg); }
section.ivx .rdb-table .fv-st-h .ivx-btn { height: 24px; min-height: 24px; }
@media (hover: none) { section.ivx .ivx-bar .ivx-search, section.ivx .ivx-bar .ivx-sel, section.ivx .ivx-btn, section.ivx .ivx-bar .ivx-help, section.ivx .ivx-bar .ivx-seg { min-height: var(--tap); height: auto; }
  section.ivx .ivx-bar .ivx-help { width: var(--tap); } section.ivx .ivb-sub { min-height: var(--tap); } }
/* ⚖ BODY MEASUREMENTS (25 Nov): Design B wide (the list and the series
   panel), Design A narrow (small tiles, three across, and a sheet). Tokens
   only; the board's one row of controls (section.ivx). */
section.bm { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
section.bm .bm-count { color: var(--dim); font-size: 0.75rem; white-space: nowrap; }
section.bm .bm-wrap { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 10px; min-height: 0; }
section.bm .bm-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-height: 72vh; overflow-y: auto; }
section.bm .bm-panel { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow-y: auto; max-height: 72vh; }
section.bm .bm-sec { border-radius: var(--r); }
section.bm .bm-sec.is-over { outline: 2px dashed var(--teal); outline-offset: 1px; }
section.bm .bm-sec-h { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px; padding: 2px 6px; border: 0; background: transparent; color: var(--label); font: inherit; font-size: 0.75rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; text-align: left; }
section.bm .bm-sec[data-section="active"] { padding: 4px; border: 1px solid var(--teal); background: var(--panel-2); }
section.bm .bm-sec-n { margin-left: auto; color: var(--dim); font-style: normal; }
section.bm .bm-sec-b { display: flex; flex-direction: column; gap: 2px; }
section.bm .bm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 3px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 0.8125rem; text-align: left; cursor: grab; }
section.bm .bm-row.is-sel { border-color: var(--teal); background: var(--sunk); }
section.bm .bm-row .bm-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
section.bm .bm-v { color: var(--ink-2); font-family: var(--mono); font-size: 0.75rem; white-space: nowrap; }
section.bm .bm-ch { color: var(--dim); font-size: 0.6875rem; white-space: nowrap; }
section.bm .is-flag .bm-v { color: var(--amber-ink); }
section.bm .bm-has-mk { color: var(--teal-2); font-size: 0.6875rem; }
section.bm .bm-empty { padding: 6px 8px; color: var(--dim); font-size: 0.75rem; }
section.bm .bm-bring { margin: 4px 6px; }
section.bm .bm-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 2px 4px 6px; }
section.bm .bm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: var(--tap); padding: 6px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.75rem; text-align: left; cursor: pointer; overflow: hidden; }
section.bm .bm-tile .bm-n { color: var(--dim); font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
section.bm .bm-tile .bm-v { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
section.bm .bm-tile.is-picked, section.bm .bm-row.is-picked { outline: 2px solid var(--amber); }
section.bm .bm-p-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
section.bm .bm-p-name { margin: 0 auto 0 0; font-size: 1rem; color: var(--ink); }
section.bm .bm-switch.is-on { border-color: var(--teal); color: var(--teal); }
section.bm .bm-p-rep { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0; font-size: 0.75rem; color: var(--ink-2); }
section.bm .bm-k { color: var(--label); font-size: 0.6875rem; letter-spacing: .04em; text-transform: uppercase; }
section.bm .bm-due { color: var(--dim); }
section.bm .bm-p-latest { margin: 4px 0; font-size: 0.875rem; color: var(--ink); }
section.bm .bm-flag { color: var(--amber-ink); font-size: 0.75rem; }
section.bm .bm-unsure { color: var(--amber-ink); font-size: 0.6875rem; }
section.bm .bm-p-band, section.bm .bm-p-why { color: var(--dim); font-size: 0.75rem; margin: 2px 0; }
section.bm .bm-chart { display: block; width: 100%; height: auto; margin: 6px 0; }
section.bm .bm-chart .bm-grid { stroke: var(--line-soft); stroke-width: 1; fill: none; }
section.bm .bm-chart .bm-band { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
section.bm .bm-chart .bm-tick { fill: var(--dim); }
section.bm .bm-chart .bm-line { stroke: var(--teal); stroke-width: 2; fill: none; }
section.bm .bm-chart .bm-line.is-second { stroke-dasharray: 6 4; }
section.bm .bm-chart .bm-pt { fill: var(--teal); stroke: var(--panel); stroke-width: 1; }
section.bm .bm-chart .bm-pt.is-unsure { fill: var(--panel); stroke: var(--amber); stroke-width: 1.5; }
section.bm .bm-chart .bm-pt.is-second { fill: var(--panel); stroke: var(--teal); stroke-width: 1.5; }
section.bm .bm-chart .bm-mk { stroke-width: 1.5; stroke-dasharray: 3 3; fill: none; }
section.bm .bm-chart .bm-mk-n { fill: var(--bg); font-weight: 700; }
section.bm .bm-ink-treat { stroke: var(--amber); fill: var(--amber); }
section.bm .bm-ink-stage { stroke: var(--map-numb); fill: var(--map-numb); }
section.bm .bm-ink-other { stroke: var(--ink-2); fill: var(--ink-2); }
section.bm .bm-p-mk { margin: 8px 0; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
section.bm .bm-mk-row { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--ink); }
section.bm .bm-mk-row.is-off .bm-mk-t, section.bm .bm-mk-row.is-off .bm-mk-d { text-decoration: line-through; color: var(--dim); }
section.bm .bm-mk-b { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; color: var(--bg); font-size: 0.6875rem; font-weight: 700; }
section.bm span.bm-ink-treat { background: var(--amber); } section.bm span.bm-ink-stage { background: var(--map-numb); } section.bm span.bm-ink-other { background: var(--ink-2); }
section.bm .bm-mk-row.is-off .bm-mk-b { background: var(--line); }
section.bm .bm-mk-d { color: var(--dim); font-size: 0.75rem; white-space: nowrap; }
section.bm .bm-mk-t { flex: 1 1 auto; min-width: 0; }
section.bm .bm-since { color: var(--ink-2); font-size: 0.75rem; padding-left: 24px; }
section.bm .bm-sug { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 0.75rem; }
section.bm .bm-sug-t { flex: 1 1 auto; }
section.bm .bm-mk-form, section.bm .bm-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
section.bm .bm-in { box-sizing: border-box; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.78rem; }
section.bm .bm-words, section.bm .bm-mk-label { flex: 1 1 140px; min-width: 0; }
section.bm .bm-rows { display: flex; flex-direction: column; margin-top: 6px; border-top: 1px solid var(--line-soft); }
section.bm .bm-r { display: grid; grid-template-columns: 96px minmax(0, auto) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 2px; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--ink); }
section.bm .bm-r-d { color: var(--dim); font-size: 0.75rem; }
section.bm .bm-r-v { font-family: var(--mono); font-size: 0.78rem; }
section.bm .bm-r-v.is-high, section.bm .bm-r-v.is-low { color: var(--amber-ink); }
section.bm .bm-r-w { color: var(--dim); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
section.bm .bm-r.is-marker { background: var(--panel-2); }
section.bm .bm-veil { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(0, 0, 0, 0.45); }
section.bm .bm-sheet { box-sizing: border-box; width: 100%; max-height: 88vh; overflow-y: auto; padding: 10px 12px 16px; border-radius: 14px 14px 0 0; background: var(--panel); border-top: 1px solid var(--line); }
section.bm .bm-close { float: right; }
@media (hover: none) { section.bm .bm-in, section.bm .bm-row { min-height: var(--tap); height: auto; } }
/* 🛡 THE INSURANCE BOARD (24 Nov): the Investigations board's frame. */
section.isb { display: flex; flex-direction: column; min-height: 420px; }
section.isb .isb-wrap { display: flex; flex: 1 1 auto; min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
section.isb .isb-side { flex: 0 0 230px; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--sunk); overflow-y: auto; }
section.isb .isb-k { padding: 2px 8px 8px; font-family: var(--mono, monospace); font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
section.isb .isb-item { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.8rem; text-align: left; cursor: pointer; }
section.isb .isb-item.is-sub { flex-wrap: wrap; gap: 0 8px; padding: 3px 8px 3px 30px; font-size: 0.76rem; color: var(--dim); }
section.isb .isb-item.is-sub .isb-w { flex-basis: 100%; }
section.isb .isb-item.is-sub .isb-n { font-family: inherit; font-size: 0.68rem; }
section.isb .isb-item[aria-pressed="true"] { background: var(--line-soft); color: var(--teal); }
section.isb .isb-i { width: 18px; text-align: center; }
section.isb .isb-w { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
section.isb .isb-n { font-style: normal; font-family: var(--mono, monospace); font-size: 0.7rem; color: var(--dim); white-space: nowrap; }
section.isb .isb-off { font-size: 0.66rem; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--dim); }
section.isb .isb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; container-type: inline-size; }
section.isb .isb-said { font-size: 0.74rem; color: var(--dim); }
section.isb .isb-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
section.isb .isb-body > .fv-tile { margin: 0; }
section.isb .isb-foot { border-top: 1px solid var(--line-soft); padding-top: 6px; font-size: 0.76rem; color: var(--dim); }
section.isb .isb-casehead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; }
section.isb .isb-state { padding: 1px 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.74rem; color: var(--ink-2); }
section.isb .isb-form, section.isb .isb-after, section.isb .isb-log, section.isb .isb-facts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
section.isb .isb-after, section.isb .isb-log { padding: 8px 10px; gap: 6px; }
section.isb .isb-after > .ivx-btn, section.isb .isb-after > .isb-ref { align-self: flex-start; }
section.isb .isb-log { flex-direction: row; flex-wrap: wrap; align-items: center; }
section.isb .isb-formhead { padding: 6px 10px; font-family: var(--mono, monospace); font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); background: var(--sunk); }
section.isb .isb-after .isb-formhead, section.isb .isb-log .isb-formhead { padding: 0; background: transparent; width: 100%; }
section.isb .isb-row, section.isb .isb-fact { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 60px; align-items: center; gap: 10px; padding: 5px 10px; border-top: 1px solid var(--line-soft); font-size: 0.8rem; }
section.isb .isb-fact { grid-template-columns: minmax(120px, 200px) 1fr; }
section.isb .isb-lab { color: var(--dim); }
section.isb .isb-val { color: var(--ink); overflow-wrap: anywhere; }
section.isb .isb-row.is-missing .isb-val { color: var(--amber); }
section.isb .isb-copy { height: 24px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--teal); font: inherit; font-size: 0.72rem; cursor: pointer; }
section.isb .isb-ref, section.isb .isb-words { max-width: 320px; height: 28px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.8rem; }
section.isb .isb-words { flex: 1 1 220px; }
section.isb .isb-ask { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
section.isb .isb-readback { width: 100%; font-size: 0.8rem; color: var(--ink); }
section.isb .isb-refused { font-size: 0.78rem; color: var(--amber); }
section.isb .isb-dim { font-size: 0.78rem; color: var(--dim); }
section.isb .isb-talk { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
section.isb .isb-msg { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line-soft); font-size: 0.8rem; }
section.isb .isb-msg:first-child { border-top: 0; }
section.isb .isb-when { font-size: 0.72rem; color: var(--dim); }
section.isb .isb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
section.isb .isb-tag { padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.7rem; color: var(--ink-2); }
section.isb .isb-tag.is-payer { border-color: var(--amber); color: var(--amber); }
section.isb .isb-tag.is-us { border-color: var(--teal); color: var(--teal); }
section.isb .isb-line { margin-top: 3px; color: var(--ink-2); overflow-wrap: anywhere; }
/* 🩺 THE NURSING BOARD (28 Nov): the Insurance board's frame -- a stay one line, the clinic by visit, the pictures. */
section.nsb { display: flex; flex-direction: column; min-height: 420px; }
section.nsb .nsb-wrap { display: flex; flex: 1 1 auto; min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
section.nsb .nsb-side { flex: 0 0 250px; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--sunk); overflow-y: auto; }
section.nsb .nsb-k { padding: 2px 8px 8px; font-family: var(--mono, monospace); font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
section.nsb .nsb-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; padding: 2px 8px 4px; }
section.nsb .nsb-ht { font-family: var(--mono, monospace); font-size: 0.66rem; letter-spacing: .12em; color: var(--dim); }
section.nsb .nsb-fold { height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: var(--teal); font: inherit; font-size: 0.68rem; cursor: pointer; }
section.nsb .nsb-fold:disabled { color: var(--dimmer); cursor: default; }
section.nsb .nsb-seg { display: inline-flex; height: 22px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
section.nsb .nsb-seg-b { height: 100%; padding: 0 8px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.68rem; cursor: pointer; }
section.nsb .nsb-seg-b[aria-pressed="true"] { background: var(--teal); color: var(--bg); font-weight: 600; }
section.nsb .nsb-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; width: 100%; box-sizing: border-box; min-height: 30px; padding: 3px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.8rem; text-align: left; cursor: pointer; }
section.nsb .nsb-item.is-sub { min-height: 26px; padding-left: 26px; font-size: 0.76rem; color: var(--dim); }
section.nsb .nsb-item[aria-pressed="true"], section.nsb .nsb-item.is-lit { background: var(--line-soft); color: var(--teal); }
section.nsb .nsb-w { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
section.nsb .nsb-n { font-style: normal; font-family: var(--mono, monospace); font-size: 0.7rem; color: var(--dim); }
section.nsb .nsb-jobs { flex-basis: 100%; font-size: 0.7rem; color: var(--dim); }
section.nsb .nsb-none { padding: 2px 8px 6px; font-size: 0.74rem; color: var(--dimmer); }
section.nsb .nsb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; container-type: inline-size; }
section.nsb .nsb-said { font-size: 0.74rem; color: var(--dim); }
section.nsb .nsb-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
section.nsb .nsb-foot { border-top: 1px solid var(--line-soft); padding-top: 6px; font-size: 0.76rem; color: var(--dim); }
section.nsb .nsb-ephead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 0.82rem; color: var(--ink-2); }
section.nsb .nsb-ept { color: var(--ink); }
section.nsb .nsb-eps { font-size: 0.76rem; color: var(--dim); }
section.nsb .nsb-sum { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.8rem; }
section.nsb .nsb-sumk { color: var(--teal); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; }
section.nsb .nsb-days { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
section.nsb .nsb-day { display: grid; grid-template-columns: 56px 92px minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; padding: 7px 10px; border-top: 1px solid var(--line-soft); font-size: 0.78rem; }
section.nsb .nsb-day:first-child { border-top: 0; }
section.nsb .nsb-dn { font-weight: 600; color: var(--ink); }
section.nsb .nsb-dd { color: var(--dim); }
section.nsb .nsb-dho, section.nsb .nsb-dc { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
section.nsb .nsb-dl { font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
section.nsb .nsb-dv { color: var(--ink-2); overflow-wrap: anywhere; }
section.nsb .nsb-dc.is-flag .nsb-dv { color: var(--amber); }
section.nsb .nsb-dgone { grid-column: 3 / -1; font-size: 0.72rem; color: var(--dimmer); }
@container (max-width: 760px) { section.nsb .nsb-day { grid-template-columns: 56px 1fr; } section.nsb .nsb-dho, section.nsb .nsb-dc, section.nsb .nsb-dgone { grid-column: 1 / -1; } }
section.nsb .nsb-pics { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr); gap: 12px; align-items: start; }
@container (max-width: 640px) { section.nsb .nsb-pics { grid-template-columns: 1fr; } }
section.nsb .nsb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
section.nsb .nsb-thumb { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.72rem; text-align: left; cursor: pointer; }
section.nsb .nsb-thumb[aria-pressed="true"] { border-color: var(--teal); }
section.nsb .nsb-thumb.is-gone { opacity: .55; text-decoration: line-through; }
section.nsb .nsb-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--sunk); }
section.nsb .nsb-tk { color: var(--teal); }
section.nsb .nsb-tc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
section.nsb .nsb-tw { color: var(--dim); }
section.nsb .nsb-pic { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
section.nsb .nsb-big { width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; background: var(--sunk); }
section.nsb .nsb-facts { display: flex; flex-direction: column; }
section.nsb .nsb-fact { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line-soft); font-size: 0.78rem; }
section.nsb .nsb-fk { color: var(--dim); }
section.nsb .nsb-fv { color: var(--ink); overflow-wrap: anywhere; }
section.nsb .nsb-full { align-self: flex-start; }
@media (hover: none) { section.nsb .nsb-item, section.nsb .nsb-thumb, section.nsb .nsb-fold, section.nsb .nsb-seg-b { min-height: var(--tap); } }
@container (max-width: 640px) { section.isb .isb-row { grid-template-columns: 1fr 60px; } section.isb .isb-row .isb-lab { grid-column: 1 / -1; } section.isb .isb-msg { grid-template-columns: 1fr; } }
@media (max-width: 760px) { section.isb .isb-wrap { flex-direction: column; } section.isb .isb-side { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--line); } }
@media (hover: none) { section.isb .isb-item, section.isb .isb-copy { min-height: var(--tap); } }
section.ivx .vb-bar { padding: 4px 10px 6px; }
section.ivx .vb-view.is-on { background: var(--teal); color: var(--bg); font-weight: 600; }
section.ivx .vb-view.is-on .vb-n { color: var(--bg); }
section.ivx .vb-help .help-btn { box-sizing: border-box; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 1px solid var(--teal); border-radius: 14px; background: transparent; color: var(--teal); cursor: pointer; }
section.ivx .vb-help .help-btn.is-on { background: var(--teal); color: var(--bg); }
/* 🔗 LINKED AND 🧩 CONDITION on the Visits board (26 Nov, vblinked.ts). */
section.ivx .vb-thread .vb-kind-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
section.ivx .vb-quiet { padding: 2px 10px 4px; font-size: .8125rem; color: var(--dim); }
.ct-wait { display: block; font-size: .6875rem; color: var(--amber-ink, var(--amber)); white-space: nowrap; }
.ct-waiting { color: var(--amber-ink, var(--amber)); }
.ct-open { display: block; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--teal); font: inherit; font-size: .8125rem; cursor: pointer; }
.vl, .vc { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; min-width: 0; }
.vl-thread { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 0; }
.vl-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.vl-name { font-size: 1rem; color: var(--ink); }
.vl-sub { font-size: .8125rem; color: var(--dim); }
.vl-tags { margin-left: auto; display: inline-flex; gap: 6px; }
.vl-st { display: inline-block; font: 600 .75rem var(--mono, ui-monospace, monospace); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.vl-st.is-seen { border: 1px solid var(--teal); color: var(--teal); }
.vl-st.is-wait { border: 1px solid var(--amber); color: var(--amber-ink, var(--amber)); }
.vl-st.is-ours { border: 1px solid var(--rule); color: var(--ink-2); }
.vl-st.is-maybe { border: 1px dashed var(--rule); color: var(--dim); }
.vl-ev { display: grid; grid-template-columns: 96px minmax(120px, 190px) minmax(0, 1fr) auto; gap: 12px; padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft); align-items: start; font-size: .875rem; }
.vl-ev:last-child { border-bottom: 0; }
.vl-ev.is-maybe { opacity: .7; }
.vl-d { font: .8125rem var(--mono, ui-monospace, monospace); color: var(--ink-2); }
.vl-who b { display: block; color: var(--ink); }
.vl-who span { font-size: .8125rem; color: var(--dim); }
.vl-syn { color: var(--ink-2); line-height: 1.45; min-width: 0; }
.vl-quiet { color: var(--dim); }
.vl-open { display: block; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--teal); font: inherit; font-size: .8125rem; cursor: pointer; text-align: left; }
.vl-new { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.vl-new-s { cursor: pointer; color: var(--teal); }
.vl-new-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vl-new-in { flex: 1 1 220px; }
.vc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@container (max-width: 760px) { .vc-grid { grid-template-columns: minmax(0, 1fr); } .vl-ev { grid-template-columns: 80px minmax(0, 1fr); } }
.vc-upd { margin-left: auto; }
.vc-lines { padding: 6px 14px 10px; }
.vc-line { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: .875rem; }
.vc-k { color: var(--dim); }
.vc-v { color: var(--ink); }
.vc-whole { grid-column: 1 / -1; }
.vc-earlier { padding: 4px 14px 10px; font-size: .8125rem; color: var(--dim); }
.vc-filed > .vl-open { padding: 0 14px 10px; }
.vc-tick { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft); align-items: center; font-size: .875rem; }
.vc-disc { color: var(--ink); }
.vc-note { padding: 8px 14px 12px; font-size: .8125rem; }
.vc-start { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
section.ivx .vb-kind { min-height: 26px; padding: 2px 8px; border-radius: 6px; color: var(--ink-2); font-size: 0.8125rem; font-weight: 400; }
section.ivx .vb-kind.is-on { background: var(--selected-bg); color: var(--teal); }
section.ivx .vb-kind.is-zero { color: var(--dimmer); }
section.ivx .vb-kind.is-sub { padding-left: 28px; font-size: 0.78rem; }
section.ivx .vb-k { font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--dim); font-weight: 400; padding: 2px 8px 4px; }
section.ivx .vb-fold { margin: auto 0 2px 8px; min-height: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 0.6875rem; }
section.ivx .vb-empty { padding: 14px 12px; }
/* 🔪 THE PROCEDURES BOARD (24 Nov 2026): the operations table in the
   Investigations board's frame -- the door's categories down the left, the
   table as dense as the radiology one. */
.opb .opb-wrap { display: flex; align-items: stretch; min-width: 0; min-height: 18rem; }
.opb .opb-side { flex: 0 0 auto; width: 190px; display: flex; flex-direction: column; gap: 1px; padding-right: 4px; border-right: 1px solid var(--line-soft); }
.opb .opb-side[hidden], .opb .opb-tab[hidden] { display: none; }
.opb .opb-k { padding: 2px 8px 6px; color: var(--dim); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.opb .opb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 8px; container-type: inline-size; }
.opb .opb-head { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; }
.opb .opb-cat { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.8125rem; text-align: left; cursor: pointer; }
.opb .opb-cat:hover { background: var(--panel-hover); }
.opb .opb-cat[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.opb .opb-cat.is-zero { color: var(--dimmer); }
.opb .opb-cat.is-sub { padding-left: 34px; font-size: 0.78rem; }
.opb .opb-cat-i { flex: 0 0 18px; text-align: center; }
.opb .opb-cat-w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opb .opb-n { font-family: var(--mono); font-style: normal; font-size: 0.6875rem; color: var(--dimmer); }
.opb .opb-fold { margin: auto 0 2px 8px; align-self: flex-start; min-height: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--dim); font-size: 0.6875rem; cursor: pointer; }
.opb .opb-tab { flex: 0 0 auto; width: 22px; padding: 6px 0; border: 0; border-right: 1px solid var(--line-soft); background: var(--sunk); color: var(--dim); font-size: 0.6875rem; writing-mode: vertical-rl; cursor: pointer; }
.opb .opb-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 6px 2px 2px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 0.75rem; }
.opb .op-body { flex: 1 1 auto; overflow-x: auto; }
.opb .op-t .fv-st-c { padding: 5px 8px; font-size: 0.8rem; vertical-align: top; }
.opb .op-t .fv-st-hb { font-size: 0.6875rem; padding: 4px 8px; }
.opb .op-t .fs-name { font-weight: 500; }
.opb .op-t .op-date, .opb .op-t .pill { font-size: 0.75rem; white-space: nowrap; }
.opb .op-t .pill { padding: 0 6px; }
.opb .op-t .op-pick { width: 14px; height: 14px; min-height: 0; }
.opb .op-t .op-items { font-size: 0.75rem; }
.opb .op-t .op-date { flex-wrap: nowrap; }
.opb .op-t .fs-fold, .opb .op-t .fs-link, .opb .op-t .op-ctl { min-height: 0; font-size: inherit; }
.opb .op-t .op-opc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.opb .op-t .op-opc .op-items { flex: 1 0 100%; }
.opb .op-t .op-recs { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.opb .op-t .op-copy { height: 22px; min-height: 0; width: 24px; padding: 0; }
section.opb .ivx-bar .ivx-sel { flex: 0 1 auto; min-width: 104px; max-width: 170px; }
section.opb .ivx-bar .ivx-search { min-width: 96px; }
section.opb .ivx-seg .ivx-seg-b { padding: 0 8px; }
@container (max-width: 1120px) { section.opb .ivx-bar { flex-wrap: wrap; } }
@media (max-width: 899px) { .opb .opb-wrap { flex-direction: column; } .opb .opb-side { width: auto; border-right: 0; padding: 0 0 6px; } .opb .opb-tab { writing-mode: horizontal-tb; width: auto; } }
@media (hover: none) { .opb .opb-cat { min-height: var(--tap); } .opb .op-t .op-pick { width: 20px; height: 20px; } }

/* 🤖 THE AI FILES BOARD (24 Nov 2026): the folder's transcripts and
   inferences in the Investigations board's frame, grouped by encounter. */
.aib .aib-wrap { display: flex; align-items: stretch; min-width: 0; }
.aib .aib-side { flex: 0 0 auto; width: 220px; display: flex; flex-direction: column; gap: 1px; padding-right: 4px; border-right: 1px solid var(--line-soft); }
.aib .aib-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 8px; container-type: inline-size; }
.aib .aib-k { padding: 2px 8px 4px; color: var(--dim); font-size: 0.6875rem; letter-spacing: 0.06em; }
.aib .aib-k2 { margin-top: 8px; }
.aib .aib-item { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.8125rem; text-align: left; cursor: pointer; }
.aib .aib-item:hover { background: var(--panel-hover); }
.aib .aib-item[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.aib .aib-item.is-zero { color: var(--dimmer); }
.aib .aib-type { padding-left: 20px; font-size: 0.78rem; }
.aib .aib-w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aib .aib-n { font-family: var(--mono); font-style: normal; font-size: 0.6875rem; color: var(--dimmer); }
.aib .ai-record-table th, .aib .ai-record-table td { border-width: 0 0 1px; border-color: var(--line-soft); }
.aib .aib-group td { padding: 8px 7px 5px; background: var(--sunk); border-bottom-color: var(--line); }
.aib .aib-group td > * { margin-right: 10px; }
.aib .aib-g-when { color: var(--ink); font-weight: 600; }
.aib .aib-g-type { color: var(--teal); }
.aib .aib-g-ref { font-family: var(--mono); color: var(--dim); font-size: 0.75rem; }
.aib .aib-g-n { font-style: normal; color: var(--dimmer); font-size: 0.75rem; }
.aib .ai-record-button { min-height: 24px; border-radius: 12px; }
.aib .aib-wrap { min-height: 18rem; }
.aib .ai-record-table { font-size: 0.8rem; }
.aib .ai-record-table th { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; }
.aib .aib-foot { margin-top: auto; padding: 6px 2px 2px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 0.75rem; }
.aib .ai-file-viewer { margin-top: 8px; }
@media (max-width: 899px) { .aib .aib-wrap { flex-direction: column; } .aib .aib-side { width: auto; border-right: 0; padding: 0 0 6px; } }
@media (hover: none) { .aib .aib-item { min-height: var(--tap); } }

.opb .op-move-w { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.opb .op-hand { cursor: help; font-size: 0.8rem; }
.opb .op-move { font-size: 0.74rem; opacity: 0.75; }
.opb .op-move:hover, .opb .op-move:focus-visible { opacity: 1; }
.opb .op-move-sel { height: 24px; font-size: 0.76rem; max-width: 220px; background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; padding: 0 8px; }
/* CONTRAST AS THE CAREBEE TAB HAS IT (Dr Lau, 26 Nov: "pls improve the
   contrast - make it consistent with the rest of the screen - this has
   better contrast", of the CareBee tab beside the Procedures board). The
   boards built on .ivx -- Procedures, Investigations, and the boards beside
   them -- drew their list in the second ink at 13px, every zero and count in
   the faintest ink, all on the panel's own colour. Now: the board sits on
   the page's ground; the list of kinds is a card of its own; its words are
   the full ink at 15px, its headings the second ink, its counts and its
   empty kinds the dim ink (still readable), the chosen kind teal as before. */
section.fv-tile.ivx { background: var(--bg); }
section.ivx .opb-side, section.ivx .ivb-kinds, section.ivx .vb-side {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; }
section.ivx .opb-wrap, section.ivx .ivb-wrap { gap: 10px; }
section.ivx .opb-main { padding-left: 0; }
section.ivx .opb-cat, section.ivx .iv-type.ivb-kind, section.ivx .ivb-view, section.ivx .vb-kind {
  min-height: 32px; color: var(--ink); font-size: .9375rem; }
section.ivx .opb-cat.is-sub, section.ivx .vb-kind.is-sub, section.ivx .ivb-sub { font-size: .875rem; color: var(--ink); }
section.ivx .opb-cat.is-zero, section.ivx .ivb-kind.is-empty, section.ivx .vb-kind.is-zero, section.ivx .ivb-sub.is-empty { color: var(--dim); }
section.ivx .opb-n, section.ivx .ivb-kind-n, section.ivx .vb-n { color: var(--dim); font-size: .8125rem; }
section.ivx .opb-cat[aria-pressed="true"], section.ivx .ivb-kind[aria-pressed="true"], section.ivx .vb-kind.is-on { color: var(--teal); }
section.ivx .opb-k, section.ivx .ivb-kinds-t, section.ivx .vb-k { color: var(--ink-2); font-size: .75rem; }
section.ivx .ivx-seg .ivx-seg-b { color: var(--ink); }
section.ivx .ivx-seg .ivx-seg-b.is-empty, section.ivx .ivx-seg .ivx-seg-b.is-zero { color: var(--dim); }
section.ivx .fv-none, section.ivx .opb-foot, section.ivx .vb-empty { color: var(--ink); }
/* THE SIDE BARS, 26 Nov (Dr Lau's mock-ups A, B and C, "build it - C, and ☰
   opens B"; "make it consistent with left bar too"). Both bars, the same:
   no arrow; a menu button leads the bar (Orders on the right); ☰ at the
   foot opens the bar over the page edge with each symbol's description. */
.dk-side-rail > .dk-side-expand-hidden { display: none !important; }
.dk-rail-desc { display: none; }
.dk-rail-foot { margin-top: auto; display: flex; }
.dk-rail-foot > .dk-side-more { width: 100%; min-height: 32px; font-size: 15px; padding: 2px 4px; }
.dk-side-rail > .dk-side-rail-tab.dk-rail-menu-b { flex: 0 0 auto; min-block-size: 0; writing-mode: horizontal-tb; transform: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  border-color: var(--teal); color: var(--ink); font-size: 9px; letter-spacing: 0; text-transform: none; font-family: inherit; }
.dk-side-rail > .dk-side-rail-tab.dk-rail-menu-b > .dk-rail-word { display: block !important; font-size: 9px; font-weight: 600; }
.dk-side-rail > .dk-side-rail-tab.dk-rail-menu-b[aria-expanded="true"] { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.dk-side-rail.has-menu, .dk-side-rail.is-labelled { overflow: visible; position: relative; z-index: 30; }
.dk-rail-menu { position: absolute; top: 6px; width: 244px; box-sizing: border-box; padding: 8px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,0.45); z-index: 31; }
.dk-rail-menu-right { right: calc(100% + 6px); }
.dk-rail-menu-left { left: calc(100% + 6px); }
.dk-side-rail.is-labelled { width: 236px; box-shadow: 0 0 18px rgba(0,0,0,0.4); }
.dk-right-rail.is-labelled { justify-self: end; }
.dk-left-rail.is-labelled { justify-self: start; }
.dk-side-rail.is-labelled > .dk-side-rail-tab { flex: 0 0 auto; min-block-size: 0; writing-mode: horizontal-tb; transform: none;
  display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; align-items: center; text-align: left;
  padding: 5px 8px; font-family: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; }
.dk-side-rail.is-labelled > .dk-side-rail-tab > .dk-rail-word { display: block !important; grid-column: 2; font-size: 13px; font-weight: 600; color: var(--ink); }
.dk-side-rail.is-labelled > .dk-side-rail-tab > .dk-rail-desc { display: block; grid-column: 2; font-size: 11px; font-weight: 400; color: var(--dim); }
.dk-side-rail.is-labelled > .dk-side-rail-tab.dk-rail-menu-b { flex-direction: row; }

/* ── 📄 medical reports (30 Nov): the folder's button, its board over the
   page and the writing board's Report face (app/medreports.ts). mrp- classes,
   measured unused before they were chosen; tokens only; sizes in rem. ── */
.mrp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--teal); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.82rem; white-space: nowrap; cursor: pointer; }
.mrp-n { font-size: 0.72rem; font-weight: 700; color: var(--bg); background: var(--amber); border-radius: 999px; padding: 0 7px; }
.mrp-n[hidden] { display: none; }
.mrp-shade { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 2vw; }
.mrp-sheet { width: min(1280px, 100%); max-height: 92vh; overflow: auto; display: flex; flex-wrap: wrap; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.mrp-left { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.mrp-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding-bottom: 8px; }
.mrp-lh, .mrp-ht { font-family: var(--mono, ui-monospace, monospace); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--teal); }
.mrp-lh { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mrp-lsub { padding: 10px 14px 4px; font-family: var(--mono, ui-monospace, monospace); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--dim); }
.mrp-lrow { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; }
.mrp-lrow.is-on { background: var(--sunk); box-shadow: inset 3px 0 0 var(--teal); }
.mrp-lt { flex: 1 1 auto; }
.mrp-ln { color: var(--dim); }
.mrp-ln.is-due { color: var(--amber); font-weight: 700; }
.mrp-grow { flex: 1 1 auto; }
.mrp-add { margin: 12px 14px; }
.mrp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mrp-hn { font-size: 0.82rem; }
.mrp-x { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.mrp-main > .ivx-help-note { margin: 0 14px; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--teal); border-radius: 10px; color: var(--ink-2); font-size: 0.8rem; line-height: 1.45; }
.mrp-main > .ivx-help-note[hidden], .mrp-face > .ivx-help-note[hidden] { display: none; }
.mrp-table { display: flex; flex-direction: column; overflow-x: auto; }
.mrp-tr { display: grid; grid-template-columns: 90px 150px 150px minmax(160px, 1fr) 60px 100px minmax(220px, auto); gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 0.84rem; align-items: center; }
.mrp-th { font-family: var(--mono, ui-monospace, monospace); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--dim); }
.mrp-tr.is-gone .mrp-td { text-decoration: line-through; color: var(--dim); }
.mrp-td { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.mrp-sub { color: var(--dim); font-size: 0.78rem; }
.mrp-td.is-yes { color: var(--teal); }
.mrp-td.is-no { color: var(--amber); }
.mrp-acts { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.mrp-line { padding: 0 14px; font-size: 0.82rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrp-line:empty { display: none; }
.mrp-reason, .mrp-in { min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.84rem; }
.mrp-reason { flex: 1 1 260px; }
.mrp-sel { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.84rem; }
.mrp-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 14px; padding: 10px; border: 1px solid var(--teal); border-radius: 10px; }
.mrp-new .mrp-ht { flex: 1 1 100%; }
.mrp-new .mrp-in { flex: 1 1 200px; }
.mrp-empty, .mrp-wait, .mrp-no { padding: 14px; color: var(--dim); font-size: 0.85rem; }
.mrp-no { color: var(--amber); }
.mrp-face { display: flex; flex-direction: column; gap: 10px; }
.mrp-fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mrp-fbar .mrp-sel { max-width: 100%; }
.mrp-fbody { display: flex; flex-direction: column; gap: 10px; }
.mrp-secs { display: flex; flex-direction: column; gap: 10px; }
.mrp-sec { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.mrp-sh { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--mono, ui-monospace, monospace); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--teal); }
.mrp-tag { font-family: inherit; font-size: 0.66rem; letter-spacing: 0.06em; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.mrp-tag.is-yours { color: var(--amber); border-color: var(--amber); }
.mrp-ta { width: 100%; box-sizing: border-box; min-height: 3.5rem; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 0.88rem; line-height: 1.5; resize: vertical; }
.mrp-imp { display: flex; flex-direction: column; gap: 6px; }
.mrp-improws { display: flex; flex-direction: column; gap: 6px; }
.mrp-improw { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) 80px; gap: 6px; }
.mrp-pct { width: 80px; }
.mrp-wl { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ink-2); }
.mrp-barthel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrp-bitem { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 0.82rem; }
.mrp-btotal { flex: 1 1 100%; font-size: 0.86rem; font-weight: 600; }
.mrp-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrp-miss { font-size: 0.8rem; color: var(--amber); }

/* 📄 Medical reports, the five follow-ups (30 Nov, "build 1-5"). */
.mrp-ai { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.375rem 0; }
.mrp-ai-said, .mrp-sent { font-size: 0.8125rem; color: var(--dim); }
.mrp-tag.is-ai { color: var(--amber, #f0b44c); border-color: currentColor; }
.mrp-ask { font-size: 0.875rem; margin-right: 0.375rem; }
.mrp-pl { display: flex; flex-direction: column; gap: 0.375rem; }
.mrp-pl-k { font-size: 0.8125rem; color: var(--dim); }
.mrp-pl-row { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; }
.mrp-pl-save { align-self: flex-start; }
/* 🔬 THE INVESTIGATIONS BOARD (21 Nov, board Iv2): the kinds as a left
   column (width, order and fold kept per browser), one slim row of 24px
   controls, the table with a sparkline per numeric test. */
.ivb .ivb-wrap { display: flex; align-items: stretch; min-width: 0; gap: 0; }
.ivb .ivb-kinds { flex: 0 0 auto; width: 170px; min-width: 120px; max-width: 320px; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; border-right: 1px solid var(--line-soft); }
.ivb .ivb-kinds-h { display: flex; align-items: center; gap: 6px; padding: 2px 0 4px; }
.ivb .ivb-kinds-t { flex: 1; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.ivb .ivb-fold { min-height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--dim); font-size: 0.6875rem; cursor: pointer; }
.ivb .ivb-kind-list { display: flex; flex-direction: column; gap: 1px; }
.ivb .iv-type.ivb-kind { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.8125rem; text-align: left; cursor: grab; }
.ivb .ivb-kind:hover { background: var(--panel-hover); }
.ivb .ivb-kind[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.ivb .ivb-kind.is-empty { color: var(--dimmer); }
.ivb .ivb-kind-w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ivb .ivb-kind-n { font-family: var(--mono); font-style: normal; font-size: 0.6875rem; color: var(--dimmer); }
.ivb .ivb-rail { flex: 0 0 auto; width: 22px; padding: 6px 0; border: 0; border-right: 1px solid var(--line-soft); background: var(--sunk); color: var(--dim); font-size: 0.6875rem; writing-mode: vertical-rl; cursor: pointer; }
.ivb .ivb-rail:hover { color: var(--teal); }
.ivb .ivb-grip { flex: 0 0 6px; cursor: col-resize; touch-action: none; }
.ivb .ivb-grip:hover, .ivb .ivb-grip:focus { background: var(--line-soft); outline: none; }
.ivb .ivb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 6px; }
.ivb .ivb-bar { flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; border-bottom: 1px solid var(--line-soft); }
.ivb .ivb-t { margin-right: 4px; }
.ivb .iv-search.ivb-search { flex: 0 1 220px; min-width: 120px; min-height: 24px; height: 24px; padding: 0 8px; font-size: 0.75rem; }
.ivb .ivb-states { height: 24px; }
.ivb .ivb-states .op-seg-b { font-size: 0.75rem; background: transparent; color: var(--ink-2); border-right: 1px solid var(--line); cursor: pointer; }
.ivb .ivb-states .op-seg-b.is-empty { color: var(--dimmer); }
.ivb .ivb-sel, .ivb .iv-range, .ivb .iv-centre { min-height: 24px; height: 24px; padding: 0 6px; font-size: 0.75rem; }
.ivb .ivb-ctl { min-height: 24px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.75rem; cursor: pointer; }
.ivb .ivb-ctl:disabled { color: var(--dimmer); cursor: default; }
.ivb .ivb-info-note { font-size: 0.75rem; color: var(--dim); }
.ivb .ivb-count { font-size: 0.6875rem; margin: 0; }
.ivb .ivb-line { font-size: 0.75rem; color: var(--dim); }
.ivb .ivb-verify-h .ivb-verify { min-height: 24px; height: 24px; padding: 0 8px; font-size: 0.75rem; white-space: nowrap; }
.ivb .ivb-state-c { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ivb .ivb-acts { display: inline-flex; gap: 2px; }
.ivb .ivb-ic { min-height: 24px; min-width: 24px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--dim); font-size: 0.8125rem; cursor: pointer; }
.ivb .ivb-ic:hover { background: var(--panel-hover); color: var(--teal); }
.ivb .ivb-trend { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); }
.ivb .ivb-spark { display: block; overflow: visible; }
.ivb .ivb-band { fill: var(--teal); fill-opacity: 0.14; stroke: none; }
.ivb .ivb-dot { fill: currentColor; stroke: none; }
.ivb .ivb-dot.ivb-unsure { fill: var(--bg); stroke: var(--amber); stroke-width: 1; }
.ivb .ivb-dot.is-out { fill: var(--red-solid); stroke: var(--red); }
.ivb .ivb-one { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-2); }
.ivb .ivb-unsure-w { font-size: 0.625rem; color: var(--amber); }
.ivb .ivb-trend-none, .ivb .ivb-trend-q { color: var(--dimmer); font-family: var(--mono); font-size: 0.75rem; }
@media (max-width: 899px) { .ivb .ivb-wrap { flex-direction: column; } .ivb .ivb-grip, .ivb .ivb-rail { display: none; } .ivb .ivb-kinds { width: auto !important; border-right: 0; } }
/* ONE BOARD (24 Nov, "it looks untidy with 3 panels - search buttons are
   different design"): the radiology studies and the cabinet's images are
   views of the investigations board, and every view's row of controls is
   the same slim rounded set (ivx-). */
.ivb .ivb-own, .ivb .ivb-alt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ivb .ivb-own[hidden], .ivb .ivb-alt[hidden], .ivb .ivb-files[hidden], .ivb .ivx-help-note[hidden] { display: none; }

.ivb .ivb-kinds .ivb-fold { align-self: flex-start; margin: auto 0 2px 8px; }
.ivb .ivb-kinds { min-height: 220px; }
.ivb .ivb-sub { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 24px; padding: 2px 8px 2px 28px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.78rem; text-align: left; cursor: pointer; }
.ivb .ivb-sub:hover { background: var(--panel-hover); }
.ivb .ivb-sub[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.ivb .ivb-sub.is-empty { color: var(--dimmer); }
.ivb .ivb-files { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.ivb .ivb-files-t { padding: 2px 8px 4px; }
/* 26 Nov: the Function tests heading, ruled off like Files; Vascular indented under Radiology. */
.ivb .ivb-group-t { flex: 0 0 auto; margin-top: 6px; padding: 8px 8px 4px; border-top: 1px solid var(--line-soft); }
.ivb .iv-type.ivb-kind.ivb-kind-nested { padding-left: 24px; }
.ivb .ivb-view { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.8125rem; text-align: left; cursor: pointer; }
.ivb .ivb-view:hover { background: var(--panel-hover); }
.ivb .ivb-view[aria-pressed="true"] { background: var(--selected-bg); color: var(--teal); }
.ivb .ivb-alt .rdb.is-embedded { display: block; border: 0; }
.ivb .ivb-alt .rdb-main { padding: 0; }
.ivb .ivb-alt .rdb-body, .ivb .fv-img-body { padding: 4px 0 8px; }
.ivb .ivb-overtime { margin-top: 8px; }
.ivb .ivb-alt-trajectory .lr-board { padding: 4px 2px 8px; max-width: none; margin: 0; }


/* ── chatenc.js's own (LE-48, Parcel C) — appended from its fragment ───────── */
/* ── page 2 of the chat: the encounter, conducted in one ──────────────────
   A FRAGMENT. The integrator appends this to app/app.css; it is not loaded
   on its own and declares no tokens of its own -- every colour, radius and
   tap size below is app.css's, so the chat cannot drift from the pass
   screen it sits one tap away from.

   IT STYLES ONLY WHAT chatenc.js DRAWS (prefix `ce-`). The stream, the
   bubbles, the composer and the sheet are chat.js's (`ch-`), and the body
   card is the pass's own `.field` -- restyled here only where a card built
   for a 320px column has to sit inside a chat bubble's width. */

/* the session step: the six, the place's own first ------------------------ */
.ce-types { display: flex; flex-direction: column; gap: 8px; }

.ce-type {
  width: 100%; min-height: var(--tap);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--sunk);
  font-family: var(--display); font-size: 14px; color: var(--ink);
  text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ce-type:active { transform: translateY(1px); }
/* what this place puts first -- lit, and never the only thing offered */
.ce-type.is-first { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5);
                    color: var(--teal); font-weight: 600; }
/* the change beside a session opened automatically */
.ce-type.is-alt { flex: 1 1 0; min-width: 0; }
/* REACHABLE, NOT REMOVED. Dimmed is a rank, not a fence: still a 44px
   button, still one tap, because the bot's own rule is "offered, not
   enforced". */
.ce-type.is-dim { opacity: 0.55; font-size: 13px; }
.ce-type[disabled] { opacity: 0.4; cursor: default; }

.ce-row { display: flex; gap: 8px; }

.ce-head { display: flex; align-items: center; gap: 8px; }
.ce-tick { color: var(--teal); font-size: 15px; line-height: 1; }
.ce-head-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.ce-sub { font-size: 12.5px; color: var(--dim); }
.ce-tag { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em;
          color: var(--label); }

.ce-also {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 2px; padding-top: 9px; border-top: 1px solid var(--line-soft);
}
.ce-also-h { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
             color: var(--dimmer); }

/* the body, moved in from the pass ---------------------------------------- */
.ce-body { display: flex; flex-direction: column; gap: 8px; }
/* the card is the chat's ground now, so it drops its own panel rather than
   painting a second one inside it */
.ce-body > .field { background: transparent; border: 0; padding: 0; margin: 0; }
/* a chat card is narrower than the pass column: the body is sized to it so
   the dial and the confirm stay on one screen without scrolling */
.ce-body .map-svg { width: min(78%, 168px); }
/* what the fields column shows while the body is away */
.ce-body-gone {
  padding: 10px 12px; margin-bottom: 9px; border-radius: var(--r);
  border: 1px dashed var(--hush); background: transparent;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--dimmer);
}

/* a recording's card: the button, then the words --------------------------- */
.ce-take { display: flex; flex-direction: column; gap: 7px; }
.ce-words { font-family: var(--serif); font-size: 13.5px; line-height: 1.45;
            color: var(--ink-2); }
/* WITHDRAWN, WHICH IS NOT DELETED -- readable rather than ghosted, because
   he may need to read what he took out */
.ce-out { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
          line-height: 1.5; color: var(--dim); }

.ce-btn {
  min-height: 38px; align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--sunk);
  font-family: var(--display); font-size: 13px; color: var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ce-btn:active { transform: translateY(1px); }
.ce-btn.is-go { background: rgba(79,214,200,0.16); border-color: rgba(79,214,200,0.5);
                color: var(--teal); font-weight: 600; }
.ce-btn[disabled] { opacity: 0.5; cursor: default; }

/* the note is ready ------------------------------------------------------- */
.ce-review { display: flex; flex-direction: column; gap: 8px; }
.ce-review-t { font-size: 14px; color: var(--amber-ink); }
.ce-review-n { font-size: 11px; color: var(--amber); letter-spacing: 0.04em; }

/* THE SOAP HEADINGS (25 Nov, ticket 1): each section a heading under its name,
   the section's letter beside it; a click offers the names. */
.wb-editor .wb-h-soap[data-soap] { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; user-select: none; border-radius: 6px; padding: 0 6px 0 0; font-size: 1rem; }
.wb-editor .wb-h-soap[data-soap]::before { content: attr(data-soap); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--teal); color: var(--panel); font-size: .8125rem; }
.wb-editor .wb-h-soap[data-soap]::after { content: "▾"; color: var(--dim); font-size: .75rem; font-weight: 400; }
.wb-editor .wb-h-soap[data-soap]:hover, .wb-editor .wb-h-soap[data-soap]:focus-visible { background: var(--selected-bg); outline: none; }
.wb-head-menu { position: absolute; z-index: 6; display: flex; flex-direction: column; gap: 2px; width: 240px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.wb-head-menu[hidden] { display: none; }
.wb-head-menu-t { color: var(--dim); font-size: .75rem; padding: 2px 6px; }
.wb-head-opt { text-align: left; min-height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.wb-head-opt:hover, .wb-head-opt.is-on { background: var(--selected-bg); }
.wb-head-opt.is-on { font-weight: 700; }
.wb-head-own { min-height: 32px; margin-top: 4px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--ink); }

/* THE FOLDER'S SUMMARY ROW (25 Nov): leads a tab's table; ⧉ Copy, ⤵ To writing board where there is one. */
.fv-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--selected-bg); color: var(--ink); }
.fv-sum-t { flex: 1 1 260px; min-width: 0; }
.fv-sum-acts { display: inline-flex; gap: 6px; }
.fv-sum-said { flex-basis: 100%; color: var(--dim); font-size: .75rem; }
.fv-sum-said:empty { display: none; }
/* 🏋 EXERCISES (25 Nov) */
.ex-tab { display: flex; flex-direction: column; gap: 14px; }
.ex-tab-h { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.ex-tab-t { font-weight: 700; color: var(--ink); }
.ex-tab-sub { color: var(--dim); font-size: .75rem; }
/* The writing board's symbol menu: Move to the left rail / right rail /
   bottom bar (24 Nov). Fixed at the pointer, above the board. */
.wb-symmenu { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 2px; padding: 4px; min-width: 200px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.wb-symmenu-i { text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px;
  padding: 0 10px; min-height: var(--tap); border-radius: 8px; cursor: pointer; }
.wb-symmenu-i:hover:not(:disabled), .wb-symmenu-i:focus-visible { background: var(--sunk); color: var(--teal); }
.wb-symmenu-i:disabled { color: var(--faint); cursor: default; }
@media (min-width: 1100px) and (hover: hover) { .wb-symmenu-i { min-height: 30px; } }

/* 📱 A phone scans for the desk (console_phonescan, 26 Nov). */
.fd-cbx-phone { display: block; margin: 6px auto; min-height: 32px; padding: 4px 14px; border: 1px solid var(--teal); border-radius: var(--r); background: none; color: var(--ink); cursor: pointer; }
.fd-cbx-phonepane { text-align: center; }
.fd-cbx-phoneqr { display: block; width: 168px; height: 168px; margin: 6px auto; background: #fff; border-radius: 6px; image-rendering: pixelated; }

/* 26 Nov, Dr Lau on the pre-clerk card: "use slim bullets". Where a pointer
   hovers, the card's controls are slim; a touch screen keeps its target. */
@media (hover: hover) and (pointer: fine) {
  .pc-right .btn, .pc-right .li-in, .pc-right select { min-height: 28px; padding: 3px 10px; font-size: 13px; }
  .pc-right .li-in { padding: 3px 8px; }
  .pc-right .li-form { gap: 4px; margin-top: 6px; }
}
.li-card { margin-top: 8px; }

/* 26 Nov, Dr Lau on the Orders corner: "slim bullets". Where a pointer
   hovers, each order is one slim row; a touch screen keeps its target. */
@media (hover: hover) and (pointer: fine) {
  .or-launch { gap: 4px; }
  .or-tile { min-height: 30px; padding: 3px 10px; border-radius: 8px; gap: 8px; }
  .or-tile-i { font-size: 15px; }
}
/* Not a control: drawn in the list, said not to order yet. */
.or-soon { display: flex; gap: 8px; align-items: baseline; padding: 3px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--dim); }
.or-soon-l { font-weight: 600; font-size: 13px; }
.or-soon-s { font-size: 11px; font-style: italic; }

/* 26 Nov, Dr Lau on the emergency contacts card: "pls use all slim button
   design". Where a pointer hovers, its buttons and boxes are slim; a touch
   screen keeps its target. */
@media (hover: hover) and (pointer: fine) {
  .drp .ec-tog, .drp .ec-save, .drp .ec-verify, .drp .ec-lookup { min-height: 30px; padding: 3px 12px; font-size: 13px; border-radius: 8px; }
  .drp .ec-in { height: 32px; padding: 0 10px; }
  .ec-badge { height: 22px; padding: 0 8px; }
  .drp .ec-card { gap: 8px; padding: 12px 14px; }
}

/* ✉ THE EMAIL PAGE's own (batch 3, ticket 1): a portal's login row. */
.dkp-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.dkp-login { border-top: 1px solid var(--line); padding: 8px 0; min-width: 0; }
.dkp-login:first-of-type { border-top: 0; }
.dkp-login-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.dkp-login-url { color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.dkp-login-in { flex-wrap: wrap; }
.dkp-login-in .su-in { flex: 1 1 160px; }

/* 🛡 AUDIT & SYSTEM (batch 5, T24; app/auditsys.ts): CareBee's count tiles and
   the workstation's screens drawn to their shape. No px font size, so the
   generated desktop type scale is untouched. */
.ays-tiles { gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.ays-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 150px; }
.ays-tile-n { font-weight: 600; line-height: 1.3; }
.ays-mons { gap: 18px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0; }
.ays-mon { width: 200px; height: 118px; border: 2px solid var(--teal); border-radius: 6px; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 4px; }
.ays-mon.is-portrait { width: 90px; height: 150px; }
.ays-detail td { color: var(--dim); }
.ays-p { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* 🏖 THE LEAVE CALENDAR AND WHO IS TOLD (batch 3, ticket 7; app/leavecal.ts).
   No px font size, so the generated desktop type scale is untouched. */
.lvc-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.lvc-title { font-weight: 600; }
.lvc-step { min-width: 32px; border-radius: 999px; }
.lvc-legend { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lvc-key { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .85em; color: var(--dim); }
.lvc-key.is-leave { border-color: var(--teal); }
.lvc-key.is-pick { border-color: var(--amber-ink); }
.lvc-key.is-hol { color: var(--red, #e06c6c); }
.lvc-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.lvc-mname { font-weight: 600; margin: 4px 0; }
.lvc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.lvc-dow { font-size: .75em; letter-spacing: .08em; color: var(--dim); text-align: center; }
.lvc-day { position: relative; min-height: 40px; text-align: left; vertical-align: top; padding: 3px 5px;
  border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); min-width: 0; }
.lvc-day:disabled { opacity: .4; }
.lvc-day.is-leave { background: color-mix(in srgb, var(--teal) 30%, transparent); border-color: var(--teal); }
.lvc-day.is-pick { background: color-mix(in srgb, var(--amber-ink) 30%, transparent); border: 1px dashed var(--amber-ink); }
.lvc-ph { display: block; font-size: .7em; color: var(--red, #e06c6c); }
.lvc-call { display: block; font-size: .7em; }
.lvc-pickbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px;
  border: 1px dashed var(--amber-ink); border-radius: 8px; }
.lvc-range { font-weight: 600; }
.lvc-hint { color: var(--dim); font-size: .9em; }
.lvc-what { flex: 1 1 160px; }
.lvc-clash { margin-top: 6px; }
.lvc-sent { color: var(--teal); }
.lvc-unsent { color: var(--amber-ink); }
.lvc-roster { margin-top: 12px; }
.lvc-tell { margin-bottom: 6px; }
.lvc-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lvc-add .su-in { flex: 1 1 160px; }
.lvc-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lvc-mail { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.lvc-mail-h { color: var(--dim); font-size: .9em; margin-bottom: 8px; }
.lvc-sendrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ✍ MY SIGNATURE (batch 3, ticket 8; app/signature.ts). No px font size, so
   the generated desktop type scale is untouched. */
.sig-host { margin-top: 12px; }
.sig-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
@media (max-width: 760px) { .sig-grid { grid-template-columns: minmax(0, 1fr); } }
.sig-shown { background: #fbfaf6; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 110px; }
.sig-img { display: block; max-width: 100%; max-height: 110px; margin: 0 auto; }
.sig-none { color: #555; }
.sig-cap { color: #666; font-size: .8em; border-top: 1px dashed #ccc; margin-top: 6px; padding-top: 4px; }
.sig-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sig-pad { margin-top: 8px; }
.sig-canvas { width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 5; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; touch-action: none; }
.sig-saved { margin-top: 6px; }
.sig-kinds td:last-child, .sig-kinds th:last-child { text-align: center; width: 90px; }
.sig-toggle { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
/* 🏥 THE CLINIC PAGE's own (batch 3): the colour template, the letterhead and
   document previews, the teleconsult join card. The previews are printed
   paper, so they are drawn on paper's colours whatever the theme. */
.cl-big { font-size: 1.25em; }
.cl-pill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--dim); }
.cl-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cl-num { width: 70px; flex: 0 0 auto; }
.cl-colours { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; min-width: 0; }
.cl-colours-l { flex: 1 1 420px; min-width: 0; }
.cl-swatch { display: inline-block; width: 34px; height: 22px; border-radius: 5px; border: 1px solid var(--line); vertical-align: middle; }
.cl-preview { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fbfaf6; color: #222; }
.cl-preview-logo { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; background: #e8e4da; }
.cl-preview-logo img { width: 100%; height: 100%; object-fit: contain; }
.cl-preview-l { margin-left: auto; color: #7a7466; font-size: .8em; }
.cl-doc { flex: 0 1 330px; min-width: 0; background: #fbfaf6; color: #1d2a2a; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.cl-doc-h { padding-bottom: 8px; }
.cl-doc-s { margin-top: 10px; font-weight: 700; }
.cl-doc-n { margin-top: 10px; padding: 5px 8px; background: #fdf0da; }
.cl-phone { flex: 0 0 280px; min-height: 360px; background: #f6f4ef; color: #1d2a2a; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.cl-phone-h { color: #fff; padding: 16px; font-weight: 700; }
.cl-phone-t { padding: 14px 14px 0; font-weight: 700; }
.cl-phone-m { margin: 10px 14px; background: #fff; border-radius: 10px; padding: 10px; border: 1px solid #e3ded3; min-height: 2em; }
.cl-phone-b { margin: 10px 14px; color: #fff; text-align: center; border-radius: 10px; padding: 11px; font-weight: 600; }
.cl-phone .su-dim { text-align: center; padding: 0 14px 14px; }

/* 👥 Team & partners (batch 5, T23; teampage.ts): the Doctor page's cards, and these. */
.tm-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.tm-between { justify-content: space-between; }
.tm-end { justify-content: flex-end; }
.tm-amb { color: var(--amber); }
.tm-on { color: var(--teal); }
.tm-off { color: var(--dim); }
.tm-unread { color: var(--amber); }
.tm-acts { white-space: nowrap; text-align: right; }
.tm-sym { min-width: 30px; padding: 2px 6px; margin-left: 4px; }
.tm-kicker { color: var(--dim); letter-spacing: .08em; margin: 14px 0 6px; font-size: .85em; }
.tm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.tm-preview { font-style: italic; }
.tm-cal { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; }
.tm-cal-m { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; min-width: 280px; flex: 1; }
.tm-cal-m > .tm-kicker { grid-column: 1 / -1; }
.tm-cal-d { border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; min-height: 34px; overflow: hidden; }
.tm-cal-d.is-away { border-color: var(--amber); }
.tm-cal-n { display: block; color: var(--dim); font-size: .8em; }
.tm-cal-w { display: block; font-size: .8em; color: var(--amber-ink); }
/* ── THE PHONE'S ORDER SCREENS (#1299, phoneorders.ts): a sheet over the
   encounter page; favourites as rectangular tiles, small choices as slim
   pills (his "use mixed"). ───────────────────────────────────────────── */
.po-sheet { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.po-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.po-x, .po-help { width: 44px; height: 44px; flex: none; border-radius: 22px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.po-help { color: var(--dim); font-size: 16px; }
.po-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.po-title { font-size: 18px; font-weight: 600; }
.po-sub { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-helptext { padding: 8px 12px; font-size: 13px; color: var(--dim); border-bottom: 1px solid var(--line); }
.po-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 12px 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
/* ★ My favourites has six tabs, one row (#1299) */
.pf-sheet .po-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.po-tab { height: var(--tap); border: 0; background: transparent; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; }
.po-tab + .po-tab { border-left: 1px solid var(--line); }
.po-tab.on { background: var(--sunk); color: var(--teal); }
.po-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.po-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: calc(50% - 4px); gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }   /* his canvas comment, 28 Nov: two rows that move sideways */
.po-tile { min-height: 62px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 10px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--teal); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.po-tile.on { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--panel)); box-shadow: inset 0 0 0 1px var(--teal); }   /* #1299: a chosen tile */
.po-tile.on .po-t::before { content: "✓ "; }
.po-count { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.po-count[hidden] { display: none; }
.po-clear { background: none; border: 0; color: var(--teal); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
.po-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.po-go { width: 100%; min-height: 44px; border-radius: var(--r); border: 0; background: var(--teal); color: var(--bg); font: inherit; font-weight: 600; cursor: pointer; }
.po-go:disabled { background: var(--panel); color: var(--dim); border: 1px solid var(--line); cursor: default; }
.po-tile.gone { opacity: .5; border-style: dashed; color: var(--dim); }   /* #1300: an item gone from the inventory, refused */
.po-switch { display: flex; gap: 6px; margin-bottom: 8px; }
.po-groups { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; }
.po-groups > .po-pill { flex: 0 0 auto; }
.po-rxedit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.po-rxedit:empty { display: none; }
.po-rxedit .po-rxname, .po-rxedit .po-save, .po-rxedit .po-line, .po-rxedit .po-prn { grid-column: 1 / -1; }
.po-rxname { font-weight: 600; color: var(--ink); }
.po-prn { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.po-t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-s { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-add { min-height: 44px; border-radius: 22px; border: 1px dashed var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.po-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); }
.po-sel, .po-in { min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 14px; }
.po-found { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--dim); }
.po-pill { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-pill.on { border-color: var(--teal); color: var(--teal); }
.po-save { min-height: 44px; border-radius: 22px; border: 0; background: var(--teal); color: var(--bg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.po-said { font-size: 13px; color: var(--dim); }
.po-line { padding: 8px 12px; font-size: 13px; min-height: 20px; }
/* THE PHONE'S REFERRAL BOARD (29 Nov): allied health and doctors by favourite. */
.pr-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-k { font-size: 11px; letter-spacing: 0.08em; color: var(--dim); }
.pr-tt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pr-badge { flex: none; font-size: 9px; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--line); color: var(--dim); }
.pr-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.pr-l { font-size: 12px; color: var(--dim); }
.pr-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; min-width: 0; }
.pr-pill { flex: none; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pr-pill.on { border-color: var(--teal); color: var(--teal); background: var(--sunk); }
.pr-q { min-height: 72px; padding: 8px 10px; resize: vertical; }
.pr-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.pr-back { align-self: flex-start; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: 14px; cursor: pointer; }
.pr-memo { min-height: 0; }
.pr-list { display: flex; flex-direction: column; gap: 6px; }
.pr-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.pr-lamp { flex: none; width: 10px; height: 10px; border-radius: 5px; background: var(--dim); }
.pr-lamp.is-wait { background: var(--amber); }
.pr-lamp.is-on { background: var(--teal); }
.pr-lamp.is-back { background: var(--teal); box-shadow: 0 0 0 3px var(--sunk); }
.pr-lamp.is-no { background: var(--red); }
.pr-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-r1 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-r2, .pr-r3 { font-size: 12px; color: var(--dim); }

/* #1298 frame
   Dr Lau, 29 Nov 2026, "Pls optimize all these for phone usage": the phone's
   top bar is TWO rows of 44px. Row 1: the S-EMR mark, a short place pill and
   the status message box (phonestatus.js). Row 2: the patient in the chair --
   number, sex · age, a small allergy badge -- only while an encounter is
   open. The doctor's name, the date and Record leave the bar; Record is the
   bottom pair's. Placed by line numbers, not areas: four columns so the
   number may span under the mark and the pill and the status box keeps the
   rest. The owed row and the said line flow under, only while they have
   something to say. */
body.is-phone .spine,
body.is-phone .spine.has-patient,
body.is-phone .spine.has-owed,
body.is-phone .spine.has-owed.has-patient {
  grid-template-areas: none;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-rows: 44px;
  grid-auto-rows: auto;
  gap: 0 8px;
  padding: calc(env(safe-area-inset-top, 0px)) 10px 0;
}
body.is-phone .spine.has-patient,
body.is-phone .spine.has-owed.has-patient { grid-template-rows: 44px 44px; }
body.is-phone .spine > #who,
body.is-phone .spine #clock,
body.is-phone .spine > #rec { display: none; }
body.is-phone .spine > .wordmark { grid-area: 1 / 1 / 2 / 2; }
body.is-phone .spine > #checkin { grid-area: 1 / 2 / 2 / 3; justify-self: start; max-width: 120px;
                                  min-height: 44px; padding: 2px 10px; font-size: 11px; }
body.is-phone .spine > #ph-status { grid-area: 1 / 3 / 2 / 5; }
body.is-phone .spine #patient-mrn { grid-area: 2 / 1 / 3 / 3; justify-self: start; }
body.is-phone .spine #patient-sub { grid-area: 2 / 3 / 3 / 4; justify-self: start; cursor: pointer; }
body.is-phone .spine #allergy { grid-area: 2 / 4 / 3 / 5; justify-self: end; font-size: 10px; padding: 2px 8px;
                                  max-width: 96px; }
body.is-phone .spine > #owedbtn,
body.is-phone .spine > #spine-said { grid-area: auto; grid-column: 1 / -1; }
/* 2 Dec (#1298, measured at 360x800): the patient line's sex · age had 27px
   between the number and the allergy badge, under a finger's 44. On a
   narrow phone the place pill and the badge give it the room; both keep
   their whole words in their title. */
@media (max-width: 380px) {
  body.is-phone .spine > #checkin { max-width: 76px; }
  body.is-phone .spine #allergy { max-width: 84px; }
}

/* the status message box */
body:not(.is-phone) #ph-status { display: none; }
body.is-phone .ph-status {
  display: flex; align-items: center; gap: 6px; min-width: 0; height: 44px; align-self: center;
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
body.is-phone .ph-status.failed { border-color: var(--red); }
body.is-phone .ph-status .ps-lines { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
body.is-phone .ph-status .ps-last { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-status .ps-when { font-family: var(--mono); font-size: 9px; color: var(--dim);
                                    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .ph-status .ps-new { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
                                   background: var(--red-solid); color: #ffffff; font-family: var(--mono); font-size: 10px;
                                   display: inline-flex; align-items: center; justify-content: center; }

/* the status board */
body.is-phone .ps-sheet .ps-head { display: flex; align-items: center; gap: 8px; }
body.is-phone .ps-sheet .ps-head .sheet-t { flex: 1 1 auto; }
body.is-phone .ps-sheet .ps-x { min-width: var(--tap); min-height: var(--tap); border: 0; background: none;
                                color: var(--dim); font-size: 20px; cursor: pointer; }
body.is-phone .ps-sheet .ps-seg > * { min-height: var(--tap); }
body.is-phone .ps-sheet .ps-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; }
body.is-phone .ps-sheet .ps-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px;
                                  border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
body.is-phone .ps-sheet .ps-row.new { border-left: 3px solid var(--teal); }
body.is-phone .ps-sheet .ps-row.failed { border-color: var(--red); }
body.is-phone .ps-sheet .ps-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
body.is-phone .ps-sheet .ps-t { font-size: 13px; }
body.is-phone .ps-sheet .ps-w { font-family: var(--mono); font-size: 10px; color: var(--dim); }
body.is-phone .ps-sheet .ps-again { flex: 0 0 auto; min-height: var(--tap); padding: 0 12px; border-radius: 22px;
                                    border: 1px solid var(--teal); background: none; color: var(--teal); cursor: pointer; }
body.is-phone .ps-sheet .ps-empty { color: var(--dim); font-size: 13px; padding: 12px 4px; }

/* the bottom pair: Record and ▶ Submit for inference, above the six seats.
   It sits in the page's own column, so every page above it ends where the
   pair begins and nothing hides behind it. */
body:not(.is-phone) #ph-pair { display: none; }
body.is-phone .ph-pair {
  flex: 0 0 auto; display: flex; gap: 10px; justify-content: center;
  padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel-2);
}
body.is-phone .ph-pair > button {
  flex: 1 1 0; max-width: 220px; min-height: 52px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
body.is-phone .ph-pair .ph-rec { border: 1px solid var(--red); background: none; color: var(--ink); }
body.is-phone .ph-pair .ph-rec.on { background: var(--red-solid); color: #ffffff; }
body.is-phone .ph-pair .ph-rec .rdot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
body.is-phone .ph-pair .ph-rec .rsq { width: 12px; height: 12px; border-radius: 2px; background: #ffffff; }
body.is-phone .ph-pair .ph-rec .ps-clock { font-size: 12px; font-weight: 400; }
body.is-phone .ph-pair .ph-submit { border: 0; background: var(--teal); color: #04221f; }
body.is-phone .ph-pair > button:disabled { opacity: .45; cursor: default; }
body.is-phone .ph-pair .ph-submit.busy { background: var(--sunk); color: var(--dim); }

/* #1298 patients -- the phone's Patients screen: one full-width switch,
   Find's box only under Find, rows of 56px (number and state, then sex ·
   age and when). Phone only; the desktop sheet is untouched. */
body.is-phone #patients.is-ptp .ptp-switch { display: flex; gap: 4px; flex: 0 0 auto; width: 100%; }
body.is-phone #patients.is-ptp .ptp-tab {
  flex: 1 1 0; min-width: 0; min-height: var(--tap); padding: 4px 4px;
  border: 1px solid var(--rule); border-radius: 999px; background: transparent;
  color: var(--dim); font: inherit; font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
body.is-phone #patients.is-ptp .ptp-tab[aria-selected="true"] { border-color: var(--teal); color: var(--teal); background: var(--sunk); }
body.is-phone #patients.is-ptp .ptp-find[hidden] { display: none; }
body.is-phone #patients.is-ptp .ptp-row {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 56px; padding: 6px 12px; width: 100%; text-align: left;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk);
  color: var(--ink); font: inherit; cursor: pointer; flex: 0 0 auto;
}
body.is-phone #patients.is-ptp .ptp-l1,
body.is-phone #patients.is-ptp .ptp-l2 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
body.is-phone #patients.is-ptp .ptp-num { font-family: var(--mono); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.is-phone #patients.is-ptp .ptp-st { margin-left: auto; font-size: 12px; color: var(--dim); white-space: nowrap; }
body.is-phone #patients.is-ptp .ptp-st.is-chase,
body.is-phone #patients.is-ptp .ptp-st.is-owed { color: var(--amber); }
body.is-phone #patients.is-ptp .ptp-st.is-unread { color: var(--red); }
body.is-phone #patients.is-ptp .ptp-sa,
body.is-phone #patients.is-ptp .ptp-seen { font-size: 12px; color: var(--dim); white-space: nowrap; }
body.is-phone #patients.is-ptp .ptp-seen { margin-left: auto; }
body.is-phone #patients.is-ptp .ptp-mark { font-size: 11px; color: var(--amber); }

/* #1298 diary and room (29 Nov): the phone's Diary and Waiting room, laid out
   for one hand. Phone only: every rule opens with body.is-phone. Small
   choices are slim pills, the scope switch a full-width segment, the
   explanatory note behind a ? at the upper right. */
body.is-phone .now-help { margin-left: auto; min-width: var(--tap); min-height: var(--tap); border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--dim); font-family: var(--mono); font-size: 13px; cursor: pointer; }
body.is-phone .now-foot[hidden], body.is-phone .now-pad-when[hidden], body.is-phone .ar-more[hidden], body.is-phone .ar-walkin[hidden] { display: none; }
body.is-phone .ph-seg.now-scope { width: 100%; }
body.is-phone .now-scope-b { min-height: var(--tap); }
body.is-phone .now-rosters { display: flex; flex-direction: column; gap: 2px; }
body.is-phone .now-roster-l { display: flex; align-items: center; gap: 8px; min-height: var(--tap); min-width: 0; }
body.is-phone .now-roster-k { flex: 0 0 auto; font-size: 10px; color: var(--dim); }
body.is-phone .now-roster-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .now-roster-more, body.is-phone .now-roster-l .now-bad { flex: 0 0 auto; color: var(--dim); font-size: 11px; }
body.is-phone .now-roster-l .now-bad { color: var(--amber); }
body.is-phone .now-roster-up { flex: 0 0 auto; width: var(--tap); height: var(--tap); border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); color: var(--teal); display: flex; align-items: center; justify-content: center; cursor: pointer; }
body.is-phone .now-glance-l, body.is-phone .now-meeting { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; border: 0; border-top: 1px solid var(--rule); background: none; color: var(--ink); text-align: left; cursor: pointer; }
body.is-phone .now-glance-l .kicker { flex: 0 0 64px; font-size: 10px; color: var(--dim); }
body.is-phone .now-glance-l .nm { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .now-meeting { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
body.is-phone .now-pad .now-pad-kinds { height: 32px; align-self: flex-start; border-radius: 999px; }
body.is-phone .now-pad .now-pad-kinds > * { padding: 0 14px; min-height: var(--tap); }
body.is-phone .ar-row { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
body.is-phone .ar-line { display: flex; align-items: center; gap: 8px; min-height: 56px; min-width: 0; }
body.is-phone .ar-line .wr-who { flex: 0 0 auto; min-height: var(--tap); }
body.is-phone .ar-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 8px; }
/* #1299: the reason is its symbol; its words stay for a screen reader only */
body.is-phone .ar-sym { flex: 0 0 auto; font-size: 18px; line-height: 1; }
body.is-phone .ar-why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: normal; }
body.is-phone .ar-long { font-size: 11px; color: var(--dim); white-space: nowrap; }
body.is-phone .ar-long.is-amber { color: var(--amber); }
body.is-phone .ar-long.is-coral { color: var(--red); }
body.is-phone .ar-primary { flex: 0 0 auto; min-height: var(--tap); min-width: 64px; border-radius: 8px; }
body.is-phone .ar-more-b { flex: 0 0 auto; width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--dim); font-size: 18px; cursor: pointer; }
body.is-phone .ar-more { padding: 0 0 8px; }
body.is-phone .ar-empty-lanes { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 2px; }
body.is-phone .ar-chip { font-family: var(--mono); font-size: 10px; color: var(--dim); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; }
body.is-phone .ar-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; }
body.is-phone .ar-walk-b { min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--teal); font-family: var(--mono); font-size: 12px; cursor: pointer; }
body.is-phone .ar-room-title .ar-walk-b { margin-left: auto; }

/* #1298 the phone's Now page: three ARRIVALS tiles, the Clinic | Inpatient
   switch, the ORDER board, TODAY in one card, ENCOUNTERS · TODAY. His
   "mixed" style: tiles rectangular, 8px corners, 48px tall; the switch a
   slim pill. Phone only. */
body.is-phone .now-page .ph-tile { min-height: 56px; border-radius: 8px; }  /* 48 cut the label (5 Dec) */
body.is-phone .ph-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
body.is-phone .now-view-sw { margin-left: auto; display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; min-height: 32px; }
body.is-phone .now-view-sw > .now-vs-on,
body.is-phone .now-view-sw > button.fv-switch { padding: 0 12px; min-height: 32px; display: inline-flex; align-items: center; font-size: 12px; border: 0; border-radius: 0; }
body.is-phone .now-view-sw > .now-vs-on { background: var(--sunk); color: var(--ink); font-weight: 600; }
body.is-phone .now-view-sw > button.fv-switch { background: transparent; color: var(--dim); }
body.is-phone .now-ot[aria-disabled="true"] { opacity: 0.55; }
body.is-phone .now-order-said:empty { display: none; }
body.is-phone .now-clinic-line .rt .now-clinic-n { color: var(--dim); font-size: 11px; }
body.is-phone .now-et .now-et-n { color: var(--ink); font-size: 13px; }
body.is-phone .now-et[aria-expanded="true"] { border-color: var(--teal); }
body.is-phone .now-et-closed .now-et-n { color: var(--dim); }
body.is-phone .now-enc-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
body.is-phone .now-today { display: flex; flex-direction: column; gap: 4px; }
/* FORM-4 AND FORM-5 (Dr Lau, 2 Dec 2026, #1332 and #1333): the front desk's
   forms and the folder boards' add and edit forms. The standard look itself
   is FORM-0's ("THE STANDARD FORM", above); these are what the desk and the
   boards add to it. No px font size, so the generated desktop type scale is
   untouched. */
:is(.form-std, .form-face) .is-required::after { content: ' · required'; color: var(--dim); }
/* The face sets its ground with the background shorthand, which took desk
   leave's own drawn select arrow (seen in Chromium); it is drawn again. */
.form-face .fd-dl-sel { background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%),
                                          linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
@media (hover: hover) and (pointer: fine) {
  /* the desk's and the boards' own button classes, slim like .btn */
  :is(.form-std, .form-face) :is(.fda-btn, .hs-btn, .ivx-btn, .pc-add-b) { min-height: 1.75rem; padding: 0.1875rem 0.625rem; font-size: 0.8125rem; line-height: 1.2; border-radius: 0.875rem; }
}

/* FORM-3 (2 Dec 2026): the encounter page's and writing board's forms in the
   standard look. A translation's act button keeps its own width, as every
   form's button does. */
.trn-act > .btn { justify-self: start; }
/* #1299 the encounter's favourite tiles and ★ My favourites (phonefavs.js).
   His "mixed" style: a favourite is a rectangular tile, 8px corners, 48px
   tall, its name over its settings, three across on the encounter; small
   choices are slim pills; the explanation is behind the sheet's ?. */
body.is-phone .pf-strip { display: flex; flex-direction: column; gap: 6px; }
body.is-phone .pf-body { display: flex; flex-direction: column; gap: 6px; }
body.is-phone .pf-k { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .06em; }
body.is-phone .pf-wait { font-size: 12px; color: var(--dim); }
body.is-phone .pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
body.is-phone .pf-tile { display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: 48px; min-width: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--sunk); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
body.is-phone .pf-tile .pf-t { max-width: 100%; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .pf-tile .pf-s { max-width: 100%; font-family: var(--mono); font-size: 10px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .pf-parts { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px dashed var(--line); border-radius: 8px; }
body.is-phone .pf-parts[hidden] { display: none; }
body.is-phone .pf-part { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
body.is-phone .pf-part .pf-pk { flex: 0 0 64px; font-family: var(--mono); font-size: 10px; color: var(--dim); }
body.is-phone .pf-part .pf-pr { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .pf-part .pf-pn { flex: 0 0 auto; font-size: 11px; color: var(--dim); }
body.is-phone .pf-go { flex: 0 0 auto; min-height: var(--tap); min-width: 64px; border: 1px solid var(--teal);
  border-radius: 8px; background: none; color: var(--teal); font: inherit; cursor: pointer; }
body.is-phone .pf-edit { align-self: flex-start; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line);
  border-radius: 999px; background: none; color: var(--teal); font: inherit; font-size: 13px; cursor: pointer; }
body.is-phone .pf-said { font-size: 12px; color: var(--dim); }
body.is-phone .pf-said.ok { color: var(--teal); }
body.is-phone .pf-said.no { color: var(--red); }
body.is-phone .pf-said[hidden] { display: none; }
body.is-phone .pf-seg { display: flex; gap: 6px; }
body.is-phone .pf-seg .po-pill { min-height: var(--tap); }
body.is-phone .pf-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; }
body.is-phone .pf-row { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 2px 6px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); }
body.is-phone .pf-row.is-tile { border-color: var(--teal-2); }
body.is-phone .pf-row .pf-n { flex: 0 0 22px; font-size: 11px; color: var(--dim); }
body.is-phone .pf-row .pf-l { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .pf-mv, body.is-phone .pf-x { flex: 0 0 auto; min-width: var(--tap); min-height: var(--tap);
  border: 0; background: none; color: var(--dim); font: inherit; font-size: 16px; cursor: pointer; }
body.is-phone .pf-mv:disabled { opacity: .3; cursor: default; }
body.is-phone .pf-x.ask { color: var(--red); font-size: 12px; }
/* FORM-6 and FORM-7 (#1334, #1335): a select in a form whose own rules name
   it by class (Preferences' .su-in) keeps the standard face and slim height
   too. The standard form itself (form-std, form-face) is FORM-0's block. */
:is(.form-std, .form-face) select:not([multiple]) { padding: 0.25rem 0.5625rem; font-size: 0.875rem; border-radius: 0.4375rem; }
@media (hover: hover) and (pointer: fine) {
  :is(.form-std, .form-face) select:not([multiple]) { min-height: 1.75rem; height: 1.75rem; padding-top: 0; padding-bottom: 0; }
}
/* FORM-1 and FORM-2 (2 Dec 2026, Dr Lau's standard form). The Orders card's
   and the post-consult card's ? are the shared help button (helpbtn.ts) in a
   slot at the row's right end; a required field says so on its label on the
   Allied, GP and therapy forms, as the radiology form's does; a lead's
   registration number is an element of its own, so it drags into a form. */
.or-help-slot, .pcn-helpslot { display: inline-flex; align-items: center; flex: none; gap: 0; }
.pcn-helpslot { margin-left: auto; }
.or-help-slot.has-help, .pcn-helpslot.has-help { display: inline-flex; }
:is(.alr-label, .gv-h, .tx-req).is-required::after { content: ' · required'; color: var(--dim); font-weight: 400; }
.rx-pharmacy .dt-bullet { margin: 0.25rem 0; }
/* The consent editors (FORM-1): each section's label above its box, every box the row's width. */
.cns-proc, .cns-pdpa, .cns-sections { display: grid; gap: 0.375rem; }
.cns-label { display: block; margin-top: 0.5rem; color: var(--dim); }
.cns-text, .cns-input { display: block; width: 100%; }
.cns-policy > summary { margin-top: 0.5rem; cursor: pointer; }
:is(.cns-proc, .cns-pdpa, .cns-sections) > .btn { justify-self: start; }

/* ⚠ THE ALLERGY RECORD (adeboard.ts, 5 Dec 2026). The bar's allergy field
   opens it; an allergy on file blinks until the eye has it. */
@keyframes pill-blink { 0%, 55% { opacity: 1; } 75% { opacity: 0.35; } 100% { opacity: 1; } }
.pill.pill-blink { animation: pill-blink 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pill.pill-blink { animation: none; box-shadow: 0 0 0 0.125rem var(--red); } }
.fo-allergy[role="button"] { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.1875rem; }
.adeb-veil { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center;
  padding: 4.5rem 1rem 1rem; background: rgba(0,0,0,0.45); overflow: auto; }
.adeb { width: min(46rem, 100%); max-height: calc(100vh - 6rem); display: flex; flex-direction: column; border-radius: 0.75rem;
  background: var(--panel); border: 1px solid var(--rule); box-shadow: var(--z2); color: var(--ink); }
.adeb-h { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--line); }
.adeb-title { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.625rem; }
.adeb-t { font-size: 1rem; font-weight: 600; color: var(--ink); }
.adeb-key { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); }
.adeb-x { flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer; }
.adeb > .help-panel { margin: 0.5rem 0.875rem 0; }
.adeb-body { padding: 0.75rem 0.875rem 0.875rem; overflow: auto; display: flex; flex-direction: column; gap: 0.625rem; }
.adeb-empty, .adeb-typed, .adeb-nkda, .adeb-sub { font-size: 0.875rem; color: var(--ink-2); }
.adeb-empty.is-no { color: var(--red-ink); }
.adeb-nkda { color: var(--teal); }
.adeb-row { padding: 0.5rem 0.625rem; border: 1px solid var(--line); border-left: 0.1875rem solid var(--line); border-radius: 0.5rem; }
.adeb-row.is-active { border-left-color: var(--red); }
.adeb-row.is-gone { opacity: 0.8; }
.adeb-row.is-gone .adeb-drug { text-decoration: line-through; }
.adeb-row-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; }
.adeb-drug { font-size: 0.9375rem; color: var(--ink); }
.adeb-tag { font-size: 0.75rem; padding: 0 0.4375rem; border: 1px solid var(--line); border-radius: 0.75rem; color: var(--ink-2); }
.adeb-code { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); }
.adeb-facts { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.125rem 0.625rem; margin-top: 0.375rem; font-size: 0.8125rem; }
.adeb-k { color: var(--ink-2); }
.adeb-v { color: var(--ink); overflow-wrap: anywhere; }
.adeb-acts, .adeb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin-top: 0.375rem; }
.adeb-foot .ask-line, .adeb-slot .ask-line { flex-basis: 100%; }
.adeb-slot:not(:empty) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.375rem 0.625rem; margin-top: 0.375rem; }
.adeb-slot .adeb-f { flex: 1 1 14rem; }
.adeb-old > summary { cursor: pointer; font-size: 0.8125rem; color: var(--ink-2); }
.adeb-old .adeb-row { margin-top: 0.375rem; }
.adeb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.875rem; }
.adeb-f { display: flex; flex-direction: column; gap: 0.1875rem; min-width: 0; }
.adeb-f[data-field="reactions"], .adeb-f[data-field="remarks"], .adeb-f[data-field="onset"],
.adeb-f[data-field="relationship"], .adeb-form > .adeb-foot, .adeb-form > .ask-line { grid-column: 1 / -1; }
.adeb-form > .adeb-f:first-child, .adeb-f[data-field="source"] { grid-column: 1 / -1; }
.adeb-f.is-no > .adeb-l { color: var(--red-ink); }
.adeb-f.is-no { outline: 1px solid var(--red); outline-offset: 0.1875rem; border-radius: 0.25rem; }
.adeb-l { font-size: 0.75rem; color: var(--ink-2); }
.adeb-ro { font-size: 0.875rem; color: var(--ink); min-height: 1.75rem; display: flex; align-items: center; }
.adeb-ro.is-missing { color: var(--amber-ink); }
.adeb-when { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; }
.adeb-form.form-std .adeb-when input[type="text"] { width: 14rem; }
.adeb-form.form-std .adeb-when input[type="time"] { width: 7rem; }
.adeb-check { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--ink); }
.adeb-rbox { display: flex; flex-direction: column; gap: 0.375rem; }
.adeb-hits { display: flex; flex-direction: column; }
.adeb-hit { text-align: left; padding: 0.25rem 0.5rem; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); font: inherit; font-size: 0.8125rem; cursor: pointer; }
.adeb-hit:hover { background: var(--selected-bg); }
.adeb-nohit { font-size: 0.8125rem; color: var(--amber-ink); }
@media (max-width: 40rem) { .adeb-form { grid-template-columns: minmax(0, 1fr); } .adeb-veil { padding: 0.5rem; } .adeb { max-height: calc(100vh - 1rem); } }

/* 🫀 A CARDIAC REPORT (cardiacrep.ts, 5 Dec 2026): the allergy record's shell, its own body. */
.crp-details { margin-top: 0.375rem; font-size: 0.875rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.adeb-f[data-field="details"], .adeb-f[data-field="procedure_name"] { grid-column: 1 / -1; }
.adeb-f[hidden] { display: none; }
.adeb-form.form-std .adeb-when input[type="date"] { width: 10rem; }
.iv-cardiac-add { margin: 0 0 0.25rem; }

/* 💉 THE FOLDER'S VACCINATION TAB (vaxtab.ts, 5 Dec 2026). */
.vxt { display: flex; flex-direction: column; gap: 0.5rem; }
.vxt-h { display: flex; align-items: center; gap: 0.75rem; }
.vxt-title { font-size: 1rem; font-weight: 600; color: var(--ink); }
.vxt-h .help-btn { margin-left: auto; }
.vxt-body { display: flex; flex-direction: column; gap: 0.5rem; }
.vxt-scroll { overflow-x: auto; }
.vxt-t { width: 100%; min-width: 52rem; border-collapse: collapse; font-size: 0.875rem; }
.vxt-t th { text-align: left; padding: 0.375rem 0.5rem; border-bottom: 1px solid var(--line); font: 600 0.75rem var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.vxt-t td { padding: 0.4375rem 0.5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink); }
.vxt-t tr.is-gone .vxt-main { text-decoration: line-through; color: var(--ink-2); }
.vxt-main { display: block; }
.vxt-sub { display: block; font-size: 0.8125rem; color: var(--ink-2); }
.vxt-sub.is-missing { color: var(--amber-ink); }
.vxt-acts .dt-bullet { margin-top: 0.125rem; }
.vxt-form { max-width: 52rem; }
.vxt-form > .adeb-f:first-child, .vxt-form .adeb-f[data-field="site"] { grid-column: 1 / -1; }
.vxt-scanbox { display: flex; flex-direction: column; gap: 0.1875rem; }
.vxt-form.form-std input.vxt-scan { border-style: dashed; }
.vxt-form.form-std input.is-scanned { border-color: var(--teal); }
.vxt-form.form-std .adeb-when > input, .vxt-form.form-std .adeb-when > select { width: auto; flex: 1 1 8rem; }
.vxt-form > .vxt-sub { grid-column: 1 / -1; }

/* ONE BUTTON, THE NEHR FACTS OF A FOLDER (5 Dec 2026): nehrfacts.ts. The
   dialog's shell is the allergy record's; these are its tabs and the three
   ways a fact can read. */
.adeb.nf { width: min(56rem, 100%); }
.fv-nehr-facts { white-space: nowrap; }
.nf-copy { margin-left: auto; margin-right: 0.5rem; }
.nf-tabs { display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0.5rem 0.875rem 0; }
.nf-tab { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2rem; padding: 0.25rem 0.625rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel, transparent); color: inherit;
  font: inherit; font-size: 0.8125rem; cursor: pointer; }
.nf-tab.is-on { border-color: var(--accent, currentColor); font-weight: 600; }
.nf-tab-n { font-size: 0.75rem; opacity: 0.75; }
.nf-tab-n.is-no { color: var(--alert, #b3261e); opacity: 1; }
.nf-gaps { font-size: 0.8125rem; padding: 0.375rem 0.5rem; border-radius: 0.375rem; border: 1px solid var(--line); }
.nf-gaps.is-no { color: var(--alert, #b3261e); border-color: currentColor; }
.nf-facts { grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); }
.nf-v { white-space: pre-wrap; overflow-wrap: anywhere; }
.nf-v.is-none { color: var(--alert, #b3261e); font-weight: 600; }
.nf-v.is-na, .nf-v.is-doc { opacity: 0.8; font-style: italic; }
.nf-fhir { display: block; font-family: var(--mono, monospace); font-size: 0.6875rem; opacity: 0.6; }

/* The medication review at discharge (medreview.ts), at the head of the
   folder's Medication tab. */
.mrv { border: 1px solid var(--line, #d9dee5); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.mrv-h { font-weight: 600; }
.mrv-l { margin-top: 2px; }
.mrv-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.mrv-src { min-height: 44px; }
