/* The staff app, calm redesign (Isaac, Nov 15, 2026): white page, one quiet sidebar, black and gold used sparingly, and red
   "Urgent" the only status color in a list. Manrope 400, 500 and 600 for every word and number (tabular figures for times),
   Bricolage Grotesque 600 for the logo. No monospace and no all-caps anywhere. Both fonts self-hosted. Light is the default;
   dark maps the same roles. */
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(/fonts/manrope/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(/fonts/manrope/manrope-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(/fonts/manrope/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url(/fonts/bricolage/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); }
/* What words use until Manrope arrives: Arial (Liberation Sans has the same widths), sized to Manrope's widths and given its
   ascent and descent, so a late font does not rewrap text and move a card. Plain ASCII only: Manrope has all of it, so once
   it loads this is never drawn. The last bold source is for WebKit on Linux, which finds only family names here. */
@font-face { font-family: "Manrope Fallback"; font-weight: 400; unicode-range: U+20-7E; size-adjust: 103.5%; ascent-override: 103%; descent-override: 29%; line-gap-override: 0%; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"); }
@font-face { font-family: "Manrope Fallback"; font-weight: 500; unicode-range: U+20-7E; size-adjust: 103.7%; ascent-override: 102.8%; descent-override: 28.9%; line-gap-override: 0%; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"); }
@font-face { font-family: "Manrope Fallback"; font-weight: 600; unicode-range: U+20-7E; size-adjust: 98.9%; ascent-override: 107.8%; descent-override: 30.3%; line-gap-override: 0%; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Liberation Sans"); }

:root {
  /* Light (the default) */
  --bg: #FFFFFF; --panel: #FFFFFF; --raised: #F7F8F7; --line: #E4E6E5; --line2: #EEF0EF; --btn-line: #D5D8D6;
  --text: #16171A; --muted: #4B4E55; --faint: #6B6F76;
  /* --gold is the brand (#9C7A2B: the logo, the selected row's bar). Gold words in running text use a shade darker so they
     meet WCAG AA on white, the sidebar and the selected row (#85661F: 5.4, 4.9 and 4.8 to 1). */
  --gold: #9C7A2B; --gold-text: #85661F; --on-gold: #0B0C0D; --gold-soft: rgba(156, 122, 43, .12);
  --rail: #F4F5F4; --selected: #F7F3E8; --hover: #F7F8F7;
  --live-bg: #F2F7F3; --live-dot: #2E8B57; --live-link: #2E6B47;
  /* The schedule's one action hue: amber, for an unconfirmed request (Nov 15, 2026). */
  --amber: #A15C07; --amber-bg: #FDF4E3;
  /* One status color: red, for urgent. Every other old tone is the quiet text color on a neutral ground. */
  --red: #B42318; --red-bg: #FBEFEE;
  --blue: var(--muted); --blue-bg: var(--rail); --orange: var(--muted); --orange-bg: var(--rail); --green: var(--muted); --green-bg: var(--rail);
  --teal: var(--muted); --teal-bg: var(--rail); --violet: var(--muted); --violet-bg: var(--rail);
  --gray: var(--muted); --gray-bg: var(--rail);
  --shadow: 0 1px 2px rgba(22, 23, 26, .04), 0 8px 24px rgba(22, 23, 26, .07);
  --scrim: rgba(22, 23, 26, .32);
  --radius: 12px; --radius-btn: 10px; --radius-sm: 8px;
  --side-w: 232px; --top-h: 72px; --tabbar-h: 0px;
  --pad: 32px; --gap: 16px; --chair-min: 150px;
  /* Compact (desktop): rows 48 to 52 px, buttons 40 px. Comfortable (iPad): rows 60 to 64 px, buttons 44 px. */
  --row: 52px; --tap: 40px;
  /* Selection, hover and panel changes ease over 180 ms. All off under reduced motion. */
  --press: 120ms; --press-scale: .985; --speed: 180ms; --ease: cubic-bezier(.25, .1, .25, 1);
  --font: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Formerly the monospace face: now the same face with tabular figures, so times and counts still line up. */
  --mono: var(--font);
  --logo: "Bricolage Grotesque", var(--font);
  /* The safe area (notch, home bar) and the real visible height on tablets (100dvh where supported). */
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);
  --vh: 100vh;
  color-scheme: light;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
@media (max-width: 1279px) { :root { --chair-min: 128px; } }
:root[data-density="comfortable"] { --row: 64px; --tap: 44px; }
:root[data-density="compact"] { --row: 52px; --tap: 40px; }
:root[data-theme="dark"] {
  --bg: #121314; --panel: #121314; --raised: #1A1B1D; --line: #2A2C2F; --line2: #212326; --btn-line: #3A3D41;
  --text: #EDEEEF; --muted: #B4B7BD; --faint: #8E9299;
  --gold: #C9A24A; --gold-text: #C9A24A; --on-gold: #121314; --gold-soft: rgba(201, 162, 74, .14);
  --rail: #18191B; --selected: #221E15; --hover: #1A1B1D;
  --live-bg: #14201A; --live-dot: #4CB97A; --live-link: #7FCF9F;
  --amber: #E7A64A; --amber-bg: rgba(231, 166, 74, .14);
  --red: #F97066; --red-bg: rgba(249, 112, 102, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --scrim: rgba(0, 0, 0, .55);
  color-scheme: dark;
}
:root[data-motion="reduce"] { --speed: 0ms; --press: 0ms; --press-scale: 1; }
@media (prefers-reduced-motion: reduce) { :root { --speed: 0ms; --press: 0ms; --press-scale: 1; } }

* { box-sizing: border-box; }
/* An icon with no size of its own and no sizing rule where it sits stays text-sized (zero specificity: any rule wins). */
:where(svg[aria-hidden="true"]:not([width])) { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font: 15px/1.5 var(--font); color: var(--text); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
/* Times, phone numbers and counts: the same face, tabular figures, so columns line up. */
.mono, .timeh, .kpi b, .count, .chart-x, .when { font-family: var(--font); font-variant-numeric: tabular-nums; }
b, strong, th { font-weight: 600; }
.nowrap { white-space: nowrap; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-text); }
a:hover { color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.boot { display: grid; place-items: center; height: var(--vh); color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; border-radius: 4px; }

/* Layout */
.shell { display: grid; grid-template-columns: calc(var(--side-w) + var(--safe-l)) 1fr; height: var(--vh); }
.side { background: var(--rail); border-right: 1px solid var(--line2); display: flex; flex-direction: column; min-height: 0; padding-left: var(--safe-l); padding-top: var(--safe-t); }
.brand { min-height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 22px; }
.brand .mark { width: 26px; height: 26px; flex: none; display: block; }
.brand b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.brand .role { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--on-gold); background: var(--gold); border-radius: 6px; padding: 1px 6px; }
/* The product's wordmark (ui.js Mark, from brand.js): the name at the old brand size, the first word in gold. The rail shows
   the name only (Isaac, Nov 15, 2026); "Milo Health by YB Forge" is the footer under the sign-in card and in the emails. */
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.wordmark .wm-a { color: var(--gold-text); }
.by-vendor { font-size: 11px; line-height: 14px; color: var(--muted); }
.office { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 12px 6px; padding: 6px 10px; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--panel); }
.office .who { flex: 1; min-width: 0; }
.office svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.office b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office .who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.office.many:focus-within { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.nav { overflow-y: auto; padding: 2px 12px 12px; flex: 1; }
.nav button { width: 100%; min-height: calc(var(--tap) - 6px); display: flex; align-items: center; gap: 10px; padding: 2px 10px; border: 0; background: transparent; color: var(--muted); border-radius: var(--radius-sm); text-align: left; font-weight: 500; cursor: pointer; transition: background var(--speed) var(--ease), transform var(--press) var(--ease); }
.nav button:hover { background: var(--selected); color: var(--text); }
.nav button:active { transform: scale(var(--press-scale)); }
.nav button.on { background: var(--selected); color: var(--text); font-weight: 600; }
.nav button svg { width: 18px; height: 18px; flex: none; color: currentColor; }
.nav button.on svg { color: var(--gold-text); }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 500; min-width: 20px; text-align: center; padding: 0 7px; border-radius: 999px; background: var(--raised); color: var(--text); border: 1px solid var(--line); }
.nav .count.urgent { background: var(--red); color: var(--bg); }
.side-foot { border-top: 1px solid var(--line2); margin: 0 12px; padding: 12px 8px calc(12px + var(--safe-b)); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.side-foot .me { flex: 1; min-width: 0; }
.side-foot .me > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .strong { color: var(--text); }
.icon-btn.bare { border: 0; background: transparent; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--text); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { min-height: calc(var(--top-h) + var(--safe-t)); display: flex; align-items: center; gap: 12px; padding: var(--safe-t) calc(var(--pad) + var(--safe-r)) 0 var(--pad); border-bottom: 1px solid var(--line2); background: var(--bg); }
.page-title { margin: 0; flex: none; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; }
.page-banner { margin-bottom: var(--gap); }
/* Inbox, Live call and Get started carry their own title on their first row in the content. The others sit in the top bar. */
.content .page-title { font-size: 28px; white-space: normal; }
.pill { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.top .spacer { flex: 1; }
.search { position: relative; }
.search input { width: 260px; padding: 7px 12px 7px 32px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--panel); min-height: var(--tap); }
.top-search { flex: 1 1 280px; max-width: 520px; }
.top-search input { width: 100%; padding-right: 64px; }
.kbd-hint { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--panel); cursor: pointer; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: var(--shadow); z-index: 30; max-height: 360px; overflow: auto; animation: enter var(--speed) var(--ease); }
.search .results button { display: flex; gap: 8px; align-items: baseline; width: 100%; min-height: var(--tap); text-align: left; border: 0; background: none; padding: 8px 12px; cursor: pointer; }
.search .results button:hover { background: var(--selected); }
.sarah { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 20px; min-height: var(--tap); }
.sarah .pref { font-weight: 600; }
.sarah .run { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; display: inline-block; }
.dot.off { background: var(--faint); }
.dot.live { background: var(--teal); animation: pulse 1.6s ease-in-out infinite; }
.content { flex: 1; overflow: auto; padding: var(--pad) calc(var(--pad) + var(--safe-r)) calc(var(--pad) + var(--safe-b)) var(--pad); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.screen { animation: enter var(--speed) var(--ease); max-width: 1680px; }

/* Building blocks */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); border: 1px solid var(--line); background: var(--raised); border-radius: var(--radius-btn); padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform var(--press) var(--ease), background var(--speed) var(--ease), opacity var(--speed); }
a.btn { color: var(--text); text-decoration: none; }
.btn:hover { background: var(--selected); color: var(--text); }
.btn:active { transform: scale(var(--press-scale)); }
.btn[disabled] { opacity: 1; color: var(--muted); background: transparent; border: 1px dashed var(--line); cursor: not-allowed; transform: none; }
/* The one gold button on a screen is .gold. A primary button elsewhere is a strong neutral, and the main action in a dialog is gold. */
.btn.primary { background: var(--raised); border-color: var(--muted); color: var(--text); font-weight: 600; }
.btn.gold, .modal footer .btn.primary, .auth .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; padding: 7px 16px; }
.btn.gold:hover, .modal footer .btn.primary:hover, .auth .btn.primary:hover { background: var(--gold); filter: brightness(.95); }
.btn.gold[disabled], .modal footer .btn.primary[disabled], .auth .btn.primary[disabled] { background: transparent; border: 1px dashed var(--line); color: var(--muted); filter: none; }
.btn.quiet { background: transparent; color: var(--muted); }
.btn.primary:hover { background: var(--selected); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--selected); }
.btn.sm { padding: 4px 10px; font-size: 13px; min-height: calc(var(--tap) - 6px); border-radius: var(--radius-sm); }
.btn svg { width: 15px; height: 15px; }
.icon-btn { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; transition: transform var(--press) var(--ease), background var(--speed); }
.icon-btn:active { transform: scale(var(--press-scale)); }
.icon-btn svg { width: 17px; height: 17px; }

.card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); }
.card > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.card > header h2 { font-size: 16px; margin: 0; font-weight: 600; }
.card > header small { color: var(--muted); font-size: 13px; }
.card > header .spacer { flex: 1; }
.card .body { padding: 16px; }
.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
h3.section { font-size: 16px; margin: 4px 0 8px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
h3.section small { font-weight: 500; color: var(--muted); font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); }
/* One strip of figures: the number, then what it counts, aligned left, divided by hairlines (no separate cards). */
.kpi { padding: 12px 16px; cursor: default; border-left: 1px solid var(--line2); transition: background var(--speed); text-align: left; }
.kpi:first-child { border-left: 0; }
.kpi.click { cursor: pointer; }
.kpi.click:hover { background: var(--raised); }
.kpi b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.kpi span { font-size: 13px; color: var(--muted); }

