/* ═══ components ═══════════════════════════════════════════════════════════
   The pieces sections build from: tiles, cards, bars, switches, badges, and
   the three states every asynchronous screen has.

   That last group is the reason this file exists as its own concern. LOADING,
   EMPTY and ERROR are not decoration — they are the states a screen spends
   most of its life in during the minute somebody is actually looking at it,
   and if they are styled per-section they get skipped in the sections nobody
   demoed. Defining them once means a new section gets them by writing one
   class name.

   The distinction this build keeps re-learning applies here too: EMPTY and
   ERROR must never render the same. "There are no erasure requests" and "the
   erasure request list could not be loaded" look identical if both render as
   a blank table, and one of them means somebody's statutory deadline is
   quietly not being tracked.                                                 */

/* ── hidden means hidden ───────────────────────────────────────────────── */
/* The browser's own rule for the `hidden` attribute is `display:none` with no
   weight at all, so any class that sets a display of its own — `.btn`, `.row`,
   `.note` — beats it, and an element the script hid stays on the page. Found by
   walk 79: the leave form's Send button was "hidden" until Check had run, and
   was there to be pressed the whole time (docs/64). */
[hidden]{display:none !important}

/* ── tiles: one number, its label, and what it means ───────────────────── */
/* The number is the point, so it is large, tight and tabular. The label above
   it is small and quiet; the meaning below it is the sentence that stops the
   number being trivia. A tile with no third line is a tile that has told
   somebody a fact and left them to work out whether to care.

   A tile on its own (Home's dashboard, a figure in a card) RESTS: its hairline
   and nothing else (tokens.css, elevation). Reached for, it is raised. */
.tile{
  position:relative;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:var(--d-card);
  transition:box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease),
             background var(--fast) var(--ease);
}
a.tile:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
/* A hairline of colour down the left edge, keyed to the tone. Enough to make a
   row of tiles readable at a glance without colouring the whole card, which
   would make four things shout at once. */
.tile::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent);opacity:0;transition:opacity var(--fast) var(--ease);
}
.tile.on::before{opacity:1}
.tile.good::before{background:var(--good);opacity:1}
.tile.bad::before{background:var(--critical);opacity:1}
.tile.warn::before{background:var(--warn);opacity:1}
/* Toned tiles wear a faint wash of their colour, not just the hairline — the
   dashboard reads at arm's length now, and a white card with red text was
   quieter than the fact it carried. */
.tile.on{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--accent-wash) 50%,var(--surface)))}
.tile.good{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--good-wash) 55%,var(--surface)))}
.tile.bad{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--critical-wash) 55%,var(--surface)))}
.tile.warn{background:linear-gradient(180deg,var(--surface),
  color-mix(in srgb,var(--warn-wash) 55%,var(--surface)))}
.tile .k{
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:8px;
}
.tile .v{
  font-size:var(--fs-4xl);font-weight:600;letter-spacing:-.015em;line-height:1;
  font-variant-numeric:tabular-nums;color:var(--ink);
}
.tile .v.sm{font-size:var(--fs-xl);letter-spacing:-.015em}
.tile .m{font-size:var(--fs-xs);color:var(--ink-3);margin-top:8px;line-height:1.45}
.tile .m.good{color:var(--good);font-weight:500}
.tile .m.bad{color:var(--critical);font-weight:500}
.tile .m.warn{color:var(--warn);font-weight:500}

/* ── tiles on the ground (docs/71) ─────────────────────────────────────────
   A ROW of tiles is not a row of cards. Four figures in four boxes, each with
   its own border and shadow, were four things raised at once — on a page of
   six cards the eye had nowhere to rest — and at 400px each box took a whole
   row, so four figures filled the phone before anything else began. On the
   ground they are one band of figures, divided by hairlines, two abreast on a
   phone. A tone keeps its rail (the rail is the mark, as on a table's row) and
   loses its wash: a wash on the ground is a card again.

   The hairlines are every tile's own left and top edge, pulled back a pixel,
   so the first tile of each row and the first row lose theirs to the band's
   clip — which is what separates tiles without framing the ones at the ends,
   at any number of columns. */
.tiles > .tile{
  background:none;border:0;border-radius:0;
  border-left:var(--hairline) solid var(--line);margin-left:calc(var(--hairline) * -1);
  border-top:var(--hairline) solid var(--line);margin-top:calc(var(--hairline) * -1);
  padding:var(--d-gap) var(--d-card);
}
.tiles > .tile.on, .tiles > .tile.good, .tiles > .tile.bad, .tiles > .tile.warn{background:none}
.tiles > a.tile:hover{box-shadow:none;transform:none;
  background:color-mix(in srgb,var(--accent) 5%,transparent)}
.tiles > a.tile:focus-visible{outline-offset:-2px}
@media (max-width:520px){
  .tiles > .tile .v{font-size:var(--fs-2xl)}
}

/* ── cards ─────────────────────────────────────────────────────────────── */
/* RESTING: a hairline and nothing else. The card is lighter than the ground,
   and that is the lift; a shadow on every card is a shadow on none. */
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:var(--d-card);
}
.card + .card{margin-top:var(--d-gap)}
.card .cardhead{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  margin:-4px 0 16px;
}
.card .cardhead h2{margin:0}
/* RAISED: the card on this page that needs somebody (docs/71). Said in two
   ways and drawn one way. `.lead` is a screen saying so — Home's "Waiting on
   you" when something is; a card whose HEADING carries a warning or a critical
   pill says so by what it says ("blocks the run"), and is raised by that rule
   rather than by a style the screen writes for itself. The edge takes the
   pill's own colour, softened; the heading's rule separates it from a table. */
.card.lead,
.card:has(> .cardhead > .pill.warn),
.card:has(> .cardhead > .pill.bad){box-shadow:var(--shadow)}
.card.lead{border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}
.card:has(> .cardhead > .pill.warn){border-color:color-mix(in srgb,var(--warn) 45%,var(--line))}
.card:has(> .cardhead > .pill.bad){border-color:color-mix(in srgb,var(--critical) 45%,var(--line))}
.card.lead .cardhead{border-bottom:1px solid var(--line-2);padding-bottom:12px}

