/* Aria HRMS — design tokens and primitives.
   Implements docs/web_design_plan.md. A clinical records instrument:
   calm, dense, precise.

   ACCENT DISCIPLINE (amended by Dr. Saurav, batch-3 ruling 20-Aug-2026;
   enforced by review, not by the compiler): ONE restrained accent, used
   for exactly — the active nav marker, content links, status chips
   (chip-note/chip-ok; severity colors stay semantic), and the quota
   bars. Retained from the original covenant: the keyboard focus ring
   (accessibility) and the provenance timeline spine (the signature
   component). It stays FORBIDDEN on buttons and headings. If you are
   reaching for --accent anywhere else, the answer is --ink.

   SHADOWS: one token, for the mobile drawer overlay only. Depth is
   carried by borders and background steps. */

:root {
  /* paper and ink */
  --paper:      #FBFCFD;
  --surface:    #FFFFFF;
  --chrome:     #EEF1F4;
  --ink:        #151A21;
  --ink-soft:   #5A6472;
  --rule:       #DDE3E9;
  /* the Aria brand green, from the letterhead mark (word/media/image1):
     #00A040 primary, #80C042 sweep, #F09010 cross. The cross orange is
     the LOGO'S alone — it collides with the escalate ambers and never
     becomes a UI color. Text-size accent darkened for contrast. */
  --accent:       #087A38;
  --accent-bright:#00A040;
  --accent-wash:  #EAF6EE;

  /* semantic — STATUS ONLY, never decoration */
  --stat-block:    #B42318;
  --stat-escalate: #B54708;
  --stat-note:     #3E5C76;
  --stat-ok:       #05683D;
  --stat-muted:    #6B7280;
  --stat-block-bg:    #FEF3F2;
  --stat-escalate-bg: #FFFAEB;
  --stat-note-bg:     #EEF3F8;
  --stat-ok-bg:       #ECFDF3;
  --stat-muted-bg:    #F3F4F6;

  /* type */
  --display: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", sans-serif;
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-16: 16px; --fs-20: 20px; --fs-24: 24px; --fs-30: 30px;
  --fw-reg: 400; --fw-med: 500; --fw-semi: 600;

  /* 8px grid (4px is intra-component only) */
  --sp-05: 4px; --sp-1: 8px; --sp-2: 16px; --sp-3: 24px;
  --sp-4: 32px; --sp-6: 48px; --sp-8: 64px;

  --r-sm: 3px; --r-md: 6px;
  --shadow-drawer: 0 0 0 100vmax rgba(21, 26, 33, .38);
  --sidebar-w: 232px;
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-14);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Every numeral in this app aligns digit-for-digit. */
.num, .money, td.num, th.num, time, .tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
td.num, th.num { white-space: nowrap; }
.money { text-align: right; white-space: nowrap; }
th.money, td.money { text-align: right; }

a { color: var(--ink); text-decoration-color: var(--rule);
    text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--ink-soft); }
/* content links carry the accent (batch-3 covenant); chrome links stay ink */
.content a { color: var(--accent); }
.content a:hover { text-decoration-color: var(--accent); }
.content .filters a, .content .tabs a, .content .hero-counts .stat,
.content table.data th a { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------- instrument labels */
.label {
  font-size: var(--fs-11);
  font-weight: var(--fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.muted { color: var(--ink-soft); }
.fs-12 { font-size: var(--fs-12); }
.fs-13 { font-size: var(--fs-13); }

/* ------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--chrome);
  border-right: 1px solid var(--rule);
  padding: var(--sp-2) 0;
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.brand {
  font-family: var(--display);
  font-size: var(--fs-20);
  padding: 0 var(--sp-2);
  letter-spacing: -.01em;
}
.brand small {
  display: block; font-family: var(--body); font-size: var(--fs-11);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  margin-top: 2px;
}
.nav { display: flex; flex-direction: column; }
.nav a {
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-13);
  text-decoration: none;
  border-left: 2px solid transparent;
  display: flex; justify-content: space-between; gap: var(--sp-1);
}
.nav a:hover { background: rgba(255,255,255,.6); }
.nav a[aria-current="page"] {
  border-left-color: var(--accent);   /* accent use 3 of 3 */
  background: var(--surface);
  font-weight: var(--fw-semi);
}
.nav .count { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.main { display: flex; flex-direction: column; min-width: 0; }

.header {
  height: var(--header-h);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-3);
  position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 560px; position: relative; }
.search input {
  width: 100%; height: 34px;
  padding: 0 var(--sp-2);
  font: inherit; font-size: var(--fs-13);
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-soft); }
.search kbd {
  position: absolute; right: 8px; top: 8px;
  font: 600 var(--fs-11)/1 var(--body); color: var(--ink-soft);
  background: var(--chrome); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 3px 5px;
}
.search input:focus + kbd { display: none; }

.results:empty { display: none; }
.results {
  position: absolute; top: 38px; left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); overflow: hidden; z-index: 30;
}
.results a {
  display: flex; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2); text-decoration: none;
  border-bottom: 1px solid var(--rule); font-size: var(--fs-13);
}
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a:focus { background: var(--accent-wash); }
.results .empty { padding: var(--sp-2); color: var(--ink-soft); font-size: var(--fs-13); }

