/* Cima: the Chart Reader's look (same tokens, radii, shadows and type scale), so Altura's two apps read as one family.
   A light sidebar, white cards on a soft page, one blue for actions, status as a soft pill with a dot, sentence-case
   labels, no hard-coded colors outside the tokens (dark mode swaps them). */
:root {
  --bg: #f5f7fa; --surface: #fff; --surface-2: #f8fafc; --surface-3: #f1f5f9;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e5e9f0; --line-2: #d3dae4;
  --primary: #2563eb; --primary-2: #1d4ed8; --primary-bg: #eff6ff; --primary-line: #bfdbfe; --on-primary: #fff;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --warn-line: #fcd34d; --bad: #b91c1c; --bad-bg: #fee2e2; --bad-line: #fecaca;
  --info: #0369a1; --info-bg: #e0f2fe;
  --mark: linear-gradient(135deg, #4338ca 0%, #2563eb 50%, #0ea5e9 100%);
  --sh-1: 0 1px 2px rgba(15,23,42,.05); --sh-2: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06); --sh-3: 0 16px 48px rgba(15,23,42,.18), 0 2px 8px rgba(15,23,42,.08);
  --ring: 0 0 0 3px rgba(37,99,235,.28); --scrim: rgba(15,23,42,.42);
  --r: 10px; --rc: 14px; --font: "Inter var", InterVariable, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* older names some screens still use */
  --nav: var(--ink); --card: var(--surface);
  font-size: 14px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111827; --surface-2: #0f172a; --surface-3: #1e293b;
  --ink: #e5e7eb; --ink-2: #cbd5e1; --muted: #94a3b8; --line: #1f2937; --line-2: #334155;
  --primary: #60a5fa; --primary-2: #93c5fd; --primary-bg: #172554; --primary-line: #1e3a8a; --on-primary: #fff;
  --ok: #4ade80; --ok-bg: #052e16; --warn: #fbbf24; --warn-bg: #3a2a05; --warn-line: #78350f; --bad: #f87171; --bad-bg: #3b0d0d; --bad-line: #7f1d1d;
  --info: #7dd3fc; --info-bg: #082f49;
  --sh-1: 0 1px 2px rgba(0,0,0,.45); --sh-2: 0 1px 2px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.3); --sh-3: 0 16px 48px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.4);
  --ring: 0 0 0 3px rgba(96,165,250,.38); --scrim: rgba(0,0,0,.58); color-scheme: dark;
}
/* Chart colors (charts.js), each set validated with the dataviz skill's checker against these surfaces (#fff, #111827).
   --series-1…8: categorical, for identity, assigned in this order and never cycled (8 is the ceiling; then "Other").
   --viz-good/warn/bad: status, only when a mark means on time / late / overdue, always with an icon and a word.
   --seq-1…4: an ordinal ramp (one hue, light to dark; flipped in dark mode) for ordered buckets like AR age.
   --viz-other: the folded tail. Dark mode has its own steps of the same hues, not an automatic flip. */
:root {
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --viz-good: #0a8a0a; --viz-warn: #e5a50a; --viz-bad: #d03b3b; --viz-other: #898781;
  --seq-1: #86b6ef; --seq-2: #3987e5; --seq-3: #1c5cab; --seq-4: #0d366b;
}
:root[data-theme="dark"] {
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --viz-good: #0a7a0a; --viz-warn: #c8800c; --viz-bad: #d03b3b;
  --seq-1: #184f95; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #9ec5f4;
}
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .au2-primary { background: #2563eb; border-color: #2563eb; }
:root[data-theme="dark"] .btn.primary:hover { background: #1d4ed8; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11" 1, "ss01" 1; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: 15px; margin: 0; font-weight: 620; letter-spacing: -0.005em; }
h3 { font-size: 12.5px; margin: 0 0 6px; font-weight: 620; color: var(--ink-2); }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; } .right { text-align: right; } .mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.boot { padding: 40px; color: var(--muted); }
:focus-visible { outline: none; box-shadow: var(--ring); }
[hidden] { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 560; cursor: pointer; white-space: nowrap; text-decoration: none !important; box-shadow: var(--sh-1); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(37,99,235,.25); } .btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { color: var(--bad); } .btn.danger:hover { border-color: var(--bad); background: var(--bad-bg); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; } .btn.link { border: 0; background: none; color: var(--primary); padding: 0 4px; height: auto; box-shadow: none; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); } .btn.ghost:hover { background: var(--surface-3); }
.btn.icon { width: 34px; padding: 0; } .btn.sm.icon { width: 28px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 15px; height: 15px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
kbd { font: 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; background: var(--surface); }

/* Forms */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
label.f > span.hint { font-weight: 400; color: var(--muted); }
label.f :is(input, select, textarea) { font-size: 14px; font-weight: 400; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 7px 10px; min-height: 36px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; accent-color: var(--primary); box-shadow: none; flex: none; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
/* Side by side on a computer, a hint under one label ("Sex · as on their insurance") pushed that box below its neighbor.
   The boxes sit at the bottom of their row instead, so a row's boxes line up whatever the labels above them say. */
@media (min-width: 761px) { .grid > label.f > :is(input:not([type=checkbox]):not([type=radio]), select):last-child { margin-top: auto; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; font-weight: 520; cursor: pointer; background: var(--surface); user-select: none; transition: background .12s, border-color .12s; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); font-weight: 620; }
.chip input { display: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--rc); padding: 14px; margin: 0; } legend { font-size: 12.5px; font-weight: 620; color: var(--ink-2); padding: 0 6px; }

/* Shell: a light sidebar like the Chart Reader's */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--surface) 235px, var(--line) 235px, var(--line) 236px, var(--bg) 236px); }
.side { background: var(--surface); border-right: 1px solid var(--line); color: var(--ink-2); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 14px 14px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .mark, .avatar-sm { width: 32px; height: 32px; border-radius: 9px; background: var(--mark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; letter-spacing: .02em; }
.brand .bt { min-width: 0; } .brand b { color: var(--ink); font-size: 13.5px; display: block; line-height: 1.25; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .brand span.sub { font-size: 11.5px; color: var(--muted); }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r); font-weight: 540; text-decoration: none; transition: background .12s; }
.nav a:hover { background: var(--surface-3); color: var(--ink); } .nav a.on { background: var(--primary-bg); color: var(--primary); font-weight: 620; }
.nav a .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 650; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav svg, .ic { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a .ic { color: var(--muted); } .nav a.on .ic, .nav a:hover .ic { color: inherit; }
.me { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.me .avatar-sm { border-radius: 50%; background: var(--primary); }
.me .who { min-width: 0; flex: 1; } .me b { color: var(--ink); display: block; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me .btn.link { color: var(--muted); padding: 0; font-size: 12px; font-weight: 500; }
.me .btn.link:hover { color: var(--primary); }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 28px; height: 60px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .search { margin-left: auto; width: 320px; position: relative; }
.top .search input { padding-left: 34px; padding-right: 34px; background: var(--surface-2); border-color: var(--line); height: 36px; }
.top .search input:focus { background: var(--surface); }
.top .search .ic { position: absolute; left: 11px; top: 10px; color: var(--muted); width: 16px; height: 16px; } .top .search kbd { position: absolute; right: 9px; top: 9px; }
.top .theme { flex: none; } .top .theme.push { margin-left: auto; }
.results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); box-shadow: var(--sh-3); overflow: hidden; z-index: 20; padding: 4px; }
.results a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--ink); border-radius: var(--r); } .results a:hover, .results a.on { background: var(--primary-bg); text-decoration: none; }
.results .empty { padding: 12px; }
.menu-btn { display: none; }
.page { padding: 24px 28px 56px; max-width: 1360px; }
.demo-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: var(--warn); font-size: 12.5px; padding: 7px 28px; font-weight: 520; }
.demo-bar.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); } .demo-bar.info { background: var(--primary-bg); border-color: var(--primary-line); color: var(--primary); }