.list { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line2); transition: background var(--speed); animation: enter var(--speed) var(--ease) backwards; }
.item:first-child { border-top: 0; }
.item.click { cursor: pointer; }
.item.click:hover { background: var(--raised); }
.item.sel { background: var(--selected); }
.item.urgent { background: transparent; }
.item .when { font-size: 13px; color: var(--muted); min-width: 64px; padding-top: 2px; }
.item .who { font-weight: 600; }
.item .who small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.item .why { margin-top: 1px; }
.item .said { margin-top: 4px; font-size: 14px; color: var(--muted); max-width: 70ch; white-space: pre-line; }
.item .acts { display: flex; gap: 6px; align-items: center; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.tag { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-right: 6px; vertical-align: 1px; background: var(--gray-bg); color: var(--gray); }
.tag.urgent, .tag.failed, .tag.missed_transfer, .tag.emergency, .tag.cancelled, .tag.no_show, .tag.suspended { background: var(--red-bg); color: var(--red); }
.tag.wait, .tag.requested, .tag.pending, .tag.not_sent, .tag.offered { background: var(--orange-bg); color: var(--orange); }
.tag.new { background: var(--blue-bg); color: var(--blue); }
.tag.ok, .tag.booked, .tag.confirmed, .tag.delivered, .tag.approved, .tag.completed, .tag.reviewed, .tag.transferred { background: var(--green-bg); color: var(--green); }
.tag.checked_in, .tag.live, .tag.received, .tag.message, .tag.info, .tag.demo { background: var(--blue-bg); color: var(--blue); }

table.t { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; height: 40px; border-bottom: 1px solid var(--line2); background: var(--panel); position: sticky; top: 0; }
table.t td { padding: 0 12px; height: var(--row); border-top: 1px solid var(--line2); font-size: 14px; }
table.t tr.click { cursor: pointer; transition: background var(--speed); }
table.t tr.click:hover td { background: var(--raised); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; min-height: 36px; padding: 0 14px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--speed), transform var(--press) var(--ease); }
.chip:active { transform: scale(var(--press-scale)); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, input.in, select.in { border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 8px 12px; background: var(--raised); width: 100%; min-height: var(--tap); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 0; border-color: var(--gold-text); }
.field .error, .inline-error { color: var(--red); font-size: 13px; font-weight: 600; }
.field textarea { min-height: 90px; resize: vertical; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); border: 0; cursor: pointer; transition: background var(--speed); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--speed) var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch.on { background: var(--gold); }
.switch.on::after { transform: translateX(16px); background: var(--on-gold); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--rail); }
.seg button { border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 0 12px; min-height: calc(var(--tap) - 8px); cursor: pointer; font-weight: 500; font-size: 14px; transition: background var(--speed); }
.seg button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.banner { padding: 10px 14px; border-radius: var(--radius-btn); background: var(--orange-bg); color: var(--text); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.banner.info { background: var(--raised); border: 1px dashed var(--line); color: var(--muted); }

/* Settings: a section list beside the form */
.settings { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.settings .toc { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.settings .toc button { text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; color: var(--muted); transition: background var(--speed), color var(--speed); }
.settings .toc button:hover { background: var(--selected); color: var(--text); }
.settings .card { scroll-margin-top: 12px; }
@media (max-width: 960px) { .settings { grid-template-columns: 1fr; } .settings .toc { position: static; flex-direction: row; flex-wrap: wrap; } }

/* Live call (design option 2) */
.live-panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; animation: enter var(--speed) var(--ease); }
.live-panel .call { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.live-panel .caller { font-size: 20px; font-weight: 600; }
.live-panel .caller small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.lines { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.line { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 14.5px; animation: enter var(--speed) var(--ease); }
.line .s { color: var(--faint); font-weight: 600; }
.line.by-sarah .s { color: var(--gold-text); }
.knows { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.kv span { display: block; color: var(--muted); font-size: 12.5px; }
.bar { height: 6px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); }

/* Schedule grid */
.sched { display: grid; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); overflow: auto; max-height: calc(var(--vh) - 300px - var(--safe-b)); position: relative; -webkit-overflow-scrolling: touch; }
.sched .colh { position: sticky; top: 0; z-index: 3; background: var(--raised); border-bottom: 1px solid var(--line); padding: 8px 10px; font-weight: 600; font-size: 13px; }
.sched .timeh { position: sticky; left: 0; z-index: 2; background: var(--panel); font-size: 12px; color: var(--muted); text-align: right; padding: 0 8px; border-right: 1px solid var(--line); }
.sched .cell { border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); cursor: pointer; transition: background var(--speed); }
.sched .cell:hover { background: var(--selected); }
.sched .cell.closed { background: repeating-linear-gradient(135deg, var(--gray-bg) 0 6px, transparent 6px 12px); cursor: not-allowed; }
.appt { position: absolute; border-radius: var(--radius-sm); padding: 4px 8px; font-size: 13px; line-height: 1.3; overflow: hidden; cursor: pointer; border: 1px solid transparent; background: color-mix(in srgb, currentColor 16%, var(--panel)); transition: transform var(--press) var(--ease); animation: enter var(--speed) var(--ease) backwards; }
.appt:hover { z-index: 5; }
.appt:active { transform: scale(var(--press-scale)); }
.appt b { display: block; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt span { color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 3); line-clamp: var(--lines, 3); overflow: hidden; }
.appt.tiny { padding-top: 1px; padding-bottom: 1px; }
.appt.tiny span { display: none; }
.appt.cancelled, .appt.no_show { opacity: .45; text-decoration: line-through; }
.appt.requested { background: var(--orange-bg); border: 1px dashed var(--orange); }
.blockbox.lunch { background: repeating-linear-gradient(135deg, var(--gray-bg) 0 6px, transparent 6px 12px); border: 1px solid var(--line2); color: var(--muted); border-radius: var(--radius-sm); }
.blockbox { position: absolute; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--red-bg), var(--red-bg) 6px, transparent 6px, transparent 12px); border: 1px dashed var(--red); font-size: 12px; color: var(--red); padding: 4px 6px; pointer-events: none; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(var(--vh) - var(--top-h) - 110px - var(--pad) * 2 - var(--safe-t) - var(--safe-b)); min-height: 420px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.inbox .threads { border-right: 1px solid var(--line); overflow: auto; }
.inbox .convo { display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line2); animation: pop var(--speed) var(--ease); }
.msg.out { align-self: flex-end; background: var(--selected); border-color: transparent; }
.msg small { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.composer textarea { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; resize: none; height: 44px; background: var(--panel); }
.composer select { flex: 1; min-width: 0; height: 44px; }
.composer .btn { flex: none; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); display: inline-block; }