/* ── bars: a comparison, not a chart ───────────────────────────────────── */
.bars{display:flex;flex-direction:column;gap:12px;margin-top:4px}
.barrow{display:grid;grid-template-columns:132px 1fr 74px;align-items:center;gap:12px}
.barrow .lab{font-size:var(--fs-sm);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.track{height:9px;background:var(--line-2);border-radius:var(--r-full);overflow:hidden}
.fill{height:100%;background:var(--accent);border-radius:var(--r-full);width:0;transition:width var(--slow) var(--ease)}
.fill.bad{background:var(--critical)}
.fill.good{background:var(--good)}
.barrow .val{font-size:var(--fs-sm);text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}

/* ── badges ────────────────────────────────────────────────────────────── */
.pill{
  display:inline-block;font-size:var(--fs-2xs);font-weight:600;letter-spacing:.03em;
  text-transform:uppercase;padding:2px 6px;border-radius:var(--r-xs);
  background:var(--accent-wash);color:var(--accent-ink);white-space:nowrap;
}
.pill.good{background:var(--good-wash);color:var(--good)}
.pill.bad{background:var(--critical-wash);color:var(--critical)}
.pill.info{background:var(--info-wash);color:var(--info)}
.pill.violet{background:var(--violet-wash);color:var(--violet)}
.pill.warn{background:var(--warn-wash);color:var(--warn)}
.pill.quiet{background:var(--line-2);color:var(--ink-3)}
/* For identifiers. A key id is case-sensitive, and a pill that renders `k1` as
   `K1` is not styling — it is showing a different value than the one stored. */
.pill.exact{text-transform:none;font-family:var(--mono);letter-spacing:0;font-weight:500}

/* ── notes and callouts ────────────────────────────────────────────────── */
.note{
  padding:12px 12px;border-radius:var(--r-sm);background:var(--accent-wash);
  color:var(--accent-ink);font-size:var(--fs-sm);line-height:1.55;
}
.note + .note{margin-top:8px}
.note.bad{background:var(--critical-wash);color:var(--critical)}
.note.warn{background:var(--warn-wash);color:var(--warn)}
.note.good{background:var(--good-wash);color:var(--good)}
.note.quiet{background:color-mix(in srgb,var(--ink) 4%,transparent);color:var(--ink-2)}
.note b{font-weight:600}
.note ul{margin:8px 0 0;padding-left:16px}
.note li{margin-bottom:4px}

/* Statute citations. Small, monospaced, and never the loudest thing in a row —
   they are provenance, not the finding. */
.cite{font-family:var(--mono);font-size:var(--fs-2xs);color:var(--ink-3);letter-spacing:0}
a.cite{text-decoration:underline;text-underline-offset:2px}
a.cite:hover{color:var(--accent-ink)}

/* Provenance: as of when, why, and by whose hands (ui.js ruleLine, handsLine).
   Quiet, and always there — the date a rule took effect sits beside the figure
   it produced rather than behind a click, because it is the part that goes
   stale. */
.prov{font-size:var(--fs-xs);color:var(--ink-3);line-height:var(--lh-snug);margin:0}
p.prov{margin:4px 0 0}
.prov b{font-weight:500;color:var(--ink-2)}
.provwhen{color:var(--ink-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.provchecked{font-variant-numeric:tabular-nums;white-space:nowrap}
.provsep{color:var(--ink-4)}
.mv .prov{display:block;margin-top:2px}
.provmonth{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;margin:8px 0 0;font-size:var(--fs-xs);color:var(--ink-2)}
.provmonth .prov{margin:0}
.rulesbehind{margin-top:16px}
.rulesbehind summary{font-size:var(--fs-sm);cursor:pointer;color:var(--ink-2)}
.rulesbehind ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}
.rulesbehind li{font-size:var(--fs-sm);color:var(--ink-2);padding-left:12px;
  box-shadow:inset 2px 0 0 var(--line)}

/* ── module switches ───────────────────────────────────────────────────── */
.mod{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:16px 16px;display:flex;flex-direction:column;gap:8px;
  transition:border-color var(--fast) var(--ease);
}
.mod.on{border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
.mod .top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.mod .nm{font-size:var(--fs-md);font-weight:500;letter-spacing:0}
.mod .tg{font-size:var(--fs-sm);color:var(--ink-2);line-height:1.45}
.mod .meta{font-size:var(--fs-xs);color:var(--ink-3);line-height:1.5}
.sw{
  position:relative;width:38px;height:22px;border-radius:var(--r-full);background:var(--line);
  transition:background var(--fast) var(--ease);flex:none;
}
.sw::after{
  content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:var(--r-full);
  background:var(--knob);box-shadow:var(--shadow-knob);transition:transform var(--fast) var(--ease);
}
.sw.on{background:var(--accent)}
.sw.on::after{transform:translateX(16px)}
.sw[disabled]{cursor:not-allowed}
/* Locked-on stays fully on. Fading it read as "half on", which is not a state
   this product has — it is on, and something else needs it that way. */
.sw.locked{background:color-mix(in srgb,var(--accent) 42%, var(--line))}

/* ── loading / empty / error ───────────────────────────────────────────── */
.skel{
  background:linear-gradient(90deg,var(--line-2) 25%,var(--line) 37%,var(--line-2) 63%);
  background-size:400% 100%;border-radius:var(--r-sm);height:13px;
  animation:shimmer var(--shimmer) ease-in-out infinite;
}
.skel{display:block}
.skeleton > .skel + .skel{margin-top:8px}
.skel.w60{width:60%} .skel.w40{width:40%} .skel.w80{width:80%}
/* The shape of what is coming (ui.js loading(), docs/71): a band of figures on
   the ground as the tiles will stand, cards as cards, and a table as a table —
   a sunk head and rows whose first cell is the widest and whose figures sit
   right, so the page does not jump when it arrives. */
.skeleton{display:flex;flex-direction:column;gap:var(--d-gap)}
.sk-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));overflow:hidden;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sk-tile{display:flex;flex-direction:column;gap:8px;padding:var(--d-gap) var(--d-card);
  border-left:var(--hairline) solid var(--line);margin-left:calc(var(--hairline) * -1)}
.sk-tile .sk-fig{height:24px;width:50%}
.sk-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(268px,1fr));gap:var(--d-gap)}
.sk-card, .sk-table{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:var(--d-card)}
.sk-card{display:flex;flex-direction:column;gap:12px;min-height:120px}
.sk-head{display:block;height:24px;border-radius:var(--r-sm) var(--r-sm) 0 0;background:var(--sunk)}
.sk-row{display:flex;gap:var(--d-cell-x);padding:var(--d-cell-y) var(--d-cell-x);border-bottom:1px solid var(--line-2)}
.sk-row:last-child{border-bottom:0}
.sk-row .skel{flex:1 1 0}
.sk-row .skel:first-child{flex:2.4 1 0}
.sk-row:nth-child(odd) .skel:first-child{flex-grow:1.8}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}

.state{
  text-align:center;padding:48px 24px;border:1px dashed var(--line);
  border-radius:var(--r);color:var(--ink-2);
}
/* Inside a card the card is the frame: a dashed box within a bordered box was
   a frame in a frame on every empty list (docs/71). */
.card .state:not(.error):not(.refused){border:0;padding:32px 16px}
.state .h{font-size:var(--fs-base);font-weight:500;color:var(--ink);margin-bottom:6px}
.state .b{font-size:var(--fs-sm);line-height:1.6;max-width:52ch;margin:0 auto}
.state .actions{margin-top:16px;display:flex;gap:8px;justify-content:center}
/* An error is not an empty list with sadder wording. It is bordered, tinted,
   left-aligned and carries what actually failed. */
.state.error{
  border:1px solid color-mix(in srgb,var(--critical) 34%,var(--line));
  background:var(--critical-wash);text-align:left;padding:16px 20px;
}
.state.error .h{color:var(--critical)}
.state.error .b{margin:0;max-width:none}
.state.error .detail{
  font-family:var(--mono);font-size:var(--fs-xs);margin-top:8px;color:var(--ink-2);
  white-space:pre-wrap;word-break:break-word;
}

/* ── page transition ───────────────────────────────────────────────────── */
.pageenter{animation:pagein var(--mid) var(--ease)}
@keyframes pagein{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* ── the honest placeholder ────────────────────────────────────────────── */
/* Sections with no back end yet. Styled to look UNFINISHED on purpose: a
   placeholder that looks like a finished screen is how a demo becomes a
   promise nobody remembers making. */
.stub{
  border:1px dashed var(--line);border-radius:var(--r);padding:24px 20px;
  background:repeating-linear-gradient(135deg,transparent,transparent 9px,
    color-mix(in srgb,var(--ink) 2%,transparent) 9px,
    color-mix(in srgb,var(--ink) 2%,transparent) 18px);
}
.stub h2{margin-bottom:8px}
.stub .b{font-size:var(--fs-md);line-height:1.6;color:var(--ink-2);max-width:64ch}
.stub .what{margin-top:16px}
.stub .what li{font-size:var(--fs-sm);color:var(--ink-2);margin-bottom:6px;line-height:1.5}

/* ── platform console ──────────────────────────────────────────────────── */
/* A company row reads as an entity, not a string: the badge gives the eye
   something to land on when there are forty of them. */
.orgrow{display:inline-flex;align-items:center;gap:8px}
.initials{
  width:34px;height:34px;border-radius:var(--r-sm);flex:none;display:grid;place-items:center;
  background:var(--accent-wash);color:var(--accent-ink);
  font-size:var(--fs-xs);font-weight:600;letter-spacing:.01em;
}
.initials.sm{width:26px;height:26px;border-radius:var(--r-sm);font-size:var(--fs-2xs)}

.supportrow{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:12px 0;border-bottom:1px solid var(--line-2);
}
.supportrow:last-child{border-bottom:0;padding-bottom:0}
.supportrow .pill{margin-left:6px}

/* An empty bar still needs to be visible, or a plan with no companies looks
   like a rendering failure rather than a plan nobody is on. */
.fill.empty{background:var(--line);min-width:2px}

/* ── modals ────────────────────────────────────────────────────────────── */
/* A real <dialog>, so the focus trap, Escape and the inert background come from
   the browser. The roster check lives in one of these and must not be
   dismissable by clicking past it: "fourteen people are not in this sheet"
   scrolling away behind a click is the same as never having checked. */
.modal{
  border:1px solid var(--line); border-radius:var(--r); padding:0;
  background:var(--surface); color:var(--ink);
  width:min(560px, calc(100vw - 32px)); max-height:min(78vh, 720px);
  box-shadow:var(--shadow-lg);
}
.modal.wide{width:min(820px, calc(100vw - 32px))}
/* The editor that IS the screen for a moment — his ask: full screen, stable.
   One fixed height whatever the content, so adding or removing a component
   never resizes the frame under the pointer; only the body scrolls. */
.modal.full{
  width:min(1180px, calc(100vw - 28px));
  height:min(92vh, 1040px); max-height:none;
}
.modal.full .modalform{height:100%;max-height:none}
.modal.full .modalbody{flex:1}
.modal::backdrop{
  background:color-mix(in srgb, var(--plane) 66%, transparent);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.modal[open]{animation:modalin var(--mid) var(--ease)}
@keyframes modalin{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.modalform{display:flex;flex-direction:column;max-height:inherit;min-height:0}
.modalhead{padding:16px 20px 12px}
.modalhead h2{margin:0;font-size:var(--fs-lg);letter-spacing:-.015em}
.modalbody{
  padding:0 20px 16px;overflow:auto;font-size:var(--fs-md);line-height:1.6;
  /* Hairlines top and bottom, so a body with more content below the fold reads
     as scrollable. Without them the roster check ends mid-sentence and looks
     like a rendering bug rather than a list somebody should scroll. */
  border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2);
  padding-top:12px;
}
/* Chromium makes a scrollable region keyboard-focusable and gives it the
   default focus ring, which lands a hard blue bar across the modal the moment
   it opens. Keeping the ring for keyboard focus and dropping it otherwise is
   the accessible version of removing it. */
.modalbody:focus{outline:none}
.modalbody:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--focus)}
.modalbody > :first-child{margin-top:0}
.modalfoot{
  display:flex;justify-content:flex-end;gap:8px;
  padding:12px 20px 16px;margin-top:auto;
}
.modal.bad .modalhead h2{color:var(--critical)}

/* A block of named problems inside a modal. Names, not counts: "3 employees
   have no attendance" sends somebody to a spreadsheet to find out which. */