/* Cards, tiles, tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); box-shadow: var(--sh-1); overflow: hidden; }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; min-height: 54px; } .card > .hd .btns { margin-left: auto; }
.card > .hd > .muted.small { line-height: 1.3; }
.card > .bd { padding: 4px 18px 18px; } .card > .hd + .bd { padding-top: 2px; } .card > .bd:first-child { padding-top: 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.card.alert { border-color: var(--bad-line); } .card.alert > .hd { background: var(--bad-bg); } .card.alert > .hd h2 { color: var(--bad); }
.card.notice { border-color: var(--warn-line); } .card.notice > .hd { background: var(--warn-bg); }
.card.spaced { margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); padding: 14px 16px; box-shadow: var(--sh-1); position: relative; transition: border-color .12s, box-shadow .12s; }
.tile:has(a):hover { border-color: var(--primary-line); box-shadow: var(--sh-2); }
.tile a { color: inherit; text-decoration: none; display: block; } .tile a::after { content: ""; position: absolute; inset: 0; }
.tile .k { font-size: 12.5px; color: var(--muted); font-weight: 540; } .tile .v { font-size: 26px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.2; }
.tile.alert .v { color: var(--bad); } .tile.alert .k::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-right: 6px; vertical-align: 1px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.card > .hd + table.t, .card > table.t:first-child { border-top: 1px solid var(--line); }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 560; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 18px; } table.t th:last-child, table.t td:last-child { padding-right: 18px; }
table.t tr:last-child td { border-bottom: 0; } table.t tbody tr:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 26px 18px; color: var(--muted); text-align: center; font-size: 13px; }
.card > .hd + .empty { border-top: 1px solid var(--line); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; padding: 2px 9px 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); line-height: 1.5; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.st:empty { padding: 0; background: none; } .st:empty::before { width: 8px; height: 8px; background: var(--line-2); }
.st.ok { background: var(--ok-bg); color: var(--ok); } .st.ok::before { background: var(--ok); }
.st.warn { background: var(--warn-bg); color: var(--warn); } .st.warn::before { background: var(--warn); }
.st.bad { background: var(--bad-bg); color: var(--bad); } .st.bad::before { background: var(--bad); }
.st.info { background: var(--info-bg); color: var(--info); } .st.info::before { background: var(--info); }
.st.blue { background: var(--primary-bg); color: var(--primary); } .st.blue::before { background: var(--primary); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 560; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; line-height: 1.6; vertical-align: 1px; }
.tag.red { background: var(--bad-bg); color: var(--bad); } .tag.blue { background: var(--primary-bg); color: var(--primary); } .tag.green { background: var(--ok-bg); color: var(--ok); } .tag.amber { background: var(--warn-bg); color: var(--warn); }
.problems { border: 1px solid var(--bad-line); background: var(--bad-bg); border-radius: var(--rc); padding: 12px 16px; color: var(--bad); font-size: 13px; } .problems ul { margin: 6px 0 0; padding-left: 18px; }
.okbox { border: 1px solid var(--ok); background: var(--ok-bg); border-radius: var(--rc); padding: 12px 16px; color: var(--ok); font-size: 13px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inset { background: var(--surface-2); }
.subtle { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }

.grid > .card + .card, .cols > .card + .card { margin-top: 0; }

/* Client banner + chart tabs */
.banner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; box-shadow: var(--sh-1); }
.avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--mark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; letter-spacing: .02em; }
.banner .who { min-width: 0; flex: 1 1 320px; } .banner .who h1 { font-size: 21px; }
.banner .who h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .banner .who h1 .tag, .banner .who h1 .st { font-size: 12px; letter-spacing: 0; }
.banner .facts { color: var(--muted); font-size: 13px; margin-top: 3px; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.banner .strip { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); margin-top: 4px; overflow: hidden; }
.banner .strip > div { padding: 9px 14px; border-left: 1px solid var(--line); min-width: 0; } .banner .strip > div:first-child { border-left: 0; }
.banner .strip .k { display: block; font-size: 11.5px; color: var(--muted); font-weight: 540; } .banner .strip .v { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner .strip .v .sub { display: block; font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.banner .btns { margin-left: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 12px; color: var(--muted); font-weight: 560; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; transition: color .12s; }
.tabs a.on { color: var(--primary); border-color: var(--primary); } .tabs a:hover { color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r); padding: 3px; gap: 2px; } .seg a, .seg button { padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 540; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg a:hover, .seg button:hover { color: var(--ink); } .seg .on { background: var(--surface); color: var(--ink); font-weight: 620; box-shadow: var(--sh-1); }

/* A small menu under a button (more actions) */
.dd { position: relative; display: inline-flex; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); box-shadow: var(--sh-3); padding: 4px; z-index: 30; display: none; }
.dd.open .dd-menu { display: block; }
.dd-menu button, .dd-menu a { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--ink); border-radius: var(--r); cursor: pointer; text-align: left; text-decoration: none; }
.dd-menu button:hover, .dd-menu a:hover { background: var(--surface-3); } .dd-menu .ic { color: var(--muted); }

