/* ============================================================
 * CIDER PLATFORM — DS v2 COMPONENT LIBRARY  (cider-ui.css)
 * Build Wave Zero · WAVE_ZERO_BRIEF_v1 (approved) · DS v2 Rulebook §04
 * Authority: design_handoff_ds_v2/ → extends the cider-ui.css contract
 * (docs/design_handoff_cider_shell_sponsorship/). One file, one source.
 *
 * SCOPE RULE — the .cui wrapper is the adoption switch.
 * Every component selector is scoped under .cui so that NO live page
 * changes until its own module wave opts in by adding class="cui" at
 * the page root and retiring its local variant in the same commit
 * (P6: ship = retire). Several DS v2 class names (.page-head, .tabs,
 * .chip, .btn-ghost, .drawer) already exist unscoped in the live fop
 * bundle — the scope keeps them untouched.
 *
 * TOKEN RULE — this file CONSUMES the live token source
 * (css/fop/colors_and_type.css: --af-*, --fg-*, --border-*, --radius-*,
 * --shadow-*, --font-*; live values already match DS v2 — verified in
 * WAVE_ZERO_BRIEF_v1 §2.3). It ADDS only the names below; it never
 * redefines an existing token.
 *
 * Radius family 3/6/10 (RATIFIED, Rulebook §03). Never pills.
 * Sky = success/info; NO green in light CIDER; #CC1B1B is dead.
 * ============================================================ */

:root {
  /* DS v2 additions (Rulebook §04 specimens) — new names only */
  --af-navy-active: #16223C;          /* G1 RULED (WAVE_PLAN_v2): nav active-item fill behind the 3px red bar */
  --af-ink-navy: #0f2437;             /* ink on solid sky chips — the ONLY dark-navy accent (canon v2 H-1) */
  --af-teal-op:  #1b6a8f;             /* extended operational tone */
  --af-gold-dark:#b8860b;             /* extended operational tone */
  --scrim:       rgba(15, 20, 32, .55); /* modal scrim — no backdrop blur, ever */

  /* DEPRECATED — DO NOT CONSUME. #243554 is retired (DESIGN_CANON_v2 H-1).
   * Kept only so legacy references fail loud in review, not silent in
   * render. Its replacement is decided in Wave 1 (shell chrome) — G1. */
  --af-navy-2:   #243554;
}

/* Watchtower cmd-mode token block — Door 6 ONLY, applied on a root class,
 * never :root. The sanctioned green exists nowhere else. Full local-var →
 * cmd-mode mapping happens in the Stage 5.9 fidelity rebuild. */
.cmd-mode {
  --af-green-cmd: #3fb56b;
}

/* ── BASE ─────────────────────────────────────────────────── */
.cui { font-family: var(--font-body); font-size: 13px; color: var(--fg-1); }

/* ── TYPE ROLES — three faces, three jobs (contract, unchanged) ──
 * Oswald  = labels/nav/eyebrows/titles/badges/stat-labels. UPPERCASE + tracking. NEVER < 10px.
 * Proxima = body, descriptions, form fields, table cells. >= 13px.
 * Horizon = big numbers ONLY (>= 16px). Never words.                    */
.cui .t-eyebrow   { font-family: var(--font-display-ui); font-weight: 600; font-size: 11px; letter-spacing: .2em;  text-transform: uppercase; color: var(--af-red); }
.cui .t-title     { font-family: var(--font-display-ui); font-weight: 700; font-size: 38px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-1); line-height: 1; }
.cui .t-cardlabel { font-family: var(--font-display-ui); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.cui .t-stat      { font-family: var(--font-horizon); line-height: 1; }   /* size set per use: 16px floor, 32–44px typical */
.cui .t-body      { font-family: var(--font-body); font-size: 13px; color: var(--fg-2); }
.cui .t-mono      { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }

/* ── C1 · PAGE HEADER — identical on every operator page ──── */
.cui .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; margin-bottom: 20px; border-bottom: 2px solid var(--af-red); flex-wrap: wrap; }
/* stack inside: .t-eyebrow → .t-title → optional .t-body subtitle */

