/* Hallmark · checked: 2026-10-29 · genre: modern-minimal · theme: dusk (by request) · shape: app screen · v2.0.0 */
/* Rhino Squad web UI. Dependency-free; served under style-src 'self'.
   Design system: .ux-profile.md at the repo root and Dusk (tokens.css, linked before this file; change values there, not per page).
   Layout: a canvas on the page colour. Flat cards, ruled lists, one Rhino green signal for done and for the one primary action,
   amber for open items, and the evidence mark on report claims. Component rules follow docs/designs/admin-web-redesign.md (A4, A5). */

@font-face {
  font-family: "Wix Madefor Display";
  src: url("/static/wix-madefor-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Wix Madefor Text";
  src: url("/static/wix-madefor-text-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { color: var(--primary-hover); }
/* Headings: the A1 type table (docs/designs/admin-web-redesign.md). h1 and h2 use the display face; h3 is a card title, h4 and
   legend a muted sub-label. A heading has no margin of its own: the gap below it is --gap-title, set once here, on what follows
   the heading in main (the tour bubble sits outside it and keeps its own spacing) or on the title row that holds it. A row or grid that
   lays its children out itself takes the margin back. */
h1, h2, h3, h4, legend { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); }
h1 { font-size: var(--text-page); font-weight: var(--weight-page); line-height: var(--leading-page); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--text-section); font-weight: var(--weight-section); line-height: var(--leading-heading); }
h3 { font-size: var(--text-title); font-weight: var(--weight-title); line-height: var(--leading-title); }
h4, legend { font-size: var(--text-label); font-weight: var(--weight-label); line-height: var(--leading-label); color: var(--text-muted); }
main :is(h2:not(.visually-hidden), h3, h4) + * { margin-top: var(--gap-title); }
main :is(h2:not(.visually-hidden), h3, h4) + [hidden] + * { margin-top: var(--gap-title); }
main :is(.row, .account-name) > :is(h2, h3, h4) + * { margin-top: 0; }
.row:has(> h3) { margin-bottom: var(--gap-title); }
@media (max-width: 720px) {
  h1 { font-size: var(--text-page-narrow); }
}
p { margin: 0; text-wrap: pretty; }
pre {
  margin: var(--space-2) 0 0;
  padding: var(--space-3);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--color-paper);
  border-radius: var(--radius-control);
  font-family: var(--mono);
  font-size: var(--text-secondary);
}

/* Focus: always visible for keyboard users. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-2); z-index: 20;
  transform: translateY(-200%);
  padding: var(--space-2) var(--space-4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-control);
}
.skip-link:focus { transform: none; box-shadow: var(--shadow-overlay); }

/* ---- the shell (docs/designs/admin-web-redesign.md, B1) ----
   A desktop is two columns: the header is a 248px sidebar, sticky and full height, and main is the canvas beside it with the
   demo banner above it. Sidebar, top to bottom: brand, sections with the current section's pages nested under it, then
   Notifications, Help, "Show all settings" and the account card. The phone layout (a top bar and a bottom tab bar) is in the
   F8 block at the end, inside its max-width query. */