.problem{
  border:1px solid var(--line); border-left:3px solid var(--critical);
  border-radius:var(--r-sm); padding:12px 12px; margin-bottom:8px;
  background:var(--critical-wash);
}
.problem.soft{border-left-color:var(--warn);background:var(--warn-wash)}
.problem .ph{font-size:var(--fs-md);font-weight:500;color:var(--ink);margin-bottom:4px}
.problem .pd{font-size:var(--fs-sm);color:var(--ink-2);line-height:1.55}
.problem ul{margin:8px 0 0;padding-left:16px;max-height:180px;overflow:auto}
.problem li{font-size:var(--fs-sm);color:var(--ink-2);margin-bottom:4px;line-height:1.5}
.problem .ov{
  display:flex;align-items:flex-start;gap:8px;margin-top:12px;padding-top:8px;
  border-top:1px solid color-mix(in srgb,var(--ink) 8%,transparent);
  font-size:var(--fs-sm);color:var(--ink-2);
}
.problem .ov input{width:auto;margin-top:2px;flex:none}
/* A problem nobody can override says so, rather than showing a disabled
   checkbox that reads as "not ticked yet". */
.problem .locked{
  margin-top:8px;font-size:var(--fs-xs);color:var(--critical);
  font-weight:500;letter-spacing:.01em;
}

/* ── a balance, as a number somebody can act on ────────────────────────── */
.balgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.bal{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 16px}
.bal .bc{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.bal .bl{font-size:var(--fs-sm);color:var(--ink-2)}
.bal .bv{font-size:var(--fs-2xl);font-weight:600;letter-spacing:-.015em;font-variant-numeric:tabular-nums}
/* Available and balance are DIFFERENT numbers when something is awaiting
   approval, and showing only the first is how two requests overdraw one
   balance. Both, always, with the difference named. */
.bal .bm{font-size:var(--fs-xs);color:var(--ink-3);margin-top:8px;line-height:1.5}
.bal .bm.held{color:var(--warn)}

/* ── a compact timeline of ledger movements ────────────────────────────── */
.mv{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:var(--fs-sm)}
.mv:last-child{border-bottom:0}
.mv .md{color:var(--ink-3);white-space:nowrap;font-variant-numeric:tabular-nums;min-width:82px}
.mv .mn{color:var(--ink-2);flex:1;line-height:1.5}
.mv .mq{font-variant-numeric:tabular-nums;font-weight:500;white-space:nowrap;margin-left:auto}
.mv .mq.up{color:var(--ink)}
.mv .mq.down{color:var(--ink-2)}

/* ── toasts ────────────────────────────────────────────────────────────────
   Bottom-right, stacked, and narrow enough that they never cover the table
   somebody is reading. A toast that has to be moved out of the way to see the
   thing it is describing is a modal with extra steps.                       */
.toasts{
  position:fixed;right:18px;bottom:18px;z-index:60;
  display:flex;flex-direction:column;gap:8px;
  max-width:min(380px,calc(100vw - 36px));pointer-events:none;
}
.toast{
  pointer-events:auto;display:flex;gap:8px;align-items:flex-start;
  background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--good);
  border-radius:var(--r-sm);box-shadow:var(--shadow-lg);
  padding:12px 12px 12px 12px;
  animation:toastin var(--mid) var(--ease);
}
.toast.warn{border-left-color:var(--warn)}
.toast.bad{border-left-color:var(--critical)}
.toast.quiet{border-left-color:var(--ink-4)}
.toast .tbody{flex:1;min-width:0}
.toast .tmsg{font-size:var(--fs-sm);font-weight:500;color:var(--ink);line-height:1.45}
.toast .tdet{font-size:var(--fs-xs);color:var(--ink-3);margin-top:2px;line-height:1.5}
.toast .tx{
  background:none;border:0;cursor:pointer;font-size:var(--fs-lg);line-height:1;
  color:var(--ink-3);padding:0 2px;margin-top:-2px;
}
.toast .tx:hover{color:var(--ink-2)}
.toast.going{animation:toastout var(--fast) var(--ease) forwards}
@keyframes toastin{from{opacity:0;transform:translateY(9px) scale(.985)}
                   to{opacity:1;transform:none}}
@keyframes toastout{to{opacity:0;transform:translateX(14px)}}
@media (prefers-reduced-motion:reduce){
  .toast{animation:none}
  .toast.going{animation:none;opacity:0}
}

/* ── sortable headers and the table toolbar ──────────────────────────────── */
.tbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:-2px 0 12px;
}
.tbar .thint{font-size:var(--fs-xs);color:var(--ink-3)}
/* No `position` here: the head is held (`sticky`, base.css), and `relative`
   on top of that is not a no-op — it replaces the hold and turns its `top`
   into a 56px shove down the table. */
table.sortable thead th[data-sortable]{
  cursor:pointer;user-select:none;
  transition:color var(--fast) var(--ease);
}
table.sortable thead th[data-sortable]:hover,
table.sortable thead th[data-sortable]:focus-visible{color:var(--accent-ink)}
table.sortable thead th[data-sortable]:focus-visible{outline:none;box-shadow:var(--ring)}
/* The arrow occupies its space whether or not the column is the sorted one, so
   a header does not shift sideways when clicked. */
.sarr{display:inline-block;width:11px;margin-left:4px;opacity:0}
.sarr.lead{margin-left:0;margin-right:4px}
th[data-sortable]:hover .sarr{opacity:.42}
th[aria-sort] .sarr{opacity:1;color:var(--accent-ink)}
th[aria-sort=ascending] .sarr::after{content:"\2191"}
th[aria-sort=descending] .sarr::after{content:"\2193"}
th[data-sortable]:not([aria-sort]) .sarr::after{content:"\2195"}

/* ── the command palette ───────────────────────────────────────────────────
   Anchored near the top rather than centred. A centred box jumps as results
   arrive; one pinned to a top offset grows downwards, so the input stays
   exactly where the eye left it and under the cursor that opened it.        */
.palettescrim{
  position:fixed;inset:0;z-index:70;
  background:color-mix(in srgb,var(--ink) 26%,transparent);
  backdrop-filter:blur(2px);
  animation:fade var(--fast) var(--ease);
}
.palette{
  position:fixed;z-index:71;left:50%;top:88px;transform:translateX(-50%);
  width:min(620px,calc(100vw - 32px));
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow-lg);overflow:hidden;
  animation:palettein var(--mid) var(--ease);
}
.palette .pinput{
  display:flex;align-items:center;gap:8px;padding:12px 16px;
  border-bottom:1px solid var(--line);color:var(--ink-3);
}
.palette .pinput input{
  flex:1;border:0;background:none;padding:0;font-size:var(--fs-base);color:var(--ink);
}
.palette .pinput input:focus{outline:none;box-shadow:none}
.palette kbd{
  font:inherit;font-size:var(--fs-2xs);letter-spacing:.04em;color:var(--ink-3);
  border:1px solid var(--line);border-radius:var(--r-xs);padding:2px 4px;
}
.presults{max-height:min(58vh,460px);overflow:auto;padding:6px}
.pgroup + .pgroup{border-top:1px solid var(--line-2);margin-top:6px;padding-top:6px}
.phead{
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-3);padding:6px 8px 4px;
}
.presult{
  padding:8px 8px;border-radius:var(--r-sm);cursor:pointer;
  border-left:2px solid transparent;
}
.presult.on{background:var(--accent-wash);border-left-color:var(--accent)}
.presult .pmain{font-size:var(--fs-md);font-weight:500;color:var(--ink)}
.presult .pmeta{font-size:var(--fs-xs);color:var(--ink-3);margin-top:2px}
.presult .ptag{
  font-size:var(--fs-2xs);text-transform:uppercase;letter-spacing:.05em;
  border:1px solid currentColor;border-radius:var(--r-xs);
  padding:0 4px;margin-left:6px;vertical-align:1px;
  color:var(--ink-3);
}
/* On notice and gone are worth an amber; on probation is worth a mention and
   not an alarm. A tag that shouts for every state is a tag nobody reads. */
.presult .ptag.warn{color:var(--warn)}
.pnote{padding:12px 12px;font-size:var(--fs-sm);color:var(--ink-3);line-height:1.6}
.pnote.bad{color:var(--critical)}
@keyframes palettein{from{opacity:0;transform:translateX(-50%) translateY(-8px) scale(.99)}
                     to{opacity:1;transform:translateX(-50%)}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .palette,.palettescrim{animation:none}
}

/* ── a settings row ────────────────────────────────────────────────────────
   The whole design goal is that a CHOSEN setting and a product DEFAULT do not
   look alike. A page of filled-in fields claims the company configured all of
   it; the accent rail says which ones it actually did.                      */