/* Overlays */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; animation: fade var(--speed) var(--ease); }
.modal { position: fixed; z-index: 41; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(var(--vh) - 64px - var(--safe-t) - var(--safe-b)); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: modal var(--speed) var(--ease); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; }
.modal header h2 { margin: 0; font-size: 17px; flex: 1; }
.modal .body { padding: 16px 20px; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); padding: var(--safe-t) var(--safe-r) var(--safe-b) 0; background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide var(--speed) var(--ease); }
.drawer header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer header h2 { margin: 0; font-size: 18px; flex: 1; }
.drawer .body { padding: 16px 20px; overflow: auto; flex: 1; }
.quote { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 10px 12px; white-space: pre-wrap; font-size: 14px; }
/* Never more than two, off to the side of the work, and clicks go through them: a toast never covers a Save button. */
.toasts { position: fixed; bottom: calc(16px + var(--safe-b)); left: calc(var(--side-w) + var(--safe-l) + 24px); display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 820px) { .toasts { left: 16px; } }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-btn); font-size: 13px; box-shadow: var(--shadow); animation: toast var(--speed) var(--ease); }
.toast.bad { background: var(--red); color: var(--bg); }

/* Charts */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.chart .b { flex: 1; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.chart .b.after { background: var(--orange); }
.chart-x { display: flex; gap: 6px; font-size: 11px; color: var(--faint); }
.chart-x span { flex: 1; text-align: center; }
.hbar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; margin: 6px 0; font-size: 14px; }
.hbar .track { height: 10px; border-radius: 5px; background: var(--line2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--teal); border-radius: 5px; }

/* Sign-in */
/* Centered by the grid alone, from the first frame. The card only fades in. It must never use the "modal" animation:
   that one carries translate(-50%, -50%) for a dialog placed at top 50%, left 50%, and on this card it drew the card up and
   to the left by half its size until the animation ended, then it jumped to the center (Isaac, Nov 3, 2026). */
.auth { min-height: var(--vh); display: grid; place-items: center; padding: 24px; }
.auth .card { width: min(420px, 100%); padding: 28px; box-shadow: var(--shadow); animation: fade var(--speed) var(--ease); }
/* Nov 12, 2026: the footer under the card sits in the page's bottom padding, out of the grid, so the card stays centered. */
.auth { position: relative; }
.auth > .by-vendor { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
/* Terms and Privacy (request 0027): two quiet links beside the vendor line, and a plain reading page. */
.legal-links { display: flex; gap: 12px; font-size: 11px; line-height: 14px; }
.legal-links a { color: var(--muted); }
.auth > .legal-links { position: absolute; right: 16px; bottom: 6px; }
.legal { max-width: 68ch; margin: 0 auto; padding: 32px 16px 48px; }
.legal h1 { margin: 8px 0 4px; }
.legal section { margin-top: 20px; }
.legal section p { margin: 6px 0 0; line-height: 1.55; }
.legal-back { margin: 0; font-size: 13px; }
.legal-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); }
.auth .signup-slot { display: grid; }
.auth .signup-slot > * { grid-area: 1 / 1; min-width: 0; }
.auth .signup-slot > .off { visibility: hidden; }
.auth h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.qr { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; }
.qr img { display: block; width: 180px; height: 180px; image-rendering: pixelated; }
.code { font-family: var(--mono); letter-spacing: .08em; font-size: 14px; word-break: break-all; }

@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal { from { opacity: 0; transform: translate(-50%, -49%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes slide { from { transform: translateX(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* A week being replaced by the next one: it stays on screen and dims only if the new week is slow to arrive, so a
   quick answer never flickers. It snaps back the moment the new week is here. */
.stale { opacity: .55; transition: opacity 120ms ease 300ms; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; } }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }

@media (max-width: 1100px) { .cols-main, .cols-3 { grid-template-columns: 1fr; } .live-panel { grid-template-columns: 1fr; } .live-panel .call { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  /* The menu: a labelled panel over the page, opened by the Menu button (shell.js: Escape closes it, focus goes back). */
  .side { position: fixed; z-index: 45; inset: 0 auto 0 0; width: min(calc(var(--side-w) + var(--safe-l)), 86vw); transform: translateX(-100%); visibility: hidden; transition: transform var(--speed) var(--ease), visibility 0s linear var(--speed); }
  .side.open { transform: none; visibility: visible; box-shadow: var(--shadow); transition: transform var(--speed) var(--ease), visibility 0s; }
  .shell > .nav-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: var(--scrim); animation: fade var(--speed) var(--ease); }
  .cols-2 { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; }
}
.menu-btn { display: none; }
.nav-scrim { display: none; }
@media (max-width: 600px) { .top .sarah { display: none; } .top .pill { display: none; } .page-title { font-size: 22px; } :root { --pad: 14px; } }
@media (max-width: 820px) { .menu-btn { display: grid; } }

/* ---------- Schedule and staff handoff (work order verra-visual-20261029) ---------- */
/* The schedule is the main surface; the panel beside it holds the selected visit, request or task, else the handoff
   list. Tablets keep both side by side down to 960 px wide; narrower, the panel follows the schedule. */
.sched-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
@media (max-width: 1279px) { .sched-layout { grid-template-columns: minmax(0, 1fr) 312px; } }
@media (max-width: 959px) { .sched-layout { grid-template-columns: 1fr; } .ctx { position: static; max-height: none; } }
.ctx { position: sticky; top: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(var(--vh) - var(--top-h) - var(--pad) * 2 - var(--safe-t) - var(--safe-b)); display: flex; flex-direction: column; min-height: 0; }
.ctx > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.ctx > header h2 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.ctx .ctx-body { overflow: auto; padding: 4px 0; flex: 1; min-height: 0; }
.ctx .kvs { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; padding: 12px 14px; font-size: 14px; }
.ctx .kvs dt { color: var(--muted); }
.ctx .kvs dd { margin: 0; }
.ctx .acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
/* A handoff row: what it is, who it is for, who owns it, its state, and the next thing to do. */
.handoff { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 14px; border-top: 1px solid var(--line2); }
.handoff:first-child { border-top: 0; }
.handoff .what { font-weight: 600; }
.handoff .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); align-items: center; }
.handoff .owner[data-owner="none"] { color: var(--orange); font-weight: 600; }
.handoff .next { align-self: start; }
.handoff.sel { background: var(--selected); }
/* States that must never be confused: a confirmed booking, a saved unconfirmed request, a notification not sent,
   and a save that failed. Shape and words differ, not only color. */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.st.confirmed { background: var(--green-bg); color: var(--green); }
.st.confirmed::before { background: var(--green); }
.st.unconfirmed { background: var(--orange-bg); color: var(--orange); }
.st.unconfirmed::before { background: transparent; border: 1.5px dashed var(--orange); }
.st.notsent { background: var(--blue-bg); color: var(--blue); }
.st.notsent::before { background: transparent; border: 1.5px solid var(--blue); border-radius: 1px; }
.st.failed { background: var(--red-bg); color: var(--red); }
.st.failed::before { background: var(--red); border-radius: 1px; transform: rotate(45deg); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.appt.requested { background: var(--orange-bg); border: 1px dashed var(--orange); }
.appt.sel { box-shadow: 0 0 0 2px var(--gold-text); z-index: 6; }
.appt:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.move { border-top: 1px solid var(--line2); padding: 12px 14px; }
.move .grid { gap: 8px 10px; }
.sched-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sched-toolbar .title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; min-width: 0; }
@media (max-width: 959px) { .sched-toolbar .title { flex-basis: 100%; order: -1; } }
/* A button that reads as text (a task title, a patient's name). */
.linkish { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: currentColor; }
.linkish.small { font-size: 13px; color: var(--gold-text); font-weight: 600; }
/* Fingers: small buttons, chips and segments are full touch size too (after their own rules, so this wins). */
@media (pointer: coarse), (any-pointer: coarse) { .btn.sm, .chip, .seg button { min-height: var(--tap); } .chip { display: inline-flex; align-items: center; } }

/* ---------- Status chips: a fixed set with an icon and a word. Never gold. ---------- */
.schip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.schip svg { width: 12px; height: 12px; flex: none; }
.schip.blue { color: var(--blue); background: var(--blue-bg); }
.schip.violet { color: var(--violet); background: var(--violet-bg); }
.schip.orange { color: var(--orange); background: var(--orange-bg); }
.schip.teal { color: var(--teal); background: var(--teal-bg); }
.schip.green { color: var(--green); background: var(--green-bg); }
.schip.gray { color: var(--gray); background: var(--gray-bg); }
.schip.red { color: var(--red); background: var(--red-bg); }

/* ---------- Today ---------- */
.strip { display: flex; flex-wrap: wrap; align-items: center; padding: 0 calc(var(--pad) + var(--safe-r)) 0 var(--pad); min-height: 48px; border-bottom: 1px solid var(--line2); background: var(--panel); font-size: 13px; }
.strip .cell { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; white-space: nowrap; border-left: 1px solid var(--line); }
.strip .cell:first-child { padding-left: 0; border-left: 0; }
.strip b { font-weight: 600; }
.t-text { color: var(--text); } .t-red { color: var(--red); font-weight: 600; } .t-orange { color: var(--orange); font-weight: 600; } .t-teal { color: var(--teal); font-weight: 600; }
.health { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line2); border-radius: var(--radius-btn); background: var(--panel); }
.health .ico { display: inline-flex; flex: none; }
.health.green .ico { color: var(--green); } .health.red .ico { color: var(--red); } .health.orange .ico { color: var(--orange); }
.health .what { flex: 1 1 320px; min-width: 0; }
.health .work { flex: 0 1 auto; padding-left: 12px; border-left: 1px solid var(--line); color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.qdetail { padding: 20px; min-width: 0; }
.detail { display: flex; flex-direction: column; gap: 14px; }
.detail .top-row { align-items: flex-start; gap: 12px; }
.detail .grow { flex: 1; min-width: 0; }
.detail h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.detail .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail .avatar { width: 44px; height: 44px; font-size: 14px; }
.detail .assign select { width: auto; flex: 1; }
.claimed-pill { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-btn); background: var(--violet-bg); color: var(--violet); font-weight: 600; }
.fields { margin: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 12px; border-top: 1px solid var(--line2); padding-top: 14px; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; min-width: 0; }
.dash { color: var(--muted); }
.locked-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius-btn); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.locked-row svg { width: 16px; height: 16px; flex: none; }
.label { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--faint); }
.log { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line2); }
.log:last-child { border-bottom: 0; }
.log .mono { font-size: 12px; }
.detail .said { font-size: 13px; color: var(--muted); }
@media (max-width: 959px) { .strip .cell { border-left: 0; padding-left: 0; } }