body:has(> .topbar) {
  display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh;
}
body:has(> .topbar) > * { grid-column: 2; }
body > .topbar { grid-column: 1; grid-row: 1 / 3; }
body > .demo-banner { grid-row: 1; }
body > main { grid-row: 2; }
.topbar {
  position: sticky; top: 0; z-index: 10; align-self: start;
  display: flex; flex-direction: column; gap: var(--space-5);
  height: 100vh; overflow-y: auto;
  padding: var(--space-5) var(--space-3) var(--space-4);
  background: var(--bg);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0 var(--space-2);
  font-family: var(--display); font-size: var(--text-title); font-weight: var(--weight-page); letter-spacing: var(--tracking-display);
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--text); }
/* The logo is a square on white, so it keeps a white tile in both themes. */
.brand-logo { width: 2rem; height: 2rem; border-radius: var(--radius-inner); background: var(--logo-bg); flex: none; }
.site-nav:empty { display: none; }
.site-nav, .account-links { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-nav > a, .account-links a {
  display: flex; align-items: center; gap: 0.625rem; min-height: 2.375rem; padding: 0 0.625rem;
  border-radius: var(--radius-inner); color: var(--text-muted); text-decoration: none; font-size: var(--text-body); font-weight: 600;
}
.site-nav > a:hover, .account-links a:hover { background: var(--color-hover); color: var(--text); }
/* The icon follows the label in the DOM (the label is the link's first child) and is drawn first. */
.icon { flex: none; order: -1; }
.site-nav > a[aria-current="page"] { background: var(--color-canvas); color: var(--text); box-shadow: var(--shadow-canvas); }
.site-nav > a[aria-current="page"] .icon { color: var(--color-signal); }
.account-links a[aria-current="page"] { color: var(--text); background: var(--color-hover); }
.account-links .nav-count { margin-left: auto; }
/* The pages of the current section, nested under its link. */
.sub-nav { display: flex; flex-direction: column; margin: 2px 0 6px 1.1875rem; padding-left: var(--space-3); border-left: 1px solid var(--border); }
.sub-nav a {
  display: flex; align-items: center; min-height: 2rem; padding: 0 0.625rem; border-radius: var(--radius-inner);
  color: var(--text-muted); text-decoration: none; font-size: var(--text-body);
}
.sub-nav a:hover { color: var(--text); background: var(--color-hover); }
.sub-nav a[aria-current="page"] { color: var(--color-signal); font-weight: 600; }
.account { display: flex; flex-direction: column; gap: var(--space-2); margin-top: auto; min-width: 0; }
/* Basic and Advanced (docs/designs/simplify-and-tour.md, section 4): app.js puts show-all on <body> when the person turned
   "Show all settings" on (and always for someone with no Basic view). Without it, an Advanced card is not shown. */
body:not(.show-all) [data-level="advanced"] { display: none; }
.toggle.show-all-field { justify-content: space-between; min-height: 2.375rem; padding: 0 0.625rem; color: var(--text-muted); font-size: var(--text-small); font-weight: 500; white-space: nowrap; }
/* The account card: the avatar, the name over the email, and Sign out as an icon button. Empty while nobody is signed in. */
.account-card {
  display: flex; align-items: center; gap: var(--space-2); min-width: 0; padding: 0.625rem;
  border-radius: var(--radius-inner); background: var(--color-canvas); box-shadow: var(--shadow-canvas);
}
.account-card:has(> .whoami:empty) { display: none; }
.whoami { flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.625rem; align-items: center; min-width: 0; line-height: 1.3; }
.whoami .avatar { grid-row: 1 / 3; }
.whoami-name, .whoami-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami-name { font-weight: 600; color: var(--text); }
.whoami-email { font-size: var(--text-small); color: var(--text-muted); }
.whoami-email:empty { display: none; }
#signout { flex: none; min-width: 2.25rem; min-height: 2.25rem; padding: 0; color: var(--text-muted); }
#signout:hover { color: var(--text); }
/* main is the canvas beside the sidebar, 12px from the window edge; its inline padding holds the content to --measure-page. */
body:has(> .topbar) > main.container {
  width: auto; margin: var(--space-3) var(--space-3) var(--space-3) 0;
  padding-inline: max(2.5rem, calc((100% - var(--space-3) - var(--measure-page)) / 2));
}

/* The phone pages row's edge fades: two covers that ride with the content, two shadows that stay on the edges, so a shadow shows
   only while that side can scroll. The rest of the row's phone rules are in the mobile block at the end. */
@media (max-width: 720px) {
  .sub-nav {
    background-image:
      linear-gradient(to right, var(--bg), var(--bg)), linear-gradient(to left, var(--bg), var(--bg)),
      linear-gradient(to right, color-mix(in srgb, var(--text) 22%, transparent), transparent),
      linear-gradient(to left, color-mix(in srgb, var(--text) 22%, transparent), transparent);
  }
}

/* ---- layout ---- */
/* main is the canvas: a white (dark: green-black) surface on the page colour, with the content measure inside its padding. The width
   adds the side padding (2.5rem each) to --measure-page. */
.container {
  width: min(100% - 1.5rem, calc(var(--measure-page) + 5rem)); margin: var(--space-3) auto;
  padding: var(--pad-canvas);
  background: var(--color-canvas); border-radius: var(--radius-canvas); box-shadow: var(--shadow-canvas);
}
/* Page head: the title, one muted line, the pickers on the right, and a hairline. 24px above the rule, 32px below. */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4) var(--space-5); flex-wrap: wrap;
  margin-bottom: var(--gap-head-after); padding-bottom: var(--gap-head);
  border-bottom: 1px solid var(--border);
}
.page-head > div:first-child { min-width: 0; max-width: 40rem; }
.lede { color: var(--text-muted); margin-top: var(--space-2); max-width: 70ch; }
.scope-bar { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.scope-bar .field { min-width: 11rem; }
/* The filter bar of the admin list pages: From, To, VA, the page's own control and Apply, wrapping instead of overflowing. */
.filter-bar { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.filter-bar .field { flex: 1 1 10rem; min-width: 0; }
.filter-bar .field-inline { flex: 0 1 auto; }
.filter-bar .btn { flex: none; }
.stack > * + * { margin-top: var(--space-4); }
/* cards, and the grids that hold them, sit a stack gap apart */
.stack > :is(.card, .grid-2, .list.cards) + *, .stack > * + :is(.card, .grid-2, .list.cards) { margin-top: var(--gap-stack); }
/* sections that sit straight in main (Home) keep the same card gap */
main > :is(.card, .stack) ~ :is(.card, .stack) { margin-top: var(--gap-stack); }
/* a section that is a stack of cards sits a section gap from the card or stack next to it (A4); a visually hidden heading or a
   hidden element between them does not count. Cards after that first one keep the stack gap. */
main > section.stack + :is(.card, .stack),
main > section.stack + :is(.visually-hidden, [hidden]) + :is(.card, .stack),
main > section.stack + :is(.visually-hidden, [hidden]) + :is(.visually-hidden, [hidden]) + :is(.card, .stack),
main > :is(.card, .stack) + section.stack,
main > :is(.card, .stack) + :is(.visually-hidden, [hidden]) + section.stack { margin-top: var(--gap-section); }
.stack-tight > * + * { margin-top: 0.35rem; }
.stack-tight > strong, .stack-tight > span { display: block; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-stack); }
.grid-2 > * { margin-top: 0 !important; }
.row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.grow { flex: 1 1 12rem; min-width: 0; }
.section-title { display: flex; gap: var(--space-2); align-items: baseline; flex-wrap: wrap; }

/* At 1100px and below, two-column page layouts become one column (B1). */
@media (max-width: 1100px) {
  .grid-2, .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
}
@media (max-width: 720px) {
  .container, body:has(> .topbar) > main.container { width: auto; margin: var(--space-2); padding: var(--pad-canvas-narrow); border-radius: var(--radius-card); }
  /* the pickers sit side by side, half the width each */
  .scope-bar { width: 100%; }
  .scope-bar .field { flex: 1 1 calc(50% - var(--space-3)); }
  .scope-bar .btn { width: 100%; }
}

/* ---- surfaces ---- */
/* The card: a flat paper-2 fill, no border and no shadow. Direct children are a field gap apart unless a rule below says more; a heading's own gap is set in the type rules. */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
}
:where(.card) > * + * { margin-top: var(--gap-field); }
.card-foot { margin-top: var(--space-4); font-size: var(--text-secondary); }
/* Notices explain how a page behaves: quiet text on the card fill, never an alarm. One that asks for an action is amber and holds the one primary button. */
.notice {
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-inner);
  background: var(--surface);
  color: var(--color-ink-2);
  font-size: var(--text-secondary);
  max-width: 70ch;
}
.notice:has(> .btn-primary) { background: var(--color-open-soft); border-color: var(--color-open-rule); }
.notice .btn:not(.btn-primary) { color: var(--text); }
.alert {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-inner);
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--primary-soft); color: var(--text); }
.signed-out, .needs-connection { max-width: 32rem; margin: 3rem auto; text-align: center; }
.signed-out > * + *, .needs-connection > * + * { margin-top: var(--space-4); }
/* The card a VA sees on a retired web page: the install button, where it goes, and three plain links. */
.retirement-card > * + * { margin-top: var(--space-3); }
.retirement-card .btn { display: inline-block; max-width: 100%; }
.retirement-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
/* Settings install link and the Team welcome message: full-width fields that never push the page sideways. */
#install-link-card .field { flex: 1 1 16rem; min-width: 0; }
#install-link-card input, #welcome-text { width: 100%; max-width: 100%; box-sizing: border-box; }
#welcome-text { font-family: inherit; overflow-wrap: anywhere; }
/* Join page (an invitation link): one centred card that never pushes the page sideways. */
.join-card { max-width: 36rem; margin: var(--space-6) auto 0; overflow-wrap: anywhere; }
.join-card .form-actions .btn { display: inline-block; max-width: 100%; text-align: center; }