.content { padding: var(--sp-3); min-width: 0; }
.page-title { font-size: var(--fs-24); margin: 0 0 var(--sp-05); font-weight: var(--fw-semi); letter-spacing: -.01em; }
.page-sub { color: var(--ink-soft); font-size: var(--fs-13); margin: 0 0 var(--sp-3); }

.menu-btn {
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 6px 9px; cursor: pointer; color: var(--ink);
}

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.card + .card { margin-top: var(--sp-2); }
.card-head {
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.card-body { padding: var(--sp-2); }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: visible; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
table.data th {
  position: sticky; top: var(--header-h); z-index: 10;
  background: var(--chrome);
  text-align: left; font-size: var(--fs-11); font-weight: var(--fw-semi);
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
/* Under 1100px the wrap scrolls, which makes it the sticky ancestor —
   the header must then stick to the container, not the viewport. */
@media (max-width: 1100px) {
  .table-wrap { overflow-x: auto; }
  table.data th { top: 0; }
}
table.data th a { text-decoration: none; color: inherit; display: inline-flex; gap: 4px; }
table.data th a::after { content: attr(data-arrow); color: var(--ink); }
table.data td {
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data tbody tr:hover { background: var(--paper); }
table.data tbody tr:last-child td { border-bottom: 0; }
td.name a { font-weight: var(--fw-semi); text-decoration: none; }
td.name a:hover { text-decoration: underline; text-decoration-color: var(--ink-soft); }

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-11); font-weight: var(--fw-semi);
  letter-spacing: .02em;
  padding: 2px 7px;
  border-radius: var(--r-sm);           /* a label on a record, not a pill */
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before {
  content: ""; width: 5px; height: 5px; border-radius: 1px;
  background: currentColor;
}
.chip.plain::before { display: none; }
.chip-block    { color: var(--stat-block);    background: var(--stat-block-bg);    border-color: #FDA29B; }
.chip-escalate { color: var(--stat-escalate); background: var(--stat-escalate-bg); border-color: #FEC84B; }
.chip-note     { color: var(--accent);        background: var(--accent-wash);      border-color: #BFE3CC; }
.chip-ok       { color: var(--accent);        background: var(--accent-wash);      border-color: #BFE3CC; }
.chip-muted    { color: var(--stat-muted);    background: var(--stat-muted-bg);    border-color: var(--rule); }

/* --------------------------------------------------------- filter chips */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.filters a {
  font-size: var(--fs-12); text-decoration: none;
  padding: 4px var(--sp-1);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-soft);
}
.filters a[aria-pressed="true"] {
  background: var(--ink); color: var(--surface); border-color: var(--ink);
}
.filters .sep { width: 1px; background: var(--rule); margin: 2px var(--sp-05); }

/* ----------------------------------------------------------- empty state */
.empty-state { padding: var(--sp-4) var(--sp-3); text-align: center; }
.empty-state p { margin: 0 auto; max-width: 46ch; color: var(--ink-soft); font-size: var(--fs-13); }
.empty-state strong { display: block; color: var(--ink); font-size: var(--fs-14); margin-bottom: var(--sp-05); }

/* ----------------------------------------------------------- key/values */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-05) var(--sp-2); }
.kv dt { color: var(--ink-soft); font-size: var(--fs-12); }
.kv dd { margin: 0; font-size: var(--fs-13); }

/* -------------------------------------------------------------- dossier */
.identity {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: var(--sp-3);
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-start;
  justify-content: space-between;
}
.identity h1 {
  font-family: var(--display);          /* display use 1 of 2 */
  font-size: var(--fs-30); font-weight: 400; margin: 0 0 var(--sp-05);
  letter-spacing: -.01em; line-height: 1.15;
}
.identity .idline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.identity .code { font-size: var(--fs-13); font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--rule); margin: var(--sp-3) 0 var(--sp-2); }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: var(--sp-1) 2px; margin-bottom: -1px;
  font: inherit; font-size: var(--fs-13); color: var(--ink-soft);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: var(--fw-semi); border-bottom-color: var(--ink); }
.tabpanel[hidden] { display: none; }

/* ------------------------------------------ THE SIGNATURE: provenance timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--sp-3); position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--accent); opacity: .35;   /* accent use 1 of 3 */
}
.tl-item { position: relative; padding: 0 0 var(--sp-3) 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  position: absolute; left: calc(-1 * var(--sp-3) + 0px); top: 5px;
  width: 9px; height: 9px;                 /* squares, not circles */
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 1px;
}
.tl-item.live .tl-node { background: var(--accent); }
.tl-date {
  font-family: var(--display);             /* display use 2 of 2 */
  font-size: var(--fs-16); font-variant-numeric: tabular-nums;
}
.tl-reason { font-size: var(--fs-13); margin-top: 2px; }
.tl-values {
  display: grid; grid-template-columns: max-content repeat(3, minmax(72px, max-content));
  gap: 2px var(--sp-2); margin: var(--sp-1) 0;
  font-size: var(--fs-12); font-variant-numeric: tabular-nums;
}
.tl-values .h { color: var(--ink-soft); font-size: var(--fs-11); text-transform: uppercase; letter-spacing: .06em; }
.tl-values .v { text-align: right; }
.tl-values .delta { text-align: right; color: var(--ink-soft); }
.tl-values .delta.up { color: var(--stat-ok); }
.tl-values .delta.down { color: var(--stat-block); }