/* ---------- Who holds a request, who else is looking ---------- */
.presence { display: flex; align-items: center; }
.peer { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; background: var(--violet-bg); color: var(--violet); box-shadow: 0 0 0 1px var(--violet); border: 2px solid var(--bg); font-size: 11px; font-weight: 600; }
.presence .peer + .peer { margin-left: -6px; }
.viewer { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; color: var(--violet); border: 1px solid var(--violet); }
.held { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--violet-bg); font-size: 13px; }
.held .grow { flex: 1 1 160px; min-width: 0; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px var(--pad); background: var(--violet-bg); border-bottom: 1px solid var(--line2); font-size: 13px; }

/* ---------- Inbox ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--rail); }
.tabs button { min-height: calc(var(--tap) - 4px); padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
.tabs button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.tabs .mono { font-size: 12px; }
.inbox3 { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr) minmax(250px, 1fr); gap: 16px; align-items: start; }
.pane { overflow: hidden; }
.pane h3.section { flex-wrap: wrap; margin: 0; padding: 14px; border-bottom: 1px solid var(--line2); }
.pane > div > .item:first-child { border-top: 0; }
.tlist { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; cursor: pointer; }
.tlist:hover { background: var(--raised); }
.tlist .clip { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card.pad { padding: 16px; }
.card.pad p { margin: 4px 0 0; }
.progress-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.progress-steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.progress-steps li span { height: 4px; border-radius: 999px; background: var(--line); }
.progress-steps li.on { font-weight: 600; }
.progress-steps li.blue { color: var(--blue); } .progress-steps li.blue span { background: var(--blue); }
.progress-steps li.violet { color: var(--violet); } .progress-steps li.violet span { background: var(--violet); }
.progress-steps li.teal { color: var(--teal); } .progress-steps li.teal span { background: var(--teal); }
.progress-steps li.green { color: var(--green); } .progress-steps li.green span { background: var(--green); }
.progress-steps li.gray { color: var(--gray); } .progress-steps li.gray span { background: var(--gray); }
.notes p { margin: 0 0 8px; }
.notes textarea { display: block; width: 100%; min-height: 64px; margin: 6px 0 8px; resize: none; color: var(--muted); }
@media (max-width: 1279px) { .inbox3 { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); } .inbox3 > aside { grid-column: 1 / -1; } }
@media (max-width: 899px) { .inbox3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Live call ---------- */
.h2 { margin: 0; font-size: 16px; font-weight: 600; }
.h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.live-screen { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-head .grow { flex: 1 1 280px; min-width: 0; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--teal-bg); color: var(--teal); font-weight: 600; font-size: 13px; }
.live-chip.ring { background: var(--red-bg); color: var(--red); }
.cardrow { display: grid; grid-template-columns: 22px 110px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; border-top: 1px solid var(--line2); }
.cardrow:first-child { border-top: 0; }
.tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.tick.on { background: var(--green-bg); color: var(--green); }
.tight { border-top: 0; padding-top: 0; margin-bottom: 10px; gap: 6px 10px; grid-template-columns: 96px minmax(0, 1fr); }
.statline { padding: 5px 0; border-top: 1px solid var(--line2); }
.card.pad .log { grid-template-columns: 62px minmax(0, 1fr); }
@media (max-width: 1279px) { .live-screen { grid-template-columns: minmax(0, 1fr) 260px; } }
@media (max-width: 899px) { .live-screen { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Schedule ---------- */
.open-slot { position: absolute; border: 1.5px dashed var(--gold); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 12px; color: var(--gold-text); pointer-events: none; overflow: hidden; }
.open-slot b { font-weight: 600; }
.colh .who { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-hint { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line2); }
.open-today { border-top: 1px solid var(--line2); padding: 12px 14px; }
.open-today .log { grid-template-columns: 76px minmax(0, 1fr); }

/* ---------- Patients ---------- */
.patients-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.title20 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
table.t tr.on td { background: var(--selected); }
table.t tr:first-child td { border-top: 0; }
.patient-side .btn { flex: 1 1 auto; }
@media (max-width: 1100px) { .patients-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Reports ---------- */
.grow { flex: 1 1 280px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); }
.tile.click { cursor: pointer; transition: transform var(--press) var(--ease); }
.tile.click:active { transform: scale(var(--press-scale)); }
.tile b { font-size: 34px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.tile b small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.src { font-size: 12px; color: var(--faint); margin: 0; }
.reports-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
.key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.key i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.key i.blue { background: var(--blue); } .key i.orange { background: var(--orange); }
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; align-items: end; height: 180px; margin-top: 14px; border-bottom: 1px solid var(--line2); }
.hours .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 1px; }
.hours i { display: block; min-height: 2px; }
.hours i:first-child { border-radius: 4px 4px 0 0; }
.hours i.in { background: var(--blue); } .hours i.after { background: var(--orange); }
.hours-x { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; margin: 6px 0 10px; font-size: 10px; color: var(--faint); text-align: center; }
.bar i.green { background: var(--green); } .bar i.teal { background: var(--teal); } .bar i.blue { background: var(--blue); } .bar i.gray { background: var(--gray); } .bar i.orange { background: var(--orange); }
.reports .bar { height: 8px; margin-top: 4px; }
@media (max-width: 1100px) { .reports-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Get started ---------- */
.setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.setup-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.step > header { border-bottom: 0; min-height: 56px; padding: 8px 16px; }
.step > header h2 { font-size: 14px; font-weight: 600; }
.step.current > header h2 { font-size: 17px; font-weight: 600; }
.step .grow { display: block; flex: 1; min-width: 0; }
.step .grow small { display: block; }
.step .body { border-top: 1px solid var(--line2); }
.step.current { border: 1px solid var(--gold); }
.num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 500; }
.num svg { width: 14px; height: 14px; }
.num.done { background: var(--green-bg); color: var(--green); border-color: transparent; }
.num.now { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.step fieldset { border: 0; margin: 0; padding: 0; }
.step legend { margin-bottom: 8px; padding: 0; }
.carriers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.carrier { min-height: 48px; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--panel); font-weight: 600; cursor: pointer; transition: transform var(--press) var(--ease); }
.carrier:active { transform: scale(var(--press-scale)); }
.carrier.on { border: 1.5px solid var(--gold); background: var(--gold-soft); }
.whenrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; margin-top: 4px; border-radius: var(--radius-btn); background: var(--raised); cursor: pointer; }
.whenrow input { width: 18px; height: 18px; accent-color: #D4AF37; flex: none; }
.forward { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line2); }
.forward .grow > * { display: block; }
.forward .big { font-size: 22px; }
.gate { display: flex; align-items: center; gap: 10px; font-size: 14px; }
@media (max-width: 1100px) { .setup-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Admin: offices ---------- */
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.otable { overflow-x: auto; }
.orow { display: grid; grid-template-columns: minmax(170px, 1.5fr) 110px 56px 80px 56px 62px 44px 66px 50px; gap: 10px; align-items: center; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--line2); cursor: pointer; font-size: 13px; transition: background var(--speed), transform var(--press) var(--ease); }
.orow:hover { background: var(--raised); }
.orow.on { background: var(--selected); }
.orow.ohead { min-height: 40px; border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); cursor: default; background: transparent; }
.office-name { display: flex; flex-direction: column; min-width: 0; }
.office-name > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofoot { padding: 10px 16px; border-top: 1px solid var(--line2); }
/* Sarah minutes this month, with "Over 1,500" under the number when the office is past what the plan includes. */
.omins { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.omins b { font-size: 12px; }
.chip[disabled] { color: var(--muted); border-style: dashed; cursor: not-allowed; }
@media (max-width: 1180px) { .admin-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Command menu ---------- */
.command { position: fixed; z-index: 41; top: 12vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; animation: fade var(--speed) var(--ease); }
.cmd-input { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line2); color: var(--muted); }
.cmd-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.command kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.cmd-rows { overflow: auto; padding: 8px; }
.cmd-group { padding: 6px 10px; font-size: 13px; font-weight: 500; color: var(--faint); }
.cmd-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 10px; border-radius: var(--radius-sm); cursor: pointer; }
.cmd-row .grow { flex: 1; min-width: 0; }
.cmd-row .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cmd-row.on { background: var(--selected); font-weight: 600; }
.cmd-note { padding: 10px; }