.setrow{padding:16px 0;border-bottom:1px solid var(--line-2)}
.setrow:last-child{border-bottom:0;padding-bottom:2px}
.setrow.chosen{
  border-left:2px solid var(--accent);
  margin-left:-16px;padding-left:12px;
}
.sethead{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.sethead label{margin:0;font-size:var(--fs-md);font-weight:500;color:var(--ink)}
.setctl{display:flex;align-items:center;gap:8px;max-width:340px}
.setctl input[type=number]{max-width:120px}
.setunit{font-size:var(--fs-sm);color:var(--ink-3);white-space:nowrap}
.seteffect{font-size:var(--fs-sm);color:var(--ink-2);margin-top:8px;line-height:1.6;max-width:70ch}
/* A caution is a statutory consequence, not a hint. It gets a rule of its own
   so it cannot be skimmed past as more help text. */
.setcaution{
  font-size:var(--fs-xs);color:var(--ink-2);margin-top:8px;line-height:1.6;max-width:70ch;
  border-left:2px solid var(--warn);padding-left:8px;
}
.setdefault{font-size:var(--fs-xs);color:var(--ink-3);margin-top:6px}
.switch{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer}
.switch input{width:auto;margin:0}
.switch span{font-size:var(--fs-sm);color:var(--ink-2)}

/* ── who is away ───────────────────────────────────────────────────────────
   A row per day, not a seven-column month grid. The grid looks more like a
   calendar and answers the question worse: the cells are too small for names,
   so they hold counts, and a count sends the reader hunting for who.        */
.awaylist{display:flex;flex-direction:column}
.awayday{
  display:flex;gap:12px;align-items:flex-start;
  padding:6px 8px;border-bottom:1px solid var(--line-2);border-left:2px solid transparent;
}
.awayday:last-child{border-bottom:0}
/* A closed day is not an empty day. Nobody is in on Independence Day either,
   and a grid that draws the two the same gets checked against a paper one. */
.awayday.closed{background:var(--sunk);color:var(--ink-3)}
.awayday.busy{border-left-color:var(--warn)}
.awaydate{display:flex;align-items:baseline;gap:6px;min-width:56px}
.awaydate .dnum{font-size:var(--fs-md);font-weight:600;font-variant-numeric:tabular-nums}
.awaydate .ddow{font-size:var(--fs-2xs);color:var(--ink-3);text-transform:uppercase;
                letter-spacing:.05em}
.awaywho{display:flex;flex-wrap:wrap;gap:4px;align-items:center;
         font-size:var(--fs-sm);padding-top:2px;min-height:20px}
.awayperson{
  background:var(--accent-wash);color:var(--accent-ink);
  border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);
  border-radius:var(--r-xs);padding:2px 6px;font-size:var(--fs-xs);
}
/* A submitted request is a PLAN. Drawn solid, it is a week somebody plans
   around that may never be taken; left out, it is a week they overfill. */
.awayperson.plan{
  background:transparent;color:var(--ink-2);border-style:dashed;
  border-color:var(--ink-4);
}

/* ── job and salary history ────────────────────────────────────────────────
   The two timelines run side by side rather than merged. A promotion and a pay
   rise usually happen together and sometimes do not, and a merged list has to
   invent a row for whichever half did not move.                            */
.tlhead{
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-3);margin:0 0 8px;
}
.statusline{display:flex;flex-wrap:wrap;gap:6px}
.statuschip{
  display:inline-flex;gap:6px;align-items:baseline;
  background:var(--sunk);border-radius:var(--r-sm);padding:4px 8px;font-size:var(--fs-xs);
}
.statuschip .dim{font-size:var(--fs-2xs);font-variant-numeric:tabular-nums}
td .up{color:var(--ink)}
td .down{color:var(--ink-2)}

/* ── the attendance day book ───────────────────────────────────────────────
   A month grid, because the question is "which days" and a total cannot be
   argued with. Narrow cells, one letter each, and the source shown as a dot
   rather than a second colour — a cell carrying two colour meanings is a cell
   nobody reads correctly.                                                   */
.daybook{overflow-x:auto}
table.grid{border-collapse:separate;border-spacing:0;font-size:var(--fs-xs);width:auto}
table.grid th{padding:0 0 6px;font-size:var(--fs-2xs);text-align:center;min-width:22px}
table.grid th.who,table.grid td.who{
  text-align:left;position:sticky;left:0;background:var(--surface);
  padding-right:12px;min-width:150px;z-index:1;
}
table.grid th.weekend{color:var(--ink-3)}
table.grid td.mark{
  text-align:center;padding:2px 0;border:1px solid var(--line-2);
  font-variant-numeric:tabular-nums;position:relative;min-width:22px;
}
table.grid td.mark.weekend{background:var(--sunk)}
table.grid td.mark.ok{background:var(--good-wash);color:var(--good)}
table.grid td.mark.bad{background:var(--critical-wash);color:var(--critical);font-weight:600}
table.grid td.mark.leave{background:var(--accent-wash);color:var(--accent-ink)}
/* two-letter leave codes (CL, EL, SL) in the same 22px cell */
table.grid td.mark.leave{font-size:var(--fs-2xs);font-weight:600;letter-spacing:0}
table.grid td.mark.warn{background:var(--warn-wash);color:var(--warn)}
table.grid td.mark.off{color:var(--ink-3)}
table.grid td.mark i{
  position:absolute;top:0;right:2px;font-size:var(--fs-sm);line-height:1;font-style:normal;
  color:var(--ink-3);
}
table.grid td.num{padding:2px 6px;text-align:right;font-variant-numeric:tabular-nums}
.legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px;font-size:var(--fs-xs);
        color:var(--ink-3)}
.legend b{color:var(--ink-2);font-variant-numeric:tabular-nums}

/* ── the device format catalogue ───────────────────────────────────────────
   Shown in full rather than hidden behind the registration dropdown: "which of
   these is my terminal" is answered by reading the notes, and a dropdown does
   not let anybody read them.                                                */
.formatgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.formatcard{
  background:var(--sunk);border-radius:var(--r-sm);padding:12px 12px;font-size:var(--fs-sm);
}

/* The work board (`.board`, `.bcol`, `.bcard` and eleven more), a task's
   history in the drawer (`.tlist`, `.titem`) and the capacity bar
   (`.loadbar`) stood here until docs/75. The joiners board went at docs/64
   and the practice-management half at 43; their styles outlived both screens
   by eleven sessions because nothing in this repository had ever read a
   stylesheet against the sections. `tools/screens.py` does. */

/* ── the readiness checklist ───────────────────────────────────────────────
   A row per check: what it is, what it blocks, what breaks quietly if it is
   ignored, and a way to go and fix it. The left rail is coloured by severity
   rather than the whole row, because a screen of six amber blocks reads as an
   emergency and most of these are not one. */
.checkrows{display:flex;flex-direction:column;gap:2px}
.checkrow{
  display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;
  padding:12px 12px;border-radius:var(--r-sm);
  border-left:3px solid var(--line);
}
.checkrow.blocker{border-left-color:var(--critical);background:var(--critical-wash)}
.checkrow.gap{border-left-color:var(--warn);background:var(--warn-wash)}
.checkrow.advisory{border-left-color:var(--line-2)}
.checkrow + .checkrow{margin-top:4px}
.checkmark{min-width:112px}
.checkbody{min-width:0}
.checktitle{margin:0 0 4px;font-size:var(--fs-md);font-weight:600;color:var(--ink)}
.checkbody .help{margin:2px 0 0}
.checkfix{white-space:nowrap}
@media (max-width:720px){
  .checkrow{grid-template-columns:1fr;gap:8px}
  .checkmark{min-width:0}
}

/* The salary breakdown chips (`.breakdown`, `.bchip`) and the editor's
   two-column component grid (`.compgrid`) stood here until docs/75, drawn by
   nothing. The grid a person actually sees is `.sgtable`, below. */

/* Which statutory job a component does, beside its label. */
.rolechip{
  display:inline-block;margin-left:6px;padding:2px 6px;border-radius:var(--r-full);
  background:var(--accent-wash);color:var(--accent-ink);
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;
}

/* ── letters ───────────────────────────────────────────────────────────────*/
.starters{display:flex;flex-wrap:wrap;gap:8px}
.fieldlist{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}
.fieldrow{display:flex;gap:8px;align-items:baseline;font-size:var(--fs-xs)}
.fieldrow code{
  font-family:var(--mono);font-size:var(--fs-xs);color:var(--accent-ink);
  background:var(--accent-wash);padding:2px 4px;border-radius:var(--r-sm);
  white-space:nowrap;
}
.letterpreview{
  white-space:pre-wrap;font-family:var(--mono);font-size:var(--fs-xs);line-height:1.65;
  background:var(--line-2);padding:16px;border-radius:var(--r-sm);
  max-height:52vh;overflow:auto;margin:0;color:var(--ink);
}
tr.retired td{opacity:.55}
.checkline{display:flex;gap:8px;align-items:flex-start;margin-top:8px}
.checkline input[type=checkbox]{width:auto;margin-top:2px}
@media (max-width:720px){ .fieldlist{grid-template-columns:1fr} }

/* ── the employee editor ───────────────────────────────────────────────────
   Sections that save independently, because they are different acts with
   different authority — identity and job are HR's, the bank account is the
   payroll seat's. One big Save would couple four permissions into one button. */
dialog.modal.editor{max-width:760px;width:92vw}
.editsec{padding:12px 0 16px;border-top:1.5px solid var(--line)}
.editsec:first-child{border-top:0;padding-top:2px}
.editsec h3{margin:0 0 12px;font-size:var(--fs-sm);letter-spacing:.01em;color:var(--ink)}
.editsec .btn{margin-top:4px}

/* ── the guided pay run ──────────────────────────────────────────────────── */
/* Five numbered steps down the page. Done steps collapse to a receipt line,
   the current one carries its working area and ONE primary button, the ones
   ahead are dim with what they will need. The rail connects the numbers. */