/* era boundary — the seam between the two source eras (mig-031 R-17).
   A dashed rule across the timeline, so a reader sees WHY two adjacent
   rows can disagree. Not an alert: this is a fact about the record. */
.era-boundary {
  position: relative;
  margin: var(--sp-2) 0 var(--sp-2) calc(-1 * var(--sp-3) + 14px);
  padding-left: var(--sp-1);
  border-top: 1px dashed var(--rule);
  font-size: var(--fs-11);
  color: var(--ink-soft);
  padding-top: var(--sp-05);
}
.era-boundary strong {
  font-weight: var(--fw-semi); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft);
}
.era-boundary .why { display: block; margin-top: 2px; max-width: 62ch; }

/* the citation is primary content, not a footnote */
.citation {
  margin-top: var(--sp-1);
  border-left: 2px solid var(--rule);
  padding: var(--sp-05) 0 var(--sp-05) var(--sp-1);
  font-size: var(--fs-13);
}
.citation .src { color: var(--ink); }
.citation .where { color: var(--ink-soft); }
.citation details { margin-top: var(--sp-05); }
.citation summary {
  cursor: pointer; font-size: var(--fs-12); color: var(--ink-soft);
  list-style: none; display: inline-flex; align-items: center; gap: 4px;
}
.citation summary::-webkit-details-marker { display: none; }
.citation summary::before { content: "▸"; font-size: 9px; }
.citation details[open] summary::before { content: "▾"; }
.citation .lineage {
  margin-top: var(--sp-05); padding: var(--sp-1);
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-sm);
  font-size: var(--fs-12);
}
.citation .lineage code { font-size: var(--fs-11); word-break: break-all; color: var(--ink-soft); }

/* ------------------------------------------------------- expansion rows */
tr.expansion > td { background: var(--paper); padding: 0; }
tr.expansion .inner { padding: var(--sp-2); border-bottom: 1px solid var(--rule); }
.row-toggle {
  background: none; border: 0; cursor: pointer; color: var(--ink-soft);
  font: inherit; font-size: var(--fs-12); padding: 0;
}
.htmx-request .row-toggle { opacity: .5; }
.verbatim {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-11); white-space: pre-wrap; word-break: break-word;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: var(--sp-1); margin: var(--sp-05) 0 0;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-3); }
.login { width: 100%; max-width: 340px; }
.login .brand { padding: 0; margin-bottom: var(--sp-3); }
.login label { display: block; font-size: var(--fs-12); color: var(--ink-soft); margin-bottom: var(--sp-05); }
.login input {
  width: 100%; height: 34px; padding: 0 var(--sp-1); margin-bottom: var(--sp-2);
  font: inherit; font-size: var(--fs-13);
  border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--surface);
}
.login button {
  width: 100%; height: 34px; cursor: pointer;
  background: var(--ink); color: var(--surface);   /* not accent — by rule */
  border: 0; border-radius: var(--r-sm); font: inherit; font-weight: var(--fw-semi);
}
.login .err { color: var(--stat-block); font-size: var(--fs-12); margin-bottom: var(--sp-1); }