/* ── CARD — white on cream, hairline, navy-tint shadow (contract) ── */
.cui .card { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.cui .card-head { padding: 12px 20px; border-bottom: 1px solid var(--border-1); background: var(--af-cream); }
.cui .card-accent { border-top: 3px solid var(--af-red); }

/* ── C2 · BUTTONS — one namespace: .btn-* ───────────────────
 * Hover: red→red-dark, panel buttons white→cream · 120ms.
 * Press translateY(1px) is QUICK-ACTIONS ONLY (.btn-quick).
 * Focus: red edge + rgba(229,30,37,.18) ring.
 * Disabled: .45 opacity, not-allowed (attribute or .is-disabled). */
.cui .btn-primary, .cui .btn-secondary, .cui .btn-ghost, .cui .btn-navy {
  font-family: var(--font-body); font-weight: 600; font-size: 13px; cursor: pointer;
  border-radius: var(--radius-sm); transition: background .12s ease, color .12s ease, border-color .12s ease; }
.cui .btn-primary   { background: var(--af-red); color: #fff; border: none; padding: 9px 18px; }
.cui .btn-primary:hover   { background: var(--af-red-dark); }
.cui .btn-secondary { background: #fff; color: var(--fg-1); border: 1px solid var(--border-1); padding: 9px 16px; }
.cui .btn-secondary:hover { background: var(--af-cream); }
.cui .btn-ghost     { background: none; color: var(--af-royal); border: none; padding: 9px 10px; border-radius: var(--radius-sm); }
.cui .btn-ghost:hover     { background: rgba(0, 71, 187, .06); }
.cui .btn-navy      { background: var(--af-navy); color: #fff; border: none; padding: 9px 16px; font-weight: 700; }
.cui .btn-navy:hover      { background: var(--af-ink-navy); }
.cui .btn-quick:active { transform: translateY(1px); }
.cui .btn-primary:focus-visible, .cui .btn-secondary:focus-visible,
.cui .btn-ghost:focus-visible, .cui .btn-navy:focus-visible {
  outline: 2px solid var(--af-red); outline-offset: 1px; box-shadow: 0 0 0 2px rgba(229, 30, 37, .18); }
.cui .btn-primary:disabled, .cui .btn-secondary:disabled, .cui .btn-ghost:disabled, .cui .btn-navy:disabled,
.cui .btn-primary.is-disabled, .cui .btn-secondary.is-disabled, .cui .btn-ghost.is-disabled, .cui .btn-navy.is-disabled {
  opacity: .45; cursor: not-allowed; }

/* ── C3 · THE CHIP FAMILY — 4 tones × 2 weights, rectangles only ──
 * Values are the Rulebook canvas's DRAWN chips (not the 2024 contract
 * comment, which is stale against the canvas). Neutral has ONE drawn
 * weight (parchment). All four solid tones ship (G7 reversed on the
 * corrected premise, WAVE_ZERO_GATE2_PASS_v1 — the inks are drawn).
 * Never pills. Never raw internal statuses (use _shared/tone.js). */
.cui .chip { font-family: var(--font-display-ui); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-sm); display: inline-block; }
.cui .chip-sm { font-size: 9px; padding: 2px 8px; }   /* drawn dense variant: table status / kiosk health */
.cui .chip-sky       { background: var(--af-sky); color: var(--af-ink-navy); }
.cui .chip-gold      { background: var(--af-gold); color: var(--af-black); }
.cui .chip-red       { background: var(--af-red); color: #fff; }
.cui .chip-neutral   { background: var(--af-parchment); color: var(--fg-2); }
.cui .chip-soft-sky  { background: rgba(65, 182, 230, .14); color: var(--af-teal-op); border: 1px solid rgba(65, 182, 230, .4); }
.cui .chip-soft-gold { background: rgba(255, 199, 44, .15); color: #8a6a00; border: 1px solid rgba(255, 199, 44, .5); }
.cui .chip-soft-red  { background: rgba(229, 30, 37, .08);  color: var(--af-red-dark); border: 1px solid rgba(229, 30, 37, .35); }

/* ── C4 · THE TAB COMPONENT — retires all 15 conventions ────
 * Rules: badge count derives from the SAME query as the content;
 * <= 6 tabs on a Record — more means grouped secondary nav. */
.cui .tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-1); }
.cui .tab  { font-family: var(--font-display-ui); font-weight: 600; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 9px 14px; color: var(--fg-3); cursor: pointer; background: none; border: none; }
.cui .tab:hover  { color: var(--fg-1); }
.cui .tab.active { color: var(--fg-1); border-bottom: 2px solid var(--af-red); margin-bottom: -1px; }
.cui .tab-badge  { font-family: var(--font-display-ui); font-size: 9px; padding: 1px 6px;
  border-radius: var(--radius-sm); background: var(--af-red); color: #fff; margin-left: 4px; vertical-align: 1px; }

/* ── C5 · STAT RIBBON — hairline cells, NEVER gapped cards ──
 * Numbers only (Horizon >= 16px). Missing data renders "pending",
 * never a fake $0 (.ribbon-pending). */
.cui .ribbon { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md); display: grid; overflow: hidden; }
.cui .ribbon > div { padding: 18px 22px; border-right: 1px solid var(--af-parchment); }
.cui .ribbon > div:last-child { border-right: none; }
.cui .ribbon-num   { font-family: var(--font-horizon); font-size: 36px; line-height: 1; color: var(--fg-1); }
.cui .ribbon-label { font-family: var(--font-display-ui); font-size: 10px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--fg-2); margin-top: 4px; }
.cui .ribbon-pending { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); line-height: 36px; }

/* ── C6 · TABLE — navy header, hairline rows, NO zebra ──────
 * Every entity name is a link to its record (P4). Row click = open;
 * checkbox column only when a bulk bar exists. */
.cui .tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cui .tbl thead tr { background: var(--af-navy); }
.cui .tbl th { text-align: left; padding: 12px 18px; font-family: var(--font-display-ui); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .6); }
.cui .tbl td { padding: 13px 18px; border-bottom: 1px solid var(--border-1); font-family: var(--font-body); }
.cui .tbl td a { color: var(--link); text-decoration: none; }
.cui .tbl td a:hover { text-decoration: underline; }