/* ---- lists ---- */
.list { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.list > li { padding: var(--pad-row) 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; padding-top: 0.15rem; }
.card > .list > li:last-child { padding-bottom: 0; }
.list.compact > li { padding: var(--space-2) 0; }
.list.cards > li { background: var(--surface); border-radius: var(--radius-card); padding: var(--pad-card); }
.list.cards > li + li { margin-top: var(--space-3); }
.history { margin-top: var(--space-2); }
.is-done .grow { color: var(--text-muted); text-decoration: line-through; }
.content { white-space: pre-wrap; word-break: break-word; }
.meta { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; font-size: var(--text-secondary); }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.row > .actions { margin-top: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-4); margin: 0; font-size: var(--text-secondary); }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; min-width: 0; word-break: break-word; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: var(--space-2); }
}

/* ---- states ---- */
.state { color: var(--text-muted); font-size: var(--text-secondary); }
.list > li.state { border-top: 0; }
.state-empty { padding: var(--space-4) 0; }
.state-loading::before {
  content: "";
  display: inline-block;
  width: 0.85em; height: 0.85em;
  margin-right: 0.5em;
  vertical-align: -0.1em;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.state-error { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- status words ----
   A status is a word with a small icon, never a filled pill: the icon is drawn here (aria-hidden by construction) so colour
   is never the only signal. Done and on: a check. Open or waiting: an open circle. Problem: a triangle. Neutral: a dash. */
.badge, .tag {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--primary);
}
.badge::before {
  content: ""; flex: none; width: 0.875rem; height: 0.875rem; box-sizing: border-box; background: currentColor;
  clip-path: polygon(10% 52%, 22% 40%, 40% 58%, 80% 16%, 92% 28%, 40% 82%);
}
/* A badge with no tone has no state to draw: no icon. The check belongs to the success and on tones only. */
.badge:not([class*="badge-"])::before { display: none; }
.badge-warning::before {
  background: none; border: 2px solid currentColor; border-radius: 50%; clip-path: none;
}
.badge-danger::before { clip-path: polygon(50% 6%, 96% 92%, 4% 92%); }
.badge-muted::before { clip-path: polygon(10% 42%, 90% 42%, 90% 58%, 10% 58%); }
.badge-muted, .tag { color: var(--text-muted); }
.tag { font-weight: 400; }
.badge-success { color: var(--success); }
.badge-warning { color: var(--warning); }
.badge-danger { color: var(--danger); }
.badge-confirmed { color: var(--confirmed); }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-secondary); }
.mono { font-family: var(--mono); font-size: var(--text-secondary); }
.figure { font-size: var(--text-figure); font-weight: var(--weight-page); line-height: var(--leading-page); font-variant-numeric: tabular-nums; }