.gflow{margin-top:6px}
.gstep{display:flex;gap:12px;position:relative;padding-bottom:16px}
.gstep:last-child{padding-bottom:2px}
.gstep::before{
  content:"";position:absolute;left:14px;top:30px;bottom:-2px;width:2px;
  background:var(--line);
}
.gstep:last-child::before{display:none}
.gstep.done::before{background:color-mix(in srgb,var(--accent) 45%,var(--line))}
.gnum{
  width:29px;height:29px;border-radius:50%;flex:none;z-index:1;
  display:flex;align-items:center;justify-content:center;
  font-size:var(--fs-sm);font-weight:600;font-variant-numeric:tabular-nums;
  background:var(--plane);border:2px solid var(--line);color:var(--ink-3);
}
.gstep.done .gnum{
  background:var(--accent);
  border-color:transparent;color:var(--on-accent);font-size:var(--fs-md);
}
.gstep.current .gnum{
  background:var(--accent-wash);border-color:var(--accent);color:var(--accent-ink);
  box-shadow:0 0 0 4px var(--accent-wash);
}
.gbody{flex:1;min-width:0;padding-top:4px}
.ghead{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;font-size:var(--fs-md)}
.ghead b{letter-spacing:0}
.gstep.ahead .ghead b{color:var(--ink-3);font-weight:600}
.gstep.done .ghead b{color:var(--ink-2)}
.grec{font-size:var(--fs-xs);color:var(--ink-3)}
.gstep.ahead .grec{font-style:italic}
.gcard{
  margin-top:8px;padding:16px 16px;border:1.5px solid
  color-mix(in srgb,var(--accent) 30%,var(--line));
  border-radius:var(--r-sm);
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--accent-wash) 45%,var(--surface)), var(--surface) 70px);
  box-shadow:var(--shadow);
}

/* Card-heading identity dots — a small coloured mark before a working card's
   title, so One-time pay, Held salaries and the payslip table stop reading as
   three identical white slabs. */
.hdot{
  display:inline-block;width:9px;height:9px;border-radius:50%;
  margin-right:8px;vertical-align:1px;
}
/* Identity, so a chart's first colours — except the two that name a STATE
   (check-in open, salaries held), which were drawn in chart colours under
   status names until docs/71 and now wear the status they say. */
.hdot.accent{background:var(--viz-1)}
.hdot.violet{background:var(--viz-3)}
.hdot.info{background:var(--viz-6)}
.hdot.good{background:var(--good)}
.hdot.warn{background:var(--warn)}

/* The gather tiles in miniature — pinned under the ✓ step so the month's
   inputs stay VISIBLE after locking, instead of vanishing into a receipt. */
.gmini{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gmini .stchip{font-size:var(--fs-xs)}

/* Attendance-first: until something is recorded, the later tiles wait —
   his competitor's ordering, said with saturation instead of a lock. */
.ptile.waiting{opacity:.55;filter:saturate(.55)}
.ptile.waiting .pm::after{content:" — attendance first";color:var(--ink-3)}
.gacts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.gcard .card{box-shadow:none;border:1px solid var(--line);margin:8px 0}
.gpart{
  display:inline-flex;align-items:center;gap:6px;
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.09em;text-transform:uppercase;
  color:var(--accent-ink);background:var(--accent-wash);
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));
  padding:4px 12px;border-radius:var(--r-full);margin:2px 0 12px 40px;
}
.gpart::before{
  content:"";width:7px;height:7px;border-radius:50%;
  background:var(--accent);
}
.gstep+.gpart,.gstep~.gpart{margin-top:8px}

/* The prepare-step's action tiles — the SHRMpro wall of doors, tastefully. */
.ptiles{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:8px;margin:0 0 12px;
}
.ptile{
  display:block;border:1px solid var(--line);border-radius:var(--r-sm);
  padding:12px 12px;background:var(--plane);text-decoration:none;color:inherit;
  transition:box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
  cursor:pointer;
}
.ptile:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.ptile .pt{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.05em;
  text-transform:uppercase;color:var(--ink-3)}
.ptile .pv{font-size:var(--fs-xl);font-weight:600;letter-spacing:-.015em;color:var(--ink);
  margin:2px 0 2px;font-variant-numeric:tabular-nums}
.ptile .pm{font-size:var(--fs-xs);color:var(--ink-3);line-height:1.45}
.ptile .pa{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.ptile.accent{background:var(--accent-wash);border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}
.ptile.accent .pt{color:var(--accent-ink)}
.ptile.good{background:var(--good-wash);border-color:color-mix(in srgb,var(--good) 30%,var(--line))}
.ptile.good .pt{color:var(--good)}
.ptile.warn{background:var(--warn-wash);border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}
.ptile.warn .pt{color:var(--warn)}
.ptile.violet{background:var(--violet-wash);border-color:color-mix(in srgb,var(--violet) 30%,var(--line))}
.ptile.violet .pt{color:var(--violet)}
.ptile.info{background:var(--info-wash);border-color:color-mix(in srgb,var(--info) 30%,var(--line))}
.ptile.info .pt{color:var(--info)}

/* ── charts (app/charts.js, docs/68 §4) ─────────────────────────────────────
   One system. A mark draws in `--viz-*` or `--seq-*` and in nothing else —
   never the accent, never a status colour (tokens.css). Every word is real
   text at a token size with tabular figures; only a trend's LINE is an SVG,
   stretched to the card with its stroke left alone. */
.chart{font-variant-numeric:tabular-nums;color:var(--ink-2);font-size:var(--fs-2xs)}
.chart i{display:block;font-style:normal}
.chart .s1, .chart-legend .s1{--series:var(--viz-1)}
.chart .s2, .chart-legend .s2{--series:var(--viz-2)}
.chart .s3, .chart-legend .s3{--series:var(--viz-3)}
.chart .s4, .chart-legend .s4{--series:var(--viz-4)}
.chart .s5, .chart-legend .s5{--series:var(--viz-5)}
.chart .s6, .chart-legend .s6{--series:var(--viz-6)}
.chart.s1{--series:var(--viz-1)} .chart.s2{--series:var(--viz-2)}
.chart.s3{--series:var(--viz-3)} .chart.s4{--series:var(--viz-4)}
.chart.s5{--series:var(--viz-5)} .chart.s6{--series:var(--viz-6)}
.chart-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin-bottom:8px;font-size:var(--fs-2xs);color:var(--ink-3)}
.chart-legend span{display:inline-flex;align-items:center;gap:6px}
.chart-legend i{display:inline-block;width:8px;height:8px;border-radius:var(--r-xs);background:var(--series)}

/* below three points: a figure, and when the trend will appear */
.chart-figure{display:flex;flex-direction:column;gap:4px;color:inherit;text-decoration:none}
.chart-figure .cf-k{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3)}
.chart-figure .cf-v{font-size:var(--fs-4xl);font-weight:600;line-height:1.1;letter-spacing:-.015em;color:var(--ink);font-variant-numeric:tabular-nums}
.chart-figure .cf-n{font-size:var(--fs-xs);color:var(--ink-2)}
.chart-figure .cf-w, .chart-wait{font-size:var(--fs-xs);color:var(--ink-3);line-height:1.5;margin:4px 0 0}