/* ── C7 · INPUTS & FILTER BAR ───────────────────────────────
 * Labels: Oswald 10–11px tracked, never below 10px.
 * Body/inputs: Proxima >= 13px. Focus: red edge + ring. */
.cui .field-label { font-family: var(--font-display-ui); font-weight: 600; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-2); display: block; margin-bottom: 5px; }
.cui .input { font-family: var(--font-body); font-size: 13px; color: var(--fg-1); background: #fff;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 11px; outline: none; }
.cui .input:focus { border-color: var(--af-red);
  box-shadow: inset 0 0 0 1px var(--af-red), 0 0 0 2px rgba(229, 30, 37, .18); }
.cui .filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.cui .filter-chip { font-family: var(--font-display-ui); font-size: 10px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 11px; border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; color: var(--fg-2); border: 1px solid var(--border-1); }
.cui .filter-chip.active { background: var(--af-navy); color: #fff; border-color: var(--af-navy); }

/* ── C8 · THE PIN PAD — one component, three doors (3/4/6) ──
 * >= 44px keys · dots feedback · lockout after 5 misses (the lockout
 * BEHAVIOR belongs to the ONE PIN service — its own later wave; this
 * ships the rendered states only). Skins: portal light / field XL
 * (.pinpad-xl) / Watchtower .cmd-mode (mapped in Stage 5.9). */
.cui .pinpad { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; }
.cui .pinpad-xl { grid-template-columns: repeat(3, 64px); gap: 8px; }
.cui .pin-key { height: 44px; background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display-ui); font-weight: 600; font-size: 16px; color: var(--fg-1); cursor: pointer; }
.cui .pinpad-xl .pin-key { height: 64px; font-size: 20px; }
.cui .pin-key:active { background: var(--af-cream); }
.cui .pin-dots { display: flex; gap: 8px; align-items: center; }
.cui .pin-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border-2); background: #fff; } /* dot, not a pill: feedback marker per Rulebook */
.cui .pin-dot.filled { background: var(--af-navy); border-color: var(--af-navy); }
.cui .pinpad.is-locked .pin-key { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ── C9 · MODAL · TOAST · EMPTY/PENDING SHELLS ──────────────
 * One modal shell + one drawer shell (retires 5). No backdrop blur. */
.cui .modal-scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; z-index: 300; }
.cui .modal { background: #fff; border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-lg); }
.cui .modal-title { font-family: var(--font-display-ui); font-weight: 700; font-size: 13px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fg-1); margin-bottom: 4px; }
.cui .modal-body { font-family: var(--font-body); font-size: 12px; color: var(--fg-2); margin-bottom: 12px; }
.cui .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cui .drawer { position: fixed; top: 0; right: 0; bottom: 0; background: #fff; border-left: 1px solid var(--border-1);
  box-shadow: var(--shadow-lg); z-index: 300; overflow-y: auto; }