/* ---- the evidence mark: report claims carry their support on their left edge ---- */
.claim {
  position: relative;
  padding-left: var(--space-4) !important;
}
.claim::before {
  content: ""; position: absolute; left: 0; top: var(--space-3); bottom: var(--space-3);
  width: 3px; border-radius: 2px; background: var(--border-strong);
}
.list > li.claim:first-child::before { top: 0.15rem; }
.claim-source_backed::before { background: var(--success); }
.claim-va_confirmed::before { background: var(--confirmed); }
.claim-unverified::before {
  background: repeating-linear-gradient(to bottom, var(--text-muted) 0 5px, transparent 5px 9px);
}
.claim-conflicting::before {
  background: repeating-linear-gradient(to bottom, var(--warning) 0 3px, transparent 3px 5px);
  width: 4px;
}

/* ---- forms and buttons ---- */
.form .field + .field { margin-top: var(--gap-field); }
/* A form that opens with a sub-label and follows other content in its card (Add a site, Record feedback). */
.card > * + .form:has(> h4:first-child) { margin-top: var(--space-4); }
.form .field + .grid-2, .form .grid-2 + .field { margin-top: var(--gap-field); }
.field { display: flex; flex-direction: column; gap: var(--gap-label); }
label { font-weight: 500; font-size: var(--text-secondary); color: var(--text); }
.hint { color: var(--text-muted); font-size: var(--text-secondary); }
input, textarea, select {
  width: 100%;
  min-height: 2.5rem;
  padding: var(--space-2) var(--space-3);
  font: inherit; line-height: 1.25;
  color: var(--text);
  background: var(--color-canvas);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
}
input:hover, textarea:hover, select:hover { border-color: var(--text-muted); }
/* A group is a ruled section, not a box inside a panel: one hairline above and the legend as its row title. */
fieldset { margin: 0; padding: var(--space-3) 0 0; border: 0; border-top: 1px solid var(--border); min-width: 0; }
legend { padding: 0; margin-bottom: var(--space-2); }
textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
/* Disabled: a flatter fill, muted ink and a not-allowed cursor, on the native attribute. */
input:disabled, textarea:disabled, select:disabled { opacity: 1; color: var(--text-muted); background: var(--bg); cursor: not-allowed; }
/* A scope with only one choice (one agency, one client) is plain text: app.js shows .scope-value and hides the select. */
.scope-value { font-weight: 500; min-height: 2.5rem; display: flex; align-items: center; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; min-height: 0; padding: 0; accent-color: var(--color-signal); }
progress { accent-color: var(--accent); }
.form-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.form > .list { margin-top: var(--space-4); }
.form-inline { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-actions { margin-top: 0; }
/* A flex row spaces its children with the gap, so neither the card's stacked-children margin nor a form's field gap applies. */
.card.form-inline > * + *, .form-inline > .field + .field { margin-top: 0; }

/* Layout for every button: size, padding, gap. Border, radius, fill and the primary, quiet and disabled looks are in tokens.css (:root .btn). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  font: inherit; font-size: var(--text-body);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--dur-micro) var(--ease-out);
}
.btn:hover { color: var(--text); }
/* Destructive actions are outlined buttons with danger text and an alert icon, never filled. */
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: var(--danger); }
.btn-danger::before {
  content: ""; flex: none; width: 0.875rem; height: 0.875rem; background: currentColor; clip-path: polygon(50% 6%, 96% 92%, 4% 92%);
}
.btn.btn-small { min-height: 2.125rem; padding: 0 var(--space-3); font-size: var(--text-small); }
/* the hit area is 44px tall though the button is 34 */
.btn.btn-small { position: relative; }
.btn.btn-small::after { content: ""; position: absolute; inset: -5px 0; }
/* Busy keeps full opacity: fading the disabled tokens again dropped the label below 4.5:1. */
.btn[aria-busy="true"] { opacity: 1; cursor: progress; }