/* Calendar */
.cal { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--rc); background: var(--surface); overflow: hidden; box-shadow: var(--sh-1); }
.cal .dh { padding: 10px 8px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; background: var(--surface-2); color: var(--ink-2); }
.cal .dh.today { color: var(--primary); } .cal .tc { font-size: 11px; color: var(--muted); text-align: right; padding: 2px 8px 0; }
.cal .col { position: relative; border-left: 1px solid var(--line); }
.cal .slot { height: 30px; border-bottom: 1px solid var(--surface-3); } .cal .slot.hr { border-bottom-color: var(--line); }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 7px; font-size: 11.5px; line-height: 1.3; overflow: hidden; cursor: pointer; background: var(--primary-bg); border-left: 3px solid var(--primary); color: var(--primary); }
.ev:hover { filter: brightness(.97); } .ev.completed { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); } .ev.arrived { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.ev.no_show, .ev.late_cancel, .ev.cancelled { background: var(--surface-2); border-color: var(--line-2); color: var(--muted); text-decoration: line-through; }
.ev.requested { background: var(--warn-bg); border-left-style: dashed; border-color: var(--warn); color: var(--warn); } .ev.confirmed { border-color: var(--ok); }
.daylist .row { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; } .daylist .row:hover { background: var(--surface-2); }

/* Note editor */
.note-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.note-grid .aside { position: sticky; top: 76px; }
.field { margin-bottom: 16px; } .field .lbl { font-size: 13px; font-weight: 620; color: var(--ink-2); margin-bottom: 6px; display: flex; gap: 6px; } .field .req { color: var(--bad); }
.field .hint { font-weight: 400; color: var(--muted); }
.signed-text p { margin: 0 0 10px; line-height: 1.6; } .signed-text b { color: var(--ink-2); }
.sig { font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 8px; margin-top: 8px; } .sig code { font-size: 10.5px; color: var(--muted); word-break: break-all; }
.line { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin-bottom: 8px; background: var(--surface-2); }
.line select { margin-bottom: 6px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 34px; gap: 6px; align-items: end; }
.line-row label { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }

/* Dialog + toast */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; z-index: 50; overflow-y: auto; backdrop-filter: blur(2px); animation: fade .14s ease-out; }
.dialog { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: var(--sh-3); border: 1px solid var(--line); animation: rise .16s ease-out; }
.dialog.wide { max-width: 860px; }
.dialog .hd { padding: 16px 20px 6px; display: flex; align-items: center; gap: 10px; } .dialog .hd h2 { font-size: 16px; } .dialog .hd .x { margin-left: auto; width: 30px; height: 30px; padding: 0; border-color: transparent; box-shadow: none; color: var(--muted); } .dialog .hd .x:hover { background: var(--surface-3); color: var(--ink); }
.dialog input[name=pin] { max-width: 220px; font-size: 20px; letter-spacing: .3em; text-align: center; }
.dialog .bd { padding: 10px 20px 18px; max-height: 70vh; overflow-y: auto; } .dialog .bd > p:first-child { margin-top: 4px; }
.dialog .ft { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.dialog .err { color: var(--bad); font-size: 13px; margin-right: auto; align-self: center; } .dialog .err:empty { display: none; } .dialog .err .btn { margin-left: 6px; vertical-align: middle; }
.scrim { overscroll-behavior: contain; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.99); } }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 8px); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 520; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 60; max-width: 90vw; box-shadow: var(--sh-3); }
#toast.on { opacity: 1; transform: translate(-50%, 0); } #toast.bad { background: #b91c1c; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sign-in (older screens) */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth .card { width: 100%; max-width: 420px; } .auth .bd { padding: 24px; } .auth h1 { margin-bottom: 4px; }
.auth .qr { display: block; margin: 8px auto; border: 1px solid var(--line); border-radius: var(--rc); background: #fff; }
.demo-list button { display: flex; width: 100%; justify-content: space-between; margin-bottom: 6px; height: 40px; }

@media (max-width: 1100px) { .cols, .note-grid { grid-template-columns: 1fr; } .note-grid .aside { position: static; } }
@media (max-width: 760px) {
  :root { font-size: 15px; }
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.menu .side { transform: none; box-shadow: var(--sh-3); }
  .menu-btn { display: inline-flex; }
  .top { padding: 8px 12px; flex-wrap: wrap; height: auto; min-height: 56px; row-gap: 8px; } .top h1 { font-size: 20px; flex: 1; min-width: 0; } .top .theme { order: 2; }
  .top .search { width: 100%; order: 3; margin-left: 0; } .top .search kbd { display: none; } .top #top-actions { order: 4; width: 100%; } .top #top-actions:empty { display: none; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .seg a, .seg button { white-space: nowrap; flex: none; }
  .page { padding: 14px 12px 40px; } .demo-bar { padding: 6px 12px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; }
  .kv { grid-template-columns: minmax(96px, 38%) 1fr; gap: 8px 12px; }
  table.t.stack thead { display: none; } table.t.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 6px; } table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { display: block; border: 0; padding: 3px 12px !important; text-align: right; overflow: hidden; } table.t.stack td[data-l]::before { content: attr(data-l); float: left; margin-right: 12px; color: var(--muted); font-size: 12.5px; text-align: left; }
  table.t.stack td .btns { justify-content: flex-end; } table.t.stack td:not([data-l]) { padding-top: 6px !important; }
  table.t.stack td.num { text-align: right; }
  .banner { padding: 14px; } .banner .btns { margin-left: 0; width: 100%; } .banner .btns > .btn.primary { flex: 1; }
  .banner .strip { grid-template-columns: 1fr 1fr; } .banner .strip > div { border-left: 0; border-top: 1px solid var(--line); } .banner .strip > div:nth-child(-n+2) { border-top: 0; } .banner .strip > div:nth-child(even) { border-left: 1px solid var(--line); }
  .dd-menu { right: auto; left: 0; }
  .card > .hd { flex-wrap: wrap; } .card > .hd .btns { margin-left: auto; }
  .card > .hd > .muted.small { flex: 1 1 100%; order: 3; margin-top: -4px; }
  .avatar { width: 44px; height: 44px; font-size: 15px; border-radius: 12px; } .banner .who { flex: 1 1 0; } .banner .who h1 { font-size: 19px; }
  .dialog .bd { max-height: none; } .scrim { padding: 0; } .dialog { border-radius: 0; min-height: 100vh; border: 0; } .dialog .ft { border-radius: 0; position: sticky; bottom: 0; }
  .dialog .err { flex: 1 1 100%; } body:has(#modal-root .scrim) #toast { top: 12px; bottom: auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile .v { font-size: 22px; }
  input, select, textarea, label.f :is(input, select, textarea) { font-size: 16px; }
  .dialog table.t:not(.stack) { display: block; overflow-x: auto; white-space: nowrap; }
  .nav-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 39; } .shell:not(.menu) .nav-scrim { display: none; }
}

.auth .s-big { height: 42px; font-size: 15px; justify-content: center; }
.portal .card .card { box-shadow: none; }
.cov { font-size: 12px; font-weight: 540; } .cov.ok { color: var(--ok); } .cov.bad { color: var(--bad); }
.msg { padding: 9px 13px; border-radius: 12px; max-width: 520px; margin: 6px 0; font-size: 13.5px; white-space: pre-wrap; } .msg.out { background: var(--primary-bg); margin-left: auto; border-bottom-right-radius: 4px; } .msg.in { background: var(--surface-3); border-bottom-left-radius: 4px; }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---- Charts (charts.js): quiet chrome, the data is the only loud thing ---- */
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.viz-grid > .card + .card { margin-top: 0; }
.viz-card .seg button { padding: 3px 10px; }
/* The sentence a card leads with (what the chart means, in plain words), the action, and the small print under it. */
.viz-lead { font-size: 16px; line-height: 1.45; color: var(--ink); margin: 0 0 12px; max-width: 64ch; text-wrap: pretty; }
.viz-lead b { font-weight: 680; }
.viz-card.big .viz-lead { font-size: 17px; }
.viz-act { margin: -2px 0 14px; }
.viz-sub { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.4; }
.more-reports { margin: 8px 0 16px; }
.more-reports > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--rc);
  background: var(--surface); box-shadow: var(--sh-1); font-weight: 620; color: var(--ink); }