.cui .toast { display: inline-flex; align-items: center; gap: 8px; background: var(--af-navy); color: #fff;
  border-radius: var(--radius-sm); padding: 8px 14px; font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.cui .toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--af-sky); flex: none; } /* status dot, not a pill */
.cui .shell-pending { display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 199, 44, .15); border: 1px solid rgba(255, 199, 44, .5); color: #8a6a00;
  border-radius: var(--radius-sm); padding: 8px 14px; font-family: var(--font-body); font-size: 12px; }
.cui .shell-empty { display: inline-flex; align-items: center; gap: 8px; background: var(--af-cream);
  border: 1px solid var(--border-1); color: var(--fg-3); border-radius: var(--radius-sm);
  padding: 8px 14px; font-family: var(--font-body); font-size: 12px; } /* DERIVED: pending shell family, solid hairline = empty */

/* ── C10 · KIOSK CHROME — door 4 ────────────────────────────
 * Navy strip: station name · health chip · clock/build stamp.
 * One task per screen · >= 44px targets · offline queue badge ·
 * NO nav rail. (Auto-lock / self-reload / paper-failover = door-4
 * behaviors in later waves.) */
.cui .kiosk-strip { background: var(--af-navy); border-radius: var(--radius-md); padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; }
.cui .kiosk-name { font-family: var(--font-display-ui); font-weight: 600; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; }
.cui .kiosk-health { font-family: var(--font-display-ui); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--af-sky); color: var(--af-ink-navy); border-radius: var(--radius-sm); padding: 2px 8px; }
.cui .kiosk-health.is-offline { background: rgba(255, 199, 44, .18); color: var(--af-gold-dark); } /* DERIVED: offline queue badge — gold attention tone */
.cui .kiosk-stamp { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: rgba(255, 255, 255, .5); }

/* ── C12 · SHELL CHROME — Wave 1 (WAVE_ONE_SHELL_BRIEF_v1, G1 RULED) ──
 * The operator chrome's D-W0-1 adoption: boot.js puts .cui on the three
 * chrome containers (topbar / icon rail / secondary nav) ONLY — pages
 * stay outside. ONE treatment on BOTH nav levels (W1-O3 ratified):
 * navy panels · active = --af-navy-active fill behind a 3px red bar ·
 * white ink, 65% when inactive. theme.css keeps structure; its old
 * tone rules (#243554 panel, cream active, red-wash rail) were retired
 * in the same commit. Topbar was already contract-true (navy + 3px red). */
.cui.fop-rail { background: var(--af-navy); }
.cui.fop-rail .fop-rail-btn { color: rgba(255, 255, 255, .65); }
.cui.fop-rail .fop-rail-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.cui.fop-rail .fop-rail-btn.active {
  color: #fff; background: var(--af-navy-active); border-left: 3px solid var(--af-red); }
.cui.fop-rail .fop-rail-icon { color: inherit; }
.cui.fop-secondary { background: var(--af-navy); }
.cui.fop-secondary .fop-sec-item { color: rgba(255, 255, 255, .65); }
.cui.fop-secondary .fop-sec-item:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.cui.fop-secondary .fop-sec-item.active {
  color: #fff; background: var(--af-navy-active); border-left: 3px solid var(--af-red); font-weight: 600; }

/* ── C13 · PAGE-ADOPTION MAPPINGS — Wave 2A+ (WAVE_TWO brief §Method) ──
 * Pages that render through the shell primitives adopt DS v2 by adding
 * .cui at their page root: these rules re-skin the primitives' emitted
 * classes (.page-head/.af-tabs/.af-badge/.page-kpi/.fop-panel/.af-table/
 * .fop-btn) onto the library so unadopted pages are untouched and the
 * primitives' markup never forks. Tones: sky/gold/red/gray map onto THE
 * chip family; 'green'/'mint' legacy tones render SKY (no green in
 * light CIDER). */
.cui .page-head .eyebrow-row { font-family: var(--font-display-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--af-red); }
.cui .page-head .eyebrow-row .sep, .cui .page-head .eyebrow-row .crumb { color: var(--fg-2); letter-spacing: .08em; }
.cui .page-head h1 { font-family: var(--font-display-ui); font-weight: 700; font-size: 30px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-1); line-height: 1; margin: 4px 0 0; }
.cui .page-head .page-sub { font-family: var(--font-body); font-size: 13px; color: var(--fg-2); margin: 6px 0 0; }
.cui .af-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-1); flex-wrap: wrap; }
.cui .af-tab { font-family: var(--font-display-ui); font-weight: 600; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 9px 14px; color: var(--fg-3); cursor: pointer; background: none;
  border: none; border-bottom: 2px solid transparent; }