.link-button {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  padding: var(--space-2);
  font: inherit; text-align: left; color: var(--text);
  background: none; border: 0; border-radius: var(--radius-control); cursor: pointer;
}
.link-button:hover { background: var(--color-hover); }

.details { margin-top: var(--space-3); }
.details summary {
  cursor: pointer; padding: var(--space-2) 0; width: fit-content;
  font-weight: 500; font-size: var(--text-secondary); color: var(--text-muted);
}
.details summary:hover { color: var(--text); }

/* ---- chat ---- */
.message { padding: var(--space-2) var(--space-3); border-radius: var(--radius-inner); background: var(--color-paper); }
.message-user { background: var(--primary-soft); }
.message-role { display: block; font-size: var(--text-meta); font-weight: 600; color: var(--text-muted); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: var(--space-5); z-index: 30;
  max-width: calc(100% - 2rem);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-muted); color: var(--text);
  font-size: var(--text-body);
  border-radius: var(--radius); box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-short) var(--ease-out);
}
.toast-visible { opacity: 1; }

/* ---- work and admin pages (commitments, shifts, team, clients, audit, client view) ---- */
.stat { display: grid; gap: var(--space-1); }
.stat-value { font-size: var(--text-figure); font-weight: var(--weight-page); line-height: var(--leading-page); font-variant-numeric: tabular-nums; }
.claim-list { margin-top: var(--space-2); }
/* ---- work log and end-of-day review ---- */
.app-meter { display: block; width: 100%; height: 0.5rem; margin-top: var(--space-1); accent-color: var(--color-signal); }
.input-short { max-width: 10rem; }
/* ---- notifications ---- */
.nav-count {
  display: inline-block; min-width: 1.25rem; margin-left: var(--space-1); padding: 0 var(--space-1);
  font-size: var(--text-meta); font-weight: 600; line-height: 1.25rem; text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--accent-on); background: var(--accent); border-radius: var(--radius-pill);
}
.nav-count[hidden] { display: none; }
.field-inline { flex-direction: row; align-items: center; gap: var(--space-2); min-height: 2.5rem; }
.field-inline input[type="checkbox"] { flex: none; width: 1.25rem; }
.prefs .toggle input[type="checkbox"] { width: 36px; height: 20px; }
.field-inline label { padding: var(--space-2) 0; cursor: pointer; }
/* Each channel toggle carries a visible word, so the whole cell is the target. */
.toggle { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 2.75rem; padding: 0 var(--space-1); font-weight: 400; color: var(--text); font-size: var(--text-body); cursor: pointer; }
/* A switch: a 36 by 20 track, off is a ringed well with a muted knob, on is green with a dark knob. */
.toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0;
  border-radius: var(--radius-pill); background: var(--bg); box-shadow: inset 0 0 0 1px var(--color-edge); cursor: inherit;
}
.toggle input[type="checkbox"]::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: var(--radius-pill);
  background: var(--color-muted); transition: transform var(--dur-micro) var(--ease-out);
}
.toggle input[type="checkbox"]:checked { background: var(--color-signal); box-shadow: none; }
.toggle input[type="checkbox"]:checked::after { background: var(--color-knob-on); transform: translateX(16px); }
.toggle input[type="checkbox"]:disabled:not(:checked) { background: var(--color-hover); }
/* An always-on switch is checked and disabled: it keeps the on track and knob, so on still reads at 3:1. */
.toggle input[type="checkbox"]:checked:disabled { background: var(--color-signal); box-shadow: none; }
.toggle:has(input:disabled) { cursor: default; color: var(--text-muted); }
.alert-action { margin-left: var(--space-2); vertical-align: middle; }
.notification-unread strong { color: var(--primary); }
/* position: relative keeps visually-hidden (absolute) cells inside the scroll box. */
.table-wrap { position: relative; overflow-x: auto; }
.prefs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prefs th, .prefs td { padding: var(--pad-row) var(--space-2); text-align: left; border-top: 1px solid var(--border); }
.prefs thead th { border-top: 0; font-size: var(--text-secondary); font-weight: var(--weight-label); color: var(--text-muted); }

