/* Pharmacy Portal - report aesthetic ported from the .ps1 HTML reports
   (Segoe UI, soft background, shaded uppercase table headers, zebra rows, tabular numerals,
   underlined section headers, KPI tiles). Layered over Bootstrap; restyles existing markup. */

:root {
  --ink: #1a2233;
  --mut: #6b7688;
  --line: #e4e8ef;
  --bg: #f6f8fb;
  --head: #eef2f8;
  --good: #0a7f4f;
  --bad: #c0392b;
  --warn: #d97706;
  --accent: #1f6feb;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}
@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin-bottom: 60px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

/* ---- nav / chrome ---- */
.navbar.bg-white { box-shadow: 0 1px 0 rgba(0, 0, 0, .04); }
.navbar-brand { font-weight: 700; color: var(--ink); }
.breadcrumb { font-size: .8rem; }

/* ---- headings ---- */
main h3 { font-weight: 700; font-size: 1.45rem; color: var(--ink); }
main h5:not(.card-title) {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.5rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--line);
}
.fw-semibold.text-uppercase.text-muted { letter-spacing: .04em; }

/* ---- cards / KPI tiles ---- */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.card .card-title { font-weight: 700; font-size: 1.05rem; }
.card-body .text-uppercase.small { letter-spacing: .04em; color: var(--mut); }