/* --------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
    transform: translateX(-100%); transition: transform .16s ease;
  }
  .shell.open .sidebar { transform: none; box-shadow: var(--shadow-drawer); }
  .menu-btn { display: block; }
  .content { padding: var(--sp-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------- roster grid */
.roster-wrap { overflow-x: auto; }
table.roster { border-collapse: separate; border-spacing: 0; font-size: var(--fs-12); }
table.roster th, table.roster td { padding: 3px 4px; border-bottom: 1px solid var(--rule); }
table.roster th.day {
  width: 26px; text-align: center; font-size: var(--fs-11); font-weight: var(--fw-semi);
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
  background: var(--chrome); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 5;
}
table.roster th.day.weekend { color: var(--ink); }
table.roster th.who, table.roster td.who {
  position: sticky; left: 0; background: var(--surface); z-index: 6;
  border-right: 1px solid var(--rule); white-space: nowrap;
  text-align: left; min-width: 190px; padding-left: var(--sp-1);
}
table.roster th.who { background: var(--chrome); z-index: 7; top: 0; }
table.roster tbody tr:hover td { background: var(--paper); }
table.roster tbody tr:hover td.who { background: var(--paper); }
table.roster td.sum {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
  padding-right: var(--sp-1);
}
table.roster th.sum {
  background: var(--chrome); position: sticky; top: 0; z-index: 5;
  text-align: right; font-size: var(--fs-11); letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); padding-right: var(--sp-1);
  white-space: nowrap;
}

