/* Abilene Pain hub — template v4 (Oct 6, 2026) · band 3b richer blue · dark bands for top level only. Light mode. IBM Plex Sans + Material Symbols Outlined (wght 300).
   Order: tokens → base → one block per part. No patch layers: change a part here, never per screen. */

/* Layers, lowest first: base (plain elements) → waiting (parts of screens not moved yet) → old (the hub's old stylesheet, while it lasts)
   → moved (parts of screens already moved). A part always beats the base; while the old stylesheet lasts, it wins over waiting parts only. */
@layer base, waiting, old, moved;

/* ───────── 0. Fonts (served by the hub itself: the hub's security rules allow fonts from the hub only; licences in /fonts) ───────── */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Material Symbols Outlined"; font-style: normal; font-weight: 100 700; font-display: block; src: url("/fonts/material-symbols-hub.woff2") format("woff2"); }

/* ───────── 1. Tokens ───────── */
:root {
  /* text */
  --ink: #1a1f26;            /* content, first lines, titles */
  --quiet: #59616d;          /* second lines, hints, labels, placeholders */
  --accent: #2a5aa0;         /* links, focus, selected */
  --on-band: #ffffff;        /* text on the blue band */
  --on-band-quiet: #c3d2e8;  /* quiet words on the blue band */
  /* surfaces */
  --bg: #f3f4f6;             /* page */
  --surface: #ffffff;        /* content: the brightest thing */
  --sunk: #f8f9fa;           /* column headers, details band, hover */
  --selected: #e8eef8;       /* selected row / menu item, main button */
  --band: #1d4275;           /* title band (top level): richer blue, white text 10:1 */
  --band-hover: #2a5288;
  --band-2: #e6e9ee;         /* sub-band (group inside a card or table) */
  --hmx-band: #e3ebf2; --hmx-band-ink: #233542; /* Home title bands in the Snapshot layout: the soft look band (his 2026-11-07 "lighter colors"); dark mode below */
  /* lines */
  --line: #e2e5ea;           /* rows, dividers */
  --line-strong: #c9ced6;    /* controls */
  --accent-line: #9fb6d8;    /* main button outline */
  /* status — never change meaning */
  --urgent: #b3261e; --urgent-bg: #fbeceb; --urgent-line: #efc1bd;   /* emergent item only, said once */
  --late: #8a5300;   --late-dot: #d68f0a; --late-bg: #fcf2dc;        /* late or waiting */
  --done: #1d6b42;   --done-dot: #2e9a5c; --done-bg: #e4f2ea;        /* done */
  --neutral-dot: #8a929e;
  --rail: #162f55; --rail-ink: #c9d6ea; --rail-edge: #8fb3e6;
  --sticky: #fcf2dc;      /* the sticky note: Office (yellow) */
  --note-line: #e2c56f;   /* the edge of a yellow note (Spruce internal notes) */
  --sticky-clinical: #dff0e6; /* the sticky note: Clinical (green), so the two notes never look alike */
  /* type: 4 sizes, 2 weights */
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --t-xs: 12px; --lh-xs: 16px;   /* count badges, app-strip labels only */
  --t-sm: 13px; --lh-sm: 18px;   /* second lines, hints, labels, band extras */
  --t-md: 15px; --lh-md: 22px;   /* body, first lines, titles in bands */
  --t-lg: 22px; --lh-lg: 28px;   /* page title, patient name, numbers */
  --w-reg: 400; --w-bold: 600;
  /* space */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  /* corners: 3 */
  --r-ctl: 4px; --r-card: 8px; --r-round: 999px;
  /* shadows: 2 */
  --sh-lift: 0 1px 2px rgba(20, 30, 45, .06);
  --sh-over: 0 12px 32px rgba(20, 30, 45, .18);
  --scrim: rgba(0, 0, 0, .45);   /* the dimmed screen behind a phone menu */
  /* the frame: every height and gap that makes the header of a screen, named once (B-414, his compact headers 2026-10-14). A computer uses
     these compact numbers; a touch screen and a phone use the comfortable block below, where a finger taps (40 px and up). */
  --h-top: 40px;       /* the top bar */
  --h-tbar: 34px;      /* a toolbar or a row of tabs */
  --h-sum: 32px;       /* the line above a list: its summary and views */
  --h-strip: 30px;     /* the chart's Details row and sticky note */
  --h-band: 30px;      /* a title band (his pick 2026-10-14) */
  --h-band-2: 26px;    /* a group band inside a card */
  --h-ctl: 28px;       /* a button, switch or field in a bar */
  --h-ctl-sm: 24px;    /* a small one, on a band or in a row */
  --h-av: 32px;        /* the initials circle in the chart header */
  --pad-head: 6px;     /* above and below the chart's patient header */
  --pad-item: 6px;     /* above and below an item's header beside a list */
  --pad-next: 4px;     /* above and below the next-step line under an item */
  --gap-frame: 8px;    /* under the top bar, between a header and what follows it */
  --gap-head: 0px;     /* between the lines of a header that wraps */
  --w-state: 104px;    /* the label column of an opened item's state rows and its forms in place (his ask 2026-11-10: tighter; section 10b) */
  --w-fxseg: 176px;    /* the Summary | All details switch, placed in the item header (section 10b) */
  --t-name: 18px; --lh-name: 24px;   /* the patient's name in the chart header */
  /* fixed heights */
  --h-colhead: 32px; --h-row: 52px; --h-row-1: 40px;
  --h-input: 36px;
  /* list columns: one standard width per part of a row (5a), so a column sits at the same place in every section of a list */
  --w-col-sel: 40px; --w-col-name: 24%; --w-col-for: 18%; --w-col-when: 17%; --w-col-extra: 12%;
  --w-col-act: 224px; /* the row's buttons: the longest usual one ("Close as Unreachable") and ⋯ on one line */
  --w-pane-min: 360px; /* a pane beside another (the chart beside a document, B-371): never narrower, unless the two cannot both have it */
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
  /* patient flags (B-303): the fixed palette an admin picks a flag's colour from, each a text colour on its own tint */
  --pf-red: #a32020; --pf-red-bg: #fbeceb; --pf-amber: #8a5300; --pf-amber-bg: #fcf2dc; --pf-blue: #1f5fa8; --pf-blue-bg: #e6eef9;
  --pf-green: #1d6b42; --pf-green-bg: #e4f2ea; --pf-purple: #5b3c99; --pf-purple-bg: #efe8fb; --pf-grey: #4a5260; --pf-grey-bg: #e9ecf0;
}
/* a touch screen or a phone (a finger taps): the comfortable frame, as it was before B-414; the phone's own redesign comes later */
@media (max-width: 640px), (pointer: coarse) { :root { --h-top: 52px; --h-tbar: 44px; --h-sum: 32px; --h-strip: 44px; --h-band: 36px; --h-band-2: 32px; --h-ctl: 32px; --h-ctl-sm: 28px; --h-av: 44px; --pad-head: 12px; --pad-item: 16px; --pad-next: 12px; --gap-frame: 8px; --gap-head: 8px; --t-name: 22px; --lh-name: 28px; --w-state: 96px; } }
/* the Clinical snapshot in the Right panel is never changed (his rule 2026-10-11): it keeps the comfortable numbers on a computer too */
.sp-pic { --h-band: 36px; --h-band-2: 32px; --h-ctl: 32px; --h-ctl-sm: 28px; }
@media (max-width: 1279px) { :root { --w-col-act: 176px; } } /* laptops: the row's text keeps its room; a longer button label wraps in its button (a table cell's width is px or %, never a mix) */
/* the flag palette in Dark (his rule 2026-10-04: readable in Light and Dark): light text on a deep tint, never a lighter box */
:root[data-theme="dark"] {
  --hmx-band: var(--band-2); --hmx-band-ink: var(--ink); /* Home title bands: today's dark band, never lighter */
  --pf-red: #ef7a7a; --pf-red-bg: #3a1f22; --pf-amber: #e0a54a; --pf-amber-bg: #33280f; --pf-blue: #8ab8f0; --pf-blue-bg: #1f2a38;
  --pf-green: #7fd19b; --pf-green-bg: #1d3326; --pf-purple: #c3a8f5; --pf-purple-bg: #2c2340; --pf-grey: #c4cbd4; --pf-grey-bg: #2a3038;
}

@layer base {
/* ───────── 2. Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: var(--w-reg) var(--t-md)/var(--lh-md) var(--font); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.ms { display: inline-block; width: 1em; overflow: hidden; font-family: "Material Symbols Outlined"; font-weight: 300; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; vertical-align: middle; }
html:not(.ms-ready) .ms { visibility: hidden; } /* until the icon font is here: never the icon's name (theme.js) */
button, input, select, textarea { color: inherit; }
[hidden] { display: none !important; } /* hidden means hidden, whatever a part says */
:where(.fx-head) { display: grid; grid-template-columns: 40px 1fr auto; }
:where(.fx-next, .hx-next) { display: flex; }
:where(.pp-toolbar) { min-height: var(--h-tbar); }
:where(.hm-kpi, .acc-t) { flex-direction: column; }
:where(.rulecard) { grid-template-columns: 1fr auto; }
:where(.wl-head) { display: flex; flex-wrap: wrap; min-height: var(--h-sum); }
/* the parts' layout (display) sits here, under the screens' own rules, so a screen can still hide or arrange a part */
:where(label) { display: block; }
:where(.seg.lv-scope, .seg) { display: inline-flex; }
:where(.pill, .flag, .chip, .evchip, .msg-tag, .pc-pri, .pc-tk, .pc-cat) { display: inline-flex; }
:where(.st) { display: inline-flex; }
:where(.wk-n, .ar-n, .badge, .navn) { display: inline-grid; }
:where(.actions) { display: flex; }
:where(.rulecard) { display: grid; }
:where(.hm-kpi) { display: flex; }
:where(.rb:not(:has(> .rb-top))) { display: flex; } /* the one-line referral bar; the hub's referral banner (top row, then its facts) stays a block */
:where(.wk-sent) { display: block; } /* the list summary: the hub hides it beside an open chart */
:where(.pp-menu) { display: flex; flex-direction: column; gap: 2px; } @media (max-width: 640px) { :where(.pp-menu) { flex-direction: row; } }
:where(.pp-narrow .pp-menu) { flex-direction: row; } /* a narrow chart (the phone, or a chart beside a list: pp-narrow under 760px, patient.js) turns it into a row of tabs; its width is the layout's column */
:where(.pp-toolbar) { display: flex; }
:where(.pp-band) { display: flex; align-items: center; gap: var(--s3); min-height: var(--h-strip); padding: 0 var(--s4); } /* the Details band's layout: the hub's opened band lays out its own columns */
:where(.sp-edge) { position: fixed; right: 0; top: calc(var(--bar-h, var(--h-top)) + 60px); z-index: 880; display: flex; flex-direction: column; gap: var(--s2); } /* the Right panel's edge tabs: placed here so its open, pinned and phone rules can move or hide them */
/* a button lays out its icon and words in a row; in the base layer, so a screen's own rule can still hide or place it */
:where(button.primary, a.primary, button.secondary, a.secondary, button.quiet, button.link, a.link, button.danger) { display: inline-flex; align-items: center; justify-content: center; }
:where(textarea) { min-height: 88px; } /* a note box is roomy unless its screen sets its size */
/* a field fills its cell unless its screen sizes it (a date box in a toolbar, a short number box) */
:where(input[type=text], input:not([type]), input[type=number], input[type=date], input[type=search], input[type=tel], input[type=password], select, textarea) { width: 100%; }
} /* end of layer base */

@layer moved {
/* ───────── 3. Frame ─────────
   The app strip down the left (computers and tablets; phones keep their bottom bar), the top bar, the Right panel's edge tabs and the message
   at the foot of the screen. The same on every page. */
.apprail { width: 76px; display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 6px; background: var(--rail); }
@media (max-width: 899px) { .apprail { display: none; } } /* phones and small tablets: the bottom bar instead */
@media (min-width: 900px) {
  body.has-rail { padding-left: 76px; }
  body.has-rail .apprail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 7; }
  body.has-rail .topbar :is(.toolmenu, .hublink) { display: none; } /* the strip is the app switcher */
  body:has(.sp-edge) main { padding-right: 48px; }
  @media (min-width: 900px) { body.sp-open:not(.sp-pinned) main { padding-right: calc(var(--sp-w) + 40px); } } /* the panel is open over the page: the page keeps clear of it and of the General tools / Patient tools tabs on its edge (they covered the Now box's button) */ /* room for the edge tabs: row buttons never slide under them */
  body:has(.sp-edge) .drawer.side { padding-right: 34px; } /* and the item beside a list: its right-hand buttons (the cross, a band's +) never sit under an edge tab (B-414 check) */
}
.apprail a, .apprail .ar-more > summary { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 4px; border-radius: 6px; color: var(--rail-ink); font-size: var(--t-xs); line-height: var(--lh-xs); text-align: center; text-decoration: none; list-style: none; cursor: pointer; }
.apprail .ar-more > summary::-webkit-details-marker { display: none; }
.apprail a:hover, .apprail .ar-more > summary:hover { background: rgba(255,255,255,.08); color: var(--on-band); text-decoration: none; }
.apprail a[aria-current], .apprail .ar-more.on > summary { background: rgba(255,255,255,.14); color: var(--on-band); font-weight: var(--w-bold); box-shadow: inset 3px 0 0 var(--rail-edge); }
.apprail .ar-ic .ms { font-size: 22px; line-height: 24px; }
.apprail .ar-l { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apprail .ar-n[hidden], .apprail .ar-more[hidden] { display: none; }
.apprail .ar-more { position: relative; margin-top: auto; }
.apprail .ar-hub { margin-top: auto; }
.apprail .ar-more + .ar-hub { margin-top: 0; }
.apprail .ar-menu { position: absolute; left: 72px; bottom: 6px; z-index: 9; min-width: 200px; display: flex; flex-direction: column; gap: 2px; padding: var(--s1); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-over); }
.apprail .ar-menu a { flex-direction: row; justify-content: flex-start; gap: var(--s3); padding: var(--s2) 10px; color: var(--ink); font-size: var(--t-sm); line-height: var(--lh-sm); text-align: left; }
.apprail .ar-menu a:hover { background: var(--sunk); color: var(--ink); }
.apprail .ar-menu a[aria-current] { background: var(--selected); color: var(--ink); box-shadow: none; }
.apprail .ar-menu .ar-ic .ms { font-size: 20px; line-height: 20px; }
.apprail .ar-menu .ar-l { white-space: normal; overflow: visible; }
.apprail .ar-tip { padding: 6px 10px 2px; }
.apprail a.dragging { opacity: .45; outline: 1px dashed var(--rail-edge); }

/* the gap under the top bar, one token for every page; a page that fills the window (My work), the full-screen chart, the hidden-bar page and the financial full screen keep their own (style.css) */
@media screen { body:not(.chart-full, .bar-min, .fin-full) main:not(:has(> .wk)) { padding-top: var(--gap-frame); } }
.topbar { position: sticky; top: 0; z-index: 7; min-height: var(--h-top); display: flex; align-items: center; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); white-space: nowrap; }
@media (min-width: 641px) { .topbar { gap: var(--s5); padding: env(safe-area-inset-top, 0px) var(--s4) 0; } .topbar > * { flex: none; } .topbar nav { flex: 1 1 auto; } }
@media (max-width: 640px) { .topbar .who { min-width: 0; max-width: 100%; } }
.topbar .topbtn, .topbar .menu > summary { display: inline-flex; align-items: center; gap: var(--s2); height: var(--h-ctl); padding: 0 var(--s2); border: 0; border-radius: var(--r-ctl); background: none; color: var(--quiet); list-style: none; cursor: pointer; }
.topbar .search, .topbar #topsearch { height: var(--h-ctl); padding: 0 var(--s3); background: var(--bg); color: var(--quiet); border: 0; border-radius: var(--r-ctl); }
@media (min-width: 641px) { .topbar .search, .topbar #topsearch { width: 280px; } .topbar .usermenu .uav { display: none; } } /* the computer: the search field and the name */
@media (max-width: 640px) { .topbar #topsearch { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; } } /* the phone: a round search button, the initials */
.topbar .brand { font-weight: var(--w-bold); }
.topbar nav { min-width: 0; display: flex; gap: var(--s1); align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.topbar nav a { display: flex; align-items: center; gap: 6px; padding: 0 var(--s3); color: var(--quiet); text-decoration: none; border-radius: 0; box-shadow: none; }
.topbar nav a:hover { color: var(--ink); text-decoration: none; background: var(--sunk); }
.topbar nav a[aria-current] { color: var(--ink); font-weight: var(--w-bold); box-shadow: inset 0 -3px 0 var(--band); }
.topbar nav a.cta { align-self: center; height: var(--h-ctl); padding: 0 var(--s3); border: 1px solid var(--accent-line); border-radius: var(--r-ctl); background: var(--selected); color: var(--band); font-weight: var(--w-bold); }
.topbar nav a.cta:hover { background: var(--selected); border-color: var(--accent); }
.topbar .who { display: flex; align-items: center; gap: var(--s2); }
.topbar .menu > summary::-webkit-details-marker { display: none; }
.topbar .topbtn:hover, .topbar .menu > summary:hover { background: var(--sunk); color: var(--ink); }
.topbar .topbtn svg { width: 18px; height: 18px; flex: none; }
.topbar #topsearch kbd { margin-left: auto; font: inherit; font-size: var(--t-sm); }
/* the search: a real field in the top bar; its results drop down under it, over the page (no pop-up, no dimmed page; his ask 2026-10-26) */
.topbar #topsearch { display: inline-flex; align-items: center; gap: var(--s2); cursor: text; }
.topbar #topsearch .tsbtn { display: inline-flex; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.topbar #topsearch .tsbtn svg { width: 18px; height: 18px; }
.topbar #topsearch input.tsq { flex: 1 1 auto; min-width: 0; width: auto; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; outline: none; box-shadow: none; }
.topbar #topsearch input.tsq::placeholder { color: var(--quiet); opacity: 1; }
.topbar #topsearch:focus-within { background: var(--surface); box-shadow: var(--focus); }
.topbar #topsearch:focus-within kbd { display: none; }
@media (max-width: 640px) { .topbar #topsearch .tsbtn { width: 100%; height: 100%; } }
.topbar.compact #topsearch { width: auto; background: none; }
.topbar.compact :is(.brand .org, .tsq, kbd) { display: none; } /* a narrow window: room for the tabs first */
.topbar .usermenu > summary { color: var(--ink); font-weight: var(--w-bold); }
.topbar .usermenu .uname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu { position: relative; }
.topbar .menu-list { position: absolute; top: calc(100% + 4px); right: 0; left: auto; z-index: 9; min-width: 220px; display: flex; flex-direction: column; gap: 2px; padding: var(--s1); background: var(--surface); border: 0; border-radius: var(--r-card); box-shadow: var(--sh-over); white-space: normal; }
.topbar .menu-list :is(a, button) { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); text-align: left; text-decoration: none; cursor: pointer; }
.topbar .menu-list :is(a, button):hover { background: var(--sunk); text-decoration: none; }
.topbar .menu-list a.on { font-weight: var(--w-bold); }
.topbar .menu-list .hint { padding: var(--s1) 10px var(--s2); }
.topbar .menu-list .menu-group { padding: var(--s2) 10px 2px; border-top: 1px solid var(--line); margin-top: var(--s1); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.topbar .menu-list .menu-group:first-child { border-top: 0; margin-top: 0; }
.topbar .menu-list .thememenu svg { width: 16px; height: 16px; flex: none; }
body.chart-full .topbar, body.bar-min:not(.chart-full) .topbar { display: none; }
/* tabs that do not fit even without the practice name: a second row under the name */
.topbar.navrow { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: calc(6px + env(safe-area-inset-top, 0)); }
.topbar.navrow .brand { flex: 1; }
.topbar.navrow nav { order: 3; flex-basis: 100%; min-height: 40px; flex-wrap: wrap; } /* on its own row, a bar of many tabs (Admin) wraps to a second line rather than clip one */
/* laptops (641-1279 px): the app's name alone, tighter tabs, so every tab stays in view */
@media (min-width: 641px) and (max-width: 1279px) {
  .topbar { gap: var(--s3); padding: 0 var(--s3); }
  .topbar .brand .org { display: none; }
  .topbar nav a { padding: 0 var(--s2); }
}
/* phones (B-336, his report 2026-10-12 "Header takes up too much screen real estate"): the bar is ONE row that stays at the top. The
   app's own tabs (on the Chart app: the open patients) slide sideways beside the search, tools and account buttons; the app's name shows
   only where the bottom bar does not already say which app this is; Hub is under More. */
@media (max-width: 640px) {
  .topbar { flex-wrap: nowrap; gap: var(--s1); min-height: 0; padding: calc(var(--s1) + env(safe-area-inset-top, 0px)) var(--s1) var(--s1) var(--s3); }
  .topbar .brand { flex: 0 1 auto; max-width: 34vw; }
  .topbar:is(.tool-work, .tool-patient, .tool-referrals, .tool-spruce, .tool-evals, .tool-chart) .brand, .topbar .hublink, .topbar nav a.cta { display: none; } /* the round + button is the phone's New referral */
  .topbar nav { order: 0; flex: 1 1 0; min-width: 0; margin: 0; padding: 0; }
  .topbar nav a { flex: none; padding: 0 var(--s2); font-size: var(--t-sm); }
  .topbar.tool-chart nav a { max-width: 168px; }
  .topbar:has(> .tl-for) { flex-wrap: wrap; } .topbar:has(> .tl-for) nav { order: 3; flex: 1 1 100%; } /* Tools: For: (whose chart) takes the row's room, so the tools' tabs keep a row of their own */
  .topbar .who { flex: none; gap: 0; margin-left: auto; }
  .topbar.tool-schedule { flex-wrap: wrap; } .topbar.tool-schedule nav { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; } /* the Scheduler's three tabs have a row of their own, whole (they were cut to "Wait" and "Remi") */
  .mms-booked { min-width: 0; } .mms-booked .mms-bk-act { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; } .mms-booked .mms-bk-act button { white-space: normal; text-align: left; max-width: 100%; } /* a long button wraps instead of making the page wider than the screen */
  .botnav { padding: 2px 0 calc(2px + env(safe-area-inset-bottom, 0px)); } .botnav :is(a, button) { min-height: 48px; } /* the bottom bar: 52 px, each app still a full thumb */
}

.sp-edge .sp-tab, .sp-edge > button, .sp-edge > a { width: 30px; min-height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); padding: var(--s2) 0; background: var(--band); color: var(--on-band); border: 0; border-radius: var(--r-card) 0 0 var(--r-card); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); box-shadow: var(--sh-lift); cursor: pointer; }
.sp-edge > a, .sp-edge > button:not(.sp-tab) { writing-mode: vertical-rl; transform: rotate(180deg); }
.sp-edge .sp-tab:hover, .sp-edge > button:hover, .sp-edge > a:hover { background: var(--band-hover); }
.sp-edge .sp-tab.on { background: var(--band-hover); box-shadow: inset 3px 0 0 var(--rail-edge), var(--sh-lift); }
.sp-tab .sp-ar { font-size: var(--t-md); line-height: 1; }
.sp-tab .sp-lb { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.sp-tab .sp-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-round); background: rgba(255,255,255,.18); color: var(--on-band); font-size: var(--t-xs); line-height: 20px; text-align: center; }

#toast { position: fixed; bottom: 22px; left: 50%; z-index: 1250; transform: translateX(-50%); width: max-content; max-width: 90vw; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--ink); color: var(--on-band); border-radius: var(--r-card); box-shadow: var(--sh-over); font-size: var(--t-md); line-height: var(--lh-md); opacity: 0; transition: opacity .2s; pointer-events: none; } /* 1250: "Saved", "Faxed" show above the Right panel (1150), a pop-up over it (1165), the full document (1170) and the Spruce panel (1200); under the menus (1290+) */
#toast.show { opacity: 1; }
#toast.act { pointer-events: auto; }
#toast.err { background: var(--urgent); }
#toast .ms { font-size: 20px; flex-shrink: 0; }
#toast .toastbtn { margin-left: var(--s2); padding: 0; border: 0; background: none; color: var(--on-band); font-weight: var(--w-bold); text-decoration: underline; cursor: pointer; }
.wl-head { align-items: center; gap: var(--s1) var(--s3); font-size: var(--t-md); line-height: var(--lh-md); }
.wk-sent { font-size: var(--t-md); line-height: var(--lh-md); } /* the summary is one sentence: it wraps as words, never as columns */
/* the page summary line's jumps are words, not underlined links: they underline on hover */
:is(.wk-sent, .wk-morn, .hm-sent) a { color: inherit; text-decoration: none; }
:is(.wk-sent, .wk-morn, .hm-sent) a:hover { text-decoration: underline; }
.hm-hello > b { font-size: var(--t-name); line-height: var(--lh-name); font-weight: var(--w-bold); } /* Home's greeting is the page title */
.modal-bg.over-sp { z-index: 1165; } /* a pop-up opened from the Right panel: above the panel (1150) and its edge tabs (1155, pinned 1160) */
.modal { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-over); overflow: auto; padding: 0 var(--s4) var(--s4); } /* auto: a long pop-up scrolls; the corners still clip */
.modal > header { position: sticky; top: 0; z-index: 2; margin: 0 calc(-1 * var(--s4)) var(--s3); } /* the title band runs edge to edge and stays in view */
.modal > header h2 { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: inherit; }
.modal > header { height: var(--h-band); background: var(--band); color: var(--on-band); display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s1) 0 var(--s4); font-weight: var(--w-bold); }
.askbar { display: flex; gap: var(--s2); align-items: center; padding: var(--s2); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-over); }
.askbar > .actions { align-self: stretch; justify-content: flex-end; } /* Cancel and the answer sit at the bottom right of the question (a centred column left them in the middle) */

/* ───────── 2b. Headings and quiet text: their type only (spacing belongs to each part) ───────── */
main h1 { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); }
main h2 { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
main h3 { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.hint, .sub { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }

/* ───────── 4. Title bands ─────────
   Band 1 (blue) = the top level of work: list sections, chart cards, item cards, pop-up headers.
   Light band (section 13) = Home panels, Admin sections, Right-panel header.
   Band 2 (slate) = a group inside a card or table. All fold (+/−) on click, remembered per person. One height each. */
main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cl-b > h3, .cardhead, .pp-ph, .set-sec > h2.first {
  display: flex; align-items: center; gap: var(--s2); height: var(--h-band); margin: 0; padding: 0 var(--s2) 0 var(--s1);
  background: var(--band); color: var(--on-band); border-radius: var(--r-card) var(--r-card) 0 0;
  font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); box-shadow: none; cursor: pointer; user-select: none; }
[data-folded] > header, main .wk-sechrow:has(> .wk-sech[aria-expanded="false"]) { border-radius: var(--r-card); }
main .wk-sech .wk-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-round); background: rgba(255,255,255,.18); color: var(--on-band); font-size: var(--t-xs); line-height: 20px; text-align: center; }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) :is(a, button.link) { flex: none; white-space: nowrap; color: var(--on-band); font-size: var(--t-sm); font-weight: var(--w-bold); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) :is(button.secondary, button.primary, button.quiet, select) {
  width: auto; flex: none; white-space: nowrap; height: var(--h-ctl-sm); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--on-band);
  background-color: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.55); border-radius: var(--r-ctl); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) :is(button.secondary, button.primary, button.quiet) { padding: 0 10px; } /* a drop-down on a band keeps its own padding (room for its arrow) */
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) select { padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--on-band) 50%), linear-gradient(-45deg, transparent 50%, var(--on-band) 50%); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) select option { color: var(--ink); background: var(--surface); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) :is(button, select):hover { background-color: rgba(255,255,255,.16); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) :is(button.icon) { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--on-band); border-radius: var(--r-ctl); display: grid; place-items: center; }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cardhead, .pp-ph) :is(button.icon):hover { background: rgba(255,255,255,.14); }
/* a list section's band: the whole row is the band; the button inside it folds (+/−) and carries the title, the quiet words and the count */
main .wk-sec { margin-bottom: var(--s3); }
/* a folded card or Home pane shows its band only (the one hub-wide fold rule, core.js) */
.ov2-card.shut > :not(header), .hm-pane.shut > :not(.hm-ph) { display: none; }
/* a fold's details (How Autumn got there, How we got here, More on this chart) go with their card's band: core.js howSay marks them (B-427) */
.how-body[data-howshut] { display: none; }
.ov2-card > header:not(.pc-head) { cursor: pointer; }
.hm-ph :is(.cf-fold, .pc-fold) { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; padding: 0; margin-right: var(--s1); border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-weight: var(--w-bold); }
.hm-ph :is(.cf-fold, .pc-fold):hover { background: rgba(26,31,38,.08); }
/* Spruce: an internal note is written in the sticky-note yellow, as Spruce's own internal notes are (his ask 2026-10-07): the whole writing
   area, the box and the Internal note tab, so a note to the team never looks like a text to the patient */
:is(body, .sp, .spx-dock) .msg-send.internal { background: var(--sticky); border-top-color: var(--note-line); }
.msg-send.internal textarea { background: color-mix(in srgb, var(--sticky) 45%, var(--surface)); border-color: var(--note-line); }
.msg-new { display: inline-block; margin-right: var(--s2); font-size: 11px; font-weight: 600; color: var(--pf-amber); } /* a patient message drawn after the first keystroke of a reply: that reply never answers it (his pick 11/02/26) */
.msg-send.internal .msg-modes button[data-mode=note].on { background: var(--note-line); color: var(--ink); }
main tr.row.wk-handled > td { color: var(--quiet); } /* Last 24 hours: came in and already handled, faded (his pick 2026-10-07) */
main tr.row.wk-handled b { font-weight: var(--w-reg); }
/* My Worklist: an item's priority (B-229a step 2): the pill's own colours (Stat red, High amber, Routine grey) on a small button before the item's line */
main table.wk-t button.wk-prio { min-height: 0; margin-right: var(--s2); vertical-align: 1px; cursor: pointer; font-family: inherit; box-shadow: none; }
main table.wk-t button.wk-prio:hover { filter: brightness(.95); }
.hm-fx .tm { flex: none; width: 7.5em; padding-top: 2px; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); font-variant-numeric: tabular-nums; } /* Home → Last 24 hours: when it came in */
main .wk-sech { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; gap: var(--s2); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
main .wk-sech h2 { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--on-band); white-space: nowrap; }
main .wk-sech .hint { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-reg); color: var(--on-band-quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
main .wk-sech .wk-pm { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; border-radius: var(--r-ctl); font-weight: var(--w-bold); }
main .wk-sech:hover .wk-pm { background: rgba(255,255,255,.14); }
main .wk-sechrow > .wk-secsel { width: 32px; flex: none; justify-content: center; margin: 0; cursor: pointer; } /* the pick-all box sits over the rows' tick boxes */
main .wk-grip { flex: none; width: 16px; color: var(--on-band-quiet); cursor: grab; text-align: center; }
main tr.pc-sech > td { display: table-cell; height: var(--h-band); padding: 0 var(--s2) 0 var(--s1); border: 0; vertical-align: middle; } /* stays a table cell, so the band spans the table */
main tr.pc-sech > td > .wk-sech { height: var(--h-band); }
main tbody.pc-sec + tbody.pc-sec > tr.pc-sech > td { border-top: var(--s3) solid var(--bg); background-clip: padding-box; }
@media (max-width: 640px) { main .cards tbody.pc-sec + tbody.pc-sec > tr.pc-sech > td { border-top: 0; margin-top: var(--s3); } } /* the phone's cards: the band is a block of its own height, so the gap between sections is a margin, never a border inside the band (it pushed the band onto the card below) */
@media (max-width: 640px) { main .wk-sechrow:has(> .cp-choose) { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: 0; } main .wk-sechrow:has(> .cp-choose) > .wk-sech { height: auto; min-height: var(--h-band); } main .wk-sechrow > .cp-choose { margin-left: auto; } } /* Clinic prep on a phone: "Choose what I see" wraps under the day's title instead of sitting on it (full review B11); the fold button keeps the band's own height, so it stays a finger-sized target when the row wraps (pre-ship screen check) */
label.check:has(> .cb-note) { display: flex; flex-wrap: wrap; align-items: center; row-gap: 0; width: 100%; } label.check > .cb-note { flex: 1 1 100%; margin: 2px 0 10px 26px; } /* a login's tick keeps its short label; the paragraph about it sits on a line of its own under it, indented to the label's text and still inside the label, so it moves with it (full review D24) */
/* the hub's own band controls: the fold sign on the left (.cf-fold, .pc-fold), and its older fold and arrange buttons, drawn as band icons */
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) :is(.cf-fold, .pc-fold) { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--on-band); font-weight: var(--w-bold); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) button:is(.sec-cust, .quiet.small:not(.link)) { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--on-band); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) :is(.cf-fold, .pc-fold, .sec-cust):hover { background: rgba(255,255,255,.14); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) > b { font-weight: var(--w-bold); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: var(--s2); border-radius: var(--r-round); background: rgba(255,255,255,.18); color: var(--on-band); font-size: var(--t-xs); line-height: 20px; vertical-align: middle; }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) > :is(a:last-child, button.link) { margin-left: auto; }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) :is(.hint, .sub) { color: var(--on-band-quiet); font-weight: var(--w-reg); }
.pc-card > header, .ov2-card > header:not(.pc-head):has(.pill, .pc-hm) { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: var(--s1); row-gap: var(--s1); } /* a band carrying status chips grows when they wrap in a narrow pane, never spills */
/* the case header in three zones (B-295, his approved design 2026-10-11): name · chips (they wrap inside their zone) · controls pinned
   right on the first line; a phone puts the chips on their own line under the name */
.pc-card > header.pc-head { flex-wrap: nowrap; }
.pc-head > .pc-name { flex: 0 1 auto; min-width: 0; } .pc-head > .pc-trk { flex: 1 1 auto; min-width: 0; } .pc-head > .pc-hright { flex: none; margin-left: auto; }
.pc-cat { display: inline-flex; }
/* the Case card, the record (B-292): on the left of the steps in the focus screen (one column in a narrow pane); inside an open case on
   the chart, where the key line is only the folded summary */
.fx-pcgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } @container (max-width: 760px) { .fx-pcgrid { grid-template-columns: minmax(0, 1fr); } }
.pc-hasrec:not(.pc-min) > .pc-codeline { display: none; } .pc-card > .pcr { box-shadow: none; border-radius: 0; margin: 0; }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) :is(summary.pc-prichip:not(.stat), .menu > summary.quiet) { height: var(--h-ctl-sm); display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid rgba(255,255,255,.55); border-radius: var(--r-ctl); background: rgba(255,255,255,.08); color: var(--on-band); font-size: var(--t-sm); font-weight: var(--w-bold); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cl-b > h3, .cardhead, .pp-ph) select { width: auto; height: var(--h-ctl-sm); min-height: 0; padding: 0 28px 0 var(--s2); font-size: var(--t-sm); line-height: var(--lh-sm); } /* a drop-down on a band: small, its words clear of the arrow */
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) summary.pc-prichip.stat { height: var(--h-ctl-sm); display: inline-flex; align-items: center; padding: 0 10px; border: 0; border-radius: var(--r-ctl); background: var(--urgent-bg); color: var(--urgent); font-size: var(--t-sm); font-weight: var(--w-bold); }
:is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .modal > header, .cl-b > h3, .cardhead, .pp-ph) .pc-mn { color: var(--on-band-quiet); font-size: var(--t-sm); }
/* pills keep their own tint on the band */

/* ───────── 5. Lists ───────── */
:is(table.wl, .tablewrap.cards > table) { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 0 0 var(--r-card) var(--r-card); box-shadow: var(--sh-lift); } /* no clipping: the column heads stay sticky while the page scrolls */
main .wk-sech + :is(table.wl, .tablewrap.cards > table) { margin-top: 0; }
:is(table.wl, .tablewrap.cards > table):not(.wk-sechrow + .tablewrap > table) { border-radius: var(--r-card); } /* a list with no band above it: all four corners */
:is(table.wl, .tablewrap.cards > table):not(.wk-sechrow + .tablewrap > table) > thead > tr:first-child > th:first-child { border-top-left-radius: var(--r-card); }
:is(table.wl, .tablewrap.cards > table):not(.wk-sechrow + .tablewrap > table) > thead > tr:first-child > th:last-child { border-top-right-radius: var(--r-card); }
:is(table.wl, .tablewrap.cards > table) thead tr { height: var(--h-colhead); background: var(--sunk); }
:is(table.wl, .tablewrap.cards > table) thead th { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); text-align: left; padding: 0 var(--s3); border-bottom: 1px solid var(--line); }
@media (min-width: 641px) { /* a table row; on the phone a row is a card (display: grid): its content sets the height and its cells keep the card's own spacing */
  main tr.row { height: var(--h-row); }
  main tr.row > td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; } }
main tr.row > td { font-size: var(--t-md); line-height: var(--lh-md); }
main tr.row:hover > td { background: var(--sunk); }
main tr.row[aria-selected="true"] > td { background: var(--selected); }
main tr.row[aria-selected="true"] > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.mon-fail .sub { display: block; } /* the Practice monitor's What failed: the reason on its own line, never run into what failed (B-366) */
main tr.row .sub { display: block; margin: 0; } /* two-line rows: the second line always on its own line (the narrow list hides it in its own part) */ /* second line: never cut with … where it matters */
main td.more { width: 132px; text-align: right; white-space: nowrap; padding-right: var(--s2); }
main td.more > * { vertical-align: middle; margin-left: var(--s1); }
main td.more > .primary, main td.more > .secondary { height: var(--h-ctl-sm); padding: 0 10px; font-size: var(--t-sm); }
main td.more .wk-more, main td.more .rowmore { width: 28px; height: 28px; display: inline-grid; place-items: center; cursor: pointer; border: 0; background: none; color: var(--quiet); border-radius: var(--r-ctl); font-size: var(--t-md); font-weight: var(--w-bold); padding: 0; list-style: none; }
main td.more .wk-more:hover, main td.more .rowmore:hover { background: var(--line); color: var(--ink); }
main td.sel { width: 40px; } main td.sel input { width: 16px; height: 16px; accent-color: var(--accent); }
@media (pointer: coarse) { main td.sel input { width: 22px; height: 22px; } } /* a finger needs a bigger tick (phone pass 2026-10-08) */
/* 5a. A list in sections draws one table per section, and a table sizes its columns by what it holds: the same column stood at a
   different place in each section. So a section's table takes its widths from the standard widths of the parts of a row (the head of
   each column carries its part, as its cells do), never from its rows; the main column ("What to do", "Task", "Message") takes the
   rest. A button label too long for the buttons column wraps inside its button. The Columns tool's own widths (set the same on every
   section) still apply; the narrow list beside an open item (5b) and the phone's cards are not laid out as tables. */
@media (min-width: 641px) {
  .wk-sec table.wk-t { table-layout: fixed; }
  .wk-sec table.wk-t :is(th, td).sel { width: var(--w-col-sel); }
  .wk-sec table.wk-t :is(th, td).title { width: var(--w-col-name); }
  .wk-sec table.wk-t :is(th, td).wk-for { width: var(--w-col-for); }
  .wk-sec table.wk-t :is(th, td):is(.wk-when, .wk-visit) { width: var(--w-col-when); }
  .wk-sec table.wk-t :is(th, td):is(.x, .wk-cat) { width: var(--w-col-extra); }
  .wk-sec table.wk-t :is(th, td).more { width: var(--w-col-act); }
  /* Detailed (extra columns shown, counted by the Columns tool in data-tcx): the extras and the name and date columns share what is left,
     so the main column keeps its room (it went to nothing, one letter a line, when four extras sat at their usual 12% each) */
  .wk-sec table.wk-t:is([data-tcx="2"], [data-tcx="3"], [data-tcx="4"], [data-tcx="5"], [data-tcx="6"], [data-tcx="7"], [data-tcx="8"], [data-tcx="9"], [data-tcx="10"], [data-tcx="11"]) { --w-col-name: 18%; --w-col-when: 10%; }
  .wk-sec table.wk-t[data-tcx="3"] { --w-col-extra: 10%; }
  .wk-sec table.wk-t[data-tcx="4"] { --w-col-extra: 7.5%; }
  .wk-sec table.wk-t[data-tcx="5"] { --w-col-extra: 6%; }
  .wk-sec table.wk-t:is([data-tcx="6"], [data-tcx="7"], [data-tcx="8"], [data-tcx="9"], [data-tcx="10"], [data-tcx="11"]) { --w-col-extra: 4%; }
  .wk-sec table.wk-t tr.row > td { overflow-wrap: anywhere; }
  .wk-sec table.wk-t tr.row > td:not(.more) :is(.st, button.link) { height: auto; white-space: normal; text-align: left; } /* a status or a "+ 3 more" wraps in its column */
  .wk-sec table.wk-t td.more > :is(button, a):not(.wk-more, .rowmore) { max-width: calc(100% - 2 * var(--s1) - 28px); height: auto; min-height: var(--h-ctl-sm); padding-block: 3px; line-height: var(--lh-sm); white-space: normal; overflow-wrap: normal; } /* room for ⋯ (28px) and the two gaps */
}
main :is(.ls-wait, .ls-missed, .ws-wait).missed, main .ls-missed { color: var(--late); font-weight: var(--w-bold); } /* a same-day call missed: amber, said once (red is for an emergency being handled) */
.seg.lv-scope, .seg { height: var(--h-ctl); padding: 2px; gap: 2px; background: var(--band-2); border-radius: var(--r-ctl); }
.seg > * { height: calc(var(--h-ctl) - 4px); padding: 0 var(--s3); border: 0; border-radius: 3px; background: none; color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-bold); white-space: nowrap; } /* a one-line button: a wrapped label is cut off */
.seg > [aria-pressed="true"], .seg > .on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-lift); }
.seg.wraps { display: inline-flex; flex-wrap: wrap; height: auto; max-width: 100%; } /* a switch with many choices hugs its buttons and wraps to a second row, never runs off a phone */
@media (pointer: coarse), (max-width: 640px) { .seg.lv-scope, .seg { height: auto; min-height: var(--h-ctl); } } /* its buttons are finger-sized on a touch screen (the older sheet): the track holds them, so the labels sit in the middle (B-405); a narrow window on a computer gets the same (its buttons are 32 px too), so the track never cuts them */
.seg.cz-tabs { display: flex; flex-wrap: wrap; height: auto; }
.seg.cz-tabs { margin: var(--s2) 0; } /* Clinic prep's kinds of visit in Choose what I see (B-302) */
/* the column resize grip: shows only while the pointer is on the column heads */
.tc-grip::after { background: transparent; }
thead:hover .tc-grip::after { background: var(--line-strong); }
.tc-grip:hover::after, .tc-dragging .tc-grip:active::after { background: var(--accent); }
[data-fbtoggle] { height: var(--h-ctl); padding: 0 var(--s3); border: 1px solid transparent; background: none; border-radius: var(--r-ctl); font-weight: var(--w-bold); color: var(--ink); }
[data-fbtoggle]:hover { background: var(--line); }
.empty { padding: var(--s5) var(--s4); text-align: center; color: var(--quiet); background: var(--surface); }

/* ───────── 5b. The list beside an open item (1c): two slim lines per row, no columns; the open row is selected ───────── */
:is(main.with-drawer, .spa.split) table.wk-t thead { display: none; }
:is(main.with-drawer, .spa.split) table.wk-t, :is(main.with-drawer, .spa.split) table.wk-t tbody { display: block; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); cursor: pointer; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row:last-child { border-bottom: 0; }
:is(main.with-drawer, .spa.split) table.wk-t :is(tr.pc-sech, tr.pc-sech > td) { display: block; width: auto !important; max-width: none; }
:is(main.with-drawer, .spa.split) table.wk-t :is(.pc-pri, .pill) { display: inline-flex; width: auto; } /* a label stays a label in the narrow list */
:is(main.with-drawer, .spa.split) table.wk-t tbody.pc-sec + tbody.pc-sec > tr.pc-sech > td { border-top: 0; margin-top: var(--s3); } /* the gap between sections, without squashing the band */ /* a section band spans the narrow list too; !important beats the Columns tool's inline cell widths */
:is(main.with-drawer, .spa.split) table.wk-t tr.row > td { display: block; min-width: 0; width: auto !important; max-width: none; padding: 0; border: 0; position: static; background: transparent; box-shadow: none; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row > :is(td.sel, td.wk-for) { display: none; }
/* the row's one main button (or whose it waits on) stays, small, at the right under the When (his placement 2026-10-12); the ⋯ menu and any
   second button are in the wide list. A row with a main button keeps its second line to the left of it; in a list narrower than 400px (a
   smaller screen) the button goes on its own line at the right under it, so the name and the second line keep their room. */
:is(main.with-drawer, .spa.split) table.wk-t { container-type: inline-size; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row > td.more { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px; text-align: right; white-space: nowrap; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row > td.more > :is(.wk-more, .rowmore, * + *) { display: none; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row > td.more > :first-child { margin: 0; max-width: none; height: var(--h-ctl-sm); min-height: 0; padding-block: 0; white-space: nowrap; }
:is(main.with-drawer, .spa.split) table.wk-t tr.row:has(> td.more > :first-child:not(.wk-more, .rowmore)) > td.wk-what { grid-column: 1; }
@container (max-width: 400px) {
  :is(main.with-drawer, .spa.split) table.wk-t tr.row > td.more { grid-column: 1 / -1; grid-row: 3; margin-top: var(--s1); }
  :is(main.with-drawer, .spa.split) table.wk-t tr.row:has(> td.more > :first-child:not(.wk-more, .rowmore)) > td.wk-what { grid-column: 1 / -1; } }
:is(main.with-drawer, .spa.split) table.wk-t td.title { grid-column: 1; grid-row: 1; font-weight: var(--w-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(main.with-drawer, .spa.split) table.wk-t td.title .sub { display: none; }
:is(main.with-drawer, .spa.split) table.wk-t td.title .sub.prio-why:not(.hidden) { display: block; }
@media (min-width: 641px) { table.wk-t:not(.wk-sec table) td.wk-when { white-space: nowrap; } } /* the When column on one line (moved from style.css); in a list in sections it keeps its standard width (5a) and wraps; on the phone's cards it wraps under its row */
/* The Checks Missed list beside an open item: each row is the check's name with Log at its right, then the office, then what happened under it, all wrapping inside the card (the status never runs past the card's edge) */
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t tbody > tr:last-child { border-bottom: 0; }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t td { display: block; min-width: 0; width: auto; padding: 0; border: 0; background: transparent; }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t td.title { grid-column: 1; grid-row: 1; }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t td.wk-what { grid-column: 1; grid-row: 2; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t td.wk-when { grid-column: 1; grid-row: 3; }
:is(main.with-drawer, .spa.split) .ck-missed table.wk-t td.more { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: auto; }
.ck-missed table.wk-t td.wk-when .st { white-space: normal; height: auto; text-align: left; }
:is(main.with-drawer, .spa.split) table.wk-t td.wk-when { grid-column: 2; grid-row: 1; font-size: var(--t-sm); line-height: var(--lh-sm); }
:is(main.with-drawer, .spa.split) table.wk-t td.wk-what { grid-column: 1 / -1; grid-row: 2; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); white-space: normal; }
:is(main.with-drawer, .spa.split) table.wk-t td.wk-what .sub { display: none; }
main.with-drawer table.pc-one tr.row > td.wk-what .sub { margin-left: var(--s2); } /* Procedures and Orders show the next step on the same line: keep the space */
:is(main.with-drawer, .spa.split) table.wk-t tr.row:hover { background: var(--sunk); }
:is(main.with-drawer, .spa.split) table.wk-t tr.row:is(.open, .on, [aria-selected="true"]) { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }

/* ───────── 6. Item screens (list left, item right) ───────── */
/* .fx-top (the Summary | All details switch) keeps the hub's own place: top right in both views; the switch itself is a .seg */
.fx-head { gap: var(--s3); align-items: start; padding: var(--pad-item) var(--s4); background: var(--surface); }
.fx-next, .hx-next { align-items: center; gap: var(--s3); padding: var(--pad-next) var(--s4); background: var(--sunk); border-top: 1px solid var(--line); }
.fx-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }

/* ───────── 7. Chart ───────── */
/* the chart's top card holds the header row, the Details band and the toolbar */
.pp-top { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.pp-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-head) var(--s3); margin: 0; padding: var(--pad-head) var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0; }
.pp-av { width: var(--h-av); height: var(--h-av); flex: none; display: grid; place-items: center; border-radius: var(--r-round); background: var(--band); color: var(--on-band); font-size: var(--t-sm); font-weight: var(--w-bold); }
.pp-id h1 { font-size: var(--t-name); line-height: var(--lh-name); font-weight: var(--w-bold); color: var(--ink); }
.pp-id h1 .pp-r1 { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-reg); color: var(--quiet); }
.pp-sub { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
/* B-473: the dot between the items of the header's two lines is drawn in front of the item after it; on a phone the lines wrap, so there the dots go and a gap
   separates the items (a wrapped line never starts with a "·") */
.pp-it + .pp-it::before, .pp-subt + .pp-procw::before { content: "\00B7"; margin: 0 6px; color: var(--muted); }
/* B-450, B-473: on a phone the header's second line is one line: team, Procedures: N, then insurance and next visit; only the last two are ever cut */
@media (max-width: 640px) {
  .pp-head:not(.pp-more) .pp-sub { display: flex; flex-wrap: nowrap; align-items: baseline; column-gap: var(--s3); margin-top: 4px; white-space: nowrap; } /* 2 px more than the old sheet: the number above stays off the Team link's tap area */
  .pp-head:not(.pp-more) .pp-sub .pp-subt { display: contents; }
  .pp-head:not(.pp-more) .pp-sub > .pp-procw { flex: none; order: 1; }
  .pp-head:not(.pp-more) .pp-sub .pp-it { order: 2; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pp-head:not(.pp-more) .pp-sub .pp-it:last-child { flex-shrink: 8; } /* the next visit gives way first, the insurance after it */
  .pp-head:not(.pp-more) .pp-sub .pp-it:has(> .pp-teamlink) { order: 0; flex: none; overflow: visible; } /* one line: team and Procedures: N always show; insurance and next visit follow and are cut with ... only when the line is full */
  .pp-head .pp-id h1 .pp-r1 { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s3); }
  .pp-it + .pp-it::before, .pp-subt + .pp-procw::before { content: none; }
}
.ppname { border-bottom: 0; }
.ppname.pp-here { cursor: auto; } /* the Chart app's own name: this chart is already open, so it is the name, not a button (B-336: a tap did nothing) */
.pp-head.pp-min .pp-id h1 { font-size: var(--t-md); line-height: var(--lh-md); }
/* the chart's header on a phone (B-336: "Header takes up too much screen real estate"): the name, then age, sex, birth date and phone,
   then team, insurance and next visit on one line, without the round initials; a flag line holding only "Flags ✎" and an empty sticky
   note's "+ Sticky note" open with Details ▾ (a flag, an allergy or a written note always shows). The section strip under it is 40 px. */
@media (max-width: 640px) {
  .pp-head { padding: var(--s2) var(--s3); row-gap: 0; }
  .pp-head .pp-av { display: none; } .pp-pwho .pp-av { width: 24px; height: 24px; font-size: var(--t-xs); } /* the name line pinned once the header scrolls away: small initials (they were 44 px) */
  .pp-head .pp-id h1 .pp-r1 { margin-top: 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
  .pp-head .pp-alerts { margin-top: var(--s1); }
  .pp-head:not(.pp-more) .pp-alerts:not(:has(> :not(.pf-edit))), .pp:not(.pp-details) .pp-sticky.sk-none { display: none; }
  .pp .pp-menu .pp-mact { margin: 0; }
  .pp .pp-menu :is(.pp-msec, .pp-mact > summary) { min-height: 40px; }
}
/* the chart's flags (B-303, his designs 2026-10-04 and 2026-10-11): small chips under the name, in the name's column (the header's
   buttons stay at the right), each in the practice's colour; a click or a tap opens its explanation and notes in place; Autumn's suggestion is dashed until someone adds or
   dismisses it */
.pflag { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--s2); border: 0; border-radius: var(--r-ctl); font: var(--w-bold) var(--t-sm)/1 var(--font); white-space: nowrap; }
button.pflag { cursor: pointer; }
.pf-red { color: var(--pf-red); background: var(--pf-red-bg); } .pf-amber { color: var(--pf-amber); background: var(--pf-amber-bg); }
.pf-blue { color: var(--pf-blue); background: var(--pf-blue-bg); } .pf-green { color: var(--pf-green); background: var(--pf-green-bg); }
.pf-purple { color: var(--pf-purple); background: var(--pf-purple-bg); } .pf-grey { color: var(--pf-grey); background: var(--pf-grey-bg); }
button.pflag[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--line-strong); }
.pflag .pf-n { margin-left: var(--s1); font-weight: var(--w-reg); }
.pflag .pf-n::before { content: "\00B7\00A0"; }
.pf-sugm > summary.pf-sug { height: 22px; padding: 0 var(--s2); border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); background: none; color: var(--quiet); font-weight: var(--w-reg); list-style: none; cursor: pointer; }
.pf-sugm > summary.pf-sug::-webkit-details-marker { display: none; }
.pf-sug .pf-who { margin-left: var(--s1); font-size: var(--t-xs); }
.pf-sugm .menu-list { min-width: 240px; }
/* the red emergency chip (Not an emergency, his ask 2026-10-24): the same pill as before, now with a small menu; the quiet line says who cleared one */
.pf-alarm > summary.pill { display: inline-flex; align-items: center; height: 22px; min-height: 22px; min-width: 0; padding: 0 9px; border: 0; border-radius: 11px; list-style: none; cursor: pointer; }
.pf-alarm > summary.pill.red, .pf-alarm > summary.pill.red:hover { background-color: var(--t-red-bg); color: var(--t-red); }
.pf-alarm .menu-list { min-width: 200px; }
@media (pointer: coarse) { .pf-alarm > summary.pill { position: relative; } .pf-alarm > summary.pill::after { content: ""; position: absolute; z-index: 2; inset: -8px -2px -14px; } } /* the chip stays 22 px; a finger reaches 44 (the Gender? and Team links above own the first pixels over it) */
.ac-line { margin: var(--s1) 0; }
.ac-note { font-weight: var(--w-reg); }
.pp-alerts .pf-edit { padding: 0; min-height: 0; height: auto; font-size: var(--t-sm); }
.pp-alerts .mflag.sn { white-space: normal; max-width: 100%; height: auto; } /* "Same name, another birthday: may be …" is a sentence: it wraps on a phone instead of running off the screen (his pick 2026-11-05) */
/* Flags ✎: the practice's flags, a note under each one ticked, the Pain agreement's dates under it */
.pf-list { display: grid; margin: var(--s3) 0; padding: 0; list-style: none; }
.pf-list > li { display: grid; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.pf-list > li > .check { display: flex; align-items: center; gap: var(--s2); }
.pf-list .pf-notein, .pf-dates { margin-left: var(--s5); width: auto; }
.pf-dates { display: grid; gap: var(--s2); }
.pf-date { display: grid; grid-template-columns: 12em 11em; align-items: center; gap: var(--s1) var(--s3); }
.pf-date > label { color: var(--quiet); font-size: var(--t-sm); }
.pf-date .pf-read { grid-column: 1 / -1; margin: 0; }
.pf-pdmp .pf-date { margin-left: var(--s5); }
@media (max-width: 640px) { .pf-date { grid-template-columns: minmax(0, 1fr); } }
/* Team and Flags open IN PLACE under the chart's header, on every tab (B-414): one card between the header and the tab, nothing over the chart */
.pp-inplace { margin: 0 0 var(--gap-frame); }
.pp-inpanel { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); scroll-margin-top: calc(var(--bar-h, var(--h-top)) + var(--pptop, 80px) + var(--pptb, var(--h-tbar)) + var(--s2)); }
.pp-inpanel > .cardhead { padding-left: var(--s4); cursor: default; }
.pp-inpanel > .cardhead h2 { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: inherit; }
.pp-inbody { padding: var(--s3) var(--s4) 0; }
.pp-inbody > .hint { margin: 0 0 var(--s3); }
.pp-inbody > .actions { margin: var(--s3) calc(-1 * var(--s4)) 0; }
.pp-inrow { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.pp-infield { flex: 1 1 18em; max-width: 32em; display: flex; align-items: center; gap: var(--s3); } .pp-infield > label { flex: none; } .pp-infield > select { flex: 1 1 auto; min-width: 0; }
/* a flag's explanation and notes, in place (B-425) */
.pf-why { margin: 0 0 var(--s3); padding-left: var(--s4); } .pf-why > li { margin: 0 0 var(--s1); }
.pf-nh { margin: 0 0 var(--s2); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.pf-notes { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.pf-nt { padding: var(--s2) 0; border-bottom: 1px solid var(--line); } .pf-nt:last-child { border-bottom: 0; }
.pf-nm { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
.pf-nx { white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-nt.is-struck .pf-nx { color: var(--quiet); }
.pf-strike { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); } .pf-strike input { flex: 1 1 12em; width: auto; }
.pf-newnote { display: grid; gap: var(--s1); } .pf-newnote textarea { width: 100%; }
.pp-inpanel .pf-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22em), 1fr)); column-gap: var(--s5); margin: 0; }
.pp-band { background: var(--sunk); border-bottom: 1px solid var(--line); }
/* the hub's Details band opened: a white card of columns with faint lines, small quiet headings */
.pp-pre > .pp-band:not(.folded) { background: var(--surface); border: 0; border-radius: var(--r-card); box-shadow: var(--sh-lift); }
/* the Details band, layout A (his pick 2026-10-08): two columns of labelled rows, at most four a side; one column on a phone */
.pp-band .bd-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s5); padding: var(--s2) var(--s4) var(--s3); }
.pp-band.folded .bd-rows { display: none; }
.pp-band .bd-rows dl { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); margin: 0; align-content: start; }
.pp-band .bd-rows dt, .pp-band .bd-rows dd { margin: 0; padding: var(--s1) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); min-width: 0; overflow-wrap: anywhere; }
.pp-band .bd-rows dt { color: var(--quiet); font-weight: var(--w-bold); padding-right: var(--s2); }
.pp-band .bd-rows dl > :nth-last-child(-n+2) { border-bottom: 0; }
.pp-band .bd-rows .m, .pp-band .bd-rows .dot { color: var(--quiet); }
.pp-band .bd-rows .link.small { padding: 0; min-height: 0; height: auto; font-size: inherit; line-height: inherit; font-weight: var(--w-reg); }
.pp-band .bd-rows .bd-clamp { display: inline; } /* the row clamps instead: three lines at most, the whole text on hover */
.pp-band .bd-rows dd { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .pp-band .bd-rows { grid-template-columns: minmax(0, 1fr); padding: var(--s2) var(--s3); } .pp-band .bd-rows dl:first-child:not(:last-child) > :nth-last-child(-n+2) { border-bottom: 1px solid var(--line); } }
.pp-pre { background: var(--sunk); border-bottom: 1px solid var(--line); } /* the hub's Details band and sticky note share one grey row */
.pp-pre > .pp-band { border-bottom: 0; background: none; }
.pp-bandtog { height: var(--h-ctl-sm); padding: 0 var(--s2); border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-size: var(--t-sm); cursor: pointer; }
.pp-bandtog:hover { background: var(--line); }
/* the Details button on the right (his ask 2026-10-08): folded, it follows the sticky note; open, ✎ and it sit together top right */
.pp .pp-pre > .pp-band.folded { order: 2; margin-left: auto; }
.pp-band .bd-acts { display: contents; }
@media (min-width: 641px) {
  .pp .pp-pre > .pp-band:not(.folded) .bd-acts { position: absolute; top: 2px; right: 0; display: flex; align-items: center; gap: var(--s1); }
  .pp .pp-pre > .pp-band:not(.folded) .bd-acts > * { position: static; }
}
.pp-sticky { flex: 1; min-height: var(--h-ctl-sm); border: 0; background: var(--sticky); border-radius: var(--r-ctl); padding: 0 var(--s2); font-size: var(--t-sm); }
/* the hub's sticky note: Clinical | Office as the switch, then the note itself on the yellow, then when it was written */
.pp-sticky.sk-clinical { background: var(--sticky-clinical); } /* Clinical green, Office yellow */
.pp-sticky .sk-tabs { display: inline-flex; flex: none; gap: 2px; padding: 2px; border: 0; background: var(--band-2); border-radius: var(--r-ctl); }
.pp-sticky .sk-tabs > button { height: 24px; padding: 0 var(--s2); border: 0; border-radius: 3px; background: none; color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-bold); box-shadow: none; }
.pp-sticky .sk-tabs > button:is(.on, [aria-selected="true"]) { background: var(--surface); color: var(--ink); box-shadow: var(--sh-lift); }
.pp-sticky .sk-ed { min-height: 0; padding: var(--s1) var(--s2); border: 0; background: transparent; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); resize: none; box-shadow: none; }
.pp-sticky .sk-ed:focus { box-shadow: none; }

.pp-menu h3 { padding: var(--s3) var(--s3) var(--s1); }
.pp-menu a { display: flex; justify-content: space-between; height: 32px; align-items: center; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--ink); }
.pp-menu a:hover { background: var(--line); text-decoration: none; }
.pp-menu a[aria-current] { background: var(--selected); color: var(--band); font-weight: var(--w-bold); box-shadow: inset 3px 0 0 var(--accent); }
.pp-menu a.empty { color: var(--quiet); background: none; padding-block: 0; text-align: left; }
.pp-toolbar { align-items: center; gap: var(--s1); padding: 0 var(--s3); background: var(--surface); border-bottom: 1px solid var(--line); }
/* the hub's toolbar follows the top card: one white card with it (header row, Details band, toolbar) */
.pp-top:has(+ :is(.pp-pre, .pp-toolbar)) { border-radius: var(--r-card) var(--r-card) 0 0; margin-bottom: 0; }
.pp-top + .pp-pre { margin: 0; border-radius: 0; }
.pp-pre:has(+ .pp-toolbar) { margin-bottom: 0; }
:is(.pp-top, .pp-pre) + .pp-toolbar { margin: 0 0 var(--gap-frame); border: 0; border-radius: 0 0 var(--r-card) var(--r-card); box-shadow: var(--sh-lift); }
.pp-toolbar > :is(button, a), .pp-toolbar .tb-more > summary { color: var(--ink); font-size: var(--t-md); font-weight: var(--w-reg); border-radius: var(--r-ctl); }
.pp-toolbar > :is(button, a):hover, .pp-toolbar .tb-more > summary:hover { background: var(--sunk); }
.pp-anwhen { color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; } /* when Autumn last read the chart, beside Analyse */
.pp-mact-an { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: var(--s1); padding-bottom: var(--s1); } .pp-mact-an .pp-anwhen { padding: var(--s1) var(--s3) 0; } /* the phone's Analyse, first in Actions: when Autumn last read the chart, then the button */
.pp-mfold { width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--quiet); line-height: 28px; text-align: center; }
.pp-mfold:hover { background: var(--line); color: var(--ink); }
.ov2-card, .pc-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); border: 0; } /* no clipping: menus in a card open past its edge */
.ov2-card > section, .pc-card > section { padding: var(--s3) var(--s4); }
.pp .tk-tab .tk-head b::before { content: "Tasks · "; } /* the chart's Tasks tab names itself, in sentence case */
.rb:not(:has(> .rb-top)) { align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--selected); color: var(--band); border-radius: var(--r-card); font-weight: var(--w-bold); }
/* the hub's referral banner: a white card; its top row (Referral, priority, assigned, Next) carries the referral bar's tint; the facts sit below in columns */
.rb:has(> .rb-top) { margin: 0 0 var(--s3); border: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.rb > .rb-top { min-height: 44px; padding: var(--s1) var(--s2) var(--s1) var(--s4); background: var(--selected); border-bottom: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.rb > .rb-top .rb-t { color: var(--band); font-weight: var(--w-bold); font-size: var(--t-md); }
.rb.rb-folded > .rb-top { border-bottom: 1px solid var(--line); }
.rb .rb-cells .rb-c, .rb .rb-cells .rb-reason { border-color: var(--line); }
.rb .rb-k { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--quiet); font-weight: var(--w-bold); }
.rb .rb-v { font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.rb .rb-s { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
:is(.rb .rb-s, .kv .sub) button.link { display: inline; height: auto; min-height: 0; padding: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; } /* a link under a value wraps in its cell (B-424: cut off at 390) */
/* Open beside (B-371, his picture 2026-10-13: the referral's card squeezed to one word per line beside its fax): the line between the
   panes moves the split, but neither pane goes under --w-pane-min; when the chart cannot give both that much, they share it evenly */
.pp-main.has-beside { grid-template-columns: minmax(min(var(--w-pane-min), 50% - 11px), var(--bsl, 1fr)) 6px minmax(min(var(--w-pane-min), 50% - 11px), var(--bsr, 1fr)); } /* 11px: half of the divider and the two gaps */
/* the Screen tab's paperwork buttons: their own row at the top right of the card, never floated beside the screen (his report
   2026-10-06: the float squeezed the verdict and everything under it into a thin column, worst with a PDF open) */
.rv-verdict .rv-b { white-space: nowrap; }

/* ───────── 8. Boxes ─────────
   No outlined boxes. A .panel is a white surface on the page; groups inside it are split by rows or a Band 2, never by another outline. */
.panel { background: var(--surface); border: 0; border-radius: var(--r-card); box-shadow: var(--sh-lift); } /* keeps its screen's own padding; no clipping, so a menu inside can open past the edge */
.panel .panel { box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); }
.panel.ws-pane { background: transparent; box-shadow: none; border-radius: 0; padding: 0; overflow: visible; } /* the referral's working pane: its sections are the cards, no box around them */
/* the hub's other boxes and tiles follow the same rule: no outline (their fill or a lift sets them off the page) */
:is(.tablewrap, .pp-menu, .hm-kpi, .hm-tr, .hm-chip, .set-sec, .mon-b, .lay-card, .lay-item, .act-tile, .act-msgline, .ws-pane, .hub-tile, .cov-item, .credp, .composer, .pp-panel, .wk-people, .views, details.ho-status, .me-card, .team-card, .fin-gate, .menu-list, .rowmenu, .spx-dock, .tk-card, details.dsec, .ord-chip) { border-color: transparent; }
.tablewrap { background: none; box-shadow: none; border-radius: 0; }
/* a table that sits on the page by itself (not in a card) is its own white card, as it was; one inside a card stays flat */
main .tablewrap:not(.cards):not(:is(.panel, .ov2-card, .pc-card, .fx-card, .modal, .sp, .hm-pane, .set-sec, .lay-card, .pp-panel, .cl-b, details.rulecard, .rb) .tablewrap) > table:not(.wl) { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.rulecard { gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); background: var(--surface); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.hm-pane { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.hm-kpi, .acc-t { border: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); padding: var(--s3) var(--s4); gap: 2px; }
.hm-kpi b { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); }
.hm-kpi .x, .hm-kpi .x b { font-size: var(--t-sm); line-height: var(--lh-sm); } /* the tile's second line: small words under the number */

/* ───────── 9. Buttons ─────────  one main action per screen; content is brighter than any button */
button.primary, a.primary, button.secondary, a.secondary, button.quiet, button.link, a.link, button.danger {
  gap: 6px; height: var(--h-ctl); padding: 0 14px;
  border-radius: var(--r-ctl); font-size: var(--t-md); line-height: 1; font-weight: var(--w-bold); cursor: pointer; white-space: nowrap; text-decoration: none; }
button.primary, a.primary { background: var(--selected); border: 1px solid var(--accent-line); color: var(--band); }
button.primary:hover, a.primary:hover { background: #dbe5f4; border-color: var(--accent); }
button.secondary, a.secondary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
button.secondary:hover, a.secondary:hover { background: var(--sunk); border-color: #aeb5c0; }
button.quiet { background: none; border: 1px solid transparent; color: var(--ink); font-weight: var(--w-reg); padding: 0 10px; }
button.quiet:hover { background: var(--line); }
button.link, a.link { background: none; border: 0; padding: 0; height: auto; color: var(--accent); }
button.link:hover, a.link:hover { text-decoration: underline; }
button.danger { background: var(--surface); border: 1px solid var(--urgent-line); color: var(--urgent); }
button.danger:hover { background: var(--urgent-bg); }
:is(button.primary, button.secondary, button.quiet, button.danger, button.link):disabled, a[aria-disabled="true"] { /* the button parts only: a disabled block (a booked visit) keeps its own look */ background: var(--sunk) !important; border-color: var(--line) !important; color: color-mix(in srgb, var(--quiet) 80%, var(--sunk)) !important; opacity: 1; cursor: not-allowed; }
button.link:disabled { background: none !important; }
button.quiet:disabled { background: none !important; border-color: transparent !important; } /* a quiet button never grows a box, even when it cannot be pressed */

/* ───────── 10. Forms ───────── */
label { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); margin-bottom: var(--s1); }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-reg); color: var(--ink); }
:where(input[type=text], input:not([type]), input[type=number], input[type=date], input[type=search], select, textarea) {
  height: var(--h-input); padding: 0 10px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); font: var(--w-reg) var(--t-md)/var(--lh-md) var(--font); color: var(--ink); }
textarea { height: auto; padding: var(--s2) 10px; resize: vertical; font-family: var(--font); }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--quiet) 50%), linear-gradient(-45deg, transparent 50%, var(--quiet) 50%); background-position: right 14px center, right 9px center; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: clip; }
::placeholder { color: var(--quiet); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #aeb5c0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 90, 160, .18); }
input:not([type=checkbox], [type=radio]):disabled, select:disabled, textarea:disabled { background: var(--sunk); color: #949ba6; } /* a tick that cannot be changed still shows it is ticked */
input[aria-invalid="true"] { border-color: var(--urgent); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); font-size: var(--t-md); }
input[type=file] { font-size: var(--t-sm); color: var(--quiet); }
input[type=file]::file-selector-button { height: var(--h-ctl); padding: 0 14px; margin-right: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: var(--w-bold) var(--t-md) var(--font); cursor: pointer; }
/* an open drop-down sits over the Right panel's edge tabs; near the right edge it opens leftward */
details.menu[open] > .menu-list { z-index: 890; }
/* a menu opened on a phone is a sheet across the bottom of the screen, above its dimmed screen (core.js puts the scrim inside the menu,
   just under the list; a tap there closes it), saying which menu it is, every item a full tap (B-336: these lived in style.css, where the
   890 above beat the sheet's 1300, so the scrim covered every phone menu) */
@media (max-width: 640px) {
  .menu-scrim { position: fixed; inset: 0; z-index: 1290; background: var(--scrim); }
  /* the chart's Sections list is the same sheet (B-336: it hung down from the section strip, 70% of the screen tall, so its last
     sections sat under the bottom bar and a tap on them opened Spruce or Clinic prep instead) */
  :is(details.menu, details)[open] > .menu-list, .pp .pp-menu.sec-open .pp-mtabs { position: fixed; left: var(--s2); right: var(--s2); top: auto; bottom: calc(72px + env(safe-area-inset-bottom)); width: auto; min-width: 0; max-height: 60vh; overflow: auto; z-index: 1300; }
  details.menu[open] > .menu-list[data-sheet]::before { content: attr(data-sheet); display: block; padding: var(--s2) 10px 6px; font-size: var(--t-sm); color: var(--quiet); border-bottom: 1px solid var(--line); margin-bottom: var(--s1); }
  .menu-list > :is(a, button), .menu-list .menu-link { min-height: 44px; display: flex; align-items: center; white-space: normal; }
  .topbar .topbtn, .menu > summary { min-height: 44px; min-width: 44px; }
  .ws-actions > details.menu > summary { display: inline-flex; align-items: center; height: var(--h-ctl); min-height: var(--h-ctl); } /* a referral card's More matches Schedule and Log attempt (it was 44 tall beside 32) */
}
.rowmenu { z-index: 1200; } /* a row's ⋯ menu (and the Right panel's More ▾) opens above what opened it: the panel is 1150 (it was 20: More ▾ opened behind the panel, 2026-10-09) */
.menu-list.menu-flip { left: auto; right: 0; }
.actions { justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }

/* ───────── 10b. Opened items sit higher and tighter (his asks 2026-11-10: "I meant sit higher"; "This section needs to be tighter") ─────────
   The item starts at the top of its pane: a lone back link is one slim line, not a card; on a computer the Summary | All details switch sits
   in the item's header, right under ⋯ ‹ › ⤢ ✕ (where the browser can place it beside them; elsewhere it keeps its own slim line).
   The state rows (Stage · Next step · Assigned to) and the forms opened in place (Log call and the others drawn by quickLogInline / inPlace)
   are tight: a narrow label column with label and value on one line, rows 24 px, form rows 6 px apart, pills and fields at the small heights,
   one thin line and 6 px above the item's buttons. A phone keeps every tap target at 32 px or more. Spacing and heights only: colours,
   words, buttons and their order stay. Lists are unchanged. Measured by scripts/sithigher-audit.mjs. */
/* above the item */
.wk-pit:has(> [data-cdlback]:only-child) { margin: 0; padding: var(--s1) 0 0; border: 0; border-radius: 0; background: none; }
.drawer-body > .fx-top { padding-top: var(--s1); padding-bottom: var(--s1); }
@supports (anchor-name: --a) and (position-anchor: --a) {
  @media (min-width: 641px) {
    .drawer-body:has(> .fx-top) { position: relative; }
    .drawer-body:has(> .fx-top) > .fx-wrap > .fx > .fx-head > .fx-acts, .drawer-body:has(> .fx-top) > .pp .pp-head > .pp-hacts { anchor-name: --fx-acts; min-width: var(--w-fxseg); padding-bottom: calc(var(--h-ctl) + var(--s1)); }
    .drawer-body > .fx-top { position: absolute; position-anchor: --fx-acts; bottom: anchor(bottom); right: anchor(right); padding: 0; z-index: 7; }
    .drawer-body > .fx-top .fx-seg { width: var(--w-fxseg); }
    .drawer-body > .fx-top .fx-seg > button { flex: 1 1 0; }
  }
}
/* an item with no header buttons to sit under (an opened task): the Summary | All details switch is its own line at the top right, not on top of the title band */
.drawer-body > .fx-top:not(:has(~ .fx-wrap > .fx > .fx-head > .fx-acts, ~ .pp .pp-head > .pp-hacts)) { position: static; display: flex; justify-content: flex-end; padding: var(--s1) var(--s3) 0; }
/* a page title in a band (Documents and policies) grows the band when it wraps on a phone, instead of spilling under the top bar */
@media (max-width: 640px) { main .cardhead:has(> h1) { height: auto; min-height: var(--h-band); } }
/* the state rows */
.fx-state { gap: 0; padding-top: 2px; }
.fx-state .fx-sl { gap: 0 var(--s2); min-height: 24px; padding-block: 1px; }
.fx-state .fx-sl :is(button.link, a.link) { height: auto; min-height: 0; padding-block: 0; line-height: inherit; }
.fx-state .fx-sk { width: var(--w-state); }
/* the form opened in place, then the item's buttons */
:is(.ql-inline, .ip-box) { padding-top: 0; margin-top: 6px; }
.fx-state .ql-inline { border-top: 0; } /* one line only, above the item's buttons */
.ql-inline { gap: 6px; }
.ql-row { gap: 6px var(--s2); }
.ql-k { width: var(--w-state); }
.ql-chips { gap: 6px; }
.chipr { margin: 0; }
.chipr > span { display: inline-flex; align-items: center; height: var(--h-ctl-sm); padding: 0 10px; }
.ql-row :is(select, input[type="text"], input[type="date"], input:not([type])) { height: var(--h-ctl); }
.ql-row select { line-height: normal; }
.ql-row .ql-chips > select { height: var(--h-ctl-sm); }
:is(.ql-row, .ip-box .actions, .fx-foot) :is(button.primary, button.secondary, button.quiet, button.link, button.danger) { height: var(--h-ctl-sm); min-height: 0; }
.qd { gap: var(--s1); margin: 0; }
.qdb { height: 22px; padding: 0 var(--s2); }
.ip-box .actions { margin-top: 6px; }
.fx-foot { flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); padding: 6px 0 0; margin: var(--s1) 0 0; border-top: 0; }
.fx-formhost:not(:empty) ~ .fx-foot { margin-top: var(--s1); padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 640px), (pointer: coarse) {
  .chipr > span { height: 32px; padding: 0 12px; }
  .ql-row :is(select, input[type="text"], input[type="date"], input:not([type])) { height: 32px; }
  .qdb { height: 32px; }
  .ql-row .ql-chips > select { height: 32px; }
  :is(.ql-row, .ip-box .actions, .fx-foot) :is(button.primary, button.secondary, button.quiet, button.link, button.danger) { height: auto; min-height: 32px; }
  .fx-state .fx-sl { min-height: 28px; }
}

/* ───────── 11. Status ───────── */
.st { align-items: center; gap: 6px; white-space: nowrap; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); }
@media (max-width: 640px) { .st { white-space: normal; } } /* on the phone a long status wraps instead of pushing the page wider */
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; display: none; }
/* ordinary states: words only, no dot. A dot appears only for late, urgent or done. */
/* the hub's own tone names mean the same: warn = late, bad = urgent, ok = done */
.st:is(.late, .warn, .urgent, .bad, .done, .ok)::before { display: block; }
.st:is(.late, .warn) { color: var(--late); } .st:is(.late, .warn)::before { background: var(--late-dot); }
.st:is(.urgent, .bad) { color: var(--urgent); font-weight: var(--w-bold); } .st:is(.urgent, .bad)::before { background: var(--urgent); }
.st:is(.done, .ok) { color: var(--done); } .st:is(.done, .ok)::before { background: var(--done-dot); }
.pill, .flag, .chip, .evchip, .msg-tag, .pc-pri, .pc-tk, .pc-cat { align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-ctl); font-size: var(--t-sm); font-weight: var(--w-bold); line-height: 1; background: var(--band-2); color: #3a4555; border: 0; white-space: nowrap; }
.pill.opchip, .clip-actual .pill { max-width: 100%; height: auto; min-height: 22px; padding-block: 2px; white-space: normal; line-height: 1.25; } /* a long chip or note pill (an entered actual MME with its source, who and the day; "new records: calculated N, check") wraps inside its own box instead of running off a phone */
:is(.pill, .flag, .chip, .evchip, .msg-tag, .pc-pri, .pc-tk):is(.urgent, .red, .stat) { background: var(--urgent-bg); color: var(--urgent); }
:is(.pill, .flag, .chip, .evchip, .msg-tag, .pc-pri, .pc-tk):is(.late, .amber, .amb) { background: var(--late-bg); color: var(--late); }
:is(.pill, .flag, .chip, .evchip, .msg-tag, .pc-tk):is(.done, .ok, .green, .accepted, .completed, .scheduled) { background: var(--done-bg); color: var(--done); } /* done is green everywhere, case chips too (his rule 2026-10-11: "green for go") */
:is(.pill, .flag, .chip, .evchip, .msg-tag).info { background: var(--selected); color: var(--band); }
@media (pointer: coarse) { .chip:not(button, a, label) { min-height: 0; } } /* a state chip is a label, not a tap target: the older sheet's finger size (40 px) is for chips you press (B-405: tall blobs on touch screens) */
.wk-n, .ar-n, .badge, .navn { place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-round); background: var(--band-2); color: var(--ink); font-size: var(--t-xs); line-height: 1; font-weight: var(--w-bold); }
nav.apprail .ar-n { position: absolute; top: 1px; right: 5px; background: var(--surface); color: var(--rail); }

/* the Right panel's Files drop box: one slim row (his suggestion 12), the note under it */
.sp-drop { flex-direction: row; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s1) var(--s3); margin: 0; min-height: 40px; border-width: 1px; border-radius: var(--r-ctl); }
.sp-drophint { margin: var(--s1) 0 var(--s2); font-size: var(--t-xs); line-height: var(--lh-xs); }
/* the Same person? (ModMed) list: each one a block with its choices on the right, a faint line between */
.mmm-row { padding: var(--s3) 0; border-bottom: 1px solid var(--line); } .mmm-row:last-child { border-bottom: 0; }
.mmm-row > p { margin: 0 0 var(--s1); }
.mmm-cand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s1) 0; }
.mmm-row .actions { margin-top: var(--s1); }
.mmm-confirm { margin-top: var(--s2); } .mmm-confirm > p { margin: 0 0 var(--s1); }
.mmm-sides { width: 100%; border-collapse: collapse; margin-bottom: var(--s1); } .mmm-sides th, .mmm-sides td { text-align: left; padding: var(--s1) var(--s2) var(--s1) 0; vertical-align: top; }
.mmm-sides thead th { color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .mmm-sides { display: block; overflow-x: auto; } }
/* the Clipboard: six titled cards, two to a row on a wide chart; each item one line (what, then its detail quiet), its buttons on the right */
/* the chart's pinned header and toolbar: a part brought into view (a New task form, a card, the compare bar) stops below them, not under them */
@media (min-width: 900px) { .pp :is(.pp-panel, .ov2-card, .pp-cmpbar, .pp-tknew) { scroll-margin-top: calc(var(--bar-h, var(--h-top)) + var(--pptop, 80px) + var(--pptb, var(--h-tbar)) + 8px); } }
/* a focus screen's folded step: its name only, + opens it (moved from style.css); the follow-up line of an after-step stays, it is the step's state */
.fx-steps .pc-step.fx-fold > .pc-sa, .fx-steps .pc-step.fx-fold > .pc-sl > :not(b, .pc-follow) { display: none; }
/* a procedure order (B-306): safety first, then the next step, then where it stands in one line; a finished step on the chart folds to one line */
/* a procedure order's three parts as chips on its row under All (B-379): prior auth, clearance, scheduling */
.pc-chips { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: 2px; min-width: 0; }
/* a long chip wraps inside its own column, never over the next one (checker 2: "Prior auth done by hand (…)" ran into Who has it) */
.pc-chips > .pc-tk { max-width: 100%; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.pc-step { position: relative; } .pc-step > .pc-dtog { position: absolute; top: 6px; right: 4px; width: 28px; min-height: 28px; padding: 0; }
.pc-step.pc-dfold > .pc-sa, .pc-step.pc-dfold > .pc-sl > :not(b) { display: none; } .pc-step.pc-dfold > .pc-sl { padding-right: 32px; }
/* Send & receive: the Claude status and the drop box side by side, stacked on a narrow screen (moved from style.css); a long status wraps */
.ho-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 8px; align-items: start; }
@media (max-width: 900px) { .ho-strip { grid-template-columns: minmax(0, 1fr); } }
.ho-status > summary .st { white-space: normal; }
/* Admin → Teams: the team cards (moved from style.css; one column on a phone) */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 12px; margin-bottom: 12px; }
.clip-l { list-style: none; margin: 0; padding: 0; }
.clip-i { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.clip-i:last-child { border-bottom: 0; }
.clip-t { flex: 1 1 200px; min-width: 0; } .clip-t .sub { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.clip-m { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }
.clip-why { flex-basis: 100%; }
.clip-add { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.clip-add input { flex: 1 1 140px; width: auto; } .clip-add textarea { flex-basis: 100%; }
.clip-add select { flex: 1 1 140px; width: auto; }
.clip-dev.is-struck .clip-t { color: var(--quiet); }
/* Book in ModMed (step 3): why ModMed did not book it, and its open times that day as buttons; Admin's provider matches in a grid */
.sca-mmwhy { margin-top: var(--s2); color: var(--ink); font-size: var(--t-sm); line-height: var(--lh-sm); }
.sca-open { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: var(--s2) 0 var(--s1); }
.mm-provs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2) var(--s4); margin: var(--s2) 0; }
/* the hub's search results (his picture 2026-10-06): the details beside a name are never cut (the MRN wraps instead), and on the
   highlighted row they take its light text, readable on the navy */
.gsdrop { position: fixed; z-index: 1162; box-sizing: border-box; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--sh-over); overflow: hidden; } /* 1162: over the Right panel (1150) and its edge tabs (1155, pinned 1160); under a pop-up opened from it (1165), a full document (1170) and the menus */
.gsdrop.wide { border-radius: 0 0 var(--r-card) var(--r-card); }
.gsdrop .gsin { flex: none; display: flex; align-items: center; gap: var(--s2); height: var(--h-ctl); margin: var(--s2); padding: 0 var(--s3); background: var(--bg); border-radius: var(--r-ctl); color: var(--quiet); }
.gsdrop .gsin svg { width: 18px; height: 18px; flex: none; }
.gsdrop .gsin input { flex: 1 1 auto; min-width: 0; width: auto; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; outline: none; box-shadow: none; }
.gsdrop .gsin:focus-within { background: var(--surface); box-shadow: var(--focus); }
.gsr { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s1); }
.gsg { padding: var(--s2) var(--s2) var(--s1); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); }
.gsi { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s2); border-radius: var(--r-ctl); cursor: pointer; }
.gsi .gsl { min-width: 0; overflow-wrap: anywhere; }
.gsi .hint { text-align: right; }
.gsi.on { background: var(--sel-bg); color: var(--sel-ink); }
.gsh { flex: none; margin: 0; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.gsi .hint { max-width: 65%; white-space: normal; overflow: visible; }
.gsi.on .hint { color: inherit; opacity: .85; }
/* "Use the patient on my clipboard" (his small step 2026-10-26): the button in the top search and the side panel, and its answer (what was read, then Open or a list) */
.gsclip { flex: none; padding: 0 var(--s2) var(--s1); }
.cp-msg, .cp-read { margin: 0; padding: var(--s2); overflow-wrap: anywhere; }
.cp-read b { color: var(--ink); font-weight: var(--w-bold); }
.cp-one { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2); }
.cp-line { min-width: 0; overflow-wrap: anywhere; }
.cp-list { list-style: none; margin: 0; padding: 0; }
.cp-pick { display: block; width: 100%; text-align: left; background: none; border: 0; padding: var(--s2); border-radius: var(--r-ctl); cursor: pointer; font: inherit; color: var(--ink); overflow-wrap: anywhere; }
.cp-pick:hover, .cp-pick:focus-visible { background: var(--sunk); }
.cp-pick small { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pc-pri.stat, .seg > .stat { display: inline-flex; } /* the Stat label is a label; an older .stat (a dashboard number) is a block */
/* words coloured by their state, without a dot: red only for the emergent, amber for late or waiting */
.red-t { color: var(--urgent); } .amb-t { color: var(--late); }

/* ───────── 12. Fixes that are now rules ─────────
   • Never ellipsis a second line in a list; wrap it.  • Drop-downs size to their longest choice.  • One date format (see Design System · Writing rules). */
main tr.row .sub, .fx-card .sub, .hm-kpi .x, .rb-s, .hub-name, .hub-what, .msg-hint { white-space: normal; overflow: visible; text-overflow: clip; }
/* a spacer in a row pushes what follows it to the row's far end, in every row (B-371: the document viewer's ↗ ✕ sat beside its title);
   a screen that hides its spacer (display: none) still does */
.spacer { flex: 1 1 auto; }

/* ───────── 13. Light band (v4) ─────────
   Home panels, Admin sections and the Right panel header: same height and contents as Band 1, light ground.
   Dark bands are kept for the top level of work: list sections, chart cards, pop-up headers. */
.hm-pane > header, .hm-ph {
  display: flex; align-items: center; gap: var(--s2); height: var(--h-band); margin: 0; padding: 0 var(--s2) 0 var(--s1);
  background: var(--band-2); color: var(--ink); border-radius: var(--r-card) var(--r-card) 0 0;
  font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); box-shadow: none; cursor: pointer; user-select: none; }
:is(.hm-pane > header, .hm-ph) :is(.r) { margin-left: auto; font-size: var(--t-sm); font-weight: var(--w-reg); color: var(--quiet); }
:is(.hm-pane > header, .hm-ph) a { color: var(--accent); }
:is(.hm-pane > header, .hm-ph) :is(button.secondary, button.primary, button.quiet, select) { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); }
/* Empty sections start folded: the count (0) and one quiet line stay visible in the band. */
[data-count="0"]:not([data-unfolded]) > :not(header) { display: none; }

/* ───────── 14. Right panel (1h): an overlay from the right edge; light-band header, text tabs, slate group bands, plain two-line rows ───────── */
.sp { --sp-head: var(--band-2); --sp-body: var(--surface); background: var(--surface); box-shadow: var(--sh-over); }
.sp-h1 { padding: var(--s3) var(--s4); background: var(--band-2); border: 0; }
.sp-h1 .sp-pt b { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
.sp-ib { width: 28px; height: 28px; min-width: 28px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--quiet); }
.sp-ib:hover { background: rgba(26,31,38,.08); color: var(--ink); }
.sp-ib.sp-pin.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-lift); }
@media (max-width: 900px) { .sp button.sp-pin { display: none; } }
/* the patient in your pocket (B-172): Picture's facts, rows that open in place, and the way back */
.sp-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0 0 var(--s3); padding: var(--s2) var(--s3); background: var(--sunk); border-radius: var(--r-card); font-size: var(--t-sm); line-height: var(--lh-sm); }
.sp-facts dt { color: var(--quiet); } .sp-facts dd { margin: 0; }
.sp-pic-scr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); margin: 0 0 var(--s3); font-size: var(--t-sm); }
.sp-pic-scr > a { margin-left: auto; white-space: nowrap; } /* the link set apart at the line's right end, never read as part of the sentence */
.sp-pic-open { margin: 0 0 var(--s3); font-size: var(--t-sm); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; }
.sp .sp-rows > li { padding: 0; }
.sp-row { display: flex; gap: var(--s3); width: 100%; text-align: left; padding: var(--s2) 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.sp-row:hover { background: var(--sunk); }
.sp-when { color: var(--quiet); white-space: nowrap; min-width: 48px; font-size: var(--t-sm); }
.sp-rt { min-width: 0; flex: 1; } .sp-rt .sub { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.sp-rt .chip { font-size: var(--t-sm); padding: 0 var(--s2); border-radius: var(--r-round); background: var(--band-2); color: var(--quiet); white-space: nowrap; font-weight: var(--w-reg); }
.sp-rt .chip.ok { background: var(--done-bg); color: var(--done); } .sp-rt .chip.wait { background: var(--late-bg); color: var(--late); }
.sp-grp { margin: var(--s3) 0 var(--s1); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .6px; color: var(--quiet); font-weight: var(--w-bold); } .sp-grp:first-child { margin-top: 0; }
.sp-back { display: flex; align-items: baseline; gap: var(--s3); margin: 0 0 var(--s2); } .sp-back b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp .vn-bar { padding-left: 0; padding-right: 0; }
/* Tools inside the hub (B-337): the tools page fills the page under the top bar; For: (whose chart) sits at the top right; a tools frame
   shows once its page has loaded, in the hub's light look */
.tl-app { display: flex; flex-direction: column; gap: var(--s2); height: calc(100dvh - 110px); min-height: 420px; } /* the top bar and the page's own margins */
.tl-note { margin: 0; }
.tl-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.tl-wait { visibility: hidden; }
.topbar .tl-for > summary { color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-round); padding: 0 var(--s3); height: var(--h-ctl); background: var(--sunk); }
.topbar .tl-for > summary b { font-weight: var(--w-bold); }
.topbar .tl-for .tl-sub { color: var(--quiet); font-weight: var(--w-reg); }
.topbar .tl-for .menu-list button[aria-current] { font-weight: var(--w-bold); background: var(--selected); }
@media (max-width: 640px) { /* the phone: the name alone (on two lines when long), never cut */
  .tl-app { height: calc(100dvh - 160px); }
  .topbar .tl-for { min-width: 0; } .topbar .tl-for .tl-forw, .topbar .tl-for .tl-sub { display: none; }
  .topbar .tl-for > summary { max-width: 44vw; height: auto; min-height: var(--h-ctl); white-space: normal; font-size: var(--t-sm); line-height: var(--lh-sm); padding: 2px var(--s3); } }
/* Clinical tools (B-332): the patient's MME, taper, hold plan and refills, beside the Snapshot; the taper's step today is the selected row */
.ct-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.ct-main .sub { flex-basis: 100%; color: var(--quiet); }
.ct-main .chip { font-size: var(--t-sm); line-height: 18px; padding: 0 var(--s2); border-radius: var(--r-round); background: var(--band-2); color: var(--quiet); white-space: nowrap; }
.ct-main .chip.wait { background: var(--late-bg); color: var(--late); }
.ct-warn, .ct-line { margin: var(--s1) 0 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.ct-warn, .ct-list .sub.ct-late { color: var(--late); } /* a late line in a list: above the list's quiet second line */ .ct-line { color: var(--quiet); }
.ct-acts { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s1) 0 var(--s2); } .ct-acts:empty { display: none; }
.ct-list { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.ct-list li { padding: var(--s1) 0; border-bottom: 1px solid var(--line); } .ct-list li:last-child { border-bottom: 0; }
.ct-list .sub { display: block; color: var(--quiet); }
.ct-steps { width: 100%; border-collapse: collapse; margin: var(--s2) 0 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.ct-steps th { text-align: left; color: var(--quiet); font-weight: var(--w-reg); padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); }
.ct-steps td { padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); vertical-align: top; }
.ct-steps tr.now td { background: var(--selected); font-weight: var(--w-bold); }
.ct-foot { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s4) 0 0; font-size: var(--t-sm); }
/* Admin → Where each screen goes → Always accept from (B-178) */
/* Note orders (B-182): the notes on the left, the one picked on the right; on a phone one at a time */
.an { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.an-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.an-band { background: var(--band); color: #fff; font-weight: var(--w-bold); font-size: var(--t-sm); padding: var(--s2) var(--s3); }
.an-band.b2 { background: var(--hmx-band); color: var(--hmx-band-ink); } .an-n { opacity: .85; font-weight: var(--w-reg); margin-left: var(--s1); } .an-hint { font-weight: var(--w-reg); opacity: .8; }
/* Orders and results: the Priority / Category switch (B-492); on a phone a two-button row above the list */
.seg.ob-views { flex: none; } .rv-undo { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--ink); color: var(--surface); border-radius: var(--r-card); box-shadow: 0 2px 12px rgba(0,0,0,.25); } .rv-undo .link { color: inherit; text-decoration: underline; font-weight: var(--w-bold); }
.rz-vw { padding: var(--s2) var(--s3) 0; } @media (max-width: 640px) { .rz-vw .seg { display: flex; } .rz-vw .seg > button { flex: 1; } } .rz-band { flex-wrap: wrap; } .rz-band .ob-rsort { flex: none; margin-left: auto; }
.rz-cnt.on { background: var(--selected); } .rz-only { margin: var(--s2) var(--s3); } .st.ob-prio { cursor: pointer; } .st.ob-prio:is(:hover, :focus-visible) { text-decoration: underline; }
@media (max-width: 640px) { .toolbar.listbar > .seg.ob-views { flex: 1 1 100%; order: 5; } .seg.ob-views > button { flex: 1; } }
.an-row { display: block; width: 100%; text-align: left; padding: var(--s2) var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.an-row:hover { background: var(--sunk); } .an-row.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--band); }
.an-row .sub { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.an-row .chip { font-size: var(--t-sm); white-space: normal; padding: 1px var(--s2); border-radius: var(--r-round); background: var(--band-2); color: var(--quiet); margin-left: var(--s1); }
.an-row .chip.wait { background: var(--late-bg); color: var(--late); }
.an-revt { margin: var(--s2) var(--s3); }
.an-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s3) var(--s4); min-width: 0; }
.an-head { padding: 0 0 var(--s2); } .an-back { display: none; }
/* Results in My work (B-117): the Note orders layout; folding bands, Review all in range, how the patient hears */
/* a visit note at a glance (his format 2026-10-09): Diagnosis, Plan, Considered, a line each, the label bold */
/* a scheduled patient at a glance (his layout 2026-10-09): age and gender, the MME (grey; red at or above the High MME setting), the lines */
/* Clinic prep's schedule as cards (his picture 2026-10-09): the patient's lines on the left, time · visit type · provider on the right */
.cp-list { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); overflow: hidden; }
.cp-t-list { width: 100%; border-collapse: collapse; } .cp-t-list tr.row { cursor: pointer; } .cp-t-list tr.row + tr.row td { border-top: 1px solid var(--line); }
.cp-t-list tr.row:hover td { background: var(--sunk); } .cp-t-list tr.row.open td { background: var(--selected); }
.cp-t-list tr.row > td.cp-main { padding: var(--s3) var(--s4); vertical-align: top; } .cp-top { font-size: var(--t-md); line-height: var(--lh-md); }
.cp-t-list tr.row > td.cp-when { padding: var(--s3) var(--s4); vertical-align: top; text-align: right; white-space: nowrap; width: 1%; } .cp-when .sub { display: block; }
.cp-t { display: block; } .cp-act { margin-top: var(--s1); } .cp-t-list .cp-when .sub { white-space: nowrap; } /* over main tr.row's general cell rules */ .cp-main > .st { display: block; margin-top: 2px; } .cp-main > .sub { display: block; }
.cp-who { color: var(--quiet); font-weight: var(--w-reg); } .cp-l { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); margin-top: 2px; }
.cp-mme { display: inline-block; margin-left: var(--s2); padding: 0 var(--s2); border-radius: var(--r-ctl); font-size: var(--t-xs); font-weight: var(--w-bold); background: var(--band-2); color: var(--ink); }
.cp-mme.hi { background: var(--urgent-bg); color: var(--urgent); } .cp-concern { color: var(--late); }
.cp-kind { color: var(--quiet); } /* the kind of a follow-up beside its booked type (B-302) */
/* Clinic prep's schedule on a PHONE (his approval 2026-10-23, look only): one full-width block per patient instead of two columns. Line 1: the name, a quiet age and sex, the time at the right;
   line 2 (quiet): the visit type and provider, then the chips; then each labelled line, two lines at most (the whole row opens the full review on a tap); Mark reviewed at the bottom right.
   The cells' contents are laid out as the row's own flex items (display: contents), ordered by .cp-t-list's line numbers below; ::after is the break after line 1. The font is the page's own (Inter under html.font-inter). */
@media (max-width: 640px) {
  .cp-t-list[aria-label], .cp-t-list[aria-label] > tbody { display: block; }
  .cp-t-list[aria-label] tr.row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 1px; padding: var(--s2) var(--s3) var(--s2); }
  .cp-t-list[aria-label] tr.row + tr.row { border-top: 1px solid var(--line); }
  .cp-t-list[aria-label] tr.row:hover { background: var(--sunk); } .cp-t-list[aria-label] tr.row.open { background: var(--selected); }
  .cp-t-list[aria-label] tr.row > td, .cp-t-list[aria-label] tr.row .cp-top { display: contents; }
  .cp-t-list[aria-label] tr.row::after { content: ""; order: 13; flex: 0 0 100%; height: 0; } /* the break after line 1 */
  .cp-t-list[aria-label] .cp-top > b { order: 10; min-width: 0; overflow-wrap: anywhere; } .cp-t-list[aria-label] .cp-top > .cp-who { order: 11; font-size: var(--t-sm); }
  .cp-t-list[aria-label] .cp-when > .cp-day { order: 12; margin-left: auto; font-size: var(--t-sm); color: var(--quiet); } .cp-t-list[aria-label] .cp-when > .cp-t { order: 12; margin-left: auto; font-weight: var(--w-bold); white-space: nowrap; }
  .cp-t-list[aria-label] .cp-when > .cp-day + .cp-t { margin-left: 0; }
  .cp-t-list[aria-label] .cp-when > .sub { order: 20; display: inline; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
  .cp-t-list[aria-label] .cp-when > .sub + .sub::before { content: "· "; }
  .cp-t-list[aria-label] .cp-top > :not(b, .cp-who), .cp-t-list[aria-label] .cp-when > :not(.cp-day, .cp-t, .sub, .cp-act) { order: 30; margin-left: 0; }
  .cp-t-list[aria-label] .cp-main > :not(.cp-top) { order: 40; flex: 1 1 100%; min-width: 0; }
  .cp-t-list[aria-label] .cp-main > .cp-l { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  .cp-t-list[aria-label] .cp-main > .st { display: flex; margin-top: 0; } /* the state's dot beside its words, not above them */
  .cp-t-list[aria-label] .cp-when > .cp-act { order: 90; flex: 0 0 auto; margin: 0 0 0 auto; }
}
/* Prepare tomorrow's clinic (B-477): the bar above the next clinic day's visits; the confirm is a few lines, not a box; stacked on a phone */
.cp-prep { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.cp-prep .cp-l { margin-top: 0; } .cp-confirm-box { flex: 1 1 100%; } .cp-confirm-box:empty { display: none; }
.cp-confirm { display: grid; gap: var(--s1); } .cp-confirm-act { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); }
@media (max-width: 640px) { .cp-prep { flex-direction: column; align-items: stretch; } .cp-prep > button, .cp-confirm-act > button { width: 100%; } .cp-confirm-act { flex-direction: column; align-items: stretch; } }
/* the visit's kind on Clinic prep (his ask 2026-10-09: subtle, never distracting): a small dot and a soft color on the words */
.vt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: var(--r-round); margin-right: 5px; vertical-align: 1px; background: var(--line); }
.vt-new { color: var(--band); } .vt-new::before { background: var(--band); } .vt-proc { color: var(--done); } .vt-proc::before { background: var(--done-dot); } .vt-fu::before { background: var(--quiet); }
.ord-gl { margin-top: 2px; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); } .ord-gl .k { font-weight: var(--w-bold); }
.rz-handf .wk-people { max-height: 220px; } .rz-handf label { display: block; margin-top: var(--s2); }
/* Orders v2 (his design 2026-10-09): one table per patient, By category or By visit; 4 statuses as soft chips with the step in plain words */
.ao-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); } .ao-sw { margin-left: auto; }
.ao-top > .ao-sw { order: 1; margin-left: auto; } .ao-top > :not(.ao-sw) { order: 2; flex: 1 1 100%; } /* By category / By visit stays where it is in both views; the people line and the duplicates note take their own row under it (his report 2026-10-15: "when I click visit the toggle jumps") */
/* narrow (an order open on the right squeezes the list; a phone): each order stacks: its name on top, when ordered and the status under it (his report 2026-10-09: names broke one letter per line) */
.ao-body, .ord-ao { container-type: inline-size; }
/* one order's own screen on the right (his design 2026-10-09): the next step, then labeled sections */
.os { display: flex; flex-direction: column; gap: var(--s2); } .os-h h3 { margin: 0 0 2px; font-size: var(--t-lg); }
.os-ht { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); }
.os-dl { display: grid; grid-template-columns: 130px 1fr; gap: var(--s1) var(--s3); margin: 0; padding: var(--s2) var(--s3); } .os-dl dt { color: var(--quiet); } .os-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.os-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); } .os-form .os-wide, .os-form .os-new { grid-column: 1 / -1; } .os-new:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.os-form label > input:not([type=checkbox]), .os-form label > select, .os-form label > textarea { display: block; width: 100%; margin-top: 2px; } .rf-acc { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); } .os-sec { grid-column: 1 / -1; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: var(--w-bold); color: var(--quiet); border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-top: var(--s1); }
.ao-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); } .ord-item.archived, .ord-item.archived :is(b, a, button.link) { color: var(--quiet); } /* closed and archived: quieter by colour, not by opacity (opacity left the text under 4.5:1) */
.ord-more-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--s2); align-items: end; margin-top: var(--s2); }
@media (max-width: 760px) { .ord-more-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .an { grid-template-columns: 1fr; } .an.has-open .an-list { display: none; } .an:not(.has-open) .an-pane { display: none; } .an-back { display: block; margin-bottom: var(--s2); } }
.fx-vnhead { padding: 0 0 var(--s2); font-size: var(--t-md); } /* the patient over the note writer in My visits (2026-10-08) */
#alwaysadmin { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.aa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); }
.aa-chips { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: var(--s1) 0 var(--s2); }
.aa-chip { display: inline-flex; align-items: center; gap: var(--s1); padding: 0 var(--s1) 0 var(--s2); border-radius: var(--r-round); background: var(--band-2); font-size: var(--t-sm); line-height: 26px; }
.sp-search { padding: var(--s2) var(--s4) 0; background: var(--surface); } .sp-search input { width: 100%; height: var(--h-ctl); }
.sp-rt mark { background: var(--late-bg); color: inherit; border-radius: 2px; padding: 0 1px; } /* pinning needs more than 900 px (sidepanel.js spPlace): no Pin that does nothing */
.sp-tabs2 { gap: 0 var(--s4); padding: 0 var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); }
.sp .sp-tabs2 button { height: 36px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-reg); box-shadow: none; }
.sp .sp-tabs2 button:hover { color: var(--ink); background: none; }
.sp .sp-tabs2 button.on { color: var(--ink); font-weight: var(--w-bold); background: none; box-shadow: inset 0 -2px 0 var(--band); }
/* B-473: on a phone the Right panel's More ▾ opens in the panel under the tabs and pushes the lines below it down (it covered "N patients and N items…") */
.sp-moreinl { display: flex; flex-direction: column; padding: var(--s1) var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); }
.sp .sp-moreinl button { justify-content: flex-start; height: auto; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); text-align: left; }
.sp-body { padding-inline: var(--s3); background: var(--surface); }
.sp .sp-mh { height: var(--h-band-2); margin: 0 calc(-1 * var(--s3)); padding: 0 var(--s4); border: 0; background: var(--band-2); color: var(--ink); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); }
.sp .sp-mh a, .sp .sp-mh button.link { color: var(--accent); font-weight: var(--w-bold); }
.sp .spx-row { margin: 0 calc(-1 * var(--s3)); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); background: var(--surface); }
.sp .spx-row:hover, .sp .spx-row:focus-visible { background: var(--sunk); }
.sp .spx-r1 { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
.sp .spx-r2 { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }

/* ───────── 15. Scheduler day (1i): a navy band over each provider's column; booked visits grey, picked ones dashed, open slots white ───────── */

/* Credentials' person list is a section menu too: plain rows, the open one selected */
.credpeople .credp { min-height: 32px; padding: var(--s1) var(--s3); border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font-weight: var(--w-reg); }
.credpeople .credp:hover { background: var(--line); }
.credpeople .credp.on { background: var(--selected); color: var(--band); font-weight: var(--w-bold); box-shadow: inset 3px 0 0 var(--accent); }

/* a task's two columns inside its card: split by a line, never a box inside the card */
.tk-cols { border: 0; border-radius: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* a group inside a step (the payer's answer, Prior auth help): a quiet grey ground, no outline */
.pc-auth, .pc-aihelp { border: 0; border-radius: var(--r-card); background: var(--sunk); }

/* ───────── 16. Pick lists (Coverage's procedures, Admin's templates): one white card, rows split by faint lines, the open one selected ───────── */
.cov-list { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.cov-item { margin: 0; padding: var(--s2) var(--s4); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); }
.cov-item:last-child { border-bottom: 0; }
.cov-item:hover { background: var(--sunk); }
.cov-item.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }
.cov-item .nm { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.cov-item .cd { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }

/* ───────── 17. My settings (1j): each list a white card with a light band title, plain rows with faint lines ───────── */
.lay-lists { gap: var(--s4); }
.setpage > #setlayout { width: min(1240px, calc(100vw - 76px - 64px)); } .setpage:has(> #setlayout) { margin-inline: 0; } /* the three lists use the page's width; the settings forms below keep their reading width. The page sits at the left: centred, its wide lists ran 125 px past a 1440 screen */
.lay-card { gap: 0; padding: 0; border: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); overflow: hidden; }
.lay-card > b { display: flex; align-items: center; height: var(--h-band); padding: 0 var(--s4); background: var(--band-2); color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.lay-card > .hint { padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.lay-item { min-height: 40px; gap: var(--s3); padding: 0 var(--s3) 0 var(--s4); border: 0; border-bottom: 1px solid var(--line); background: none; }
.lay-item:last-child { border-bottom: 0; }
.lay-grip { color: var(--quiet); cursor: grab; }
.lay-item.off .lay-l { color: var(--quiet); text-decoration: none; }
.lay-item.lay-notick { grid-template-columns: 16px minmax(0, 1fr) auto; } /* the chart's and the panel's order lists have no tick: the choice above sets where a tab shows */
.lay-where { grid-column: span 2; } .lay-where > .lay-sub { display: block; padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.lay-wh { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; min-height: 40px; padding: var(--s1) var(--s4); border-bottom: 1px solid var(--line); }
.lay-wh:last-child { border-bottom: 0; } .lay-wh .lay-l { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .lay-where { grid-column: auto; } }
.lay-mv button { width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; background: none; color: var(--quiet); }
.lay-mv button:hover { background: var(--line); color: var(--ink); }
.lay-mv .ms { font-size: 18px; }

/* ───────── 18. Admin rules (1g): a light band per group, its rule cards joined as rows (name · what it does · Change), an open one tinted ───────── */
main h2.rc-sec { display: flex; align-items: center; height: var(--h-band); margin: var(--s4) 0 0; padding: 0 var(--s4); background: var(--band-2); color: var(--ink); border-radius: var(--r-card) var(--r-card) 0 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
details.rulecard { display: block; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; }
details.rulecard:has(+ :not(details.rulecard)), details.rulecard:last-child { border-bottom: 0; border-radius: 0 0 var(--r-card) var(--r-card); }
details.rulecard:not(h2.rc-sec + details.rulecard):not(details.rulecard + details.rulecard) { border-top-left-radius: var(--r-card); border-top-right-radius: var(--r-card); margin-top: var(--s4); } /* a run with no group band above it */
details.rulecard > summary { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) auto; align-items: center; gap: var(--s4); min-height: var(--h-row); padding: var(--s2) var(--s3) var(--s2) var(--s4); }
details.rulecard .rc-t { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
details.rulecard .rc-s { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
details.rulecard .rc-go { display: inline-flex; align-items: center; height: var(--h-ctl-sm); padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-size: var(--t-sm); font-weight: var(--w-bold); }
details.rulecard > summary:hover .rc-go { background: var(--sunk); }
details.rulecard[open] { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }
details.rulecard > :not(summary) { padding-inline: var(--s4); } /* an opened card's contents keep off its edge (his ModMed card 2026-10-06: first letters clipped) */
details.rulecard > :not(summary):last-child { padding-bottom: var(--s3); }
/* Admin → Rules → Patient flags (B-303): one row per flag (its name, its colour with the chip as charts show it, on or off); a new one below */
.fl-t td { vertical-align: middle; }
.fl-c { display: flex; align-items: center; gap: var(--s2); }
.fl-c select, .fl-add select { width: auto; }
.fl-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.fl-add input { flex: 1 1 200px; width: auto; }

/* ───────── 19. Note output actions (his name 2026-10-08; was "Done from your note"): what Autumn did from a signed note, one row each with Undo; questions under it ───────── */
.vn-donebox { display: grid; gap: var(--s3); }
/* Note output actions on the Visit notes list (B-166): green once looked at, amber while they wait for the provider */
.vn-out.ok { color: var(--done); } .vn-out.todo { color: var(--late); }
/* a Clipboard condition's diagnosis code, picked by a person (B-160): the likely codes as buttons, then a search for other words */
.clip-codes { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s1); grid-column: 1 / -1; } .clip-codes > button { text-align: left; white-space: normal; height: auto; }
.clip-cq { display: flex; gap: var(--s1); align-items: center; } .clip-cq input { min-width: 12em; }
/* an output opened in the same window (B-164): the way back on top; an output's title reads as a link */
.vn-back { padding: var(--s2) 0; }
/* The note writer, nurse notes and phone (step 3, his approval 11/02/26): "Written by <nurse>" beside "For <provider>"; "Start with the phone layout" beside the Note label; on a phone the visit type, date and provider fold into one line with Change */
.vn-fields { display: contents; }
.vn-line { display: none; }
.vn-by { font-size: var(--t-sm); line-height: var(--lh-sm); white-space: nowrap; }
.vn-labrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
.vn-labrow button.link { min-height: 0; height: auto; padding: 0; font-size: var(--t-sm); }
.vn-labrow[hidden], .vn-labrow button[hidden] { display: none; }
.vn-sumtog { display: none; }
@media (max-width: 640px) { .vn-sumtog { display: flex; justify-content: flex-start; width: 100%; } .vn-sumtog[hidden] { display: none; } }
@media (max-width: 640px) {
  .vn-fields { display: none; }
  .vn-band.open .vn-fields { display: contents; }
  .vn-line { display: flex; flex: 1 1 100%; align-items: baseline; justify-content: space-between; gap: var(--s3); font-size: var(--t-md); }
  .vn-line-t { min-width: 0; overflow-wrap: anywhere; font-weight: var(--w-bold); }
  .vn-line button.link { flex: none; min-height: 0; height: auto; padding: 0; }
  .vn-by { white-space: normal; flex: 1 1 100%; }
  .vn-sumbox:not(.open) { display: none; }
  /* the rare "already signed" button waits under the main row, at the right: Cancel, Save and Copy stay on one line */
  .vn-actions [data-vnsigned] { order: 2; flex: 0 0 auto; margin-left: auto; }
  /* the blanks line and its Next blank (step 4's button) share a row; Cancel, Save and Copy for ModMed follow on one row */
  .vn-actions .vn-blanks { flex: 1 1 55%; min-width: 0; }
  .vn-actions .vn-blanks:empty { display: none; }
  .vn-actions [data-vnnext] { flex: none; }
}
.vn-dlist button.link.vn-go, .vn-bnd button.link.vn-go { display: inline; height: auto; min-height: 0; padding: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; font-weight: inherit; }
/* inside the note output actions the order or case is part of this window, not a window of its own: no picture, no Wider or Close, a body-size title */
.vn-sub .fx-head, .sp-sub .fx-head { grid-template-columns: minmax(0, 1fr) auto; } .vn-sub .fx-head > .pp-av, .vn-sub .fx-max, .vn-sub [data-fxclose], .sp-sub .fx-head > .pp-av, .sp-sub .fx-max, .sp-sub [data-fxclose] { display: none; } /* a Summary inside another view (Note output actions, the Right panel): its way back is that view's */
.vn-sub .fx-name, .sp-sub .fx-name { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
/* the visit note's page (B-162): the letterhead page in a frame, white like paper; the writer's Visit summary box above the note */
.vn-open { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); } /* the page frame never widens the pane past the screen; title, the actions bar, the note (it scrolls; nothing below it) */
/* what a person approves, one short line each (his ask 2026-10-08): under the row's first line, numbered */
.wk-pts { margin: var(--s1) 0 0; padding-left: 1.4em; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); } .wk-pts li { margin: 2px 0; }
/* the note's Close at the top as well as the bottom (his ask 2026-10-08) */
.vn-oh > div { flex: 1 1 auto; min-width: 0; } .vn-oh .vn-chip { display: inline-block; margin-top: var(--s1); } .vn-top { flex-shrink: 0; white-space: nowrap; }
.vn-printframe { position: fixed; width: 1px; height: 1px; left: -9999px; top: 0; border: 0; } /* patient instructions printed on their own (B-162) */
/* the note's actions: one slim bar under its title, nothing at the bottom (his ask 2026-10-08) */
.vn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); padding: var(--s1) var(--s3); border-bottom: 1px solid var(--line); }
.modal .vn-bar { padding: var(--s1) 0; margin-bottom: var(--s2); }
.vn-instr { width: 100%; font: inherit; line-height: var(--lh-md); } /* the patient's instructions, read and changed before they print (B-171) */
.vn-attl { display: grid; gap: var(--s1); max-height: 50vh; overflow: auto; margin: var(--s2) 0; } /* Print, Fax, Ask about this note, Copy text, Change, Close: every button stays in view in a narrow pane */
.vn-pagebox { overflow: auto; min-width: 0; background: var(--bg); padding: var(--s3); }
.vn-page { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-lift); }
/* a visit note read beside the work (B-392): the one header, then the note in one scroll; elsewhere than a chart, a pane docked on the side
   away from where it was opened (no backdrop: the screen behind stays usable; a pop-up opened from it, 8 too, comes later and sits on top) */
.vn-read { flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--surface); }
.vn-read > .vn-page { min-height: 0; border-radius: 0; box-shadow: none; }
.vn-dock { position: fixed; top: var(--bar-h, var(--h-top)); bottom: 0; z-index: 8; width: min(760px, 48vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--sh-over); }
.vn-dock.right { right: 0; border-left: 1px solid var(--line); }
.vn-dock.left { left: 0; border-right: 1px solid var(--line); }
.vn-inplace { display: flex; flex-direction: column; min-height: 0; } /* in a list's pop-up pane, in place of what it showed (‹ Back) */
/* the payer packet's order: the number beside each tick (B-392) */
.pc-tickn { flex: none; min-width: 1.2em; font-size: var(--t-xs); font-weight: 700; color: var(--accent); }
.pc-tickn:empty { display: none; }
.vn-lab { display: block; font-size: var(--t-sm); font-weight: var(--w-bold); margin: var(--s2) 0 var(--s1); }
.vn-lab .hint { font-weight: normal; }
.vn-sum { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: var(--t-sm); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); }
/* Autumn: lay out my text (note writer step 4, his approval 11/02/26): the line under the bar that says what Autumn did, what it took out, and Show what changed (his text beside the laid-out text, in place) */
.vn-lay { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2) var(--s3); background: var(--sunk); border-radius: var(--r-card); font-size: var(--t-sm); line-height: var(--lh-sm); }
.vn-lay[hidden], .vn-cmp[hidden] { display: none; }
.vn-lay-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s1) var(--s3); }
.vn-lay-b { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.vn-lay button.link { min-height: 0; height: auto; padding: 0; font-size: inherit; }
.vn-lay p { margin: 0; }
.vn-cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); margin-top: var(--s1); }
.vn-cmp-h { font-weight: var(--w-bold); margin-bottom: var(--s1); }
.vn-cmp-t { margin: 0; padding: var(--s2); background: var(--surface); border-radius: var(--r-ctl); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-height: 280px; overflow: auto; }
.vn-lay-s { display: none; }
@media (max-width: 640px) { .vn-cmp { grid-template-columns: minmax(0, 1fr); } .vn-lay-l { display: none; } .vn-lay-s { display: inline; } }
.vn-dlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.vn-dlist li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.vn-dlist li:last-child { border-bottom: 0; }
.vn-dlist .vn-dmk { color: var(--done-dot); font-weight: var(--w-bold); }
.vn-dlist li.off { color: var(--quiet); }
.vn-dlist li.off .vn-dmk { color: var(--quiet); }
.vn-dqs { display: grid; gap: var(--s2); }
.vn-left summary { color: var(--quiet); font-size: var(--t-sm); cursor: pointer; }

/* ───────── 20. The chart's three summary screens (B-277 step 2, his approved design 2026-10-11) ─────────
   The Overview (work and who has it), the Clinical summary (the record in clinical order) and the Pre-visit review (his one screen before a
   visit). Every section is a chart card with a titled band (section 4: it folds); content is the brightest thing; red only for a don't-miss
   finding, said once by its outline. */
/* the Overview: the two work cards run across, the small ones sit two to a row (one on a narrow chart or a phone) */
:is(.ov3-card, .cs-card) > header { min-width: 0; }
:is(.ov3-card, .cs-card) > header > b { flex: none; } /* the title never gives way to its hint */
:is(.ov3-card, .cs-card) > header .hint { min-width: 0; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.ov3-card, .cs-card) > header > .hint ~ :is(button.link, button, a) { margin-left: var(--s2); } /* the band's words on the right, its buttons after them */
/* the Clinical summary and the Pre-visit review: one card per section, in each person's order */
.cs-stack, .pvr-stack { display: grid; gap: var(--s3); min-width: 0; }
.cs-card { min-width: 0; }
.cs-body { min-width: 0; padding: var(--s3) var(--s4); }
.cs-pre + .cs-body { padding-top: 0; }
.cs-card > :is(.aie-diff, .aie-stale) { margin: 0 var(--s4) var(--s3); }
.cs-syn { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.cs-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s1) var(--s4); margin: 0; }
.cs-kv dt { font-size: var(--t-sm); line-height: var(--lh-md); color: var(--quiet); }
.cs-kv dd { min-width: 0; margin: 0; color: var(--ink); }
.cs-rows { list-style: none; margin: 0; padding: 0; }
.cs-rows li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.cs-rows li:first-child { padding-top: 0; }
.cs-rows li:last-child { padding-bottom: 0; border-bottom: 0; }
.cs-d { font-size: var(--t-sm); color: var(--quiet); white-space: nowrap; }
.cs-x { min-width: 0; }
.cs-list { margin: 0; padding-left: 1.2em; }
.cs-sub { margin: var(--s3) 0 var(--s1); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.cs-none { margin: 0; }
.cs-pay { display: grid; gap: var(--s1); margin-top: var(--s3); font-size: var(--t-sm); line-height: var(--lh-sm); }
.cl-src { display: none; } .cs-src .cl-src { display: inline; } /* sources show only where Sources is pressed (his rule; the Pre-visit review showed them on every line) */
.cs-dontmiss { box-shadow: 0 0 0 2px var(--urgent); } /* the don't-miss finding: outlined in red, the one red on the screen */
/* the Pre-visit review: the visit line, the decisions with their ticks, what is new */
.pvr-last { padding-bottom: var(--s2); margin-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.pvd + .pvd { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.pvd-ticks { display: grid; gap: var(--s1); margin: var(--s1) 0 0; padding: 0; list-style: none; }
.pvd-ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s2); align-items: baseline; }
.pvd-mk { font-weight: var(--w-bold); text-align: center; }
.pvd-met .pvd-mk { color: var(--done-dot); }
.pvd-not_met .pvd-mk { color: var(--late); }
.pvd-pending .pvd-mk { color: var(--neutral-dot); }
/* the right panel's Clinical snapshot (his design 2026-10-11): six short lines at most, a label then the point; safety as small flags */
.snap-l { margin: 0; } .snap-r { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: var(--s2); padding: 4px var(--s3); border-bottom: 1px solid var(--line); } /* concise: tight rows */
.snap-plan { background: var(--sunk); } .snap-out { color: var(--quiet); } .snap-q { color: var(--late); font-weight: var(--w-bold); }
.snap-r dt { color: var(--quiet); font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: .04em; line-height: var(--lh-md); }
.snap-r dd { margin: 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); }
.snap-flag { display: inline-block; margin: 0 var(--s1) 2px 0; padding: 0 6px; border-radius: var(--r-ctl); font-size: var(--t-xs); font-weight: var(--w-bold); }
.snap-flag.amb { background: var(--late-bg); color: var(--late); } .snap-flag.red { background: var(--urgent-bg); color: var(--urgent); }
.snap-more { margin: 0; padding: var(--s2) var(--s4); } .snap-none { padding: var(--s3) var(--s4); margin: 0; }
.pvr-new { list-style: none; margin: 0; padding: 0; display: grid; }
.pvr-new li { display: grid; grid-template-columns: 84px 92px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.pvr-new li:last-child { border-bottom: 0; }
.pvr-k { font-size: var(--t-sm); color: var(--accent); font-weight: var(--w-bold); }
.pvr-d { font-size: var(--t-sm); color: var(--quiet); white-space: nowrap; }
.pvr-x { min-width: 0; }
.pvr-why { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); }
.pvr-tw { overflow-x: auto; }
/* a fax or file being placed (Faxes, My work's file screen): the document fills the screen to be read (his ask 2026-10-09: "needs to be larger for reviewing") */
/* My Worklist's item: priority and what it is on the first line, the details on their own line under it (his note 2026-10-12) */
.wk-thing { display: block; color: var(--ink); }
/* a paper that came more than once is one row (his picks 2026-10-29): each copy to open, and Autumn's one question for a group of copies */
.wk-copies { display: block; } .wk-copies .wk-lbl { color: var(--quiet); }
.wk-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s1); padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--late-bg); font-weight: var(--w-bold); }
.wk-watch { margin-left: var(--s3); } /* who else is in my worklist now (B-430): beside the count */
/* "I'm out" (imout.js): the form's day and half day, the lists in My settings, the cover person's band and the manager's lines */
.out-day { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.out-list { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.out-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.out-btns { display: flex; gap: var(--s1); }
.wk-morn.out-lines { flex-direction: column; align-items: flex-start; gap: var(--s1); }
.out-line .dot { color: var(--quiet); margin: 0 var(--s1); }
.out-gap { font-weight: var(--w-bold); }
.out-cover { margin-bottom: var(--s4); }
.out-cover .out-open { flex: none; white-space: nowrap; }
.out-cover .wk-sech { flex: 1 1 0; min-width: 0; overflow: hidden; }
.out-cover .wk-sech h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out-cover .tablewrap > .hint { margin: var(--s2) var(--s3); }
@media (max-width: 640px) { main tr.row .wk-why { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } /* the phone: the Assigned line is one line; all of it is under ⋯ → Why is this mine? (B-429) */
.wk-lbl { color: var(--quiet); margin-right: var(--s1); } /* My Worklist's "Type:" and "Details:" labels (B-338 step 2b): quiet, so what follows them reads first */
main .wk-secline { margin: var(--s1) 0 var(--s2); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); } /* the line under a band's title: what is in it, finished when (B-341) */
button.wk-ktype { height: auto; min-height: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: var(--w-bold); cursor: pointer; } /* Type ▾: reads as the Type, opens its list (B-341) */
button.wk-ktype:hover { color: var(--accent); }
/* flex: none: the file view's frame also carries .ho-view (flex: 1 in the old stylesheet), and a flex basis overrides the height, so it
   fell to its 320px minimum (his report 2026-10-12: "this pdf viewer needs to increase in size. it is too short") */
.ho-file .pdfv-host { flex: none; height: max(560px, calc(100vh - 230px)); }
@media (max-width: 760px) { .ho-file .pdfv-host { height: 75vh; } }
td.pvr-date { white-space: nowrap; } /* a date never breaks inside (02/2002); only the date cells (a medicine name in the first column wraps: 2026-10-09) */
.pvr-full { margin-top: var(--s4); }
.pvr-full > summary { cursor: pointer; padding: var(--s2) 0; }
.pvr-menu { position: absolute; z-index: 60; display: grid; min-width: 200px; padding: var(--s1) 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-over); }
.pvr-menu button { justify-content: flex-start; height: var(--h-ctl); padding: 0 var(--s4); border: 0; border-radius: 0; background: none; color: var(--ink); text-align: left; }
.pvr-menu button:hover { background: var(--selected); }
/* a narrow chart, the Right panel and a phone read the same, one column (his principle: concise on the phone) */
:is(.pp.pp-narrow, .sp-pic) :is(.cs-kv, .cs-rows li, .pvr-new li) { grid-template-columns: minmax(0, 1fr); gap: 0; }
:is(.pp.pp-narrow, .sp-pic) .cs-kv dd { margin-bottom: var(--s2); }
@media (max-width: 640px) {
  .pvr-new li, .cs-rows li, .cs-kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .cs-kv dd { margin-bottom: var(--s2); }
  :is(.ov3-card, .cs-card) > header .hint { display: none; } /* concise on a phone: the title band holds its title and its buttons */
}
.ws-actions > .evchip { flex-shrink: 0; } /* a status chip in an action bar keeps its words; the bar wraps instead (Reviewed by … was cut under Undo) */

/* the Screen tab's documents: one quiet menu, not a row of links (his note 2026-10-07) */

/* the letters library (his design 2026-10-07): letters grouped by who they go to; the tone check said above the letter */
.ol-group { display: grid; gap: 2px; margin-bottom: var(--s2); }
.ol-gt { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); text-transform: uppercase; letter-spacing: .04em; }
.ol-item { margin: var(--s1) 0 var(--s2); }
.ol-note { display: grid; gap: var(--s2); margin: var(--s2) 0; }
.ol-nfs { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.ol-lb { width: 5em; }
.ol-tone { padding: var(--s2) var(--s3); border-radius: var(--r-ctl); font-size: var(--t-sm); background: var(--done-bg); color: var(--done); }
.ol-tone.warn { background: var(--late-bg); color: var(--late); }
.ol-tone ul { margin: var(--s1) 0 0; padding-left: 18px; }
/* the patient's providers on Demographics (2026-10-08): the full width, like People in the patient's care; Autumn's suggestions in the waiting tint */
.dm-psug { background: var(--late-bg); }
.mi-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.mi-find { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: var(--s1) 0; padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--late-bg); font-size: var(--t-sm); }
.mi-find > span { flex: 1 1 14em; }
.sca-before { font-size: var(--t-sm); }
.rfd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.rfd-card { margin-top: var(--s2); }
.rfc-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: var(--s2) 0 0; }
.dm-pres { display: flex; flex-direction: column; gap: var(--s1); margin: calc(-1 * var(--s1)) 0 var(--s2); }
.dm-pres1 { text-align: left; padding: var(--s1) var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-size: var(--t-sm); }
.dm-pres1.on { background: var(--selected); border-color: var(--accent-line); }
/* Autumn's tiles and amounts in Admin → Autumn (B-133; the monitor's cost-by-feature card became the live Autumn tab's Cost band, B-361) */
.af-tile { padding: var(--s2) var(--s3); background: var(--sunk); border-radius: var(--r-ctl); font-size: var(--t-sm); color: var(--quiet); }
.af-tile b { display: block; font-size: var(--t-lg); line-height: var(--lh-lg); color: var(--ink); font-variant-numeric: tabular-nums; }
.af-m { display: grid; gap: 2px; min-width: 0; }
.af-amt { width: 5.5em; height: var(--h-ctl-sm); padding: 0 var(--s1); font: inherit; }
.af-bar { display: block; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.af-bar i { display: block; height: 100%; background: var(--accent-line); } .af-bar i.near { background: var(--late); } .af-bar i.over { background: var(--urgent); }
/* Admin → Autumn (B-287, his design 2026-10-11): the plain answer on top, then seven title bands (the hub's band, + / − like every
   other). Inside a band, one line per setting: what it is · what it is now · its control. The feature rows: fold sign, name and
   what it does, its one switch, this month against its amount, its last run; the settings open under the row. Phone: one column. */
.at { display: grid; gap: var(--s4); }
.at-top { display: grid; gap: var(--s2); }
.at-now { margin: 0; } /* "Working now: … · See it live ›" (B-361) */
.at-needs { margin: 0; padding-left: 18px; font-size: var(--t-sm); color: var(--quiet); }
.at-jump { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: var(--t-sm); }
.at-jump b { color: var(--ink); }
.at-about { margin: 0 0 var(--s2); }
.at-l { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.at-k { font-weight: var(--w-bold); color: var(--ink); }
.at-v { min-width: 0; }
.at-a { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.at-in { display: inline-flex; align-items: center; gap: 2px; }
.af-tiles.at-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: 0 0 var(--s3); }
.at-fold { padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.at-fold > summary { font-weight: var(--w-bold); cursor: pointer; }
.at-fold > summary .hint { font-weight: var(--w-reg); margin-left: var(--s2); }
.at-head, .at-r { display: grid; grid-template-columns: 28px minmax(0, 2.4fr) 21.5rem minmax(0, 1.4fr) 8.5em; gap: var(--s3); align-items: center; }
.at-head { padding: 0 0 var(--s1); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
h3.at-g { margin: var(--s2) 0 0; padding: var(--s1) var(--s2); background: var(--band-2); border-radius: var(--r-ctl); color: var(--ink); }
.at-f { border-top: 1px solid var(--line); }
.at-r { padding: var(--s2) 0; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.at-f.off .at-n b, .at-f.off .at-m { color: var(--quiet); }
/* chart analysis has two monthly amounts: each is set on its row, under the total (his ask 2026-10-28) */
.at-m .at-part { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); margin-top: var(--s1); }
.at-n { min-width: 0; } .at-n .hint { display: block; }
.at-fx { width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-weight: var(--w-bold); }
.at-last .sub { display: block; }
.at-fd { padding: 0 0 var(--s2) calc(28px + var(--s3)); }
.at-fd .at-l:first-child { border-top: 0; }
.at-models td { vertical-align: top; }
@media (max-width: 760px) {
  .at-l { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } .at-a { justify-content: flex-start; }
  .af-tiles.at-tiles { grid-template-columns: minmax(0, 1fr); }
  .at-head, .at-n .hint, .at-about { display: none; }
  .at-r { grid-template-columns: 28px minmax(0, 1fr); row-gap: var(--s1); } .at-r > .at-s, .at-r > .at-m { grid-column: 2; } .at-r > .at-last { display: none; }
  .at-s .seg { display: inline-flex; flex-wrap: wrap; height: auto; } .at-s .seg > * { height: auto; min-height: 28px; }
  .at-fd { padding-left: 0; }
  .at-band > header { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: var(--s1); row-gap: 0; }
}
/* The Practice monitor's Autumn tab, live (B-361, his mock-up approved 2026-10-13): the plain line on top, then titled bands in his order.
   Colour only where it means something: a green dot for working, amber for a problem; counts are plain. The phone: one column, the
   answer first, then Now, Not placed by Autumn, Problems, Done today; Waiting in line and Cost folded to one line each. */
.mon-top > .al-top { flex: 1 1 100%; }
.al-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); padding: var(--s2) var(--s3); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); font-size: var(--t-md); line-height: var(--lh-md); }
.al-say { flex: 1 1 420px; min-width: 0; }
.al-say > .st { font-size: var(--t-md); line-height: var(--lh-md); white-space: normal; }
.al-live { color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; }
.al-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--done-dot); vertical-align: 1px; }
.al-alert { flex: 1 1 100%; margin: var(--s1) 0 0; }
.al-alert > .st { white-space: normal; }
.al-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.al-wide { grid-column: 1 / -1; }
.al-b { min-width: 0; }
.al-b > header .hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-head, .al-r { display: grid; gap: var(--s1) var(--s3); align-items: baseline; padding: var(--s2) var(--s3); }
.al-head { padding-block: 6px; background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-bold); }
.al-r + .al-r { border-top: 1px solid var(--line); }
.al-r .sub, .al-ln .sub { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.al-now :is(.al-head, .al-r) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr) 4.5em; } /* fixed last column: each row is its own grid, so the columns line up with or without Open */
.al-waiting :is(.al-head, .al-r) { grid-template-columns: minmax(0, 1fr) 5em 6.5em; }
.al-needs :is(.al-head, .al-r) { grid-template-columns: minmax(0, 1fr) 5em 6.5em; }
.al-done :is(.al-head, .al-r) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 2.2fr) 5.5em; }
.al-cnt { font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.al-act { justify-self: end; white-space: nowrap; }
.al-r.al-off { color: var(--quiet); }
.al-k { color: var(--quiet); font-size: var(--t-sm); }
.al-none { margin: 0; padding: var(--s2) var(--s3); color: var(--quiet); font-size: var(--t-sm); }
.al-ln { display: grid; grid-template-columns: minmax(120px, 32%) minmax(0, 1fr) auto; gap: var(--s1) var(--s3); align-items: baseline; padding: 7px var(--s3); }
.al-ln + .al-ln, .al-dsk-b + .al-ln { border-top: 1px solid var(--line); }
.al-ph, .al-ln.al-ph { display: none; } /* the phone's own shorter words (shown under 640 px) */
.al-fail { margin: var(--s1) 0 0; padding: 0; list-style: none; font-size: var(--t-sm); }
.al-fail li + li { margin-top: 2px; }
.al-tile b { display: block; font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.al-tile span { display: block; color: var(--quiet); font-size: var(--t-sm); }
.al-meter { position: relative; height: 8px; margin: 6px 0 2px; border-radius: 4px; background: var(--band-2); }
.al-meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent-line); }
.al-meter > em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--quiet); }
.al-fm { position: relative; display: inline-block; width: 90px; height: 6px; margin-right: 6px; overflow: hidden; border-radius: 3px; background: var(--band-2); vertical-align: middle; }
.al-fm > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-line); }
.al-more { padding: 0 var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.al-more > summary { padding: var(--s2) 0; color: var(--accent); cursor: pointer; }
.al-more .al-ln { padding-inline: 0; }
.al-why { margin: 0; padding: var(--s2) var(--s3) var(--s3); font-size: var(--t-sm); }
.al-b .mon-r { padding-inline: var(--s3); }
.al-b .ch { display: block; padding: var(--s2) var(--s3) var(--s3); }
.al-b .ch .ch-t { font-size: 11px; } /* drawn at the band's width like the other pictures: its height stays 90 */
/* The Autumn tab's pictures (B-433, his approved page 2026-10-14): the faxes bar in the top line, busy by the hour, the month's cost on pace and the
   7-day lines. Neutral grey-blue from the tokens; amber (--late) only for a problem; each scales to its band and hover is the only detail. */
.al-fx { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin: 6px 0 2px; }
.al-fxbar { display: flex; gap: 2px; flex: 1 1 260px; max-width: 640px; height: 26px; }
.al-fxbar > * { display: flex; align-items: center; min-width: 0; padding: 0 8px; overflow: hidden; border-radius: 5px; font-size: var(--t-sm); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.al-fxbar > .filed, .al-fxkey .sw.filed { background: var(--selected); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--ink); }
.al-fxbar > .person, .al-fxkey .sw.person { background: var(--late-bg); box-shadow: inset 0 0 0 1px var(--late-dot); color: var(--late); }
.al-fxbar > .aside, .al-fxkey .sw.aside { background: var(--band-2); color: var(--quiet); }
.al-fxbar .al-fl { margin-left: .35em; font-weight: var(--w-reg); }
.al-fxkey { display: none; flex: 1 1 100%; color: var(--quiet); font-size: var(--t-sm); }
.al-fxkey > span { margin-right: var(--s3); }
.al-fxkey .sw { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.al-tail { margin-top: 2px; color: var(--quiet); font-size: var(--t-sm); }
.al-costgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s3); align-items: center; padding: var(--s3); }
.al-costgrid .al-pic { padding: 0; }
.al-pic { padding: var(--s2) var(--s3) var(--s3); }
.al-pic-t { margin-bottom: 2px; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.al-svg { display: block; width: 100%; height: auto; overflow: visible; }
.al-svg text { font-size: 11px; fill: var(--quiet); font-family: inherit; }
.al-svg text.k { fill: var(--ink); } .al-svg text.w { fill: var(--late); }
.al-ax { stroke: var(--line-strong); }
.al-bar { fill: var(--accent-line); }
.al-barw { fill: var(--surface); stroke: var(--accent-line); stroke-dasharray: 3 2; }
.al-ln { fill: none; stroke: var(--quiet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.al-ln.al-dash { stroke-width: 1.5; stroke-dasharray: 6 4; } .al-ln.thin { stroke-width: 1; }
.al-ln.al-dot { stroke-width: 2.5; stroke-dasharray: 0.1 6; } .al-ln.al-dot.bad { stroke: var(--late); }
.al-pt { fill: var(--quiet); } .al-pt.bad { fill: var(--late); } .al-hit { fill: transparent; }
.al-lg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; color: var(--quiet); font-size: var(--t-sm); }
.al-lg i { display: inline-block; width: 18px; height: 0; margin-right: 5px; border-top: 2px solid var(--quiet); vertical-align: middle; }
.al-lg i.d { border-top-style: dashed; } .al-lg i.o { border-top-style: dotted; border-top-width: 3px; }
.al-lg i.sw { width: 10px; height: 10px; border: 0; border-radius: 2px; background: var(--accent-line); vertical-align: -1px; }
.al-lg i.sw.w { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent-line); }
@media (max-width: 900px) {
  .al-grid { grid-template-columns: minmax(0, 1fr); }
  .al-costgrid { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
}
@media (max-width: 640px) {
  .al-now { order: 1; } .al-needs { order: 2; } .al-problems { order: 3; } .al-done { order: 4; } .al-waiting { order: 5; } .al-cost { order: 6; } .al-how { order: 7; } .al-days { order: 8; }
  .al-dsk, .al-dsk-b, .al-head, .al-b > header .hint { display: none; }
  .al-fxbar { flex: 1 1 100%; } .al-fxbar .al-fl { display: none; } .al-fxkey { display: block; }
  span.al-ph { display: inline; } .al-ln.al-ph { display: grid; }
  .al-b .al-r { grid-template-columns: minmax(0, 1fr) auto; padding-inline: var(--s3); }
  .al-nowr .al-act { grid-row: 1; grid-column: 2; }
  .al-nowr .al-c2, .al-nowr .al-c3, .al-wr .al-c3 { grid-column: 1 / -1; color: var(--quiet); font-size: var(--t-sm); }
  .al-nowr .al-c3 .sub { display: inline; } .al-nowr .al-c3 .sub::before { content: " · "; }
  .al-nr .al-act { display: none; } /* a tap on the count opens its list */
  .al-dr { cursor: pointer; }
  .al-dr .al-where { display: none; grid-column: 1 / -1; font-size: var(--t-sm); }
  .al-dr.open .al-where { display: block; }
  .al-dr .al-c4 { display: none; }
  .al-ln { grid-template-columns: minmax(0, 1fr) auto; }
  .al-ln .al-lv { grid-column: 1 / -1; }
}
/* Autumn's suggested codes on a case, until a person confirms them (B-150): said once, quietly */
.pc-sug { margin-left: var(--s2); padding: 0 var(--s1); border-radius: 3px; background: var(--late-bg); color: var(--ink); font-size: var(--t-sm); }
/* Done from your note: what Autumn found when the signed note was changed (B-151) */
.vn-recheck { margin: var(--s3) 0 0; padding: var(--s2) 0 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.vn-recheck .vn-dlist { margin-top: var(--s1); }
/* Outside providers: the specialty chips (B-109) */
.rf-specs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: 0 0 var(--s2); }
.rf-specs .chip { border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .rf-specs .chip.on { background: var(--selected); border-color: var(--accent-line); }
/* A procedure case's step groups (moved from style.css): one under the other, full width (his note 2026-10-09: side by side, "it is
   hard to read"); inside each, a step reads top to bottom: the step, its documents, who has it, its buttons */
.pc-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding: 10px 12px; align-items: start; }
.pc-tile { min-width: 0; }
.pc-grph { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 5px 10px; border: 0; border-radius: 8px; background: var(--o-band); color: var(--band-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
/* the Case card (B-292): one card, a band per part; the band title says its state (green done, amber waiting); the facts in two columns */
.pcr > section.pcr-band > header { display: flex; align-items: center; gap: var(--s2); min-height: 30px; padding: 0 var(--s4); background: var(--hmx-band); color: var(--hmx-band-ink); font-size: var(--t-sm); }
.pcr-st { font-weight: var(--w-bold); } .pcr-st.ok { color: var(--done); } .pcr-st.amb { color: var(--late); }
.pcr-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: var(--s3); padding: 5px var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pcr > section.pcr-band { padding: 0; }
/* Suggested by Autumn (his rule 2026-10-11): at most three, each with Make a task and Not needed */
.sug-list { list-style: none; margin: 0; padding: 0; } .sug-list > li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.sug-list > li:last-child { border-bottom: 0; } .sug-b { flex: 1 1 auto; min-width: 0; } .sug-a { display: inline-flex; gap: var(--s2); flex: none; }
@media (max-width: 640px) { .sug-list > li { flex-wrap: wrap; } } /* the bands run edge to edge in the card */
.pcr-row > .k { color: var(--quiet); } .pcr-row select { width: auto; height: 26px; font-size: var(--t-sm); margin-left: var(--s1); } .ok-t { color: var(--done); font-weight: var(--w-bold); }
/* the blood thinner hold card (B-278): one row per medicine (the medicine and dose, then the answer with its dates), a quiet line under it
   (the prescriber and the clearance, what still waits), then Patient told; the same card on the case and in the Pre-visit review */
.hc { display: grid; gap: 0; min-width: 0; }
.hc-row, .hc-told { display: grid; grid-template-columns: minmax(8em, 34%) minmax(0, 1fr); gap: 2px var(--s3); padding: 4px 0; border-bottom: 1px solid var(--line); }
.hc-row:last-of-type { border-bottom: 1px solid var(--line); } .hc-told { border-bottom: 0; }
.hc-med { color: var(--ink); font-weight: var(--w-bold); min-width: 0; } .hc-told > .hc-med { color: var(--quiet); font-weight: 400; }
.hc-plan { min-width: 0; color: var(--ink); } .hc-plan .link, .hc-plan button { margin-left: var(--s1); }
.hc-plan.hc-split { color: var(--late); } /* a line naming several medicines: amber until split (his OK 2026-10-13); gap lines keep their colour */
.hc-sub { grid-column: 2; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.hc-add { padding-top: var(--s1); }
/* B-395: the patient's answer under a line the note and the Clipboard disagree on, and Add a medicine drawn in place (no pop-up) */
.hc-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.hc-addf { display: grid; gap: var(--s2); max-width: 36em; padding: var(--s2) 0; }
.hc-addf label { display: grid; gap: 2px; color: var(--quiet); font-size: var(--t-sm); }
.hc-addf label.hc-tick { display: flex; align-items: center; gap: var(--s1); color: var(--ink); }
.hc-addf .hc-go { display: flex; gap: var(--s2); } .hc-addf .hc-say { color: var(--quiet); font-size: var(--t-sm); }
.hc-text { width: 100%; min-height: 8em; resize: vertical; } .hc-copy { margin: var(--s2) 0 var(--s3); }
.opchip-go { cursor: pointer; } .opchip-go:hover, .opchip-go:focus-visible { outline: 1px solid var(--accent-line); outline-offset: 1px; }
.cs-tools { margin-left: auto; display: inline-flex; gap: var(--s2); }
@media (max-width: 640px) { .hc-row, .hc-told { grid-template-columns: minmax(0, 1fr); } .hc-sub { grid-column: 1; } .pcr-row:has(> span > .hc), .cs-kv:has(.hc) { grid-template-columns: minmax(0, 1fr); } }
.pc-grpn { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); } .pc-grpn.done { color: var(--done); font-weight: var(--w-bold); } .pc-pm { width: 14px; text-align: center; color: var(--muted); }
.pc-tile.pc-shut .pc-grpb { display: none; }
.pc-tiles .pc-step { grid-template-columns: 22px minmax(0, 1fr); align-items: start; padding: 8px 4px; border-top: 0; border-bottom: 1px solid var(--line-soft); }
.pc-tiles .pc-step > .pc-ck { grid-row: 1 / span 3; margin-top: 2px; }
.pc-tiles .pc-step > :is(.pc-sl, .pc-sr, .pc-sa) { grid-column: 2; min-width: 0; }
.pc-tiles .pc-sa { justify-content: flex-start; }
/* a document's long reading starts at its first lines; Show all opens the rest */
.pc-facts.pc-clip { max-height: 5.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
/* the Day grid: a procedure's readiness for its day (B-221 piece 5): ready, or what is missing, plain words */
/* Find a time (B-228): the search bar on every Book list; chips like the specialty chips, labels in one column */
/* the right panel's Book tab: one row per follow-up or open time (text left, its button right); the search labels sit beside their choices in a
   narrow column (his note 2026-10-10: labels above "takes up too much space") */
.sp-bfurow { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s1) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.sp-bfurow > span { min-width: 0; } .sp-bfurow .sub { display: block; color: var(--quiet); } .sp-bfurow > button { flex: none; }
/* Note orders' bands (B-220): a slim titled band per kind, a table for orders, a three-part row for the rest */
.vn-bnd { margin: var(--s2) 0; }
.vn-bh { padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--selected); font-weight: var(--w-bold); font-size: var(--t-sm); }
.vn-bh span { font-weight: normal; color: var(--quiet); }
.vn-ot { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.vn-ot th { text-align: left; color: var(--quiet); font-weight: var(--w-bold); padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); }
.vn-ot td { vertical-align: top; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); }
.vn-ot .sub, .vn-row .sub { display: block; color: var(--quiet); }
.vn-ot .sub.amb-t, .vn-row .sub.amb-t { color: var(--late); }
.vn-row > span { min-width: 0; }
.vn-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; gap: var(--s2); align-items: center; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
/* The ModMed schedule (his final design 2026-10-10 eve, laid out like ModMed's from his screenshots): ModMed's open time green, its visits
   as coloured cards by type (New Patient green, follow-ups yellow, injections and procedures blue, Med Check red, Botox peach) */
.mms { --mms-open: #dcebd3; --mms-open-line: #b7d3a6; --mms-np: #8cc06c; --mms-fu: #f6d77a; --mms-inj: #8db5e2; --mms-med: #e58c8c; --mms-bx: #f7dfc7; --mms-oth: #d5dae2; --mms-hub-b: #fbeec0; --mms-hub-line: #c8962e;
  font-size: var(--t-sm); }
.mms-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--selected); color: var(--ink); } /* the booking bar (his v3 pick 11/08/26): who and what is booked, its buttons at the right */
.mms-bar-t { min-width: 0; } .mms-bar-k { font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); } .mms-bar-w { margin-top: 2px; color: var(--late); font-size: var(--t-sm); font-weight: var(--w-bold); }
.mms-bar-act { flex: 0 0 auto; display: inline-flex; justify-content: flex-end; gap: var(--s2); max-width: 100%; }
.sca-warns { flex: 1 0 100%; order: -4; margin: 0 0 var(--s1); font-size: var(--t-sm); } .sca-warns p { margin: 0 0 2px; } /* inside the button bar, so they stay in view above the buttons */ /* quiet amber lines above the buttons */
.sca-visit { padding: var(--s3); }
@media (min-width: 641px) { .sc-apane { max-height: calc(100vh - var(--bar-h, var(--h-top)) - 24px); } } /* the form pane may be as tall as the screen: the whole form fits */
.mms-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.mms-today { background: var(--band); color: var(--on-band); border: 0; border-radius: var(--r-ctl); padding: 3px 14px; cursor: pointer; }
.mms-date { font-size: var(--t-sm); width: auto; flex: none; min-height: 0; height: auto; padding: 2px 6px; }
.mms-seg { display: inline-flex; } .mms-seg .mms-chip { border-radius: 0; } .mms-seg .mms-chip:first-child { border-radius: var(--r-ctl) 0 0 var(--r-ctl); } .mms-seg .mms-chip:last-child { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; margin-left: -1px; }
.mms-nav { display: inline-flex; align-items: center; gap: var(--s1); }
.mms-title { font-size: var(--t-name); font-weight: var(--w-reg); color: var(--band); white-space: nowrap; }
.mms-arrow { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-ctl); padding: 1px 8px; cursor: pointer; color: var(--ink); }
.mms-find { margin-left: auto; border: 1px solid var(--accent-line); background: var(--selected); color: var(--accent); border-radius: var(--r-ctl); padding: 3px 12px; cursor: pointer; }
.mms-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mms-lb { width: 72px; flex: none; color: var(--quiet); white-space: nowrap; }
.mms-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 1px 10px; cursor: pointer; font-size: var(--t-sm); }
.mms-chip.on { background: var(--selected); border-color: var(--accent-line); font-weight: 600; }
.mms-filter select { flex: 1 1 0; max-width: 280px; min-height: 0; height: auto; padding: 3px var(--s1); }

.mms-booked:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s1) 0; padding: var(--s2); border-radius: var(--r-ctl); background: var(--band-2); } /* a clicked open time while ModMed is its test system: the time, and one Scheduled in ModMed button */
.mms-booked .mms-bk-say { flex: 1 1 220px; min-width: 0; } .mms-booked .mms-bk-act { display: inline-flex; gap: var(--s2); }
.mms-warn { margin: var(--s1) 0; padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--late-bg); color: var(--late); font-weight: var(--w-bold); }
.mms-none { padding: var(--s2) 0; }
.mms-grid { display: grid; grid-template-columns: 64px repeat(var(--mms-cols), minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sunk); margin-top: var(--s1); overflow: auto; max-height: max(420px, calc(100vh - 250px)); }
.mms-corner, .mms-head { position: sticky; top: 0; z-index: 3; background: var(--band-2); border-bottom: 1px solid var(--line-strong); padding: 4px var(--s1); font-weight: 600; text-align: center; }
.mms-head { border-left: 1px solid var(--line-strong); }
.mms-gut span { display: block; box-sizing: border-box; font-size: var(--t-xs); color: var(--quiet); text-align: right; padding-right: 4px; border-top: 1px solid var(--line); }
.mms-col { position: relative; border-left: 1px solid var(--line-strong); }
.mms-open { position: absolute; left: 0; right: 0; margin: 1px 0; border: 0; border-top: 1px solid var(--mms-open-line); background: var(--mms-open); cursor: pointer; padding: 0 6px; text-align: left; }
.mms-open span { visibility: hidden; font-size: var(--t-xs); color: var(--done); } .mms-open:hover, .mms-open:focus-visible { background: var(--mms-open-line); } .mms-open:hover span, .mms-open:focus-visible span { visibility: visible; }
.mms-bk { position: absolute; z-index: 2; box-sizing: border-box; padding: 0 4px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); overflow: hidden; font-size: 11px; color: #1a1f26; }
.mms-bk { cursor: pointer; } .mms-bk:hover { box-shadow: inset 0 0 0 1px var(--accent); } .mms-bk:focus-visible { box-shadow: var(--focus); } /* a visit opens on a click */
.mms-visit { display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--s3); margin: 0 0 var(--s3); } .mms-visit dt { color: var(--quiet); } .mms-visit dd { margin: 0; }
.mms-bk b { display: block; text-align: center; } .mms-bk span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mms-bk a { color: inherit; }
.mms-k-np { background: var(--mms-np); } .mms-k-fu { background: var(--mms-fu); } .mms-k-inj { background: var(--mms-inj); } .mms-k-med { background: var(--mms-med); } .mms-k-bx { background: var(--mms-bx); } .mms-k-oth { background: var(--mms-oth); }
.mms-legend { display: flex; flex-wrap: wrap; gap: 4px var(--s3, 16px); padding: var(--s1) 0; color: var(--quiet); font-size: var(--t-xs); }
.mms-sw { display: inline-block; position: static; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.mms-lrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 4px var(--s1); border-bottom: 1px solid var(--line); border-radius: 3px; margin-bottom: 2px; color: #1a1f26; }
.mms-lrow .sub { display: block; color: var(--quiet); font-size: var(--t-xs); }
.mms-lrow.mms-lopen { background: var(--mms-open); }
/* a booking saved here that ModMed does not have yet (his pick 11/02/26): hatched amber, one legend line */
.mms-hub, .mms-hubsw, .mms-lrow.mms-lhub { background: repeating-linear-gradient(135deg, var(--mms-fu) 0 6px, var(--mms-hub-b) 6px 12px); border: 1px dashed var(--mms-hub-line); }
.mms-lday { margin-top: var(--s2); font-weight: 600; color: var(--quiet); }
.mms-foot { margin: var(--s2) 0 0; }
.mms-narrow .mms-find { margin-left: 0; }
/* a visit ModMed has, changed from the hub (B-305): it is dragged to another time; on its form a changed field is outlined green and
   counted beside Save changes, and ModMed refusing a change is said on the form */
.mms-bk[data-mmsmove] { cursor: grab; user-select: none; touch-action: none; }
.mms-bk:is(.mms-drag, .mms-asking) { z-index: 4; box-shadow: var(--sh-over); } /* dragged, then dropped while its move is asked: above the other visits */
.mms-bk.mms-drag { cursor: grabbing; opacity: .85; }
.mms-ask { margin-top: var(--s2); }
.sca :is(input, select, textarea).sca-ch { border-color: var(--done); }
.sca :is(input, select, textarea).sca-ch:not(:focus) { box-shadow: inset 0 0 0 1px var(--done); }
.sca label.check.sca-ch { outline: 1px solid var(--done); outline-offset: 2px; border-radius: var(--r-ctl); }
.sca-n { margin-right: auto; font-size: var(--t-sm); color: var(--quiet); }
.sca-bar .sca-n { flex: 1 0 100%; order: -3; margin-right: 0; } .sca-bar > [data-scacx] { margin-right: auto; } /* the change count has its own row, so the buttons stay on one row at the bottom right (his review 11/08/26) */
.askbar .askneed { margin: 0; color: var(--late); font-weight: var(--w-bold); font-size: var(--t-sm); } /* a question that needs its reason says so */
.sca-bar { flex-wrap: wrap; } /* the count keeps its words in a narrow pane (beside the schedule): the buttons go to a second line, never the count off the pane (B-315); defect repair 11/02/26: never a button off the pane's left edge either (the three buttons of a waiting-list appointment were cut on a phone) */
@media (max-width: 640px) { /* the phone: the form scrolls with the page (its pane is no scroll box of its own, which held the Save bar at the form's end), and Save stays in view above the bottom bar */
  .sc-apane { position: static; max-height: none; overflow: visible; }
  .sca-bar { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .sca-bar > [data-scacx] { order: -2; margin-right: auto; } /* Cancel appointment… keeps apart, alone on the first row at the left; Close and Save are the row at the bottom right */
  .sca-bar:has([data-scacx])::before { content: ""; order: -1; flex: 1 0 100%; height: 0; margin-top: -8px; }
}
.sca-err { margin: var(--s2) var(--s3); padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--late-bg); color: var(--late); font-size: var(--t-sm); font-weight: var(--w-bold); }
.sca-log p { margin: 2px 0 0; }
/* the procedure Monitor (B-308): a band's numbers in one row of tiles (two to a row when the band is narrow: a phone, or beside an open
   procedure order), then the procedure orders behind them; a number's colour says its state (green on goal, amber waiting, red needs a
   look); the band's title keeps its room, its note shortens; today's Dashboard folded under the bands; Home's line */
.pc-mq { margin-bottom: var(--s3); } .pc-mq > section { container-type: inline-size; }
.pc-mq > header > b { flex: none; } .pc-mq > header > .hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-mts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
.pc-mt { display: grid; align-content: start; gap: 2px; min-width: 0; padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.pc-mt .v { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-mt .l { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pc-mt.ok .v { color: var(--done); } .pc-mt.amb .v { color: var(--late); } .pc-mt.red .v { color: var(--urgent); }
.pc-mrows td.n { white-space: nowrap; }
.pc-mmore .pc-mmb { padding-top: var(--s3); } .pc-mmore .pc-dline { margin: 0 0 var(--s2); }
/* B-450: the folded band's long heading is cut with an ellipsis (a band keeps its one height), so the page never grows wider than a phone */
.pc-mmore .wk-sech h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hm-pcl { flex-basis: 100%; }
/* Office (his approved page 2026-10-26): the tiles start a little under the bar; the Announcements band reads like every other band, its two editor links in it */
.hub-tiles.hubx-top { margin-top: var(--s2); }
#anns { margin: 0 0 var(--s4); }
#anns > .cardhead h2 { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: inherit; }
#anns > .cardhead .hubx-edits { margin-left: auto; display: inline-flex; gap: var(--s3); }
@container (max-width: 640px) {
  .pc-mts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-mrows thead { display: none; } .pc-mrows, .pc-mrows tbody { display: block; }
  .pc-mrows tr.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; border-top: 1px solid var(--line); }
  .pc-mrows tr.row > td { display: block; border: 0; padding: 2px var(--s2); } .pc-mrows tr.row > td:nth-child(-n+2) { grid-column: 1 / -1; } .pc-mrows tr.row > td:first-child { padding-top: var(--s2); }
}
/* Patient texts (B-313/B-314): the offer where the person is, its button green for go (his rule 2026-10-11); an offer that cannot be used
   says why in place of a live button; Patient notified once sent, the words one click away. In the Spruce box: the text's name and its
   length over what it says. Admin → Patient texts: the library as a table, as drawn */
.ptx-offer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: var(--s2) 0; padding: var(--s2) var(--s3);
  border-left: 3px solid var(--done-dot); border-radius: var(--r-ctl); background: var(--sunk); font-size: var(--t-sm); line-height: var(--lh-sm); }
.ptx-offer.ptx-off { border-left-color: var(--line-strong); }
.ptx-q { font-weight: var(--w-bold); color: var(--ink); }
button.ptx-go { display: inline-flex; align-items: center; gap: 6px; height: var(--h-ctl-sm); padding: 0 12px; border: 1px solid var(--done-dot); border-radius: var(--r-ctl);
  background: var(--done-bg); color: var(--done); font-size: var(--t-sm); font-weight: var(--w-bold); white-space: nowrap; cursor: pointer; }
button.ptx-go:hover { border-color: var(--done); }
button.ptx-go:disabled { border-color: var(--line); background: var(--surface); color: var(--quiet); cursor: not-allowed; }
.ptx-why { flex-basis: 100%; color: var(--quiet); }
.ptx-ok { color: var(--done); font-weight: var(--w-bold); }
.ptx-words { flex-basis: 100%; padding: var(--s2); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); white-space: pre-wrap; }
.sca-ptx .ptx-offer { margin: var(--s2) var(--s3) 0; }
.msg-draft { margin: 0 0 var(--s1); padding: var(--s1) var(--s2); border-radius: var(--r-ctl); background: var(--done-bg); color: var(--done); font-size: var(--t-sm); line-height: var(--lh-sm); }
.msg-draft .msg-count { color: var(--quiet); } .msg-draft .msg-count.red-t { color: var(--urgent); font-weight: var(--w-bold); }
.ptx-lib td { vertical-align: top; }
.ptx-lib .ptx-form { display: grid; gap: var(--s1); min-width: 0; }
.ptx-lib .ptx-form textarea { width: 100%; min-width: 0; }
.ptx-prev .pre { margin-top: var(--s1); padding: var(--s2); border-radius: var(--r-ctl); background: var(--sunk); white-space: pre-wrap; font-size: var(--t-sm); line-height: var(--lh-sm); }
.ptx-lib .ptx-form .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.ptx-lib .ptx-form .actions > :first-child { margin-right: auto; }
.ptx-lib .ptx-self { display: grid; gap: var(--s1); justify-items: start; min-width: 170px; }
.sca-rem { display: grid; gap: 2px; }
/* B-514: Admin → Patient texts in five folding categories. A fold line each (name, how many, who may edit); no outline boxes, only the line between them. */
.ptx-cats { display: grid; }
.ptx-cat { border-top: 1px solid var(--line); }
.ptx-cat:first-child { border-top: 0; }
.ptx-cat > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s2) var(--s1); cursor: pointer; list-style: none; }
.ptx-cat > summary::-webkit-details-marker { display: none; }
.ptx-cat > summary::before { content: "▸"; color: var(--quiet); }
.ptx-cat[open] > summary::before { content: "▾"; }
.ptx-cat > summary:hover { background: var(--sunk); }
.ptx-cname { font-weight: var(--w-bold); color: var(--ink); }
.ptx-count, .ptx-who { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.ptx-who b { font-weight: var(--w-bold); }
.ptx-catbody { display: grid; gap: var(--s3); padding: var(--s2) 0 var(--s3) var(--s4); min-width: 0; }
.ptx-edit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--selected); font-size: var(--t-sm); line-height: var(--lh-sm); }
.ptx-edit label { display: inline-flex; align-items: center; gap: var(--s1); }
.ptx-lib .ptx-form > .pre, .ptx-lib .ptx-form > div > .pre { padding: var(--s2); border-radius: var(--r-ctl); background: var(--sunk); white-space: pre-wrap; }
/* B-473: on a phone each text stacks (its title, its wording box and buttons, then Send by itself), so nothing runs past the right edge (the third column was 219 px off) */
@media (max-width: 640px) {
  .ptx-lib, .ptx-lib tbody, .ptx-lib tr, .ptx-lib td { display: block; width: auto; min-width: 0; }
  .ptx-lib thead { display: none; }
  .ptx-lib tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  .ptx-lib td { padding: var(--s1) 0; border: 0; }
  .ptx-lib td:not(.title)[data-l]::before { content: attr(data-l); display: block; margin-bottom: var(--s1); color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-bold); }
  .ptx-lib .ptx-self { min-width: 0; }
}
.ptx-refill { display: grid; gap: var(--s2); }
/* the compose box over the Clinical tools (Text patient… on Taper and Refill, 2026-10-12): the draft the full width, its length under it,
   red when it is more than one text takes */
.ptx-compose { display: grid; gap: var(--s2); }
.ptx-compose label { display: grid; gap: var(--s1); }
.ptx-compose textarea { width: 100%; min-width: 0; min-height: 9em; resize: vertical; }
.ptx-compose .ptx-count { margin: 0; }
.ptx-compose .ptx-count.red-t { color: var(--urgent); font-weight: var(--w-bold); }
/* Admin → Automated texts (his approval 2026-11-10): one card for each text the hub sends by itself, every card in the same three parts (On or off, Wording, Settings); only the line between the parts. */
.at-cards { display: grid; gap: var(--s4); }
.at-card { min-width: 0; }
.at-card > header { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: var(--s1); row-gap: var(--s1); }
.at-body { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); min-width: 0; }
.at-card > header .at-when { flex: 1 1 14em; min-width: 0; white-space: normal; }
.at-card > header .at-hstate { flex: none; margin-left: auto; color: var(--on-band); font-weight: var(--w-bold); }
.at-part { display: grid; gap: var(--s2); justify-items: start; min-width: 0; padding-top: var(--s2); border-top: 1px solid var(--line); }
.at-part > h4 { margin: 0; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); }
.at-wd, .at-form, .at-hours { display: grid; gap: var(--s1); width: 100%; min-width: 0; }
.at-form textarea { width: 100%; min-width: 0; }
.at-form label { display: grid; gap: var(--s1); }
.at-form .pre { padding: var(--s2); border-radius: var(--r-ctl); background: var(--sunk); white-space: pre-wrap; }
.at-form .actions, .at-hours .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.at-form .actions > :first-child { margin-right: auto; }
.at-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.at-row label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.at-row input[type=number] { width: 4.5em; }
.at-row select, .at-part select { width: auto; min-width: 0; }
.at-wd > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s1) 0; cursor: pointer; }
.at-wd[open] > summary { padding-bottom: var(--s2); }
.at-test { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s1) var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); }
.at-test label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.at-test select { width: auto; min-width: 0; }
.at-testres { flex: 1 1 12em; min-width: 0; }
.at-test .actions { margin: 0; }
.at-tcharts { display: grid; gap: var(--s1); margin: var(--s2) 0 var(--s3); }
.at-fixed { margin: 0; padding-top: var(--s2); border-top: 1px solid var(--line); }

/* ───────── My Worklist's three views (B-229a, his names: Category · Priority · List) ───────── */
.wkbar > #wkviews { flex: none; } /* the view switch: the right end of the list's toolbar, after View ▾ (a .seg) */
main table.wk-list-t td.wk-lq { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); } /* the List view: why it is yours and its category, quiet as in the item line */
@media (max-width: 640px) { /* the phone: the switch on its own line under the search, its three words side by side */
  .wkbar { flex-wrap: wrap; }
  .wkbar > #wkviews { flex: 1 1 100%; order: 1; }
  .wkbar > #wkviews > .seg { display: flex; height: auto; }
  .wkbar > #wkviews > .seg > * { flex: 1 1 0; height: 36px; }
  .wkbar > #wkviews:has(> [data-snr-top]:not([hidden])) { display: flex; align-items: center; gap: var(--s3); } /* Collapse all shares the switch's row, at its right end */
  .wkbar > #wkviews > .seg { flex: 1 1 auto; min-width: 0; }
  .wkbar > #wkviews > [data-snr-top] { flex: none; margin: 0; min-height: 0; white-space: nowrap; }
}
/* the Priority view's category counts: each narrows the list; one click folds them away (his ask 2026-10-11: "they may take up a lot of space") */
.wk-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.wk-chip { display: inline-flex; align-items: center; gap: var(--s1); height: var(--h-ctl-sm); padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-round); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); line-height: var(--lh-sm); cursor: pointer; }
.wk-chip:hover { background: var(--sunk); }
.wk-chip.on { background: var(--selected); border-color: var(--accent-line); font-weight: var(--w-bold); }
.wk-chip .n { color: var(--quiet); font-weight: var(--w-reg); }
.wk-chips > .wk-chips-off { margin-left: auto; }
/* a patient's items under the name, one line each, the most pressing first; a line opens its item */
main table.wk-prio-t .wk-pi { padding: 2px var(--s1); margin: 0 calc(-1 * var(--s1)); border-radius: var(--r-ctl); cursor: pointer; }
main table.wk-prio-t .wk-pi + .wk-pi { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); border-radius: 0; }
main table.wk-prio-t .wk-pi:hover { background: var(--sunk); }
main table.wk-prio-t .wk-pi:focus-visible { outline: none; box-shadow: var(--focus); }
main table.wk-prio-t .wk-pmore { display: inline-block; margin-top: var(--s1); }
:is(main.with-drawer, .spa.split) table.wk-prio-t .wk-pi + .wk-pi { display: none; } /* beside an open patient: the most pressing line only */
/* the patient opened beside the list: every item of theirs, each with its own button (his analysis section 7) */
.wk-pit { margin: var(--s2) 0 var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.wk-pith { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); margin-bottom: var(--s2); }
.wk-pith > .primary { margin-left: auto; }
.wk-pit table.wk-t { width: 100%; border-collapse: collapse; }
.wk-pit table.wk-t tr.row { cursor: pointer; }
.wk-pit table.wk-t tr.row > td { padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); vertical-align: top; }
.wk-pit table.wk-t tr.row:last-child > td { border-bottom: 0; }
.wk-pit table.wk-t tr.row:hover { background: var(--sunk); }
.wk-pit table.wk-t tr.row.open { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }
.wk-pit td.more { width: 1%; white-space: nowrap; text-align: right; }
.wk-pit .sub { display: block; } /* each item's why on its own line, as in the list */
.pd-wl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0; } /* Admin → Layouts by job: where My Worklist starts */
.wk-pit button.wk-prio { min-height: 0; margin-right: var(--s2); vertical-align: 1px; font-family: inherit; box-shadow: none; cursor: pointer; }
.wk-pit td.more .wk-more { width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--quiet); font-weight: var(--w-bold); cursor: pointer; }
/* Orders (B-320, his approved mock-ups 2026-10-12): one row per patient on the left, the patient's orders on the right, a line opened in place */
.ob-row .ob-said { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); margin-top: 2px; overflow-wrap: anywhere; }
.ob-row .st, .ob-l .st { margin-right: var(--s1); }
.ob-people { flex: 1 1 260px; }
.ob-cat { display: flex; justify-content: space-between; gap: var(--s2); margin-top: var(--s3); padding: var(--s1) var(--s3); background: var(--hmx-band); color: var(--hmx-band-ink); border-radius: var(--r-ctl); font-size: var(--t-sm); font-weight: var(--w-bold); }
.ob-cat .hint { font-weight: var(--w-reg); } .ob-cat .link { font-size: var(--t-sm); }
.ob-l { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, .8fr) auto auto; gap: var(--s1) var(--s3); align-items: center; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--t-sm); line-height: var(--lh-sm); }
.ob-l:hover { background: var(--sunk); } .ob-l.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }
.ob-l:focus-visible { outline: none; box-shadow: var(--focus); } .ob-l.past { color: var(--quiet); }
.ob-lw { overflow-wrap: anywhere; } .ob-ls { color: var(--quiet); } .ob-ls.amb-t { color: var(--late); } .ob-ld { white-space: nowrap; } .ob-lb { text-align: right; white-space: nowrap; }
.ob-in { margin: 0 0 var(--s2); padding: var(--s2) var(--s3) var(--s3); border: 1px solid var(--accent-line); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); }
.ob-who { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.ob-who b { color: var(--ink); }
.ob-safe { margin: var(--s2) 0; padding: var(--s1) var(--s3); border-radius: var(--r-ctl); background: var(--urgent-bg); color: var(--urgent); font-size: var(--t-sm); }
.ob-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--selected); }
.ob-nsaid { flex: 1 1 260px; min-width: 0; } .ob-nb { display: flex; flex-wrap: wrap; gap: var(--s2); }
.ob-nb button small { font-weight: var(--w-reg); color: var(--quiet); }
.ob-asg { margin-bottom: var(--s1); }
.ob-f { display: grid; gap: var(--s2); margin: var(--s2) 0; padding: var(--s3); border-radius: var(--r-ctl); background: var(--sunk); }
.ob-f label { display: grid; gap: 2px; } .ob-f label.check { display: flex; gap: var(--s2); }
.ob-opts { display: grid; gap: 2px; } .ob-f label.ob-opt { display: block; padding: 2px 0; }
.ob-tell { display: grid; gap: var(--s2); margin: var(--s1) 0 var(--s2) 22px; } .ob-tell[hidden] { display: none; } .ob-tell textarea { width: 100%; } .ob-tell .tell-to { margin: 0; }
.ob-kv { margin: var(--s2) 0; }
.ob-hist { margin: var(--s2) 0; font-size: var(--t-sm); } .ob-hist > div { padding: 2px 0; }
/* his rule 2026-10-31: action buttons always at the bottom RIGHT, the main one rightmost */
.ob-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.ob-keys { margin-left: auto; } .ob-nextp { display: none; }
.ob-mon { margin: 0 0 var(--s3); } .ob-monh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s2); }
.ob-fold { cursor: pointer; }
button.ob-mt { text-align: left; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
button.ob-mt:hover { background: var(--sunk); } button.ob-mt.on { background: var(--selected); border-color: var(--accent-line); }
.ob-mm { margin: 0; }
.ob-fil { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2) var(--s3); margin: 0 0 var(--s3); }
.ob-fl { display: grid; gap: 2px; font-size: var(--t-sm); }
.ob-vis { grid-template-columns: minmax(0, 1fr); } .ob-vis.has-open { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.ob-vis:not(.has-open) > .an-pane { display: none; } .ob-vis > .an-list { border: 0; background: none; }
.ob-vt tr.done { color: var(--quiet); } .ob-vt td { white-space: nowrap; }
.ob-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: var(--s1); vertical-align: 0; border: 1px solid var(--quiet); }
.ob-dot.ok { background: var(--done-dot); border-color: var(--done-dot); } .ob-dot.amb { background: var(--late-dot); border-color: var(--late-dot); } .ob-dot.red { background: var(--urgent); border-color: var(--urgent); }
@media (max-width: 760px) {
  .ob-l { grid-template-columns: minmax(0, 1fr) auto; }
  .ob-l .ob-ls, .ob-l .ob-lh { grid-column: 1; } .ob-l .ob-ld { display: none; } .ob-l .ob-lb { grid-column: 2; grid-row: 1 / span 3; }
  .ob-keys { display: none; } .ob-nextp { display: inline-flex; margin-left: auto; }
  .ob-fil { display: grid; grid-template-columns: 1fr 1fr; }
}
/* My work › Orders and results (B-431, his approved redesign 2026-10-14): the list and one card side by side, the report in a third
   column when opened; a phone shows one at a time (list → card → report). Red only for Critical; amber for overdue. */
.rz { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.rz.has-rep { grid-template-columns: minmax(280px, 340px) minmax(340px, 1fr) minmax(340px, 1fr); }
.rz-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rz-top { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.rz-title { font-size: var(--t-md); font-weight: var(--w-bold); } .rz-tr { margin-left: auto; display: flex; gap: var(--s1); }
.rz-counts { display: flex; flex-wrap: wrap; gap: var(--s1); padding: 0 var(--s3) var(--s2); border-bottom: 1px solid var(--line); }
.rz-cnt { font: inherit; font-size: var(--t-sm); line-height: var(--lh-sm); padding: 2px var(--s2); border: 1px solid var(--line-strong); border-radius: var(--r-round); background: var(--surface); color: var(--ink); cursor: pointer; }
.rz-cnt:disabled { color: var(--quiet); cursor: default; opacity: .7; } .rz-cnt.red { color: var(--urgent); border-color: var(--urgent-line); background: var(--urgent-bg); }
.rz-cnt.amb { color: var(--late); background: var(--late-bg); border-color: var(--late-dot); } .rz-cnt b { font-weight: var(--w-bold); }
.rz-band { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--h-band-2); padding: 2px var(--s3); background: var(--hmx-band); color: var(--hmx-band-ink); font-weight: var(--w-bold); font-size: var(--t-sm); }
.rz-band.red { background: var(--urgent-bg); color: var(--urgent); } .rz-band.fold { justify-content: flex-start; cursor: pointer; } .rz-k { font-weight: var(--w-reg); }
.rz-batch:empty { display: none; } .rz-batch { padding: 0 var(--s3); }
.rz-list .cp-list { border: 0; border-radius: 0; overflow: visible; background: none; }
.rz-list .cp-t-list tr.row > td.cp-main { padding: var(--s2) var(--s3); } .rz-list .cp-t-list tr.row:focus-visible { outline: none; box-shadow: var(--focus); }
.rz-list .cp-t-list tr.row.on td { background: var(--selected); } .rz-list .cp-t-list tr.row.on td.cp-main { box-shadow: inset 3px 0 0 var(--band); }
.rz-list .cp-l { overflow-wrap: anywhere; } :is(.rz-list, .rz-cl) .cp-l :is(.link, .primary.small, .secondary.small) { vertical-align: baseline; } :is(.rz-list, .rz-cl) .cp-l .link { height: auto; min-height: 0; padding: 0 2px; line-height: inherit; }
.rz-moreb { padding: 0 2px; }
.rz-chip { display: inline-block; font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); border-radius: var(--r-ctl); padding: 0 7px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.rz-chip.rz-n { background: var(--done-bg); color: var(--done); } .rz-chip.rz-a { background: var(--late-bg); color: var(--late); } .rz-chip.rz-c { background: var(--urgent-bg); color: var(--urgent); } .rz-chip.rz-x { background: var(--band-2); color: var(--quiet); }
.rz-more { display: block; padding: var(--s2) var(--s3); }
.rz-prow { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); } .rz-pn2 { margin-bottom: 2px; }
.rz-sub { display: block; width: 100%; text-align: left; padding: 2px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-sm); cursor: pointer; } .rz-sub:hover, .rz-sub.on { color: var(--accent); }
/* below the top bar (B-500: at top: gap-frame the card's first rows hid under the bar once the list scrolled) */
.rz-card, .rz-rep { position: sticky; top: calc(var(--bar-h, var(--h-top)) + var(--gap-frame)); max-height: calc(100vh - var(--bar-h, var(--h-top)) - 2 * var(--gap-frame)); overflow: auto; padding-bottom: 0; }
.rz-done { display: flex; gap: var(--s2); align-items: center; margin: 0 0 var(--s2); padding: var(--s1) var(--s3); border-radius: var(--r-ctl); background: var(--done-bg); color: var(--done); font-weight: var(--w-bold); }
.rz-backbar { justify-content: space-between; align-items: center; }
.rz-cl .cp-l { font-size: var(--t-md); line-height: var(--lh-md); margin-top: var(--s2); overflow-wrap: anywhere; }
.rz-cl .cp-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); font-size: var(--t-md); line-height: var(--lh-md); } .rz-cl .cp-top > b { font-size: var(--t-name); line-height: var(--lh-name); } .rz-cl .cp-top .link { margin-left: auto; font-size: var(--t-sm); }
.cp-sum { margin: 2px 0 0; padding-left: 20px; } .cp-sum li { margin: 0; overflow-wrap: anywhere; }
/* the key-points card (B-462, core.js kpHtml): the numbered findings read at the size of the line above them, each on its own line */
.kp-list { font-size: var(--t-sm); line-height: var(--lh-sm); } .rz-cl .kp-list { font-size: var(--t-md); line-height: var(--lh-md); }
.rz-newfax { display: block; margin: var(--s1) 0; font-weight: var(--w-bold); }
/* repeat faxes (B-495): "Arrived N times" and its copies, one quiet tinted block with no outline; the Other fax's suggestion */
.arr { display: grid; gap: 2px; margin: var(--s2) 0; padding: var(--s2) var(--s3); background: var(--bg); border-radius: var(--r-card); font-size: var(--t-sm); line-height: var(--lh-sm); } .arr-h { font-size: var(--t-md); } .arr-split { justify-self: end; }
.rp-sug { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s2) 0; padding: var(--s2) var(--s3); background: var(--bg); border-radius: var(--r-card); font-size: var(--t-md); line-height: var(--lh-md); }
.rz-sum { margin: 0 0 var(--s1); padding-left: 20px; }
.rz-which { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) 0; }
/* a choice is a long title (a fax's records, an order): it wraps inside the card instead of pushing the page wider on a phone (his report 2026-10-28) */
button[data-rzwhich] { height: auto; min-height: var(--h-ctl-sm); max-width: 100%; padding-block: 6px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.rz-repl { padding: var(--s2) 0; border-top: 1px solid var(--line); margin-top: var(--s2); } .rz-docs { margin-top: 2px; }
.rz-folds { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.rz-form:empty { display: none; }
.rec-syn { margin: var(--s1) 0; } .rec-by { margin: var(--s1) 0 0; } .rec-sum { margin: var(--s1) 0; } .rec-more, .rec-sumd { margin: var(--s2) 0; } .rec-more > summary, .rec-sumd > summary { cursor: pointer; color: var(--accent); font-weight: var(--w-bold); }
.rec-h { margin: var(--s2) 0 2px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); } .rec-ul { margin: 0; padding-left: 20px; } .rec-ul li { margin: 0 0 2px; overflow-wrap: anywhere; }
.dh-recs { padding: 0 var(--s3) var(--s2); max-height: 45vh; overflow-y: auto; overscroll-behavior: contain; } .rz-card.forming :is(.rz-xl, .rz-repl, .rz-folds, .rz-foot, .rz-newfax, .arr) { display: none; }
.rz-revh { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); } .rz-asg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); } .rz-asg label:nth-child(2) { grid-column: 1 / -1; }
.rz-bl { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 2px; }
.rz-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); margin: var(--s2) calc(-1 * var(--s4)) 0; padding: var(--s2) var(--s4); background: var(--surface); border-top: 1px solid var(--line); }
.rz-foot > .rz-repback { margin-right: auto; } .rz-repback { display: none; } /* the way back stays at the left; the actions are at the right */
.rz-reph { display: flex; align-items: center; gap: var(--s2); padding-bottom: var(--s2); } .rz-reph a { margin-left: auto; }
.rz-hl { margin: 0 0 var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--sunk); } .rz-hl mark { background: var(--sticky); color: var(--ink); font-weight: var(--w-bold); }
.rz-in { display: block; } .rz-in :is(.rz-card, .rz-rep) { position: static; max-height: none; overflow: visible; } .rz-in.has-rep :is(.rz-card, .rz-pick) { display: none; } .rz-in .rz-repback { display: inline-flex; } .rz-in .rz-foot { bottom: 0; } /* My Worklist's pane (B-499): one column; the report replaces the card */
.rz-pt { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); } .rz-pick { padding-bottom: var(--s2); }
.rz-pdf { height: calc(100vh - var(--h-top) - 220px); min-height: 360px; } .rz-repfacts { white-space: pre-wrap; padding: var(--s2) 0; }
/* the chart's Results section (B-501): the .rz list + card layout, a wider list, rows of date | study and line | action */
.cr-wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .cr-wrap.has-rep { grid-template-columns: minmax(260px, .9fr) minmax(300px, 1fr) minmax(320px, 1fr); }
.cr-right { display: contents; } .cr-wrap .rz-pick { display: none; } .cr-empty { padding: var(--s4) 0; text-align: center; }
.cr-top { flex-wrap: wrap; } .cr-top .rz-title { white-space: nowrap; } .cr-top .hint { flex: 1 1 150px; } .cr-view { margin-left: auto; } .cr-kinds { padding-top: var(--s2); } .cr-band { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s1); } .cr-none { padding: var(--s2) var(--s3); }
.cr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s2); border-bottom: 1px solid var(--line); padding-right: var(--s3); } .cr-row.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--band); }
.cr-main { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 0 var(--s3); align-items: baseline; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; padding: var(--s2) 0 var(--s2) var(--s3); cursor: pointer; min-width: 0; } .cr-main:hover { background: var(--sunk); }
.cr-d { color: var(--quiet); font-size: var(--t-sm); } .cr-t { overflow-wrap: anywhere; } .cr-t b { color: var(--ink); } .cr-l { grid-column: 2; color: var(--ink); font-size: var(--t-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.cr-src { display: inline-block; font-size: var(--t-xs); padding: 0 var(--s2); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); color: var(--quiet); white-space: nowrap; } .cr-tr { color: var(--quiet); }
.cr-act { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; padding-top: var(--s2); } .cr-go { color: var(--accent); font-weight: var(--w-bold); font-size: var(--t-sm); white-space: nowrap; }
.cr-more { display: block; padding: var(--s2) var(--s3); } .cr-ro { margin-top: var(--s2); } .cr-pli { display: flex; align-items: flex-start; gap: var(--s2); } .cr-pli > .sp-row { flex: 1; min-width: 0; }
@media (max-width: 760px) { .cr-wrap, .cr-wrap.has-rep { grid-template-columns: minmax(0, 1fr); } .cr-main { grid-template-columns: minmax(0, 1fr); } .cr-l { grid-column: 1; } .cr-row { grid-template-columns: minmax(0, 1fr); padding-right: 0; } .cr-act { padding: 0 var(--s3) var(--s2); } .cr-view { margin-left: 0; } }
@media (max-width: 760px) {
  .rz, .rz.has-rep { grid-template-columns: minmax(0, 1fr); } .rz.has-open .rz-list { display: none; } .rz:not(.has-open) .rz-card { display: none; } .rz.has-rep .rz-card { display: none; }
  .rz-card, .rz-rep { position: static; max-height: none; overflow: visible; } .rz-backbar { display: flex; }
  .rz-foot { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); } /* above the phone's bottom bar */ .rz-repback { display: inline-flex; }
  .rz-asg { grid-template-columns: minmax(0, 1fr); }
}
/* Inbox: the charts a waiting file may be (B-331) */
.ho-offer { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-ctl); background: var(--sunk); }
.ho-offq { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
/* Inbox: a waiting fax's best guesses, each with one line of why and "This is the patient" (B-476); the row's search opens under them */
.ho-cands { display: grid; gap: var(--s2); margin-top: var(--s2); }
.ho-cand { display: grid; gap: 1px; color: var(--ink); }
.ho-cand-t { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.ho-cand .hint { color: var(--quiet); }
.ho-find { margin-top: var(--s2); }
.ho-cand-who { min-width: 0; overflow-wrap: anywhere; }
/* The patient search (B-476): a result chosen on a touch screen is a finger-sized row, and choosing it shows who it is before anything is filed */
@media (pointer: coarse), (max-width: 640px) {
  .um-res br { display: none; }
  .um-res [data-pk] { display: flex; align-items: center; width: 100%; min-height: 44px; text-align: left; }
}
.um-conf { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-ctl); background: var(--sunk); }
.um-conf .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
/* Orders: Add the details to all N (B-329) */
.od-all { display: grid; gap: var(--s1); }
/* Referrals: each call says what it was (B-319): a Scheduling call counts toward scheduling; a Clinical call (the clinical team, before or
   after acceptance) and an Insurance call never do, and the Clinical call is marked so it is clearly understood */
.att-kind { font-weight: var(--w-bold); }
.att-row.att-clin { border-left: 3px solid var(--pf-purple); padding-left: var(--s2); }
.att-clin .att-kind { color: var(--pf-purple); }
.cc-rule { margin: 0 0 var(--s2); }
/* Faxed documents (B-340): the fax on the left, its workflow on the right; when the pane is narrow (the list beside it), the workflow
   first and the fax under it (⤢ gives the two side by side) */
.fd-grid { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); }
.fd-fax .pdfv-host { height: max(520px, calc(100vh - 260px)); }
@container (max-width: 820px) {
  .fd-grid { grid-template-columns: minmax(0, 1fr); }
  .fd-grid > .fd-fax { order: 2; }
  .fd-fax .pdfv-host { height: 70vh; }
}
.fd-fax > header a { margin-left: auto; color: var(--on-band); }
.fd-ctls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); padding: var(--s3); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-lift); }
.fd-ctl { display: grid; gap: 2px; min-width: 0; }
.fd-ctl .fd-k { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fd-ctl select, .fd-ctl input[type="date"] { width: 100%; min-width: 0; height: var(--h-ctl-sm); font-size: var(--t-sm); }
.fd-ctl :is(.wk-prio, .wk-ktype) { justify-self: start; }
.fd-steps { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin: 0; padding: 0; list-style: none; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fd-steps li.done { color: var(--done); }
.fd-steps li.now { color: var(--ink); font-weight: var(--w-bold); }
.fd-help { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: var(--s1) var(--s3); padding: var(--s3) var(--s3) 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.fd-help .k { color: var(--quiet); }
.fd-help .fd-v { font-weight: var(--w-bold); overflow-wrap: anywhere; }
.fd-cmm { margin: 0; padding: var(--s2) var(--s3) var(--s3); }
.fd-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fd-hist > summary { cursor: pointer; color: var(--quiet); font-size: var(--t-sm); }
.fd-hist > .fd-list { margin-top: var(--s2); }
.fd-acts { margin: 0; }
.fd-home { margin: 0; }
.fd-pick { display: grid; gap: var(--s2); }
.fd-pick button { justify-content: flex-start; text-align: left; }
.fd-inbox { margin-bottom: var(--s4); }
.fd-bar { margin: var(--s2) 0; }
.fd-tf { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }
.fd-th { margin: var(--s3) 0 var(--s1); font-size: var(--t-md); line-height: var(--lh-md); }
/* The fax placement card on Send & receive (his approval 2026-10-26): today's line and the days, the daily check, and what was made on a wrong chart */
.fs-score { margin-bottom: var(--s4); }
.fs-lead { margin: var(--s1) 0; }
.fs-more { margin: var(--s2) 0; }
.fs-more > summary { cursor: pointer; color: var(--quiet); font-size: var(--t-sm); }
.fs-h { margin: var(--s3) 0 var(--s1); font-size: var(--t-md); line-height: var(--lh-md); }
.fs-list, .fs-items { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.fs-list > li { display: grid; gap: var(--s1); padding: var(--s3); border-radius: var(--r-ctl); background: var(--sunk); }
.fs-who, .fs-items { font-size: var(--t-sm); line-height: var(--lh-sm); }
.fs-acts { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: flex-end; }
.wp-why label { display: grid; gap: var(--s1); }
/* Reply by fax (B-345): the suggested reply, To · Attention · Fax, the letter (every word can be changed; the parts to check highlighted),
   what is enclosed, Save draft and Send fax at the foot. In a narrow pane (and on the phone) the fields stack. */
.fd-ours { margin: 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.fd-ours .fd-k { color: var(--quiet); margin-right: var(--s1); }
.fd-reply:empty { display: none; }
/* A faxed document's summary (B-464/B-498, his mock-up "Fax summaries" signed off 2026-10-22): Autumn's one plain line, a few labelled lines for its Type,
   then Open the fax; a refill adds "The hub's checks" as the same inline lines. An unread fax is one amber line. */
.fd-sum { display: grid; gap: var(--s1); padding: var(--s3); }
.fd-sumline { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); }
.fd-sumline.amb-t { font-weight: var(--w-bold); }
.fd-sum .cp-l { margin-top: 0; overflow-wrap: anywhere; }
.fd-sum .q { color: var(--quiet); }
.fd-grey { color: var(--quiet); }
.fd-cont { padding-left: var(--s3); }
.fd-grp { margin: var(--s2) 0 0; padding-top: var(--s2); border-top: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.fd-typed { margin-top: var(--s2); }
.fd-readall { margin: 0; }
.wk-fact { font-size: var(--t-sm); line-height: var(--lh-sm); }
.rf { display: grid; gap: var(--s2); padding: var(--s3); }
.rf-chips { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.rf-chip { min-height: var(--h-ctl-sm); padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-round); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); cursor: pointer; }
.rf-chip.on { background: var(--selected); border-color: var(--accent); color: var(--accent); font-weight: var(--w-bold); }
.rf-chip:disabled { color: var(--quiet); cursor: default; }
.rf-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); }
.rf-f { display: grid; gap: 2px; min-width: 0; }
.rf-f .fd-k { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.rf-f input { width: 100%; min-width: 0; height: var(--h-ctl); }
.rf-letter { padding: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); overflow-wrap: anywhere; }
.rf-letter:focus { outline: none; box-shadow: var(--focus); }
.rf-letter p { margin: 0 0 var(--s2); }
.rf-letter p:last-child { margin-bottom: 0; }
.rf-check { background: var(--late-bg); color: inherit; border-bottom: 1px dashed var(--late); padding: 0 2px; }
.rf-table { width: 100%; margin: 0 0 var(--s2); border-collapse: collapse; font-size: var(--t-sm); line-height: var(--lh-sm); }
.rf-table :is(th, td) { padding: var(--s1); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rf-table th { background: var(--sunk); color: var(--quiet); font-weight: var(--w-bold); }
.rf-table :is(td, th):is(:nth-child(1), :nth-child(2), :nth-child(4)) { white-space: nowrap; }
.rf-say { margin: 0; }
.rf-enc { display: grid; gap: var(--s1); margin: 0; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.rf-enc legend { padding: 0 var(--s1); color: var(--quiet); font-size: var(--t-sm); }
.rf-enc label.check { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--t-sm); line-height: var(--lh-sm); }
.rf-ft { justify-content: flex-end; margin: 0; }
@container (max-width: 560px) {
  .rf-fields { grid-template-columns: minmax(0, 1fr); }
  .rf-ft { justify-content: stretch; }
  .rf-ft button { flex: 1; }
}
/* a screen's item (his design 2026-10-12): in the button's place on My Work, whose it waits on, quietly */
.wk-wait { display: inline-block; max-width: 100%; white-space: normal; text-align: right; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
/* on the Screen tab, at the right end of the verdict line and above Why: the quiet lines (approved, with whom, addressed) and the controls */
.si-strip { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); margin: var(--s1) 0 var(--s2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.si-line { color: var(--quiet); }
.si-form { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s1); width: max-content; max-width: 100%; }
.si-form > input[name=sinote] { flex: none; width: 16rem; height: var(--h-ctl-sm); font-size: var(--t-sm); }
.si-form > select { flex: none; width: 14rem; height: var(--h-ctl-sm); font-size: var(--t-sm); }
.si-strip button.small { height: var(--h-ctl-sm); min-height: 0; padding: 0 10px; font-size: var(--t-sm); }
/* the screen's Notes (his ask 2026-11-04): a tinted section under the card's headline; plain text, not bold; folds to one line + the latest */
.si-notes { padding: var(--s2) var(--s3) var(--s3); background: var(--selected); border-bottom: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); }
.si-nh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); list-style: none; cursor: pointer; }
.si-nh::-webkit-details-marker { display: none; }
.si-nh::before { content: "\2212"; width: 14px; flex: none; color: var(--accent-deep, var(--ink)); }
.si-notes:not([open]) > .si-nh::before { content: "+"; }
.si-nt { font-weight: var(--w-semi, 600); color: var(--accent-deep, var(--ink)); }
.si-ns { color: var(--ink); }
.si-nc { margin-left: auto; color: var(--quiet); }
.si-nlast { display: none; flex-basis: 100%; padding-left: 22px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-notes:not([open]) .si-nlast { display: block; }
.si-nx { margin: var(--s1) 0 0 22px; color: var(--ink); }
.si-nl { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 6px; }
.si-nl > li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s2); padding: 6px 10px; background: var(--surface); border-radius: 6px; }
.si-nw { color: var(--quiet); font-size: var(--t-xs, 12px); line-height: var(--lh-sm); }
.si-sep { display: none; }
.si-nb { font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); overflow-wrap: anywhere; }
.si-na { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: var(--s2); margin-top: var(--s2); }
.si-add { display: flex; gap: var(--s1); align-items: center; }
.si-add > input { width: 22rem; max-width: 100%; height: var(--h-ctl-sm); font-size: var(--t-sm); }
.si-notes button.small { height: var(--h-ctl-sm); min-height: 0; padding: 0 10px; font-size: var(--t-sm); }
@media (max-width: 640px) {
  .si-nl > li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .si-nw br { display: none; } .si-sep { display: inline; }
  .si-nlast { white-space: normal; padding-left: 0; }
  .si-notes:not([open]) .si-nlast { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .si-na, .si-add { flex-wrap: wrap; width: 100%; }
  .si-add > input { width: 100%; height: 44px; }
  .si-add > button { margin-left: auto; } /* buttons bottom right, also on a phone */
  .si-notes button.small { height: 44px; }
  .si-notes .si-form { width: 100%; } .si-notes .si-form > input[name=sinote], .si-notes .si-form > select { width: 100%; height: 44px; }
}
/* ───────── Assigned to someone, with the ask (his design 2026-11-04; public/js/assign.js) ─────────
   The band across the top of an item: "you" in the selected blue, everyone else's in the quieter grey; the ask in bold; buttons at the bottom right, Done the main one, rightmost.
   Hub tokens only, so Dark follows by itself. It reads its own width (the right panel is narrow), never the window's. */
.asn-band { container-type: inline-size; margin: 0 0 var(--s2); padding: var(--s2) var(--s3) var(--s2); border-radius: var(--r-card); font-size: var(--t-sm); line-height: var(--lh-sm); }
.asn-you { background: var(--selected); color: var(--ink); }
.asn-other { background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.asn-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); }
.asn-label { font-weight: var(--w-bold); color: var(--band); letter-spacing: .02em; }
.asn-other .asn-label { color: var(--quiet); }
.asn-from, .asn-by { color: var(--quiet); }
.asn-due { padding: 0 var(--s2); border-radius: var(--r-round); font-weight: var(--w-bold); font-size: var(--t-xs); line-height: 18px; background: var(--late-bg); color: var(--late); }
.asn-ask { margin-top: 2px; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); overflow-wrap: anywhere; }
.asn-rep { margin-top: 2px; color: var(--quiet); overflow-wrap: anywhere; }
.asn-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.asn-band button.small, .asn-new button.small { height: var(--h-ctl-sm); min-height: 0; padding: 0 10px; font-size: var(--t-sm); }
.asn-panel { margin-top: var(--s2); }
.asn-panel[hidden] { display: none; }
.asn-form { display: grid; gap: var(--s2); }
.asn-form input[type=text], .asn-form select { width: 100%; max-width: 32rem; }
.asn-l { display: grid; gap: 2px; color: var(--quiet); font-size: var(--t-sm); }
.asn-quick { display: flex; flex-wrap: wrap; gap: var(--s1); }
.asn-opts { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); }
.asn-tick { display: inline-flex; align-items: center; gap: var(--s1); color: var(--ink); font-size: var(--t-sm); }
.asn-err { color: var(--urgent); min-height: 0; }
.asn-err:empty { display: none; }
.asn-form .actions { padding: 0; border-top: 0; }
.asn-new { display: flex; flex-direction: column; align-items: flex-end; margin: var(--s1) 0 var(--s2); }
.asn-new .asn-panel { width: 100%; }
.asn-new.asn-quiet { margin: 0; }
/* the ask on a procedure step or prior auth (public/js/procedures.js pcAsnBox): under the step, across the step's width; its Assign… sits bottom right like a task's */
.pc-step > .pc-asn { grid-column: 2 / -1; min-width: 0; }
.pc-step > .pc-asn .asn-new { margin: 0; }
.pc-step > .pc-asn .asn-band { margin: var(--s1) 0 0; }
.asn-done { background: transparent; padding: var(--s1) var(--s3); }
.asn-dl { color: var(--ink); }
.asn-asked { color: var(--quiet); overflow-wrap: anywhere; }
@container (max-width: 420px) {
  .asn-band .asn-acts { justify-content: flex-end; }
  .asn-ask { font-size: var(--t-sm); line-height: var(--lh-sm); }
}
@media (max-width: 640px) {
  .asn-band button.small, .asn-new button.small { height: 44px; }
  .asn-form input[type=text], .asn-form select, .asn-form input[type=date] { height: 44px; max-width: none; }
}
/* the chart: "Assigned to you: N ›" under the name, the Open items sections, and one assignment opened inside the chart (the item on the left, the ask and replies on the right) */
.asn-chiprow { margin-top: var(--s1); }
.asn-chiprow[hidden] { display: none; }
.asn-chip { height: 22px; padding: 0 var(--s2); border-radius: var(--r-round); background: var(--surface); color: var(--band); border: 1px solid var(--accent-line); font-size: var(--t-sm); font-weight: var(--w-bold); line-height: 1; white-space: nowrap; cursor: pointer; }
.asn-chip:hover { background: var(--selected); }
@media (max-width: 767px) { .asn-chip { height: 44px; } } /* a touch target on the phone: the chip is a button (his rule: 44 px) */
.asn-sec-you > .cdl-band { background: var(--selected); color: var(--band); }
.asn-more { display: flex; justify-content: flex-end; padding: var(--s1) 0; }
.asn-rec .pcl-what { color: var(--ink); }
.asn-open { container-type: inline-size; }
.asn-nav { display: flex; align-items: center; gap: var(--s2); padding: 0 0 var(--s2); }
.asn-nav .spacer { flex: 1; }
.asn-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: var(--s4); align-items: start; }
.asn-item, .asn-thread { min-width: 0; }
.asn-thread { background: var(--surface); border-radius: var(--r-card); padding: var(--s3) var(--s4); box-shadow: var(--sh-lift); }
.asn-th { margin: 0 0 var(--s2); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.asn-t-ask { display: grid; gap: 2px; margin-bottom: var(--s2); overflow-wrap: anywhere; }
.asn-t-list { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s2); }
.asn-t-list li { display: grid; gap: 1px; padding: var(--s2); background: var(--sunk); border-radius: var(--r-ctl); overflow-wrap: anywhere; }
.asn-t-done { margin: var(--s2) 0 0; color: var(--ink); overflow-wrap: anywhere; }
@container (max-width: 640px) { .asn-cols { grid-template-columns: minmax(0, 1fr); } }
.cv-panel .asn-cols, .sp-body .asn-cols { grid-template-columns: minmax(0, 1fr); }
/* ───────── Provider pages (his approval 11/04/26; public/js/provider-pages.js, finance.js financeProviderPagesView) ─────────
   One provider, one published month, ten tabs. Hub tokens only, so Dark follows by itself; red is not used (it is for emergencies): a watch-out is amber. Cards sit on the page with no
   outline; buttons are at the bottom right, the main one rightmost. On a phone the tabs are a dropdown, tables scroll sideways with their first column fixed, and the calculators are one column.
   Print: the Analysis only, on its own light sheet (a letter page for each provider), made by the view when a print button is pressed. */
  :root { --ppg-1: var(--accent); --ppg-2: var(--late-dot); --ppg-soft: var(--sunk); }
  .ppg-wrap { max-width: 1060px; margin: 0 auto; display: grid; gap: var(--s3); min-width: 0; }
  .ppg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
  .ppg-bar .spacer { flex: 1; }
  .ppg-bar select { width: auto; min-width: 160px; max-width: min(280px, 60vw); }
  .ppg-note { background: var(--late-bg); color: var(--ink); border-radius: var(--r-card); padding: var(--s3) var(--s4); }
  .ppg-note p { margin: var(--s1) 0 0; }
  .ppg { display: grid; gap: var(--s3); min-width: 0; font-size: var(--t-md); line-height: var(--lh-md); }
  .ppg-head h1 { margin: 0; font-size: var(--t-lg); line-height: var(--lh-lg); }
  .ppg-sub { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
  .ppg-small { font-size: var(--t-xs); }
  .ppg p { margin: var(--s1) 0; max-width: 78ch; }
  .ppg-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
  .ppg-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--quiet); font-weight: var(--w-bold); padding: var(--s2) var(--s3); min-height: 0; }
  .ppg-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
  .ppg-tabsel { display: none; gap: var(--s1); }
  .ppg-tab { display: grid; gap: var(--s3); min-width: 0; }
  .ppg-tab[hidden] { display: none; }
  .ppg-card { background: var(--surface); box-shadow: var(--sh-lift); border-radius: var(--r-card); padding: var(--s3) var(--s4); min-width: 0; }
  .ppg-card h2 { margin: 0 0 var(--s1); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
  .ppg-card h3 { margin: var(--s3) 0 var(--s1); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
  .ppg-card ul { margin: var(--s1) 0; padding-left: var(--s5); } .ppg-card li { margin: 3px 0; }
  .ppg-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: var(--s3); }
  .ppg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s2); }
  .ppg-tile { background: var(--surface); box-shadow: var(--sh-lift); border-radius: var(--r-card); padding: var(--s3); }
  .ppg-tiles.soft .ppg-tile { background: var(--sunk); box-shadow: none; }
  .ppg-tile .v { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
  .ppg-tile .l { font-size: var(--t-sm); color: var(--quiet); }
  .ppg-tw { overflow-x: auto; }
  .ppg table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); margin-top: var(--s1); }
  .ppg th, .ppg td { text-align: left; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); white-space: nowrap; }
  .ppg th { background: var(--surface); color: var(--quiet); font-weight: var(--w-bold); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; }
  .ppg .n { text-align: right; font-variant-numeric: tabular-nums; }
  .ppg tr.tot td { font-weight: var(--w-bold); border-bottom: 0; }
  .ppg tr.mark td { background: var(--sunk); }
  .ppg-tw table tr.mark :is(th, td):first-child { background: var(--sunk); }
  .ppg-tw table :is(th, td):first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  .ppg-tiles.soft ~ .ppg-tw table :is(th, td):first-child { background: var(--surface); }
  .ppg-pill { display: inline-block; font-size: var(--t-xs); font-weight: var(--w-bold); padding: 1px var(--s2); border-radius: var(--r-round); white-space: nowrap; flex: none; background: var(--sunk); color: var(--quiet); }
  .ppg-pill.pg { background: var(--done-bg); color: var(--done); } .ppg-pill.pw, .ppg-pill.pb { background: var(--late-bg); color: var(--late); }
  .ppg-kp { border-top: 1px solid var(--line); padding: var(--s2) 0; } .ppg-kp:first-of-type { border-top: 0; }
  .ppg-kp summary { cursor: pointer; list-style: none; display: flex; gap: var(--s2); align-items: baseline; }
  .ppg-kp summary::-webkit-details-marker { display: none; }
  .ppg-kp summary::before { content: "›"; color: var(--quiet); font-weight: var(--w-bold); width: 10px; flex: none; transition: transform .15s; }
  .ppg-kp[open] summary::before { transform: rotate(90deg); }
  .ppg-kp .body { padding: var(--s1) 0 var(--s1) var(--s5); }
  .ppg-opp { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s1) var(--s3); align-items: baseline; border-top: 1px solid var(--line); padding: var(--s2) 0; }
  .ppg-opp:first-of-type { border-top: 0; }
  .ppg-opp .amt { font-weight: var(--w-bold); font-variant-numeric: tabular-nums; text-align: right; } .ppg-opp .what { font-weight: var(--w-bold); }
  .ppg-opp .how { grid-column: 2 / 4; color: var(--quiet); font-size: var(--t-sm); }
  .ppg-chart { position: relative; margin-top: var(--s2); }
  .ppg-chart svg { display: block; width: 100%; max-width: 680px; height: auto; overflow: visible; }
  .ppg-chart text { fill: var(--quiet); font-size: var(--t-xs); font-family: inherit; } .ppg-chart .val { fill: var(--ink); font-weight: var(--w-bold); } .ppg-chart .grid { stroke: var(--line); stroke-width: 1; }
  .ppg-legend { display: flex; gap: var(--s4); font-size: var(--t-sm); color: var(--quiet); margin-top: var(--s1); }
  .ppg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .ppg-legend i.k1 { background: var(--ppg-1); } .ppg-legend i.k2 { background: var(--ppg-2); }
  .ppg-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); font-size: var(--t-xs); padding: 4px var(--s2); border-radius: var(--r-ctl); white-space: nowrap; transform: translate(-50%, -115%); z-index: 2; }
  .ppg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s3) var(--s5); margin-top: var(--s2); }
  .ppg-form label { display: grid; gap: 3px; font-size: var(--t-sm); color: var(--quiet); } .ppg-form .h { font-size: var(--t-xs); color: var(--quiet); }
  .ppg input[type=number] { width: 104px; text-align: right; }
  .ppg-form input[type=number], .ppg-form input[type=month], .ppg-form select { width: 100%; max-width: 100%; }
  .ppg-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); background: var(--sunk); border-radius: var(--r-card); padding: var(--s2) var(--s4); }
  .ppg-share label { display: flex; align-items: center; gap: var(--s1); font-weight: var(--w-bold); }
  .ppg-share input[type=number] { width: 88px; }
  .ppg-share-read { flex-basis: 100%; }
  .ppg-plain p { font-size: var(--t-lg); line-height: var(--lh-lg); max-width: 60ch; }
  .ppg-amber { color: var(--late); font-weight: var(--w-bold); }
  .ppg-checks { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); }
  .ppg td input[type=number] { width: 96px; } .ppg td input[type=text] { width: 230px; }
  .ppg-goalrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
  .ppg-sp { flex: 1; }
  .ppg-set { margin: var(--s2) 0; background: var(--sunk); border-radius: var(--r-card); padding: var(--s2) var(--s3); }
  .ppg-set > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: baseline; }
  .ppg-settable td:first-child { color: var(--quiet); }
  .ppg-settable input[type=number] { width: 120px; }
  .ppg-foot { margin-top: var(--s2); }
  .ppg-actions { display: block; }
  .ppg-printbox { display: none; }
  @media (max-width: 640px) {
    .ppg-tabs { display: none; } .ppg-tabsel { display: grid; } .ppg-tabsel select { width: 100%; }
    .ppg-form, .ppg-grid2 { grid-template-columns: minmax(0, 1fr); }
    .ppg-card { padding: var(--s3); } .ppg-opp { grid-template-columns: 1fr auto; } .ppg-opp .ppg-pill { grid-column: 1 / 3; justify-self: start; } .ppg-opp .how { grid-column: 1 / 3; }
    .ppg-bar select { max-width: 44vw; }
  }
  /* the print sheet: always light, letter size, the Analysis only (a sheet for each provider, each on its own page) */
  .ppg-sheet { --ink: #18202b; --quiet: #5d6673; --surface: #ffffff; --sunk: #f3f5f8; --line: #d9dee5; --accent: #1f3a5f; --late: #8a5300; --late-dot: #eb6834; --late-bg: #fcf2dc; --done: #1d6b42; --done-bg: #e4f2ea; --ppg-1: #2a78d6; --ppg-2: #eb6834;
    background: #ffffff; color: #18202b; font-size: 12px; line-height: 1.45; }
  .ppg-sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; border-bottom: 2px solid #1f3a5f; padding-bottom: 6px; margin-bottom: 10px; }
  .ppg-sheet-head h1 { margin: 0; font-size: 20px; color: #16293f; } .ppg-sheet-head span { color: #5d6673; }
  .ppg-sheet-foot { margin-top: 16px; padding-top: 6px; border-top: 1px solid #d9dee5; color: #5d6673; font-size: 10.5px; }
  .ppg-sheet .ppg-tab { gap: 10px; } .ppg-sheet .ppg-card { box-shadow: none; padding: 0 0 6px; break-inside: avoid; } .ppg-sheet .ppg-card h2 { font-size: 14px; color: #16293f; border-bottom: 1px solid #d9dee5; padding-bottom: 2px; }
  .ppg-sheet .ppg { font-size: 12px; line-height: 1.45; } .ppg-sheet table { font-size: 11.5px; } .ppg-sheet .ppg-tw table :is(th, td):first-child { position: static; }
  @media print {
    .ppg-wrap > :not(#ppgprintbox) { display: none !important; }
    .ppg-printbox { display: block; }
    .ppg-printbox .ppg-sheet { break-after: page; }
    .ppg-printbox .ppg-sheet:last-child { break-after: auto; }
    .ppg-sheet .ppg-tab[hidden] { display: grid !important; }
  }

/* ───────── the procedure order card (B-383, his approved design 2026-10-13; public/js/proc-card.js, src/proc-card.js) ─────────
   The same shape as the referral screen card: the state chip with ONE reason, six fixed rows, the buttons at the foot, the rest folded
   under "How we got here". Colour only on the chip and the words that need it (his rule: said once). The Safety row never folds. */
.poc-card { container: poc / inline-size; }
.poc-vd { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: flex-start; padding: 10px var(--s3); border-bottom: 1px solid var(--line); }
.poc-vd > b { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); min-width: 0; flex: 1 1 14rem; }
.poc-rows { display: grid; grid-template-columns: 84px minmax(0, 1fr); margin: 0; padding: 2px var(--s3) 6px; }
.poc-rows > :is(dt, dd) { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.poc-rows > dt { font-size: var(--t-sm); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--quiet); padding-right: var(--s2); }
.poc-rows > dd { min-width: 0; color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); }
.poc-rows > :nth-last-child(-n+2) { border-bottom: 0; }
.poc-i.amb { color: var(--late); font-weight: var(--w-bold); }
.poc-i.red { color: var(--urgent); font-weight: var(--w-bold); }
.poc-i.ok { color: var(--done); }
.poc-i.q { color: var(--quiet); }
.poc-sep { color: var(--quiet); }
.poc-read { margin-top: var(--s1); }
.poc-read > :is(button, a) { margin-left: var(--s2); }
.poc-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-left: var(--s1); }
.poc-acts > select { width: auto; height: var(--h-ctl-sm); font-size: var(--t-sm); }
/* a row's links read as words in its line (his report 2026-11-06 on the phone: "Edit" alone on a line, gaps between wrapped lines): the 40px touch height
   of a phone link stretched the whole line, so here a link flows with the text; a pill sits on the line without raising it */
.poc .poc-acts:not(:has(select, .secondary, .primary)) { display: inline; margin-left: var(--s1); }
.poc .poc-acts > button.link { display: inline; height: auto; min-height: 0; padding: 2px 0; margin-right: var(--s2); line-height: inherit; font-size: inherit; white-space: nowrap; }
.poc .poc-i > .pill { display: inline-block; height: auto; padding: 1px 8px; line-height: 1.25; vertical-align: 1px; }
.poc-src { margin-top: 2px; font-size: var(--t-sm); } .poc-src > summary { cursor: pointer; color: var(--accent); } .poc-src > ul { margin: 2px 0 2px; padding-left: 18px; color: var(--quiet); }
.pvk .poc-calm .ck-sec { grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s3); } /* Steps · Spine surgery: the value right after its label, no wide empty column */
.poc-ft { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--sunk); }
.poc-hb { padding: 0 var(--s3) var(--s3); }
.pc-poc:not(.pc-min) > header .pc-trk { display: none; } /* the chip is in the card below; on the folded line it is the header's */
.pc-poc > .poc { border-bottom: 0; }
.pc-poc > .poc-hb > .pcr { margin-top: var(--s2); }
/* the simple card (preview "Simple procedure order"): what was ordered, one Now box, five stages of one line, the full rows under More details */
.poc-s .poc-ord { padding: var(--s2) var(--s3) 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.poc-now { margin: var(--s2) var(--s3) 0; padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--selected); display: grid; gap: var(--s1); min-width: 0; }
.poc-now.amb { background: var(--late-bg); }
.poc-nl { font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.poc-now.amb .poc-nl { color: var(--late); }
.poc-nt { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); overflow-wrap: anywhere; }
.poc-nd { font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); overflow-wrap: anywhere; }
.poc-nw { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.poc-nx { min-width: 0; } .poc-nx > select { width: 100%; max-width: 24rem; }
.poc-wl { padding-left: var(--s3); }
.poc-n2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); padding-top: var(--s2); font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.poc-n2t { min-width: 0; flex: 1 1 14rem; overflow-wrap: anywhere; }
.poc-now .fill-row > button { margin-left: auto; }
.poc-n2 > button { margin-left: auto; } /* buttons bottom right, wrapped or not */
.poc-nx:has(> button) { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s1) var(--s2); }
.poc-now .poc-ft { padding: var(--s1) 0 0; border-top: 0; background: none; }
.poc-sts { list-style: none; margin: 0; padding: var(--s2) var(--s3) var(--s2); display: grid; gap: var(--s2); }
.poc-st { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s2); color: var(--quiet); font-size: var(--t-md); line-height: var(--lh-md); min-width: 0; }
.poc-m { text-align: center; font-weight: var(--w-bold); }
.poc-sx { min-width: 0; overflow-wrap: anywhere; }
.poc-sn { color: var(--ink); font-weight: var(--w-bold); margin-right: var(--s1); }
.poc-st.ok > .poc-m { color: var(--done); }
.poc-st.cur > .poc-m, .poc-st.is-cur > .poc-m { color: var(--accent); }
.poc-st.is-cur { color: var(--ink); }
.poc-st.amb > .poc-m, .poc-st.amb .poc-sn { color: var(--late); }
.poc-st.na { opacity: .75; }
.poc-nh { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.poc-chg { display: inline; }
.poc-chg > summary { display: inline; white-space: nowrap; cursor: pointer; list-style: none; color: var(--accent); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); }
.poc-chg > summary::-webkit-details-marker { display: none; }
.poc-chg > summary::after { content: " ▾"; }
.poc-chg-l { display: grid; justify-items: start; gap: var(--s1); margin-top: var(--s1); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--sh-lift); }
.poc-chg-l > button[hidden] { display: none; }
.poc .poc-chg-l > button.link { display: block; height: auto; min-height: 0; padding: 2px 0; text-align: left; white-space: normal; font-size: var(--t-sm); }
.poc-more { padding: 0 var(--s3) var(--s2); }
.poc-more > summary { cursor: pointer; font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--accent); list-style: none; padding: var(--s1) 0; }
.poc-more > summary::-webkit-details-marker { display: none; }
.poc-more > summary::after { content: " ▸"; } .poc-more[open] > summary::after { content: " ▾"; }
.poc-more[open] > summary { margin-bottom: var(--s1); }
.poc-more .poc-rows, .poc-more .poc-calm { padding-left: 0; padding-right: 0; }
@media (max-width: 640px) { /* the phone: each label above its line, the foot's buttons wrap */
  .poc-rows { grid-template-columns: minmax(0, 1fr); }
  .poc-rows > dt { padding-bottom: 0; border-bottom: 0; }
  .how-ft > .how-hint { display: none; }
}
/* Admin → Letter templates (B-435, his approved page 2026-10-14): each letter opens in place; amber only for wording waiting for approval */
.lt-h { margin: var(--s4) 0 var(--s1); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
.lt-h4 { margin: var(--s3) 0 var(--s1); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); text-transform: uppercase; letter-spacing: .04em; }
.lt-lib { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); overflow: hidden; }
.lt-head, .lt-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 72px; gap: var(--s3); align-items: start; padding: var(--s2) var(--s3); }
.lt-head { min-height: var(--h-colhead); align-items: center; background: var(--sunk); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.lt-row { border-top: 1px solid var(--line); }
.lt-title, .lt-state { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.lt-title .sub { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-state .sub { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-act { text-align: right; white-space: nowrap; }
.lt-open { padding: var(--s3); background: var(--sunk); border-top: 1px solid var(--line); }
.lt-vers { display: grid; background: var(--surface); border-radius: var(--r-ctl); }
.lt-vrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-vrow:first-child { border-top: 0; }
.lt-edit { display: grid; gap: var(--s3); min-width: 0; }
.lt-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.lt-left, .lt-right { display: grid; gap: var(--s2); min-width: 0; }
.lt-left label { display: grid; gap: var(--s1); font-size: var(--t-sm); color: var(--quiet); }
.lt-left textarea { width: 100%; min-width: 0; font-family: inherit; font-size: var(--t-md); line-height: var(--lh-md); }
.lt-left .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.lt-gt { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.lt-fills { display: grid; gap: var(--s1); }
.lt-fg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.lt-gn { min-width: 112px; font-size: var(--t-sm); color: var(--quiet); }
.lt-reasons ol { margin: var(--s1) 0; padding-left: 20px; display: grid; gap: var(--s1); }
.lt-reasons li input { width: calc(100% - 72px); min-width: 0; }
.lt-wait { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-card); background: var(--late-bg); color: var(--late); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-wait .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.lt-diff { padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); white-space: pre-wrap; font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-diff del { color: var(--quiet); }
.lt-diff ins { font-weight: var(--w-bold); text-decoration: none; }
.lt-backbox { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2); }
.lt-backbox label { display: grid; gap: var(--s1); flex: 1 1 220px; }
.lt-sheet { border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.lt-sheet-head { display: grid; gap: 2px; padding: var(--s2) var(--s3); background: var(--band); color: var(--on-band); }
.lt-sheet-head span { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--on-band-quiet); }
.lt-sheet-body { padding: var(--s3); font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); overflow-wrap: anywhere; }
mark.lt-blank { padding: 0 var(--s1); border-radius: var(--r-ctl); background: var(--selected); color: var(--accent); border-bottom: 2px solid var(--accent); }
.lt-tone { margin: 0; padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--sunk); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lt-who { margin: var(--s2) 0; }
.lt-ppl { margin: var(--s1) 0; padding-left: 20px; }
.lt-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--t-sm); color: var(--quiet); }
/* Notices that fax themselves (Admin → Letter templates, the chart's Letters): a row is the notice, where it stands, and Hold longer / Cancel */
.nt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.nt-row:first-child { border-top: 0; }
.nt-acts { display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }
@media (max-width: 640px) { .nt-row { grid-template-columns: minmax(0, 1fr); } .nt-acts { justify-content: flex-end; } }
@media (max-width: 640px) { .lt-head { display: none; } .lt-row { grid-template-columns: minmax(0, 1fr) auto; } .lt-state { grid-column: 1 / -1; grid-row: 2; } .lt-vrow { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } .lt-cols { grid-template-columns: minmax(0, 1fr); } .lt-gn { min-width: 0; flex-basis: 100%; } .lt-vrow .lt-act { text-align: left; } }
/* the chart's Write a letter: each letter says Ready now (the hub fills it) or Autumn writes; a standard letter's blanks wait to be typed */
.ol-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); border: 1px solid var(--line-strong); border-radius: var(--r-round); font-size: var(--t-sm); line-height: 1; color: var(--quiet); white-space: nowrap; }
.ol-tag.ol-now { border-color: var(--ink); color: var(--ink); font-weight: var(--w-bold); }
.ol-key { margin: 0 0 var(--s2); }
.ol-blanks { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-card); background: var(--selected); }
.ol-blanks label { display: grid; gap: var(--s1); font-size: var(--t-sm); color: var(--ink); }
.ol-blanks input { background: var(--surface); border: 2px solid var(--accent); }
.ol-made { padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--sunk); color: var(--quiet); font-size: var(--t-sm); }
main .wk-sech .wk-n.pc-latepill { width: auto; padding: 0 var(--s2); background: var(--late-bg); color: var(--late); font-weight: var(--w-bold); white-space: nowrap; } /* how many are late: amber, the band's own, at every width */
/* The Communication log (B-444, his approved page 2026-10-15): one line per fax, letter, text or call, newest first; its words open the
   item where it lives. Amber only on a failure. On a phone (or a narrow chart) each entry is two lines: what it was and how it ended,
   then when, in or out, with whom and who on our side. */
.cl-card .cl-tools { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) var(--s3); }
.cl-list { list-style: none; margin: 0 var(--s3) var(--s2); padding: 0; }
.cl-row { display: grid; grid-template-columns: 9.5em 2.4em minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.3fr); grid-template-areas: "when dir what who by st";
  column-gap: var(--s3); align-items: baseline; padding: var(--s1) 0; border-top: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); }
.cl-row:first-child { border-top: 0; }
.cl-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-when { grid-area: when; color: var(--quiet); }
.cl-dir { grid-area: dir; color: var(--quiet); }
.cl-row > .cl-what { grid-area: what; display: block; font-weight: var(--w-bold); text-align: left; justify-self: start; max-width: 100%; }
.cl-said { font-weight: var(--w-reg); color: var(--quiet); }
.cl-who { grid-area: who; }
.cl-by { grid-area: by; color: var(--quiet); }
.cl-st { grid-area: st; }
.cl-st.fail { color: var(--late); font-weight: var(--w-bold); }
.cl-row > .cl-st.fail { white-space: normal; overflow: visible; }
.cl-st.fail::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--s1); border-radius: var(--r-round); background: var(--late-dot); }
@media (max-width: 640px) {
  .cl-row { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "what what what st" "when dir by by" "who who who who"; row-gap: 0; padding: var(--s2) 0; }
  .cl-row > .cl-who { white-space: normal; }
  .cl-st { text-align: right; }
  .cl-row:has(> .cl-st.fail) { grid-template-areas: "what what what what" "st st st st" "when dir by by" "who who who who"; }
  .cl-row > .cl-st.fail { text-align: left; white-space: normal; }
}
.pp-narrow .cl-row { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "what what what st" "when dir by by" "who who who who"; row-gap: 0; padding: var(--s2) 0; }
.pp-narrow .cl-row > .cl-who { white-space: normal; }
.pp-narrow .cl-st { text-align: right; }
.pp-narrow .cl-row:has(> .cl-st.fail) { grid-template-areas: "what what what what" "st st st st" "when dir by by" "who who who who"; }
.pp-narrow .cl-row > .cl-st.fail { text-align: left; white-space: normal; }
/* ───────── Referral analysis at the top of the Dashboard (B-494, his sign-off 2026-10-22) ─────────
   The hub's own parts only: the blue title band (.cardhead), the cards (.panel), the tables and the count cards (.tcard). New here: the
   little bar in the path, the amber "waiting" words, the quiet notes, and the phone's cards (a table row becomes a block, each value
   led by its label from data-l). Print shows the analysis alone. */
.ran { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.ran .listhead { margin: 0; } .ran-head h2 { margin: 0; font-size: var(--t-lg); line-height: var(--lh-lg); }
.today4.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.ran-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); } .ran-pick .seg { flex-wrap: wrap; max-width: 100%; }
.ran-dates { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-sm); color: var(--quiet); } .ran-dates input { width: auto; }
.ran-sum { margin: 0; } .ran-note { display: block; }
.ran-card { padding: 0; overflow: hidden; } .ran-card .cardhead { cursor: default; }
.ran-c { margin-left: auto; font-size: var(--t-sm); font-weight: var(--w-reg); color: var(--on-band-quiet); }
.ran-body { padding: var(--s3) var(--s4) var(--s4); display: grid; gap: var(--s3); }
.ran-body p { margin: 0; }
.ran-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); gap: var(--s3); align-items: start; }
.ran-tbl { width: 100%; border-collapse: collapse; }
.ran-tbl th { text-align: left; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); padding: var(--s1) var(--s2); }
.ran-tbl td { padding: var(--s1) var(--s2); border-top: 1px solid var(--line); vertical-align: top; }
.ran-tbl th.num, .ran-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ran-step { font-weight: var(--w-bold); white-space: nowrap; }
.ran-n { font-weight: var(--w-bold); font-size: var(--t-md); }
.ran-pc { white-space: nowrap; width: 22%; }
.ran-bar { display: inline-block; width: calc(100% - 44px); min-width: 60px; height: 8px; vertical-align: middle; background: var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.ran-bar i { display: block; height: 8px; background: var(--band); }
.ran-amb, .ran-amb .ran-n { color: var(--late); }
.ran-clinic { display: block; } .ran-back { font-weight: var(--w-bold); }
@media (max-width: 640px) {
  .today4.three { grid-template-columns: 1fr; }
  .ran-tbl thead { display: none; }
  .ran-tbl tr { display: block; padding: var(--s2) 0; border-top: 1px solid var(--line); } .ran-tbl tr:first-child { border-top: 0; }
  .ran-tbl td { display: block; border-top: 0; padding: 2px 0; text-align: left; width: auto; white-space: normal; overflow-wrap: anywhere; }
  .ran-tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--quiet); font-size: var(--t-sm); }
  .ran-tbl td.ran-step::before { content: none; } .ran-step { font-size: var(--t-md); }
  .ran-bar { width: 50%; } .ran-note { display: inline; margin-left: var(--s1); }
  .ran-body { padding: var(--s3); }
}
@media print {
  body.ran-printing * { visibility: hidden; }
  body.ran-printing #ra-mount, body.ran-printing #ra-mount * { visibility: visible; }
  body.ran-printing #ra-mount { position: absolute; left: 0; top: 0; width: 100%; }
  body.ran-printing .ran-noprint { display: none; }
  body.ran-printing .ran-card { break-inside: avoid; box-shadow: none; }
  body.ran-printing .ran-two { display: block; }
}

/* ───────── the next procedure day (his approved idea 2026-10-26; public/js/proc-day.js): one card per patient, one chip per requirement, the gaps with their owner ───────── */
.pdy-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); padding: var(--s3) var(--s4); margin-bottom: var(--s3); display: grid; gap: var(--s2); }
.pdy-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); min-width: 0; }
.pdy-name { font-size: var(--t-md); line-height: var(--lh-md); text-align: left; }
.pdy-what { min-width: 0; overflow-wrap: anywhere; }
.pdy-marks { display: flex; flex-wrap: wrap; gap: var(--s1); }
.pdy-gaps, .pdy-all ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.pdy-gaps li, .pdy-all li { font-size: var(--t-md); line-height: var(--lh-md); overflow-wrap: anywhere; }
.pdy-gaps li b, .pdy-all li b { font-weight: var(--w-bold); }
.pdy-own { color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; }
.pdy-st { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.pdy-st.amb { color: var(--late); } .pdy-st.ok { color: var(--done); }
.pdy-all > summary { cursor: pointer; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.pdy-all[open] > summary { margin-bottom: var(--s1); }
.pdy-hold, .pdy-acts { margin: 0; }
.pdy-acts a { color: var(--accent); font-size: var(--t-sm); line-height: var(--lh-sm); }
@media (max-width: 640px) { .pdy-card { padding: var(--s3); } .pdy-own { white-space: normal; } .pdy-gapsum { display: none; } }

/* The patient card (his approved design 2026-10-28, "One patient, everything together"): one card per patient, one line per open piece of work, one named button on each line.
   Used by My work (By patient), the card in the right panel and the chart's Open items tab. Two marks only: red Today, amber Late. The others' lines are quieter, never hidden. */
.wk-by { margin-left: auto; }
.wl-head:has(.wk-by:not([hidden])) { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.wk-bypat :is(#wkviews, #wkfb, #wkfslot, #wktcslot, #wkbulk) { display: none; }
.cdl-sum { font-size: var(--t-md); line-height: var(--lh-md); padding: var(--s1) var(--s1) var(--s2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.pc-list { display: grid; gap: var(--s2); align-content: start; }
.pc-list:not(.pc-phone) { gap: 0; }
.pcm { display: grid; gap: 2px; width: 100%; text-align: left; padding: var(--s2) var(--s3); background: var(--surface); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); font: inherit; cursor: pointer; }
.pcm:hover { background: var(--sunk); } .pcm.on { background: var(--selected); }
.pcm-h { display: flex; align-items: center; gap: var(--s1); }
.pcm-h b { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.pcm-h .pcl-mark { margin-right: 0; }
.pcm-s { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); overflow-wrap: anywhere; }
.pcd-wrap, .pcd-side { min-width: 0; }
.pcd { background: var(--surface); border-radius: var(--r-card); padding: var(--s3); display: grid; gap: var(--s1); min-width: 0; }
.pcd-side .pcd { padding: var(--s3) var(--s3) var(--s4); }
.pcd-who { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.pcd-who b { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.pcd-who small { font-size: var(--t-sm); color: var(--quiet); }
.pcd .cp-visits { font-size: var(--t-sm); color: var(--quiet); }
.cdl-sec { display: grid; min-width: 0; }
.cdl-band { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--h-band-2); padding: 0 var(--s2); margin-top: var(--s2); border: 0; border-radius: var(--r-ctl); background: var(--hmx-band); color: var(--hmx-band-ink); font: inherit; text-align: left; cursor: pointer; }
.cdl-band b { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); }
.cdl-band .wk-pm { width: 14px; text-align: center; color: var(--quiet); }
.cdl-bh { font-size: var(--t-sm); font-weight: var(--w-reg); color: var(--quiet); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcd-none { font-size: var(--t-sm); color: var(--quiet); padding: var(--s1) 0; }
.pcd-more, .pcd-chart { justify-self: start; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--accent); background: none; border: 0; padding: var(--s1) 0; text-decoration: none; }
.pcl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: var(--s1) 0; min-width: 0; }
.pcl-what { min-width: 0; font-size: var(--t-md); line-height: var(--lh-md); overflow-wrap: anywhere; }
.pcl-t { font-weight: var(--w-bold); }
.pcl-st { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.pcl-st b { color: var(--ink); font-weight: var(--w-bold); }
.pcl.theirs .pcl-what, .pcl.theirs .pcl-t, .pcl.theirs .pcl-st b { color: var(--quiet); }
.pcl.done .pcl-what { color: var(--quiet); } .pcl.done .pcl-t { font-weight: var(--w-reg); }
.pcl-pat { font-weight: var(--w-bold); }
.pcl-mark { display: inline-block; font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-bold); border-radius: var(--r-round); padding: 0 var(--s2); margin-right: var(--s1); vertical-align: 1px; }
.pcl-mark.stat { background: var(--urgent-bg); color: var(--urgent); } .pcl-mark.high { background: var(--late-bg); color: var(--late); }
.pcl-btn { height: var(--h-ctl); padding: 0 var(--s3); font-size: var(--t-sm); font-weight: var(--w-bold); white-space: nowrap; background: var(--selected); color: var(--band); border: 1px solid var(--accent-line); border-radius: var(--r-ctl); }
.pcl-btn.q { background: none; border-color: var(--line-strong); color: var(--quiet); }
.wk-bycard :is(th, td).wk-when { display: none; }
.wk-state { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.wk-state b { color: var(--ink); font-weight: var(--w-bold); }
.pcl-wait { font-size: var(--t-sm); color: var(--quiet); white-space: nowrap; }
.pcd-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pc-tab { max-width: 760px; } .pc-tab.snrc { max-width: none; } /* the snapshot layout uses the full width like the other chart tabs (its tables line up across it) */
@media (max-width: 640px) { .pcl-btn { min-height: 40px; } .pcm { min-height: 44px; } .pcd-more, .pcd-chart { min-height: 40px; display: inline-flex; align-items: center; } }
/* ---------- the snapshot layout (preview "Snapshot layout", public/js/snaprows.js; his design 2026-11-07): label column, one row per topic,
   tight rows with a thin line between, small tables whose columns line up; plain text, amber only on the "!" and the Safety label ---------- */
  .snr { display: block; }
  .snr-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s3); padding: 5px var(--s4); border-top: 1px solid var(--line); }
  .snr-l { color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
  .snr-warn > .snr-l { color: var(--late); }
  .snr-c { color: var(--ink); font-size: var(--t-sm); min-width: 0; overflow-wrap: anywhere; container: snrc / inline-size; } /* its own width, not the whole row's, decides when a table drops to short lines */
  .snr-c p { margin: 0 0 2px; }
  .snr-t { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: var(--t-sm); }
  .snr-t th { text-align: left; font-weight: var(--w-reg, 400); font-size: var(--t-sm); color: var(--quiet); padding: 0 var(--s3) 2px 0; }
  .snr-t td { padding: 2px var(--s3) 2px 0; vertical-align: top; border-top: 1px solid var(--line); }
  .snr-t td:first-child { white-space: nowrap; }
  .snr-c-date { width: 112px; } .snr-c-who { width: 180px; } .snr-c-by { width: 110px; } .snr-c-sm { width: 120px; } .snr-c-dose { width: 150px; }
  .snr-w { color: var(--late); font-weight: var(--w-bold); margin-right: 3px; }
  .snr-t :is(a, button.link, .link) { font-weight: var(--w-reg); line-height: inherit; text-align: left; min-height: 0; padding: 0; } /* item names: plain words that open the source, normal line spacing when they wrap */
  .snr-t thead th { background: none; }
  .snr-more { font-size: var(--t-sm); font-weight: var(--w-bold); padding: 1px 0 0; min-height: 0; }
  /* folding (his ask 2026-11-07): the label is a button with a chevron; a folded row keeps its label and a quiet hint of what is inside; Safety has no fold */
  .snr-fold { display: inline-flex; align-items: baseline; gap: var(--s1); min-height: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: pointer; }
  .snr-fold::before, .hmx-h[data-snr-fold]::before, .me-card > header[data-snr-fold]::before { content: "\25BE"; display: inline-block; width: 1em; font-size: var(--t-xs); color: var(--quiet); }
  .snr-fold[aria-expanded="false"]::before, .hmx-h[aria-expanded="false"]::before, .me-card > header[aria-expanded="false"]::before { content: "\25B8"; }
  .snr-fold:hover { color: var(--ink); }
  .snr-hint { display: none; font-size: var(--t-sm); padding-top: 3px; }
  .snr-folded > .snr-hint { display: block; }
  .snr-folded > .snr-c, .snr-folded > .sno-cbl, .snr-folded > .hmx-b { display: none; }
  .snr-all { display: flex; justify-content: flex-end; padding: 2px var(--s4); }
  .sno-cat .snr-fold { font-weight: var(--w-bold); }
  .sno-cbl > .ob-in:not([hidden]) { padding: 0 var(--s4) var(--s2); }
  .hmx-h[data-snr-fold], .me-card > header[data-snr-fold] { cursor: pointer; }
  .hmx-h[data-snr-fold] > span:first-child { margin-right: auto; }
  @media (max-width: 640px) {
    .snr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    /* a phone (checked 2026-11-07: four or five columns broke names mid-word and dates in two): each table row is short lines,
       "date · item" then the other cells, the column heads hidden; the order of the cells is the reading order */
    .snr-t, .snr-t tbody, .snr-t tr, .ho-snapt, .ho-snapt tbody, .ho-snapt tr { display: block; width: 100%; }
    .snr-t thead { display: none; }
    .snr-t tr { padding: 4px 0; border-top: 1px solid var(--line); }
    .snr-t td { display: inline; padding: 0; border: 0; white-space: normal; }
    .snr-t td:nth-child(2)::before { content: " · "; color: var(--quiet); }
    .snr-t td:nth-child(n+3) { display: block; color: var(--quiet); }
    .snr-t td:empty { display: none; }
    table.ho-snapt td { display: block; width: auto !important; padding: 0 0 2px; border: 0; }
    .ho-snapt tr { padding: var(--s2) 0; border-top: 1px solid var(--line); }
    table.ho-snapt td.more, table.ho-snapt td:last-child { text-align: right; padding-top: var(--s1); } /* the button bottom right (his rule) */
    /* every Now box: its buttons under the words, at the right (a long button squeezed the words to one letter a line) */
    .snrc-now { grid-template-columns: minmax(0, 1fr) !important; }
  }
  /* a narrow PANEL on a computer (checked 2026-11-07: the Documents list beside an open document squeezed to one word a line): the same
     short-line rows as a phone, decided by the list's own width, not the window's */
  .snr { container-type: inline-size; }
  @container (max-width: 440px) {
    .snr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .snr-t, .snr-t tbody, .snr-t tr { display: block; width: 100%; }
    .snr-t thead { display: none; }
    .snr-t tr { padding: 4px 0; border-top: 1px solid var(--line); }
    .snr-t td { display: inline; padding: 0; border: 0; white-space: normal; }
    .snr-t td:nth-child(2)::before { content: " · "; color: var(--quiet); }
    .snr-t td:nth-child(n+3) { display: block; color: var(--quiet); }
    .snr-t td:empty { display: none; }
  }

/* ---------- Home in the Snapshot layout (public/js/home.js hmSnapPaint; his design 2026-11-07, "lighter colors"): the Now box, six cards in a 3-column grid with light title bands
   (the soft look's band; dark mode keeps today's dark band, never lighter) and the count as a small white chip; one column on a phone ---------- */
  .hmx #hmnow > .snrc-now { margin: 0 0 var(--s2); }
  .hmx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
  .hmx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
  .hmx-card { display: flex; flex-direction: column; overflow: hidden; }
  .hmx-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); height: var(--h-band); padding: 0 var(--s3); background: var(--hmx-band); color: var(--hmx-band-ink); font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
  .hmx-n { min-width: 24px; height: 22px; padding: 0 var(--s2); display: inline-grid; place-items: center; border-radius: var(--r-ctl); background: var(--surface); color: var(--hmx-band-ink); font-size: var(--t-sm); font-weight: var(--w-reg); }
  .hmx-b { padding: var(--s1) var(--s3) var(--s2); font-size: var(--t-md); line-height: var(--lh-md); }
  .hmx-it { display: block; padding: var(--s2) 0; color: var(--ink); text-decoration: none; font-weight: var(--w-reg); border-top: 1px solid var(--line); }
  .hmx-it:first-child { border-top: 0; }
  .hmx-it:hover .hmx-s { text-decoration: underline; }
  .hmx-s { display: block; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
  .hmx-more { display: inline-block; margin-top: var(--s1); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--accent); text-decoration: none; }
  .hmx-none { margin: var(--s2) 0; }
  .hmx-kv > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); padding: 2px 0; }
  .hmx-kv b { font-weight: var(--w-bold); } .hmx-kv a { color: var(--ink); font-weight: var(--w-bold); text-decoration: none; }
  .hmx-foot { margin: var(--s2) 0; }
  .hmx .hm-trends { margin-bottom: var(--s2); }
  @media (max-width: 900px) { .hmx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 640px) { .hmx-grid, .hmx-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- [slot] Results in the Snapshot layout (public/js/chart-results.js; his design 2026-11-07) ---------- */
/* the chart's Results tab, Snapshot layout: the list on the left, the open result on the right; a phone shows one at a time */
.crs { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); gap: var(--s3); align-items: start; }
.crs > .an-pane { min-width: 0; }
.crs-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s4); }
.crs-q { font-size: var(--t-sm); }
.crs-left .snr-t td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-left .snr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } /* the group's name above its table */
.crs-left .snr-t th:nth-child(3) { width: 168px; }
.crs-left .snr-t td:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crs-listb { margin-left: 0; }
.crs-left .snr-t td:nth-child(2) a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-left .snr-t th:first-child { width: 100px; }
.crs-right .asn-host { text-align: left; }
.crs-left a.crs-on { background: var(--selected); }
.crs-out { font-size: var(--t-sm); line-height: 1.5; }
.crs-out :is(a, button).link { font-weight: var(--w-reg); min-height: 0; padding: 0; line-height: inherit; }
.crs-out .crs-listb { color: var(--quiet); }
.crs-rband :is(button, .link) { color: inherit; background: none; border: 0; }
.crs-now { margin: var(--s2) var(--s4); }
.crs-nl { font-size: var(--t-sm); }
.crs-rband { display: flex; align-items: center; gap: var(--s3); }
.crs-rt { flex: 1 1 auto; min-width: 0; }
.crs-back { display: none; }
.crs-rq { padding: var(--s2) var(--s4); font-size: var(--t-sm); }
.crs-docl { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-sm); }
.crs-pdf { max-height: 520px; margin-top: var(--s2); }
.crs-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .crs { grid-template-columns: minmax(0, 1fr); }
  .crs:not(.has-open) > .crs-right { display: none; }
  .crs.has-open > .crs-left { display: none; }
  .crs-back { display: inline; }
  .crs-x { display: none; }
}
/* ---------- [end slot] Results ---------- */




/* ---------- [slot] Clipboard and Demographics in the Snapshot layout (public/js/patient.js; his design 2026-11-07) ---------- */
/* (Clipboard and Demographics styles go here) */
/* the Clipboard and Demographics rows (public/js/patient.js clipSnapCard, dmSnapCard): the Edit link at the right above a table, columns sized by kind, one quiet line when a row is folded */
.clipsnap .snr-ed, .dmsnap .snr-ed { text-align: right; }
.clipsnap .snr-ed .link, .dmsnap .snr-ed .link { font-size: var(--t-sm); }
.clipsnap .snr-hint, .dmsnap .snr-hint { color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clipsnap [data-snr="allergies"] .snr-hint, .clipsnap [data-snr="devices"] .snr-hint { white-space: normal; } /* a safety fact is named in full when its row is folded */
.clipsnap [data-snr="meds"] .snr-t th:nth-child(1) { width: 190px; } .clipsnap [data-snr="meds"] .snr-t th:nth-child(2) { width: 150px; }
.clipsnap [data-snr="meds"] .snr-t th:nth-child(3) { width: 150px; } .clipsnap [data-snr="meds"] .snr-t th:nth-child(4) { width: 190px; }
.clipsnap [data-snr="allergies"] .snr-t th:nth-child(2) { width: 200px; }
.clipsnap [data-snr="psh"] .snr-t th:nth-child(1) { width: 64px; } .clipsnap [data-snr="psh"] .snr-t th:nth-child(2) { width: 300px; }
.clipsnap [data-snr="pmh"] .snr-t th:nth-child(1), .clipsnap [data-snr="devices"] .snr-t th:nth-child(1) { width: 240px; }
.dmsnap [data-snr="contact"] .snr-t th:nth-child(1) { width: 130px; } .dmsnap [data-snr="contact"] .snr-t th:nth-child(3) { width: 200px; }
.dmsnap [data-snr="careteam"] .snr-t th:nth-child(1) { width: 130px; } .dmsnap [data-snr="careteam"] .snr-t th:nth-child(2) { width: 200px; }
.dmsnap [data-snr="careteam"] .snr-t th:nth-child(4), .dmsnap [data-snr="careteam"] .snr-t th:nth-child(5) { width: 150px; }
.dmsnap [data-snr="insurance"] .snr-t th:nth-child(2) { width: 220px; }
.snr-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.snr-line > div { min-width: 0; }
.snr-says { padding-top: var(--s1); }
.snr-pend { padding: 2px 0; }
.snr-editor .clip-l { margin: 0; padding: 0; list-style: none; }
.snr-eg + .snr-eg { margin-top: var(--s2); }
.snrc-rev { padding: var(--s2) var(--s3) 0; display: grid; gap: var(--s1); }
.snrc-rev[hidden], .snr-editor[hidden], .snr-view[hidden] { display: none; }
.snrc-sync { margin-left: auto; }
.dmsnap .dm-status .link { font-size: inherit; }
.dm-cp, .dm-lt { opacity: 0; }
.snr-t .dm-cp { min-height: 0; padding: 0 var(--s1); line-height: 1; }
.snr-t tr:hover .dm-cp, .snr-t tr:focus-within .dm-cp, .snr-t tr:hover .dm-lt, .snr-t tr:focus-within .dm-lt { opacity: 1; }
@media (max-width: 640px) {
  .clipsnap .snr-hint, .dmsnap .snr-hint { white-space: normal; }
  .dm-cp { display: none; } .dm-lt { opacity: 1; }
}
/* ---------- [end slot] Clipboard and Demographics ---------- */




/* ---------- [slot] Visit notes and Procedure orders tab in the Snapshot layout (orders.js, procedures.js; his design 2026-11-07) ---------- */
/* the quiet line under the title (its words left, Fold all · Unfold all right) */
.vns-q { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s2) var(--s4) var(--s1); color: var(--quiet); font-size: var(--t-sm); }
.vns-fa { white-space: nowrap; } .vns-fa .link { min-height: 0; padding: 0; font-size: var(--t-sm); font-weight: var(--w-reg); }
/* the Visit notes list: one row per note, a click opens it on the right */
.vns-left .snr { margin: 0; }
.vn-wl.open .vns-left .snr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } /* beside the open note the list is narrow: a row's label sits above its table */
.vns-t tr.ord-note { cursor: pointer; } .vns-t tr.ord-note:hover > td { background: var(--sunk); } .vns-t tr.ord-note.on > td { background: var(--selected); }
.vns-t td .snr-lk { color: var(--accent); }
.vns-ra { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: var(--t-sm); }
.vns-t .ord-nsub { flex: 1 1 100%; margin: 0; }
/* the open note: the band, the rows (they scroll), the buttons bottom right */
.vn-open.vns { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.vns-h { display: flex; align-items: center; gap: var(--s3); min-height: var(--h-band); padding: var(--s1) var(--s3) var(--s1) var(--s4); background: var(--band); color: var(--on-band); }
.vns-h b { font-weight: var(--w-bold); } .vns-who { color: var(--on-band-quiet); font-size: var(--t-sm); }
.vns-h .vns-x { margin-left: auto; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--on-band); display: grid; place-items: center; }
.vns-h .vns-x:hover { background: var(--band-hover); }
.vns-b { flex: 1 1 auto; min-height: 0; overflow: auto; }
.vns-ft { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) var(--s4); border-top: 1px solid var(--line); }
.vns-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.vns-nr { margin-left: auto; display: inline-flex; gap: var(--s3); }
/* the Visit notes rows' second line and the open operative note's pane (his approval 2026-11-21, "Build as drawn"): Dx · Procedure or Plan · Where, one line with an ellipsis; the pane's note scrolls inside, the fax opens in place above the bar */
/* a note's row in the list is two lines at most (his review 2026-11-21): line 1 = date, the title (ellipsis), then the status, the draft's actions and the provider small on the right; line 2 = Dx, Procedure or Plan, Where (ellipsis, the whole text on hover) */
@media (min-width: 641px) {
  .snr .snr-t.vns-t, .snr .snr-t.vns-t tbody { display: block; width: 100%; }
  .snr .snr-t.vns-t thead { display: none; }
  .snr .snr-t.vns-t tr { display: grid !important; grid-template-columns: 5.8em minmax(0, 1fr) auto auto auto; align-items: baseline; column-gap: var(--s2); padding: var(--s1) var(--s3) var(--s1) 0; border-top: 1px solid var(--line); }
  .snr .snr-t.vns-t td { display: contents !important; }
  .snr .snr-t.vns-t td:nth-child(2)::before { content: none !important; }
  .snr .snr-t.vns-t td:first-child { display: block !important; grid-column: 1; grid-row: 1; white-space: nowrap !important; padding: 0; border: 0; }
  .snr .snr-t.vns-t td:nth-child(2) > .snr-lk { grid-column: 2; grid-row: 1; display: block; min-width: 0; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  .snr .snr-t.vns-t td:nth-child(2) > .sno-q { grid-column: 3; grid-row: 1; white-space: nowrap; font-size: var(--t-sm); }
  .snr .snr-t.vns-t td:nth-child(2) > .vns-ra { grid-column: 4; grid-row: 1; flex-wrap: nowrap; white-space: nowrap; }
  .snr .snr-t.vns-t td:nth-child(3) { display: block !important; max-width: 8em; overflow: hidden; text-overflow: ellipsis; grid-column: 5; grid-row: 1; padding: 0; border: 0; color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; }
  .snr .snr-t.vns-t td:nth-child(2) > .vns-g { grid-column: 2 / -1; grid-row: 2; }
  .snr .snr-t.vns-t td:nth-child(2) > .vns-q2 { grid-column: 2 / -1; grid-row: 3; }
}
.vns-q2 .ord-nsub { margin: 0; }
@media (max-width: 640px) { /* a phone: title, status and actions run on, the facts on a line of their own */
  .snr .snr-t.vns-t td:nth-child(2) { display: block !important; }
  .snr .snr-t.vns-t td:nth-child(2) > .vns-ra { display: inline; white-space: normal; margin-left: var(--s2); }
  .snr .snr-t.vns-t td:nth-child(2) > .vns-g { display: block; margin-top: 1px; }
}
.vns-g, .pn-g { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--quiet); font-size: var(--t-sm); }
.vns-g b, .pn-g b { color: var(--ink); font-weight: var(--w-bold); }
.pn-pane .pn-pane-note { padding: var(--s3) var(--s4); }
.pn-pane .pn-trail, .pn-pane .pn-draftline { border-top: 0; }
.pn-fax { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--sunk); }
.pn-fax-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); } .pn-fax-ch { display: inline-flex; flex-wrap: wrap; gap: var(--s2); }
.pn-fax-ch .on { border-color: var(--accent); color: var(--accent); }
.pn-fax-f { display: flex; flex-wrap: wrap; gap: var(--s3); } .pn-fax-f label { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--t-sm); color: var(--quiet); min-width: 0; } .pn-fax-f input { min-width: 12em; }
.pn-fax-a { padding: 0; }
/* the card layout's open visit note: title, the note (it scrolls), the action bar at the bottom */
.vn-open.vn-ftp { grid-template-rows: auto minmax(0, 1fr) auto; }
.vn-open.vn-ftp .vns-ft { grid-row: auto; }
@media (max-width: 640px) { .pn-fax-ch { flex-direction: column; align-items: stretch; width: 100%; } .pn-fax-ch button { white-space: normal; text-align: left; height: auto; min-width: 0; max-width: 100%; } .pn-fax-f label, .pn-fax-f input { width: 100%; min-width: 0; } .pn-pane .vns-ft { justify-content: stretch; } .pn-pane .vns-ft .secondary, .pn-pane .vns-ft .primary { flex: 1 1 auto; } }
.vns .vn-pagebox { margin-top: var(--s2); }
.vns .snr-c p { margin: 0; }
.vns .snr-t td .snr-lk { color: var(--accent); }
/* the Procedure orders tab: the done orders' first column is a date; the shared note reads as lines */
.pcs-after .snr-t th:first-child { width: 112px; }
.snr-c .pc-cases { margin: 0; }
.snr-c .pc-cases > .pc-card { margin: 0 0 var(--s2); }
/* ---------- [end slot] Visit notes and Procedure orders ---------- */
/* ---------- Sign a PDF (public/js/pdfview.js; his ask 2026-11-07): the bar under the viewer's toolbar while a signature is placed, and the stamp's preview ---------- */
  .pdfv-signbar, .pdfv-signed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--sunk); border-bottom: 1px solid var(--line); }
  .pdfv-signbar[hidden], .pdfv-signed[hidden] { display: none; }
  .pdfv-signbar .spacer, .pdfv-signed .spacer { flex: 1 1 auto; }
  .pdfv-placing .page { cursor: crosshair; }
  .pdfv-stamp { position: absolute; z-index: 5; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 0 0 6px; border-left: 2px solid var(--accent); background: var(--surface); color: var(--ink); line-height: 1.2; pointer-events: none; outline: 1px dashed var(--accent); }
  .pdfv-stamp b { font-weight: var(--w-bold); white-space: nowrap; }
  .pdfv-stamp span { color: var(--quiet); font-size: 0.94em; white-space: nowrap; }

/* ---------- Worklists in the Snapshot layout (public/js/snaprows.js snwRow / snwGroup; his approval 2026-11-07): one line per item, the same columns
   on every list, thin group bands that fold, in Home's soft blue band colour (his ask 2026-11-09: "too hard to read. add color to the subtitle bands"), amber "Overdue" / red "Stat" only on rows that are. Token colours only. ---------- */
.snw { font-size: var(--t-sm); }
.snw-h, .snw-r { display: grid; grid-template-columns: 170px minmax(0, 1fr) 120px 210px 92px 150px 130px; gap: var(--s3); align-items: baseline; padding: 5px var(--s4); }
.snw-h { font-size: var(--t-xs); color: var(--quiet); padding-block: 6px 2px; }
.snw-r { border-top: 1px solid var(--line); cursor: pointer; } .snw-r:hover { background: var(--sunk); }
/* the selected row (his report 2026-11-20: it blended into the blue group bands): one rule for every list that uses these rows. A stronger accent tint than the soft band, a solid 4px accent bar, a hairline round it and the name in bold; hover (--sunk) stays lighter than selected. */
.snw-r:is(.on, .open) { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); box-shadow: inset 4px 0 0 var(--accent), inset 0 0 0 1px var(--accent-line); }
.snw-r:is(.on, .open):hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.snw-r:is(.on, .open) .snw-p { font-weight: var(--w-bold); }
.snw-r > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.snw-p { font-weight: var(--w-bold); } .snw-p small { color: var(--quiet); font-weight: var(--w-reg); margin-left: var(--s1); }
.snw-q { color: var(--quiet); } .snw-od { color: var(--late); font-weight: var(--w-bold); } .snw-st { color: var(--urgent); font-weight: var(--w-bold); }
.snw-a { text-align: right; } .snw-a :is(button, a) { min-height: 0; }
button.snw-band { display: flex; width: 100%; gap: var(--s2); align-items: baseline; background: var(--hmx-band); border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 4px var(--s4); font: inherit; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--hmx-band-ink); text-align: left; min-height: 0; cursor: pointer; }
.snw-band .snw-hint { font-weight: var(--w-reg); color: var(--quiet); } .snw-band .snw-c { margin-left: auto; color: var(--quiet); font-weight: var(--w-reg); }
.snw-ch { color: var(--quiet); font-size: var(--t-xs); }
button.snw-band.snr-fold::before { content: none; } /* the band draws its own arrow (snw-ch); the shared fold arrow would make two */
.snw-g.snr-folded > .snw-rows { display: none; }
.snw-more { padding: 4px var(--s4); }
.pcd-who .pcd-all { margin-left: auto; min-height: 0; }
/* the mock-up's row height (his word 2026-11-07: "the mockups had the correct spacing ... way too much space"): every cell one 1.35 line,
   the row's buttons, note button, ⋯ menu and tick no taller than the text (measured: 41 px rows down to 27 px) */
.snw .snw-r { line-height: 1.35; padding-block: 4px; }
.snw .snw-r > div { line-height: 1.35; }
.snw .snw-r > .snw-a { display: flex; justify-content: flex-end; align-items: center; gap: var(--s2); }
.snw .snw-r > div :is(button, a, summary) { min-height: 0; height: auto; padding-block: 0 !important; /* beats the phone tap-target floor (:is(button.link, a.link):not(#app) padding-block), which made a phone row 34px on its first line */ line-height: 1.35; font-size: var(--t-sm); }
.snw .snw-r > .snw-a :is(button, a, summary) { padding-inline: 2px; border: 0; background: none; }
.snw .snw-r > .snw-a :is(details, .menu) { margin: 0; }
.snw .snw-r input[type="checkbox"] { margin: 0 6px 0 0; width: 14px; height: 14px; min-height: 0; vertical-align: -2px; }
@media (max-width: 640px) {
  .snw-h { display: none; }
  /* a phone (his word 2026-11-07: "Way too much space"): at most three tight lines per item: patient + action; what · who; status · date */
  .snw-r { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 0; padding: 6px var(--s3); line-height: 1.35; }
  .snw-r > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .snw-r > .snw-p { order: 1; flex: 1 1 auto; } .snw-r > .snw-a { order: 2; flex: 0 0 auto; }
  .snw-r > div:nth-child(2) { order: 3; flex: 1 1 100%; }
  .snw-r > div:nth-child(3) { order: 4; display: none; }
  .snw-r > div:nth-child(4) { order: 5; flex: 0 1 auto; white-space: normal; }
  .snw-r > div:nth-child(5) { order: 6; flex: 0 0 auto; }
  .snw-r > div:nth-child(5)::before { content: "· "; }
  .snw-r > div:nth-child(6) { display: none; }
}

/* ---------- [slot] Worklists A: Procedure orders list + Tasks list ---------- */
@media (min-width: 641px) { .wla-wrap .snw-h, .wla-wrap .snw-r { grid-template-columns: 170px minmax(0, 1fr) 160px 130px 80px 100px 300px; } }
.wla-wrap .snw-a .link { overflow: visible; flex: none; width: auto; max-width: none; white-space: nowrap; }
@media (max-width: 640px) { .wla-wrap .snw-r > .snw-a { flex: 0 1 auto; min-width: 0; max-width: 52%; justify-content: flex-start; } .wla-wrap .snw-a .link { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; display: block; text-align: left; } }
.wla-wrap .snw-a .wk-more { margin: 0; } /* the old ⋯ rule gives it a 10px bottom margin that made rows 39px */
.wla-lk { color: var(--accent); text-decoration: none; } .wla-lk:hover { text-decoration: underline; }
.wla-nb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; min-height: 0; font-size: inherit; }
.wla-wrap .pc-noterow { padding: var(--s1) var(--s4); border-top: 1px solid var(--line); }
/* The list beside an open item (his ask 2026-11-09, the independent screen review: the full-width columns ran into each other in half the space): the list's OWN width decides,
   not the screen's. Under 640 px the rows are laid out as the phone lays them out (the name, the task under it, the status), and the Now box gives its words the room its margins took. */
.wla-wrap { container-type: inline-size; } /* the lists switch to short lines by their own width: the fixed columns need about 1150 px, so a 760 px window or a list beside an open item no longer scrolls sideways (sweep 2026-11-14) */
@container (max-width: 1200px) {
  .wla-wrap :is(.snw-h, .snw-band .snw-hint) { display: none; }
  .wla-wrap .snw-r { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 0; padding: 6px var(--s3); line-height: 1.35; }
  .wla-wrap .snw-r > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .wla-wrap .snw-r > .snw-p { order: 1; flex: 1 1 auto; }
  .wla-wrap .snw-r > .snw-a { order: 2; flex: 0 1 auto; min-width: 0; max-width: 52%; justify-content: flex-start; }
  .wla-wrap .snw-r > div:nth-child(2) { order: 3; flex: 1 1 100%; }
  .wla-wrap .snw-r > div:nth-child(3), .wla-wrap .snw-r > div:nth-child(6) { display: none; }
  .wla-wrap .snw-r > div:nth-child(4) { order: 5; flex: 0 1 auto; white-space: normal; }
  .wla-wrap .snw-r > div:nth-child(5) { order: 6; flex: 0 0 auto; }
  .wla-wrap .snw-r > div:nth-child(5)::before { content: "· "; }
  .wla-wrap .snw-a .link { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; display: block; text-align: left; }
}
@container (max-width: 639px) {
  .wla-wrap .snrc-now, .wla-wrap .tk-now { margin-inline: var(--s2); gap: var(--s1) var(--s2); padding-inline: var(--s2); }
  .wla-wrap .snrc-now { grid-template-columns: minmax(0, 1fr) !important; }
  .wla-wrap .snrc-now .snrc-nb { justify-self: end; }
}
/* Referrals and the Waiting list beside an open item: the same, by the list's own width (computers only: a phone keeps its own rule). */
@media (min-width: 641px) {
  @container (max-width: 1200px) {
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) :is(.snw-h, .snw-band .snw-hint) { display: none; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 0; padding: 6px var(--s3); line-height: 1.35; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > .snw-p { order: 1; flex: 1 1 auto; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > .snw-a { order: 2; flex: 0 1 auto; min-width: 0; max-width: 52%; justify-content: flex-start; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(2) { order: 3; flex: 1 1 100%; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(3), :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(6) { display: none; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(4) { order: 5; flex: 0 1 auto; white-space: normal; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(5) { order: 6; flex: 0 0 auto; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(5)::before { content: "· "; }
    :is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-a .link { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; display: block; text-align: left; }
  }
}
/* A computer shows who has the item too: the third line reads who · status · due (a phone keeps its own lines). */
@media (min-width: 641px) {
  @container (max-width: 1200px) {
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(3) { display: block; order: 4; flex: 0 1 auto; max-width: 45%; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(4)::before { content: "· "; }
  }
}
/* Two lines a row when the list is wide enough (his laptop review 2026-11-14: 66 px rows, line 3 held only who · status · age): line 1 is the name and the action, line 2 the reason, with who · status · age at its right end. The reason gives way with an ellipsis; the who / status / age (Overdue, Stat) never do. Narrower than this (a list beside an open item) keeps the three short lines. */
@media (min-width: 641px) {
  @container (min-width: 640px) and (max-width: 1200px) {
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 0; padding-block: 4px; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r::after { content: ""; order: 2; flex: 0 0 100%; height: 0; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > .snw-p { order: 1; flex: 1 1 auto; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > .snw-a { order: 2; flex: 0 1 auto; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(2) { order: 3; flex: 1 1 0; min-width: 0; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(3) { display: block; order: 4; flex: 0 1 auto; max-width: 160px; margin-left: var(--s3); color: var(--quiet); }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(4) { order: 5; flex: 0 0 auto; white-space: nowrap; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(4)::before { content: "· "; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(5) { display: block; order: 6; flex: 0 0 auto; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(5):empty { display: none; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:is(:nth-child(4), :nth-child(6)):empty { display: none; }
    :is(.wla-wrap, .snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"], .wlc [data-snr-screen="worklist"]) .snw-r > div:nth-child(6) { display: none; }
  }
}
.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"] { container-type: inline-size; }
/* The fax Inbox beside an open file: the same, by the card's own width (the phone's lines: the file and its date, what Autumn found under it, the button at the right). */
.ho-snapcard { container-type: inline-size; }
@container (max-width: 640px) {
  .ho-snapcard .ho-h, .ho-snapcard .snw-band .snw-hint { display: none; }
  .ho-snapcard .ho-snaplist { padding: 0 var(--s3); }
  .ho-snapt, .ho-snapt tbody { display: block; width: 100%; }
  main table.ho-snapt tr.row { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); align-items: baseline; width: 100%; padding: var(--s2) 0; border-top: 1px solid var(--line); }
  table.ho-snapt td { grid-column: 1 / -1; }
  main table.ho-snapt tr.row > td { display: block; width: auto !important; height: auto; padding: 0 0 2px; border: 0; }
  table.ho-snapt td.ho-f { grid-column: 1; grid-row: 1; white-space: normal; font-weight: var(--w-bold); }
  table.ho-snapt td.ho-at { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  table.ho-snapt td.ho-why { grid-row: 2; }
  table.ho-snapt td.more { grid-row: 3; text-align: right; padding-top: var(--s1); }
  .ho-snapcard .ho-snapt .ho-line { white-space: normal; }
  .ho-snapt .ho-src { display: block; } .ho-snapt .ho-dot { display: none; }
}
/* ---------- [end slot] Worklists A ---------- */




/* ---------- [slot] Worklists B: Referrals list + Scheduler waiting list ---------- */
.snw .nc { display: flex; gap: var(--s1); align-items: baseline; min-width: 0; } .snw .nc-w { display: none; }
.snw-p input[type="checkbox"] { margin: 0 var(--s1) 0 0; vertical-align: middle; }
.snw-now.late { border-color: var(--late); }
.snw-a { display: flex; justify-content: flex-end; gap: var(--s1); align-items: baseline; }
.snw-r > div:nth-child(2) .link { min-height: 0; padding: 0; }
.snw-band.snr-fold::before { content: none; display: none; }
.snw .nc { max-width: 100%; overflow: hidden; } .snw .nc-b { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .snw-r > .snw-a { overflow: visible; white-space: nowrap; } .snw .nc-add { flex: none; } .snw .nc:not(.nc-none) .nc-add { display: none; }
.snw-a :is(button.primary, button.secondary) { background: none; border: 0; box-shadow: none; padding: 0; color: var(--accent); font-weight: var(--w-bold); }
@media (min-width: 641px) {
  [data-snr-screen="refs"] :is(.snw-h, .snw-r) { grid-template-columns: 170px minmax(0, 1fr) 110px 170px 124px 130px 190px; }
  [data-snr-screen="waitlist"] :is(.snw-h, .snw-r) { grid-template-columns: 170px minmax(0, 1fr) 110px minmax(160px, 1.1fr) 124px 130px 150px; }
}
.snw .snr-w { color: var(--late); font-weight: var(--w-bold); }
.snw-r .link { font-size: inherit; }
.snw .snw-a button { margin: 0; min-height: 0; height: auto; line-height: 1.35; } .snw .snw-a .wk-more { padding: 0 var(--s1); }
/* ---------- [end slot] Worklists B ---------- */




/* ---------- [slot] Worklists C: My worklist + Orders and results ---------- */
/* The list sits in a container so a narrow place (the Orders list beside an open patient, the phone) reads as short lines: patient and action, then the item, then the status. Token colours only. */
.wlc { container-type: inline-size; }
.wlc-l { color: var(--accent); }
.wlc .snw-band .snw-hint { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlc .snw-band .snw-c { flex: none; }
/* Orders and results, Snapshot layout (public/js/panesplit.js): the list and the open item with a draggable divider; Hide this panel gives the list the whole width. Computers only. */
.ps-div, .ps-hidebtn, .ps-showbtn { display: none; }
@media (min-width: 761px) {
  .an.ps-on, .rz.ps-on:not(.has-rep) { grid-template-columns: var(--ps-w, var(--ps-d, 460px)) 8px minmax(0, 1fr); column-gap: var(--s1); }
  .ps-on > .ps-div { display: block; align-self: stretch; min-height: 200px; border-radius: 3px; cursor: col-resize; }
  .ps-on > .ps-div:hover, .ps-on > .ps-div:focus-visible, body.dragging-divider .ps-on > .ps-div { background: color-mix(in srgb, var(--accent) 45%, transparent); outline: none; }
  .ps-on.has-rep > .ps-div { display: none; }
  @media (max-width: 1799px) { body.sp-open :is(.an.ps-on, .rz.ps-on:not(.has-rep)) { grid-template-columns: 280px 8px minmax(0, 1fr); } } /* the right panel is open: the list gives the open item the room (never under 280 px), not the other way round */
  .ps-on .ps-hidebtn { display: inline-flex; margin-left: auto; }
  .ps-showbtn:not([hidden]) { display: inline-flex; margin-left: auto; }
  .an.ps-hide, .rz.ps-hide:not(.has-rep) { grid-template-columns: minmax(0, 1fr); }
  .ps-hide:not(.has-rep) > :is(.an-pane, .ps-div) { display: none; }
}
.wlc-nc { display: inline-flex; gap: var(--s1); align-items: baseline; max-width: 100%; }
.wlc-nc .nc-w { display: none; } .wlc-nc .nc-b { overflow: hidden; text-overflow: ellipsis; }
.wlc .nc-add { min-height: 0; padding: 0; background: none; border: 0; color: var(--accent); font: inherit; }
.wlc .snw-r > div:nth-child(6) { overflow: hidden; }
.wlc .snw-h, .wlc .snw-r { grid-template-columns: 170px minmax(0, 1fr) 120px 210px 92px 150px 170px; }
.wlc .snw-a { overflow: visible !important; }
.wlc .snw-a .wk-wait { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 1200px) {
  .wlc .snw-h { display: none; }
  .wlc .snw-r { grid-template-columns: minmax(0, 1fr) auto; gap: 1px var(--s2); padding-block: 6px; }
  .wlc .snw-r > div { white-space: nowrap; }
  .wlc .snw-r > .snw-p { grid-column: 1; grid-row: 1; } .wlc .snw-r > .snw-a { grid-column: 2; grid-row: 1; }
  .wlc .snw-r > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .wlc .snw-r > div:nth-child(4) { grid-column: 1; grid-row: 3; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wlc .snw-r > div:nth-child(5) { display: block; grid-column: 2; grid-row: 3; }
  .wlc .snw-r > div:nth-child(3), .wlc .snw-r > div:nth-child(6), .wlc .snw-r > div:nth-child(5):empty { display: none; }
}
/* My Worklist beside an open item: the third line also names who has it (computers only). A Stat row's What cell wraps so its reason shows whole; other rows stay one line (his word 2026-11-10). */
@media (min-width: 641px) {
  @container (max-width: 1200px) {
    .wlc [data-snr-screen="worklist"] .snw-r { grid-template-columns: fit-content(40%) minmax(0, 1fr) auto; }
    .wlc [data-snr-screen="worklist"] .snw-r > .snw-p { grid-column: 1 / 3; }
    .wlc [data-snr-screen="worklist"] .snw-r > .snw-a { grid-column: 3; }
    .wlc [data-snr-screen="worklist"] .snw-r > div:nth-child(2) { grid-column: 1 / -1; }
    .wlc [data-snr-screen="worklist"] .snw-r > div:nth-child(3) { display: block; grid-column: 1; grid-row: 3; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; }
    .wlc [data-snr-screen="worklist"] .snw-r > div:nth-child(4) { grid-column: 2; grid-row: 3; }
    .wlc [data-snr-screen="worklist"] .snw-r > div:nth-child(4)::before { content: "· "; }
    .wlc [data-snr-screen="worklist"] .snw-r > div:nth-child(5) { grid-column: 3; grid-row: 3; }
  }
}
.wlc [data-snr-screen="worklist"] .snw-r[data-mk="2"] > div:nth-child(2) { white-space: normal; overflow: visible; text-overflow: clip; }
/* The Orders lists on a computer, in the narrow pane beside an open patient (his ask 2026-11-08: one line, as the other worklists are): patient, the item, the action.
   The Overdue / Stat word (the row's data-mk) is drawn in front of the item; the status words and date stay on the row's hover text and in its group band.
   A phone keeps up to three tight lines. */
@media (min-width: 641px) {
  @container (max-width: 1200px) {
    .wlc [data-snr-screen="ordlist"] .snw-r { grid-template-columns: fit-content(46%) minmax(0, 1fr) auto; column-gap: var(--s2); padding-block: 4px; align-items: baseline; }
    .wlc [data-snr-screen="ordlist"] .snw-r > .snw-p { grid-column: 1; grid-row: 1; }
    .wlc [data-snr-screen="ordlist"] .snw-r > div:nth-child(2) { grid-column: 2; grid-row: 1; overflow: hidden; text-overflow: ellipsis; }
    .wlc [data-snr-screen="ordlist"] .snw-r[data-mk] > div:nth-child(2)::before { content: "Overdue "; color: var(--late); font-weight: var(--w-bold); }
    .wlc [data-snr-screen="ordlist"] .snw-r[data-mk="2"] > div:nth-child(2)::before { content: "Stat "; color: var(--urgent); }
    .wlc [data-snr-screen="ordlist"] .snw-r > .snw-a { grid-column: 3; grid-row: 1; max-width: 10em; overflow: hidden !important; }
    .wlc [data-snr-screen="ordlist"] .snw-r > .snw-a :is(button, a, .snw-q) { display: block; justify-content: flex-start; text-align: right; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .wlc [data-snr-screen="ordlist"] .snw-r > div:is(:nth-child(4), :nth-child(5)) { display: none; }
  }
}
/* ---------- [end slot] Worklists C ---------- */

/* ---------- Patients tables + the small chart tabs in the Snapshot layout (preview "Snapshot layout"; his design 2026-11-08, mock-ups up / rc / sm / lt / tk / cm / ac) ---------- */
  .pts-card > header { gap: var(--s3); }
  .pts-card > header .spacer { flex: 1; }
  .pts-card > header > b { flex: 0 1 auto; }
  .pts-say { font-weight: var(--w-reg, 400); font-size: var(--t-sm); opacity: .9; }
  .pts-bar { display: flex; align-items: center; gap: var(--s3); margin: var(--s3) var(--s4); }
  .pts-bar .pph-find { flex: 1 1 320px; max-width: 560px; }
  .pts-none { margin: 0; padding: var(--s3) var(--s4); color: var(--quiet); }
  .pts-quiet { margin: 0; padding: var(--s2) var(--s4); color: var(--quiet); font-size: var(--t-sm); }
  .pts-card .snw-r { cursor: pointer; }
  .snw-open { font-weight: var(--w-bold); min-height: 0; padding: 0; }
  .pts-up .snw-h, .pts-up .snw-r { grid-template-columns: 90px 240px 210px minmax(0, 1fr) 100px; }
  .pts-rc .snw-h, .pts-rc .snw-r { grid-template-columns: 220px 150px minmax(0, 1fr) 124px 100px; }
  .pts-up .snw-r > div, .pts-rc .snw-r > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pts-up .snw-p small, .pts-rc .snw-p small { margin-left: var(--s2); }
  .pts-same .snw-h, .pts-same .snw-r { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr) 200px; }
  .pts-same .snw-r { cursor: default; } .pts-same .snw-r:hover { background: none; }
  .pts-same .snw-r > div { overflow: visible; text-overflow: clip; white-space: normal; }
  .pts-same .snw-a { align-items: center; gap: var(--s3); }
  .pts-same .snw-a { justify-content: flex-end; }
  .pts-same .snw-a button { margin: 0; min-height: 0; }
  .pts-same .snw-a button.primary { background: var(--selected); border: 1px solid var(--accent-line); border-radius: var(--r-ctl); color: var(--band); padding: 2px var(--s3); }
  .pts-same .snw-a button.quiet { background: none; border: 0; color: var(--quiet); padding: 2px var(--s2); font-weight: var(--w-reg, 400); }
  @media (max-width: 640px) {
    .pts-card > header { background: none; border: 0; padding: var(--s2) var(--s3) 0; min-height: 0; justify-content: flex-end; }
    .ov2-card.pts-card > header > :is(b, .pts-say, button.cf-fold) { display: none; }
    .ov2-card.pts-card > header > button.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--line); }
    .pts-bar { flex-wrap: wrap; margin: var(--s2) var(--s3); }
    .pts-bar .views { flex: 1 1 100%; order: -1; display: flex; } .pts-bar .views > a { flex: 1; text-align: center; }
    .pts-bar .pph-find { flex: 1 1 100%; max-width: none; }
    .pts-up .snw-r, .pts-rc .snw-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px var(--s2); padding: 8px var(--s3); align-items: baseline; }
    .pts-up .snw-r > div, .pts-rc .snw-r > div { white-space: normal; overflow: visible; text-overflow: clip; }
    .pts-up .snw-r > div:nth-child(1) { grid-column: 2; grid-row: 1; text-align: right; display: block; }
    .pts-up .snw-r > div:nth-child(2) { grid-column: 1; grid-row: 1; }
    .pts-up .snw-r > div:nth-child(4) { grid-column: 1 / -1; grid-row: 2; display: block; }
    .pts-up .snw-r > div:nth-child(3) { grid-column: 1 / -1; grid-row: 3; display: block; color: var(--quiet); font-size: var(--t-sm); }
    .pts-rc .snw-r > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .pts-rc .snw-r > div:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; display: block; }
    .pts-rc .snw-r > div:nth-child(3) { grid-column: 1 / -1; grid-row: 2; display: block; }
    .pts-rc .snw-r > div:nth-child(2) { grid-column: 1 / -1; grid-row: 3; display: block; color: var(--quiet); font-size: var(--t-sm); }
    .pts-up .snw-r > div:nth-child(5), .pts-rc .snw-r > div:nth-child(5) { display: none; }
    .pts-up .snw-r > div::before { content: none; }
    .pts-rc .snw-r > div:nth-child(2)::before { content: "Next visit: "; }
    .pts-same .snw-h { display: none; }
    .pts-same .snw-r { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px var(--s3); }
    .pts-same .snw-r > div { display: block; }
    .pts-same .snw-a { justify-content: flex-end; }
  }
  /* the small chart tabs (Letters, Tasks, Communication log, Activity) */
  .snaptab .snr-act { text-align: right; width: 84px; white-space: nowrap; }
  .snaptab .snr-t td.snr-act, .snaptab .snr-t th.snr-act { padding-right: 0; }
  .snaptab .snr-dir { color: var(--quiet); margin-left: var(--s2); }
  @media (min-width: 641px) {
    .snaptab .snr-t td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .snaptab .snr-c .snr-t td .snr-lk { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; vertical-align: bottom; }
  }
  .snaptab .snr-t .snr-inr > td { padding: 0; border-top: 0; }
  .snaptab .tk-snr { cursor: pointer; } .snaptab .tk-snr:hover { background: var(--sunk); } .snaptab .tk-snr.focus { background: var(--selected); }
  .snaptab .tk-snt th:nth-child(2), .snaptab .tk-snt th:nth-child(3) { width: 150px; } .snaptab .tk-snt th:nth-child(4) { width: 170px; }
  .snaptab .tk-snd th:nth-child(2) { width: 170px; }
  .letterssnap .snr-t th:nth-child(3), .letterssnap .snr-t th:nth-child(4) { width: 170px; } .letterssnap .snr-t th:nth-child(5) { width: 220px; }
  .commssnap .snr-t th:nth-child(1) { width: 132px; } .commssnap .snr-t th:nth-child(3) { width: 230px; } .commssnap .snr-t th:nth-child(4) { width: 120px; } .commssnap .snr-t th:nth-child(5) { width: 230px; }
  .commssnap .cl-tools { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) var(--s4); }
  .commssnap .cl-n { color: var(--quiet); font-weight: var(--w-reg, 400); }
  .activitysnap .snr-t th:nth-child(3) { width: 200px; }
  @media (max-width: 640px) {
    .snaptab .snr-act { width: auto; text-align: left; }
    .snaptab .snr-t td.snr-act { display: block; text-align: right; }
    .snaptab .snr-lk { display: inline; text-align: left; }
    .tk-snt tr.tk-snr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); }
    .tk-snt td:nth-child(1) { display: block; flex: 1 1 100%; }
    .tk-snt td:nth-child(n+2) { display: block; flex: 0 0 auto; color: var(--quiet); }
    .tk-snt td:nth-child(2)::before { content: none; }
    .tk-snt td:nth-child(4) .amb-t { color: var(--late); }
    .tk-snt td.snr-act { margin-left: auto; }
    .commssnap .cl-tools { margin: var(--s2) var(--s3); overflow-x: auto; }
    .commssnap .snr-t td:nth-child(2)::before, .letterssnap .snr-t td:nth-child(2)::before, .activitysnap .snr-t td:nth-child(2)::before { content: none; }
    .commssnap .snr-t td:nth-child(1), .activitysnap .snr-t td:nth-child(1), .letterssnap .snr-t td:nth-child(1) { margin-right: var(--s2); }
    .letterssnap .snr-t td:nth-child(1) { color: var(--quiet); }
  }

/* ───────── the referral screen card (his approved design 2026-10-12, "Referral screen mock-ups 2026-10-12.html"; public/js/screen-card.js) ─────────
   The band, the verdict chip and its one reason, five label/value lines, Before the visit on the sunk grey, the buttons at the foot.
   Colour only on the chip and the flag words (his rule: colour said once). The rest folds under "How Autumn got there". */
.pp-scrcard:has(> .scard) { padding: 0; background: none; box-shadow: none; } /* the card is the Screen tab's panel: no box around a box */
.ov2-card.scard { container: scard / inline-size; } /* a narrow card (a phone, or beside an open document) lays out by its own width */
.ov2-card.scard > header > .hint { margin-left: auto; white-space: nowrap; }
/* every card's fold, "How Autumn got there" / "How we got here" (B-413, his ask 2026-10-14; core.js howFold): the card's last line, the
   details right under it; open, the link reads "Hide how … ▾" */
.how-ft { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1); padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.how-ft > button.how-tog { height: auto; min-height: 0; padding: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.how-ft > .how-hint { font-size: var(--t-sm); }
/* a decided referral's screen, kept as it was at the decision (B-413): said once on top; a decline's reason under it. No colour (colour said once) */
.scard-decided { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s3); background: var(--sunk); border-bottom: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink); }
.scard-decided > b { font-weight: var(--w-bold); }
.scard-vd { display: flex; gap: var(--s2); align-items: flex-start; padding: 10px var(--s3); border-bottom: 1px solid var(--line); }
.scard-vd > b { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
.scard-chip { flex: none; display: inline-flex; align-items: center; height: 22px; margin-top: 0; padding: 0 var(--s2); border-radius: var(--r-ctl); font-size: var(--t-sm); font-weight: var(--w-bold); white-space: nowrap; }
.scard-chip.urgent { background: var(--urgent-bg); color: var(--urgent); }
.scard-chip:is(.late, .pressing) { background: var(--late-bg); color: var(--late); }
.scard-chip.done { background: var(--done-bg); color: var(--done); }
.scard-rows { display: grid; grid-template-columns: 76px minmax(0, 1fr); margin: 0; padding: 2px var(--s3) 6px; }
.scard-rows > :is(dt, dd) { margin: 0; padding: 3px 0; line-height: 1.35; } /* no line between rows, tight (his word 2026-10-22, B-502): the rows are told apart by space alone */
.scard-rows > dt { font-size: var(--t-sm); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--quiet); }
.scard-rows > dd { min-width: 0; color: var(--ink); }
/* the screen card's rows, his pick 2026-10-31 (the older table's readability): a light line between rows, a wider label column (130px), roomy rows; the other cards that share .scard-rows keep their tight rows */
.scard-rows.scard-rws { grid-template-columns: 130px minmax(0, 1fr); padding: 0; }
.scard-rws > :is(dt, dd) { padding: 8px 0; border-top: 1px solid var(--line); }
.scard-rws > dt { padding-left: var(--s3); }
.scard-rws > dd { padding-right: var(--s3); }
.scard-vd + .scard-rws > :nth-child(-n+2), .scard-bl + .scard-rws > :nth-child(-n+2) { border-top: 0; } /* the verdict's own line sits above the first row */
.scard-vd:has(+ .scard-bl) { border-bottom: 0; padding-bottom: 2px; }
.scard-bl { padding: 0 var(--s3) 10px; border-bottom: 1px solid var(--line); }
.scard-bl > .scard-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } /* the story: 2 lines on screen, "more ›" for the rest */
.scard-bl > .scard-t.open { display: block; }
.scard-mb { display: block; height: auto; min-height: 0; padding: 0; font-size: var(--t-sm); }
.scard-mb[hidden] { display: none; }
.scard-sub { display: block; }
.scard-fold { margin-top: var(--s1); }
.scard-fold > summary { cursor: pointer; list-style: none; color: var(--accent); font-size: var(--t-sm); }
.scard-fold > summary::-webkit-details-marker { display: none; }
.scard-fold > div { padding-top: var(--s1); color: var(--quiet); font-size: var(--t-sm); }
.scard :is(.q, .m) { color: var(--quiet); }
.scard .m { font-size: var(--t-sm); }
.scard .fl-x { color: var(--urgent); font-weight: var(--w-bold); }
.scard .fl-d { color: var(--late); font-weight: var(--w-bold); }
.scard-bv { padding: var(--s2) var(--s3); background: var(--sunk); border-top: 1px solid var(--line); font-size: var(--t-sm); line-height: var(--lh-sm); }
.scard-bv > .t { display: block; font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-bold); color: var(--quiet); }
.scard-c { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.scard-c.done > span { color: var(--quiet); }
.scard-c button.small { height: 24px; min-height: 0; padding: 0 var(--s2); font-size: var(--t-sm); }
.scard-ft { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.scard-ft > .si-strip { margin: 0; }
.scard-ft .pp-dec { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.scard-ft .pp-dec > .pp-dn { width: 16rem; height: var(--h-ctl-sm); font-size: var(--t-sm); }
.scard-ft .pp-dec button.small { height: var(--h-ctl-sm); min-height: 0; padding: 0 10px; font-size: var(--t-sm); }
.scard-ft .pp-dec > .pp-info { flex-basis: 100%; margin: 0; text-align: right; font-size: var(--t-sm); color: var(--quiet); }
.scard-ft .pp-dec > .pp-cond { flex-basis: 100%; margin: 0; text-align: right; font-size: var(--t-sm); color: var(--quiet); } /* Accept with conditions: the note holds the condition, so it gets the whole line */
.scard-ft .pp-dec > .pp-cond ~ .pp-dn { flex: 1 1 100%; width: auto; }
.scard-ft .pp-dec > .pp-derr { flex-basis: 100%; }
.scard-ft .pp-dec > .pp-derr:empty { display: none; }
.scard-ft > details.scard-dec { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); }
.scard-ft > details.scard-dec > summary { list-style: none; cursor: pointer; color: var(--quiet); font-size: var(--t-sm); }
.scard-ft > details.scard-dec > summary::-webkit-details-marker { display: none; }
.scard-doc { color: var(--accent); overflow-wrap: anywhere; } /* the documents: plain links (the link colour, never a status colour) that wrap on a narrow screen */
.scr-docs { margin: 0 0 var(--s2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.scard-more { margin-top: var(--s3); padding: var(--s3) var(--s4); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); }
.scard-more[hidden] { display: none; }
@container scard (max-width: 440px) { /* a narrow card: the band's words wrap onto a second line instead of squeezing the title away; the
  verdict's reason goes under its chip instead of one word per line (B-371). 440px: the band's words on one line need about 412px */
  .ov2-card.scard > header { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: var(--s1); }
  .scard-vd { flex-wrap: wrap; }
  .scard-rws .scard-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } /* a phone: each row is short, "more ›" opens the rest */
  .scard-rws .scard-t.open { display: block; }
}
@media (max-width: 640px) { /* the phone: each label above its line, the buttons wrap at the foot */
  .scard-rows { grid-template-columns: minmax(0, 1fr); }
  .scard-rows > dt { padding-bottom: 0; border-bottom: 0; }
  .scard-rws > dt { padding-bottom: 0; border-bottom: 0; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; }
  .scard-rws > dd { padding-top: 2px; border-top: 0; }
  .scard-ft .pp-dec > .pp-dn { width: 100%; }
  .scard-ft > .si-strip, .scard-ft .si-form { width: 100%; }
  .scard-ft .si-form > :is(input[name=sinote], select) { flex: 1 1 100%; width: auto; }
  /* the decision buttons (Accept, Decline, Need info) stay in the card's footer bar, bottom right, fixed above the bottom bar while the card is on screen (his pick 11/02/26, the 11/01 review's A12: Accept sat at the bottom of a 1300 px screen) */
  .scard:has(> .scard-ft > .pp-dec) { overflow: clip; } /* clip, not hidden: a card that hides its overflow cannot hold a sticky bar */
  .scard-ft:has(> .pp-dec) { position: sticky; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); z-index: 7; background: var(--surface); box-shadow: 0 -6px 14px rgba(0, 0, 0, .08); }
}
/* ───────── the refill request card (B-383, his approved mock-up 2026-10-13; public/js/refill-card.js) ─────────
   The screen card's band, chip, rows and foot, used again: six fixed rows, one line per fact; the Medicine and Pharmacy form opens in the
   foot (no pop-up); the task's own screen folds under "How we got here" on the same card-more box. */
.rfc-rows > dd > div + div { margin-top: var(--s1); }
.rfc-load { margin: 0; padding: var(--s3); }
.rfc-ft > form.rfc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2); width: 100%; }
.rfc-form > label { flex: 1 1 12rem; display: flex; flex-direction: column; gap: var(--s1); font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.rfc-form > label:first-child { flex-grow: 2; flex-basis: 18rem; } /* the medicine is the longer line */
.rfc-form > :is(.hint, .actions) { flex-basis: 100%; margin: 0; }
.rfc-form > .actions { display: flex; justify-content: flex-end; gap: var(--s2); }
.rfc-more > .tk-b { padding: 0; }
.rfc-more > .fx-card { margin-top: var(--s3); }
/* ───────── the Pre-visit review card (B-383, his approved design 2026-10-13; public/js/previsit.js pvcHtml): the screen card's look, seven rows,
   the cards of the review folded under "How Autumn got there" ───────── */
.scard-chip.plain { background: var(--sunk); color: var(--ink); }
.pvr-more { display: grid; gap: var(--s3); min-width: 0; }
.pvr-more[hidden] { display: none; }
.pvcard .pvc-l + .pvc-l { margin-top: var(--s1); }
.pvcard .pvc-t { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pvcard .pvc-sweep { margin: 0; }
.pvcard .pvc-fl { display: inline-flex; align-items: center; gap: var(--s2); margin-right: auto; }
.pvcard .pvc-ft > .q { font-size: var(--t-sm); }
.pvcard .rel-ask { margin-top: var(--s1); }
.ov2-card.pvcard > header > .hint { min-width: 0; white-space: normal; text-align: right; } /* the visit, the provider and Autumn's date are longer than the screen card's: they wrap */
@container scard (max-width: 440px) { /* a phone, or beside an open document: every snapshot row shows (B-442: the Medicines and Imaging rows too); the visit line wraps under the title */
  .ov2-card.pvcard > header > .hint { order: 3; flex-basis: 100%; margin-left: 0; text-align: left; }
}
/* the snapshot on both cards (B-442, public/js/previsit.js snRows, snLine): each topic one line read top to bottom, a bold inline label and
   its text after it (core.js labelLine, Clinic prep's look: his preferred structure 2026-10-15); no label column, no boxes */
.pvcard .snap-rows { display: grid; gap: 3px; padding: 6px var(--s3) 8px; } /* tighter (his word 2026-10-23: "Previsit review needs tighter spacing") */
.pvcard .snap-rows > .snap-row { display: block; margin: 0; font-size: var(--t-md); line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.pvcard .snap-row > b:first-child + :is(.pvc-l, .csr) { display: inline; }
.pvcard .snap-row > b:first-child + .csr > .pvc-l:first-child { display: inline; }
.pvcard .snap-row ul.pvb { margin-top: 0; }
.pvcard .snap-row .pvc-l > b + .csr { display: inline; } /* "Other: …" runs on after its own label too */
/* a row with several items is one bullet per item, one line each, newest first, under its label */
.pvcard ul.pvb { margin: 0; padding-left: 16px; list-style: disc; }
.pvcard ul.pvb > li + li { margin-top: 0; }
.pvcard ul.pvb > li::marker { color: var(--quiet); }
/* a section folds to one line (his ask 2026-10-23): click its label; folded, the row shows its first line ending in "…" */
[data-snf] > b:first-child { cursor: pointer; }
[data-snf] > b:first-child::after { content: " ▾"; color: var(--quiet); font-size: var(--t-md); font-weight: var(--w-reg); }
[data-snfshut] > b:first-child::after { content: " ▸"; }
.pvcard .snap-rows > .snap-row[data-snfshut] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.pvcard .csr > ul.pvb + .link { margin-top: 2px; }
/* THE ITEM FORMAT (B-491 + B-502, core.js ifItem): one header line per item, its labelled lines a little indented under it, an optional quiet grey line,
   a small gap between items. The quiet line is the existing .q grey; nothing here adds a colour, a box or a line. */
.if-items { display: block; margin-top: 2px; }
.if-item + .if-item { margin-top: 4px; } /* a small gap between items, never a line (his word 2026-10-22: tight, no dividers) */
.if-h { line-height: 1.35; padding: 1px 0; overflow-wrap: anywhere; }
.if-l { padding: 1px 0 1px 10px; line-height: 1.35; overflow-wrap: anywhere; } /* the hub's normal text size; only the spacing is tight */
.if-q { font-size: var(--t-sm); }
.if-l .pill { vertical-align: baseline; }
.if-fold { margin-left: 10px; }
.if-det { margin-left: 10px; } .if-det > summary { cursor: pointer; list-style: none; color: var(--accent); font-weight: var(--w-bold); } .if-det > summary::-webkit-details-marker { display: none; } .if-det > ul { margin: 2px 0 0; }
/* Safety as bullets (his words 2026-10-14: "bullet format and condensed"; public/js/previsit.js pvcSafety): one short line per group and per alert,
   a tap opens the whole of it below; and a row's "more" opens its full text below it (csShortRow, "way too much") */
.pvcard .pvc-sb { margin: 0; padding-left: 1.1em; }
.pvcard .pvc-sb > li + li { margin-top: 2px; }
.pvcard .pvc-sb summary { cursor: pointer; list-style: none; }
.pvcard .pvc-sb summary::-webkit-details-marker { display: none; }
.pvcard .pvc-sb .pvc-ald { margin: var(--s1) 0 var(--s2); }
@container scard (max-width: 440px) { .pvcard .pvc-sb summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } } /* a phone: a long bullet keeps two lines; its whole text opens below it on a tap */
.pvcard .csr-f { margin-top: var(--s1); }
/* Safety as one summary line (his pick 2026-10-14, "way too long and too intrusive"; previsit.js pvcSafety): counts and short words, "see all" opens the bullets below; a truly urgent item (a blood thinner without a whole plan, a critical alert) has its own line under it */
.pvcard .pvc-urgs { margin: var(--s1) 0 0; }
/* ───────── the Overview card (B-415, his approved design 2026-10-14 "as drawn"; public/js/patient.js ppOverview): the screen card's look, the chip
   with the most pressing item, five rows, one main button; the cards of the Overview fold under "More on this chart" ───────── */
/* Room for the floating Spruce line (one root rule for every card in a chart): the chart scrolls until its last content and the foot of its last
   card sit clear above the line, never under it. The line is the last thing in the chart and holds the bottom of the screen while it scrolls.
   The room is padding on the chart body itself (the line keeps no margin of its own), so the scroll range always reaches past the last control by the line's
   height and gap, even while the line is still floating and the page has not yet counted its own resting place (his OK 2026-10-26: "Covered"). */
@media (min-width: 641px) {
  .pp:not(.pp-pop *):has(> .pp-split):has(> .spx-dock:not([hidden])) > .pp-split { padding-bottom: 72px; }
  .pp:not(.pp-pop *):has(> .pp-split) > .spx-dock:not([hidden]) { margin-top: 0; }
  .pp:not(.pp-pop *):not(:has(> .pp-split)) > .spx-dock:not([hidden]) { margin-top: 72px; }
}
/* The floating Spruce line never sits on a control (his OK 2026-10-26, screen check "Covered"): the page and the item pane keep scroll room equal to the line's height
   and its gap, so a control brought into view (a tap, the Tab key, "scroll to it") lands clear above it; the open conversation is at most half the screen,
   its thread takes what is left and scrolls, so it never reaches the middle of the screen */
@media (min-width: 641px) {
  :is(html, .drawer):has(.spx-dock.slim:not([hidden])) { scroll-padding-bottom: 72px; }
  :is(html, .drawer):has(.spx-dock.open:not([hidden])) { scroll-padding-bottom: calc(50vh + 16px); }
  .pp:not(.pp-pop *) > .spx-dock.slim:not([hidden]) { margin-right: 48px; } /* the line stops short of the right edge, where every band keeps its + and - fold buttons */
  .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) { max-height: 50vh; }
  .pp:not(.pp-pop *):has(> .pp-split):has(> .spx-dock.open:not([hidden])) > .pp-split { padding-bottom: calc(50vh + 16px); }
  .pp:not(.pp-pop *):has(> .pp-split) > .spx-dock.open:not([hidden]) { margin-top: calc(56px - 50vh); }
  .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) .dock-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) .msg-list { flex: 1 1 auto; min-height: 40px; max-height: none; }
  .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) .msg-send textarea { min-height: 64px; height: 64px; }
}
/* the referral's Communication log is read when it first comes on screen (B-444); its place is kept at the size of an empty log, so the page does not jump under a person who is scrolling to the History band below it */
.rf-comms { min-height: 144px; }
/* ───────── the Note orders card (B-415 item 3, his approval 2026-10-14 "as drawn"; public/js/orders.js vnaHtml): the screen card's band, chip,
   rows and foot. One row per proposed order: its tick and name, one line, Edit; a missing choice asked on the row as buttons; the full form
   opens in place under Edit. Colour only on the chip (his rule: colour said once). ───────── */
.nocard [hidden] { display: none; }
.ov2-card.nocard > header > .hint ~ a { margin-left: var(--s2); } /* the visit on the right, "the note ▸" after it */
.an-out .ov2-card.nocard > header > .hint { display: none; } /* in Note orders the line above the card already names the visit: said once */
.nocard .noc-rows { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); column-gap: var(--s3); }
.nocard .noc-rows > dt { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; }
.nocard .noc-rows > dt:is([data-vnp], [data-vno]) { color: var(--ink); font-size: var(--t-md); }
.nocard .noc-rows > dt > b { min-width: 0; overflow-wrap: anywhere; }
.nocard .noc-tick { display: inline-flex; flex: none; height: var(--lh-md); align-items: center; }
.nocard .noc-tick > input { width: 16px; height: 16px; margin: 0; }
.nocard .noc-rows > .off { opacity: .62; }
.nocard dd.off > :is(.noc-ask, .noc-f) { display: none; }
.nocard .noc-line > button.link { margin-left: var(--s1); vertical-align: baseline; } /* Edit at the end of the row's line, as drawn */
.nocard dd button.link.small { height: auto; min-height: 0; padding: 0; font-size: var(--t-sm); }
.nocard .noc-m, .noc-more .noc-m { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.nocard .noc-ask { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); margin-top: var(--s1); }
.nocard .noc-ask:empty { display: none; }
.nocard .noc-q { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); max-width: 100%; }
.nocard .noc-ql { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--ink); }
.nocard .noc-q button.small { height: var(--h-ctl); min-height: 0; padding: 0 var(--s3); font-size: var(--t-sm); }
.nocard .noc-q button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); color: var(--ink); font-weight: var(--w-bold); }
.nocard .noc-q :is(select, input) { width: auto; max-width: 100%; height: var(--h-ctl); font-size: var(--t-sm); }
.nocard .noc-q input { flex: 1 1 8rem; min-width: 0; width: auto; max-width: 14rem; } /* never wider than a narrow pane (the Right panel) */
.nocard .noc-f { margin-top: var(--s2); gap: var(--s2); }
.nocard .noc-lv { align-items: flex-start; }
/* the levels: the region's buttons (several allowed), the region switch, the typed box (public/js/procedures.js pcLevelsHtml): one control everywhere */
.lvp { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; max-width: 100%; }
.lvp-b, .lvp-r { display: flex; flex-wrap: wrap; gap: var(--s1); }
.lvp-b > button.small { height: var(--h-ctl-sm); min-height: 0; padding: 0 var(--s2); font-size: var(--t-sm); }
.lvp-b > button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); color: var(--ink); font-weight: var(--w-bold); }
.lvp-r > button.link.small { height: auto; min-height: 0; padding: 0; font-size: var(--t-sm); color: var(--quiet); }
.lvp-r > button[aria-pressed="true"] { color: var(--ink); font-weight: var(--w-bold); }
.lvp > input, .nocard .noc-q .lvp > input { flex: none; width: 100%; max-width: 18rem; min-width: 0; height: var(--h-ctl); } /* never stretched by a row's flex rule */
.lvp > .lvp-err { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); } /* what is wrong, said in place (amber: the hub's amb-t) */
.lvf { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; } /* a form's Levels: not a label (a label would press its first level button) */
.lvf-l { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.nocard .noc-f .pc-codes { margin: 0; }
@container scard (max-width: 440px) { .nocard .noc-s2 { display: none; } } /* a phone, or a narrow pane: side, levels, High or Stat and the blood thinner; the rest under Edit, as drawn */
.noc-more { display: grid; gap: var(--s2); }
.noc-more .noc-mp, .noc-more p { margin: 0; }
.noc-more .noc-mh { margin: 0; font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.noc-more .noc-said { margin: 0; padding-left: var(--s4); }
.noc-more .noc-facts { grid-template-columns: 9rem minmax(0, 1fr); padding: 0; }
@container scard (max-width: 440px) { /* a phone, or a narrow pane (the Right panel): an order's name above its line; the short rows (Blood thinner, Not made into orders…) keep their label beside them */
  .nocard .noc-rows { grid-template-columns: max-content minmax(0, 1fr); }
  .nocard .noc-rows > :is([data-vnp], [data-vno], .noc-r-today) { grid-column: 1 / -1; }
  .nocard .noc-rows > dt:is([data-vnp], [data-vno], .noc-r-today) { padding-bottom: 0; border-bottom: 0; }
  .nocard .noc-rows > dt:not([data-vnp]):not([data-vno]):not(.noc-r-today) { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .nocard .noc-rows > dt:not([data-vnp]):not([data-vno]):not(.noc-r-today):nth-last-child(2) { border-bottom: 0; }
}
@media (max-width: 640px) { .noc-more .noc-facts { grid-template-columns: minmax(0, 1fr); } }
/* The document header (B-372, his approved mock-up 2026-10-13): ONE header wherever a document opens (pdfview.js docHead): the title, then
   Note · Assign… · ⋯, then ↗ ✕ at the right edge (the root .spacer); the notes fold under it on the yellow of a note. On a phone the
   title keeps ↗ ✕ on its line and the buttons take the second line. */
.dh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); min-height: 40px; padding: var(--s1) var(--s2) var(--s1) var(--s3); border-bottom: 1px solid var(--line); background: var(--surface); }
.dh-t { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dh-t > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-t > .hint { font-size: var(--t-xs); line-height: var(--lh-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.dh-acts:empty { display: none; }
.dh-acts > button.small { height: var(--h-ctl-sm); white-space: nowrap; }
.dh-edge { display: flex; align-items: center; gap: var(--s1); }
.dh-edge:empty { display: none; }
.dh-back { flex: 0 0 auto; }
.dh-notes { order: 10; flex-basis: 100%; margin: var(--s1) 0 0; padding: var(--s2) var(--s3); background: var(--sticky); border-left: 3px solid var(--note-line); border-radius: var(--r-ctl); font-size: var(--t-sm); line-height: var(--lh-sm); }
.dh-nl { list-style: none; margin: 0 0 var(--s2); padding: 0; max-height: 30vh; overflow-y: auto; } /* a long list scrolls; the PDF keeps its room */
.dh-nl > li { padding: 2px 0; overflow-wrap: anywhere; }
.dh-add { display: flex; flex-wrap: wrap; gap: var(--s2); }
.dh-add > input { flex: 1 1 200px; width: auto; height: var(--h-ctl); }
.dh-pick { order: 11; flex-basis: 100%; padding: var(--s2) 0; }
.dh-last { margin-top: 2px; overflow-wrap: anywhere; } /* a Documents list's second line: the latest note */
.dv-full { z-index: 1170; } /* a document full screen opens over the Right panel (1150) it was opened from; a row's menu (1200) still opens over it */
.dv-full > .dh { padding-top: max(var(--s1), env(safe-area-inset-top)); }
:is(.pp-beside, .dv-full, .dv-view, .vn-dock) > .dh { flex: none; } /* in a column pane the header keeps its height; the document below it scrolls */
.dv-frame { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; }
.dv-full > .dv-frame { flex: 1; min-height: 0; }
.dv-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s2) var(--s3); flex: none; }
.bs-b > .dv-frame.bs-frame { height: calc(100vh - var(--bar-h, var(--h-top)) - var(--pptop, 120px) - 120px); }
.fx-doc > .dh { margin-bottom: var(--s2); border-radius: var(--r-card) var(--r-card) 0 0; }
@media (max-width: 640px) {
  .dh-t { flex: 1 1 0; }
  .dh-acts { order: 5; flex-basis: 100%; }
}
/* Office messages: a new message already filled in (B-372, sidepanel.js spComposeView) and what a message carries */
.sp-new .sp-nf { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s1) var(--s2); align-items: center; margin-bottom: var(--s2); font-size: var(--t-sm); }
.sp-new .sp-nf > label, .sp-new .sp-nk { margin: 0; color: var(--quiet); font-weight: var(--w-reg); }
.sp-new .sp-nf select, .sp-new .sp-nf input { height: var(--h-ctl); }
.sp-new textarea { min-height: 96px; margin-bottom: var(--s2); }
.sp-new .sp-cbar { justify-content: flex-end; flex-wrap: wrap; }
.sp-new .sp-cbar > .hint { margin-right: auto; }
.chip.sp-chip { height: auto; min-height: 24px; max-width: 100%; padding: 1px var(--s2); border: 1px solid var(--line); border-radius: var(--r-round); background: var(--sunk); color: var(--ink); font-weight: var(--w-reg); line-height: var(--lh-sm); white-space: normal; overflow-wrap: anywhere; gap: var(--s1); }
.chip.sp-chip b { font-weight: var(--w-bold); }
.sp-atpick { max-height: 240px; overflow: auto; margin: 0 0 var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.sp-atpick .sp-pg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: var(--s2); }
.sp-matt { display: flex; flex-wrap: wrap; gap: 2px var(--s3); }
@media (max-width: 640px) { .sp-new .sp-nf { grid-template-columns: minmax(0, 1fr); } }
/* the Medicines row's pain medicines, ours and others (B-437; public/js/previsit.js csPainMeds): Ours / Others / Not confirmed in quiet
   words at the start of their lines, the further medicines of a group under the first; Taking / Not taking sit in the line and wrap with it */
.pvcard .pm-k { color: var(--quiet); }
.pvcard .pm-un { color: var(--quiet); }
.pvcard .pm-act { display: inline-flex; flex-wrap: wrap; gap: var(--s2); margin-left: var(--s1); vertical-align: middle; }
.pvcard .pm-act[hidden] { display: none; }
/* Confirm none / Undo in a Medicines line (B-487; public/js/previsit.js ksBtn): sits in the line and wraps with it, the whole button to the next line when it does not fit (a phone) */
.pvcard .ks-act { margin-left: var(--s1); white-space: nowrap; vertical-align: middle; }
/* a touch screen: a small sign button is at least 32 px each way, so a thumb lands on it, and a one-word link button 32 px wide (B-336: a
   list's ?, a row's ⋯, a card's − / + and ✎, Autumn's ✎, the Right panel's ✕, the Scheduler's ◀ ▶ ⟳, a tile's — and "Add" were 20 to 31 px). Last in the template, so it wins over each part's own size */
@media (pointer: coarse) { :is(.sp .sp-tabs2 button, .fx-nav > button, .fx-max, .lv-help, .mms-arrow, .tile-min, .wk-more, .rowmore, .cf-fold, .pc-fold, .rb-tog, .sec-cust, .aie-pen, .sp-ib, .dm-copy) { min-width: 32px; min-height: 32px; } button.link { min-width: 32px; } }
/* ───────── the chart's section cards (B-416 area 1, his direction 2026-10-14; public/js/core.js crdHtml): Clipboard, Activity, Visit notes, Demographics and the
   Orders tab are the screen card again: the band, the verdict chip, rows of a label and its facts (a row keeps two lines, three on a phone, "more" opens the
   rest in place), the foot, a fold. A narrow card (a phone, or beside an open note) lays out by its own width. ───────── */
.crd-rows { padding: 2px var(--s3) 6px; }
.crd-r { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 0 var(--s3); padding: 6px 0; border-bottom: 1px solid var(--line); }
.crd-r:last-child { border-bottom: 0; }
.crd-k { font-size: var(--t-sm); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--quiet); }
.crd-v { min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.crd-v > * + * { margin-top: var(--s1); }
.crd-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crd-t.open { display: block; }
.crd-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s3); }
.crd-line > :first-child { flex: 1 1 14em; min-width: 0; }
.crd-line > .crd-more { order: 3; flex-basis: 100%; text-align: left; } /* "more" sits under the words it opens, not between them and the buttons */
.crd-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); flex: none; }
.crdcard :is(button.link.small, .crd-more) { height: auto; min-height: 0; padding: 0; font-size: var(--t-sm); }
.crdcard .scard-vd > b button.link.small { font-size: inherit; font-weight: inherit; }
.crd-sub { padding: var(--s1) var(--s3) 0; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); } /* who the patient is: under the band at every width, never hidden */
.crdcard .how-body { padding: var(--s2) var(--s3); }
.crdcard .crd-who { white-space: nowrap; }
.clipcard .clip-i { padding: 2px 0; border-bottom: 0; }
.clipcard .clip-t { flex-basis: 8em; } .clipcard .clip-m { margin-left: auto; }
.clipcard .clip-t .sub { display: inline; } .clipcard .clip-t .sub::before { content: " · "; } .clipcard .clip-dev .clip-t .sub { display: block; } .clipcard .clip-dev .clip-t .sub::before { content: none; }
.clipcard .clip-errs { margin: 0; padding: var(--s1) var(--s3) 0; }
.clip-way + .clip-way { margin-top: var(--s1); }
.dmcard .dm-copy { padding: 0 var(--s1); }
.vncard .vn-nm { min-width: 0; } .vncard .vn-nm b { font-weight: var(--w-bold); }
.vncard .ord-nsub, .vncard .ord-cons { font-size: var(--t-sm); line-height: var(--lh-sm); }
.vncard .ord-cons { color: var(--quiet); }
.vncard .ord-ns { margin-left: var(--s1); }
.vncard .crd-r.ord-note { cursor: pointer; }
.vncard .crd-r.ord-note:hover { background: var(--sunk); }
.vncard .crd-r.ord-note.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent); }
.ordcard .ao-body { padding: 0 var(--s3); }
.ordcard .ao-top { margin-top: var(--s2); }
.ordcard .ao-acts.scard-ft { margin: var(--s2) calc(-1 * var(--s3)) 0; }
.an-pane:has(> .obcard) { padding: 0; background: none; border: 0; } /* the patient is the card: no box around a box */
.an-pane:has(> .obcard) > .an-back { margin-bottom: var(--s1); }
.ob-once { margin: 0; padding: var(--s1) var(--s3); background: var(--surface); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.ordcard .ord-wait { margin: var(--s2) var(--s3) 0; }
@container scard (max-width: 440px) {
  .crd-r { grid-template-columns: minmax(0, 1fr); }
  .crd-t { -webkit-line-clamp: 3; }
  .crdcard > header > .hint { display: none; }
  .crdcard > header { flex-wrap: wrap; height: auto; min-height: var(--h-band); padding-block: var(--s1); }
}
/* the chart's Tasks, Coverage, Documents and Letters (B-416 area 3): the section card again; what was a box inside them sits in the card's own padding */
.filecard :is(.pp-drop, .pp-cmpbar, .crd-docs) { margin: var(--s2) var(--s3); }
/* a file's summary from Autumn under its title (his picks 11/03/26 and his design 2026-11-04, patient.js fsHtml + core.js dsFoldHtml): "Autumn's summary" folds with − / + (like the
   referral screen's Notes); folded it is her one line cut at the edge, open it is the synopsis and the main findings. Plain text, not bold; a Critical finding sits outside the fold.
   A file she has not read says so, with Read now at the right of its row. In the viewer's header (.dh-sum) it is the same block on a tinted band. No outline box. */
.ds { margin-top: 2px; min-width: 0; }
.ds-sum > summary { display: flex; align-items: baseline; gap: var(--s2); list-style: none; cursor: pointer; }
.ds-sum > summary::-webkit-details-marker { display: none; }
.ds-sum > summary::before { content: "\2212"; width: 12px; flex: none; color: var(--accent-deep, var(--ink)); }
.ds-sum:not([open]) > summary::before { content: "+"; }
.ds-t { flex: none; font-weight: var(--w-semi, 600); color: var(--accent-deep, var(--ink)); }
.ds-one { display: none; flex: 1 1 0; min-width: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sum:not([open]) .ds-one { display: block; }
.ds-body { padding: 2px 0 0 calc(12px + var(--s2)); color: var(--ink); overflow-wrap: anywhere; }
.ds-body p { margin: 2px 0; }
.ds-k { color: var(--quiet); }
.ds-body .kp-list { margin: 2px 0 0; font-size: inherit; line-height: inherit; }
.ds .ds-em, .ds .ds-line { display: block; overflow-wrap: anywhere; }
.ds-sum + .ds-em { margin-top: 2px; }
.dh-sum { order: 9; flex-basis: 100%; min-width: 0; max-width: 100%; margin: var(--s1) 0 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.dh-sum:empty { display: none; }
.dh-sum > .ds { min-width: 0; margin: 0; padding: var(--s2) var(--s3); background: var(--selected); border-radius: var(--r-ctl); }
@media (max-width: 640px) {
  .ds-sum > summary { min-height: 44px; align-items: center; }
  .ds-state button.small { min-height: 44px; }
  .dh-sum > .ds { padding-block: 0; }
}
.ds-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.ds-state .spacer { flex: 1 1 0; }
.ds-state .cost { margin-left: auto; } /* wrapped onto its own line on a phone: the hint and Read now stay at the right of the row */
.filecard .pp-drop:first-child { margin-top: var(--s3); }
.tkcard > .tk-card, .tkcard > .tk-closed { margin: 0 var(--s3); }
.tkcard > .pp-none, .letcard > .ol-list { margin: var(--s2) var(--s3); }
/* My settings and Admin → People (B-416 area 4): each section is the card's band (My settings' sections take the band the cards have); the patient's card sets are one section with their hint said once */
.set-sec > h2.first { cursor: default; }
.set-cardset + .set-cardset { margin-top: var(--s2); }
.set-cardset > label { margin-bottom: 0; }
.adcard { margin-bottom: var(--s3); }
.adcard .ad-in { padding: var(--s2) var(--s3) 0; }
.adcard .ad-in > .tablewrap { margin-bottom: var(--s2); }
/* The Procedure orders list (B-416, his approved page 2026-10-15): the toolbar is one row in the same place on every view, under the one-line summary (the
   summary's length used to move it); beside an open card it stacks in the same order. .wl-fixbar is a list page's opt-in. */
@media (min-width: 900px) { main:not(.with-drawer) .wl-page.wl-fixbar > .toolbar { flex: 1 1 100%; margin-top: var(--s2); } main:not(.with-drawer) .wl-page.wl-fixbar > .wl-head { flex: 1 1 100%; } }
/* A decision's letter in the decision's own box (his approval 2026-10-15): Draft the letter writes it in place under Reason and Details; he
   reads and edits it there, then one button saves the decision and faxes it. */
.dl-box { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s3); }
.dl-box > [data-dldraft] { align-self: flex-start; }
.dl-letter { display: flex; flex-direction: column; gap: var(--s2); }
.dl-letter:empty { display: none; }
.dl-letter .dl-to { margin: 0; }
.dl-letter .dl-faxpart { display: flex; flex-direction: column; gap: var(--s2); }
.dl-letter .dl-body { width: 100%; min-width: 0; min-height: 16em; font-family: inherit; font-size: var(--t-md); line-height: var(--lh-md); }
/* the number read back before a fax goes to a number not on file (or one on file that changed since the draft): large, then why */
.dl-letter .dl-rb-num { display: block; font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
/* Top referrers with this month against the usual (B-479): the clinic under the name; on the phone the table gives way to short cards, one 'Label: text' line per figure */
.rt-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rt-wide .rt-sub { max-width: 20em; } .rt-more { margin: var(--s2) 0 0; } .rt-cards { display: none; } .rt-spec { max-width: 720px; }
@media (max-width: 640px) {
  .rt-wide { display: none; } .rt-cards { display: block; }
  .rt-card { padding: var(--s3) 0; } .rt-card + .rt-card { border-top: 1px solid var(--line); }
  .rt-name { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); overflow-wrap: anywhere; } .rt-card .cp-l { overflow-wrap: anywhere; }
}
/* ---------- Procedures > Monitor and Send & receive > Inbox, reshaped (preview "Snapshot layout"; his approval 2026-11-08, mock-ups mon1 / mon2 / ib / phib). Token colours only. ---------- */
  .pc-msnap > header { gap: var(--s3); }
  .pc-msnap > header > b { flex: 0 1 auto; }
  .pc-msay { font-weight: var(--w-reg, 400); font-size: var(--t-sm); opacity: .9; margin-right: auto; }
  .pc-msnap > header > b { margin-right: 0; }
  .pc-msnap .snr-t th:first-child { width: 46%; }
  .ho-snapcard .ho-bar input[type="search"] { flex: 1 1 auto; max-width: none; }
  .pc-mbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); }
  .pc-mbar .spacer { flex: 1; }
  .pc-mbar .pc-dfil { display: inline-flex; flex-wrap: wrap; gap: var(--s2); }
  .pc-msnap #pcdbody { padding-bottom: var(--s2); }
  .pc-msnap .snr-goal { margin: 0 0 2px; color: var(--quiet); }
  .pc-msnap .snr-c-days { width: 96px; }
  .pc-msnap .snr-t td:first-child { white-space: normal; }
  .pc-msnap .snr-t .row { cursor: pointer; } .pc-msnap .snr-t .row:hover { background: var(--sunk); } .pc-msnap .snr-t .row.open { background: var(--selected); }
  .snr-lk { color: var(--accent); }
  .pc-msnap .snr-fold { font-weight: var(--w-bold); }
  .pc-msnap .snr-fd > .snr-hint { display: none; padding-top: 3px; color: var(--quiet); font-size: var(--t-sm); }
  .pc-msnap .snr-fd.snr-folded > .snr-hint { display: block; }
  .pc-msnap .snr-c .pc-none { margin: 2px 0 0; }

  .ho-snapcard > #horows, .ho-snapcard > #hodocs, .ho-snapcard > #honow { margin-left: 0; margin-right: 0; }
  .ho-snapcard > #honow { margin-bottom: var(--s2); }
  .ho-h { display: grid; grid-template-columns: 22% minmax(0, 1fr) 150px 150px; gap: 0; padding: var(--s2) var(--s4) 2px; font-size: var(--t-xs); color: var(--quiet); }
  .ho-snaplist { padding: 0 var(--s4); }
  .ho-snapt td { overflow: hidden; }
  .ho-snapt td.ho-f { white-space: nowrap; text-overflow: ellipsis; }
  .ho-snapt .ho-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ho-snapt .ho-src { color: var(--quiet); }
  .ho-snapt td.more { white-space: nowrap; }
  .ho-snapt td.more .link { font-weight: var(--w-bold); color: var(--accent); min-height: 0; padding: 0 0 0 var(--s3); }
  .ho-snapt .ho-cands, .ho-snapt .ho-find { white-space: normal; }
  .ho-docs .snw-rows { padding: 0 var(--s4) var(--s2); }
  .ho-docs .fd-th { margin: var(--s2) 0 var(--s1); }
  .ho-adminline { margin: 0; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); color: var(--quiet); font-size: var(--t-sm); }
  .ho-snapcard > .ho-bar { margin-left: var(--s4); margin-right: var(--s4); align-items: center; }
  @media (max-width: 640px) {
    .ho-h { display: none; }
    .ho-snaplist { padding: 0 var(--s3); }
    table.ho-snapt tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); align-items: baseline; }
    table.ho-snapt td { grid-column: 1 / -1; }
    table.ho-snapt td.ho-f { grid-column: 1; grid-row: 1; white-space: normal; font-weight: var(--w-bold); }
    table.ho-snapt td.ho-at { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
    table.ho-snapt td.ho-why { grid-row: 2; }
    table.ho-snapt td.more { grid-row: 3; text-align: right; }
    .ho-snapt .ho-line { white-space: normal; }
    .ho-snapt .ho-src { display: block; } .ho-snapt .ho-dot { display: none; }
    .ho-snapcard > header .ho-snapsay { display: none; }
    .ho-snapcard .snw-band .snw-hint { display: none; }
    .ho-snapcard > .ho-bar { margin-left: var(--s3); margin-right: var(--s3); }
    #hofoldall { display: none; }
  }
  /* A list's search bar inside a card (Send & receive, Patients) is not pinned on a phone: the card clips what scrolls, so "sticky" only pushed the bar 9 px down over the first row (look fix 2026-11-17) */
  @media (max-width: 640px) { .ov2-card > .toolbar.listbar { position: static; } }

/* ───────── Finger-sized buttons on a phone (B-473, his yes 2026-10-19; reworked after the checker's touch probe) ─────────
   Every button and button-like link is at least 32 px tall (and 32 wide: the icon buttons, listed) on a touch screen or a phone (the sweep found 88 places on 25 screens from 13 to 26 px);
   the computer is unchanged. No control gets smaller than it was:
   (1) the floor itself is in the lowest layer (@layer base, at the end of this file), so every part's own larger size (the old sheet's 40 and 44 px) still wins
       and only a smaller one is raised;
   (2) the few parts that set a smaller minimum of their own (a priority pill, the layout arrows, a segmented switch, a card header's buttons) are listed here and
       raised to 32 px, none of them above a larger size another rule gives;
   (3) a text link (button.link, a.link) gets at least 8 px above and below, so its tap area is 32 px; the extra :not(#app) lifts this one rule over the
       cards and rows that zeroed their links' padding (a link's tap areas do not overlap its neighbours', so the line grows rather than shrinks its target). */
@media (pointer: coarse), (max-width: 640px) {
  :is(main table.wk-t button.wk-prio, button.wk-ktype, .at-s .seg > *, .lay-mv button, .si-strip button.small) { min-height: 32px; }
  :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cl-b > h3, .cardhead, .pp-ph) select { min-height: 32px; }
  .lay-mv button { min-width: 32px; } /* an arrow: no words, so no content width to protect */
  :where(.ov2-card > header button:not(.link)) { min-height: 32px; } /* no specificity: a menu inside a card's header keeps its own 44 px rows */
  :is(.nc-add, .ch-tx, .wk-star, .qdb, #lgprev, #lgnext, #pdprev, #pdnext, [data-npx]) { min-width: 32px; } /* icons and one-glyph buttons: no words, so no content width to protect */
  #fxcheck { flex: none; width: auto; padding: 0 10px; } /* a words button in a card header that the band rules size as a 28 px icon */
  .qdb { margin-inline: -1px; } /* 32 px wide, same room in its row as before (the date box beside it keeps its width) */
  :is(button.link, a.link):not(#app, .pp-nosex, .pp-teamlink, .pp-proch) { box-sizing: border-box; padding-block: max(8px, calc((32px - 1lh) / 2)); }
  /* the patient's name button is 28 px tall: 2 px more above and below, given back in the margin, so the header keeps its height */
  button.ppname:not(#app) { box-sizing: border-box; padding-block: max(0px, calc((32px - 1lh) / 2)); margin-block: calc(-1 * max(0px, (32px - 1lh) / 2)); }
  /* the chart header's three links keep their box (the header stays concise): the 32 px tap area is a transparent layer round the link, 7 px above and below its 18 px line;
     the phone number sits above it, so a tap on the number always dials */
  :is(.pp-nosex, .pp-teamlink, .pp-proch) { position: relative; }
  :is(.pp-nosex, .pp-teamlink, .pp-proch)::after { content: ""; position: absolute; z-index: 1; inset: -10px -4px -20px; } /* the links are 15 px tall: the layer reaches 17 px above and 27 below, and the line round them gives it 16 each way (the number's line above and the flag chips below stay tappable) */
  .pp-nosex::after { inset: -20px -4px -8.5px; } /* Gender?: the number's line is below it */
  .pp-head:not(.pp-more) .pp-sub { padding-block: 3px; } /* the header's third line: 3 px of room above and below, so the Team and Procedures links have a 32 px tap area */
  .pflag { position: relative; z-index: 3; } /* a patient flag chip under the header wins over the links' tap layers: a tap on a flag opens the flag */
  .pp-r1 a[href^="tel"] { position: relative; z-index: 2; }
  .morehint summary { padding: 8px 2px; } /* an inline "More" in a hint line: padding adds to its box and to its tap area */
}
/* The Visits line on every screen that opens one item (his ask 2026-10-28): one line, bold label then text, on a phone too */
.cp-l.cp-visits { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
/* a phone: the longest wording ("last: none in the hub · next: none on the schedule") still fits one line at 360 and 375 wide */
@media (max-width: 480px) { .cp-l.cp-visits { font-size: clamp(11px, 3.3vw, var(--t-sm)); line-height: var(--lh-sm); } }
.cp-l.cp-visits[hidden] { display: none; }

/* The phone chart header (preview "Phone chart header", work.pv_phonehead; his approved mock-up 2026-11-07, section 2). Only a phone with the preview on sees any of it; a computer and
   the preview off are the header as it was. Name, one quiet line (age, sex, birth date, phone, next visit), one row of flags (Anticoagulation, Implanted device and Fall risk always;
   the rest behind "+N"), the allergies in full on their own line, the written note on one line, four tools and More. Details opens team, MRN, the other flags and the Clinical / Office switch. */
.ph-only { display: none; }
@media (max-width: 640px) {
  .pp-phh .ph-only { display: inline; }
  .pp-phh .pp-head.pp-more .ph-only { display: none; }
  .pp-phh .pp-head .pp-id h1 .pp-r1 { display: flex; flex-wrap: nowrap; column-gap: 0; white-space: nowrap; overflow: hidden; }
  .pp-phh .pp-head .pp-id h1 .pp-r1 { margin-right: -64px; font-size: clamp(11px, 2.9vw, var(--t-sm)); } /* the h1 keeps room for Details; the quiet line may run under it */
  .pp-phh .pp-head .pp-r1 .pp-it { flex: 0 0 auto; }
  .pp-phh .pp-head .pp-r1 .pp-it.ph-only { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pp-phh .pp-head .pp-r1 .pp-it + .pp-it::before { content: "\00B7"; margin: 0 var(--s1); color: var(--muted); }
  .pp.pp-phh > .pp-top, .pp.pp-phh > .pp-toolbar { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .pp-phh .pp-head .pp-id { flex: 1 1 0; min-width: 0; }
  .pp-phh .pp-head .pp-id h1 { min-width: 0; }
  .pp-phh .pp-head:not(.pp-more) .pp-sub { display: none; }
  .pp-phh .pp-head.pp-more .pp-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-top: var(--s1); }
  .pp-phh .pp-head.pp-more .pp-sub .pp-subt { display: contents; }
  .pp-phh .pp-head .pp-alerts { gap: var(--s1); margin-top: var(--s1); }
  .pp-phh .pp-head .pp-alerts .mflag:not(.ph-rest), .pp-phh .pp-head .pp-alerts.open .mflag { display: inline-block; }
  .pp-phh .pp-head:not(.pp-more) .pp-alerts:not(.open) .ph-rest { display: none; }
  .pp-phh .pp-head .pp-alerts .ph-more { padding: 0 var(--s1); }
  .pp-phh .pp-head.pp-more .pp-alerts .ph-more { display: none; }
  .pp-phh .pp-head .pp-alerts .ph-allg { flex: 1 1 100%; min-width: 0; margin-left: 0; white-space: normal; overflow-wrap: anywhere; }
  .pp.pp-phh .pp-toolbar { display: none; } /* the phone reaches every action from Actions ▾ (his word 2026-11-14: the row beside it was a second way and cost a line) */
  .pp-phh:not(.pp-details) .pp-sticky .sk-tabs { display: none; }
  .pp-phh .pp-sticky .sk-lab { align-self: center; padding-left: var(--s2); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
  .pp-phh.pp-details .pp-sticky .sk-lab { display: none; }
}


/* ---------- the booking page, tighter (his ask 11/08/26: "there is too much space"): the whole form on one computer screen, the day without empty hours.
   Visual only: ModMed's fields, their order and names, the grid's cells, colours and legend stay. ---------- */
  .sca-state { margin: var(--s1) var(--s3) 0; }
  .sca-card { margin: 0; border: 0; border-radius: 0; }
  .sca-card > header { padding: 2px var(--s3); font-size: var(--t-sm); border-bottom: 0; }
  .sca-b { padding: var(--s1) var(--s3) var(--s2); gap: var(--s1) var(--s2); }
  .sca-when { font-size: var(--t-md); }
  .sca-r2, .sca-r4, .sca-r3 { gap: var(--s1) var(--s2); }
  .sca-r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .sca-r3 > .sca-r3-all { grid-column: 1 / -1; margin: 0; }
  .sca label.f, .sca .f { gap: 1px; font-size: var(--t-xs); }
  .sca .f :is(input:not([type=checkbox]), select) { height: 28px; min-height: 28px; padding: 2px var(--s2); }
  .sca .f textarea { height: 46px; min-height: 46px; padding: 2px var(--s2); resize: none; line-height: 1.3; }
  .sca .f .v { padding: 4px 0; }
  .sca-r4 input[type=date], .sca-r4 input[type=time] { padding-right: 2px; font-size: var(--t-sm); }
  .sca-pt { padding: 2px var(--s2); gap: var(--s2); }
  .sca-pt > span:nth-child(2) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); }
  .sca-av { width: 22px; height: 22px; font-size: var(--t-xs); }
  .sca-before { margin: 0; }
  .sca-chk { align-items: center; }
  .sca-fold { border-top: 1px solid var(--line); }
  .sca-fold > summary { display: flex; align-items: baseline; gap: var(--s3); padding: 2px var(--s3); cursor: pointer; list-style: none; background: var(--band-2); font-size: var(--t-sm); }
  .sca-fold > summary::before { content: "+"; font-weight: var(--w-bold); width: 1ch; }
  .sca-fold[open] > summary::before { content: "−"; }
  .sca-fh { font-weight: var(--w-bold); } .sca-fs { color: var(--quiet); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sca-foot { margin: 0 var(--s3) var(--s1); }
  .sca-bar { padding: var(--s1) var(--s3); }
  /* the booking bar: one line on a computer */
  .mms-bar { flex-wrap: nowrap; padding: var(--s1) var(--s3); margin: 0 0 var(--s1); }
  .mms-bar-t { flex: 1 1 0; }
  .mms-bar-one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mms-bar-act { flex-wrap: nowrap; }
  .mms-top { padding: 0; } .mms-filter { padding: 1px 0; } .mms-for { margin: 2px 0; }
  .mms-col { background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--mms-row, 20px)); }
  .mms-bk { line-height: 12px; }
  .mms-gut span { line-height: 17px; }
  @media (max-width: 640px) { .mms-bar { flex-wrap: wrap; } .mms-bar-one { white-space: normal; } .mms-bar-act { flex-wrap: wrap; } .sca-r3 { grid-template-columns: minmax(0, 1fr); } }
} /* end of layer moved */
@layer base {
  @media (pointer: coarse), (max-width: 640px) {
    :is(button:not(.link), summary, select, [role="button"], a.btnlink, a.primary, a.secondary, a.quiet, a.danger) { min-height: 32px; }
  }
}

/* THE CALM PRE-VISIT REVIEW (B-503, a per-person preview; public/js/previsit.js pvkCard): Inter and tighter spacing inside this card only (his pick
   2026-10-23: "Pre-visit review - Inter tight, bold labels" mock-up). Inter is self-hosted in /fonts (latin 400 + 600 from @fontsource/inter 5.1.0,
   OFL: LICENSE-inter.txt; never loaded from another site: CSP font-src 'self'); characters outside latin fall back to the hub's own font. Text size is the
   hub's; labels (item names, section names) 600 in the normal dark; no row lines; colour only where something is waiting, missing or concerning. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
.pvk { --pvk-label: var(--ink); font-family: var(--font); } /* the hub's one typeface (the Summary was the only place in Inter, so the type changed as you moved between chart tabs) */
:root[data-theme="light"] .pvk, :root:not([data-theme]) .pvk { --pvk-label: #16293f; }
.pvk button, .pvk input { font-family: inherit; }
.pvk .pvk-rows { gap: 6px; padding: 8px 12px; }
.pvk .pvk-lbl { font-size: var(--t-sm); font-weight: var(--w-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--quiet); }
.pvk .pvk-syn { font-size: var(--t-md); line-height: 1.32; min-width: 0; overflow-wrap: anywhere; }
.pvk .pvk-vc { background: var(--sunk); border-radius: 8px; padding: 5px 9px; display: grid; gap: 1px; min-width: 0; }
.pvk .pvk-t { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; height: auto; text-align: left; justify-self: start; cursor: pointer; font: inherit; font-size: var(--t-sm); font-weight: var(--w-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--quiet); }
.pvk .pvk-t::before { content: "▾ "; } .pvk .pvk-t[aria-expanded="false"]::before { content: "▸ "; }
.pvk .pvk-t .pvk-when { text-transform: none; letter-spacing: 0; font-weight: var(--w-reg); }
.pvk .pvk-i { display: flex; gap: 6px; align-items: baseline; line-height: 1.28; font-size: var(--t-md); min-width: 0; overflow-wrap: anywhere; }
.pvk .pvk-i > span:last-child { min-width: 0; }
.pvk .pvk-i b, .pvk .pvk-gt { font-weight: var(--w-bold); color: var(--pvk-label); }
.pvk .pvk-sub { padding-left: 20px; color: var(--quiet); }
.pvk .pvk-gt { line-height: 1.28; }
.pvk .pvk-g { display: grid; gap: 1px; } .pvk .pvk-g + .pvk-g { margin-top: 3px; }
.pvk .pvk-gi { padding-left: 12px; }
.pvk .pvk-gt.pvk-vgt { font-size: var(--t-sm); font-weight: var(--w-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--quiet); margin-top: 3px; } /* Needs attention · In progress · Done since the last visit: quiet small caps, not bold labels */
.pvk .pvk-when { color: var(--quiet); font-size: var(--t-sm); }
.pvk .pvk-m { flex: none; width: 14px; text-align: center; font-weight: var(--w-bold); }
.pvk .pvk-m.m-ok { color: var(--done); } .pvk .pvk-m.m-wait { color: var(--late); } .pvk .pvk-m.m-no { color: var(--late); } .pvk .pvk-m.m-info { color: var(--quiet); }
.pvk .pvk-a .pvk-m.m-no { color: var(--urgent); } /* red only for a finding the hub flags as concerning (said once), never for something merely missing */
.pvk .pvk-vc[data-pvkshut] > :not(.pvk-t):not(.pvk-c):not(.pvk-g) { display: none; }
.pvk .pvk-vc[data-pvkshut] .pvk-g:not(:has(.pvk-c)), .pvk .pvk-vc[data-pvkshut] .pvk-g .pvk-i:not(.pvk-c) { display: none; } /* folded: the title and the concerning lines, one line each */
.pvcard.pvk .snap-rows > .pvk-sec { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: var(--s3); align-items: baseline; padding: 1px 0; line-height: 1.28; margin: 0; font-size: var(--t-md); min-width: 0; }
.pvk .pvk-n { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; height: auto; text-align: left; cursor: pointer; font: inherit; font-weight: var(--w-bold); color: var(--pvk-label); white-space: normal; overflow-wrap: anywhere; min-width: 0; } /* a name wraps inside its column and never runs into its value ("Other surgeries" + "none documented"): his report 2026-10-26 */
.pvk .pvk-n::before { content: "▸ "; color: var(--quiet); font-weight: var(--w-reg); } .pvk .pvk-sec[data-pvkopen] > .pvk-n::before { content: "▾ "; }
.pvk .pvk-fixed > .pvk-n { cursor: default; } .pvk .pvk-fixed > .pvk-n::before { content: ""; }
.pvk .pvk-v { min-width: 0; overflow-wrap: anywhere; }
.pvk .pvk-sec[data-pvkopen] > .pvk-v { display: none; }
.pvk .pvk-body { grid-column: 1 / -1; padding: 1px 0 3px 14px; min-width: 0; }
.pvk .pvk-body[hidden] { display: none; }
.pvk .pvk-all { margin-left: var(--s2); background: none; border: 1px solid var(--on-band-quiet); color: var(--on-band); border-radius: 6px; padding: 0 8px; min-height: 0; height: auto; font-size: var(--t-sm); font-family: inherit; cursor: pointer; white-space: nowrap; }
.pvk .scard-ft { padding: 4px 12px 8px; }
@container scard (max-width: 440px) {
  .pvk .pvk-sec { grid-template-columns: 104px minmax(0, 1fr); column-gap: var(--s2); }
  .pvk .pvk-sub { padding-left: 14px; }
}

/* THE SUMMARY TAB (his approval 2026-10-26; public/js/summary.js): the calm Pre-visit review's look (.pvk) with ONE Autumn read line under the title, two copy buttons in
   the foot, and the imaging history under the Imaging line. Tokens only; no new colour. */
.smy .smy-read { padding: 6px 12px 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.smy .smy-rs { min-width: 0; overflow-wrap: anywhere; }
.smy .smy-read .link { font-size: inherit; }
/* his revision 2026-10-26 ("Summary revision mock-up"): lists for lists. The bold label sits in a column beside its list on a wide card and on its own line, the list under it at full width, on a narrow one (a phone, or the right panel: the card's own width decides, not the screen's) */
.pvcard.smy .snap-rows > .smy-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: var(--s3); align-items: baseline; padding: 1px 0; line-height: 1.28; margin: 0; font-size: var(--t-md); min-width: 0; }
.smy .smy-l { min-width: 0; overflow-wrap: anywhere; color: var(--pvk-label); }
.smy .smy-l b { font-weight: var(--w-bold); }
.smy .smy-l .link { margin-left: var(--s1); font-weight: var(--w-reg); }
.smy .smy-v { min-width: 0; overflow-wrap: anywhere; }
.smy .smy-v ul.pvb { margin: 0; padding-left: 16px; }
.smy .smy-v .csr { display: block; }
.smy .smy-v .csr > .link.small { margin-left: 0; }
.smy .smy-v .csr-f { margin-top: 1px; }
.smy .smy-foot { display: grid; gap: var(--s2); padding: 6px 12px 10px; }
.smy .smy-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s1) var(--s3); }
.smy :is(.smy-v, .smy-l) :is(a.link, button.link) { display: inline; height: auto; min-height: 0; padding: 0; line-height: inherit; } /* a study's name is a line of the list, not a tall button */
.smy .smy-links .how-ft { display: contents; }
.smy .smy-links .how-ft > button.how-tog { font-size: var(--t-sm); font-weight: var(--w-bold); }
.smy .smy-ihb { padding: var(--s2) var(--s3); }
.smy .smy-ihb .if-items { gap: 6px; }
.smy .smy-wbox { margin-bottom: var(--s3); }
.smy .smy-wt { margin: 0 0 var(--s2); }
@container scard (max-width: 520px) {
  .pvcard.smy .snap-rows > .smy-row, .pvcard.smy .snap-rows > .pvk-sec { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .pvcard.smy .snap-rows > .smy-row .smy-v { padding-left: 2px; }
  .smy .smy-btns > button.secondary { flex: 1 1 40%; min-width: 0; height: auto; min-height: var(--h-ctl); padding: var(--s1) var(--s2); white-space: normal; line-height: 1.2; } /* the Copy buttons sit two to a row and wrap, as in the mock-up */
}
.smy .pvk-body .if-items { gap: 6px; }
.smy .pvk-v .link.small { margin-left: var(--s2); }
.smy-copyrows { margin: 2px 0 6px; }
/* THE SUMMARY AFTER OUR VISIT (his approval 2026-10-30, "Summary after our visit mock-up"): our visit leads in the same list rows; the top line is the visit and what is next */
.smy-ours .smy-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); padding: 6px 12px 4px; }
.smy-ours .smy-top > b { font-weight: var(--w-bold); }
.smy-ours .smy-top > span { color: var(--quiet); font-size: var(--t-sm); }
.smy-chart { margin-bottom: var(--s3); }

/* THE CALM LOOK ON FIVE CHART SCREENS (B-504; Dr. Pugh signed off the "Chart screens calm mock-up" 2026-10-23). The same per-person preview switch as the calm
   Pre-visit review (work.pv_calm), off by default; public/js/calm.js. The screens add the .pvk class (Inter, bold labels 600 in #16293f, set above) to their own
   card, so nothing outside them changes: the Clinical summary, the Results list, the Procedure order, the chart's Orders card and its Tasks card. Tight
   spacing, no row lines, dates and sources in quiet grey; colour only where something is waiting, missing or concerning (the marks and the tones the screens already had). */
.pvk .ck-sec, .pvcard.pvk .snap-rows > .ck-sec { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: var(--s2); align-items: baseline; padding: 1px 0; line-height: 1.28; margin: 0; font-size: var(--t-md); min-width: 0; }
.pvk .ck-sec[data-pvkopen] > .pvk-v { display: block; } .pvk .ck-sec[data-pvkopen] .ck-s { display: none; }
.pvk .ck-sec .poc-acts { margin-left: 0; }
.pvk .ck-g, .pvk .ck-g * { color: var(--quiet); font-weight: var(--w-reg); } .pvk .ck-g .amb-t { color: var(--late); } .pvk .ck-g { font-size: var(--t-sm); }
.pvk .ck-i { padding: 1px 0; }
.pvk .poc-calm { display: grid; gap: 1px; padding: 6px 12px 8px; min-width: 0; }
.pvk .ck-it1 { line-height: 1.28; margin-bottom: 3px; font-size: var(--t-md); min-width: 0; overflow-wrap: anywhere; } .pvk .ck-it1 .poc-i b, .pvk .ck-i .poc-i b { font-weight: var(--w-bold); color: var(--pvk-label); }
.pvk .poc-i.ok { color: inherit; }
.pvk .poc-vd { border-bottom: 0; padding: 7px 12px 0; } .pvk .poc-ft { border-top: 0; padding: 0 12px 8px; background: none; }
.pvk .poc-read { margin-top: 0; }
.pvk .ck-row { border-bottom: 0; padding-right: var(--s3); }
.pvk .ck-row .cr-main { grid-template-columns: 62px minmax(0, 1fr); padding: 1px 0 1px var(--s3); gap: 0 var(--s2); }
.pvk .ck-row .cr-d { font-size: var(--t-sm); white-space: nowrap; } .pvk .ck-row .cr-t { line-height: 1.28; } .pvk .ck-row .cr-t b { font-weight: var(--w-bold); color: var(--pvk-label); }
.pvk .ck-row .cr-act { padding-top: 0; }
.pvk .cr-band { background: none; color: var(--quiet); padding: 3px var(--s3) 0; margin-top: 4px; font-size: var(--t-sm); letter-spacing: .05em; text-transform: uppercase; }
.pvk .cr-more { padding: 1px var(--s3); }
.ordcard.pvk .ob-l { border-bottom: 0; padding: 1px var(--s3); font-size: var(--t-md); line-height: 1.28; gap: 0 var(--s3); }
.ordcard.pvk .ob-lw { font-weight: var(--w-bold); color: var(--pvk-label); } .ordcard.pvk .ob-lw .hint, .ordcard.pvk .ob-lw .amb-t, .ordcard.pvk .ob-lw .chip { font-weight: var(--w-reg); }
.ordcard.pvk .ob-ld, .ordcard.pvk .ob-lh { color: var(--quiet); font-size: var(--t-sm); }
.ordcard.pvk .ob-cat { background: none; border-radius: 0; padding: 0; margin-top: 6px; font-size: var(--t-sm); letter-spacing: .05em; text-transform: uppercase; color: var(--quiet); }
.ordcard.pvk .ao-done .ob-lines { margin-left: -14px; } .ordcard.pvk .ao-acts.scard-ft { padding-top: 2px; }
.tkcard.pvk > .tk-card.ck-tk { display: flex; gap: 7px; align-items: baseline; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 1px 0; margin: 0 var(--s3); font-size: var(--t-md); line-height: 1.28; }
.tkcard.pvk .ck-tk .ck-tkp { flex: none; min-width: 3.6em; font-size: var(--t-sm); } .tkcard.pvk .ck-tk .tk-main { flex: 1; min-width: 0; overflow-wrap: anywhere; } .tkcard.pvk .ck-tk .tk-main > b { font-size: inherit; font-weight: var(--w-bold); color: var(--pvk-label); }
.tkcard.pvk .ck-tk .tk-side { flex: none; flex-direction: row; align-items: baseline; } .tkcard.pvk .ck-tk .tk-detail1 { opacity: 1; margin-top: 0; }
.tkcard.pvk .tk-closed { margin-top: 4px; } .tkcard.pvk .tk-closed > summary { margin-bottom: 2px; }
@container scard (max-width: 440px) { .pvk .ck-sec, .pvcard.pvk .snap-rows > .ck-sec { grid-template-columns: minmax(0, 1fr); } .pvk .ck-sec > .pvk-body { padding-left: 10px; } }
@container poc (max-width: 440px) { .pvk .ck-sec { grid-template-columns: minmax(0, 1fr); } .pvk .ck-sec > .pvk-body { padding-left: 10px; } }
/* New features (Admin → Rules → New features; My settings → New features): one block per preview, its words, then the switches, then who has it on. No lines between blocks. */
.pv-feat { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s2) 0 var(--s3); max-width: 62ch; }
.pv-feat > h4, .pv-feat > p { margin: 0; } .pv-feat > label { margin: var(--s2) 0 0; } .pv-feat .seg { max-width: 100%; }
.pv-feat .pv-now, .pv-feat .nf-on { margin: 0; } .pv-feat .nf-on { font-size: var(--t-sm); color: var(--ink); overflow-wrap: anywhere; }
/* "Inter font across the hub" (New features, look.inter; src/previews.js): the one type token, so every screen follows. Plex stays in the stack for the characters Inter's latin file
   lacks. Icons (.ms, Material Symbols) and the monospace spots name their own font and are untouched. Only under html.font-inter: with the switch off none of this applies. */
html.font-inter { --font: "Inter", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; }
html.font-inter table td, html.font-inter table th, html.font-inter .num, html.font-inter .badge, html.font-inter .wk-n, html.font-inter .ar-n, html.font-inter .navn, html.font-inter .count, html.font-inter .cnt, html.font-inter .rz-cnt, html.font-inter .msg-count { font-variant-numeric: tabular-nums; }
html.font-inter .apprail { padding-inline: 3px; } /* Inter is a little wider than Plex: the side rail's labels (bold when current) keep their whole word in the 76px rail, "Procedures" included */
html.font-inter .fl-c { flex-wrap: wrap; } /* Admin → Rules → Flags: the colour chip drops under its menu only when Inter's wider letters would not fit (a phone) */

/* ───────── SOFTER LOOK, STEP 1 (New features → "Softer look (first screens)", look.soft; src/previews.js) ─────────
   His approved direction (the hybrid, 2026-10-21) as a LOOK change only: lighter title bands, softer text colours, quiet buttons, and the lines between a card's rows gone.
   Nothing here moves, hides, resizes or rewords anything: colours and line colours only, and a line goes transparent, never to 0 width, so every box keeps its size.
   Every rule starts with html.look-soft (the class settings.js and theme.js put on <html> for the people who turned the switch on) and only applies on My work (the page that holds
   #wkpage, with the item panel opened from it) and the patient chart (#pproot): other screens, the top bar and the app strip on the left are not touched. Light only: under
   data-theme="dark" none of this applies, so the dark mode is never lighter than it is. With the switch off nothing in this block applies. */
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) { --soft-band: #e3ebf2; --soft-band-hover: rgba(35, 53, 66, .12); --soft-wash: rgba(35, 53, 66, .07); --soft-btn: #e9eff4; --soft-btn-hover: #dde7ef; --soft-primary: #d8e6f2; --soft-primary-hover: #cadcec; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) body { background: #f2f5f7; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(main, aside.drawer) {
  --ink: #233542; --o-ink: #233542; --quiet: #536c79; --muted: #536c79;
  --selected: #e8eff5; --sunk: #f5f8fa; --line: #e7ecf0; --o-line: #dde4ea; --line-strong: #d2dae0; --band-2: #e8eef2; --accent-deep: #233542; --o-accent: #2c5a8a; }
/* title bands: a soft tint, the slate ink; the band's own buttons are soft washes with no outline */
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cardhead, .pp-ph, .an-band) {
  --on-band: #233542; --on-band-quiet: #536c79; background: var(--soft-band); color: #233542; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cardhead, .pp-ph) :is(button.secondary, button.primary, button.quiet, select, summary.pc-prichip, summary.quiet.small) {
  background-color: var(--soft-wash); border-color: transparent; color: #233542; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cardhead, .pp-ph) :is(button, select):hover { background-color: var(--soft-band-hover); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card > header, .pc-card > header, .fx-card > header, .cardhead, .pp-ph) :is(button.icon, .cf-fold, .pc-fold, .sec-cust):hover,
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) main .wk-sech:hover .wk-pm { background: var(--soft-band-hover); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) main .wk-sech .wk-n, html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(.ov2-card > header, .pc-card > header, .fx-card > header, .cardhead, .pp-ph) .n { background: var(--soft-band-hover); color: #233542; }
/* buttons: the screen's one main button stays filled (a soft blue fill), the others are soft fills with quiet blue words; no outlines */
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(button.primary, a.primary) { background: var(--soft-primary); border-color: transparent; color: #1d4275; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(button.primary, a.primary):hover:not(:disabled) { background: var(--soft-primary-hover); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(button.secondary, a.secondary) { background: var(--soft-btn); border-color: transparent; color: var(--accent); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(button.secondary, a.secondary):hover:not(:disabled) { background: var(--soft-btn-hover); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(.wk-chip, .fbtn, button.qdb, .seg) { background: var(--soft-btn); border-color: transparent; color: #233542; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .seg { background: var(--band-2); }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .wk-chip.on { background: var(--soft-primary); border-color: transparent; color: #1d4275; }
/* a card's rows are told apart by space alone: the lines between its parts go (transparent, so nothing moves) */
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(.scard-vd, .scard-bv, .scard-ft, .how-ft, .scard-decided) { border-color: transparent; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .scard-rows > :is(dt, dd) { border-color: transparent; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .scard-rows > dt { padding-block: 2px 0; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .scard-rows > dd { padding-block: 2px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(.poc-vd, .poc-rows > :is(dt, dd), .poc-ft, .pcr-row) { border-color: transparent; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .poc-rows > dt { padding-block: 3px 0; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .poc-rows > dd { padding-block: 3px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .poc-vd { padding-block: 8px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .pcr-row { padding-block: 3px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .scard-vd { padding-block: 8px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) :is(.scard-ft, .how-ft) { padding-block: 6px; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .scard :is(.wrow, .rv-row) { border-color: transparent; }
html.look-soft:not([data-theme="dark"]):is(:has(#wkpage), :has(#pproot)) .crd-r { border-color: transparent; padding-block: 3px; }
/* ───────── end of the softer look, step 1 ───────── */

/* ───────── Lost to follow-up (his approved mock-up 2026-10-23, src/ltfu.js, public/js/ltfu.js): one row per patient, a line of facts and dates per gap; the calm look: bold labels, no row lines,
   colour only where something is waiting or concerning ───────── */
.lf-page { display: grid; gap: var(--s3); max-width: 1180px; margin: 0 auto; padding: var(--s3) var(--s4); } /* no media query here: the tail of this sheet holds the one phone query (test/b473-cosmetic.test.js) */
.lf-page.lf-in { padding: 0; max-width: none; }
.lf-h1 { margin: 0; font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); }
.lf-lead { margin: 0; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lf-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-lift); }
.lf-card > header { background: var(--band); color: var(--on-band); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s4); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lf-card > header b { font-weight: var(--w-bold); font-size: var(--t-md); }
.lf-card > header .lf-h { color: var(--on-band-quiet); }
.lf-r { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.lf-grpsel { display: inline-flex; align-items: center; gap: var(--s2); color: var(--on-band); }
.lf-grpsel select { color: var(--ink); background: var(--surface); border-radius: var(--r-ctl); border: 1px solid var(--line-strong); padding: 0 var(--s2); font-size: var(--t-sm); }
.lf-export { color: var(--on-band); border: 1px solid var(--on-band-quiet); border-radius: var(--r-ctl); padding: 0 var(--s3); font-size: var(--t-sm); line-height: var(--lh-md); text-decoration: none; }
.lf-export:hover { background: var(--band-hover); text-decoration: none; }
.lf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4) 0; }
.lf-chip { background: var(--sunk); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 0 var(--s3); font-size: var(--t-sm); line-height: var(--lh-md); cursor: pointer; }
.lf-chip.on { background: var(--band); color: var(--on-band); border-color: var(--band); font-weight: var(--w-bold); }
.lf-scope { margin: 0 0 0 var(--s2); font-size: var(--t-sm); } .lf-q { margin-left: auto; flex: 1 1 160px; max-width: 220px; }
.lf-body { padding: var(--s2) var(--s4) var(--s4); display: grid; gap: var(--s4); }
.lf-grp { display: grid; gap: var(--s2); }
.lf-gh { margin: var(--s2) 0 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); color: var(--ink); }
.lf-n { margin-left: var(--s2); color: var(--quiet); font-weight: var(--w-reg); font-size: var(--t-sm); }
.lf-rows { display: grid; gap: var(--s4); }
.lf-pt { display: grid; gap: 2px; }
.lf-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.lf-name { background: none; border: 0; padding: 0; font: inherit; font-weight: var(--w-bold); color: var(--ink); cursor: pointer; text-align: left; }
.lf-name:hover { text-decoration: underline; }
.lf-meta { color: var(--quiet); font-size: var(--t-sm); }
.lf-tag { font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; padding: 0 var(--s2); border-radius: var(--r-ctl); background: var(--band-2); color: var(--quiet); }
.lf-tag.urgent { background: var(--urgent-bg); color: var(--urgent); }
.lf-gap { display: flex; align-items: baseline; gap: 6px; padding-left: 2px; }
.lf-gap b { font-weight: var(--w-bold); color: var(--ink); }
.lf-m { flex: none; width: 14px; text-align: center; font-weight: var(--w-bold); }
.lf-m.no { color: var(--urgent); } .lf-m.wait { color: var(--late); }
.lf-quiet .lf-t { color: var(--quiet); }
.lf-tried { padding-left: 20px; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.lf-acts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); padding-left: 20px; margin-top: 2px; font-size: var(--t-sm); }
.lf-acts .link { font-weight: var(--w-bold); }
.lf-acts .link[disabled] { color: var(--quiet); font-weight: var(--w-reg); cursor: not-allowed; }
.lf-older, .lf-hold { margin: 0; padding: 0 var(--s4) var(--s3); }
.lf-off { padding: var(--s5); }
.lf-form { display: grid; gap: var(--s3); } .lf-set { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s1); } .lf-set legend { padding: 0; font-weight: var(--w-bold); margin-bottom: var(--s1); }
.lf-one { margin: 0; }
.lf-bh { color: var(--quiet); font-size: var(--t-sm); } /* "from billing history": quiet grey, never a coloured alert */
.lf-ovb { margin-top: var(--s4); display: grid; gap: var(--s3); }
.lf-ovh { margin: 0; font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.lf-ovt { margin: 0; }
.lf-ovg { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); }
.lf-ovs { display: grid; gap: var(--s1); align-content: start; }
.lf-ovs h4 { margin: 0; font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.lf-ov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.lf-ov-list li b { font-weight: var(--w-bold); }


/* ───────── Optimization (his approved mock-up 2026-10-26, public/js/optimization.js): one patient's open opportunities as facts with dates, the same markup in the chart tab and the
   Patient tools tab. The calm look (.pvk: Inter, bold labels, tight spacing, no row lines); colour only where something expires. No media query here (the tail of this sheet holds the one phone query):
   the tiles and the buttons wrap. ───────── */
.opt { display: grid; align-content: start; min-width: 0; font-size: var(--t-md); line-height: 1.35; }
.opt-pane .opt { max-width: 760px; }
.opt-head { padding: var(--s2) var(--s3); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); border-bottom: 1px solid var(--line); }
.opt-tiles { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.opt-tile { background: var(--sunk); border-radius: var(--r-card); padding: var(--s1) var(--s2); display: grid; flex: 1 1 88px; min-width: 0; }
.opt-tile b { font-size: var(--t-md); font-weight: var(--w-bold); color: var(--ink); } .opt-tile span { font-size: var(--t-sm); color: var(--quiet); }
.opt-sec { border-bottom: 1px solid var(--line); }
.opt-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s3); }
.opt-sec > summary::-webkit-details-marker { display: none; }
.opt-sec > summary::before { content: "\25B8"; color: var(--quiet); } .opt-sec[open] > summary::before { content: "\25BE"; }
.opt-sec > summary b { font-weight: var(--w-bold); color: var(--ink); } .opt-sec > summary .opt-c { margin-left: auto; color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; }
.opt-items { display: grid; gap: var(--s2); padding: 0 var(--s3) var(--s2) var(--s5); min-width: 0; }
.opt-it { line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.opt-it .opt-w { font-weight: var(--w-bold); color: var(--ink); } .opt-it .opt-f { color: var(--ink); }
.opt-it .opt-why { color: var(--quiet); font-size: var(--t-sm); } .opt-it .opt-money { font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--ink); }
.opt-it .opt-soon { color: var(--late); font-weight: var(--w-bold); }
.opt-acts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-top: 2px; }
.opt-acts .opt-a { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; height: auto; font: inherit; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--accent); cursor: pointer; text-align: left; }
.opt-note, .opt-foot { padding: var(--s2) var(--s3); color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.opt-lock { color: var(--quiet); font-size: var(--t-sm); }
.opt-empty { color: var(--quiet); font-size: var(--t-sm); }
.opt-det { margin: 2px 0 0; padding-left: var(--s4); color: var(--quiet); font-size: var(--t-sm); line-height: 1.35; }
.opt-acts .opt-close { color: var(--quiet); margin-left: auto; }

/* ───────── The panel mirrors the chart (his vision 2026-10-26, public/js/chartviews.js): any chart tab drawn in the Patient tools panel is the chart's own markup. The panel body is a container, so
   what is narrow here is laid out by the panel's width, not the window's (the chart's media queries below never fire inside the panel). ───────── */
.sp-body { container: spb / inline-size; }
.cv-panel { min-width: 0; overflow-wrap: anywhere; }
.cv-panel .cv-full { margin-top: var(--s3); }
.cv-panel .rb-cells .rb-c { flex: 1 1 45%; max-width: none; border-bottom: 1px solid var(--line); }
.cv-panel .rb-cells .rb-reason { flex-basis: 100%; border-bottom: 0; display: block; }
.cv-panel button.link { height: auto; min-height: 0; white-space: normal; text-align: left; }
@container spb (max-width: 560px) { /* the chart's phone rules, for the panel's width */
  .cv-panel :is(.pvr-new li, .cs-rows li, .cs-kv) { grid-template-columns: minmax(0, 1fr); gap: 0; } .cv-panel .cs-kv dd { margin-bottom: var(--s2); }
  .cv-panel .pc-donet thead { display: none; } .cv-panel .pc-donet, .cv-panel .pc-donet tbody, .cv-panel .pc-donet tr, .cv-panel .pc-donet td { display: block; }
  .cv-panel .pc-donet tr { padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); } .cv-panel .pc-donet td { padding: 0; border: 0; }
  .cv-panel .pc-donet td + td { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
  .cv-panel :is(.ov3-card, .cs-card) > header .hint { display: none; }
}
.msg-top .msg-modes { flex: none; } .msg-top .msg-tpl { flex: 0 1 auto; min-width: 0; } /* the Text | Internal note switch keeps its words; the ready-made texts box gives way (the narrowest panel cut "Internal note") */
/* THE PROBLEM LIST (his design 2026-10-26; public/js/problems.js): one renderer for the chart tab and the right panel, so it lays out by the width of its own box (container queries), never the window's.
   Calm look: Inter, tight, a bold label then the text, one topic per line, no row lines. Red only for Delayed or Denied (his words), amber for Response not recorded. Tokens only. */
.pl-wrap { container-type: inline-size; font-family: "Inter", var(--font); min-width: 0; }
.pl { display: grid; gap: var(--s2); padding: var(--s2) var(--s3) var(--s4); min-width: 0; font-size: var(--t-md); line-height: 1.32; }
.pl button, .pl input, .pl select { font-family: inherit; }
.pl-top { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); justify-content: space-between; align-items: baseline; }
.pl-title { font-size: var(--t-md); font-weight: var(--w-bold); }
.pl-q { color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-reg); }
.pl-hint { margin: 0; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pl-tools { display: flex; gap: var(--s1); }
.pl-chip { display: inline-block; flex: none; padding: 0 var(--s2); border-radius: var(--r-round); font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); background: var(--sunk); color: var(--quiet); white-space: nowrap; }
.pl-s-workup { background: var(--selected); color: var(--accent); } .pl-s-improving { background: var(--done-bg); color: var(--done); } .pl-s-stable { background: var(--sunk); color: var(--ink); }
.pl-s-worse { background: var(--late-bg); color: var(--late); } .pl-s-resolved { background: var(--sunk); color: var(--quiet); } .pl-s-none { background: var(--sunk); color: var(--quiet); font-weight: var(--w-reg); }
.pl-ovw { display: grid; gap: 1px; }
.pl-ov { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 var(--s2); align-items: baseline; text-align: left; background: none; border: 0; box-shadow: none; padding: var(--s1) var(--s2); height: auto; min-height: 0; border-radius: var(--r-ctl); cursor: pointer; font: inherit; color: var(--ink); }
.pl-ov:hover { background: var(--sunk); }
.pl-ov.pl-nostatus { grid-template-columns: minmax(0, 1fr); } .pl-ov.pl-nostatus .pl-ovs { grid-column: 1; }
.pl-other summary { cursor: pointer; } .pl-other .pl-ln { padding-left: var(--s3); }
.pl-ovn { min-width: 0; overflow-wrap: anywhere; }
.pl-ovs { grid-column: 2; display: grid; gap: 0; min-width: 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); overflow-wrap: anywhere; }
.pl-ovs .pl-step, .pl-peek .pl-step { display: block; }
.pl-bad { color: var(--urgent); display: block; } .pl-i .pl-bad { display: inline; }
.pl-ov.pl-done, .pl-b.pl-done { opacity: .85; }
.pl-b { background: var(--surface); border-radius: var(--r-card); min-width: 0; }
.pl-h { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 0 var(--s2); align-items: baseline; width: 100%; text-align: left; background: var(--sunk); border: 0; box-shadow: none; border-radius: var(--r-card); padding: var(--s2) var(--s3); height: auto; min-height: 0; cursor: pointer; font: inherit; color: var(--ink); }
.pl-h:hover { background: var(--selected); }
.pl-hn { font-weight: var(--w-bold); overflow-wrap: anywhere; } .pl-hn::before { content: "▸ "; color: var(--quiet); font-weight: var(--w-reg); } .pl-b.open .pl-hn::before { content: "▾ "; }
.pl-h .pl-chip { grid-column: 2; grid-row: 1; }
.pl-hq { grid-column: 1 / -1; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); overflow-wrap: anywhere; }
.pl-peek { grid-column: 1 / -1; display: grid; gap: 0; font-size: var(--t-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.pl-b.open .pl-peek { display: none; } .pl-b:not(.open) .pl-bd { display: none; }
.pl-bd { display: grid; gap: var(--s1); padding: var(--s2) var(--s3) var(--s3); min-width: 0; }
.pl-r { min-width: 0; overflow-wrap: anywhere; } .pl-r > b { font-weight: var(--w-bold); color: var(--ink); }
.pl-i { padding-left: var(--s3); text-indent: calc(var(--s3) * -1); } .pl-i::before { content: "• "; color: var(--quiet); }
.pl-ln { padding-left: var(--s3); }
.pl-sub { padding-left: var(--s3); color: var(--quiet); font-size: var(--t-sm); }
.pl-src { font-size: var(--t-sm); }
.pl-amber { color: var(--late); background: var(--late-bg); border-radius: var(--r-ctl); padding: var(--s1) var(--s2); } .pl-amber > b { color: var(--late); }
.pl-course { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pl-course li { display: grid; grid-template-columns: 16px 68px minmax(0, 1fr); gap: 0 var(--s2); align-items: baseline; }
.pl-m { text-align: center; font-weight: var(--w-bold); } .pl-m-done { color: var(--done); } .pl-m-wait, .pl-m-next { color: var(--late); } .pl-m-next { color: var(--quiet); } .pl-m-denied { color: var(--urgent); }
.pl-d { color: var(--quiet); font-size: var(--t-sm); white-space: nowrap; } .pl-t { min-width: 0; overflow-wrap: anywhere; } .pl-n { color: var(--quiet); font-size: var(--t-sm); }
.pl-acts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; margin-top: var(--s1); }
.pl-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-left: auto; }
.pl-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; padding: var(--s2); background: var(--sunk); border-radius: var(--r-ctl); }
.pl-form[hidden] { display: none; } .pl-form label { display: grid; gap: 2px; font-size: var(--t-sm); color: var(--quiet); min-width: min(100%, 180px); flex: 1 1 180px; } .pl-form input, .pl-form select { min-width: 0; width: 100%; } .pl-fa { display: flex; gap: var(--s1); }
.pl-loose, .pl-chg { font-size: var(--t-sm); color: var(--quiet); } .pl-loose summary, .pl-chg summary { cursor: pointer; } .pl-undone { text-decoration: line-through; }
.pl-como { padding: var(--s1) var(--s2); }
.pl-orph { color: var(--late); background: var(--late-bg); border-radius: var(--r-ctl); padding: var(--s1) var(--s2); font-size: var(--t-sm); }
.pl-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s1); }
@container (max-width: 520px) { .pl-ov { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .pl-ovs { grid-column: 1; } .pl-ov .pl-chip { justify-self: start; } }
@container (max-width: 420px) { .pl { padding-inline: var(--s2); } .pl-course li { grid-template-columns: 16px minmax(0, 1fr); } .pl-course .pl-d { grid-column: 2; } .pl-course .pl-t { grid-column: 2; } .pl-h { padding-inline: var(--s2); } .pl-links { margin-left: 0; } }
/* Missing details (idea 5 of the 2026-10-26 review): what the hub suggests for an order's blanks, each with its source and a Confirm; no box, no colour of its own */
.fill-box { margin-top: var(--s1); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fill-h { color: var(--quiet); }
.fill-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); padding: var(--s1) 0; }
.fill-row > span { min-width: 0; flex: 1 1 14rem; }
/* A chart with no referral (B-348, his words 2026-10-13): the Referral tab says so and offers Add referral; no box, the same quiet look as an empty list */
.pp-noref { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s6) var(--s3); text-align: center; color: var(--muted); }
.pp-noref b { color: var(--ink); font-size: var(--t-md); }
.ws-closed { margin: 0 0 var(--s2); }
/* Admin → Jobs (2026-10-28): who holds each job per care team; warnings above; a job's rows stay together; no box around the warnings */
.jb-warn ul { margin: 0; padding-left: var(--s4); color: var(--late); font-size: var(--t-sm); line-height: var(--lh-sm); }
.jb-warn li { padding: 2px 0; }
.jb-warn li a { margin-left: var(--s1); }
table.jb-table { table-layout: auto; }
table.jb-table :is(th.jb-job, td.jb-team, td.jb-who) { white-space: normal; }
table.jb-table th.jb-job { font-weight: var(--w-bold); vertical-align: top; text-align: left; width: 26%; }
table.jb-table td.jb-open { text-align: right; width: 4.5rem; font-variant-numeric: tabular-nums; }
table.jb-table td.jb-act { text-align: right; white-space: nowrap; width: 1%; }
table.jb-table td.jb-who select { max-width: 100%; }
table.jb-table tbody + tbody > tr:first-child > * { border-top: 1px solid var(--line); }

/* ---------- Summary tab, Snapshot layout (public/js/summary.js smySnap*; his design 2026-11-07): the Now box with its buttons bottom right, the folded rest of a table, the opioid line under Medicines ---------- */
@layer moved {
  .smy-snap .smy-read { padding: 6px var(--s4) 0; }
  .smy-snap .snr { margin-top: var(--s3); }
  .smy-snap .smy-rest th { padding: 0; height: 0; font-size: 0; line-height: 0; }
  .smy-snap ul.smy-ul { margin: 0; padding-left: 16px; list-style: disc; } .smy-snap ul.smy-ul > li::marker { color: var(--quiet); } /* the Plan's bullets (his ask 2026-11-09) */
  .smy-snap .smy-tail { margin: var(--s1) 0 0; color: var(--quiet); }
}
@layer moved {
  .smy-snap .snr-t td { overflow-wrap: anywhere; }
  .smy-snap .snr-t td .link { white-space: normal; overflow-wrap: anywhere; }
  .smy-snap [data-snr="meds"] .snr-t td:first-child { white-space: normal; }
}
/* the Summary tab tighter (his ask 2026-11-09: "spacing needs to be tighter on the summary"): 18px lines (--lh-sm) on the row text, the paragraphs and the table cells, topic rows 3px top and bottom, table cells 1px,
   the Now box 2px apart, Collapse all on the Autumn read line instead of a line of its own. Scoped to the Summary card, so the other chart tabs and the classic layout keep their spacing; no colour, font or width changes. */
.smy-snap .snr-row { padding-block: 3px; }
.smy-snap .snr-l { line-height: var(--lh-sm); padding-top: 1px; }
.smy-snap .snr-c, .smy-snap .snr-c p, .smy-snap .snr-t, .smy-snap .snr-t td, .smy-snap .snr-t th { line-height: var(--lh-sm); }
.smy-snap .snr-c p { margin: 0 0 2px; }
.smy-snap .snr-t th { padding-block: 0 1px; }
.smy-snap .snr-t td { padding-block: 1px; }
.smy-snap .smy-read { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.smy-snap .smy-read .smy-all { flex: none; min-height: 0; margin-left: auto; }
/* ---------- the Snapshot layout on the chart's Overview, Open items, Referral and Documents (public/js/chartviews.js; his design 2026-11-07) ---------- */
.snrc { padding-bottom: var(--s2); background: var(--surface); }
.snrc .snr-t th { background: none; }
.snrc-quiet { padding: var(--s2) var(--s4) 0; color: var(--quiet); font-size: var(--t-sm); }
.snrc-oiq { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.snrc-now, .snrc-nowwrap > .snrc-now { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-radius: var(--r-card); background: var(--selected); }
.snrc-now.late { background: var(--late-bg); }
.snrc-nl { font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.snrc-now.late .snrc-nl { color: var(--late); }
.snrc-nh { font-weight: var(--w-bold); }
.snrc-nb { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
.snrc-nb .ws-actions { margin: 0; padding: 0; border: 0; background: none; justify-content: flex-end; }
.snrc-lk { font-size: inherit; font-weight: var(--w-reg); text-align: left; padding: 0; min-height: 0; white-space: normal; overflow-wrap: anywhere; display: inline; }
.snrc .snr { margin-top: var(--s2); }
.snrc-foot { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-top: 1px solid var(--line); }
.snrc-more { padding: 0 var(--s4); }
.snr-t .pp-cmpchk { margin-right: var(--s1); }
.rb.rb-snap .rb-line, .rb.rb-snap .rb-cells, .rb.rb-snap .rb-tog { display: none; }
/* ---------- Orders in the Snapshot layout (chart Orders tab; public/js/orders.js snoBox; mock-ups or7c / or7d). Token colours only. ---------- */
.sno-q { color: var(--quiet); font-size: var(--t-sm); }
.sno-top { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4) var(--s1); }
.sno-top > .sno-q { flex: 1 1 auto; min-width: 0; } .sno-top > .ao-sw { margin-left: auto; }
.sno-now { display: flex; justify-content: space-between; background: var(--selected); border: 1px solid var(--accent-line); border-radius: var(--r-ctl); }
.sno-nt { min-width: 0; flex: 1 1 320px; } .sno-nt b { display: block; font-size: var(--t-sm); } .sno-nl { display: block; padding: 0; }
.sno-nb { display: inline-flex; gap: var(--s2); margin-left: auto; }
.sno-body { margin: 0; }
.snr-lk { font-weight: var(--w-reg); white-space: normal; text-align: left; display: inline; }
.sno-t4 th:nth-child(2) { width: 34%; } .sno-t4 th:nth-child(3) { width: 30%; }
.sno-t th { background: none; border: 0; } .sno-t td { border-bottom: 0; overflow-wrap: anywhere; }
.sno-t td .snr-lk { padding: 0; min-height: 0; text-align: left; }
.snr-inr > td { padding: 0; border-top: 0; } .snr-inr .ob-in:not([hidden]) { margin: var(--s1) 0 var(--s2); }
.sno-t tr[data-aoline] { cursor: pointer; } .sno-t tr[data-aoline]:hover > td { background: var(--sunk); } .sno-t tr.on > td { background: var(--selected); }
.sno-cat { display: flex; justify-content: space-between; gap: var(--s2); padding: 3px var(--s4); background: var(--hmx-band); color: var(--hmx-band-ink); font-size: var(--t-sm); font-weight: var(--w-bold); border-top: 1px solid var(--line); }
.sno-cat .sno-q { font-weight: var(--w-reg); }
.sno-l { display: grid; grid-template-columns: minmax(0, 1fr) 330px 80px; gap: var(--s3); align-items: baseline; padding: 4px var(--s4); border-top: 1px solid var(--line); font-size: var(--t-sm); cursor: pointer; }
.sno-l:hover { background: var(--sunk); } .sno-l.on { background: var(--selected); }
.sno-l .snr-lk { padding: 0; min-height: 0; text-align: left; } .sno-s { color: var(--quiet); } .sno-d { color: var(--quiet); text-align: right; white-space: nowrap; }
.sno-od { color: var(--late); font-weight: var(--w-bold); }
.sno-body > .ob-in:not([hidden]) { padding: 0 var(--s4) var(--s2); }
.sno-ft { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); }
.sno-more { padding: 0 var(--s4) var(--s2); justify-content: flex-end; }
@container scard (max-width: 640px) {
  .sno-l { grid-template-columns: minmax(0, 1fr); gap: 2px; } .sno-d { text-align: left; }
  .sno-top { flex-wrap: wrap; }
}

/* ---------- Task + Inbox in the Snapshot layout (preview "Snapshot layout"; his design 2026-11-07): the opened task and the fax Inbox ---------- */
@layer moved {
  .tk-snapcard > header { gap: var(--s3); }
  .tk-snapcard > header > b, .ho-snapcard > header > b { flex: 0 1 auto; }
  .snr-c .snr-t .link { white-space: normal; text-align: left; font-weight: 400; }
  .snr-c .snr-t td { overflow-wrap: anywhere; }
  .ho-snapsum { display: none; }
  .tk-snapcard .tk-kind { font-weight: var(--w-reg, 400); font-size: var(--t-sm); opacity: .85; }
  .tk-snapcard .spacer { flex: 1; }
  .tk-q { padding: var(--s2) var(--s4); color: var(--quiet); font-size: var(--t-sm); }
  .tk-now { display: flex; flex-wrap: wrap; background: var(--surface-2, var(--band-2)); border-radius: var(--r-card); }
  .tk-now.late { background: var(--late-bg); }
  .tk-nowk { display: block; font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: .06em; color: var(--quiet); }
  .tk-now.late .tk-nowk { color: var(--late); }
  .tk-nowt { display: block; font-size: var(--t-md, var(--t-sm)); font-weight: var(--w-bold); }
  .tk-nowtxt p { margin: 2px 0 0; font-size: var(--t-sm); }
  .tk-nowf { display: flex; gap: var(--s2); justify-content: flex-end; align-items: center; margin-left: auto; }
  .tk-now .tk-donebox { flex: 1 1 100%; }
  .tk-snapcard .snr-c textarea { width: 100%; margin-top: var(--s1); }
  .tk-snapcard .snr-c .tk-link { display: flex; justify-content: space-between; gap: var(--s2); }
  .tk-snapmore > summary, .ho-snapmore > summary { padding: var(--s2) var(--s4); cursor: pointer; font-weight: var(--w-bold); font-size: var(--t-sm); border-top: 1px solid var(--line); }
  .tk-snapmore .tk-moreslot, .ho-snapmore > * { padding-left: var(--s4); padding-right: var(--s4); }
  .ho-snapcard > header { gap: var(--s3); }
  .ho-snapcard > header .spacer { flex: 1; }
  .ho-snapsay { font-weight: var(--w-reg, 400); font-size: var(--t-sm); opacity: .9; }
  .ho-snapcard > .toolbar, .ho-snapcard > #horows, .ho-snapcard > #hoothers, .ho-snapcard > #homsg { margin-left: var(--s4); margin-right: var(--s4); }
  .ho-snapt { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--t-sm); }
  .ho-snapt td { padding: var(--s3) var(--s3) var(--s3) 0; vertical-align: top; border-top: 1px solid var(--line); }
  .ho-snapt .ho-c-file { width: 22%; } .ho-snapt .ho-c-at { width: 150px; } .ho-snapt .ho-c-act { width: 150px; }
  .ho-snapt .ho-f b { font-weight: 600; } .ho-snapt .sub { display: block; color: var(--quiet); }
  .ho-snapt .ho-at { color: var(--quiet); }
  .ho-snapt td.more { text-align: right; padding-right: 0; }
}

@layer moved {
  .smy-snap [data-snr="upcoming"] .snr-c-date { width: 156px; } .smy-snap [data-snr="upcoming"] .snr-c-sm { width: 260px; } .smy-snap [data-snr="upcoming"] .snr-c-by { width: 120px; }
}

/* ---------- Why a result is here (his decision 2026-11-09: "What is critical? When a critical is read I need to know why"). Two boxes right under the name on a result's card:
   the red "Critical reason" (a real Critical, always) and the amber "Why it's here" (a referral screen's finding that is not an emergency). Tokens only, so dark mode follows. ---------- */
.rz-box { display: flex; flex-direction: column; gap: 2px; margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: var(--r-ctl); border-left: 4px solid var(--late-dot); background: var(--late-bg); color: var(--ink); font-size: var(--t-sm); line-height: 1.4; overflow-wrap: anywhere; }
.rz-box.red { border-left-color: var(--urgent); background: var(--urgent-bg); }
.rz-box .rz-boxl { font-size: var(--t-sm); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--late); }
.rz-box.red .rz-boxl { color: var(--urgent); }
.rz-bec { font-weight: var(--w-reg); }
/* ---------- Every Now box on one compact line (his ask 2026-11-09: "Now takes up too much space", on every screen). Layout only; the blue and the amber stay.
   Label, bold title and detail run inline in one block (they wrap to a second line rather than lose words: none of these has a title attribute), buttons at the right.
   Unlayered, so it wins over the older layered Now rules (smy-now, tk-now). Phone: label + title on the first line, the detail under it. ---------- */
.snrc-now, .snrc-nowwrap > .snrc-now { align-items: center; gap: var(--s3); margin: var(--s1) var(--s4); padding: var(--s1) var(--s3); line-height: 1.35; }
.snrc-now .snrc-nt > div, .snrc-now .snrc-nt > .snrc-nl { display: inline; }
.snrc-now .snrc-nl { margin-right: var(--s2); }
.snrc-now .snrc-nt > div:not(.snrc-nl):not(.snrc-nh) { color: var(--quiet); }
.snrc-now .snrc-nt > div:not(.snrc-nl):not(.snrc-nh)::before { content: "\00b7\00a0"; margin-left: var(--s2); }
.snrc-now .snrc-nb { flex-wrap: nowrap; align-items: center; }
@media (min-width: 641px) and (pointer: fine) {
  .snrc-now .snrc-nb :is(button, a.btnlink, .menu > summary), .sno-now .sno-nb :is(button, a.btnlink, .menu > summary), .tk-now .tk-nowf :is(button, a.btnlink, .menu > summary) { height: var(--h-ctl-sm); min-height: 0; padding-block: 0; line-height: 1; }
  .snrc-now .snrc-nb .menu > summary, .sno-now .sno-nb .menu > summary, .tk-now .tk-nowf .menu > summary { display: inline-flex; align-items: center; box-sizing: border-box; } /* a More beside these buttons is their height and centred on them (it was 36 beside 24) */
}
:is(.an-list, .rz-list, #ordwrap, #rzwrap) .snrc-now .snrc-nt { max-height: calc(2 * 1.35em); overflow: hidden; line-clamp: 2; }
@media (min-width: 641px) { /* the Now box beside an open item (his report 2026-11-20: the Open button sat on the title's second line): the title is its own column and wraps inside it (a long word too); the button keeps its own column at the right, never under the text. Phones keep their own rules below. */
  .snrc-now > .snrc-nt { min-width: 0; overflow-wrap: anywhere; }
  .snrc-now > .snrc-nb { flex: none; align-self: center; justify-self: end; white-space: nowrap; }
}
.sno-now { align-items: center; flex-wrap: nowrap; gap: var(--s3); margin: var(--s1) var(--s4); padding: var(--s1) var(--s3); line-height: 1.35; }
.sno-now .sno-nt { flex: 1 1 0; }
.sno-now .sno-nt b, .sno-now .sno-nt .sno-q, .sno-now .sno-nt .sno-nl { display: inline; }
.sno-now .sno-nl { margin-right: var(--s2); }
.sno-now .sno-nt .sno-q::before { content: "\00b7\00a0"; margin-left: var(--s2); }
.sno-now .sno-nb { flex: none; white-space: nowrap; }
.tk-now { align-items: center; gap: var(--s3); margin: 0 var(--s4) var(--s2); padding: var(--s1) var(--s3); line-height: 1.35; }
.tk-now .tk-nowtxt { flex: 1 1 24em; min-width: 0; }
.tk-now .tk-nowtxt > * { display: inline; margin: 0; }
.tk-now .tk-nowk { margin-right: var(--s2); }
.tk-now .tk-nowtxt > p, .tk-now .tk-nowtxt > div { color: var(--quiet); }
.tk-now .tk-nowtxt > p::before, .tk-now .tk-nowtxt > div::before { content: "\00b7\00a0"; margin-left: var(--s2); }
.tk-now .tk-nowtxt p { display: inline; margin: 0; }
.tk-now .tk-nowf { flex-wrap: nowrap; }
@media (max-width: 640px) {
  .snrc-now, .snrc-nowwrap > .snrc-now, .tk-now { padding: var(--s1) var(--s3); }
  /* the whole sentence wraps (never cut mid-word, "emergency found" included); the button sits under it at the bottom right */
  .snrc-now, .snrc-nowwrap > .snrc-now, .sno-now { display: flex; flex-wrap: wrap; align-items: center; }
  .snrc-now .snrc-nt, .sno-now .sno-nt, .tk-now .tk-nowtxt, :is(.an-list, .rz-list, #ordwrap, #rzwrap) .snrc-now .snrc-nt { flex: 1 1 100%; min-width: 0; max-height: none; overflow: visible; line-clamp: none; overflow-wrap: anywhere; }
  .snrc-now .snrc-nb, .sno-now .sno-nb, .tk-now .tk-nowf { flex: 1 1 100%; flex-wrap: nowrap; align-items: center; justify-content: flex-end; }
  /* My Worklist's Now box on a phone (his pick 11/20/26, "taking up way too much space"): ONE line, cut at the end, Open on the same line at the right; the same item is the first row below, in full */
  .wk-now1 > .snrc-now { flex-wrap: nowrap; }
  .wk-now1 > .snrc-now .snrc-nt { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .wk-now1 > .snrc-now .snrc-nb { flex: 0 0 auto; }
}
/* the Summary's Open items, Upcoming visits and Procedures: one line a row, an ellipsis at the end of a long cell (the full words are its hover title); phones keep their own layout */
@media (min-width: 641px) {
  .smy-snap :is([data-snr="openitems"], [data-snr="upcoming"], [data-snr="procs"]) .snr-t :is(td, th) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .smy-snap :is([data-snr="openitems"], [data-snr="upcoming"], [data-snr="procs"]) .snr-t td :is(a, button.link, .link) { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Fax review: the finishing actions are ONE row at the bottom right of the Next step, Place on a patient rightmost (his approval 2026-11-09) */
.fx-next > .ho-acts { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: var(--s2); margin: 0; }
.fx-next > .ho-acts select { max-width: 150px; min-width: 0; }
/* The phone's fax review (handoff.js hoPhoneOpen): one screen over the list; the actions in one bar at the bottom right above the phone's edge, every control 44 px */
.fxph { position: fixed; inset: 0; z-index: 7; display: flex; flex-direction: column; background-color: var(--bg); color: var(--ink); }
.fxph-top { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); background-color: var(--surface); border-bottom: 1px solid var(--line); }
.fxph-top > b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-md); }
.fxph-top button { min-height: 44px; min-width: 44px; }
.fxph-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--s3) var(--s3) var(--s5); }
.fxph-body .ho-file { padding: 0; min-height: 0; }
.fxph-body .ho-fh { display: none; }
.fxph-found { margin: 0; }
.fxph-fb { padding: var(--s2) var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.fxph-sum { margin: 0 0 var(--s1); font-weight: var(--w-bold); }
.fxph-body .ho-view, .fxph-body .pdfv-host { height: 70vh; min-height: 360px; }
.fxph-foot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom, 0px)); background-color: var(--surface); border-top: 1px solid var(--line); }
.fxph-foot .ho-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); margin: 0; width: 100%; }
.fxph-foot :is(button, a.btnlink, select) { min-height: 44px; }
.fxph-foot select { flex: 1 1 140px; max-width: 100%; font-size: 16px; }
.fxph-on { overflow: hidden; }
/* the phone's referral lists: "+ New referral" sits in the header line (not floating over the rows), and the list ends clear of the bottom bar */
.ls-head .ls-new { margin-left: auto; min-height: 44px; padding: 0 var(--s4); align-items: center; justify-content: center; font-weight: var(--w-bold); }
@media (max-width: 640px) {
  .ls-head .ls-new { display: inline-flex; }
  main:has(.ls-head) { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
.fxph-foot .askbar { flex: 1 1 100%; }
/* ---------- end of the compact Now block: rules below are other screens' own ---------- */

/* THE CHART HEADER IN THE SNAPSHOT LAYOUT (his approval 2026-11-10, G step 1; mock-up 3): the patient's identity on ONE line (name, age, sex, DOB, phone, team, insurance, MRN, next visit, Procedures), the flags and the
   allergies on the second. The "Updated by Autumn" line moved onto the Summary band, and the Autumn read line under it no longer says "Update queued". Stylesheet only: every control stays. On a phone the
   "Phone chart header" (.pp-phh) keeps its own order; the room it saves comes from the band and the read line. */
@media (min-width: 641px) {
  .pp-ch1:not(.pp-phh) .pp-head .pp-id { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; }
  .pp-ch1:not(.pp-phh) .pp-head .pp-id > h1 { flex: 0 1 auto; min-width: 0; }
  .pp-ch1:not(.pp-phh) .pp-head .pp-id > .pp-sub { flex: 0 1 auto; min-width: 0; margin-top: 0; }
  .pp-ch1:not(.pp-phh) .pp-head .pp-id > .pp-sub::before { content: "\00B7"; margin: 0 var(--s3); color: var(--muted); }
  .pp-ch1:not(.pp-phh) .pp-head .pp-id > :is(.pp-alerts, .asn-chiprow) { flex: 1 1 100%; }
}
.smy-snap > header .pp-anwhen { margin-left: var(--s3); font-weight: var(--w-reg); color: var(--on-band); opacity: .85; }
.smy-snap > header .pp-anwhen + .smy-all { margin-left: var(--s3); }
.smy-snap > header .smy-all { flex: none; min-height: 0; }
.smy-snap > header #ppsmbar { display: flex; flex: none; margin: 0 0 0 var(--s3); }
.smy-snap > header #ppsmbar:empty { display: none; }
.smy-snap > header #ppsmbar .evstat { margin: 0; padding: 0; }
.smy-snap > header #ppsmbar summary { color: var(--on-band); font-weight: var(--w-bold); font-size: var(--t-sm); }
.smy-snap > header #ppsmbar summary { min-height: 28px; height: 28px; padding: 0 var(--s2); border: 0; background: none; box-shadow: none; }
@media (max-width: 640px) { /* the band: title, Collapse all and More on the first line; Updated by Autumn and the visit line under it */
  .smy-snap > header > .hint { order: 5; flex: 1 1 100%; margin-left: 0; }
  .smy-snap > header > .pp-anwhen { order: 4; flex: 1 1 100%; margin-left: 0; white-space: normal; }
  .smy-snap > header > .smy-all { order: 2; margin-left: auto; }
  .smy-snap > header > #ppsmbar { margin-left: var(--s2); }
}
@media (max-width: 640px) { .smy-snap > header > #ppsmbar { order: 2; } }
/* The chart's paired menu entries (Orders with Results, Procedure orders with Procedures, Referral with Screen; his approval 2026-11-10): the strip at the top of the section that switches between the two parts */
.pp-pairbar { margin: 0 0 8px; }
.pp-pairbar[hidden] { display: none; }
/* The Open items tab's top line (what the chart's Overview held): the chip, its reason, the one main button at the right */
.oi-next { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.oi-next > b { flex: 1 1 14em; min-width: 0; }
.wk-sec[data-sec="unassigned"] tr.row:not(.wk-hot) { opacity: .86; }
.wk-sec[data-sec="unassigned"] .wk-sech { color: var(--quiet); }
.wk-unas a { font-weight: var(--w-bold); }
/* finish one item and continue (his approval 2026-11-10): the receipt line on top of an item's state block, the finished line kept on the list, the row last worked */
.fx-receipt { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 0 0 var(--s2); padding: var(--s1) var(--s3); border-radius: var(--r-ctl); background: var(--done-bg); color: var(--done); }
.fx-receipt .ms { flex: none; font-size: 20px; }
.fx-rc-t { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; font-size: var(--t-md); line-height: var(--lh-md); }
.fx-rc-t b { font-weight: var(--w-bold); }
.fx-rc-why { flex: 1 1 100%; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fx-rc-b { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); margin-left: auto; }
.fx-receipt.fx-rc-warn { background: var(--late-bg); color: var(--late); }
.fx-pcrc { margin: 0 0 var(--s2); }
.pcl.kept .pcl-what, .wk-kept { color: var(--done); }
.pcl.kept .pcl-t { font-weight: var(--w-reg); }
.pcl-ok, .wk-ok { font-weight: var(--w-bold); }
.wk-here { box-shadow: inset 3px 0 0 var(--band); background-color: var(--selected); }
@media (max-width: 640px) {
  .fx-rc-b :is(button) { min-height: 44px; }
}
.fx-rc-l1, .fx-rc-l2 { display: block; }
.fx-rc-l2 { font-size: var(--t-sm); line-height: var(--lh-sm); }
/* Finished → next (2026-11-17): the one line at the top of the item that opened by itself, and "That was the last one" at the top of the list: the same green done line as the receipt, Undo at the right */
.fin-adv { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: var(--s2) 0; padding: var(--s1) var(--s3); border-radius: var(--r-ctl); background: var(--done-bg); color: var(--done); }
.drawer > .fin-adv { margin: var(--s2) var(--s3) 0; }
.fin-adv .ms { flex: none; font-size: 20px; }
.fin-adv-t { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-size: var(--t-md); line-height: var(--lh-md); }
.fin-adv-t b { font-weight: var(--w-bold); }
.fin-adv-t .hint, .fin-adv-why { display: block; color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.fin-adv-b { display: flex; justify-content: flex-end; align-items: center; gap: var(--s2); margin-left: auto; }
@media (max-width: 640px) { .fin-adv-b button { min-height: 44px; } }
/* Hotfix 2026-11-10: a finger needs 32 px */
@media (pointer: coarse), (max-width: 640px) { button.snrc-lk { display: inline-flex; align-items: center; min-height: 32px; } } /* a finger needs 32 px to hit it; on a computer the link stays one line of text */
@media (pointer: coarse), (max-width: 640px) { :is(.at-top, .at-fold, .at-l, .at-r, .at-a, .at-in) :is(button, select, summary) { min-height: 32px; } } /* Automated texts: every control a finger can hit */
/* Hotfix 2026-11-10: the Summary in a narrow column (Clinic prep's pane, a chart beside the Right panel): the band and the Now row wrap, nothing is crushed to a letter wide */
.smy-snap > header { flex-wrap: wrap; row-gap: 2px; height: auto; min-height: var(--h-band); }
.smy-snap > header > b { flex: none; }
.smy-snap > header > :is(.hint, .pp-anwhen) { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
/* Narrow Summary (a small window, the Chrome side panel, the chart beside a list; 2026-11-13): the band grows and wraps by its own width. The title and its controls stay on the first line; the visit and "Updated by Autumn" each read in full on the lines under it. The 1366 and 1920 look is untouched (one line). */
@container scard (max-width: 960px) {
  .smy-snap > header > :is(.smy-all, #ppsmbar) { order: 2; }
  .smy-snap > header > .smy-all { margin-left: auto; }
  .smy-snap > header > .hint { order: 4; flex: 1 1 auto; margin-left: 0; text-align: left; }
  .smy-snap > header > .pp-anwhen { order: 5; flex: 1 1 auto; margin-left: 0; }
}
@container scard (max-width: 599px) { .smy-snap > header > :is(.hint, .pp-anwhen) { flex-basis: 100%; } }
/* The Summary's tables need about 540 px beside the 150 px label: below 740 px (the chart beside the left menu or the Right panel) the label sits above its table; below 570 px the rows are short lines, as on a phone. Before, the tables ran past the card's edge and were cut (checked 2026-11-13 at 1000 px). */
@container (max-width: 740px) { .smy-snap .snr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
@container (max-width: 570px) {
  .smy-snap .snr-t, .smy-snap .snr-t tbody, .smy-snap .snr-t tr { display: block; width: 100%; }
  .smy-snap .snr-t thead { display: none; }
  .smy-snap .snr-t tr { padding: 4px 0; border-top: 1px solid var(--line); }
  .smy-snap .snr-t td { display: inline; padding: 0; border: 0; white-space: normal; }
  .smy-snap .snr-t td:nth-child(2)::before { content: " · "; color: var(--quiet); }
  .smy-snap .snr-t td:nth-child(n+3) { display: block; color: var(--quiet); }
  .smy-snap .snr-t td:empty { display: none; }
}
/* a case's name in the Procedures cards wraps instead of ending in "..." (the band grows) */
.pc-head > .pc-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* ---------- The procedure note writer (his approval 2026-11-12, docs/procnote-spec.md "Look"): the note in the hub's normal font, tight input rows, Copy the note the main button. Colours are the hub's tokens, so Dark follows. ---------- */
.pn { max-width: 1280px; margin: 0 auto; padding: var(--s3) var(--s4) var(--s5); }
.pn-top { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s2) 0; flex-wrap: wrap; }
.pn-who { font-size: var(--t-md); }
.pn-sub, .pn-q, .pn-cd, .pn-help, .pn-saved, .pn-ordq { color: var(--quiet); font-size: var(--t-sm); line-height: var(--lh-sm); }
.pn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: stretch; }
.pn-grid.pn-readonly { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.pn-left, .pn-right { display: grid; gap: var(--s3); min-width: 0; align-content: start; grid-auto-rows: max-content; }
.pn-card.pn-shut > :not(header) { display: none; }
.pn-fold { cursor: pointer; user-select: none; }
.pn-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pn-chev { width: 14px; color: var(--quiet); font-size: var(--t-sm); text-align: center; }
.pn-cnt { margin-left: auto; min-width: 0; max-width: 55%; padding-left: var(--s2); font-size: var(--t-sm); font-weight: var(--w-reg); color: var(--ink); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.pn-band { display: flex; align-items: center; gap: var(--s2); min-height: var(--h-band); padding: 0 var(--s3); background: var(--band-2); color: var(--ink); font-size: var(--t-md); font-weight: var(--w-bold); }
.pn-band .pn-q { font-weight: var(--w-reg); }
.pn-body { padding: var(--s2) var(--s3); }
.pn-note { padding: var(--s2) var(--s3); font-family: var(--font); font-size: var(--t-md); line-height: 1.4; color: var(--ink); overflow: auto; user-select: text; }
.pn-note p { margin: 0 0 var(--s2); white-space: pre-line; overflow-wrap: anywhere; }
.pn-blank { background: var(--late-bg); color: var(--late); border-radius: 2px; padding: 0 2px; }
.pn-actions { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.pn-actions .pn-why { margin-right: auto; font-size: var(--t-sm); color: var(--late); text-align: left; }
.pn-copy { font-weight: var(--w-bold); }
.pn-formbody { padding-bottom: var(--s1); }
.pn-fixedbox { padding: var(--s1) var(--s3); }
.pn-fixed summary { cursor: pointer; color: var(--quiet); font-size: var(--t-sm); }
.pn-fixed ul { margin: var(--s1) 0 0; padding-left: var(--s4); font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--quiet); }
.pn-sec[hidden], .pn-row[hidden], .pn-writes[hidden] { display: none; }
.pn-sech { display: flex; align-items: center; min-height: var(--h-band-2); padding: 0 var(--s3); background: var(--sunk); border-top: 1px solid var(--line); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.pn-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s2); padding: 4px var(--s3); border-bottom: 1px solid var(--line); align-items: start; }
.pn-row:last-child { border-bottom: 0; }
.pn-lab { font-size: var(--t-sm); line-height: 26px; color: var(--ink); }
.pn-need .pn-lab { box-shadow: inset 3px 0 0 var(--late-dot); padding-left: var(--s2); margin-left: calc(-1 * var(--s2)); }
.pn-ans { min-width: 0; }
.pn-ch { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: top; }
.pn-opt { min-height: 26px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); line-height: 16px; text-align: left; cursor: pointer; box-sizing: border-box; }
.pn-opt:hover { border-color: var(--accent); }
.pn-opt.on { background: var(--selected); border-color: var(--accent-line); color: var(--band); font-weight: var(--w-bold); }
.pn-in { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
input.pn-text { height: 26px; min-height: 0; width: min(100%, 340px); padding: 0 8px; font-size: var(--t-sm); box-sizing: border-box; }
input.pn-num { width: 110px; }
.pn-unit { color: var(--quiet); font-size: var(--t-sm); }
.pn-comp { display: inline-block; line-height: 26px; font-size: var(--t-sm); color: var(--ink); }
.pn-from { display: inline-block; margin-left: var(--s2); color: var(--quiet); font-size: var(--t-xs); line-height: 26px; }
.pn-writes { margin: 0; color: var(--quiet); font-size: var(--t-xs); line-height: var(--lh-xs); overflow-wrap: anywhere; }
.pn-help { margin: 0; }
.pn-bad { margin: 0; color: var(--late); font-size: var(--t-xs); line-height: var(--lh-xs); }
.pn-bad[hidden] { display: none; }
.pn-for { padding: var(--s2) var(--s3); font-size: var(--t-sm); color: var(--ink); border-bottom: 1px solid var(--line); }
.pn-in + .pn-help, .pn-comp + .pn-help { display: inline; margin-left: var(--s2); }
.pn-none { padding: 4px var(--s3); color: var(--quiet); font-size: var(--t-sm); }
.pn-body .pn-none { padding-left: 0; }
.pn-chk { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; padding: 3px 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.pn-cm { font-weight: var(--w-bold); text-align: center; }
.pn-chk.ok .pn-cm { color: var(--done); }
.pn-chk.warn .pn-cm, .pn-chk.stop .pn-cm { color: var(--late); }
.pn-chk.pend .pn-cm { color: var(--quiet); }
.pn-chk .pn-cd { display: block; }
.pn-cod { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
.pn-cod td { padding: 3px 6px 3px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.pn-cod tr:last-child td { border-bottom: 0; }
.pn-u { white-space: nowrap; color: var(--quiet); }
.pn-pick { max-width: 760px; }
.pn-pickrow { display: flex; align-items: flex-start; gap: var(--s2); padding: 6px var(--s3); border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--t-md); }
.pn-pickrow.on { background: var(--selected); }
.pn-pickrow input { margin-top: 4px; }
.pn-pickrow .pn-cd { display: block; }
.pn-pickrow.pn-subrow { padding-left: calc(var(--s3) + 28px); }
.pn-ord { display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); padding: var(--s2) var(--s3); }
.pn-ord[hidden] { display: none; }
.vn-opx { margin: var(--s1) 0; }
.vn-opx[hidden] { display: none; }
.pn-op { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s1) var(--s3); background: var(--band-2); border-radius: var(--r-ctl); }
.pn-op .pn-for { flex: 1 1 auto; min-width: 0; padding: 0; border-bottom: 0; }
.pn-op .pn-op-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; min-width: 0; margin-left: auto; padding: 0; border-top: 0; }
.ord-pnote { cursor: pointer; }
.ord-pnote.pn-replaced .vn-nm b { font-weight: var(--w-reg); color: var(--quiet); }
.pn-trail { padding: var(--s1) 0 var(--s2); font-size: var(--t-sm); color: var(--ink); }
.pn-hint { color: var(--quiet); font-size: var(--t-sm); margin-right: var(--s2); }
.pn-replaced { color: var(--quiet); }
.pn-ordsub { display: block; color: var(--quiet); font-size: var(--t-xs); }
@media (min-width: 1001px) { /* the questions, check and coding scroll on their own at the left; the note fills the height at the right and only its text scrolls (his approval 2026-11-21) */
  .pn-grid:not(.pn-readonly) { height: var(--pn-h, calc(100dvh - var(--bar-h, var(--h-top)) - 150px)); grid-template-rows: minmax(0, 1fr); } /* --pn-h is set by pnFit: the window's height below where the writer starts */
  .pn-grid:not(.pn-readonly) > .pn-left { overflow-y: auto; min-height: 0; padding-right: 2px; overscroll-behavior: contain; }
  .pn-grid:not(.pn-readonly) > .pn-right { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .pn-grid:not(.pn-readonly) .pn-notecard { display: flex; flex-direction: column; min-height: 0; }
  .pn-grid:not(.pn-readonly) .pn-notecard .pn-note { flex: 1 1 auto; min-height: 0; }
  .pn-grid:not(.pn-readonly) .pn-notecard .pn-actions { flex: 0 0 auto; }
}
@media (max-width: 1000px) { .pn-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pn { padding: var(--s2) var(--s3) var(--s4); }
  .pn-form, .pn-left { display: none; }
  .pn-note { max-height: none; }
  .pn-actions button, .pn-pickrow, .pn-ord button { min-height: 32px; }
}

/* ───────── Procedure note templates: the list and the editor (his approval 2026-11-12) ───────── */
.pe-page, .pe-list { max-width: 1480px; }
.pe-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; }
.pe-head > b { font-size: var(--t-lg); }
.pe-head > :is(a.primary, .hint:last-child) { margin-left: auto; }
.pe-tbl td.pe-act { text-align: right; }
.pe-ver { padding: 0 0 var(--s2); color: var(--quiet); font-size: var(--t-sm); }
.pe-oldbanner { background: var(--band-2); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); color: var(--ink); }
.pe-cols { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s4); align-items: start; }
.pe-main { min-width: 0; }
.pe-side { position: sticky; top: calc(var(--bar-h, var(--h-top)) + var(--s2)); max-height: calc(100vh - var(--bar-h, var(--h-top)) - 50px); overflow: auto; }
.pe-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.pe-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lift); margin-bottom: var(--s3); }
.pe-card > .band { display: flex; align-items: baseline; gap: var(--s3); padding: 0 var(--s4); min-height: var(--h-band-2); line-height: var(--h-band-2); background: var(--band-2); border-radius: var(--r-card) var(--r-card) 0 0; font-weight: var(--w-bold); }
.pe-card > .band > .hint { font-weight: var(--w-reg); }
.pe-body { padding: var(--s2) var(--s4); }
.pe-body textarea, .pe-body input[type=text], .pe-body input[type=number], .pe-body select { width: 100%; box-sizing: border-box; font: inherit; }
.pe-body input[type=text], .pe-body input[type=number], .pe-body select { height: 28px; padding: 0 6px; }
.pe-r { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: 4px 0; }
.pe-r > label { padding-top: 4px; }
.pe-grow { flex: 1; }
.pe-sec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); padding: 2px 0; }
.pe-mv { display: inline-flex; gap: 2px; }
.pe-fhead, .pe-frow { display: grid; grid-template-columns: 120px minmax(100px, 1fr) 110px 170px 48px 180px 148px; gap: var(--s2); align-items: center; }
.pe-fhead { padding: 4px 0; font-size: var(--t-sm); color: var(--quiet); }
.pe-f { padding: 4px 0; border-top: 1px solid var(--line); }
.pe-frow input[type=checkbox] { justify-self: center; }
.pe-x { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 2fr) auto 70px; gap: var(--s2); align-items: center; padding: 3px 0 0 0; font-size: var(--t-sm); color: var(--quiet); }
.pe-x > input:only-of-type { grid-column: 2 / -1; }
.pe-opts { padding: 4px 0 0 var(--s4); display: grid; gap: 3px; }
.pe-ohead, .pe-o { display: grid; grid-template-columns: 110px minmax(100px, 1fr) minmax(140px, 2fr) 70px auto; gap: var(--s2); align-items: center; }
.pe-ohead { font-size: var(--t-sm); color: var(--quiet); }
.pe-o input[type=checkbox] { justify-self: center; }
.pe-opts > button { justify-self: start; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-bottom: var(--s2); }
.pe-chip { height: 24px; font-size: var(--t-sm); }
.pe-text { line-height: 1.4; padding: var(--s2) var(--s3); resize: vertical; }
.pe-problems { background: var(--urgent-bg); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); margin-top: var(--s2); }
.pe-problems ul { margin: 4px 0 0 var(--s4); padding: 0; }
.pe-ok { color: var(--done); padding: var(--s2) 0; font-size: var(--t-sm); }
.pe-c, .pe-cd { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: 3px 0; }
.pe-c > :is(input, select) { width: auto; flex: 1 1 140px; }
.pe-c > select:first-child { flex: 0 0 190px; }
.pe-cd > input:nth-child(1) { flex: 0 0 90px; }
.pe-cd > input:nth-child(2) { flex: 0 0 170px; }
.pe-cd > input:nth-child(3) { flex: 1 1 200px; }
.pe-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 5; }
.pe-bar > .actions { border-top: 0; align-items: center; }
.pe-note { white-space: pre-wrap; line-height: 1.4; font-size: var(--t-md); padding: var(--s2) 0; }
.pe-note mark, .pe-blank { background: var(--pf-amber-bg); color: inherit; border-radius: 2px; padding: 0 2px; }
.pe-sub { margin-top: var(--s3); font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--quiet); }
.pe-ck { padding: 2px 0; }
.pe-ck.pe-stop > b { color: var(--urgent); }
.pe-ck.pe-warn > b { color: var(--late); }
.pe-ck.pe-ok > b { color: var(--done); }
.pe-pc > summary { cursor: pointer; color: var(--quiet); font-size: var(--t-sm); padding: 2px 0; }
.pe-pr { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s2); align-items: center; padding: 2px 0; font-size: var(--t-sm); }
.pe-mc { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.pe-vsel select { height: 24px; max-width: 360px; }
.pe-noident { margin: 4px 0 0; }
.pe-retired { margin: var(--s3) 0 0; font-size: var(--t-sm); }
.pe-retired > summary { cursor: pointer; color: var(--quiet); }
.pe-retired ul { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.pe-ret { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: 4px 0; border-top: 1px solid var(--line); }
.pe-ret > .hint { flex: 1 1 200px; }
.pe-retact { display: inline-flex; align-items: center; gap: var(--s3); margin-left: auto; }
.pe-saveerr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); padding: var(--s2) var(--s4); background: var(--late-bg); color: var(--late); font-size: var(--t-sm); line-height: var(--lh-sm); border-top: 1px solid var(--line); }
.pe-saveerr > span { flex: 1 1 260px; min-width: 0; }
.pe-saveerr > button { flex: none; }
@media (max-width: 1500px) {
  .pe-cols { grid-template-columns: minmax(0, 1fr); }
  .pe-side { position: static; max-height: none; }
}
@media (max-width: 1100px) {
  .pe-fhead { display: none; }
  .pe-frow { grid-template-columns: 1fr 1fr; }
  .pe-r { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pe-head { flex-wrap: wrap; }
  .pe-opts { padding-left: 0; }
  .pe-ohead { display: none; }
  .pe-o { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pe-x { grid-template-columns: minmax(0, 1fr); }
  .pe-x > input:only-of-type { grid-column: auto; }
  .pe-page :is(button, select, input[type=text], input[type=number]) { min-height: 32px; }
  .pe-tbl :is(th, td):nth-child(3), .pe-tbl :is(th, td):nth-child(4) { display: none; }
  .pe-tbl td { white-space: normal; overflow-wrap: anywhere; }
  .pe-tbl td.pe-act a { display: inline-flex; align-items: center; min-height: 32px; min-width: 44px; justify-content: flex-end; }
}
/* ───────── Procedure note templates: the easier creator (his approval 2026-11-13, "Easier template creator mock-up 2026-11-12") ─────────
   The questions read like the note writer's form (its sub-bands and small answer buttons), the note sits beside them in the hub's normal font, buttons bottom right. */
.pe-head.pne-head > .hint:last-child { margin-left: 0; }
.pne button.link.small { font-size: var(--t-sm); font-weight: var(--w-reg); }
.pne :is(.pne-top2, .pne-r) label, .pne .pne-nousual { font-weight: var(--w-reg); font-size: var(--t-sm); }
.pne :is(.pne-act, .pne-legend, .pne-ansgrid, .pne-ansfoot) button.link { height: auto; min-height: 0; line-height: 18px; }
.pne-only { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); background: var(--band-2); border-radius: var(--r-ctl); font-size: var(--t-sm); }
.pne-card { overflow: hidden; }
.pne-lead { margin: 0 0 var(--s2); }
#pne-paste { display: block; width: 100%; min-height: 260px; box-sizing: border-box; font: inherit; font-size: var(--t-md); line-height: 1.4; padding: var(--s2) var(--s3); resize: vertical; }
.pne-msg { margin: var(--s2) 0 0; color: var(--late); font-size: var(--t-sm); }
.pne-top2 { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: 6px var(--s4); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.pne-top2:first-child { border-top: 0; }
.pne-top2 > label { color: var(--quiet); }
.pne-top2 input[type=text] { width: min(480px, 100%); height: 28px; padding: 0 8px; box-sizing: border-box; font: inherit; }
.pne-top2.pne-flat { padding: var(--s2) 0 0; border-top: 0; }
.pne-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); }
.pne-tag { display: inline-flex; align-items: center; background: var(--band-2); border-radius: 999px; padding: 0 2px 0 10px; line-height: 22px; }
.pne-tag button { border: 0; background: none; color: var(--quiet); cursor: pointer; padding: 0 6px; font: inherit; line-height: 22px; }
.pne-tag button:hover { color: var(--ink); }
.pne-addorder, .pne-addsec { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.pne-addorder select, .pne-addorder input, .pne-addsec input { height: 26px; padding: 0 6px; font: inherit; font-size: var(--t-sm); box-sizing: border-box; }
.pne-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.pne-left, .pne-right { min-width: 0; }
.pne-right { position: sticky; top: calc(var(--bar-h, var(--h-top)) + var(--s2)); }
.pne-card > .band .pne-seg { margin-left: auto; align-self: center; }
.pne-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; line-height: 20px; }
.pne-seg button { border: 0; background: var(--surface); color: var(--ink); padding: 1px 10px; font: inherit; font-size: var(--t-xs); font-weight: var(--w-reg); cursor: pointer; }
.pne-seg button + button { border-left: 1px solid var(--line-strong); }
.pne-seg button[aria-pressed="true"] { background: var(--selected); color: var(--band); font-weight: var(--w-bold); }
.pne-q { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: var(--s2); padding: 4px var(--s3); border-bottom: 1px solid var(--line); align-items: start; transition: background .4s; }
.pne-q.on, .pne-q.flash { background: var(--selected); }
.pne-lab { font-size: var(--t-sm); line-height: 18px; padding-top: 4px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.pne-w { display: block; margin-top: 1px; color: var(--quiet); font-size: var(--t-xs); line-height: var(--lh-xs); }
.pne-ans0 { min-width: 0; }
.pne-u { margin-left: 5px; font-size: 11px; font-weight: var(--w-reg); color: var(--quiet); }
span.pn-opt { display: inline-flex; align-items: center; cursor: default; }
.pne-typed { display: inline-block; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); padding: 0 10px; color: var(--quiet); font-size: var(--t-sm); line-height: 24px; }
.pne-says { color: var(--quiet); font-size: var(--t-xs); line-height: var(--lh-xs); margin-top: 2px; overflow-wrap: anywhere; }
.pne-act { line-height: 18px; padding-top: 4px; white-space: nowrap; }
.pne-chg { line-height: 18px; padding-top: 4px; }
.pne-ed { background: var(--sunk); border-bottom: 1px solid var(--line); padding: 6px var(--s3) 0; font-size: var(--t-sm); }
.pne-r { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s2); align-items: center; padding: 3px 0; font-size: var(--t-sm); }
.pne-r.pne-top { align-items: start; }
.pne-r.pne-top > .pne-rl { line-height: 22px; }
.pne-r > label:first-child, .pne-rl { color: var(--quiet); }
.pne-r input[type=text], .pne-r select, .pne-ansgrid input[type=text] { height: 26px; padding: 0 6px; font: inherit; font-size: var(--t-sm); box-sizing: border-box; min-width: 0; }
.pne-r > input[type=text] { width: 100%; }
.pne-r input.pne-short { width: 110px; }
.pne-ansgrid { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(110px, 1fr) 44px auto; gap: 4px var(--s2); align-items: center; }
.pne-ansgrid .h { color: var(--quiet); font-size: var(--t-xs); line-height: var(--lh-xs); }
.pne-ansgrid input[type=radio], .pne-ansgrid input[type=checkbox] { justify-self: center; margin: 0; }
.pne-ansfoot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.pne-nousual, .pne-chk { display: inline-flex; align-items: center; gap: 6px; }
.pne-chk input { margin: 0; }
.pne-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pne-when select { max-width: 100%; }
.pne-is { color: var(--quiet); }
.pne-edhint { margin: 2px 0 0 calc(120px + var(--s2)); }
.pne-ed > .actions { padding: 6px 0 var(--s2); border-top: 0; }
.pne-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: 6px var(--s3); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--quiet); }
.pne-legend > :last-child { margin-left: auto; }
.pne-legend .link, .pne-adds .link { font-size: var(--t-sm); }
.pne-adds { justify-content: flex-end; }
.pn-note.pne-note { white-space: pre-wrap; overflow-wrap: anywhere; max-height: calc(100vh - 290px); min-height: 120px; }
.pne-gap { display: block; height: var(--s2); }
.pne-spot { border-radius: 3px; padding: 0 2px; cursor: pointer; }
.pne-spot.u { background: var(--done-bg); color: var(--done); }
.pne-spot.b { background: var(--late-bg); color: var(--late); }
.pne-spot.n { background: var(--selected); color: var(--band); }
.pne-spot:hover, .pne-if:hover { outline: 1px solid var(--accent-line); }
.pne-legend .pne-spot { cursor: default; }
.pne-legend .pne-spot:hover { outline: 0; }
.pne-legend .pne-if { cursor: default; }
.pne-if { cursor: pointer; text-decoration: underline dotted var(--accent-line); text-underline-offset: 3px; }
.pne-foldbox { padding: 6px var(--s3); }
.pne-fold > summary { cursor: pointer; color: var(--accent); font-size: var(--t-sm); }
.pne-more { padding: 4px 0 2px; font-size: var(--t-sm); color: var(--quiet); }
.pne-more ul { margin: 0 0 4px; padding-left: var(--s4); line-height: var(--lh-sm); }
.pne-fixed-ed > label { display: block; font-size: var(--t-sm); color: var(--quiet); padding-bottom: 4px; }
.pne-fixed-ed textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: var(--t-sm); line-height: 1.4; padding: 4px 8px; }
.pne-fixed-ed > .actions { padding: 6px 0 0; border-top: 0; }
.pne-foot { position: sticky; bottom: 0; z-index: 5; margin-top: var(--s3); }
.pne-foot > .actions { margin-top: 0; background: var(--sunk); align-items: center; padding: var(--s2) var(--s4); }
.pne-foot .pe-grow.pne-wait { color: var(--late); }
.pne-probs { background: var(--late-bg); color: var(--late); padding: var(--s2) var(--s4); font-size: var(--t-sm); line-height: var(--lh-sm); border-top: 1px solid var(--line); }
.pne-probs ul { margin: 2px 0 0; padding-left: var(--s4); }
.pne-probs li { margin: 2px 0; }
.pne-probs .link { margin-left: var(--s2); font-size: var(--t-sm); }
.pne-ins { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: var(--s2) var(--s4) 0; font-size: var(--t-xs); color: var(--quiet); }
.pne-chip { border: 0; background: var(--selected); color: var(--band); border-radius: 3px; padding: 0 5px; font: inherit; font-size: var(--t-xs); line-height: 20px; cursor: pointer; }
.pne-chip:hover { outline: 1px solid var(--accent-line); }
textarea.pne-words { display: block; width: calc(100% - 2 * var(--s4)); margin: var(--s2) var(--s4) 0; min-height: 420px; height: 52vh; box-sizing: border-box; font: inherit; font-size: var(--t-md); line-height: 1.4; padding: var(--s2) var(--s3); resize: vertical; }
.pne-wordshint { margin: 4px var(--s4) var(--s2); }
.pe-head > .pe-simple { margin-left: auto; }
@media (max-width: 1100px) {
  .pne-cols { grid-template-columns: minmax(0, 1fr); }
  .pne-right { position: static; }
}
@media (max-width: 640px) {
  .pne-q { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pne-top2 { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pne-head { flex-wrap: wrap; }
}
/* ───────── Fit and finish 2026-11-12 (look only: no screen, rule or default changes) ─────────
   1. Lists start higher on a phone: the ? help button stays on the summary line (it wrapped alone onto its own line) and the referrals summary keeps the full width
      (it was squeezed into a narrow column beside the stamp and + New referral).
   2. The open Spruce conversation under a chart is a narrower box at the right, and the chart's columns end before it: it no longer sits on the chart's buttons. The closed line is unchanged. */
@media (max-width: 640px) {
  .wl-head:has(> .lv-help) { flex-wrap: nowrap; }
  .wl-head:has(> .lv-help) > .wk-sum { min-width: 0; }
  .wl-head.ls-head > .wk-sum { flex: 1 1 100%; }
}
@media (min-width: 900px) {
  .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) { position: fixed; right: 44px; bottom: 16px; width: min(360px, calc(100vw - 120px)); margin: 0; z-index: 7; } /* his decision 11/20: the Text card floats over the page and reserves no column, so the chart keeps its full width; Shrink makes it small */
  body.sp-open .pp > .spx-dock.open:not([hidden]):not(.pp-pop *) { right: calc(var(--sp-w) + 16px); } /* the Right panel is open: the card floats beside it, not under it */
}
/* ───────── Narrow tables in the Snapshot layout (sweep 2026-11-14; look only) ─────────
   A table beside an open item, in the right panel, or in a narrow window used to keep its fixed columns (Assigned to 180 px + Days 96 px) and left
   the item name no width: one letter a line, the heads printed over each other, and the right panel's adverse-event line cut. The table now drops to the
   phone's short lines (date · item, then the other cells under it) when ITS OWN column is narrower than 520 px, and never cuts a cell there. */
@container snrc (max-width: 520px) {
  .snr-c .snr-t, .snr-c .snr-t tbody, .snr-c .snr-t tr { display: block; width: 100%; }
  .snr-c .snr-t thead { display: none; }
  .snr-c .snr-t tr { padding: 4px 0; border-top: 1px solid var(--line); height: auto; }
  .snr-c .snr-t td { display: inline; padding: 0; border: 0; width: auto; height: auto; }
  .snr-c .snr-t td:nth-child(2)::before { content: "\00a0\00b7\00a0"; color: var(--quiet); }
  .snr-c .snr-t td:nth-child(n+3) { display: block; color: var(--quiet); height: auto; }
  .snr-c .snr-t td:empty { display: none; }
  .snr-c .snr-t :is(td, a, button.link, .link, .snr-lk) { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none; }
  .snr-c .snr-t :is(a, button.link, .link, .snr-lk) { display: inline; }
}
/* ───────── Phone and touch lists (sweep 2026-11-14; look only) ─────────
   1. A phone's Referrals and Waiting list rows let the detail line wrap (the main-text block below), so "check details", "Compare" and the other buttons in it are on screen and can be tapped
      (a one-line cut put them past the edge and a tap at their middle did not land on them).
   2. Every button and link in a Snapshot row is a 32 px tap target on a touch screen or a phone: a transparent layer round it (the chart header's links do the same), so the row
      stays as tight as it was and no two controls' boxes overlap; the Text button is at least 32 px wide. */
@media (max-width: 640px), (pointer: coarse) {
  .snw .snw-r > div :is(button, a, summary) { position: relative; }
  .snw .snw-r > div :is(button, a, summary)::after { content: ""; position: absolute; inset: -7px -1px; }
  .snw .snw-r > .snw-a :is(button, a, summary) { min-width: 32px; }
  /* Look fix 2026-11-17 (the 11/16 check: 91 of 291 small controls on 17 phone screens still had a hit height of 18 to 22 px): the same layer on the same kinds of control where they sit outside a row
     (the action beside a card's heading, "check details", the fold labels of a Snapshot table, a count link in a hint line); the full-width fold bands are 32 px tall themselves (they were 31). */
  .snw :is(.snw-a, .snw-q) :is(button, a, summary), .snr-l > button.snr-fold, a.wla-lk, .wk-sent a, .cov-more > summary, .toolbar.listbar > a.small { position: relative; }
  .snw :is(.snw-a, .snw-q) :is(button, a, summary)::after, .snr-l > button.snr-fold::after, a.wla-lk::after, .wk-sent a::after, .cov-more > summary::after, .toolbar.listbar > a.small::after { content: ""; position: absolute; inset: -7px -1px; }
  button.snw-band { min-height: 32px; }
  /* the action cell clips what is outside it (the buttons' ellipsis): 7 px of its own above and below, taken back in the margin, hold the layers without moving the row */
  .snw :is(.snw-a, .snw-q) { padding-block: 7px; margin-block: -7px; pointer-events: none; }
  .snw :is(.snw-a, .snw-q) > * { pointer-events: auto; }
  .snw :is(.snw-a, .snw-q) > button.link { overflow: clip; overflow-clip-margin: 7px; } /* a text button that cuts its own words (ellipsis) lets its layer out past the cut: no box of its own grows, so no two controls' boxes overlap */
}
/* a closed referral's row that carries buttons (who declined it, Undo): its words wrap so the buttons are whole */
.snw-r[data-wrap] > div:nth-child(2) { white-space: normal; overflow: visible; text-overflow: clip; }
/* the Orders and results item's footer (Mark all reviewed, + Order, Text the patient, Next patient): at the bottom right, the way forward rightmost (his rule: buttons bottom right) */
.ao-acts.scard-ft { justify-content: flex-end; }
/* ───────── Main text wraps to two lines, secondary text keeps its "…" (sweep 2026-11-14; look only) ─────────
   A Snapshot row's "what" and status cells held to one line cut 292 cells with "…" (the reason for the item, "Ordered 10/07/26 · not sent fo…"). They now take up to two lines before
   an ellipsis; the date, the note column and the quiet cells keep one line. Referrals and the Waiting list hold buttons in the "what" cell, so it wraps in full. */
.snw .snw-r:not([data-wrap]) > div:is(:nth-child(2), :nth-child(4)) { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
:is(.snw[data-snr-screen="refs"], .snw[data-snr-screen="waitlist"]) .snw-r > div:nth-child(2) { display: block; -webkit-line-clamp: none; line-clamp: none; white-space: normal; overflow: visible; text-overflow: clip; }
@media (min-width: 641px) {
  /* the chart Summary's Open items, Upcoming visits and Procedures: the item (and an open item's status) wrap, the quiet cells keep their "…" and their hover words */
  .smy-snap :is([data-snr="openitems"], [data-snr="upcoming"], [data-snr="procs"]) .snr-t td:nth-child(2), .smy-snap [data-snr="openitems"] .snr-t td:nth-child(4) { white-space: normal; overflow: visible; text-overflow: clip; }
  .smy-snap :is([data-snr="openitems"], [data-snr="upcoming"], [data-snr="procs"]) .snr-t td:nth-child(2) :is(a, button.link, .link), .smy-snap [data-snr="openitems"] .snr-t td:nth-child(4) :is(a, button.link, .link) { display: inline; white-space: normal; overflow: visible; text-overflow: clip; }
}
/* Admin → Rules on a phone (sweep 2026-11-14): each rule is its name, then what it does under it, then Change at the right; the 240 px name column left the words 16 px wide */
@media (max-width: 640px) {
  details.rulecard > summary { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; column-gap: var(--s3); }
  details.rulecard > summary > .rc-s { grid-column: 1 / -1; grid-row: 2; }
  details.rulecard > summary > .rc-go { grid-column: 2; grid-row: 1; }
}
/* the ? help sits in the controls row beside the search (it took a row of its own above it); a list head left with nothing in it is not drawn */
.toolbar > .lv-help { align-self: center; margin-left: var(--s1); }
main:not(.page-min) .wl-head:has(> .wk-sum:empty):not(:has(> :not(.wk-sum, [hidden], .pg-fold))) { display: none; } /* an empty header line (Team, Procedure orders): the fold button is hidden on a computer, so it does not count */
/* "Columns ▾" over a table that has no controls row of its own: on a computer a small line of its own, right-aligned above the table, never over the pinned heading or the rows (look fix 2026-11-17).
   Where the heading is not drawn (a list beside an open item shows rows only) there are no columns to choose, so the line is not drawn either. */
.tc-bar:not(.tc-slot) { height: 0; margin: 0; overflow: visible; position: relative; z-index: 6; }
.tc-bar:not(.tc-slot) > .tc-btn { position: absolute; right: var(--s2); top: 5px; }
@media (min-width: 641px) {
  .tc-bar:not(.tc-slot) { height: auto; margin: 0 0 var(--s1); text-align: right; }
  .tc-bar:not(.tc-slot) > .tc-btn { position: static; }
  :is(main.with-drawer, .spa.split) .tc-bar:not(.tc-slot):has(+ table.wk-t, + .tablewrap > table.wk-t) { display: none; }
}
/* ───────── Type on the hub's scale: 12 / 13 / 15 / 22, weights 400 and 600 (sweep 2026-11-14; look only) ─────────
   Found off the scale: the age beside a name in a list row (10.8), the chart's Snapshot tables (the old sheet's 14 px cells beat their 13), card title bands in the chart and Orders (14),
   the chart menu (14, its group names 12.45, "+ Sticky note" 12.5), fold signs (16), and a bold word inside a bold word (900). */
.snw-p small { font-size: var(--t-xs); }
.snr-t td, .snr-t td :is(.snr-w, .q) { font-size: var(--t-sm); }
.ov2-card.scard > header > b, .pts-card > header > b, section.ov2-card > header > b > button.ppname { font-size: var(--t-md); }
.pc-fold.cf-fold { font-size: var(--t-md); }
.pp-menu .pp-mtabs > button > .ml, .pp-menu > button.pp-mfold { font-size: var(--t-md); }
.pp-menu .pp-mtabs > h5 { font-size: var(--t-xs); }
/* a narrow chart's one row of tabs (patient.js ppTabVisible, his pick 2026-11-14): the small step (13px) for the tabs, their counts and More; the rule above would give them 15px */
.pp.pp-narrow .pp-menu .pp-mtabs > button > :is(.ml, .n), .pp.pp-narrow .pp-menu .pp-more > summary, .pp.pp-narrow .pp-menu .pp-more .menu-list button { font-size: var(--t-sm); }
.pp-sticky.sk-none > button.sk-addline { font-size: var(--t-sm); }
.wl-head > .wk-sum > b { font-size: var(--t-md); }
@layer base { b, strong { font-weight: var(--w-bold); } }
/* Clipboard and Demographics: the Add / Edit / Write link is at the right of the row's first line, so a row with a link is as tall as one without and its value sits beside the label (it was a line of its own above the value) */
.clipsnap .snr-ed, .dmsnap .snr-ed { float: right; margin-left: var(--s3); line-height: var(--lh-sm); }
/* ───────── A list beside an open chart or item (owner's live picture 2026-11-14; look only) ─────────
   The list never scrolls sideways or starts off the left edge (a row taken into view could shift it), and the chart's "+ Sticky note" band is painted above anything the header's
   last line overlaps (it was half hidden under it). */
:is(main.with-drawer, .spa.split) :is(.wl-page, .wlc, .wla-wrap) { overflow-x: clip; }
.pp-pre { position: relative; z-index: 1; }

/* ───────── One title band look (his pick 2026-11-14, idea 1) ─────────
   Every card title uses the light Snapshot band (--hmx-band). Navy stays ONLY on the item that is open (the item card of a list: .obcard Orders, .poc-card Procedures,
   .tk-snapcard Tasks, .fx-card the focus screens). One list of bands, one set of rules: change it here, not on a screen. Colour only; nothing moves or resizes. */
html:not([data-theme="dark"]) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card:not(.fx-card, .poc-card, .tk-snapcard, .obcard) > header, .pc-card > header, .cl-b > h3, .cardhead, .pp-ph, .set-sec > h2.first) {
  --on-band: var(--hmx-band-ink); --on-band-quiet: #536c79; background: var(--hmx-band); color: var(--hmx-band-ink); }
html:not([data-theme="dark"]) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card:not(.fx-card, .poc-card, .tk-snapcard, .obcard) > header, .pc-card > header, .cl-b > h3, .cardhead, .pp-ph) :is(button.secondary, button.primary, button.quiet, select, summary.pc-prichip, summary.quiet.small) {
  background-color: rgba(35, 53, 66, .07); border-color: transparent; color: var(--hmx-band-ink); }
html:not([data-theme="dark"]) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card:not(.fx-card, .poc-card, .tk-snapcard, .obcard) > header, .pc-card > header, .cl-b > h3, .cardhead, .pp-ph) :is(button, select):hover { background-color: rgba(35, 53, 66, .12); }
html:not([data-theme="dark"]) :is(main .wk-sechrow, main tr.pc-sech > td, .ov2-card:not(.fx-card, .poc-card, .tk-snapcard, .obcard) > header, .pc-card > header, .cl-b > h3, .cardhead, .pp-ph) :is(button.icon, .cf-fold, .pc-fold, .sec-cust):hover { background: rgba(35, 53, 66, .12); }
html:not([data-theme="dark"]) :is(main .wk-sech .wk-n:not(.pc-latepill), .ov2-card:not(.fx-card, .poc-card, .tk-snapcard, .obcard) > header .n, .pc-card > header .n, .cardhead .n, .pp-ph .n) { background: rgba(35, 53, 66, .12); color: var(--hmx-band-ink); }
html:not([data-theme="dark"]) main .wk-sech:hover .wk-pm { background: rgba(35, 53, 66, .12); }
/* the chart Summary: "Updated by Autumn" reads under the band, not in it (idea 2) */
.smy-snap > .smy-upd { padding: var(--s1) var(--s3) 0; }
.smy-snap > .smy-upd .pp-anwhen { margin: 0; color: var(--quiet); font-size: var(--t-sm); font-weight: var(--w-reg); opacity: 1; }
/* The collapsed Spruce line (his word 11/20): only the pill covers anything. It used to rest on a full-width strip of the page colour that hid chart rows behind it; the strip is gone (the chart keeps 72 px of room at its foot, above, so the last row scrolls clear of the pill). */
/* Source notes (idea 14, "no citations on screen"): where a coverage rule or a figure came from is behind "More details", on the row and in the page's foot */
.cov-more { display: inline; } .cov-more > summary { display: inline; cursor: pointer; color: var(--accent); font-size: var(--t-sm); list-style: none; } .cov-more > summary::-webkit-details-marker { display: none; }
.cov-more[open] > summary { margin-right: var(--s1); }
details.cov-foot { display: block; margin-top: var(--s3); padding: 0 var(--s4); } details.cov-foot > p { margin: var(--s1) 0 0; }
/* Admin's tabs on one row with "More ▾" (idea 15): the summary looks like a tab; its list drops in place under it and is not cut by the row */
.topbar nav .navmore { position: relative; display: flex; align-items: stretch; }
.topbar nav .navmore > summary { height: var(--h-top); display: flex; align-items: center; gap: 4px; padding: 0 var(--s3); color: var(--quiet); cursor: pointer; list-style: none; white-space: nowrap; background: none; border: 0; }
.topbar nav .navmore > summary::-webkit-details-marker { display: none; }
.topbar nav .navmore > summary:hover { color: var(--ink); background: var(--sunk); }
.topbar nav .navmore > summary.active { color: var(--ink); font-weight: var(--w-bold); box-shadow: inset 0 -3px 0 var(--band); }
.topbar nav .navmore .navmore-l { left: 0; right: auto; min-width: 240px; }
.topbar nav .navmore-h { padding: var(--s2) 10px var(--s1); font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: .07em; text-transform: uppercase; color: var(--quiet); }
.topbar nav .navmore .menu-link.active { font-weight: var(--w-bold); background: var(--selected); }
@media (min-width: 641px) { .topbar.tool-admin nav { overflow: visible; } }
@media (max-width: 640px) { .topbar nav .navmore { position: static; } .topbar nav .navmore .navmore-l { position: fixed; top: var(--bar-h); left: var(--s2); right: var(--s2); } }
/* Every chart tab starts the same way (idea 4): the band, then the switch inside the card */
.ov2-card > .pp-pairbar { margin: var(--s2) var(--s3) 0; width: max-content; }
.pc-tab.snrc.ov2-card { padding-top: 0; }
.pc-tab.snrc.ov2-card > header { margin: 0 -12px var(--s2); }
/* "New ..." buttons in one place (idea 5): the list's toolbar or card band, at the right, the same main-button style. A referral list carries its own "+ New referral" at the right of its toolbar (the phone: in the header line, as before), so the top bar's copy steps aside there. */
.topbar:has(~ main :is(.ls-new, .ls-new-d)) nav a.cta { display: none; }
.ls-new-d { margin-left: auto; align-self: center; min-height: var(--h-ctl-sm); padding: 0 var(--s3); font-weight: var(--w-bold); }
@media (max-width: 640px) {
  .ls-new-d { display: none; }
  .toolbar.wkbar #pcnew { order: 1; flex: none; margin-left: auto; } .toolbar.wkbar #pcnew .nw-more { display: none; }
}
/* A list beside an open item (idea 6): its switches fold into View ▾ (filters.js lvSegs), so the toolbar is the search and one row */
main.with-drawer .toolbar:has(.fbhost, #pcfslot, #tkfslot) :is(.pc-parts, .lv-scope) { display: none; }
/* Phone procedure order card (idea 12): the date and the item share a line, Routine moves into the ⋯ menu (a High or Stat chip stays), and the band is one line */
.pc-pri-m { display: none; }
@media (max-width: 640px) {
  .snr-c .snr-t tr:has(> td:nth-child(2)) { display: flex; flex-wrap: wrap; align-items: baseline; }
  .snr-c .snr-t tr > td:nth-child(1) { flex: none; }
  .snr-c .snr-t tr > td:nth-child(2) { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; }
  .snr-c .snr-t tr > td:nth-child(2) > :is(button, a) { flex: 1 1 0; min-width: 0; text-align: left; }
  .snr-c .snr-t tr > td:nth-child(n+3) { flex: 1 1 100%; }
  .pc-card > header.pc-head { flex-wrap: nowrap; }
  .pc-card > header.pc-head .pc-name { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pc-card > header.pc-head .pc-primenu:has(> .pc-prichip.routine) { display: none; }
  .pc-card > header.pc-head .pc-pri-m { display: flex; }
  .pc-card > header.pc-head .pc-trk { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* The compact chart header (preview "Compact chart header", .pp-chdr, patient.js ppChdrBuild; his pick 2026-11-14): two lines, Sections and Actions as two buttons that open in place; the section tabs and the action row stay in the page, hidden, so every entry does what the old button did. A phone (640 px and under) is not changed. */
.pp-wk { display: none; }
@media (min-width: 641px) {
  .pp.pp-chdr:not(.pp-phh) .pp-menu, .pp.pp-chdr:not(.pp-phh) .pp-toolbar, .pp.pp-chdr:not(.pp-phh) .pp-head > .pp-detl, .pp.pp-chdr:not(.pp-phh) .pp-pre > .pp-sticky.sk-none, .pp.pp-chdr:not(.pp-phh) .pp-pre .pp-band.folded { display: none; }
  .drawer-body:has(.pp-chdr) .fx-top { display: none; }
  .pp.pp-chdr:not(.pp-phh) .pp-split.has-menu { display: block; }
  .pp.pp-chdr:not(.pp-phh) .pp-pre:not(:has(.pp-sticky:not(.sk-none), .pp-band:not(.folded))) { display: none; }
  .pp.pp-chdr:not(.pp-phh) .pp-head { display: grid; --hw: 30px; grid-template-columns: var(--s5) minmax(0, 1fr) auto; column-gap: var(--s2); row-gap: 0; align-items: start; padding: var(--s2) var(--s3); }
  .pp.pp-chdr:not(.pp-phh) .pp-av { grid-column: 1; grid-row: 1 / 3; width: var(--s5); height: var(--s5); font-size: var(--t-xs); }
  .pp.pp-chdr:not(.pp-phh) .pp-id { display: contents; }
  .pp.pp-chdr:not(.pp-phh) .pp-head .pp-id > .pp-sub::before { content: none; }
  .pp.pp-chdr:not(.pp-phh) .pp-id h1 { grid-column: 2 / -1; grid-row: 1; padding-right: var(--hw); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s1); margin: 0; font-size: var(--t-md); line-height: var(--lh-md); min-width: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-id h1 .pp-r1 { margin: 0; font-size: var(--t-sm); line-height: var(--lh-md); }
  .pp.pp-chdr:not(.pp-phh) .pp-sub { grid-column: 1 / 3; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s2); margin: 0; padding: 0; white-space: normal; min-width: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-sub .pp-it { order: 0; flex: none; overflow: visible; text-overflow: clip; }
  .pp.pp-chdr:not(.pp-phh) .pp-sub .pp-alerts { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); margin: 0; padding: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-id .asn-chiprow { grid-column: 2 / -1; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts { grid-column: 3; grid-row: 1; display: flex; flex-wrap: nowrap; align-items: center; justify-self: end; gap: 2px; margin: 0; padding: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts button { min-width: 20px; height: 24px; min-height: 0; padding: 0 2px; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .pp-nav .hint { font-size: var(--t-xs); }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .ch-back { order: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .pp-nav { order: 1; position: static; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .pp-fold { order: 2; position: static; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .pp-full { order: 3; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts .pp-x { order: 4; position: static; }
  .pp.pp-chdr:not(.pp-phh) .pp-wk { grid-column: 3; grid-row: 2; display: flex; gap: var(--s2); justify-self: end; align-self: start; }
  .pp.pp-chdr:not(.pp-phh) .pp-id h1 .pp-r1 { column-gap: 0; }
  .pp.pp-chdr:not(.pp-phh) .pp-it + .pp-it::before { margin: 0 5px; }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-top > * { white-space: nowrap; }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-top .pp-pairbar { margin-left: auto; }
  .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now .snrc-nl { display: none; }
  .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now .snrc-nt { display: flex; flex-wrap: nowrap; align-items: baseline; column-gap: var(--s1); }
  .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now .snrc-nt > div { white-space: nowrap; }
  .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now .ws-actions > button, .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now .ws-actions summary { min-height: 28px; height: 28px; padding: 0 var(--s2); }
  .pp.pp-chdr:not(.pp-phh) .pp-head:has(.pp-nav) { --hw: 132px; }
  .pp.pp-chdr:not(.pp-phh) .pp-head:has(.pp-x):not(:has(.pp-nav)) { --hw: 78px; }
  .pp-dd { position: relative; }
  .pp-dd > summary { display: flex; align-items: center; gap: var(--s1); height: 28px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--field); color: var(--ink); font-size: var(--t-sm); white-space: nowrap; }
  .pp-dd[open] > summary, .pp-dd > summary:hover { background: var(--hover); }
  .pp-dd .menu-list { left: auto; right: 0; min-width: 240px; max-height: 70vh; overflow: auto; }
  .pp-dd .menu-list button { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 32px; padding: 0 10px; font-size: var(--t-sm); }
  .pp-dd .menu-list button.on { font-weight: var(--w-bold); background: var(--selected); }
  .pp-dd .menu-list button.dim { color: var(--muted); }
  .pp-dd .menu-list .n { color: var(--muted); }
  .pp-dd .menu-list .dd-h { padding: var(--s2) 10px var(--s1); font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: .07em; text-transform: uppercase; color: var(--quiet); }
  .pp-dd .dd-n { min-width: 16px; height: 16px; padding: 0 var(--s1); border-radius: 8px; background: var(--amber); color: var(--white); font-size: var(--t-xs); line-height: 16px; text-align: center; }
}
@media (min-width: 641px) {
  .pp.pp-chdr:not(.pp-phh) .pp-pre > .pp-sticky:not(.sk-none) { margin-bottom: var(--s1); }
}
@media (min-width: 641px) {
  .pp.pp-chdr:not(.pp-phh) .pp-sub { min-height: 28px; }
  .pp.pp-chdr:not(.pp-phh) .pp-hacts { align-self: center; }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-top { flex-wrap: nowrap; gap: var(--s2); align-items: center; }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-top .spacer { display: none; }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-psel { height: 28px; min-height: 0; padding: 0 var(--s5) 0 var(--s2); font-size: var(--t-sm); }
  .pp.pp-chdr:not(.pp-phh) #pprb .pp-pairbar button { height: 24px; min-height: 0; padding: 0 var(--s2); font-size: var(--t-sm); }
  .pp.pp-chdr:not(.pp-phh) #pprb .rb-i { font-size: var(--t-sm); }
  .pp.pp-chdr:not(.pp-phh) .pp-refws .snrc-now { margin-inline: var(--s2); padding-inline: var(--s2); }
}

/* ---------- Laptop look (his ask 2026-11-14, the laptop space review; look only): bars above the first row ---------- */
main.with-drawer .toolbar > .ls-detail, main.with-drawer .ls-new-d { display: none; } /* beside an open referral they live in View ▾ (lists.js) */
@media (min-width: 641px) { .fbhost:not(:has(:is(.fbar, .fchips) > *)) { display: none; } } /* no empty strip above the rows when no filter is on */
/* The Now strip of a list on one line (his laptop review): the words give way with an ellipsis (the whole sentence is its hover text), the button stays at the right. A list beside an open item keeps its short lines. */
@media (min-width: 641px) {
  @container (min-width: 640px) { .wla-wrap .wla-now .snrc-nt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
  main:not(.with-drawer) :is(#wkrows .snrc-now .snrc-nt, #rows .sno-now .sno-nt) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
/* My Worklist, By patient: the two switch rows share the search row (was 32 + 40 px of bars); beside an open item they stay stacked */
@media (min-width: 900px) {
  main:not(.with-drawer) #wkpage.wk-bypat > #wkrows { display: contents; }
  main:not(.with-drawer) #wkpage.wk-bypat > .wl-head { order: 1; }
  main:not(.with-drawer) #wkpage.wk-bypat > .toolbar { order: 2; }
  main:not(.with-drawer) #wkpage.wk-bypat > #wkrows > .cdl-sum { order: 3; flex: 0 0 auto; padding: 0; }
  main:not(.with-drawer) #wkpage.wk-bypat > #wkbulk, main:not(.with-drawer) #wkpage.wk-bypat > #wkrows > :not(.cdl-sum) { order: 4; flex: 1 1 100%; min-width: 0; }
}
/* Home: a card is as tall as what is in it (a short card no longer stretches to the tallest in its row) */
.hmx-grid, .hmx-two { align-items: start; }
/* A bar of many tabs (Referrals: eight) keeps to one 40 px bar at 1280 px: the compact bar's tabs sit closer, as they do on smaller laptops */
@media (min-width: 1280px) { .topbar.compact nav a { padding: 0 var(--s2); } }
/* The chart with the compact header: the section's title band repeats the Sections button, so it goes (a band that carries buttons keeps them); Summary's Collapse all sits at the top right, and its two "Autumn" lines share one (his laptop review) */
@media (min-width: 641px) {
  .pp.pp-chdr:not(.pp-phh) .ov2-card > header:not(:has(> :not(b, .cf-fold, .pc-fold, [hidden], :empty))) { display: none; }
  .pp.pp-chdr:not(.pp-phh) #ppsmy > .ov2-card { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s3); }
  .pp.pp-chdr:not(.pp-phh) #ppsmy > .ov2-card > header { position: absolute; top: var(--s1); right: var(--s3); z-index: 1; width: auto; min-height: 0; height: auto; margin: 0; padding: 0; background: none; }
  .pp.pp-chdr:not(.pp-phh) #ppsmy > .ov2-card > header > :is(b, .cf-fold) { display: none; }
  .pp.pp-chdr:not(.pp-phh) #ppsmy > .ov2-card > header > button.smy-all { color: var(--accent); }
  .pp.pp-chdr:not(.pp-phh) #ppsmy > .ov2-card > :is(.snr, .smy-late) { flex: 1 1 100%; min-width: 0; }
}
/* Clinic prep, All dates: the Patient column takes the width the empty columns left, so "DOB ... · not in the hub" stays on one line; the page scrolls (no inner box) */
@media (min-width: 641px) { table.evt td.title { min-width: 260px; } }
/* Admin cards: a table keeps to its card (tighter cell padding); its Columns button is on a line of its own above it (the shared .tc-bar rule) */
@media (min-width: 641px) {
  .adcard .ad-in > .tablewrap > table :is(th, td) { padding-inline: var(--s2); }
}
@media (min-width: 641px) { table.evt td:has(> button[data-evfind]) { white-space: nowrap; } } /* "Not in the hub yet" and its button on one line */
@media (min-width: 641px) { table.evt thead th:is(:nth-child(6), :nth-child(7)) { min-width: 100px; } } /* the Flags heading keeps clear of the Columns button */

/* Dot phrases (his pick 2026-11-16; public/js/dot-phrases.js): the list under the cursor, the choices in place, and My settings. Tokens only; no outline boxes; buttons bottom right. */
.dp-menu { position: fixed; z-index: 70; display: grid; min-width: 320px; max-width: min(520px, calc(100vw - 16px)); max-height: 320px; overflow: auto; padding: var(--s1) 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-over); }
.dp-grp { padding: var(--s2) var(--s4) 2px; font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-bold); color: var(--quiet); }
.dp-item { display: grid; grid-template-columns: max-content 1fr max-content; align-items: baseline; gap: var(--s3); padding: var(--s1) var(--s4); border: 0; border-radius: 0; background: none; color: var(--ink); text-align: left; font-size: var(--t-md); line-height: var(--lh-md); cursor: pointer; }
.dp-item.on, .dp-item:hover { background: var(--selected); }
.dp-gist { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--quiet); font-size: var(--t-sm); }
.dp-kind { font-size: var(--t-sm); color: var(--quiet); }
.dp-hint { padding: var(--s2) var(--s4) var(--s1); }
.dp-ask { display: grid; gap: var(--s2); margin: var(--s2) 0; padding: var(--s3); background: var(--sunk); border-radius: var(--r-card); }
.dp-ask-t { font-weight: var(--w-bold); }
.dp-ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.dp-ask-row .dp-lead { flex: 0 0 100%; }
.dp-checks { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.dp-foot { display: flex; justify-content: flex-end; gap: var(--s2); }
.dp-set .dp-row { display: grid; grid-template-columns: 9rem 1fr 7rem 11rem 7rem; gap: var(--s3); align-items: baseline; padding: var(--s1) 0; border-top: 1px solid var(--line); }
.dp-set .dp-row.dp-sh { grid-template-columns: 9rem 9rem 1fr 7rem 7rem; }
.dp-set .dp-row.dp-head { border-top: 0; font-size: var(--t-sm); color: var(--quiet); font-weight: var(--w-bold); }
.dp-set .dp-act { text-align: right; }
.dp-set .dp-h { margin: var(--s4) 0 var(--s1); font-size: var(--t-md); }
.dp-set .dp-links { display: flex; justify-content: flex-end; gap: var(--s3); margin: var(--s2) 0; }
.dp-set .dp-form { display: grid; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.dp-set .dp-opts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.dp-set textarea { width: 100%; }
@media (max-width: 720px) { .dp-set .dp-row, .dp-set .dp-row.dp-sh { grid-template-columns: 1fr auto; } .dp-set .dp-row > :nth-child(n+3):not(.dp-act) { display: none; } .dp-set .dp-row .dp-gist { grid-column: 1 / -1; } .dp-menu { min-width: 0; } }
/* Admin → Test patients to remove: the charts as plain rows, the answer buttons at the bottom right of each row (public/js/testpts.js) */
.tp-list { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.tp-chart { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.tp-chart > ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
.tp-chart > .actions { border-top: 0; padding: var(--s1) 0 0; }

/* The Summary's plain lines (his direction 11/17/26: Clinic prep is a tool, not a task to mark): what is new since Autumn read it, and a late or unsafe thing; no box, no button but Update */
.smy .smy-readnew .smy-rs { color: var(--late); font-weight: var(--w-bold); }
.smy .smy-late { padding: 6px 12px 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--late); }
.smy-snap .smy-late { padding: 6px var(--s4) 0; }
/* A folded row keeps its content in short form (his direction 11/17/26): the first words or items, muted, two lines at most, where a count used to sit */
.snr-row.snr-folded > .snr-hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-width: 0; color: var(--quiet); line-height: var(--lh-sm); overflow-wrap: anywhere; }

/* ───────── Phone look fixes, second round (2026-11-18; look only: no wording, no behaviour, no desktop change) ─────────
   1. A few more small controls get the same transparent 32 px tap layer as the rest of a phone's controls, in their own place.
   2. An action label in a row's action cell wraps to two lines instead of being cut with "...".
   3. A button that wrapped onto a row of its own sits at that row's right, the way every action row does (his rule: buttons bottom right). */
@media (max-width: 640px), (pointer: coarse) {
  a.wla-lk::after, .wk-sent a::after { inset: -8.5px -1px; }
  button.link.snr-lk, button.link.snrc-lk, .pp-r1 a[href^="tel"], .vns a.small, .toolbar.listbar button.link.small { position: relative; }
  button.link.snr-lk::after, button.link.snrc-lk::after { content: ""; position: absolute; inset: -6px -1px; }
  .pp-r1 a[href^="tel"]::after { content: ""; position: absolute; inset: -5px -2px -4px; }
  span.snw-q > button.link { position: relative; }
  span.snw-q > button.link::after { content: ""; position: absolute; inset: -8px -1px; }
  .ps-on .ps-hidebtn { min-width: 32px; }
  button.pc-fold, button.cf-fold { position: relative; z-index: 1; }
  .snw .snw-r > .snw-a > button.link, .wla-wrap .snw-a .link { white-space: normal; text-overflow: clip; overflow-wrap: anywhere; line-height: var(--lh-sm, 1.25); text-align: right; }
  .rb-recv { white-space: normal; }
  .tablewrap.cards td > a { display: inline-block; padding: 8px; margin: -8px; } /* a record number or a link inside a card-style table row: 8 px of tap area all round, given back in the margin so the row is as tall as before */
  .fill-row > button, .rz-band > button, .pp-same-b { margin-left: auto; }
  .ao-acts.scard-ft > [data-obtextp] { margin-left: auto; }
  .ao-acts.scard-ft > .ob-nextp { margin-left: 0; }
}

/* Easier to edit (his design 11/19/26): Ask Autumn to change it, what changed, Save as my letter, My letters. Added words are bold and underlined, removed words struck through: never colour alone. */
.ol-ask { display: grid; gap: var(--s1); margin: var(--s2) 0; }
.ol-ask > label { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--quiet); }
.ol-askrow { display: flex; gap: var(--s2); align-items: center; }
.ol-askrow input { flex: 1 1 auto; min-width: 0; }
.ol-chg { display: grid; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-card); background: var(--selected); font-size: var(--t-sm); }
.ol-diff { white-space: pre-wrap; max-height: 14em; overflow: auto; padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); line-height: var(--lh-sm); }
.ol-diff ins { font-weight: var(--w-bold); text-decoration: underline; }
.ol-diff del { text-decoration: line-through; color: var(--quiet); }
.ol-mine-new { display: grid; gap: var(--s2); padding: var(--s3); margin: var(--s2) 0; border-radius: var(--r-card); background: var(--selected); }
.ol-mine-new label { display: grid; gap: var(--s1); font-size: var(--t-sm); }
.ol-mine { display: grid; gap: var(--s1); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.ol-pre { white-space: pre-wrap; margin: var(--s1) 0 0; font: inherit; font-size: var(--t-sm); max-height: 14em; overflow: auto; }

/* ───────── DENSER LISTS (laptop) ─────────
   New feature "Denser lists (laptop)" (src/previews.js key lists, pref look.lists; his approval 2026-11-20 from the mock-ups, Round 2). ONE block, scoped under html.look-lists (settings.js and
   theme.js put the class on <html>): the lists only (My Worklist by patient and by job, the Referrals lists and Letters, the Orders and results list, the Procedure orders list). Not Clinic prep,
   not the chart Summary, not the open cards beside a list. Group titles are the shared soft blue band (--hmx-band), names and links plain weight, column heads small and grey, long items wrap to a
   second line (never dots; the Note column stays one line), and the Now item is the one tinted callout with an accent bar. The wide rows and the phone's lines keep today's layout. */
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-p { font-weight: var(--w-reg); color: var(--ink); }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) :is(.snw-od, .snw-st) { font-weight: var(--w-reg); }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-h { font-size: var(--t-xs); font-weight: var(--w-reg); color: var(--quiet); background: none; }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-h :is(button, .link) { font-weight: var(--w-reg); font-size: var(--t-xs); }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-a :is(button.primary, button.secondary, .link) { font-weight: var(--w-reg); }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) button.snw-band { min-height: 28px; align-items: center; padding-block: 4px; font-weight: var(--w-bold); color: var(--hmx-band-ink); }
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-band :is(.snw-hint, .snw-c, .snw-ch) { font-weight: var(--w-reg); color: var(--hmx-band-ink); opacity: .72; }
@media (min-width: 641px) {
  html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r { padding-block: 3px; }
  html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r > div:not(:nth-child(6)):not(.snw-a) { -webkit-line-clamp: none; line-clamp: none; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
  html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r > div:not(:nth-child(6)):not(.snw-a) :is(.link, .snr-lk, .wla-lk) { white-space: normal; overflow: visible; text-overflow: clip; display: inline; text-align: left; }
  html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r > div:nth-child(2) { display: block; }
  html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r > div:nth-child(6) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-lists :is(#wkpage, #pcpage, #hmpage, #ltlpage, main:has(#revsum)) :is(.snw-now, .sno-now, .snrc-now, .tk-now) { border: 0; border-radius: var(--r-ctl); box-shadow: inset 3px 0 0 var(--accent); padding-block: 3px; }
  html.look-lists :is(#wkpage, #pcpage, #hmpage, #ltlpage, main:has(#revsum)) :is(.snw-now, .sno-now, .snrc-now, .tk-now).late { box-shadow: inset 3px 0 0 var(--late); }
  html.look-lists :is(#wkpage, #pcpage, #hmpage, #ltlpage, main:has(#revsum)) :is(.snw-now, .sno-now, .snrc-now, .tk-now) :is(button, a.btnlink) { font-weight: var(--w-reg); }
}
@container (min-width: 1201px) { /* the reason gets the room: it wraps, the short columns do not */
  html.look-lists .snw[data-snr-screen="worklist"] :is(.snw-h, .snw-r) { grid-template-columns: 140px minmax(0, 1fr) 96px 190px 84px 100px 76px; }
  html.look-lists .snw[data-snr-screen="refs"] :is(.snw-h, .snw-r) { grid-template-columns: 164px minmax(0, 1fr) 104px 160px 100px 120px 140px; }
}
@media (min-width: 641px) {
  @container (max-width: 1200px) { /* the Orders list beside an open item: the patient and the action on line 1, the item (wrapping, never dots) on line 2, the status words under it */
    html.look-lists .wlc .snw[data-snr-screen="ordlist"] .snw-r > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    html.look-lists .wlc .snw[data-snr-screen="ordlist"] .snw-r > div:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  }
}
html.look-lists :is(.snw[data-snr-screen="worklist"], .snw[data-snr-screen="ordlist"], .snw[data-snr-screen="plist"], .snw[data-snr-screen="refs"], .snw[data-snr-screen="letters"]) .snw-r:is(.on, .open) .snw-p { font-weight: 600; } /* the selected row's name, the one bold name in a list of plain ones */
/* ───────── end of the denser lists ───────── */

/* Two-step sign-in (public/js/twostep.js, admin-twostep.js): set-up steps, the code box, backup codes, trusted computers */
.login.ts2 { max-width: 460px; }
.ts2 .ts2-steps { padding-left: 1.3em; margin: 0 0 12px; }
.ts2 .ts2-steps li { margin-bottom: 10px; }
.ts2-qr svg { width: 176px; height: 176px; display: block; margin-top: 8px; border-radius: var(--radius, 6px); }
.ts2 code, .ts2-person code, .set-sec .ts2-qr + details code { word-break: break-all; }
.ts2-code { font-size: 1.35em; letter-spacing: .12em; text-align: center; max-width: 12em; }
.ts2-codes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.ts2-codes li { padding: 4px 0; }
.ts2 .ts2links { margin: 8px 0 12px; }
.ts2 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ts2-trusted { list-style: none; margin: 0 0 10px; padding: 0; }
.ts2-trusted li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; }
.ts2-fs { border: 0; margin: 10px 0; padding: 0; }
.ts2-row { display: flex; justify-content: flex-start; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts2-master { margin-bottom: 6px; }