/* ---- tables: the report look ---- */
.container table.table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: .85rem;
  color: var(--ink);
}
.container table.table > thead > tr > th {
  background: var(--head);
  color: var(--mut);
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .04em;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.container table.table > tbody > tr > td,
.container table.table > thead > tr > th { padding: .45rem .7rem; }
.container table.table > tbody > tr > td { border-bottom: 1px solid var(--line); }
.container table.table > tbody > tr:last-child > td { border-bottom: 0; }
/* zebra, but never override a highlighted total row (.table-light) */
.container table.table > tbody > tr:nth-child(even):not(.table-light) > td { background: #fafbfd; }
/* numeric columns line up */
.container table.table .text-end { font-variant-numeric: tabular-nums; }
/* bordered variant (P&L / KPI tables) uses the soft line color */
.container table.table-bordered td,
.container table.table-bordered th { border: 1px solid var(--line); }

/* ---- KPI band (3-card top row, matches the HTML report tiles) ---- */
.kpi-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 1.1rem;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi-card.gray { background: #f3f6fa; }   /* light gray highlight (e.g. Gross Profit) */
.kpi-card.green { background: #eef6f1; }   /* light green highlight (e.g. Net Operating Income) */
.kpi-card.red { background: #fbeeec; }
.kpi-label { color: var(--mut); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.5rem; font-weight: 700; margin-top: 5px; line-height: 1.1; }
.kpi-value.sm { font-size: 1.05rem; }
.kpi-sub { color: var(--mut); font-size: .72rem; margin-top: 3px; }

/* ---- P&L highlighted rows (gray Gross Profit, green Net Operating Income) - beat zebra ---- */
.container table.table tr.pl-gp > td { background: #f3f6fa !important; font-weight: 600; }
.container table.table tr.pl-net > td { background: #eef6f1 !important; font-weight: 700; }
/* P&L-by-Entity cards: borderless compact table, no zebra (highlight rows above still win via !important) */
.card table.table { border: none; font-size: .8rem; }
.card table.table td { padding: .3rem .45rem; border-bottom: 1px solid var(--line); }
.container .card table.table > tbody > tr:nth-child(even) > td { background: #fff; }
.card table.table > tbody > tr:last-child > td { border-bottom: 0; }

/* ---- filter forms ---- */
form .form-label.small {
  color: var(--mut);
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .03em;
}

/* ---- positive / negative emphasis (match report greens/reds) ---- */
.text-success { color: var(--good) !important; }
.text-danger { color: var(--bad) !important; }
.text-warning { color: var(--warn) !important; }

/* ---- keep Bootstrap focus + form-floating behavior ---- */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder { text-align: start; }

/* Rx716 delivery map pins (Leaflet divIcon) */
.rx-pin span { display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; color:#fff; font-size:.78rem; font-weight:700; border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.45); }
.leaflet-container { font: inherit; }

/* ---- DASHBOARD STRUCTURE (2026-08-20) -----------------------------------------------------------------------
   Owner: "all the dashboards/control panels are getting longer and harder to follow ... give as much as possible
   on the visible screen." So this is deliberately DENSER than published admin templates, which optimise for
   looking good in a screenshot - big tiles, one metric each, generous whitespace. Density is the requirement. */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;                       /* panels size to content - no column of equal-height empty boxes */
}
.dash-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px 12px;
  min-width: 0;                             /* lets a wide table scroll INSIDE the panel instead of stretching it */
}
.dash-panel.dash-wide { grid-column: 1 / -1; }

.dash-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;                         /* keeps the title while a long body scrolls */
  top: 0;
  background: #fff;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  z-index: 1;
}
.dash-panel-head h2 { font-size: .95rem; font-weight: 700; margin: 0; }
.dash-count {
  background: #eef2f8; color: var(--ink); border-radius: 20px;
  font-size: .72rem; font-weight: 700; padding: 1px 8px;
}
.dash-toggle {
  margin-left: auto; border: 1px solid var(--line); background: #fff; color: var(--mut);
  border-radius: 6px; font-size: .7rem; padding: 1px 7px; cursor: pointer;
}
.dash-sub { color: var(--mut); font-size: .74rem; margin: 0 0 6px; }
.dash-empty { color: var(--mut); font-size: .78rem; margin: 4px 0; }
.dash-panel-body.is-collapsed { display: none; }

/* Compact tables: Bootstrap's default row height wastes about a third of the screen on a dense list. */
.dash-table { font-size: .78rem; margin-bottom: .35rem; }

/* CONTENT MUST NOT ESCAPE ITS PANEL. Measured: the reply-rule table rendered 561px wide inside a 302px panel and
   painted straight over its neighbour, because a regex like STOP|UNSUBSCRIBE is one unbreakable string.
   Two defences, because either alone is not enough:
     - the body clips and scrolls, so nothing can ever paint outside the panel;
     - long unbroken strings are allowed to wrap, so it rarely comes to scrolling in the first place. */
.dash-panel { overflow: hidden; }
.dash-panel-body { overflow-x: auto; }
.dash-table td, .dash-table th { overflow-wrap: anywhere; word-break: break-word; }
.dash-table code, .dash-set-key { overflow-wrap: anywhere; }
.container table.table.dash-table td,
.container table.table.dash-table th { padding: .28rem .4rem; vertical-align: top; }
/* No sticky thead: it fights the panel body's own scroll, and the panel header already holds context. */
.dash-table thead th { background: #fff; }

/* Settings block. The master switch is pinned first by DashboardSettings.Order - this only makes it LOOK first. */
.dash-settings .is-master > td { background: #f7f9fc; font-weight: 600; }
.dash-set-key { color: var(--mut); font-size: .68rem; font-family: ui-monospace, Consolas, monospace; }
.dash-set-value { white-space: nowrap; }
.dash-set-desc { color: var(--mut); }
.dash-state { font-weight: 700; font-size: .72rem; border-radius: 4px; padding: 1px 6px; }
.dash-state.on { background: #eef6f1; color: #0a7f4f; }
.dash-state.off { background: #fbeeec; color: #b3261e; }
.dash-pill {
  background: var(--brand); color: #fff; border-radius: 20px;
  font-size: .62rem; font-weight: 700; padding: 1px 7px; margin-left: 6px; text-transform: uppercase;
}
.dash-off-banner {
  background: #fbeeec; border: 1px solid #f3cfca; color: #8a2018;
  border-radius: 8px; padding: 6px 10px; font-size: .78rem; margin: 0 0 8px;
}

/* ---- FULL-WIDTH DASHBOARDS -----------------------------------------------------------------------------------
   Desktop-only internal portal: no responsive work, and no reason to keep Bootstrap's 1140px container cap on a
   page whose whole job is showing as much as possible at once. A dashboard page puts .dash-page on its wrapper.

   Capped at 2000px rather than truly edge-to-edge: past that a table row is wider than the eye tracks comfortably
   and the density stops buying anything. */
.dash-page {
  /* Full-bleed OUT of the Bootstrap container this page sits inside. The :has() selector would also work in a
     modern browser, but this technique depends on nothing and is obvious to the next reader. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 18px;
}
.dash-page > .dash-inner { max-width: 2000px; margin: 0 auto; }

/* The page header strip: title, one line of what it is, and the state - answered before anything is read. */
.dash-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-bottom: 12px;
}
.dash-head h1 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.dash-head .dash-sub { margin: 0; }
.dash-head .dash-actions { margin-left: auto; display: flex; gap: 6px; }

/* ============================================================================================================
   STAFF CONTROL-CENTER DASHBOARD (Pages/Index) - board #40 role-aware + #81 one-structure, owner 2026-09-02.
   The approved-mockup look (handoffs/2026-09-02-staff-dashboard-mockup.html) ported onto the site tokens; the
   sd-* classes are scoped to the home dashboard so nothing else restyles. --navy/--orange extend :root. ============ */
:root { --navy: #10356B; --orange: #FF9454; }
.sd-page { display: flex; flex-direction: column; gap: 10px; }
.sd-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; align-items: start; }
.sd-3 { grid-column: span 3; } .sd-4 { grid-column: span 4; } .sd-5 { grid-column: span 5; }
.sd-6 { grid-column: span 6; } .sd-7 { grid-column: span 7; } .sd-8 { grid-column: span 8; } .sd-12 { grid-column: 1 / -1; }
@media (max-width: 900px) { .sd-3, .sd-4, .sd-5, .sd-6, .sd-7, .sd-8 { grid-column: 1 / -1; } }

.sd-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.sd-ch { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sd-ch h2 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ink); }
.sd-r { display: flex; gap: 10px; align-items: center; font-size: .8rem; }
.sd-how { color: var(--mut); font-weight: 500; font-size: .75rem; }
.sd-mut { color: var(--mut); }
.sd-empty { color: var(--mut); font-size: .82rem; padding: 8px 0; }
.sd-foot { font-size: .78rem; color: var(--mut); margin-top: 6px; }

/* block 1: personal strip (navy) */
.sd-me { display: flex; align-items: center; gap: 16px; color: #fff; border-radius: 10px; padding: 10px 16px;
         background: linear-gradient(90deg, #10356B, #0F4C8F 60%, #0471B8); }
.sd-me-main { min-width: 0; }
.sd-me h2 { color: #fff; font-size: 1.15rem; margin: 0; font-weight: 700; }
.sd-me p { margin: 3px 0 0; font-size: .82rem; color: #fff; }
.sd-me b { color: #fff; }
.sd-me .sd-mut { color: rgba(255,255,255,.72); }
/* #521: links on the navy greeting strip (the #508 delivery-route deep-link) render WHITE + underlined. Without this
   they inherit --accent blue (#1f6feb) on the navy gradient (#10356B..) - a contrast fail that reads as unclickable. */
.sd-me a { color: #fff; text-decoration: underline; }
.sd-me-clock { margin-left: auto; white-space: nowrap; display: flex; align-items: center; gap: 6px; }

/* block 2: exceptions list */
.sd-ex { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; column-gap: 12px; align-items: center;
         padding: 6px 0; border-bottom: 1px solid #f0f2f5; }
.sd-ex:last-child { border-bottom: 0; }
.sd-n { font-size: 1.3rem; font-weight: 700; min-width: 30px; text-align: right; }
.sd-n.bad { color: var(--bad); } .sd-n.warn { color: var(--warn); } .sd-n.ok { color: var(--good); }
.sd-ex-t { min-width: 0; }
.sd-ex-t .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-ex-t .s { font-size: .8rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-ex .w { font-size: .75rem; color: var(--mut); white-space: nowrap; }
.sd-rollups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }

/* block 3: automation ledger */
.sd-led { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 10px; row-gap: 5px; align-items: baseline; font-size: .82rem; }
.sd-led b { font-size: .95rem; color: var(--good); text-align: right; }
.sd-led b.no { color: var(--warn); } .sd-led span.no { color: var(--warn); }

/* #474 the two home cards side by side: the grid children must be allowed to shrink below their table's intrinsic
   width, or a 5-column matrix in the 5/12 column forces the whole row wide. the sd-mx matrix panel has overflow:hidden. */
.sd-cards > div { min-width: 0; }

/* #474 WORK QUEUES strip: slim, counts + deep links only (no item rows). A wrap-friendly row of signpost pills. */
.sd-wq .sd-wq-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.sd-wq-item { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid var(--line);
    border-radius: 999px; padding: 4px 12px; background: #fff; color: var(--ink); font-size: .84rem; }
.sd-wq-item:hover { background: #f6f8fb; }
.sd-wq-item .l { color: var(--mut); }
.sd-wq-item .n { font-weight: 800; }
.sd-wq-item .n.warn { color: var(--warn); }
.sd-wq-item .n.bad, .sd-wq-item.bad { color: var(--bad); }
.sd-wq-item.bad { border-color: var(--bad); background: #fdecec; }
.sd-wq-item.bad .l { color: var(--bad); }

/* block 5b (#256): weekly capture scoreboard - per-store contact-capture, Holland vs Springville side by side */
.sd-cap .sd-cap-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.sd-cap-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: .84rem; }
.sd-cap-store { font-weight: 800; color: var(--ink); min-width: 84px; }
.sd-cap-stat { color: var(--mut); }
.sd-cap-stat b { color: var(--ink); font-weight: 800; }
.sd-cap-src { color: var(--mut); font-weight: 500; }

/* block 4: timeline chips */
.sd-tl { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-tc { flex: 1; min-width: 130px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 5px; padding: 6px 8px; background: #fff; }
.sd-tc.o { border-left-color: var(--orange); } .sd-tc.g { border-left-color: var(--good); } .sd-tc.p { border-left-color: #6f42c1; }
.sd-tc .d { font-size: .7rem; font-weight: 700; color: var(--mut); letter-spacing: .04em; }
.sd-tc .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-tc .s { font-size: .74rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* block 5: dark KPI band (rendered by _DashKpiBand) */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dk { background: #1a2233; color: #fff; border-radius: 10px; padding: 9px 12px; min-width: 0; position: relative; overflow: hidden; }
.dk-good { background: #0a5c3c; } .dk-warn { background: #7a4a06; } .dk-bad { background: #7a2620; }
.dk-l { font-size: .68rem; color: #aab4c3; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-v { font-size: 1.3rem; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.dk-d { font-size: .68rem; margin-top: 2px; color: #cdd6e2; position: relative; z-index: 1; }
.dk-d.up { color: #5fd39a; } .dk-d.dn { color: #ff8a80; } .dk-d.fl { color: #ffcf6b; }
.dk-spark { position: absolute; right: 8px; bottom: 8px; width: 60px; height: 22px; opacity: .85; }
.dk-link { position: absolute; inset: 0; z-index: 2; }

/* block 6: CSS bar charts (rendered by _DashBars) */
.sd-plot { position: relative; display: flex; align-items: flex-end; gap: 14px; padding-top: 4px; }
.sd-goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--warn); }
.sd-bars2 { flex: 1; display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.sd-bars2 i { display: block; width: 16px; max-width: 42%; border-radius: 3px 3px 0 0; background: #c9d6ea; }
.sd-bars2 i.a { background: var(--accent); }
.sd-xrow { display: flex; gap: 14px; margin-top: 3px; }
.sd-xrow span { flex: 1; text-align: center; font-size: .66rem; color: var(--mut); }

/* block 7: section cards */
.sd-sec { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sd-sc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.sd-sc .h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sd-sc .h a:first-child { font-size: .9rem; font-weight: 700; }
.sd-row { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; padding: 3px 0; border-bottom: 1px solid #f0f2f5; }
.sd-row:last-of-type { border-bottom: 0; }
.sd-acts { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

/* block 8: ask + feedback */
.sd-ask { display: flex; gap: 8px; }
.sd-in { flex: 1; border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; background: #fff; color: var(--ink); }

/* ---- SECTION DASHBOARD additions (#285): same sd-* family, blocks the home does not have ---- */
/* block 1: the section's switches as pills, on the navy strip */
.sd-sw { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.sd-sw span { border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 1px 8px; font-size: .7rem; color: #fff; }
.sd-sw span.off { opacity: .6; text-decoration: line-through; }
/* block 5a: the LIGHT KPI strip (all roles); the dark band (.dk) stays owner/manager */
.sd-kl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.sd-k { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.sd-k .l { font-size: .68rem; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-k .v { font-size: 1.25rem; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.sd-k .v.good { color: var(--good); } .sd-k .v.warn { color: var(--warn); } .sd-k .v.bad { color: var(--bad); }
.sd-k .d { font-size: .68rem; color: var(--mut); margin-top: 1px; }
/* block 6: run buttons, each with its last run_ledger line */
.sd-runs { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-run { flex: 1; min-width: 190px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.sd-run .t { font-weight: 600; }
.sd-run .s { font-size: .72rem; color: var(--mut); margin-top: 2px; }
.sd-run .go { margin-top: 6px; }

/* ============================================================================================================
   CUSTOMER COMMUNICATIONS (Pages/Shared/_MessageHome.cshtml + Pages/Communications.cshtml) - board #466/#467,
   owner-approved mockup v2 2026-09-17. The #390 card grown into a MATRIX: a row per inbound channel, a column per
   disposition. The alarm colours are the mockup's own literals, deliberately: a red that means "somebody has been
   waiting past four business hours" must not drift with a theme tweak. Scoped to cc-* and mh-bar, so it restyles
   nothing else, and it renders on BOTH dashboard pages - under the v2 greeting band, atop the legacy one (the 9/12
   placement ruling). At all-zero the card collapses to the slim green mh-bar (kept from #390).
   #488: the two home matrix cards wear the STANDARD .sd-card panel like every other home card (no one-off). sd-mx is
   only the content modifier that keeps the matrix EDGE-TO-EDGE (no inner padding) and clips it to the card radius,
   exactly as sd-cap / sd-wq extend .sd-card with a content modifier. The internals stay cc-* (head/mx/foot). */
.sd-card.sd-mx { padding: 0; overflow: hidden; }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #eef1f5; }
.cc-head h2 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ink); }
.cc-badge { border-radius: 12px; padding: 2px 11px; font-size: .82rem; font-weight: 800; background: #e8edf5; color: var(--ink); white-space: nowrap; }
.cc-badge.hot { background: #c62828; color: #fff; }
.cc-badge.ok  { background: #e9f5ea; color: #2e7d32; }
table.cc-mx { width: 100%; border-collapse: collapse; }
.cc-mx th { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); font-weight: 700;
            text-align: center; padding: 8px 6px 6px; border-bottom: 1px solid #eef1f5; white-space: nowrap; }
.cc-mx th.chcol { text-align: left; padding-left: 14px; }
.cc-mx th .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: baseline; }
.cc-mx th .sw.need { background: var(--bad); }  .cc-mx th .sw.jrn { background: var(--accent); }
.cc-mx th .sw.stuck { background: var(--warn); } .cc-mx th .sw.done { background: var(--good); }
.cc-mx td { padding: 9px 6px; border-bottom: 1px solid #f4f6f9; text-align: center; vertical-align: middle; }
.cc-mx tr:last-child td { border-bottom: 0; }
.cc-mx td.ch { text-align: left; padding-left: 14px; font-size: .84rem; font-weight: 600; color: var(--ink); }
.cc-mx td.ch .note { display: block; font-size: .7rem; color: var(--mut); font-weight: 400; }
.cc-mx .cell { display: inline-block; min-width: 30px; border-radius: 11px; padding: 1px 9px; font-size: .84rem; font-weight: 800; text-decoration: none; }
.cc-mx .cell:hover { filter: brightness(.94); }
.cc-mx .cell.need { background: var(--bad); color: #fff; }
.cc-mx .cell.jrn { background: #e9f1ff; color: var(--accent); }
.cc-mx .cell.stuck { background: #fdeeda; color: #9a5b00; }
.cc-mx .cell.done { background: #e7f4ee; color: var(--good); }
.cc-mx .cell.zero { background: transparent; color: #c3cad6; font-weight: 600; }
/* #474 the per-viewer "Staff messages - to you" row: a PERSONAL bottom row, set apart from the patient channels above.
   .dash = a disposition that does not apply (a muted em-dash, read differently from a real zero); .personal = the
   neutral count pill (never the red "need" style - unread is not a four-business-hour patient alarm). */
.cc-mx tr.row-personal td { border-top: 2px solid #eef1f5; background: #fafbfd; }
.cc-mx tr.row-personal td.ch { color: var(--mut); font-weight: 700; }
.cc-mx .cell.dash { background: transparent; color: #c3cad6; font-weight: 600; }
.cc-mx .cell.personal { background: #eef2f8; color: var(--ink); }
.cc-mx .hotnote { display: block; font-size: .66rem; color: var(--bad); font-weight: 700; margin-top: 2px; }
.cc-foot { padding: 8px 14px; color: var(--mut); font-size: .74rem; border-top: 1px solid #eef1f5; }
/* the all-clear (owner 9/12): a slim ONE-LINE green bar, not the tall empty card. Still always rendered. */
.mh-bar { display: flex; align-items: center; gap: 8px; background: #e9f5ea; border: 1px solid #cde6d0; border-radius: 10px;
          padding: 7px 14px; color: #2e7d32; font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.mh-bar .mh-tick { font-size: 1rem; line-height: 1; }
/* inside the v2 page the sd-page flex gap (10px) does the spacing; the margin above is for the legacy page, which has none */
.sd-page .mh-bar { margin-bottom: 0; }

/* PATIENT JOURNEYS (board #469) - the comms card's sibling, rendered through the SAME cc-mx matrix drawer. Only the
   journey-specific extras live here (the chip, the health dot, the two extra cell colours, the shadow cell, the muted
   OFF row); everything else is inherited from cc-* above. Alarm colours are literals, like the comms card, so "amber =
   would-have preview" and the red never drift with a theme tweak. */
.cc-mx td.ch .chip { display: inline-block; border-radius: 10px; padding: 1px 9px; font-size: .66rem; font-weight: 800;
                     letter-spacing: .03em; vertical-align: middle; margin-left: 7px; }
.cc-mx td.ch .chip.on { background: var(--good); color: #fff; }
.cc-mx td.ch .chip.shadow { background: #fdf1e0; color: #9a5b00; border: 1px solid #f0d9ad; }
.cc-mx td.ch .chip.off { background: #edf0f5; color: #9aa4b5; }
.cc-mx td.ch .tick { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 7px; vertical-align: middle; }
.cc-mx td.ch .tick.ok { background: var(--good); } .cc-mx td.ch .tick.skip { background: #c9cfda; } .cc-mx td.ch .tick.err { background: var(--bad); }
.cc-mx .cell.fly { background: #e9f1ff; color: var(--accent); }
.cc-mx .cell.wait { background: #eef2f8; color: var(--ink); }
.cc-mx .cell.shadow { background: #fff; border: 1px dashed #e3c98f; color: #9a5b00; font-style: italic; font-weight: 700; }
.cc-mx tr.row-off td { opacity: .55; }

/* ================= PATIENT JOURNEYS #489: the summary home card, the rows page, the activity detail page ==========
   The home card became a SUMMARY (Variant B): five numbers + an exceptions-only line + the arm line. The rows moved to
   their own page (/Journeys/Dashboard, no id), and a NEW per-journey activity page (/Journeys/Detail/{id}) shows what
   went out and what came back. Owner ruling 2026-09-19: "we need drill-down pages, not long lists." */

/* -- the summary home card: it wears the standard .sd-card/.cc-head chrome; the strip and lines are its own -- */
/* #497: a GRID of equal columns, never a wrapping flex - in the narrow sd-5 home column the flex-wrap orphaned the
   5th cell (flex:1 1 0) alone on a second row, stretched to a full-width detached band. repeat(5,minmax(0,1fr))
   holds five equal cells on ONE row that shrink together (a label may wrap; a band never forms); the phone step-down
   goes to equal 3-wide columns (a clean 3+2), never a lone full-width cell. */
.jr-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; }
.jr-sum { min-width: 0; padding: 12px 10px 10px; text-align: center; border-right: 1px solid #f0f3f8; }
@media (max-width: 640px) { .jr-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jr-sum:last-child { border-right: 0; }
.jr-n { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--ink); text-decoration: none; }
a.jr-n:hover { color: var(--accent); }
.jr-n.need { color: var(--bad); } .jr-n.fly { color: var(--accent); } .jr-n.done { color: var(--good); }
.jr-n.shadow { color: #9a5b00; font-style: italic; }
.jr-lbl { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); font-weight: 700; margin-top: 3px; }
.jr-sub { font-size: .64rem; color: var(--bad); font-weight: 700; }
.jr-sub.quiet { color: var(--mut); font-weight: 400; }
.jr-attn { border-top: 1px solid #eef1f5; }
.jr-arow { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid #f4f6f9; font-size: .84rem; }
.jr-arow:last-child { border-bottom: 0; }
.jr-arow .tick { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.jr-arow .tick.err { background: var(--bad); } .jr-arow .tick.ok { background: var(--good); } .jr-arow .tick.skip { background: #c9cfda; }
.jr-who { font-weight: 700; color: var(--ink); }
.jr-detail { color: var(--mut); }
.jr-detail.hot { color: var(--bad); font-weight: 700; }
.jr-open { margin-left: auto; text-decoration: none; font-size: .74rem; }
.jr-arm { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 9px 14px; border-top: 1px solid #eef1f5; background: #fbfcfe; font-size: .78rem; color: var(--mut); }
.jr-arm b { color: var(--ink); }
.jr-dotchip { display: inline-flex; align-items: center; gap: 5px; }
.jr-dotchip .tick { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.jr-dotchip .tick.ok { background: var(--good); } .jr-dotchip .tick.err { background: var(--bad); }
.jr-arm-open { margin-left: auto; }
.jr-arm-open a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* -- the matrix rows page: the approved matrix (_Matrix reuse) + a page head + per-row action links -- */
.jr-page { max-width: 1060px; margin: 0 auto; padding: 4px 4px 24px; }
.jr-pagehead { padding: 14px 4px 8px; }
.jr-pagehead h1 { font-size: 1.25rem; margin: 0; display: inline; color: var(--ink); }
.jr-engine { display: inline-block; margin-left: 10px; border-radius: 10px; padding: 1px 10px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; vertical-align: middle; }
.jr-engine.on { background: var(--good); color: #fff; } .jr-engine.off { background: #edf0f5; color: #9aa4b5; }
.jr-pagehead .sub { color: var(--mut); font-size: .8rem; margin-top: 4px; max-width: 720px; }
.jr-pagehead .actions { margin-top: 8px; }
.jr-pagehead .actions a { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 3px 11px; font-size: .76rem; color: var(--ink); text-decoration: none; margin-right: 6px; background: #fff; }
.jr-pagehead .actions a:hover { border-color: var(--accent); color: var(--accent); }
.jr-scope { float: right; font-size: .76rem; }
.jr-scope a { display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 2px 11px; color: var(--mut); text-decoration: none; margin-left: 4px; }
.jr-scope a.cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.cc-mx td.ch a.jl { color: var(--ink); text-decoration: none; }
.cc-mx td.ch a.jl:hover { color: var(--accent); text-decoration: underline; }
.cc-mx th.rowlinks-h { text-align: right; }
.cc-mx td.rowlinks { white-space: nowrap; text-align: right; }
.cc-mx td.rowlinks a { font-size: .7rem; color: var(--accent); text-decoration: none; margin: 0 3px; }
.cc-mx td.rowlinks a:hover { text-decoration: underline; }

/* -- the per-journey activity detail page: KPI band + two ledgers + inline thread + the print packet -- */
.jd-page { max-width: 1060px; margin: 0 auto; padding: 4px 4px 28px; }
.jd-head { padding: 14px 4px 8px; }
.jd-head h1 { font-size: 1.25rem; margin: 0; display: inline; color: var(--ink); }
.jd-state { display: inline-block; margin-left: 10px; border-radius: 10px; padding: 1px 10px; font-size: .68rem; font-weight: 800; vertical-align: middle; }
.jd-state.on { background: var(--good); color: #fff; } .jd-state.shadow { background: #fdf1e0; color: #9a5b00; border: 1px solid #f0d9ad; } .jd-state.off { background: #edf0f5; color: #9aa4b5; }
.jd-head .tick { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 7px; vertical-align: middle; }
.jd-head .tick.ok { background: var(--good); } .jd-head .tick.err { background: var(--bad); } .jd-head .tick.skip { background: #c9cfda; }
.jd-head .sub { color: var(--mut); font-size: .8rem; margin-top: 4px; max-width: 760px; }
.jd-head .sub a { color: var(--accent); text-decoration: none; }
.jd-scope { float: right; font-size: .76rem; }
.jd-scope a { display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 2px 11px; color: var(--mut); text-decoration: none; margin-left: 4px; }
.jd-scope a.cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.jd-actions { margin-top: 8px; }
.jd-actions a, .jd-actions button { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 3px 11px; font-size: .76rem; color: var(--ink); text-decoration: none; margin-right: 6px; background: #fff; cursor: pointer; font-family: inherit; }
.jd-actions a:hover, .jd-actions button:hover { border-color: var(--accent); color: var(--accent); }
.jd-kpis { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 4px 14px; }
.jd-kpi { flex: 1 1 0; min-width: 118px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; text-align: center; }
.jd-kpi .n { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.jd-kpi .n a { color: inherit; text-decoration: none; }
.jd-kpi .n.good { color: var(--good); } .jd-kpi .n.warn { color: var(--warn); }
.jd-kpi .l { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); font-weight: 700; margin-top: 2px; }
.jd-kpi .s { font-size: .64rem; color: var(--mut); margin-top: 2px; }
.jd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 4px 16px; }
@media (max-width: 900px) { .jd-grid { grid-template-columns: 1fr; } }
.jd-panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.jd-ph { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid #eef1f5; }
.jd-ph h3 { font-size: .84rem; margin: 0; color: var(--ink); }
.jd-ph .cnt { font-size: .74rem; color: var(--mut); font-weight: 700; }
.jd-msg { padding: 10px 14px; border-bottom: 1px solid #f4f6f9; }
.jd-msg:last-child { border-bottom: 0; }
.jd-meta { font-size: .7rem; color: var(--mut); margin-bottom: 3px; }
.jd-meta b { color: var(--ink); font-size: .76rem; }
.jd-meta .st { float: right; font-weight: 700; }
.jd-meta .st.ok { color: var(--good); } .jd-meta .st.person { color: var(--warn); } .jd-meta .st.fail { color: var(--bad); }
.jd-bubble { background: #e9f1ff; border-radius: 10px; padding: 7px 11px; font-size: .82rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.jd-bubble.in { background: var(--head); }
.jd-bubble.shadow { background: #fff; border: 1px dashed #e3c98f; color: #9a5b00; font-style: italic; }
.jd-did { font-size: .74rem; color: var(--mut); margin-top: 5px; }
.jd-did b { color: var(--ink); } .jd-did .arrow { color: var(--accent); font-weight: 800; }
.jd-did .win { color: var(--good); }
.jd-tmpl, .jd-expand { font-size: .72rem; color: var(--accent); text-decoration: none; }
.jd-tmpl:hover, .jd-expand:hover { text-decoration: underline; }
.jd-foot { padding: 8px 14px; color: var(--mut); font-size: .72rem; border-top: 1px solid #eef1f5; }
.jd-foot a { color: var(--accent); text-decoration: none; }
.jd-thread { margin: 0 4px 16px; border: 1px dashed #c9d4e6; border-radius: 10px; background: #fcfdff; padding: 12px 16px; }
.jd-thread h3 { font-size: .84rem; margin: 0 0 8px; color: var(--ink); }
.jd-tl { list-style: none; margin: 0; padding: 0; }
.jd-tl li { position: relative; padding: 0 0 12px 22px; font-size: .82rem; color: var(--ink); }
.jd-tl li::before { content: ""; position: absolute; left: 6px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.jd-tl li.in::before { background: var(--warn); } .jd-tl li.sys::before { background: #c9cfda; } .jd-tl li.done::before { background: var(--good); }
.jd-tl li::after { content: ""; position: absolute; left: 9.5px; top: 15px; bottom: 0; width: 1px; background: var(--line); }
.jd-tl li:last-child::after { display: none; }
.jd-tl .when { color: var(--mut); font-size: .7rem; margin-right: 6px; }
.jd-empty { padding: 22px 14px; text-align: center; color: var(--mut); font-size: .82rem; }

/* ---- the /Communications click-through page: the unified inbound feed, pre-filtered to the clicked cell ---- */
.cc-page { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cc-crumb { padding: 10px 16px; font-size: .78rem; color: var(--mut); border-bottom: 1px solid #eef1f5; }
.cc-crumb a { color: var(--accent); text-decoration: none; }
.cc-crumb b { color: var(--ink); }
.cc-pgh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 8px; }
.cc-pgh h1 { font-size: 1.1rem; margin: 0; color: var(--ink); }
.cc-cnt { font-size: .8rem; color: var(--mut); }
.cc-filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding: 0 16px 11px; }
.cc-chip { border-radius: 16px; padding: 3px 12px; font-size: .78rem; font-weight: 700; background: var(--head); color: var(--ink); }
.cc-chip.need { background: var(--bad); color: #fff; }
.cc-chip.jrn { background: #e9f1ff; color: var(--accent); }
.cc-chip.stuck { background: #fdeeda; color: #9a5b00; }
.cc-chip.done { background: #e7f4ee; color: var(--good); }
.cc-clear { font-size: .76rem; color: var(--accent); text-decoration: underline; }
.cc-feed { border-top: 1px solid var(--line); }
.cc-frow { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid #f1f4f9; text-decoration: none; color: var(--ink); }
.cc-frow:hover { background: #f9fbfe; color: var(--ink); text-decoration: none; }
.cc-frow.need { box-shadow: inset 4px 0 0 var(--bad); background: #fffaf9; }
.cc-frow.stuck { box-shadow: inset 4px 0 0 var(--warn); }
.cc-chan { flex: 0 0 92px; font-size: .68rem; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.cc-chan .icn { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.cc-chan .icn.web { background: #7c4dff; }  .cc-chan .icn.text { background: #0aa; }
.cc-chan .icn.portal { background: var(--accent); } .cc-chan .icn.fb { background: var(--warn); }
.cc-chan .icn.orders { background: #5c6bc0; }   /* #474 store orders - its own swatch on the /Communications rail */
.cc-body { flex: 1 1 auto; min-width: 0; }
.cc-who { font-weight: 700; font-size: .9rem; }
.cc-prev { color: #33405a; font-size: .82rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta { color: var(--mut); font-size: .72rem; margin-top: 3px; }
.cc-meta .agehot { color: var(--bad); font-weight: 700; }
.cc-disp { flex: 0 0 auto; text-align: right; min-width: 140px; }
.cc-pill { display: inline-block; border-radius: 20px; padding: 3px 11px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.cc-pill.need { background: var(--bad); color: #fff; }
.cc-pill.jrn { background: #e9f1ff; color: var(--accent); font-weight: 700; }
.cc-pill.stuck { background: #fdeeda; color: #9a5b00; }
.cc-pill.done { background: #e7f4ee; color: var(--good); font-weight: 700; }
.cc-subact { display: block; font-size: .7rem; color: var(--mut); margin-top: 4px; }
.cc-subact.resp { color: var(--bad); font-weight: 700; }
.cc-empty { padding: 28px 16px; text-align: center; color: var(--mut); font-size: .85rem; }
@media (max-width: 640px) {
  .cc-mx th, .cc-mx td { padding-left: 8px; padding-right: 4px; }
  .cc-disp { min-width: 0; }
  .cc-prev { white-space: normal; }
}

/* ---- #446 engine C7a: the WALK EDITOR (/Journeys/Walk) - the .jd-* page family + the walk's own pieces, after the
   APPROVED mockup handoffs/2026-10-01-walk-editor-mockup.html (steps rail, answers table, governance card, amber preview) ---- */
.wk-page { max-width: 1240px; }
.wk-msg { margin: 8px 4px; }
.wk-pill { display: inline-block; margin-left: 8px; border-radius: 8px; padding: 1px 8px; font-size: .64rem; font-weight: 800; background: #fdf1e0; color: #9a5b00; border: 1px solid #f0d9ad; vertical-align: middle; }
.wk-cols { display: grid; grid-template-columns: 8fr 4fr; gap: 14px; padding: 6px 4px 14px; }
@media (max-width: 900px) { .wk-cols { grid-template-columns: 1fr; } }
.wk-cols .jd-panel, .wk-preview { margin-bottom: 14px; }
.wk-rail { display: flex; gap: 8px; padding: 12px 14px; overflow-x: auto; }
.wk-step { flex: 1 1 0; min-width: 150px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; color: var(--ink); text-decoration: none; display: block; }
.wk-step:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.wk-step.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #f6f9ff; }
.wk-step .k { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.wk-step .k.ask { color: var(--accent); } .wk-step .k.task { color: var(--warn); }
.wk-step .t { display: block; font-size: .8rem; font-weight: 600; margin-top: 2px; }
.wk-step .m { display: block; font-size: .68rem; color: var(--mut); margin-top: 3px; }
.wk-fields { padding: 6px 14px 10px; }
.wk-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid #f2f4f8; align-items: start; font-size: .8rem; }
.wk-row:first-child { border-top: 0; }
.wk-row .fl { font-size: .72rem; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; padding-top: 3px; }
.wk-copy { font-family: Consolas, "Courier New", monospace; font-size: .8rem; background: var(--head); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wk-anchor { display: flex; gap: 8px; flex-wrap: wrap; }
.wk-anchor span { font-size: .76rem; border: 1px solid var(--line); border-radius: 7px; padding: 2px 9px; background: #fff; }
table.wk-it { width: 100%; border-collapse: collapse; font-size: .76rem; }
table.wk-it th { text-align: left; background: var(--head); color: #4a5568; font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.wk-it td { padding: 6px 8px; border-bottom: 1px solid #f2f4f8; vertical-align: top; }
table.wk-it .seed { color: #4a5568; }
table.wk-it .then { font-weight: 700; color: var(--ink); }
table.wk-it .zero { color: #b6bdc9; }
.wk-it .cls { display: inline-block; font-size: .62rem; font-weight: 800; text-transform: uppercase; border-radius: 8px; padding: 1px 7px; background: #eef2f7; color: #33475b; }
.wk-it .cls.decision { background: #e7f5ee; color: var(--good); } .wk-it .cls.clinical { background: #fdecea; color: var(--bad); }
.wk-it .cls.handoff { background: #f3eefb; color: #6b3fb0; } .wk-it .cls.info { background: #e9f1ff; color: #1a4fb0; }
.wk-it .cls.suppress { background: #f4f4f4; color: #555; }
.wk-fixed { border: 1px dashed #c9d4e6; border-radius: 9px; background: #fcfdff; padding: 9px 12px; font-size: .74rem; color: #3b4a5e; margin-bottom: 14px; }
.wk-fixed ol { margin: 4px 0 0 18px; padding: 0; }
.wk-gov { padding-bottom: 10px; }
.wk-gov .dash-off-banner { margin: 10px 14px 4px; }
.wk-kv, .wk-gov > .small, .wk-gov > .wk-form, .wk-act, .wk-log, .wk-h4 { margin-left: 14px; margin-right: 14px; }
.wk-gov .kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #f2f4f8; font-size: .78rem; }
.wk-gov .kv .v { font-weight: 700; text-align: right; }
.wk-gov .kv .v.on { color: var(--good); } .wk-gov .kv .v.off { color: var(--bad); }
.wk-h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); margin-top: 12px; margin-bottom: 2px; }
.wk-act { border-top: 1px solid #eef1f5; padding: 4px 0; }
.wk-fact { color: #9a5b00; }
.wk-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.wk-form textarea, .wk-form input { flex: 1 1 160px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: .78rem; font-family: inherit; }
.wk-btn { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 3px 11px; font-size: .76rem; color: var(--ink); background: #fff; cursor: pointer; font-family: inherit; }
.wk-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.wk-log { list-style: none; padding: 0; font-size: .74rem; }
.wk-log li { padding: 3px 0; border-top: 1px solid #f4f6f9; }
.wk-list { margin: 8px 14px 6px; padding-left: 16px; font-size: .78rem; }
.wk-list li { margin: 3px 0; }
.wk-cols .jd-panel > .small { padding: 0 14px 10px; }
.wk-preview { border-color: #e3c98f; border-style: dashed; background: #fffdf8; }
.wk-preview .jd-ph { background: #fff8ec; border-bottom-color: #f0e2c4; }
.wk-preview .jd-ph h3 { color: #9a5b00; }
.wk-try { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; }
.wk-try input[name=try] { flex: 1 1 220px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: .82rem; }
.wk-try select { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: .8rem; }
.wk-verdict { margin: 0 14px 10px; border: 1px solid #f0e2c4; border-radius: 9px; background: #fff; padding: 9px 12px; font-size: .78rem; }
.wk-verdict .jd-bubble { margin-bottom: 6px; max-width: 520px; }
.wk-verdict .row { padding: 3px 0; margin: 0; display: block; }
.wk-verdict .lbl { display: inline-block; width: 110px; color: var(--mut); font-weight: 700; font-size: .7rem; text-transform: uppercase; }
.wk-verdict .nothing { color: #9a5b00; font-style: italic; font-weight: 700; margin-top: 4px; }
.wk-ledger { padding: 0 14px 12px; color: var(--mut); font-size: .72rem; }
/* #446 engine C7b-1: phrase routing on the walk editor - the add form, its warning (confirm), the phrase list + log */
.wk-phrases .wk-phraseform, .wk-phrases > .wk-warn { margin: 10px 14px 4px; }
.wk-phraseform input[name=phrase] { flex: 1 1 200px; }
.wk-phraseform select { border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: .78rem; }
.wk-pad { padding: 4px 14px 10px; }
.wk-pad summary { cursor: pointer; font-size: .76rem; color: var(--accent); }
.wk-warn { border: 1px solid #f0d9ad; background: #fdf1e0; color: #7a4a00; border-radius: 8px; padding: 8px 10px; font-size: .78rem; }
.wk-warn a { margin-left: 8px; font-size: .76rem; }
.wk-phrases .wk-it form { margin: 0; }
/* #446 engine C7b-2: the walk editor's step edit form */
.wk-editform { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.wk-editform label { font-size: .72rem; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; }
.wk-editform textarea { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-family: Consolas, "Courier New", monospace; font-size: .8rem; }
.wk-editform input[type=number] { width: 80px; flex: 0 0 auto; }
.wk-editform select { border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: .78rem; }
/* #446 engine C7b-2b: the walk editor's answer edits - one move per form, its actions as fields */
.wk-answers .wk-editform { border-top: 1px solid #f2f4f8; }
.wk-slot { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-slot input, .wk-slot select { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: .74rem; flex: 1 1 130px; }
.wk-slot input[type=number] { flex: 0 0 80px; }
/* #446 engine C7b-3: the approve panel - the exact words the approval switches on, or what refuses it */
.wk-plan { margin: 8px 14px 4px; }
.wk-plan .jd-bubble { margin: 4px 0; font-size: .78rem; }
/* #446 engine C8b: the learning panel - one suggestion card per reply pattern; a person confirms (routing only) */
.wk-sugg { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin: 8px 0; background: #fff; }
.wk-sugg .jd-bubble { margin: 0 0 4px 0; max-width: 520px; }
.wk-sugg .meta { font-size: .7rem; color: var(--mut); margin-bottom: 4px; }
.wk-sugg .kv { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #f2f4f8; font-size: .78rem; }
.wk-sugg .kv .v { font-weight: 700; text-align: right; }
.wk-sugg .copy { font-family: Consolas, "Courier New", monospace; font-size: .78rem; background: var(--head); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.wk-sugg .adds { color: var(--good); } .wk-sugg .held { color: #9a5b00; } .wk-sugg .blocked { color: var(--bad); }
.wk-sugg .acts { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wk-sugg .acts form { display: inline; }
.wk-sugg .cls { display: inline-block; font-size: .62rem; font-weight: 800; text-transform: uppercase; border-radius: 8px; padding: 1px 7px; background: #eef2f7; color: #33475b; }
.wk-sugg .cls.decision { background: #e7f5ee; color: var(--good); } .wk-sugg .cls.clinical { background: #fdecea; color: var(--bad); }
.wk-learn-step { font-size: .72rem; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
.wk-learn-none li { font-size: .76rem; margin: 3px 0; }
/* #446 engine C8b: the Journeys list engine rows - the open-the-walk door and the replies-to-teach reminder */
.jr-engines { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.jr-engines .jr-eh { padding: 8px 12px; border-bottom: 1px solid #eef1f5; font-weight: 700; font-size: .84rem; }
.jr-engines .jr-ei { padding: 4px 12px 8px; font-size: .74rem; color: var(--mut); }
.jr-engines table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.jr-engines td { padding: 6px 12px; border-top: 1px solid #f2f4f8; }
.jr-engines .jr-teach { font-weight: 700; color: var(--accent); }
.wk-loop .kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #f2f4f8; font-size: .78rem; }
.wk-loop .kv .v { font-weight: 700; text-align: right; } .wk-loop .kv .v.on { color: var(--good); } .wk-loop .kv .v.off { color: var(--bad); }
/* #446 engine C9c: a conversion candidate's card - the nightly comparison (seven nights + tonight) and the one-step Move */
.wk-cand .wk-streak { font-size: .84rem; margin-bottom: 6px; }
.wk-cand .wk-days { display: flex; gap: 4px; margin: 6px 0; }
.wk-cand .wk-day { flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 4px 2px; text-align: center; font-size: .66rem; background: #fff; }
.wk-cand .wk-day .dt { font-weight: 700; } .wk-cand .wk-day .src { color: var(--mut); }
.wk-cand .wk-day.clean { background: #e7f5ee; color: var(--good); } .wk-cand .wk-day.diff { background: #fdecea; color: var(--bad); }
.wk-cand .wk-day.missed, .wk-cand .wk-day.other { background: #f6f7f9; color: var(--mut); } .wk-cand .wk-day.tonight, .wk-cand .wk-day.pending { border-style: dashed; color: var(--mut); }
.wk-cand .kv { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #f2f4f8; font-size: .78rem; }
.wk-cand .kv .v { font-weight: 700; text-align: right; }
.wk-cand .wk-diff { margin: 8px 0; }
.wk-cand .wk-move { margin: 8px 0; } .wk-cand .wk-move summary { display: inline-block; cursor: pointer; list-style: none; }
.wk-cand .wk-confirm { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin-top: 6px; background: #fff; }
.wk-cand .wk-checks { list-style: none; padding-left: 0; font-size: .78rem; } .wk-cand .wk-checks li.ok { color: var(--good); } .wk-cand .wk-checks li.no { color: var(--bad); }

/* #620 cut 1 - Urgent words (Pages/Communications/UrgentWords; mockup handoffs/2026-10-02-trigger-words-admin-mockup.html).
   The alarm tints are LITERAL hex like the other alarm colors: they must not drift with a theme tweak. */
.uw-page .uw-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); margin-bottom: .4rem; font-weight: 600; }
.uw-page .uw-chip { display: inline-block; border: 1px solid var(--line); border-radius: 1rem; padding: .15rem .6rem; font-size: .82rem; background: #fff; margin: 0 .25rem .25rem 0; }
.uw-page .uw-chip.on { border-color: #a6e3c0; background: #ecfdf3; color: #0a5c38; font-weight: 600; }
.uw-page .uw-chip.daily { border-color: #f1c27d; background: #fff8ec; color: #7a4a00; }
.uw-page .uw-chip.off { border-color: #c7cdd8; background: var(--bg); color: #475569; }
.uw-page .uw-grp { border: 1px solid var(--line); border-radius: .5rem; background: #fff; margin-bottom: 1rem; }
.uw-page .uw-grp-h { padding: .5rem .75rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.uw-page .uw-grp.em .uw-grp-h { background: #fdecec; color: #8a1f15; }
.uw-page .uw-grp.cl .uw-grp-h { background: #fff8ec; color: #7a4a00; }
.uw-page .uw-word { padding: .4rem .75rem; border-top: 1px solid var(--line); font-size: .9rem; }
.uw-page .uw-word .uw-lbl { font-weight: 600; }
.uw-page .uw-word.off .uw-lbl { color: #9aa3b2; text-decoration: line-through; }
.uw-page .uw-lock { font-size: .72rem; border: 1px solid #c7cdd8; border-radius: .25rem; padding: 0 .35rem; color: #475569; background: var(--head); white-space: nowrap; }
.uw-page .uw-sp { display: inline-block; font-size: .78rem; border: 1px dashed #b7c3d6; border-radius: .25rem; padding: 0 .35rem; margin: .15rem .2rem 0 0; background: #fbfcfe; }
.uw-page .uw-sp.off { color: #9aa3b2; text-decoration: line-through; }
.uw-page .uw-mini { border: 0; background: transparent; color: var(--accent); font-size: .72rem; padding: 0 .1rem; }
.uw-page .uw-res { border-radius: .4rem; padding: .55rem .7rem; font-size: .88rem; }
.uw-page .uw-res.em { background: #fdecec; border: 1px solid #f3b4ae; color: #8a1f15; }
.uw-page .uw-res.cl { background: #fff8ec; border: 1px solid #f1c27d; color: #7a4a00; }
.uw-page .uw-res.none { background: #ecfdf3; border: 1px solid #a6e3c0; color: #0a5c38; }
.uw-page .uw-res.today { background: var(--bg); border: 1px dashed #c7cdd8; color: #475569; }
.uw-page .uw-hit { border-top: 1px solid rgba(0,0,0,.08); padding-top: .3rem; margin-top: .3rem; }
.uw-page .uw-how, .uw-page .uw-note { font-size: .8rem; color: #475569; }
.uw-page .uw-rule { font-size: .84rem; padding: .2rem 0; }
.uw-page .uw-ev { font-size: .84rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.uw-page .uw-ev:first-of-type { border-top: 0; }
/* #680 cut 3 - Held website forms (.hf-*): the system's amber SHADOW vocabulary (would-have, nothing happened), scoped. */
.hf-shadow-banner { background: #fdf1e0; border: 1px dashed #e3c98f; color: #9a5b00; }
.hf-reason { background: #fdf1e0; color: #9a5b00; border: 1px solid #f0d9ad; font-weight: 600; }