.more-reports > summary::-webkit-details-marker { display: none; }
.more-reports > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.more-reports[open] > summary::before { transform: rotate(45deg); }
.more-reports > summary .muted { font-weight: 400; font-size: 13px; }
.more-reports > summary:focus-visible { box-shadow: var(--ring); }
.more-reports[open] > summary { margin-bottom: 16px; }
.viz-chart { container-type: inline-size; min-width: 0; }
.viz-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 10px; }
.viz-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.viz-key .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; } .viz-key .ln { width: 16px; height: 2px; border-radius: 2px; flex: none; }
.viz-key .ic { width: 14px; height: 14px; color: var(--ink-2); }
.viz-plot { border-radius: 8px; outline: none; touch-action: pan-y; }
.viz-plot:focus-visible { box-shadow: var(--ring); }
.viz-svg { display: block; overflow: visible; }
.viz-svg text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.viz-svg .cap { fill: var(--ink-2); font-weight: 600; } .viz-svg .endl { fill: var(--ink-2); } .viz-svg .bandl { font-size: 10.5px; }
.viz-svg .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; } .viz-svg .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.viz-svg .hov { fill: var(--surface-3); } .viz-svg .hit { fill: transparent; cursor: default; }
.viz-svg .band { fill: var(--ink); } .viz-svg .cross { stroke: var(--muted); stroke-width: 1; shape-rendering: crispEdges; }
.viz-svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .pt { stroke: var(--surface); stroke-width: 2; }
/* Horizontal bars: label | bar with its value at the tip; on a narrow card the label sits above its bar. */
.hb-row { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr); align-items: center; gap: 2px 12px; padding: 5px 6px; margin: 0 -6px; border-radius: 6px; }
.hb-row.on { background: var(--surface-2); }
.hb-label { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { position: relative; height: 14px; }
.hb-track.thin { height: 10px; } .hb-multi { display: grid; gap: 6px; }
.hb-seg { position: absolute; top: 0; bottom: 0; } .hb-seg.end { border-radius: 0 4px 4px 0; }
.hb-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-track.thin .hb-val { font-size: 11.5px; color: var(--ink-2); }
@container (max-width: 420px) { .hb-row { grid-template-columns: minmax(0, 1fr); } .hb-label { white-space: normal; } }
.viz-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 28px; }
.viz-panels h3 { margin: 0 0 6px; }
/* The tooltip: values lead (strong), labels follow; rows keyed by a short stroke of the series color. */
.viz-tip { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--sh-3); padding: 8px 11px; font-size: 12.5px; min-width: 130px; max-width: 280px; opacity: 0; visibility: hidden; transition: opacity .1s; }
.viz-tip.on { opacity: 1; visibility: visible; }
.viz-tip .t { color: var(--muted); font-size: 12px; margin-bottom: 4px; font-weight: 560; }
.viz-tip .r { display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.viz-tip .r > i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-tip .r b { font-weight: 650; font-variant-numeric: tabular-nums; } .viz-tip .r span:last-child { color: var(--ink-2); }
.viz-tip .r .ico .ic { width: 13px; height: 13px; color: var(--ink-2); display: block; }
.viz-tip .f { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; color: var(--ink-2); }
/* Screenings on the chart: two small multiples, PHQ-9 and GAD-7, each on its own scale and bands. */
.scr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; }
.scr-lead { font-size: 19px; line-height: 1.3; margin: 0 0 4px; color: var(--ink); font-weight: 560; }
.scr-lead b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.scr-band { color: var(--ink-2); font-weight: 500; }
.scr-what { margin-bottom: 6px; }
.scr-delta { display: block; font-size: 16px; font-weight: 600; } .scr-delta.down { color: var(--ok); } .scr-delta.up { color: var(--bad); } .scr-delta.flat { color: var(--ink-2); font-weight: 500; }
@media (max-width: 1100px) { .viz-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .viz-card .hd .btns { margin-left: 0; } .seg.rep-range { flex-wrap: wrap; overflow: visible; } .viz-lead { font-size: 15.5px; } }

/* ---- au2: Cima sign-in (signin.js). A plain card on the soft page, the app's tokens (dark mode follows). ---- */
.au2-page { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.au2-top { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.au2-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--mark); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: 15px; }
.au2-word { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); }
.au2-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 32px; gap: 16px; }
.au2-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); padding: 28px 28px 24px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.au2-h { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.015em; }
.au2-h2 { font-size: 15px; font-weight: 650; color: var(--ink); margin: 0 0 4px; }
.au2-sub { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.au2-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border-radius: var(--r); font: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-decoration: none !important; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.au2-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.au2-btn:focus-visible, .au2-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.au2-btn[disabled] { opacity: .55; cursor: not-allowed; }
.au2-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); } .au2-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.au2-secondary { height: 40px; }
.au2-idp + .au2-idp { margin-top: 10px; }
.au2-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.au2-logo { width: 18px; height: 18px; flex: none; }
.au2-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12.5px; }
.au2-or::before, .au2-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au2-pwrow { margin-top: 18px; text-align: center; }
.au2-link { border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 13px; color: var(--primary); cursor: pointer; font-weight: 550; }
.au2-link:hover { text-decoration: underline; }
.au2-form { display: grid; gap: 12px; margin-top: 14px; }
.au2-page [hidden] { display: none !important; }
.au2-form input { height: 40px; }
.au2-foot { margin-top: 14px; font-size: 13px; text-align: center; color: var(--ink-2); } .au2-foot a, .au2-new a { color: var(--primary); font-weight: 550; }
.au2-new { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.au2-err { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--bad-line); background: var(--surface); color: var(--bad); border-radius: var(--r); font-size: 13px; line-height: 1.45; }
.au2-hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; } .au2-center { text-align: center; }
.au2-legal { margin: 4px 0 0; color: var(--muted); font-size: 12px; text-align: center; max-width: 420px; }
.au2-demo { padding: 20px 24px; } .au2-demo .au2-sub { margin-bottom: 10px; } .au2-group { font-size: 12px; font-weight: 650; color: var(--ink-2); margin: 10px 0 6px; }
.au2-step { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; } .au2-step .qr { display: block; margin: 8px auto; border: 1px solid var(--line); border-radius: var(--r); }
/* My account → Sign-in */
.au2-me .hd .btn .au2-ic { width: 15px; height: 15px; }
.au2-methods { padding-top: 4px; }
.au2-sech { font-size: 12px; font-weight: 650; color: var(--ink-2); background: var(--surface-3); margin: 12px -16px 4px; padding: 6px 16px; }
.au2-sech:first-child { margin-top: -4px; }
.au2-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--surface-3); }
.au2-row:last-of-type { border-bottom: 0; }
.au2-what { display: flex; align-items: flex-start; gap: 10px; min-width: 0; } .au2-what .au2-ic, .au2-what .au2-logo { margin-top: 2px; color: var(--primary); }
.au2-meta { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 2px; overflow-wrap: anywhere; }
.au2-act { flex: none; }
.au2-empty { color: var(--ink-2); font-size: 13px; padding: 8px 0; }
/* Settings → Sign-in (owner) */
.au2-policy { display: grid; gap: 14px; }
.au2-fixed { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--surface-3); } .au2-fixed .tag { margin-top: 1px; }
.au2-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13.5px; position: relative; }
.au2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.au2-track { flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; margin-top: 1px; transition: background .15s; }
.au2-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.au2-switch input:checked + .au2-track { background: var(--primary); } .au2-switch input:checked + .au2-track::after { left: 16px; }
.au2-switch input:focus-visible + .au2-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.au2-switch.off { opacity: .6; cursor: not-allowed; }
.au2-sub2 { margin-left: 46px; } .au2-check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; align-self: end; min-height: 32px; }
.au2-warn { border: 1px solid var(--warn-line); background: var(--surface); color: var(--warn); border-radius: var(--r); padding: 10px 12px; font-size: 13px; }
.au2-tags { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 760px) {
  .au2-main { padding: 24px 12px; } .au2-card { padding: 22px 18px 18px; } .au2-top { padding: 0 16px; }
  .au2-sub2 { margin-left: 0; } .au2-sub2.g2 { grid-template-columns: 1fr; }
  .au2-row { flex-wrap: wrap; }
}