/* a trend: a line on an area, a faint grid, the last point emphasised */
.chart-trend .ct-plot{position:relative;height:148px;margin:12px 48px 0 0}
.chart-trend svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.chart-trend svg *{vector-effect:non-scaling-stroke}
.chart-trend .grid{stroke:var(--line-2);stroke-width:1}
.chart-trend .base{stroke:var(--line);stroke-width:1}
.chart-trend .line{fill:none;stroke:var(--series);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.chart-trend .area{fill:color-mix(in srgb,var(--series) 14%,transparent);stroke:none}
.chart-trend .ct-tick{position:absolute;left:0;transform:translateY(-100%);color:var(--ink-3);padding-bottom:2px}
.chart-trend .ct-hit{position:absolute;top:0;bottom:0;width:12px;transform:translateX(-50%)}
.chart-trend .ct-end{
  position:absolute;width:8px;height:8px;border-radius:var(--r-full);transform:translate(-50%,-50%);
  background:var(--series);box-shadow:0 0 0 3px var(--surface), 0 0 0 4px var(--series);
}
.chart-trend .ct-endlabel{position:absolute;left:100%;transform:translateY(-50%);padding-left:12px;font-weight:600;color:var(--ink);white-space:nowrap}
.chart-trend .ct-axis{display:flex;justify-content:space-between;margin:6px 48px 0 0;color:var(--ink-3)}
.chart-trend .ct-axis span{flex:1 1 0;text-align:center;white-space:nowrap;min-width:0}
.chart-trend .ct-axis span:first-child{text-align:left}
.chart-trend .ct-axis span:last-child{text-align:right}
.chart-trend .ct-axis .on{color:var(--ink);font-weight:600}

/* columns: one a point, each a stack */
.chart-cols .cc-plot{
  position:relative;height:148px;margin-top:20px;
  display:grid;grid-template-columns:repeat(var(--n, 1),minmax(0,1fr));gap:6px;align-items:end;
  border-bottom:1px solid var(--line);
}
.chart-cols .cc-grid{position:absolute;left:0;right:0;border-top:1px solid var(--line-2);pointer-events:none}
.chart-cols .cc-grid em{position:absolute;right:0;bottom:2px;font-style:normal;color:var(--ink-3)}
.chart-cols .cc-col{position:relative;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;min-width:0}
.chart-cols .cc-stack{width:100%;max-width:40px;min-height:2px;display:flex;flex-direction:column;border-radius:var(--r-xs) var(--r-xs) 0 0;overflow:hidden}
.chart-cols .cc-stack i{background:var(--series);min-height:1px}
.chart-cols .cc-col.faint .cc-stack{opacity:.45}
.chart-cols .cc-v{margin-bottom:4px;color:var(--ink-3);white-space:nowrap}
.chart-cols .cc-col.on .cc-v{color:var(--ink);font-weight:600}
.chart-cols .cc-axis{display:grid;grid-template-columns:repeat(var(--n, 1),minmax(0,1fr));gap:6px;margin-top:6px;color:var(--ink-3);text-align:center}
.chart-cols .cc-axis span{white-space:nowrap;overflow:hidden;text-overflow:clip}
.chart-cols .cc-axis .on{color:var(--ink);font-weight:600}

/* bars: one kind against another, named on the left and valued on the right */
.chart-bars{display:grid;gap:8px}
.chart-bars .cb-row{display:grid;grid-template-columns:minmax(40px,max-content) minmax(0,1fr) max-content;gap:2px 12px;align-items:center}
.chart-bars .cb-l{color:var(--ink-2);font-size:var(--fs-xs)}
.chart-bars .cb-t{height:12px;border-radius:var(--r-xs);background:var(--line-2);overflow:hidden}
.chart-bars .cb-t i{height:100%;min-width:2px;border-radius:0 var(--r-xs) var(--r-xs) 0;background:var(--series)}
.chart-bars .cb-v{font-size:var(--fs-xs);font-weight:500;color:var(--ink);text-align:right}
.chart-bars .cb-s{grid-column:2 / -1;line-height:1.35}

/* parts of a whole: one bar, and its key carries the figures */
.chart-parts .cp-bar{display:flex;gap:2px;height:16px;border-radius:var(--r-xs);overflow:hidden;background:var(--line-2)}
.chart-parts .cp-bar i{background:var(--series);min-width:4px}
.chart-parts .cp-key{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:12px;font-size:var(--fs-xs);color:var(--ink-2)}
.chart-parts .cp-key span{display:inline-flex;align-items:center;gap:6px}
.chart-parts .cp-key i{width:8px;height:8px;border-radius:var(--r-xs);background:var(--series)}
.chart-parts .cp-key b{font-size:var(--fs-base);font-weight:600;color:var(--ink)}

/* a heatmap, on the sequential ramp */
.chart-heat{display:grid;gap:2px;overflow-x:auto;scrollbar-width:thin}
.chart-heat .ch-row{display:grid;grid-template-columns:minmax(72px,112px) repeat(var(--n, 1),minmax(8px,1fr));gap:2px;align-items:center}
.chart-heat .ch-l{font-size:var(--fs-xs);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:8px}
.chart-heat .ch-d{text-align:center;color:var(--ink-3)}
.ch-c{height:16px;border-radius:var(--r-xs);background:var(--line-2);border:1px solid transparent}
.ch-c.q1{background:var(--seq-1)} .ch-c.q2{background:var(--seq-2)} .ch-c.q3{background:var(--seq-3)}
.ch-c.q4{background:var(--seq-4)} .ch-c.q5{background:var(--seq-5)}
.ch-c.m-leave{background:transparent;border-color:var(--ink-4)}
.ch-c.m-off{background:transparent;border-color:var(--line)}
.ch-c.m-absent{background:var(--surface);border-color:var(--ink-2);border-style:dashed}
.chart-legend.ramp{margin:8px 0 0;gap:2px;align-items:center}
.chart-legend.ramp .ch-c{display:inline-block;width:16px;height:8px}
.chart-legend.ramp span{margin:0 6px}

/* ── table pagination ────────────────────────────────────────────────────── */
.tpager{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:8px 2px 0;
}
.tpleft{display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap}
.tplabel{
  display:inline-flex;align-items:center;gap:6px;
  font-size:var(--fs-sm);color:var(--ink-2);white-space:nowrap;
}
.tplabel input[data-pginput]{
  width:52px;padding:4px 6px;text-align:center;font-size:var(--fs-sm);
  font-variant-numeric:tabular-nums;
}
.tplabel select[data-pgsize]{width:auto;padding:4px 24px 4px 8px;font-size:var(--fs-sm)}
.tpdiv{width:1px;height:18px;background:var(--line)}
.tpinfo{font-size:var(--fs-xs);color:var(--ink-3);font-variant-numeric:tabular-nums}
.tpbtns{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap}
.tpbtns .btn[disabled]{opacity:.4;cursor:default}
.tpbtns .tpnum{min-width:32px;justify-content:center;font-variant-numeric:tabular-nums}
.tpgap{color:var(--ink-3);font-size:var(--fs-sm);padding:0 2px}

/* ── active/inactive filter chips, the TaskFlow pattern ──────────────────── */
.tabchips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.tabchip{
  display:inline-flex;align-items:center;gap:6px;padding:6px 12px;
  border:1px solid var(--line);border-radius:var(--r-full);background:var(--surface);
  font-size:var(--fs-sm);color:var(--ink-2);cursor:pointer;
  transition:border-color var(--fast) var(--ease), color var(--fast) var(--ease),
             background var(--fast) var(--ease);
}
.tabchip:hover{border-color:color-mix(in srgb,var(--accent) 40%,var(--line))}
.tabchip.on{
  background:var(--accent-wash);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));
  color:var(--accent-ink);font-weight:600;
}
.tabchip .tcn{
  font-size:var(--fs-2xs);font-weight:600;padding:2px 6px;border-radius:var(--r-full);
  background:var(--sunk);color:var(--ink-3);font-variant-numeric:tabular-nums;
}
.tabchip.on .tcn{background:var(--surface);color:var(--accent-ink)}

/* ── required-field marker ──────────────────────────────────────────────── */
/* The red * beside a mandatory label — the same red the import template's
   mandatory columns wear, so the form and the sheet speak one convention. */
.req{color:var(--critical);font-weight:600}

/* ── the structure editor's dynamic rows + statutory x-ray ───────────────── */
.xoff{
  border:0;background:none;color:var(--ink-3);cursor:pointer;font-size:var(--fs-base);
  line-height:1;padding:0 2px;border-radius:var(--r-sm);margin-left:auto;
}
.xoff:hover{color:var(--critical);background:var(--critical-wash)}
.statuglance{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;min-height:26px}
.stchip{
  display:inline-flex;align-items:baseline;gap:6px;padding:4px 8px;
  border:1px solid var(--line);border-radius:var(--r-full);background:var(--plane);
  font-size:var(--fs-xs);color:var(--ink-3);font-variant-numeric:tabular-nums;
}
.stchip b{font-size:var(--fs-2xs);letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-2)}
.stchip i{font-style:normal;color:var(--ink-3);font-size:var(--fs-xs);
  max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stchip.on{
  background:var(--accent-wash);color:var(--accent-ink);
  border-color:color-mix(in srgb,var(--accent) 35%,var(--line));
}
.stchip.on b{color:var(--accent-ink)}
.stchip.warn{
  background:var(--warn-wash);color:var(--warn);
  border-color:color-mix(in srgb,var(--warn) 40%,var(--line));
}
.stchip.warn b{color:var(--warn)}
/* Informational by default — his find: the PF/ESI/PT x-ray chips read as
   buttons. A span chip never invites a click; only the LINK form does. */
.stchip{cursor:default}
a.stchip{text-decoration:none;cursor:pointer}
a.stchip:hover{filter:brightness(.97)}
/* `.stchip.note-ish`, `.statuglance .stlabel` and the chip's own × button
   `.stchip .stx` stood here until docs/75. The chips are drawn; the dashed
   variant, the row label and the undo button never were. */

/* ── Payroll → Salary: the structure grid (docs/48 Part B) ─────────────────
   Five groups down the page, one table each, and the footer outside the
   scrolling body, so the unallocated amount stays in view whatever row is
   being typed into. A statutory row wears the accent wash: it is the engine's,
   and it should never be mistaken for a line somebody typed. */
.sg{font-size:var(--fs-sm)}
.sghead{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:4px 16px;margin:0 0 8px}
.sghead .field{margin:0}
.sghead .sgwide{grid-column:1/-1}
.sgwho{font-size:var(--fs-md);margin:0 0 4px}
.sgradio{display:flex;gap:8px;align-items:flex-start;margin:4px 0;font-weight:normal;cursor:pointer}
.sgradio input{width:auto;margin-top:4px}
.sgfixed{padding:6px 0;color:var(--ink-2)}
.sggroup{margin:12px 0 4px}
.sggrouphead{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0 0 6px}
.sggrouphead h3{margin:0;font-size:var(--fs-xs);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.sggroup.deduction .sggrouphead h3{color:var(--ink-2)}
.sggrouphead .dim{font-size:var(--fs-xs)}
.sggrouphead .btn{margin-left:auto}
.sgscroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-sm)}
.sgtable{width:100%;border-collapse:collapse;min-width:1040px;margin:0}
.sgtable th{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3);
  text-align:left;padding:6px 8px;background:var(--sunk);white-space:nowrap}
.sgtable th.num,.sgtable td.num{text-align:right}
.sgtable td{padding:6px 8px;border-top:1px solid var(--line-2);vertical-align:top}
.sgtable input,.sgtable select{font-size:var(--fs-sm);padding:4px 6px;width:100%;min-width:0}
.sgtable input[type=checkbox]{width:auto}
.sgtable input.sgnum{max-width:96px;min-width:66px;text-align:right}
/* Wide enough to read what is chosen: "Percentage of…", "Nearest rupee", a wage class. */
.sgtable select[data-f="calculationType"]{min-width:132px}
.sgtable select[data-f="rounding"]{min-width:126px}
.sgtable select[data-f="percentOf"]{min-width:132px}
.sgtable select[data-c="codeWagesClass"]{min-width:156px}
.sgtable td.sgformula{min-width:230px}
/* The live figure is the column somebody came for: it stays in view at the right
   while the rest of a wide row scrolls. */