/* ---- demo banner, contextual help, setup checklist, help page ---- */
/* On a desktop the demo banner sits in the second column above the canvas. */
.demo-banner {
  margin: var(--space-3) var(--space-3) 0 0; padding: var(--space-2) var(--space-5); border-radius: var(--radius-inner);
  background: var(--surface-muted); color: var(--color-ink-2); font-size: var(--text-secondary); text-align: center;
}
.help-link {
  display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem;
  margin-left: var(--space-2); border: 1px solid var(--border-strong); border-radius: 50%;
  font-family: var(--font); font-size: var(--text-secondary); font-weight: 600; letter-spacing: 0;
  text-decoration: none; vertical-align: 0.2em; color: var(--text-muted); background: var(--surface);
}
.help-link:hover { color: var(--primary); border-color: var(--primary); }
.help-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.help-toc { position: sticky; top: var(--space-5); }
.toc-heading { font-size: var(--text-secondary); font-weight: 500; color: var(--text-muted); margin: var(--space-1) 0 var(--space-2); }
.toc-heading ~ .toc-heading { margin-top: var(--space-4); }
/* The guide title is a section title, one step above the topic titles beneath it. */
.help-section > h3 { font-size: var(--text-section); font-weight: var(--weight-section); line-height: var(--leading-heading); }
.help-tour { margin-top: var(--space-4); }
.help-topic { padding-top: var(--space-3); scroll-margin-top: var(--space-4); max-width: 42rem; }
.help-topic + .help-topic { border-top: 1px solid var(--border); margin-top: var(--space-3); }
/* A topic title is a row title with its own body, so it takes the card-title role, not the muted sub-label. */
.help-topic h4 { font-size: var(--text-title); font-weight: var(--weight-title); line-height: var(--leading-title); color: var(--text); }
.help-topic p + p, .help-topic p + ol, .help-topic p + ul, .help-topic ol + p, .help-topic ul + p { margin-top: var(--space-2); }
.help-topic ol, .help-topic ul { margin: var(--space-2) 0 0; padding-left: 1.4rem; }
.help-topic li + li { margin-top: var(--space-1); }
.help-topic:target { background: var(--primary-soft); border-radius: var(--radius-control); padding-left: var(--space-3); padding-right: var(--space-3); }
.setup-progress { width: 100%; height: 0.5rem; }
.setup-steps > li.is-complete { opacity: 0.9; }
.setup-steps > li.is-next { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.setup-step p { margin-top: 0.35rem; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--color-hover); font-weight: 600; font-size: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.is-complete .step-number { background: var(--success-bg); color: var(--success); }
.setup-card .row + p, .setup-card p + .actions { margin-top: var(--space-2); }


/* ---- activity and settings ---- */
/* Settings: a ruled list of destinations, one muted line each. */
.destinations { max-width: 40rem; margin-top: var(--space-5); }
.destinations > li { display: grid; gap: var(--space-1); padding: var(--space-4) 0; }
.destinations > li:first-child { padding-top: var(--space-2); }
.destinations > li > h3 + * { margin-top: 0; }
.destinations h3 a { color: var(--text); text-decoration: none; }
.destinations h3 a:hover { text-decoration: underline; }
.scope-bar input[type="date"] { min-width: 10.5rem; }
meter { background: var(--color-rule); border-radius: var(--radius-pill); }
meter::-webkit-meter-bar { background: var(--color-rule); border: 0; border-radius: var(--radius-pill); height: 0.5rem; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: var(--color-signal); border-radius: var(--radius-pill); }
meter::-moz-meter-bar { background: var(--color-signal); border-radius: var(--radius-pill); }
.recording { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.form-inline .field { min-width: 0; }

/* ---- My EOD draft ---- */
/* The hand-off: the entry a VA pastes elsewhere is plain text on the white card, inside a bone well, in Text 400 (not mono). */
.eod-well { margin-top: var(--space-2); padding: var(--space-5); background: var(--color-well); color: var(--color-well-ink); border-radius: var(--radius-card); }
.eod-well > .eod-text { margin: 0; }
/* The well is a fixed light surface in both schemes, so its focus ring takes a fixed deep green, not the theme focus colour. */
.eod-well > .eod-text:focus-visible { outline-color: var(--color-green-deep); }
.eod-well:has(> [hidden]) { display: none; }
.eod-text {
  margin-top: var(--space-2); max-height: 38rem; overflow: auto; white-space: pre-wrap; padding: var(--space-5);
  background: var(--color-card); color: var(--color-well-ink); border-radius: var(--radius-inner);
  font-family: var(--font); font-size: var(--text-body);
}
.note-item { display: flex; align-items: flex-start; gap: var(--space-2); }
.note-item input[type="checkbox"] { margin-top: var(--space-1); }
.note-item label { font-weight: 400; font-size: var(--text-body); color: var(--text); cursor: pointer; }
.note-item input:checked + label { color: var(--text-muted); text-decoration: line-through; }
.btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .state-loading::before { animation: none; }
}


/* ---- Set up your agent ---- */
/* The interview: one card per step, the agent's question above the VA's answer, the open step carrying its form. */
.progress { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.progress li { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-meta); color: var(--text-muted); box-shadow: var(--panel-ring); }
.progress .progress-done { color: var(--color-signal); }
.progress .progress-current { color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--color-signal); }
.bubble { max-width: 44rem; }
.bubble-you { padding: var(--space-2) var(--space-4); border-radius: var(--radius-inner); background: var(--color-well); color: var(--color-well-ink); }
.notice-box summary { cursor: pointer; }
.notice-text { white-space: pre-wrap; max-height: 20rem; overflow: auto; padding: var(--space-3); background: var(--color-well); color: var(--color-well-ink); border-radius: var(--radius-inner); }