/* Audit 10/20, "for dummies". Lists are short rows you tap anywhere on; the rest is folded under "More details". */
table.t.list tbody tr[data-href], table.t.list tbody tr[data-appt] { cursor: pointer; }
.ph-only { display: none; }
.lead-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.allset { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--rc); padding: 14px 18px; color: var(--ink-2); box-shadow: var(--sh-1); margin-bottom: 16px; }
.allset .ic { color: var(--ok); width: 20px; height: 20px; }
.next-step { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--primary-bg); }
.next-step b { color: var(--ink); } .next-step .btn { margin-left: auto; }
details.more { border: 1px solid var(--line); border-radius: var(--rc); margin-top: 4px; }
details.more > summary { cursor: pointer; list-style: none; padding: 12px 14px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 8px; min-height: 44px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-weight: 700; width: 14px; text-align: center; } details.more[open] > summary::before { content: "−"; }
details.more > summary .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
details.more > .in { padding: 4px 14px 14px; display: grid; gap: 14px; }
details.more.flat { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; } details.more.flat > summary { padding: 12px 18px; } details.more.flat.top { border-top: 0; }
table.t.list tbody tr[data-href]:hover td, table.t.list tbody tr[data-appt]:hover td { background: none; } table.t.list tbody tr[data-href]:hover, table.t.list tbody tr[data-appt]:hover { background: var(--surface-2); }
@media (hover: none) { table.t.list tbody tr:hover, table.t tbody tr:hover td { background: none; } }
.bill-sum { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; } .bill-sum .codes { font-weight: 650; font-variant-numeric: tabular-nums; }
/* Today, under a visit: what the desk settles at check-in (a balance, a consent not signed), each its own one-tap button. */
.due-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn.due { border-color: var(--warn-line); background: var(--warn-bg); color: var(--ink); white-space: normal; text-align: left; justify-content: flex-start; height: auto; min-height: 28px; padding-top: 3px; padding-bottom: 3px; }
.btn.due:hover { border-color: var(--warn); background: var(--warn-bg); } .btn.due .ic { color: var(--warn); flex: none; }
/* Settings → Set up the basics: the 4 steps in order, the one you're on lit; Save and continue at the bottom. */
.basics-steps { list-style: none; margin: 0; padding: 10px 18px; display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); }
.basics-steps a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--muted); font-weight: 560; text-decoration: none; }
.basics-steps .n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.basics-steps li.on a { color: var(--primary); } .basics-steps li.on .n { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.basics-steps li.done a { color: var(--ink-2); } .basics-steps li.done .ic { width: 18px; height: 18px; color: var(--ok); }
.basics .bd h3 { margin-top: 0; }
.basics-go { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); } .basics-go .btn.link { margin-right: auto; }
@media (max-width: 760px) { .basics-steps a { min-height: 44px; } .basics-go { flex-wrap: wrap; } .basics-go .btn.primary { flex: 1 1 100%; order: -1; } }
/* Messages: "They told me they agree to texts", one tap. */
.agree-texts { display: grid; gap: 8px; justify-items: start; margin-top: 12px; }
/* Billing: on a phone the 7 counts fold into one line and the claims come first; on a computer they're open tiles. */
details.bill-fold { margin: 0 0 12px; background: var(--surface); }
details.bill-fold > summary { flex-wrap: wrap; row-gap: 2px; } details.bill-fold > summary .hint { flex: 1 1 100%; padding-left: 22px; }
details.bill-fold > .tiles { margin: 0; padding: 4px 12px 12px; } details.bill-fold > p { padding: 0 14px; }
@media (min-width: 761px) { details.bill-fold { border: 0; margin: 0; background: none; } details.bill-fold > summary { display: none; } details.bill-fold > .tiles { padding: 0; margin-bottom: 16px; } details.bill-fold > p { padding: 0; } }
.sign-bar { display: none; }
.check-row { flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 500 !important; }
@media (max-width: 760px) {
  /* Everything you tap is at least 44px tall (Apple's and Google's minimum), so a thumb never misses. */
  .btn, .btn.sm { min-height: 44px; height: auto; } .btn.sm { padding: 0 14px; font-size: 14px; }
  .btn.icon, .btn.sm.icon { width: 44px; min-width: 44px; } .dialog .hd .x { width: 44px; height: 44px; }
  input:not([type=checkbox]):not([type=radio]), select:not([multiple]) { min-height: 44px; } /* beats the plain 36px rule further down */
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  label.f.check-row, label.f[style*="flex-direction:row"] { min-height: 44px; }
  .chip { min-height: 44px; padding: 8px 14px; font-size: 14px; }
  .seg a, .seg button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; font-size: 14px; }
  .seg { flex-wrap: wrap; overflow: visible; } /* every choice in sight, none off the edge */
  .tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; } .tabs a { min-height: 44px; display: inline-flex; align-items: center; }
  .nav a, .dd-menu button, .dd-menu a, .results a { min-height: 44px; }
  .ph-only { display: block; } .ph-hide { display: none !important; }
  .field .lbl { flex-wrap: wrap; } .field .lbl .hint { flex: 1 1 100%; }
  /* The title bar (title, find box, page buttons) is a fifth of a phone screen: it scrolls away instead of staying pinned. */
  .top { position: relative; } .card, .tiles { scroll-margin-top: 12px; }
  /* A list is a column of rows: what it is on top, a muted line under it, one action on the right. */
  table.t.list thead { display: none; }
  table.t.list tbody tr { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 60px; border-bottom: 1px solid var(--line); }
  table.t.list tbody tr:last-child { border-bottom: 0; }
  table.t.list td { display: block; padding: 0 !important; border: 0; text-align: left; }
  table.t.list td.lead { flex: 1 1 auto; min-width: 0; } table.t.list td:not(.lead) { flex: none; text-align: right; }
  table.t.list td .btns { justify-content: flex-end; flex-wrap: nowrap; }
  /* The note: Sign stays in reach at the bottom of the screen while you write. */
  .sign-bar { display: flex; position: sticky; bottom: 0; z-index: 6; gap: 10px; align-items: center; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 12px; margin: 0 -12px; box-shadow: 0 -4px 16px rgba(15,23,42,.06); }
  .sign-bar .left { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); } .sign-bar .left.ok { color: var(--ok); font-weight: 600; }
  #pf .chips { flex-direction: column; } #pf .chip { width: 100%; justify-content: flex-start; font-size: 15px; }
}