.sgtable th:last-child,.sgtable td:last-child:not([colspan]){position:sticky;right:0;z-index:1;
  box-shadow:var(--shadow-stuck)}
.sgtable td:last-child:not([colspan]){background:var(--surface)}
.sgtable th.sgwrap{white-space:normal;min-width:78px}
.sgtable td.sgcheck{text-align:center}
.sgtable tr.engine td{background:color-mix(in srgb,var(--sunk) 45%,var(--surface))}
.sgtable tr.engine.off b{color:var(--ink-3)}
.sgtable tr.sgempty td{color:var(--ink-3);font-size:var(--fs-sm);text-align:center;padding:12px}
.sgchip{display:inline-flex;align-items:center;padding:2px 8px;border-radius:var(--r-full);
  background:var(--accent-wash);color:var(--accent-ink);font-weight:600;font-size:var(--fs-xs);white-space:nowrap}
.sgchip.minus{background:var(--sunk);color:var(--ink-2)}
.sgchip.engine{background:var(--sunk);color:var(--ink-2)}
.sgcode{font-size:var(--fs-2xs);margin-top:2px}
.sgtable .xoff{margin-left:4px;vertical-align:1px}
.sgmini{display:flex;gap:6px;align-items:center;margin-top:4px;font-size:var(--fs-xs);color:var(--ink-3);font-weight:normal}
.sgmini select,.sgmini input{width:auto;padding:2px 6px;font-size:var(--fs-xs)}
.sgpct{display:flex;gap:6px;align-items:center}
.sgpct input{max-width:70px;text-align:right}
.sgengine{color:var(--ink-3);font-style:italic;white-space:nowrap}
.sgbase{font-size:var(--fs-xs);color:var(--ink-3);line-height:1.45}
.sgwhynot{color:var(--warn)}
.sgwhy{border:0;background:none;color:var(--accent-ink);cursor:pointer;padding:0;font:inherit;font-size:var(--fs-xs);
  text-decoration:underline;text-underline-offset:2px;margin-top:2px}
.sgelect{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px;font-size:var(--fs-xs);font-weight:normal}
.sgelect select,.sgelect input{width:auto}
.sgexception{margin-top:6px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sgper{font-size:var(--fs-2xs);color:var(--ink-3);font-weight:normal}
.sgdiffer{font-size:var(--fs-2xs);color:var(--critical);font-weight:600}
.sgfoot .sgdiffer{flex-basis:100%}
.sgcontested{margin-top:6px;padding:6px 8px;border-radius:var(--r-sm);background:var(--warn-wash);
  border:1px solid color-mix(in srgb,var(--warn) 30%,var(--line));font-size:var(--fs-xs);line-height:1.5;color:var(--ink-2)}
.sgcodes{margin:12px 0 4px;display:flex;flex-wrap:wrap;gap:4px;align-items:center;font-size:var(--fs-xs)}
.sgcodes .rolechip{cursor:pointer;border:0;font-family:var(--mono);text-transform:none;letter-spacing:0}
.sgproblemlist{margin:6px 0 0;padding-left:16px}
.sgproblemlist li{margin:2px 0}
.sgwarnings{margin:6px 0 0}
.sghistory{margin-top:8px}
.sgsteps{margin:4px 0 8px;padding-left:20px;font-size:var(--fs-sm);line-height:1.55}
.sgerror{padding:0 20px;max-height:24vh;overflow:auto}
.sgerror .note{margin:8px 0 0}
.sgfoot{display:flex;flex-wrap:wrap;gap:6px 24px;align-items:flex-end;padding:8px 20px 4px;
  border-top:1.5px solid var(--line);background:var(--surface)}
.sgfig .k{font-size:var(--fs-2xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.sgfig .v{font-size:var(--fs-lg);font-weight:600;letter-spacing:0;font-variant-numeric:tabular-nums}
.sgunalloc.bad .v{color:var(--critical)}
.sgunalloc.warn .v{color:var(--warn)}
.sgunalloc.good .v{color:var(--good)}
.sgsentence{flex-basis:100%;font-size:var(--fs-xs);color:var(--ink-2);line-height:1.5}
.sgstatus{color:var(--ink-3);margin-left:6px}
/* The bulk apply's preview: who moves, and by how much. */
.sapreview td.over{color:var(--warn);font-weight:600}

/* ── the payslip canvas designer ────────────────────────────────────────────
   Left: a palette of fields not on the page (app chrome — follows the theme).
   Right: the page itself (PAPER — white in every theme, because that is what
   the printer produces, and the company's accent colour was chosen against
   white). Everything inside .pdz-page therefore wears --paper-* tokens. */
.pdz{display:grid;grid-template-columns:212px minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:760px){ .pdz{grid-template-columns:1fr} }

.pdz-sidehead{
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-3);margin:0 0 8px;
}
.pdz-palette{
  display:flex;flex-direction:column;gap:6px;min-height:64px;
  padding:8px;border:1.5px dashed var(--line);border-radius:var(--r-sm);
  background:var(--plane);
}

/* A field chip. In the palette it is an app-side card; dropped into the
   employee-details band it becomes a row of the printed grid. */
.pdz-field{cursor:grab;user-select:none;-webkit-user-select:none}
.pdz-field:active{cursor:grabbing}
.pdz-field.ghosting{opacity:.3}
.pdz-field .l{font-size:var(--fs-xs)}
.pdz-field .v{font-size:var(--fs-xs);font-weight:600;white-space:nowrap}
.pdz-palette .pdz-field{
  display:flex;justify-content:space-between;gap:8px;align-items:baseline;
  padding:6px 8px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);box-shadow:var(--shadow-sm);
}
.pdz-palette .pdz-field .l{color:var(--ink-2)}
.pdz-palette .pdz-field .v{color:var(--ink-3);font-weight:500;overflow:hidden;
  text-overflow:ellipsis}
.pdz-palette .pdz-field:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}

/* The page. Fixed paper — never theme-flipped. */
.pdz-page{
  background:var(--paper);color:var(--paper-ink);
  border:1px solid var(--line);border-radius:var(--r-sm);
  box-shadow:var(--shadow);padding:16px 16px 12px;min-width:0;
}
.pdz-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;
  border-bottom:2px solid;padding-bottom:8px;margin-bottom:6px;font-size:var(--fs-sm);
}
.pdz-sub{color:var(--paper-ink-2);font-size:var(--fs-2xs);margin-top:2px}
.pdz-who{text-align:right;font-size:var(--fs-2xs);color:var(--paper-ink);line-height:1.5}
.pdz-fixed{
  margin-top:8px;padding-top:6px;border-top:1.5px dashed var(--paper-line);
  text-align:center;font-size:var(--fs-2xs);letter-spacing:.05em;color:var(--paper-ink-3);
}

/* A band — one draggable block of the page. */
.pdz-band{
  border:1.5px dashed transparent;border-radius:var(--r-sm);
  padding:2px 6px 6px;margin:2px 0;cursor:grab;
}
.pdz-band:active{cursor:grabbing}
.pdz-band:hover{border-color:var(--paper-line);background:var(--paper-sunk)}
.pdz-band.ghosting{opacity:.35;border-color:var(--accent)}
.pdz-band.off .pdz-bandbody{opacity:.3;filter:grayscale(1)}
.pdz-bandbar{
  display:flex;align-items:center;gap:6px;margin-bottom:2px;
  font-size:var(--fs-2xs);letter-spacing:.06em;text-transform:uppercase;
  color:var(--paper-ink-3);
}
.pdz-grab{font-size:var(--fs-xs);letter-spacing:0;color:var(--paper-ink-3)}
.pdz-bandname{font-weight:600}
.pdz-eye,.pdz-always{
  margin-left:auto;font-size:var(--fs-2xs);letter-spacing:.05em;text-transform:uppercase;
}
.pdz-always{color:var(--paper-ink-3)}
.pdz-eye{
  border:1px solid var(--paper-line);border-radius:var(--r-full);background:var(--paper);
  color:var(--paper-ink-2);padding:2px 8px;cursor:pointer;font-weight:600;
}
.pdz-eye:hover{border-color:var(--paper-ink-3)}
.pdz-band.off .pdz-eye{
  background:var(--paper-sunk);color:var(--paper-ink-3);border-style:dashed;
}

/* Band bodies — miniatures of what the print really renders. */
.pdz-idgrid{
  display:grid;grid-template-columns:1fr 1fr;gap:2px 16px;min-height:26px;
  font-size:var(--fs-xs);
}
.pdz-idgrid .pdz-field{
  display:flex;justify-content:space-between;gap:8px;align-items:baseline;
  border-bottom:1px dotted var(--paper-line);padding:2px 0;min-width:0;
}
.pdz-idgrid .pdz-field .l{color:var(--paper-ink-2)}
.pdz-idgrid .pdz-field .v{color:var(--paper-ink);overflow:hidden;text-overflow:ellipsis}
.pdz-idgrid .pdz-field:hover{background:var(--paper-sunk)}
@media (max-width:760px){ .pdz-idgrid{grid-template-columns:1fr} }
.pdz-idhint{
  border:1.5px dashed var(--paper-line);border-radius:var(--r-sm);
  padding:8px;text-align:center;font-size:var(--fs-2xs);color:var(--paper-ink-3);
}
.pdz-lv{
  display:flex;gap:12px;flex-wrap:wrap;font-size:var(--fs-2xs);align-items:baseline;
  padding:6px 8px;background:var(--paper-sunk);border-radius:var(--r-sm);
  color:var(--paper-ink-2);
}
.pdz-lv b{color:var(--paper-ink);font-size:var(--fs-2xs);letter-spacing:.05em;
  text-transform:uppercase}