/* "Check before you send" sits between the entry and the actions, ruled off from the entry, not boxed. */
.check-block { border-top: 1px solid var(--border); margin-top: var(--space-3); padding-top: var(--space-3); }

/* ---- UI bundle D: tally row, account lists, empty state ---- */
/* The day at a glance: one ruled row of four figures, labels muted. */
.tally { display: flex; flex-wrap: wrap; margin: 0 0 var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tally-item { flex: 1 1 8rem; display: grid; gap: var(--space-1); padding: 0 var(--space-4); border-left: 1px solid var(--border); }
.tally-item:first-child { padding-left: 0; border-left: 0; }
.tally dt { color: var(--text-muted); font-size: var(--text-secondary); }
.tally dd { margin: 0; font-size: var(--text-title); font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .tally-item { flex-basis: 45%; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-left: 0; }
}
/* An account list: a ruled run of rows, a round initial, the name, counts in muted, a status word. */
.accounts { margin-top: var(--space-4); }
.accounts > li { padding: var(--space-4) 0; }
.accounts > li:first-child { padding-top: var(--space-2); }
.account-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.account-name { flex: 1 1 auto; min-width: 0; display: grid; gap: var(--space-1); }
.account-name strong, .account-name h3 { overflow-wrap: anywhere; }
/* The initials circle: 32px, the first letters of a name. The helper that computes them is app.js's (units B1 and B2). */
.avatar {
  flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-size: var(--text-small); font-weight: 700; line-height: 1;
}
/* An empty day: one sentence and the actions that fill it. */
.empty-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* Straight under the page-head hairline, the empty state's own top line would be a second rule. Only when nothing shown sits
   between the head and its stack: a visible notice or a status line with text above it keeps the rule. */
main > .stack:not(main > :not(.page-head, .visually-hidden, [hidden], :empty) ~ .stack) > :is(.empty-state:first-child, .visually-hidden:first-child + .empty-state) { border-top: 0; }
.empty-state .empty-title { flex: 1 1 14rem; color: var(--text); }

/* ---- Home (docs/designs/admin-web-redesign.md, B2) ----
   The day and the suggestions on the left, a 332px rail (At risk, then setup) on the right; one column at 1100px and below. The rail
   leaves the layout when both its cards are hidden. A promise row is its time, its title over a second line, and a due tag. */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: var(--space-6) 2.5rem; align-items: start; }
.home-col { display: grid; gap: var(--gap-section); align-content: start; min-width: 0; }
.home-rail { gap: var(--gap-stack); }
.home-rail:not(:has(> .card:not([hidden]))) { display: none; }
@media (max-width: 1100px) { .home { grid-template-columns: minmax(0, 1fr); } }
.home-section > * + * { margin-top: var(--gap-title); }
.page-head > div > #today-date { margin-bottom: var(--space-1); }
.summary-risk { color: var(--color-open); font-weight: 600; }
.day-group + .day-group { margin-top: var(--space-5); }
.list > li.promise, .list > li.now-line { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: start; }
.promise .when { font-weight: 600; white-space: nowrap; }
.promise .what { font-weight: 600; overflow-wrap: anywhere; }
.due {
  padding: 0 var(--space-3); border: 1px solid var(--color-open-rule); border-radius: var(--radius-pill); background: var(--color-open-soft);
  color: var(--color-open); font-size: var(--text-small); font-weight: 600; white-space: nowrap;
}
/* The now line: a green rule at the current time, between the promises already late and the ones still ahead. */
.list > li.now-line { grid-template-columns: 5rem minmax(0, 1fr); align-items: center; padding: var(--space-1) 0; color: var(--color-signal); font-size: var(--text-small); font-weight: 600; }
.list > li.now-line + li { border-top: 0; }
.now-rule { height: 2px; border-radius: 1px; background: var(--color-signal); }
.risk-member { display: flex; gap: var(--space-3); align-items: flex-start; }
.risk-member .avatar { background: var(--color-open-soft); color: var(--color-open); }
.risk-member .grow { flex: 1 1 0; }
.home-section > .notice { max-width: none; }
/* The installed app with no connection (C2): the banner over the stored day, a section's gap above the day. */
#offline-banner:not([hidden]) { margin-bottom: var(--gap-section); }
/* In the 332px rail a flag's text takes the width and its link goes under it. */
.risk-member li.row { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.risk-member li.row > .grow { flex: none; }
.setup-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-1); margin-bottom: var(--gap-title); }
.setup-bar > span { height: 0.375rem; border-radius: var(--radius-pill); background: var(--color-rule); }
.setup-bar > .on { background: var(--color-signal); }

/* ---- mobile admin view (growth pack F8) ----
   At 720 px and below every page fits without a sideways page scroll, wide tables scroll inside their own box, every control
   is at least 44 px (2.75rem) tall, and the shell is a sticky top bar over the page with the sections as a tab bar fixed to
   the bottom (docs/designs/admin-web-redesign.md, B1). Desktop widths are untouched: every rule here sits inside a
   max-width query. */