/* Quick VOB: phone first. Big targets, the card photos side by side, the run button always in reach. */
.btn.big { height: 46px; font-size: 15px; padding: 0 18px; justify-content: center; }
.vob-wrap { max-width: 860px; }
.vob-phone-only { display: none; }
.vob-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vob-shot { position: relative; min-height: 120px; border: 2px dashed var(--line-2); border-radius: var(--rc); background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; overflow: hidden; font-weight: 600; color: var(--muted); padding: 8px; }
.vob-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vob-shot.done span { position: relative; z-index: 1; background: rgba(255, 255, 255, .9); padding: 2px 8px; border-radius: var(--r); font-size: 12px; color: var(--ink); }
.vob-care { display: flex; flex-direction: column; gap: 8px; }
.vob-care .chip { border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.vob-go { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.vob-go .btn.big { width: 100%; }
.vob-list .vob-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.vob-list .vob-row:hover { background: var(--surface-2); }
.vob-list .vob-row > span:first-child { min-width: 0; } .vob-list .vob-when { white-space: nowrap; flex: none; }
.vob-thumbs { display: flex; gap: 10px; margin-top: 12px; } .vob-thumbs img { width: 140px; height: 88px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.vob-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
@media (max-width: 760px) {
  .vob-phone-only { display: flex; width: 100%; margin-bottom: 12px; }
  .vob-desk-only { display: none; }
  .vob-actions .btn.big { flex: 1 1 calc(50% - 4px); } .vob-actions .btn.big.primary { flex-basis: 100%; }
  .vob-wrap input, .vob-wrap select { font-size: 16px; }
  .vob-thumbs img { width: calc(50% - 5px); height: auto; aspect-ratio: 1.6; }
}

.problems.warnbox { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.save-st { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .save-st.ok::before, .save-st.bad::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.save-st.bad { color: var(--bad); } .save-st.bad::before { background: var(--bad); }
.card, .tiles { scroll-margin-top: 76px; }
.results .go { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; flex: none; } .results .go .ic { width: 14px; height: 14px; }
.banner .strip .sub .btn.link { font-size: 12px; padding: 0; font-weight: 560; }
.trend { font-size: 12px; font-weight: 650; } .trend.up { color: var(--bad); } .trend.down { color: var(--ok); }
.nav-scrim { display: none; }
@media (max-width: 760px) { .shell.menu .nav-scrim { display: block; } }
.todo { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--rc); padding: 12px 16px; font-size: 13px; color: var(--ink-2); }
.todo ul { margin: 6px 0 0; padding: 0; list-style: none; } .todo li { padding: 3px 0 3px 22px; position: relative; } .todo li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 10px; border: 1.5px solid var(--line-2); border-radius: 50%; }
.left-items { color: var(--muted); margin-top: 4px; } .left-items.tried { color: var(--bad); }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1px; }
.subnav .grp { font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 10px 4px; } .subnav .grp:first-child { padding-top: 0; }
.subnav a { padding: 7px 10px; border-radius: var(--r); color: var(--ink-2); font-weight: 540; text-decoration: none; } .subnav a:hover { background: var(--surface-3); color: var(--ink); }
.subnav a.on { background: var(--primary-bg); color: var(--primary); font-weight: 620; }
.subnav-sel { display: none; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; } .subnav { display: none; } .subnav-sel { display: block; } }
.appt-acts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.appt-acts .lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 560; margin-bottom: 6px; }
.ev .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .col .slot { cursor: copy; } .cal .col .slot:hover { background: var(--surface-2); }
.banner .facts.inline { display: block; }
/* Cima Consulting */
.cc-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 90px; margin: 3px 0; } .cc-bar i { display: block; height: 100%; background: var(--primary); }
.cc-late { color: var(--bad); font-weight: 600; } .cc-soon { color: var(--warn); font-weight: 600; }
.cc-head { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 10px 14px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rc); font-size: 13px; color: var(--ink-2); }
.cc-head > span + span { border-left: 1px solid var(--line); padding-left: 18px; }
.cc-phase .hd .btns { min-width: 120px; } .cc-task.done .cc-tt { color: var(--muted); text-decoration: line-through; } .cc-task.waiting td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.cc-tt { cursor: pointer; } .cc-tt:hover { color: var(--primary); }
.cc-note { background: var(--surface-2); border-left: 3px solid var(--line-2); padding: 3px 8px; margin-top: 4px; white-space: pre-wrap; }
.cc-rec { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .cc-ready { text-align: center; min-width: 70px; } .cc-ready b { display: block; font-size: 22px; }
.cc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; } .cc-check input { width: auto; min-height: 0; }
.cc-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cc-pkg { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; font-size: 13px; background: var(--surface); }
.cc-pkg input { display: none; } .cc-pkg.on { border-color: var(--primary); background: var(--primary-bg); }
.cc-quote { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.cc-inc { margin: 0; padding-left: 18px; } .cc-inc li { margin: 2px 0; }
.cc-plan { list-style: none; margin: 0; padding: 0; } .cc-plan li { padding: 4px 0; border-bottom: 1px solid var(--line); } .cc-plan li:last-child { border-bottom: 0; }
.cc-script { white-space: pre-wrap; font-size: 13px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.cc-doc .doc { max-width: 760px; font-size: 13.5px; line-height: 1.55; } .cc-doc h1 { font-size: 20px; margin: 4px 0 10px; } .cc-doc h2 { font-size: 15px; margin: 16px 0 6px; } .cc-doc h3 { font-size: 13px; margin: 12px 0 4px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.cc-doc .doc-note { font-style: italic; color: var(--muted); font-size: 12px; } .cc-doc table.t { margin: 6px 0 12px; } .cc-doc .blank { border-bottom: 1px solid var(--ink-2); display: inline-block; min-width: 90px; }
.cc-doc .doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; margin: 22px 0 10px; } .cc-doc .doc-sign div { font-size: 12px; color: var(--muted); } .cc-doc .doc-sign span { display: block; border-bottom: 1px solid var(--ink); height: 26px; margin-bottom: 3px; }
.cc-doc .doc-field { margin: 10px 0; } .cc-doc .doc-field span { display: block; border-bottom: 1px solid var(--line-2); height: 22px; } .cc-doc .doc-break { border: 0; border-top: 1px dashed var(--line-2); margin: 20px 0; }
@media print { .side, .top, .tabs, .btns, .demo-bar, #kt, #rf, #pf { display: none !important; } .main { margin: 0 !important; } .card { break-inside: avoid; box-shadow: none; } }
@media (max-width: 760px) { .cc-head > span + span { border-left: 0; padding-left: 0; } .cc-pkgs { grid-template-columns: 1fr 1fr; } .cc-doc .doc-sign { grid-template-columns: 1fr; } }
/* Cima Consulting: the client portal and the website page */
.ccp { background: var(--bg); } .ccp-wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.ccp-top { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 16px; } .ccp-top .ccp-wrap { display: flex; justify-content: space-between; align-items: center; height: 56px; gap: 12px; }
.ccp-auth { max-width: 400px; margin: 10vh auto; padding: 0 16px; } .ccp-auth h1 { margin-bottom: 6px; }
.ccp-phase > summary { cursor: pointer; list-style: none; } .ccp-phase > summary::-webkit-details-marker { display: none; } .ccp-phase[open] > summary { border-bottom: 1px solid var(--line); }
.cc-hero-card .bd { padding: 18px 20px; } .cc-hero-steps { margin: 10px 0 0; padding-left: 0; list-style: none; } .cc-hero-steps li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .cc-hero-steps b { display: inline-block; min-width: 92px; color: var(--primary); }
.cc-plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .cc-review { max-width: 860px; margin: 0 auto; } .cc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cc-plan .cc-check { display: flex; align-items: flex-start; } .cc-plan .cc-check input { margin-top: 3px; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { table.t.stack td[style] { width: auto !important; min-width: 0 !important; } table.t.stack td.nowrap { white-space: normal; } table.t input, table.t select { min-width: 0; } .cc-head { gap: 4px 12px; } }
@media (max-width: 760px) { .cc-admin #page .card { overflow-x: auto; } .cc-admin #page .card > .hd { min-width: 0; flex-wrap: wrap; } }
@media (min-width: 900px) { .site .s-steps.cc-steps4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  :is(.cc-admin, .ccp) table.t.stack td:is([data-l="Step"], [data-l="Lead"], [data-l="Client"], [data-l="Engagement"], [data-l="Document"], [data-l="Plan"], [data-l="Service"], [data-l="Partner"], [data-l="Idea"], [data-l="File"], [data-l="Clinician"], [data-l="Invoice"], [data-l="What"], [data-l="How"], [data-l=""]) { display: block; padding-top: 6px; }
  :is(.cc-admin, .ccp) table.t.stack td:is([data-l="Step"], [data-l="Lead"], [data-l="Client"], [data-l="Engagement"], [data-l="Document"], [data-l="Plan"], [data-l="Service"], [data-l="Partner"], [data-l="Idea"], [data-l="File"], [data-l="Clinician"], [data-l="Invoice"], [data-l="What"], [data-l="How"], [data-l=""])::before { display: none; }
  .ccp-top .ccp-wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
}

/* Inside Altura Ops (the Chart Reader's frame): the host's menu is the menu. */
.shell.embedded { grid-template-columns: 1fr; background: var(--bg); }
.shell.embedded .side, .shell.embedded .menu-btn { display: none !important; }
.emb-links { display: flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.emb-links a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface);
  color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.emb-links a:hover { background: var(--surface-2); border-color: var(--muted); }
.emb-links a.on { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
.emb-links a.emb-side { margin-left: auto; }
.emb-links .ic { width: 16px; height: 16px; }
@media (max-width: 760px) { .emb-links { padding: 8px 12px; gap: 6px; flex-wrap: wrap; overflow: visible; } .emb-links a { height: 34px; padding: 0 10px; font-size: 13px; } .emb-links a.emb-side { margin-left: 0; } }
/* Privacy tab, the easy way (privacy.js) */
.pv-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pv-act { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--rc); background: var(--surface); box-shadow: var(--sh-1); font: inherit; color: var(--ink); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.pv-act:hover { border-color: var(--primary); box-shadow: var(--sh-2); } .pv-act .ic { width: 22px; height: 22px; color: var(--primary); margin-bottom: 4px; }
.pv-act b { font-size: 15px; } .pv-act span { font-size: 13px; color: var(--muted); }
.pv-hold { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--bad-line); background: var(--bad-bg); border-radius: var(--rc); font-size: 14px; }
.pv-hold > .ic { width: 20px; height: 20px; color: var(--bad); flex: none; } .pv-hold > div { flex: 1; min-width: 0; } .pv-hold .btn { flex: none; }
.pv-pick { display: grid; gap: 10px; }
.pv-q { font-size: 15px; font-weight: 650; margin: 4px 0 8px; }
.pv-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 10px; } .pv-who.two { grid-template-columns: 1fr 1fr; }
.pv-chip { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.pv-chip input { display: none; } .pv-chip b { font-size: 14px; } .pv-chip span { font-size: 12.5px; color: var(--muted); }
.pv-chip.on { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary); }
details.pv-else, details.pv-more { margin-top: 12px; } details.pv-else > summary, details.pv-more > summary { cursor: pointer; color: var(--primary); font-weight: 560; font-size: 13.5px; padding: 6px 0; }
details.pv-more > summary { padding: 14px 18px; } details.pv-more[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .pv-acts { grid-template-columns: 1fr; } .pv-who.two { grid-template-columns: 1fr; } .pv-hold { flex-wrap: wrap; } }

/* Quick VOB, the call: on a phone each level of care stays four short fields in two rows, not eight stacked. */
.vob-level { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 6px 12px 10px; margin: 0 0 10px; }
.vob-level legend { font-weight: 600; padding: 0 4px; }
@media (max-width: 760px) { .grid.vob-lv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.vob-auth { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vob-auth.done { opacity: .6; } .vob-auth .btns { flex-wrap: wrap; }

/* The client form's authorization rows (was .auth, which is the sign-in page: a full-screen dark band; UX walk 10/20). */
.grid.auth-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.vob-next { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vob-next > span { font-weight: 600; margin-right: 4px; display: inline-flex; gap: 6px; align-items: center; }
.vob-setup { margin: 0 0 12px; padding-left: 0; list-style: none; display: grid; gap: 8px; } .vob-setup li.ok { color: var(--muted); }

/* Quick VOB, the answer at a glance (vobSummaryHtml). */
.vs-hero { padding: 16px 18px; border-left: 5px solid var(--muted); }
.vs-hero.t-ok { border-left-color: var(--ok); } .vs-hero.t-bad { border-left-color: var(--bad); } .vs-hero.t-warn { border-left-color: #d97706; }
.vs-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.vs-status { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.vs-status .ic { width: 22px; height: 22px; }
.t-ok .vs-status { color: var(--ok); } .t-bad .vs-status { color: var(--bad); } .t-warn .vs-status { color: #b45309; }
.vs-plan { font-size: 15px; font-weight: 600; margin-top: 6px; }
.vs-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.vs-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f1f5f9; color: var(--ink-2); }
.vs-chip .ic { width: 13px; height: 13px; }
.vs-chip.ok { background: #dcfce7; color: #166534; } .vs-chip.bad { background: #fee2e2; color: #991b1b; } .vs-chip.warn { background: #fef3c7; color: #92400e; }
.vs-chip.call { background: #eff4ff; color: var(--primary); }
.vs-alert { border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; border: 1px solid; }
.vs-alert.t-warn { background: #fffbeb; border-color: #fcd34d; color: #78350f; } .vs-alert.t-bad { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.vs-alert a { color: inherit; text-decoration: underline; }
.vs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.vs-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.vs-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.vs-v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.vs-sub { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-tile.met .vs-v { color: var(--ok); } .vs-tile.t-warn .vs-v { color: #b45309; } .vs-tile.t-ok .vs-v { color: var(--ok); } .vs-tile.t-muted .vs-v { color: var(--muted); font-size: 18px; }
.vs-bar { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 8px; } .vs-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.vs-levels { padding: 4px 16px 10px; }
.vs-lh, .vs-lr { display: grid; grid-template-columns: minmax(0, 1.6fr) .9fr .9fr minmax(0, 1.6fr); gap: 8px; align-items: center; padding: 8px 0; }
.vs-lh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-bottom: 4px; }
.vs-lr { border-top: 1px solid var(--line); } .vs-ll { font-weight: 600; font-size: 13px; }
.vs-src { display: block; font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vs-lr .small .muted { margin-top: 2px; } .vs-lnote { border-top: 1px solid var(--line); padding-top: 8px; }
.vob-lvpick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); } .vob-lvpick .chips { margin-top: 8px; } .vob-lvpick .chip { padding: 7px 14px; font-size: 13.5px; }
.vs-more > summary, .vob-call > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .vs-more > summary::-webkit-details-marker { display: none; }
.vs-more > summary h2::after, .vob-call > summary h2::after { content: " ▾"; color: var(--muted); font-weight: 400; } .vs-more[open] > summary h2::after, .vob-call[open] > summary h2::after { content: " ▴"; }
.vob-call > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  .vs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vs-tiles .vs-tile:last-child:nth-child(odd) { grid-column: span 2; }
  .vs-lh, .vs-lr { grid-template-columns: minmax(0, 1.3fr) .9fr .9fr; } .vs-lh span:last-child { display: none; } .vs-lr > span:last-child { grid-column: 1 / -1; color: var(--muted); }
  .vs-lr > span:last-child:empty { display: none; } .vs-status { font-size: 18px; }
}
.vs-step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.vob-shot { min-height: 132px; border-radius: 12px; background: linear-gradient(180deg, #f8fafc, #eef2ff); transition: border-color .15s, background .15s; cursor: pointer; }
.vob-shot:hover { border-color: var(--primary); }
.vob-shot > span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--primary); }
.vob-shot > span .ic { width: 28px; height: 28px; } .vob-shot > span b { color: var(--ink); font-weight: 650; } .vob-shot > span i { font-style: normal; font-size: 12px; color: var(--muted); }
.vob-shot.done > span .ic, .vob-shot.done > span i { display: none; }
/* Kind of care: three short choices in a row, on a phone too (10/20, Ryan: "way too big"). */
.vob-care { flex-direction: row; flex-wrap: wrap; } .vob-care .chip { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; padding: 10px 8px; font-size: 13.5px; }
.vs-strip { margin-bottom: 12px; } a.vs-tile { color: inherit; text-decoration: none; } a.vs-tile:hover { border-color: var(--primary); }
.vs-strip .t-warn .vs-v { color: #b45309; }
.vob-list .vob-row { align-items: center; } .vob-list .vob-row > .vs-who { flex: 1; min-width: 0; }
.vs-av { flex: none; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary); font-weight: 700; font-size: 13px; }
/* The call, one row per level of care on a computer; two by two on a phone. */
.vob-levels { display: grid; gap: 0; }
.vob-lvh, .vob-level { display: grid; grid-template-columns: 110px 1fr 1fr 1.2fr 1.6fr; gap: 10px; align-items: center; }
.vob-lvh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 0 6px; }
.vob-level { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0; margin: 0; }
.vob-level .vob-ll { font-weight: 650; font-size: 13px; }
.vob-level .vob-lv { display: contents; } .vob-level .vob-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) {
  /* The level's name on the left; covered and auth, then days and notes, beside it. The boxes say what they are. */
  .vob-lvh { display: none; }
  .vob-level { grid-template-columns: 78px repeat(2, minmax(0, 1fr)); gap: 6px 8px; padding: 8px 0; }
  .vob-level .vob-ll { grid-row: span 2; align-self: start; padding-top: 9px; }
}
.vob-call > form > .bd { padding: 0 16px 14px; }
.vob-ai { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 2px 0 12px; } .vob-ai .small { flex: 1 1 220px; }
.vob-tr p { margin: 6px 0; font-size: 14px; line-height: 1.45; } .vob-tr b { color: var(--ink-2); }
.vob-addauth > summary { list-style: none; display: inline-flex; } .vob-addauth > summary::-webkit-details-marker { display: none; } .vob-addauth[open] > summary { display: none; } .vob-dial { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; } .vob-dial > .ic { color: var(--primary); }
.vs-ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 12px 0 4px; }
.vs-alert .btn { margin-left: 6px; vertical-align: middle; }
/* The answer: what the client owes, the network, what's left to do. */
.vs-answer { padding: 14px 18px 12px; border-left: 4px solid var(--ok, #15803d); margin-bottom: 12px; }
.vs-answer.t-warn { border-left-color: #d97706; } .vs-answer.t-bad { border-left-color: #b91c1c; background: #fef2f2; }
.vs-ah { display: flex; align-items: center; gap: 8px; font-size: 17px; line-height: 1.3; } .vs-ah .ic { flex: none; width: 20px; height: 20px; color: #15803d; }
.vs-answer.t-warn .vs-ah .ic { color: #d97706; } .vs-answer.t-bad .vs-ah .ic, .vs-answer.t-bad .vs-ah b { color: #b91c1c; }
.vs-answer ul { margin: 8px 0 0; padding-left: 20px; } .vs-answer li { margin: 4px 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.vs-hero .vob-thumbs img { width: 120px; height: 76px; }
@media (max-width: 760px) { .vs-hero .vob-thumbs img { width: 96px; height: 60px; aspect-ratio: auto; } .vs-alert .btn { margin: 6px 0 0; display: flex; } }

/* The 10/20 refresh (Ryan: "the interface is a bit too basic"): softer depth, rounder corners, weightier buttons, a
   clear focus ring, a richer sidebar. Overrides only, so every screen picks it up. */
:root { --r: 8px; --rc: 12px; --bg: #f3f5fa; --line: #e3e8f0; }
.card { border-radius: var(--rc); box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px -18px rgba(15,23,42,.18); }
.card > .hd { padding: 14px 18px; } .card > .bd { padding: 16px 18px; }
.btn { height: 34px; border-radius: var(--r); padding: 0 14px; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #2f5bd3, #1e40af); border-color: #1e3a9a; box-shadow: 0 1px 2px rgba(30,64,175,.35), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: linear-gradient(180deg, #2a52c2, #1c3a9e); }
.btn.sm { height: 28px; } .btn.big { height: 44px; font-size: 15px; border-radius: 10px; }
input, select, textarea { border-radius: var(--r); min-height: 36px; padding: 7px 10px; border-color: #d3dae5; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2f5bd3; box-shadow: 0 0 0 3px rgba(47,91,211,.16); }
.side { background: linear-gradient(180deg, #0b1324 0%, #111d38 100%); }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; border-bottom-color: rgba(255,255,255,.06); }
.brand-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; background: #1e40af; position: relative; overflow: hidden; box-shadow: 0 4px 12px -4px rgba(59,130,246,.6); }
.brand-mark::before { content: ""; position: absolute; inset: 0; background: #14b8a6; clip-path: polygon(0 100%, 34% 46%, 52% 70%, 70% 30%, 100% 100%); }
.nav a { border-radius: 9px; padding: 9px 12px; position: relative; } .nav a:hover { background: rgba(255,255,255,.06); }
.nav a.on { background: rgba(59,130,246,.18); color: #fff; } .nav a.on::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #60a5fa; }
.top { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); padding: 14px 28px; }
.top h1 { font-size: 20px; letter-spacing: -0.015em; }
.page { padding: 24px 28px 56px; }
.tile { border-radius: var(--rc); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
@media (max-width: 760px) { .top { padding: 10px 12px; } .page { padding: 14px 12px 40px; } }
.top .search .ic { top: 10px; }
.vs-hero { margin-bottom: 12px; } .vob-wrap { max-width: 1040px; }
/* Logo and documents (Settings). */
.brand .mark.has-logo { background: #fff; border: 1px solid var(--line); padding: 2px; } .brand .mark.has-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.brand-mark.has-logo { background: #fff; box-shadow: none; } .brand-mark.has-logo::before { display: none; }
.brand-mark img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.brand-logo { min-height: 72px; display: flex; align-items: center; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: #fff; }
.brand-logo img { max-height: 64px; max-width: 320px; object-fit: contain; }
.brand-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.brand-sw > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.brand-sw > i, .brand-sw > input[type=color] { width: 34px; height: 34px; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); padding: 0; }
.brand-sw > input[type=radio]:checked + i, .brand-sw > input[type=radio]:checked + input[type=color] { box-shadow: 0 0 0 2px var(--ink); }
.brand:has(.brand-mark.has-logo) { flex-wrap: wrap; } .brand-mark.has-logo { width: 100%; max-width: 184px; height: 46px; border-radius: 10px; }

/* Credentialing: the shared screens, framed (cred.js). */
.cred-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 0; border-radius: 12px; background: transparent; }
@media (max-width: 760px) { .cred-frame { height: calc(100vh - 120px); } }