.pdz-pay{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}
@media (max-width:760px){ .pdz-pay{grid-template-columns:1fr} }
.pdz-pay i,.pdz-emp i{
  display:block;font-style:normal;font-size:var(--fs-2xs);letter-spacing:.06em;
  text-transform:uppercase;color:var(--paper-ink-3);
  border-bottom:1px solid var(--paper-ink-3);padding-bottom:2px;margin-bottom:2px;
}
.pdz-pay em,.pdz-emp em{
  display:flex;justify-content:space-between;gap:8px;font-style:normal;
  font-size:var(--fs-xs);color:var(--paper-ink-2);
  border-bottom:1px dotted var(--paper-line);padding:2px 0;
}
.pdz-pay em b,.pdz-emp em b{
  color:var(--paper-ink);font-weight:500;font-variant-numeric:tabular-nums;
}
.pdz-pay em.t{border-top:1.5px solid var(--paper-ink);border-bottom:0;
  font-weight:600;color:var(--paper-ink)}
.pdz-pay em.t b{font-weight:600}
.pdz-net{
  margin-top:8px;padding:6px 8px;border:1.5px solid;
  display:flex;justify-content:space-between;font-weight:600;font-size:var(--fs-sm);
  color:var(--paper-ink);
}
.pdz-emp{font-size:var(--fs-xs)}
.pdz-ytd{font-size:var(--fs-2xs);color:var(--paper-ink-2);margin:0}
.pdz-ytd b{color:var(--paper-ink)}

/* `.pager` stood here until docs/75. The pager a long table actually builds
   is `.tpager`, above; this was the name before it, and both were kept. */

/* ── roles: the permission matrix ─────────────────────────────────────────────
   One row per page under its area, the four common actions as columns and the
   page's own actions as labelled boxes beside them, so a hundred-odd
   checkboxes read as a table of decisions rather than a wall. A row that
   differs from the role's template carries a mark in its margin, because "what
   did we change from the standard?" is the first thing an auditor asks. */
.mxwrap{overflow-x:auto;margin-top:12px}
table.matrix{font-size:var(--fs-sm)}
table.matrix tbody td{padding:6px 8px;vertical-align:middle}
table.matrix th.mxc,table.matrix td.mxc{text-align:center;width:66px}
tr.mxarea td,tbody tr.mxarea:hover td{
  background:var(--sunk);color:var(--ink-2);padding:6px 8px;
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;
}
table.matrix td.mxpage{min-width:230px;box-shadow:inset 3px 0 0 transparent}
table.matrix tr.differs td.mxpage{box-shadow:inset 3px 0 0 var(--warn)}
table.matrix td.mxpage .sum{display:block;font-size:var(--fs-xs);color:var(--ink-3);
  margin-top:2px;line-height:1.4}
table.matrix tr.unopened td.mxpage b{font-weight:500;color:var(--ink-2)}
.mxtag{display:block;margin-top:2px;font-size:var(--fs-2xs);color:var(--warn)}
table.matrix input[type=checkbox]{width:16px;height:16px;margin:0;vertical-align:middle;
  accent-color:var(--accent);cursor:pointer}
table.matrix input[type=checkbox]:disabled{cursor:not-allowed}
.mxalso{display:flex;flex-wrap:wrap;gap:4px 12px}
.mxopt{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:var(--fs-sm);
  color:var(--ink-2);white-space:nowrap;cursor:pointer}
.mxlock{display:block;font-size:var(--fs-2xs);line-height:1.2;color:var(--ink-3)}
table.matrix select{width:auto;min-width:200px;padding:4px 8px;font-size:var(--fs-sm)}
table.matrix tr.unopened select{opacity:.55}
.mxtools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.mxtools .grow{flex:1}
.mxtools select{width:auto}
.mxbar{
  position:sticky;bottom:12px;z-index:5;margin-top:12px;padding:12px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);
  box-shadow:var(--shadow-lg);
}
.mxbar .mxbtns{display:flex;gap:8px}
.mxdiff{margin:0 0 12px;padding-left:16px;font-size:var(--fs-sm);line-height:1.5;
  max-height:280px;overflow:auto}
.mxdiff li{margin-bottom:2px}
.mxdiff .add{color:var(--good)}
.mxdiff .rem{color:var(--critical)}
.mxdiff .res{color:var(--info)}

/* ── effective access: every permission and where it came from ───────────── */
.accesshead{display:flex;flex-direction:column;gap:6px;margin:0 0 12px}
.srcs{list-style:none;margin:0;padding:0;font-size:var(--fs-sm);color:var(--ink-2);line-height:1.45}
.srcs li + li{margin-top:2px}
.srcs li.bad{color:var(--critical)}

/* ── roles as checkboxes, on a seat ──────────────────────────────────────── */
.rolepick .checkline{margin-top:8px}
.rolepick .checkline .help{display:block;margin:2px 0 0;font-size:var(--fs-xs);color:var(--ink-3)}

/* ── a refusal: a fact about the person, not about the data ──────────────────
   Neither the error block nor the empty one. Bordered like an error because it
   carries a sentence somebody has to act on; amber rather than red because
   nothing is broken — somebody has to be asked. */
.state.refused{
  border:1px solid color-mix(in srgb,var(--warn) 34%,var(--line));
  background:var(--warn-wash);text-align:left;padding:16px 20px;
}
.state.refused .h{color:var(--warn)}
.state.refused .b{margin:0;max-width:none}

/* ── the org chart (docs/48 Part D) ────────────────────────────────────────
   Drawn in SVG by people/orgchart.js from these classes, and exported as a PNG
   with each element's computed colours written onto it — so the picture and the
   screen are one drawing, in whichever theme it was saved from. */
.ocbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.ocbar .field{margin:0}
.ocbar input[type=date]{width:auto}
.oclegend{display:flex;gap:16px;flex-wrap:wrap;align-items:center;font-size:var(--fs-sm);
  color:var(--ink-2);margin:0 0 8px}
.oclegend svg{vertical-align:middle;margin-right:6px}
.ocwrap{overflow:auto;max-height:74vh;border:1.5px solid var(--line);border-radius:var(--r);
  background:var(--surface)}
.ocwrap svg{display:block}
.oc-node rect{fill:var(--raised);stroke:var(--line);stroke-width:1.5}
.oc-node.me rect{stroke:var(--accent);stroke-width:2}
.oc-node.outside rect,.oc-node.cut rect{stroke-dasharray:4 3}
.oc-node.opens{cursor:pointer}
.oc-node.opens:hover rect{stroke:var(--accent)}
.oc-name{font:600 var(--fs-sm) var(--sans);fill:var(--ink)}
.oc-role{font:400 var(--fs-xs) var(--sans);fill:var(--ink-2)}
.oc-unit{font:400 var(--fs-2xs) var(--sans);fill:var(--ink-3)}
.oc-edge{fill:none;stroke:var(--ink-4);stroke-width:1.5}
.oc-dotted{fill:none;stroke:var(--violet);stroke-width:1.6;stroke-dasharray:6 4}
.oc-toggle{cursor:pointer}
.oc-toggle circle{fill:var(--surface);stroke:var(--ink-4);stroke-width:1.2}
.oc-toggle text{font:600 var(--fs-2xs) var(--sans);fill:var(--ink-2)}

/* ── the organisation's masters: a tree in a table ─────────────────────── */
.orgtree td.unitcell{padding-left:calc(12px + var(--depth, 0) * 22px)}
.orgtree tr.closed td{opacity:.62}
.radiolist .checkline input[type=radio]{width:auto;margin-top:2px}

/* ── docs/65: the second step, single sign-on, keys, the audit log ──────── */
.mono{font-family:var(--mono);font-size:var(--fs-xs);letter-spacing:0}
.bad-text{color:var(--critical)}
.checks{display:grid;gap:6px;margin:4px 0}
.checks .switch{align-items:flex-start}
.checks .switch input{margin-top:2px}
.filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:0 0 16px}
.filters .field{margin:0;min-width:120px}
.filters .field:last-child{display:flex;gap:8px}
ul.plain{list-style:none;margin:0;padding:0}
ul.changes{list-style:none;margin:0;padding:0;font-size:var(--fs-sm)}
ul.changes li{padding:2px 0}
table.audit td{vertical-align:top}
.filter.row{gap:8px}
.filter.row .field{margin:0}
.qrwrap{width:min(240px, 100%);margin:0 auto 12px;background:var(--paper);border-radius:var(--r);
  padding:8px;border:1.5px solid var(--line)}
.qrwrap .qr{display:block;width:100%;height:auto}
.ss-key{font-family:var(--mono);font-size:var(--fs-md);letter-spacing:.06em;text-align:center;
  padding:8px;background:var(--sunk);border-radius:var(--r-sm);user-select:all;margin:0 0 16px}
.recovery{columns:2;column-gap:16px;font-family:var(--mono);font-size:var(--fs-md);
  letter-spacing:.04em;padding:8px 8px 8px 32px;margin:12px 0 4px;background:var(--sunk);
  border-radius:var(--r-sm)}
.recovery li{padding:2px 0;break-inside:avoid;user-select:all}