.daycode {
  display: block; text-align: center; border-radius: 2px;
  font-size: 10px; font-weight: var(--fw-semi); line-height: 16px; height: 16px;
  border: 1px solid transparent; letter-spacing: -.01em;
}
.daycode.present { background: #EDF1F8; color: #24396B; border-color: #D3DEF0; }
.daycode.double  { background: #E6EEFB; color: #1F3A6E; border-color: #A9C3E8; }
.daycode.half    { background: #F2F5F9; color: #46566E; border-color: #DCE3EC; }
.daycode.leave   { background: var(--stat-note-bg); color: var(--stat-note); border-color: #C3D3E3; }
.daycode.off     { background: var(--surface); color: var(--stat-muted); border-color: var(--rule); }
.daycode.unpaid  { background: var(--stat-block-bg); color: var(--stat-block); border-color: #FDA29B; }
.daycode.unknown { background: var(--stat-escalate-bg); color: var(--stat-escalate); border-color: #FEC84B; }
.daycode.blank   { color: var(--rule); }

.legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); font-size: var(--fs-12); }
.legend span.item { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.legend .daycode { width: 26px; }

/* ------------------------------------------- exception / divergence notices */
.notice {
  border: 1px solid var(--rule); border-left: 3px solid var(--stat-escalate);
  background: var(--stat-escalate-bg); border-radius: var(--r-sm);
  padding: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-2); font-size: var(--fs-13);
}
.notice .title { display: block; font-weight: var(--fw-semi); margin-bottom: 2px; }
.notice strong { font-weight: var(--fw-semi); }   /* inline emphasis inside the prose */
.notice.settled { border-left-color: var(--stat-note); background: var(--stat-note-bg); }

/* the divergence report is the hero of a close packet */
.hero {
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface); padding: var(--sp-3); margin-bottom: var(--sp-2);
}
.hero.clean { border-left: 3px solid var(--stat-ok); }
.hero.dirty { border-left: 3px solid var(--stat-block); }
.hero h2 {
  font-family: var(--display); font-weight: 400; font-size: var(--fs-30);
  margin: 0 0 var(--sp-05); letter-spacing: -.01em;
}
.hero .verdict { font-size: var(--fs-13); color: var(--ink-soft); max-width: 70ch; }
.hero .counts { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
.hero .counts div { min-width: 92px; }
.hero .counts .n {
  font-size: var(--fs-20); font-variant-numeric: tabular-nums; display: block;
}
.hero .counts .n.bad { color: var(--stat-block); }
.hero .counts .n.ok { color: var(--stat-ok); }
.hero .counts .k { font-size: var(--fs-11); text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); }

.sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-11); color: var(--ink-soft); }
.withheld { font-size: var(--fs-11); color: var(--stat-escalate); }

/* ---------------------------------------------- dashboard stat blocks */
.hero-counts { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero-counts .stat { text-decoration: none; display: block; min-width: 110px; }
.hero-counts .n {
  display: block; font-size: var(--fs-20); font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.hero-counts .n.bad { color: var(--stat-block); }
.hero-counts .n.ok  { color: var(--stat-ok); }
.hero-counts .k {
  display: block; font-size: var(--fs-11); color: var(--ink-soft); margin-top: 2px;
}
.tabs a { text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* ---- Leave pivot (ledgers page) ---- */
.card-head .inline-filter {
  margin-left: auto; margin-right: var(--sp-2);
  font: inherit; font-size: var(--fs-12); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 3px 8px; width: 180px;
}
.notice.oneline { padding: var(--sp-05) var(--sp-2); }
.notice.oneline summary { cursor: pointer; list-style: none; }
.notice.oneline summary::-webkit-details-marker { display: none; }
.notice.oneline summary::after { content: " ▸"; color: var(--ink-soft); }
.notice.oneline details[open] summary::after { content: " ▾"; }
.lv-provenance { margin: var(--sp-1) var(--sp-2) 0; max-width: 76ch; }
.lv-pivot th.lv-k { width: 21%; }
.lv-cell { vertical-align: top; }
.lv-bal { font-size: var(--fs-16, 16px); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; display: block; }
.lv-bar { display: block; height: 3px; max-width: 72px; background: var(--accent-wash);
          border-radius: 2px; margin: 3px 0; }
.lv-bar i { display: block; height: 100%; background: var(--accent-bright); border-radius: 2px; }
.lv-sub { display: block; font-size: var(--fs-11); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .lv-count { display: none; }
  .lv-pivot thead { display: none; }
  .lv-pivot, .lv-pivot tbody { display: block; }
  .lv-pivot tr.lv-row { display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0 var(--sp-1); border-bottom: 1px solid var(--rule); padding: var(--sp-1) 0; }
  .lv-pivot tr.lv-row td.name { grid-column: 1 / -1; border: 0; padding-bottom: 2px; }
  .lv-pivot tr.lv-row td.lv-cell { border: 0; padding-top: 0; }
  .lv-pivot td.lv-cell::before { content: attr(data-kind); font-size: var(--fs-11);
    color: var(--ink-soft); display: block; letter-spacing: .06em; }
  .lv-pivot tr.lv-expansion td { display: block; }
}

/* ---- dashboard hierarchy (batch 3): escalate loudest, notes recede ---- */
.hero-counts .stat-escalate .n { font-size: var(--fs-30); font-weight: var(--fw-semi); color: var(--stat-escalate); }
.hero-counts .stat-block .n    { font-size: var(--fs-24); font-weight: var(--fw-semi); color: var(--stat-block); }
.hero-counts .stat-note .n     { font-size: var(--fs-16); color: var(--ink-soft); }
.card.secondary { background: var(--paper); }
.card.secondary .card-head .label { color: var(--ink-soft); font-weight: var(--fw-med); }
.card.secondary table.data { font-size: var(--fs-12); }

/* ---- Aria identity (revision round A) ---- */
.brand { display: flex; align-items: center; gap: var(--sp-1); }
.brand img { width: 30px; height: 30px; flex: none; }
.brand .brand-text small { margin-top: 0; }
.login .brand { flex-direction: column; text-align: center; gap: var(--sp-05); }
.login .brand img { width: 64px; height: 64px; }
.login .brand .brand-name { font-family: var(--display); font-size: var(--fs-24); letter-spacing: .01em; }
.login .brand .tagline { font-style: italic; font-size: var(--fs-12); color: var(--accent); }
.lede { font-size: var(--fs-16); margin: 0 0 var(--sp-2); max-width: 70ch; }
.lede strong { font-weight: var(--fw-semi); }
.plain-details summary { cursor: pointer; color: var(--ink-soft); font-size: var(--fs-12); }