.cui .af-tab:hover { color: var(--fg-1); }
.cui .af-tab.active { color: var(--fg-1); border-bottom: 2px solid var(--af-red); margin-bottom: -1px; }
.cui .af-tab .af-badge { font-size: 9px; padding: 1px 6px; border-radius: var(--radius-sm);
  background: var(--af-red); color: #fff; margin-left: 4px; vertical-align: 1px; border: none; }
.cui .af-badge { font-family: var(--font-display-ui); font-size: 9.5px; letter-spacing: .08em; font-weight: 400;
  text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-sm); display: inline-block; }
.cui .af-badge.sky    { background: rgba(65, 182, 230, .14); color: var(--af-teal-op); border: 1px solid rgba(65, 182, 230, .4); }
.cui .af-badge.gold, .cui .af-badge.amber { background: rgba(255, 199, 44, .15); color: #8a6a00; border: 1px solid rgba(255, 199, 44, .5); }
.cui .af-badge.red    { background: rgba(229, 30, 37, .08); color: var(--af-red-dark); border: 1px solid rgba(229, 30, 37, .35); }
.cui .af-badge.gray, .cui .af-badge.royal { background: var(--af-parchment); color: var(--fg-2); border: 1px solid var(--border-1); }
.cui .af-badge.green, .cui .af-badge.mint { background: rgba(65, 182, 230, .14); color: var(--af-teal-op); border: 1px solid rgba(65, 182, 230, .4); }
/* KPI strip. Was `grid-auto-flow: column; grid-auto-columns: 1fr` (== minmax(auto,1fr)),
   which FORCES every tile onto one row: with many tiles or a long value (e.g. LOFT's 7
   tiles incl. "$42,233.87"), the auto-min blows the grid past the container and
   overflow:hidden clips tiles mid-value — reading as overlap ("$42,233.87$0.00").
   Fix: auto-fit + minmax(180px,1fr) WRAPS instead of blowing out; a 1px gap over the
   parchment container background draws dividers in BOTH directions (no border-right /
   last-child math), and min-width:0 + overflow-wrap keep a long value inside its tile. */
.cui .page-kpi { background: var(--af-parchment); border: 1px solid var(--border-1); border-radius: var(--radius-md);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; overflow: hidden; }
.cui .page-kpi > div { padding: 14px 18px; background: #fff; min-width: 0; }
/* Phones: 1-up (the auto-fit min lands here below ~380px) + smaller value type.
   Deliberately NOT forcing 2-up: a long money value ($42,233.87) wraps mid-number
   in a half-width phone tile; full width keeps it on one readable line. */
@media (max-width: 640px) {
  .cui .pkpi-val { font-size: 24px; }
}
.cui .pkpi-val { font-family: var(--font-horizon); font-size: 30px; line-height: 1; color: var(--fg-1);
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cui .pkpi-lbl { font-family: var(--font-display-ui); font-size: 10px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--fg-2); margin-top: 4px; }
.cui .pkpi-sub { font-family: var(--font-body); font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.cui .fop-panel { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.cui .fop-panel-head { padding: 12px 20px; border-bottom: 1px solid var(--border-1); background: var(--af-cream); }
.cui .fop-panel-title { font-family: var(--font-display-ui); font-weight: 700; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.cui .af-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cui .af-table thead tr { background: var(--af-navy); }
.cui .af-table th { text-align: left; padding: 12px 18px; font-family: var(--font-display-ui); font-size: 10px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .6);
  background: none; border: none; }
.cui .af-table td { padding: 13px 18px; border-bottom: 1px solid var(--border-1); font-family: var(--font-body); }
.cui .af-table td a { color: var(--link); text-decoration: none; }
.cui .af-table td a:hover { text-decoration: underline; }
.cui .fop-btn { font-family: var(--font-body); font-weight: 600; font-size: 13px; padding: 9px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-1); background: #fff; color: var(--fg-1);
  cursor: pointer; transition: background .12s ease; }
.cui .fop-btn:hover { background: var(--af-cream); }
.cui .fop-btn.primary { background: var(--af-red); color: #fff; border: none; }
.cui .fop-btn.primary:hover { background: var(--af-red-dark); }
.cui .fop-btn.ghost { background: none; border: none; color: var(--af-royal); }
.cui#fd-drawer { background: var(--scrim); }   /* family drawer scrim joins the ONE modal scrim (no blur) */

/* ── C14 · FINANCEOS .fos-* MAPPING — Wave 2B-ii ─────────────────────
 * The financeos module carries its own inline .fos-* stylesheet with a
 * slate/green palette (#15803d etc. — DS drift). Under .cui these
 * mappings pull the family onto the tokens: green success renders SKY
 * (no green in light CIDER), cards/rows/buttons take the library look.
 * The inline sheet retires for real in the 2B-iii decompose. */
.cui.fos-scope .fos-card { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); color: var(--fg-1); }
.cui.fos-scope .fos-card h3 { font-family: var(--font-display-ui); font-weight: 700; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.cui.fos-scope .fos-kpi { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md); color: var(--fg-1); }
.cui.fos-scope .fos-kpi-v { font-family: var(--font-horizon); color: var(--fg-1); }
.cui.fos-scope .fos-kpi-l { font-family: var(--font-display-ui); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.cui.fos-scope .fos-kpi.green { border-top: 3px solid var(--af-sky); }     /* success = sky, never green */
.cui.fos-scope .fos-kpi.gold  { border-top: 3px solid var(--af-gold); }
.cui.fos-scope .fos-kpi.red   { border-top: 3px solid var(--af-red); }
.cui.fos-scope .fos-chip { font-family: var(--font-display-ui); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; border-radius: var(--radius-sm); }
.cui.fos-scope .fos-btn { font-family: var(--font-body); font-weight: 600; border-radius: var(--radius-sm);
  border: 1px solid var(--border-1); background: #fff; color: var(--fg-1); }
.cui.fos-scope .fos-btn:hover { background: var(--af-cream); }
.cui.fos-scope .fos-row { border-bottom: 1px solid var(--border-1); }
.cui.fos-scope .fos-muted { color: var(--fg-3); }
.cui.fos-scope .fos-empty { background: var(--af-cream); border: 1px solid var(--border-1); color: var(--fg-3);
  border-radius: var(--radius-sm); font-family: var(--font-body); }
.cui.fos-scope .fos-error { background: rgba(229, 30, 37, .08); border: 1px solid rgba(229, 30, 37, .35);
  color: var(--af-red-dark); border-radius: var(--radius-sm); }
.cui.fos-scope, .cui.fos-scope .fos-head { color: var(--fg-1); }
.cui.fos-scope .fos-btn-primary, .cui.fos-scope .fos-btn-primary:hover { background: var(--af-red); border-color: var(--af-red); color: #fff; } /* was #15803d green */
.cui.fos-scope .fos-btn:hover { border-color: var(--border-2); }
.cui.fos-scope .fos-kpi .fos-kpi-v { color: var(--fg-1); }               /* numerals are ink; tone lives on the border */
.cui.fos-scope .fos-tab.active { border-bottom-color: var(--af-red); background: none; }
.cui.fos-scope .fos-tab-primary, .cui.fos-scope .fos-tab-primary::before, .cui.fos-scope .fos-tab-primary.active { color: var(--af-red); }
.cui.fos-scope .fos-eyebrow { font-family: var(--font-display-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--af-red); }

/* ── C15 · CHAIROS .cos-* MAPPING — Wave 3 (People) ─────────────────
 * Same pattern as §C14: the chairos module's inline .cos-* sheet maps
 * onto the tokens at .cui.cos-scope specificity (the inline sheet
 * injects later; plain .cui ties would lose). Slate inks -> tokens;
 * tab accent -> red; the sheet retires with the module's decompose. */
.cui.cos-scope { color: var(--fg-1); }
.cui.cos-scope .cos-eyebrow { font-family: var(--font-display-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--af-red); }
.cui.cos-scope .cos-title { font-family: var(--font-display-ui); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--fg-1); }
.cui.cos-scope .cos-sub, .cui.cos-scope .cos-muted { color: var(--fg-3); }
.cui.cos-scope .cos-tab { font-family: var(--font-display-ui); font-weight: 600; font-size: 11.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.cui.cos-scope .cos-tab.active { color: var(--fg-1); border-bottom: 2px solid var(--af-red); background: none; }
.cui.cos-scope .cos-kpi { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md); }
.cui.cos-scope .cos-kpi .v, .cui.cos-scope .cos-kpi-v { font-family: var(--font-horizon); color: var(--fg-1); }
.cui.cos-scope .cos-btn { font-family: var(--font-body); font-weight: 600; border: 1px solid var(--border-1);
  background: #fff; color: var(--fg-1); border-radius: var(--radius-sm); }
.cui.cos-scope .cos-btn:hover { background: var(--af-cream); }
.cui.cos-scope .cos-btn-primary { background: var(--af-red); border-color: var(--af-red); color: #fff; }
.cui.cos-scope .cos-launch { background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-md); color: var(--fg-1); }
.cui.cos-scope .cos-empty { background: var(--af-cream); border: 1px solid var(--border-1); color: var(--fg-3); border-radius: var(--radius-sm); }
.cui.cos-scope .cos-error { background: rgba(229, 30, 37, .08); border: 1px solid rgba(229, 30, 37, .35); color: var(--af-red-dark); border-radius: var(--radius-sm); }

/* ── C11 · ONE PRINT STYLESHEET (G5: @media layer, as approved) ──
 * Letter · >= 12pt Proxima body · Oswald headers · hairline rules ·
 * NO chrome. Every workspace prints through the Document service
 * drawer (later wave); pages must not ship their own print CSS. */
@media print {
  @page { size: letter; margin: 0.75in; }
  .cui { font-family: var(--font-body); font-size: 12pt; color: #000; }
  .cui .t-title, .cui .t-eyebrow, .cui .t-cardlabel, .cui .field-label { color: #000; }
  .cui .page-head { border-bottom: 1px solid #000; }
  .cui .card, .cui .ribbon { border: none; box-shadow: none; border-radius: 0; }
  .cui .tbl thead tr { background: none; }
  .cui .tbl th { color: #000; border-bottom: 1px solid #000; }
  .cui .tbl td { border-bottom: 0.5pt solid #999; }
  .cui .no-print, .cui .btn-primary, .cui .btn-secondary, .cui .btn-ghost, .cui .btn-navy,
  .cui .filter-bar, .cui .kiosk-strip, .cui .modal-scrim, .cui .toast { display: none !important; }
}

/* ---- commitments split queue (COMMITMENTS FIX 6 office UI) ---- */
.cui .sq-note   { padding: 10px 16px 0; font-size: 12px; color: var(--fg-2, #57534e); line-height: 1.5; }
.cui .sq-meta   { font-size: 12px; color: var(--fg-2, #57534e); }
.cui .sq-row    { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border-1, #e7e5e4); }
.cui .sq-row.is-done { opacity: .62; }
.cui .sq-main   { flex: 1; min-width: 0; }
.cui .sq-fam    { font-family: var(--font-body); font-weight: 600; font-size: 13px; }
.cui .sq-fam a  { text-decoration: none; color: inherit; }
.cui .sq-famid  { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--fg-2, #57534e); margin-left: 8px; }
.cui .sq-students { font-size: 11px; color: var(--fg-2, #57534e); margin-top: 2px; }
.cui .sq-flags  { font-size: 12px; margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.cui .sq-act    { flex: none; }
.cui .sq-state  { font-size: 12px; color: var(--fg-2, #57534e); flex: none; }
.cui .sq-pad    { padding: 24px; }
.cui .sq-err    { padding: 24px; color: var(--danger-fg, #991b1b); }