@media (max-width: 720px) {
  /* nothing in the page may push it wider than the screen */
  .container, .card, .page-head > div, .notice, .alert, .list > li { min-width: 0; max-width: 100%; }
  .card, .list > li, .content, .meta, .facts dd, .lede, .grow { overflow-wrap: break-word; }
  .page-head { align-items: stretch; }
  .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, .eod-text, .notice-text { max-width: 100%; overflow-x: auto; }
  img, video, canvas, svg { max-width: 100%; height: auto; }
  input, select, textarea { max-width: 100%; box-sizing: border-box; }
  .scope-bar .field, .scope-bar input[type="date"] { min-width: 0; }

  /* tap targets: 44 px */
  button, .btn, .btn.btn-small, .btn.btn-primary, .btn.btn-cool, .link-button, summary { min-height: 2.75rem; }
  button, .btn { min-width: 2.75rem; }
  .brand { min-height: 2.75rem; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { min-height: 2.75rem; }
  .sub-nav a, .account-links a, .site-nav > a { min-height: 2.75rem; }
  .help-link { width: 2.75rem; height: 2.75rem; }
  .details summary { display: flex; align-items: center; min-height: 2.75rem; }
  .field-inline, .toggle { min-height: 2.75rem; }
  label:not(.toggle):has(> input[type="checkbox"]), label:not(.toggle):has(> input[type="radio"]),
  input[type="checkbox"] + label, input[type="radio"] + label { display: flex; align-items: center; min-height: 2.75rem; }
  td > input[type="checkbox"], td > input[type="radio"] { width: 2.75rem; height: 2.75rem; }
  /* a link that stands alone (contents, a heading, a table cell, a "go to" line) is a target; one inside a sentence is not */
  .help-toc a, h2 > a, h3 > a, th > a, td > a, .link-line > a { display: inline-flex; align-items: center; min-height: 2.75rem; }

  /* The top bar: the brand, then Notifications, Help and Sign out as icon buttons. It sticks; what follows it scrolls away. */
  body:has(> .topbar) { display: block; }
  .topbar {
    flex-direction: row; align-items: center; gap: var(--space-2); height: auto; overflow: visible;
    padding: calc(var(--space-1) + env(safe-area-inset-top)) var(--space-3) var(--space-1); border-bottom: 1px solid var(--border);
  }
  .account { flex-direction: row; align-items: center; gap: 0; margin: 0 0 0 auto; }
  .account-links { flex-direction: row; gap: 0; }
  .account-links a { position: relative; justify-content: center; min-width: 2.75rem; padding: 0; }
  .account-links .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .account-links .nav-count { position: absolute; top: 2px; right: 0; margin: 0; }
  .account-card { padding: 0; background: none; box-shadow: none; }
  .whoami { display: none; }
  #signout { min-width: 2.75rem; min-height: 2.75rem; }
  /* Under it, in the flow: "Show all settings" on the right, the demo banner, then the pages row. */
  .show-all-row { display: flex; justify-content: flex-end; padding: 0 var(--space-2); }
  .toggle.show-all-field { min-height: 2.75rem; }
  .demo-banner { margin: var(--space-2) var(--space-2) 0; }
  .sub-nav { flex-direction: row; flex-wrap: nowrap; gap: var(--space-1); margin: 0; padding: 0 var(--space-4); border-left: 0; border-bottom: 1px solid var(--border);
    overflow-x: auto; scrollbar-width: none; background-color: var(--bg);
    /* A fade on the side that has more pages: the cover gradients ride with the content, the shadows stay on the edges, so a shadow shows only while that side can scroll. */
    background-position: left center, right center, left center, right center;
    background-size: 20px 100%, 20px 100%, 18px 100%, 18px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll; }
  .sub-nav a { white-space: nowrap; }
  /* Home: a narrower time column, and the due tag under the title. */
  .list > li.promise, .list > li.now-line { grid-template-columns: 4.25rem minmax(0, 1fr); }
  .promise .due { grid-column: 2; justify-self: start; margin-top: var(--space-1); }
  /* The tab bar: the only fixed element. Equal tabs, the icon over a 12px label, 52px tall plus the safe area. */
  .site-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; flex-direction: row; gap: 0;
    padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));
    background: var(--color-canvas); border-top: 1px solid var(--border);
  }
  .site-nav > a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: var(--space-1); min-width: 0; min-height: 3.25rem; padding: 0; font-size: var(--text-meta); }
  .site-nav > a[aria-current="page"] { background: none; box-shadow: none; color: var(--color-signal); }
  /* Room for the tab bar: under main's content, in the scroll padding, and under the toast. */
  html:has(#site-nav > a) { scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 3.5rem; }
  body:has(#site-nav > a) > main.container { padding-bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
  body:has(#site-nav > a) .toast { bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