/* ---------- QA ---------- */
button.kpi { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: var(--radius-btn); font: inherit; }
button.kpi.on { background: var(--selected); }
table.t td.mono { white-space: nowrap; }
.patients-layout > div:first-child { overflow-x: auto; }
.gold-link { color: var(--gold-text); }
.strip .cell a { text-decoration: none; }
.strip .cell a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* ---------- The queue and the request panel ---------- */
.qrow { grid-template-columns: minmax(118px, 140px) minmax(0, 1.2fr) minmax(0, 1fr) 62px 76px 132px; }
.many-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--raised); font-size: 12px; font-weight: 500; color: var(--muted); vertical-align: 1px; }
.qrow .name { display: flex; align-items: center; min-width: 0; }
.detail .schip { height: 24px; }
.claimed-note { font-size: 12px; font-weight: 600; color: var(--violet); }
.fail-line { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--orange); }
.detail .acts { flex-wrap: wrap; }
.detail .acts > .btn, .detail .acts > a.btn, .detail .acts .more > .btn { min-height: 42px; white-space: nowrap; padding-inline: 12px; }
.more { position: relative; display: inline-flex; }
.more-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 190px; display: flex; flex-direction: column; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: var(--shadow); animation: fade var(--speed) var(--ease); }
.more-menu button { min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.more-menu button:hover, .more-menu button:focus-visible { background: var(--selected); }
.also-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.also-row:hover { background: var(--raised); }
.also-row .small { font-weight: 400; }
.tlist-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.tlist-head [data-row-time] { white-space: nowrap; line-height: 22px; }
.tlist .who { font-size: 14px; font-weight: 600; }
.tlist [data-owner="none"] { color: var(--muted); font-weight: 400; }
.tlist .small.muted { font-size: 13px; }
/* ---------- Live call ---------- */
.live-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-title .page-title { margin: 0; }
.live-head { align-items: flex-start; }
.live-who { margin: 6px 0 0; }
.live-title + .live-head .live-who { margin: 0; }
.act-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.act-col p { margin: 0; max-width: 220px; font-size: 12px; color: var(--muted); text-align: right; }
.locked-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px; box-sizing: border-box; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 13px; }
.locked-strip svg { width: 16px; height: 16px; flex: none; }
.locked-strip b { color: var(--text); font-weight: 600; }
/* ---------- Get started ---------- */
.btn.gold.waiting[disabled] { opacity: .45; color: var(--on-gold); background: var(--gold); border: 1px solid transparent; cursor: not-allowed; }
.says { display: flex; flex-direction: column; gap: 4px; }
.gate svg { flex: none; color: var(--muted); }
[data-locked-list] { border-top: 1px solid var(--line2); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
[data-locked-list] .label { margin: 0; }
.field select, select.in, .composer select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 36px 0 12px; background-color: var(--panel); border: 1px solid var(--line); border-radius: 10px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%, var(--muted) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(-45deg, transparent 50%, var(--muted) 50%, var(--muted) calc(50% + 1px), transparent calc(50% + 1px)); background-size: 6px 6px; background-position: right 18px center, right 12px center; background-repeat: no-repeat; }
.t-blue { color: var(--blue); }
/* ---------- Staff ---------- */
.role-word { font-size: 13px; font-weight: 400; color: var(--muted); }
.audit-list { max-height: 420px; overflow: auto; padding: 4px 16px 12px; }
.audit-day { margin: 12px 0 4px; }
.audit-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; font-size: 14px; }
.audit-row .mono { font-size: 13px; }
/* ---------- The rail ---------- */
.nav { -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); mask-image: linear-gradient(#000 calc(100% - 24px), transparent); padding-bottom: 24px; }
.nav h6 { margin: 10px 10px 4px; }
.nav button { min-height: max(40px, calc(var(--tap) - 6px)); }
@media (max-height: 899px) { .nav button { min-height: max(36px, calc(var(--tap) - 6px)); } }
.nav .count { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.nav .count.beside { margin-left: 8px; }
.nav button.on .count:not(.urgent) { padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--text); }
.nav .count.urgent { color: var(--red); font-weight: 600; background: transparent; }
.top-search .results [data-jump] { color: var(--muted); }
/* ---------- The head of the Inbox ---------- */
.inbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inbox-head .page-title { margin: 0 8px 0 0; }
.inbox-head select.in { width: auto; font-size: 13px; padding: 0 30px 0 10px; background-position: right 16px center, right 10px center; }
.inbox-head .tabs button { padding: 0 10px; }
.inbox-head .spacer { flex: 1; }
/* ---------- Today, small things ---------- */
.chip .mono { font: 500 13px/1 var(--mono); vertical-align: baseline; margin-left: 4px; color: var(--muted); opacity: 1; }
.chip.on .mono { color: var(--bg); }
.seg { gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: transparent; }
.seg button { border-radius: 0; color: var(--muted); }
.seg button.on { background: var(--raised); color: var(--text); font-weight: 600; box-shadow: none; }
.reason-cell { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.3; }
.qrow [data-owner], .qrow [data-due] + .muted { margin-left: 4px; }

/* ---------- One screen: nothing to scroll past (Isaac, Nov 3, 2026) ----------
   "I want everything to be in front of me when I click on it." From 960 px wide and 540 px tall, the page never scrolls:
   the shell stays put, a screen fills what is left, and a long list or form scrolls inside its own panel. Below that
   (a phone, an iPad held upright, a very short window) the page scrolls as it always did, so nothing is out of reach.
   tests/ui-fit-web.test.mjs holds this at 1205 x 700, 1440 x 900 and 1920 x 1080. */
.fit { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.set-off { display: none; }
.pane-tabs { display: none; }
.pane-note { margin: 0; padding: 10px 14px; }
.fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.fold > summary:hover { color: var(--text); }
.fold-body { margin-top: 6px; }
.sched-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.res-grid > div + div { margin-top: 16px; }
.settings .toc button.on { background: var(--selected); color: var(--text); font-weight: 600; }
.set-sections { min-width: 0; }
.set-save { padding: 12px 0; }
.my-settings { max-width: 1100px; }
.audit-rows { max-height: 420px; overflow: auto; }
.recall-note { align-items: flex-start; }
.recall-note .fold { display: inline-block; margin-left: 6px; }
@media (max-width: 820px) { .top { flex-wrap: wrap; padding-bottom: 8px; } .top .page-title { order: 5; flex-basis: 100%; } }

/* Shorter windows: the shell and the rows give back height. Fingers keep full touch sizes. */
@media (max-height: 1000px) and (pointer: fine) {
  .nav button { min-height: 30px; }
  .nav h6 { margin: 6px 10px 2px; }
}
@media (max-height: 820px) and (min-width: 960px) and (pointer: fine) {
  :root { --top-h: 52px; --pad: 14px; --gap: 10px; }
  :root, :root[data-density="compact"] { --row: 42px; --tap: 34px; }
  :root[data-density="comfortable"] { --row: 54px; --tap: 40px; }
  .brand { min-height: 44px; }
  .office { min-height: 40px; padding: 3px 10px; margin-bottom: 2px; }
  .office b { font-size: 13px; line-height: 1.25; }
  .office .who span { font-size: 11px; line-height: 1.25; }
  .nav { padding: 0 12px 2px; -webkit-mask-image: none; mask-image: none; }
  .nav h6 { margin: 4px 10px 0; font-size: 10px; line-height: 12px; }
  .nav button { min-height: 25px; padding: 0 10px; font-size: 13px; }
  .nav button svg { width: 16px; height: 16px; }
  .nav .count { font-size: 11px; line-height: 16px; }
  .side-foot { padding: 5px 8px calc(5px + var(--safe-b)); }
  .side-foot .avatar { width: 28px; height: 28px; font-size: 11px; }
  .page-title, .content .page-title { font-size: 20px; }
  .chip { min-height: 30px; padding: 0 12px; font-size: 13px; }
  .card > header { padding: 8px 14px; }
  .card .body { padding: 12px 14px; }
  .card.pad { padding: 12px 14px; }
  .field { margin-bottom: 8px; }
  .item { padding: 8px 14px; gap: 10px; }
  .banner { padding: 6px 12px; }
  .tabs button { min-height: 28px; padding: 0 12px; font-size: 13px; }
}

@media (min-width: 960px) and (min-height: 540px) {
  /* The frame. */
  .content { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
  .content > .page-banner, .content > .empty { flex: none; }
  .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: none; }
  .screen > * { flex: 1; min-height: 0; }
  .fit { flex: 1; min-height: 0; }
  .fit > * { flex: none; }
  .fit > .fit-body { flex: 1; min-height: 0; }
  .fit > .filters { margin: 0; }
  .pane-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; }
  .pane-scroll > * { flex: none; }
  .fit-cols { min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  .fit-cols > * { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .fit-cols > .stack > * { flex: none; }
  .fit-cols.cols-main { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
  .table-pane { overflow: auto; min-height: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); }
  .table-pane table.t { overflow: visible; border: 0; border-radius: 0; }
  .table-pane table.t th { z-index: 1; }

  /* The status strip stays one line. */
  .strip { flex-wrap: nowrap; min-height: 38px; font-size: 12.5px; }
  .strip .cell { padding: 3px 9px; }
  .strip .btn { min-height: 28px; padding: 2px 10px; font-size: 12.5px; }
  .tabs { align-self: flex-start; }
  .my-settings .seg button { padding: 0 8px; white-space: nowrap; }
  .live-layout .row { flex-wrap: wrap; }
  .table-pane td { white-space: nowrap; }
  .patient-search { flex: 1 1 200px; min-width: 180px; }

  /* Today */
  .today-head { margin-top: 0; flex-wrap: nowrap; gap: 8px; }
  .today-head .sub { flex: 1 1 auto; min-width: 0; font-size: 13px; }
  .health { flex-wrap: nowrap; padding: 5px 12px; }
  .health .what { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; flex: 1 1 auto; }
  .health .what > .muted > div { display: inline; }
  .health .what > .muted > div + div::before { content: " "; }
  .live-banner { flex-wrap: nowrap; white-space: nowrap; padding: 5px 14px; }
  .live-banner > span:not(.dot):not(.spacer) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .views { flex-wrap: wrap; gap: 6px; }
  .queue-layout { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .queue { display: flex; flex-direction: column; min-height: 0; }
  .queue > header { flex: none; flex-wrap: nowrap; }
  .queue > header h2 { flex: none; }
  .queue > header small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qtable, .qcards, .otable { flex: 1; min-height: 0; overflow: auto; }
  .qcards { align-content: start; }
  .qrow.qhead, .orow.ohead { min-height: 30px; position: sticky; top: 0; z-index: 1; background: var(--panel); }
  .qdetail { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px; }
  .detail { gap: 10px; }
  .fields { padding-top: 10px; gap: 6px 12px; }

  /* Inbox */
  .inbox3 { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) minmax(240px, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .inbox3 > * { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .inbox3 > aside > * { flex: none; }
  .inbox3 > .pane-tabs { overflow: visible; }
  .pane h3.section { padding: 8px 14px; position: sticky; top: 0; z-index: 1; background: var(--panel); }
  .inbox { height: auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .inbox .convo { min-height: 0; }

  /* Live call */
  .live-screen { grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .live-screen > * { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .live-screen > * > * { flex: none; }
  .live-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); }
  .cardrow { min-height: 32px; }

  /* Schedule: the same grid and panel, sized to the window. */
  .sched-layout { grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: var(--gap); }
  .sched-main { min-height: 0; overflow: auto; }
  .sched-main > * { flex: none; }
  .sched-main > .fit { flex: 1; min-height: 0; }
  .fit > .sched { flex: 1; min-height: 0; max-height: none; align-content: start; }
  .ctx { position: static; max-height: none; min-height: 0; height: 100%; }

  /* Appointments */
  .appt-days .kpi { padding: 5px 10px; }
  .appt-days .kpi span { font-size: 12px; }
  .appt-days .kpi b { font-size: 16px !important; }
  .appt-list h3.section { position: sticky; top: 0; z-index: 1; margin: 0; padding: 2px 0 6px; background: var(--bg); }

  /* Patients */
  .patients-layout { grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .patient-side { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .patient-side > * { flex: none; }

  /* Reports */
  .tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
  .tile { padding: 10px 12px; gap: 2px; }
  .tile b { font-size: 24px; }
  .reports-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours { height: clamp(120px, 34vh, 300px); }

  /* Settings: one section at a time, the section list beside it, and Save always there. */
  .settings { grid-template-columns: 170px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .settings .toc { position: static; flex-direction: column; flex-wrap: nowrap; overflow: auto; }
  .settings-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .set-sections { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .set-sections > * { flex: none; }
  .set-save { flex: none; padding: 8px 0 0; }
  .res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
  .res-grid > div + div { margin-top: 0; }
  .fit-cols.my-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .audit-rows, .audit-list { max-height: none; overflow: visible; }

  /* Get started */
  .setup-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .setup-layout > * { min-height: 0; }
  .setup-steps > * { flex: none; }
  .setup-steps > .steps { flex: 1; min-height: 0; }
  .setup-side { overflow: auto; overscroll-behavior: contain; }
  .setup-side > * { flex: none; }

  /* Admin */
  .admin-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
  .admin-layout > aside { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .admin-layout > aside > * { flex: none; }
}
/* Polish's 40 px rail needs a window about 1120 px tall. Below that, with a mouse, it gives back enough that nothing scrolls. */
@media (min-height: 1001px) and (max-height: 1120px) and (pointer: fine) { .nav button { min-height: 34px; } }
/* Polish's plain-word status strip is longer than the one ui-fit measured. Up to 1535 px wide it tightens, and wraps rather than widens the page. */
@media (min-width: 1280px) and (max-width: 1535px) and (min-height: 540px) {
  .strip { flex-wrap: wrap; font-size: 12px; }
  .strip .cell { padding: 3px 7px; gap: 4px; }
  .strip .btn { padding: 2px 8px; font-size: 12px; }
}
/* Narrower laptop windows: the queue drops its Via column (the panel says it), and a request and its patient share the
   right side, one click apart. */
@media (min-width: 960px) and (max-width: 1279px) and (min-height: 540px) {
  .queue-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .qrow { grid-template-columns: minmax(92px, 104px) minmax(0, 1.2fr) minmax(0, 1fr) 62px 112px; gap: 8px; padding: 0 12px; }
  .qrow > :nth-child(4) { display: none; }
  .inbox3 { grid-template-columns: minmax(240px, 1fr) minmax(0, 1.8fr); grid-template-rows: auto minmax(0, 1fr); }
  .inbox3 > .pane { grid-row: 1 / 3; }
  .inbox3 > .pane-tabs { display: block; grid-column: 2; grid-row: 1; }
  .inbox3 > .qdetail, .inbox3 > aside { grid-column: 2; grid-row: 2; }
  .inbox3[data-side="request"] > aside { display: none; }
  .inbox3[data-side="patient"] > .qdetail { display: none; }
  .strip { flex-wrap: wrap; font-size: 12px; padding-left: var(--pad); padding-right: var(--pad); }
  .strip .cell { padding: 3px 7px; gap: 4px; }
  .strip .btn { padding: 2px 8px; font-size: 12px; }
  .patients-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .patients-layout table.t .avatar { display: none; }
  .patients-layout table.t td, .patients-layout table.t th { padding-left: 8px; padding-right: 8px; }
  .live-screen { grid-template-columns: minmax(0, 1fr) 240px; }
  .orow { grid-template-columns: minmax(120px, 1fr) 84px 42px 74px 36px 50px 30px 56px 42px; gap: 6px; padding: 0 10px; }
}

/* ======================================================================================================================
   Calm layer (LAUNCH-9, Isaac, Nov 15, 2026: "an Apple feel"). Last in the file, so it wins over the older rules above.
   The board: design-app-calm/today-desktop.html and today-phone.html. White page, a quiet sidebar, plain words, one status
   color (red "Urgent"), no badges or chips in lists, 150 to 200 ms ease on selection, hover and panel changes.
   ====================================================================================================================== */
html, body { background: var(--bg); }
.page-title { font-weight: 600; }
.content .page-title { font-size: 24px; letter-spacing: -.02em; }
a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; transition: color var(--speed) var(--ease); }
a:hover { color: var(--gold-text); }
.quiet, .faint { color: var(--faint); }
.muted { color: var(--muted); }
.d-label { display: block; font-size: 13px; color: var(--faint); }

/* The sidebar: logo, six places, the office and its hours. */
.side { background: var(--rail); border-right: 1px solid var(--line); padding: calc(20px + var(--safe-t)) 14px 0 calc(14px + var(--safe-l)); }
.side .brand { min-height: 0; padding: 4px 10px 22px; }
.wordmark { display: inline-flex; align-items: baseline; font-family: var(--logo); font-weight: 600; font-size: 19px; letter-spacing: -.025em; white-space: nowrap; }
.wordmark .wm-a { color: #5E6672; display: inline-flex; align-items: baseline; }
:root[data-theme="dark"] .wordmark .wm-a { color: #A3AAB4; }
.wordmark .wm-b { color: var(--gold); } /* large semibold type: 3.7 to 1 on the sidebar meets AA for large text */
.wordmark .wm-ring { width: .68em; height: .68em; margin: 0 1px; align-self: center; position: relative; top: .06em; }
.brand .role { font-size: 13px; font-weight: 500; color: var(--faint); background: none; padding: 0; }
.nav { padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav button { min-height: 38px; padding: 9px 10px; gap: 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: 15px; font-weight: 500; transition: background var(--speed) var(--ease), color var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.nav button svg { width: 16px; height: 16px; color: currentColor; }
.nav button:hover { background: var(--hover); color: var(--text); }
.nav button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.nav button.on svg { color: var(--text); }
.nav button[disabled] { opacity: .45; cursor: not-allowed; }
.nav .count { margin-left: auto; font: 500 15px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--faint); background: none; border: 0; padding: 0; min-width: 0; }
.nav button.on .count, .nav button.on .count:not(.urgent) { color: var(--faint); background: none; border: 0; padding: 0; border-radius: 0; }
.nav .dot.live { margin-left: auto; }
.more-list { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px 26px; overflow: hidden; animation: enter var(--speed) var(--ease); }
.more-list[hidden] { display: none; }
.more-list button { min-height: 32px; padding: 6px 10px; font-size: 14px; }
.side-foot { margin: auto 0 0; padding: 12px 10px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); }
.side-foot .office { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.side-foot .office b { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .office span { font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .office select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.side-foot .icon-btn { width: 32px; height: 32px; color: var(--faint); }
.side-foot .icon-btn:hover { color: var(--text); background: var(--hover); }
.nav { flex: 1; overflow-y: auto; }

/* The header: the title (and on Today the date under it), the patient search on the right. The page starts right under it. */
.content { padding-top: 0; }
.top { min-height: 0; padding: calc(22px + var(--safe-t)) calc(var(--pad) + var(--safe-r)) 18px var(--pad); border-bottom: 0; background: var(--bg); gap: 16px; }
.title-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.top .page-title { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.page-date { color: var(--faint); font-size: 15px; }
.quiet-note { font-size: 13px; color: var(--faint); white-space: nowrap; }
.search input { border: 0; background: var(--rail); border-radius: var(--radius-btn); min-height: 38px; height: 38px; padding: 0 12px 0 34px; transition: box-shadow var(--speed) var(--ease); }
.search input:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--gold-soft), 0 0 0 1px var(--gold-text); }
.top-search { flex: 0 1 300px; min-width: 260px; max-width: 360px; }
.top-search input { padding-right: 48px; }
.search svg { color: var(--faint); width: 15px; height: 15px; left: 12px; }
.kbd-hint { border: 0; background: none; color: var(--faint); font: 500 12px/1 var(--font); }
.icon-btn { border: 0; background: transparent; color: var(--faint); transition: background var(--speed) var(--ease), color var(--speed) var(--ease); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.presence .peer { background: var(--rail); color: var(--muted); box-shadow: 0 0 0 1px var(--line); font-weight: 600; }
.peer { background: var(--rail); color: var(--muted); box-shadow: 0 0 0 1px var(--line); font-weight: 600; }
.notice { background: var(--rail); border-bottom: 1px solid var(--line2); }
.demo-line { padding: 7px var(--pad); padding-top: calc(7px + var(--safe-t)); font-size: 13px; color: var(--muted); background: var(--rail); border-bottom: 1px solid var(--line2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-line a { color: var(--text); font-weight: 600; }
.demo-line + .top { padding-top: 22px; }

/* Buttons: one dark main action, quiet outlined secondaries, gold only for the brand and the selected row's bar. */
.btn { min-height: 44px; border: 0; border-radius: var(--radius-btn); padding: 0 16px; background: var(--panel); color: var(--text); font-weight: 500; font-size: 15px; box-shadow: inset 0 0 0 1px var(--btn-line); transition: background var(--speed) var(--ease), box-shadow var(--speed) var(--ease), transform var(--press) var(--ease), opacity var(--speed); }
.btn:hover { background: var(--hover); color: var(--text); }
.btn.primary, .btn.gold, .modal footer .btn.primary, .auth .btn.primary { background: var(--text); color: var(--bg); box-shadow: none; font-weight: 600; border: 0; padding: 0 18px; filter: none; }
.btn.primary:hover, .btn.gold:hover, .modal footer .btn.primary:hover, .auth .btn.primary:hover { background: var(--text); filter: none; opacity: .88; }
.btn[disabled], .btn.gold[disabled], .modal footer .btn.primary[disabled], .auth .btn.primary[disabled] { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); border: 0; opacity: 1; }
.btn.ghost, .btn.quiet { box-shadow: none; background: transparent; }
.btn.ghost:hover, .btn.quiet:hover { background: var(--hover); }
.btn.danger { box-shadow: inset 0 0 0 1px var(--red); color: var(--red); background: transparent; border: 0; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
a.btn.primary { color: var(--bg); }
.btn.gold.waiting[disabled], .btn.primary.waiting[disabled] { opacity: .45; background: var(--text); color: var(--bg); box-shadow: none; border: 0; cursor: not-allowed; }
.more > .btn svg { width: 14px; height: 14px; color: var(--faint); }

/* Status words, never pills: plain quiet text. Red "Urgent" is the one color. Shapes stay where states must not be confused. */
.schip { height: auto; padding: 0; background: none !important; border-radius: 0; font-size: 13px; font-weight: 500; color: var(--faint) !important; }
.schip svg { display: none; }
.schip.red { color: var(--red) !important; }
.tag { background: none; padding: 0; border-radius: 0; font-size: 13px; font-weight: 500; color: var(--faint); margin-right: 8px; }
.tag.urgent, .tag.emergency { color: var(--red); background: none; }
.tag.failed, .tag.missed_transfer, .tag.cancelled, .tag.no_show, .tag.suspended, .tag.wait, .tag.requested, .tag.pending, .tag.not_sent, .tag.offered, .tag.new, .tag.ok, .tag.booked, .tag.confirmed, .tag.delivered, .tag.approved, .tag.completed, .tag.reviewed, .tag.transferred, .tag.checked_in, .tag.live, .tag.received, .tag.message, .tag.info, .tag.demo { background: none; color: var(--faint); }
.st { background: none !important; color: var(--faint) !important; padding: 0; font-weight: 500; font-size: 13px; }
.st::before { background: var(--faint) !important; border-color: var(--faint) !important; }
.st.unconfirmed::before, .st.notsent::before { background: transparent !important; }
.st.failed { color: var(--red) !important; }
.st.failed::before { background: var(--red) !important; }
.t-red { color: var(--red); font-weight: 600; } .t-orange { color: var(--orange); font-weight: 600; } .t-teal { color: var(--teal); font-weight: 600; } .t-blue { color: var(--blue); font-weight: 600; }
.urgent-word { color: var(--red); font-weight: 500; font-size: 13px; }
.count-tag, .many-chip { background: none; padding: 0; color: var(--faint); font-weight: 500; }

/* Chips that remain (Inbox views, schedule filters): flat, quiet, the selected one dark. */
.chip { min-height: 34px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--panel); color: var(--muted); font-weight: 500; transition: background var(--speed) var(--ease), color var(--speed) var(--ease); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip .n { font-variant-numeric: tabular-nums; opacity: .7; margin-left: 2px; }

/* Panels: hairlines, not boxes. */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.card > header { border-bottom: 1px solid var(--line2); }
.card > header h2, h3.section, .h2, .h3, .title20, .ctx > header h2 { font-weight: 600; }
.list, table.t, .kpis, .sched, .ctx { border-color: var(--line); }
table.t th { font-size: 13px; font-weight: 500; color: var(--faint); }
.item, table.t td { border-top-color: var(--line2); }
.item.click:hover, table.t tr.click:hover td, .tlist:hover { background: var(--hover); }
.item.sel, .handoff.sel, .tlist.sel { background: var(--selected); box-shadow: inset 3px 0 0 var(--gold); }
.banner { background: var(--rail); color: var(--text); border: 0; }
.banner.info { background: var(--rail); border: 0; color: var(--muted); }
.locked-row { border: 0; padding: 0; font-size: 13px; color: var(--faint); margin: 0; }
.tabs { background: var(--rail); }
.tabs .mono { font-size: 13px; color: var(--faint); }
.switch.on { background: var(--text); }
.switch.on::after { background: var(--bg); }
.held { background: var(--rail); border-radius: var(--radius-btn); }
.viewer { border: 0; padding: 0; height: auto; color: var(--faint); font-size: 14px; }
.claimed-note { color: var(--faint); font-weight: 500; }
.claimed-pill { background: var(--rail); color: var(--muted); }
.fail-line { color: var(--red); font-weight: 500; font-size: 14px; margin: 0; }
.health { border: 0; background: var(--red-bg); border-radius: var(--radius); }
.health .work { border-left-color: var(--line); }
.strip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; }
.strip .cell { border-left-color: var(--line2); }
.dot { background: var(--live-dot); }
.dot.off { background: var(--faint); }
.dot.live { background: var(--live-dot); }
.live-chip { background: var(--live-bg); color: var(--live-link); }
.bar i, .hbar .track i, .chart .b { background: var(--muted); }
.chart .b.after { background: var(--faint); }
.progress-steps li, .progress-steps li.on { color: var(--faint); }
.progress-steps li.on { color: var(--text); font-weight: 500; }
.progress-steps li.on span { background: var(--text) !important; }
.progress-steps li.blue, .progress-steps li.violet, .progress-steps li.teal, .progress-steps li.green, .progress-steps li.gray { color: var(--text); }
.appt { color: var(--text); background: var(--raised); border: 1px solid var(--line); }
.appt b { color: var(--text); }
.appt span { color: var(--muted); }
.appt.requested { background: var(--amber-bg); border: 1px dashed var(--amber); }
.appt.requested span { color: var(--amber); }
.appt.completed { background: transparent; border-color: var(--line2); }
.appt.completed b, .appt.completed span { color: var(--faint); }
.blockbox { background: repeating-linear-gradient(135deg, var(--rail), var(--rail) 6px, transparent 6px, transparent 12px); border-color: var(--line); color: var(--muted); }
.handoff .owner[data-owner="none"] { color: var(--text); font-weight: 600; }
.unread-dot { background: var(--text); }
.toast { border-radius: var(--radius-btn); }
.toast.bad { background: var(--red); }
.fields { border-top: 1px solid var(--line2); }
.fields dt { color: var(--faint); }

/* Today: the live strip, then Call back and the selected person side by side, edge to edge. */
.today { display: flex; flex-direction: column; min-width: 0; }
.today > .health { margin-bottom: 14px; }
.live-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; border-radius: 12px; background: var(--live-bg); color: var(--text); text-decoration: none; transition: background var(--speed) var(--ease); animation: enter var(--speed) var(--ease); }
.live-strip:hover { color: var(--text); filter: brightness(.99); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live-dot); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.live-strip b { font-weight: 600; }
.live-strip .live-why { color: var(--muted); }
.live-strip .live-time { color: var(--faint); font-variant-numeric: tabular-nums; }
.live-strip .live-link { margin-left: auto; font-weight: 600; color: var(--live-link); }
.live-strip:hover .live-link { text-decoration: underline; }
.panes { display: flex; flex-wrap: wrap; margin: 22px calc(-1 * var(--pad)) calc(-1 * var(--pad)); border-top: 1px solid var(--line); min-height: 0; }
.today > .panes:first-child { margin-top: 0; }
.cb-list { flex: 1 1 420px; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.cb-detail { flex: 1 1 380px; min-width: 0; padding: 22px var(--pad); }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px var(--pad) 10px; }
.pane-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cb-row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px var(--pad) 14px calc(var(--pad) - 3px); border-left: 3px solid transparent; border-top: 1px solid var(--line2); cursor: pointer; transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.pane-head + .cb-row { border-top: 0; }
.cb-row:hover { background: var(--hover); }
.cb-row.on, .cb-row.urgent { background: var(--selected); border-left-color: var(--gold); }
.cb-row.on + .cb-row, .cb-row.urgent + .cb-row { border-top-color: transparent; }
.cb-row:focus-visible { outline: 2px solid var(--gold-text); outline-offset: -2px; }
.cb-row:active { transform: none; }
.cb-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-name .urgent-word { margin-left: 6px; }
.cb-time { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-owner { color: var(--muted); font-size: 14px; white-space: nowrap; text-align: right; }
.cb-owner.none { color: var(--faint); }
.act-help { margin: -10px 0 0; font-size: 13px; color: var(--faint); }
.cb-why { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-empty { margin: 0; padding: 18px var(--pad); color: var(--faint); }
.done-line { margin: 0; padding: 18px var(--pad); color: var(--faint); font-size: 14px; border-top: 1px solid var(--line2); }
.cb-detail > .back { display: none; }

/* The request panel (Today and Inbox). */
.detail { display: flex; flex-direction: column; gap: 20px; animation: enter var(--speed) var(--ease); }
.detail .d-head { display: flex; flex-direction: column; gap: 4px; }
.detail h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail h2 .schip { font-size: 14px; }
.d-context { margin: 0; color: var(--muted); }
.d-state { white-space: nowrap; }
.d-state .schip { font-size: 15px; color: var(--faint) !important; }
.d-state { margin-left: 4px; }
.detail .acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.detail .acts > .btn, .detail .acts > a.btn, .detail .acts .more > .btn { min-height: 44px; padding-inline: 16px; }
.detail .acts > a.btn.call { padding-inline: 18px; }
.told-box { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 12px; background: var(--raised); }
.told { display: flex; flex-direction: column; gap: 6px; }
.told-box p, .told p { margin: 0; line-height: 1.55; }
.also-row { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 0; border-top: 1px solid var(--line2); cursor: pointer; }
.also-row:hover { color: var(--gold-text); }
.activity { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line2); padding-top: 16px; }
.activity .log { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding: 0; border: 0; font-size: 14px; }
.log-time { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail [data-call-summary], .detail [data-insurance-card] { border: 0; background: var(--raised); }
.qdetail { border: 1px solid var(--line); box-shadow: none; }

/* Fit to the window (from 960 x 540): the two panes scroll on their own. */
@media (min-width: 960px) and (min-height: 540px) {
  .today { flex: 1; min-height: 0; }
  .today > * { flex: none; }
  .today > .panes { flex: 1; min-height: 0; flex-wrap: nowrap; }
  .cb-list, .cb-detail { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .done-line { margin-top: 0; }
}
@media (max-height: 820px) and (min-width: 960px) and (pointer: fine) {
  .top { padding-top: calc(12px + var(--safe-t)); padding-bottom: 10px; }
  .side { padding-top: calc(14px + var(--safe-t)); }
  .side .brand { padding-bottom: 14px; }
  .nav button { min-height: 32px; padding: 6px 10px; }
  .panes { margin-top: 14px; }
  .cb-row { padding-top: 10px; padding-bottom: 10px; }
  .detail { gap: 14px; }
}

/* The phone (under 600 px): one column, the tab bar at the bottom, a tapped row opens full screen with a way back. */
.tabbar { display: none; }
@media (pointer: coarse), (any-pointer: coarse) { .btn.sm, .chip, .more-list button, .nav button { min-height: var(--tap); } }
@media (max-width: 599px) {
  :root { --pad: 20px; --tabbar-h: calc(58px + var(--safe-b)); }
  .top { padding: calc(14px + var(--safe-t)) 20px 10px; flex-wrap: nowrap; }
  .top .title-block { order: 0; flex: 1 1 auto; flex-direction: column-reverse; }
  .top .page-title { font-size: 30px; order: 0; flex-basis: auto; }
  .page-date { font-size: 14px; }
  .top .menu-btn { order: 2; }
  .top .top-search, .top .quiet-note, .top .presence { display: none; }
  .top [data-theme-button] { order: 1; }
  .content { padding: 0 20px calc(20px + var(--tabbar-h)); }
  .demo-line { padding-left: 20px; padding-right: 20px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 8px 6px calc(8px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); font-size: 12px; text-align: center; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; text-decoration: none; color: var(--faint); transition: color var(--speed) var(--ease); }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a.on { color: var(--text); font-weight: 600; }
  .toasts { bottom: calc(16px + var(--tabbar-h)); }
  .live-strip { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; }
  .live-strip b { display: flex; align-items: center; gap: 8px; }
  .live-strip .live-dot { display: none; }
  .live-strip b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live-dot); flex: none; }
  .live-strip .live-why { font-size: 14px; }
  .live-strip .live-time, .live-strip .live-link { display: none; }
  .panes { margin: 22px -20px 0; border-top: 0; }
  .cb-list { flex-basis: 100%; border-right: 0; }
  .pane-head { padding: 0 20px 8px; }
  .pane-head h2 { font-size: 17px; }
  .pane-head .quiet { font-size: 14px; }
  .cb-row { padding: 14px 20px 14px 17px; gap: 2px 12px; }
  .cb-time, .cb-why { font-size: 14px; }
  .cb-row.on:not(.urgent) { background: transparent; border-left-color: transparent; }
  .done-line { padding: 18px 20px; }
  .cb-detail { display: none; flex-basis: 100%; padding: 0 20px 24px; }
  .today[data-open="true"] .cb-list, .today[data-open="true"] > .live-strip, .today[data-open="true"] > .health { display: none; }
  .today[data-open="true"] .cb-detail { display: block; animation: slide var(--speed) var(--ease); }
  .today[data-open="true"] .panes { margin-top: 0; }
  .cb-detail > .back { all: unset; display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -4px; padding: 6px 4px; color: var(--text); font-weight: 600; cursor: pointer; }
  .cb-detail > .back svg { width: 18px; height: 18px; }
  .detail .acts > a.btn.call, .detail .acts > .btn { flex: 1 1 auto; }
  .detail .acts > a.btn.call { flex-basis: 100%; min-height: 52px; font-size: 17px; }
}
@media (max-width: 599px) and (max-width: 820px) { .top .page-title { order: 0; flex-basis: auto; } }
/* Reports: the answer first, then one table, then one chart. */
.report-answer { margin: 0; font-size: 18px; line-height: 1.5; max-width: 70ch; }
.report-table td:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 600; }
.hours i.in { background: var(--muted); } .hours i.after { background: var(--faint); opacity: .45; }
.reports .hours { height: clamp(110px, 24vh, 200px); }
/* The office status line inside Get started and Settings: one quiet line, a little space under it. */
.settings-main > .strip, .setup-steps > .strip { margin-bottom: 12px; flex: none; }
