/* ─────────────────────────────────────────────────────────────────
   Track E · app layer over perlstreet-design-system v0.2.0
   Everything here is the system as shipped — square, 1px hairlines,
   no shadows, no gradients, one ground per surface, violet reserved
   for active state, mono for numerals only.

   Token values below are Claude Design's A22/A23 (2026-09-06, Arvind
   confirmed) — superseding Track E's own earlier FINDING-002/003
   approximations (#845F10/#267256 measured against --bg-1 and --bg-2
   only). A23's figures are measured the same way plus verified against
   a FILLED control's paper-text label, which --bg-1/--bg-2 alone did
   not check — kept as history, not as the standing value.
   ───────────────────────────────────────────────────────────────── */
:root{
  /* VERTICAL RHYTHM (Task 1 item 10, 2026-10-05). Three steps, from the existing space tokens, and
     the ONLY vertical spacing page furniture and list rows use. Pages do not set their own
     vertical margin/padding on these classes; they inherit it from the rules under
     "Vertical rhythm" below. Horizontal spacing is untouched by this. */
  --rhythm-page:    var(--ps-space-6);
  --rhythm-section: var(--ps-space-4);
  --rhythm-row:     var(--ps-space-2);
  /* The error / rejected red. Pages already read it as var(--label-negative,#b3261e); this defines it (same light value) and the dark block below lifts it for the dark ground. */
  --label-negative: #b3261e;
  /* A23 · one token cannot be both a fill and a label. -700 tokens are FILLS
     (paper text on them measures 5.6:1 / 4.6:1 on any ground) — used as a
     background, never as text-on-paper. --label-* are TEXT AND RULE colours
     and are what every existing text/border use of a raw -700 token should
     move to as each page is touched (not done in one sweep here — see this
     commit's own note on scope). --label-* flip on a dark ground; -700 does
     not, by design, since a fill's contrast partner is always paper text. */
  --ps-signal-700:   #8C6512;
  --ps-positive-700: #287A5B;
  --label-accent:   var(--ps-violet-700);
  --label-signal:   var(--ps-signal-700);
  --label-positive: var(--ps-positive-700);
  /* progressRingView.js (this build) · a light-orange start colour for the reusable progress
     ring, fading to --ps-violet-700 as a run nears completion. Neither ds/tokens/tokens.css nor
     this file had an orange/amber token to reuse — --ps-signal (#E8B547) is a separate, already-
     used "warn/attention" amber and reusing it here would blur that meaning with "in progress".
     Added HERE, not in ds/ (vendored — see the note on --bg-1/--bg-2 above), so the ring never
     hardcodes a hex of its own. */
  --ps-orange: #F2954A;
  /* A23 · --fg-3/--fg-4 raised from the design system's own defaults
     (0.55/0.35, measuring 4.13:1 and 2.28:1 on paper) to 0.60 (4.85:1) —
     below the 4.5:1 floor for the 11-13px meta text these tokens carry
     everywhere (timestamps, ids, shas, the billed-call cost line).
     Hierarchy still reads in three steps: ink, --fg-2 (7.36:1), --fg-3/4. */
  --fg-3: rgba(11, 14, 20, 0.60);
  --fg-4: rgba(11, 14, 20, 0.60);
  /* A22 · class-driven sizes the inline type-scale bump could not reach. */
  --ps-text-eyebrow: 12px;
  --ps-text-small: 14px;
  /* A22 · "Urbanist everywhere, Fraunces nowhere in the product." colors_and_type.css's own
     h1, .h1, the four .display classes and .ps-display all key off --ps-font-display, which
     tokens.css sets to Fraunces — every one of those elements on every page was rendering
     Fraunces until this override. Fraunces stays the marketing/deck face (unaffected —
     nothing there loads this stylesheet) and, per W6, the rendered LOI/proposal documents,
     which do not use this token either (G's own renderer, not this surface). */
  --ps-font-display: var(--ps-font-sans);
  --gutter: var(--ps-space-12);
}
/* A23 · the dark ground for `.on-dark` — the config preview swatch's own scoped toggle
   (admin.js's checkbox), distinct from the PAGE-WIDE flip below. Add class="on-dark" to the
   same element the design system's own dark-ground rules key off.

   CORRECTED 2026-09-07 (found by Track F, verified here): this comment used to
   claim "--bg-1/--bg-2 already flip via colors_and_type.css's [data-theme]
   handling". THEY DO NOT. ds/colors_and_type.css's `.on-dark, [data-theme="dark"]`
   rule assigns --fg-1..4 and --rule and NEVER assigns --bg-1 or --bg-2, so on a
   dark ground the fg ramp flips to paper while the bg tokens stay paper too.

   CORRECTED AGAIN, 2026-09-10 (review): this comment went on to claim "nothing sets
   [data-theme] and nothing carries .on-dark on any authenticated page" and named Admin ›
   Configuration as "not yet built" — both true when written, neither true now. Configuration
   is built (adminConfigView.js), and shell.js's applyTheme sets `data-theme="dark"` on the
   document root for a real, page-wide flip — see the block immediately below, which is that
   fix, not more narration of a gap this one used to only document.

   The bg tokens must be assigned HERE, not in ds/. ds/ is vendored (it ships its
   own LICENSE and imports its own tokens); editing it forks us from upstream and
   the fork is invisible at the next re-vendor. Overrides belong in app.css. */
.on-dark{
  --label-accent:#A14ADA; --label-signal:#E8B547; --label-positive:#3FBF8F;
  --label-negative:#F0857D;
  --fg-3: rgba(242,239,231,0.62); --fg-4: rgba(242,239,231,0.62);
}
/* A23 · THE REAL PAGE-WIDE FLIP (2026-09-10) — `.on-dark` above is kept unchanged for the
   landing band, which paints its OWN background directly (colors_and_type.css's `.on-dark`
   rule sets `background: var(--ps-surface)` on the element itself) and never needed --bg-1/
   --bg-2 for that. Everything else on this surface reads its ground from --bg-1/--bg-2 as
   CUSTOM PROPERTIES (`.shell-bar`, inputs, cards, the config preview swatch), and neither this
   file nor ds/colors_and_type.css ever assigned those two for a dark ground — the gap this
   comment used to only document (see above) is closed here, not narrated further.

   `:root[data-theme="dark"]` (attribute selector + :root, specificity 0,2,0) rather than a
   second `[data-theme="dark"]` bare-attribute rule (0,1,0, same as ds/colors_and_type.css's
   own): this file's plain `:root` block above ALSO carries --fg-3/--fg-4, at 0,1,0, loaded
   AFTER colors_and_type.css — so at equal specificity this file's own light values would keep
   winning over colors_and_type.css's dark ones for exactly those two tokens, attribute or no
   attribute, which is the bug FINDING-002/003's history above was tracking. The extra :root
   raises specificity past that plain :root block on THIS file, which is the only rule that
   was ever able to out-order it.

   --bg-1/--bg-2 use the same surface tokens ds/tokens/tokens.css already defines for a dark
   UI ground (--ps-surface/--ps-surface-2) rather than new hex — one definition of "the dark
   ground," not two. --fg-3/--fg-4 and the three --label-* tokens are identical to .on-dark's
   own values directly above: one flip, expressed twice because it has to reach two different
   selectors, not two different answers. */
:root[data-theme="dark"]{
  --bg-1: var(--ps-surface);
  --bg-2: var(--ps-surface-2);
  --label-accent:#A14ADA; --label-signal:#E8B547; --label-positive:#3FBF8F;
  --label-negative:#F0857D;
  --fg-3: rgba(242,239,231,0.62); --fg-4: rgba(242,239,231,0.62);
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg-1);color:var(--fg-1);-webkit-font-smoothing:antialiased}

/* FINDING-003 · the design system's own link colour fails AA on paper.
   colors_and_type.css sets `a { color: var(--ps-violet) }`. #A14ADA measures
   4.05:1 on --bg-1 — under the 4.5:1 body-text floor, and under 4.5 on
   --bg-2 too. --label-accent (= --ps-violet-700, #8636BD) is already in
   tokens.css at 5.58:1 and is what the system already uses for the hover
   state, so this is the system's own value, not a new one. Uses
   --label-accent rather than the raw token directly so a link inside
   .on-dark still resolves correctly.
   THIS IS A DESIGN-SYSTEM BUG, not a mockup bug: every link on every
   surface built from colors_and_type.css inherits it. Overridden here so
   the mockups are honest; the fix belongs upstream. */
a{color:var(--label-accent)}
a:hover{color:var(--ps-violet)}

/* ── Shell (D2 · one shell, persona-resolved) ──────────────────── */
.shell-bar{display:flex;align-items:center;gap:var(--ps-space-8);padding:0 var(--gutter);
  height:56px;border-bottom:var(--ps-stroke) solid var(--rule);background:var(--bg-1);
  position:sticky;top:0;z-index:40}
.lockup{display:flex;align-items:center;gap:var(--ps-space-3);flex:0 0 auto}
.lockup-name{font-family:var(--ps-font-sans);font-weight:700;font-size:21px;letter-spacing:-.018em}
/* Shell mark is 2x its old 44px (88px, js/shell.js SHELL_MARK_PX) while the bar stays 56px and
   the wordmark and nav keep their vertical places (Arvind, 2026-09-29). The mark's margin box is
   held at the old 44px (88 - 22 - 22) so it contributes the same height to .lockup as before, and
   the equal -22px margins put the mark's vertical centre on the lockup row's centre, which is
   also the wordmark's centre (.lockup is align-items:center; Arvind, 2026-09-29: "raise the logo
   to center it with the wordmark"). The ring artwork is 56% of the box (about 49px), so it sits
   inside the 56px bar; only the transparent box spills above the page top and below the bar. The
   mark does not take clicks. At phone widths the mark goes back to 44px (see the max-width:900px
   block below). */
.lockup > svg{margin:-22px 0 -22px;position:relative;z-index:1;pointer-events:none}
/* Co-brand resolves from workspace config. Perl Street = platform,
   GridBroker = workspace (renamed from GridWealth, migrations/0050/W16). Pre-auth there
   is no workspace, so sign-in carries no co-brand at all. */
.cobrand{display:flex;align-items:center;gap:var(--ps-space-3);padding-left:var(--ps-space-3);
  border-left:var(--ps-stroke) solid var(--rule);font-size:14px;font-weight:500;color:var(--fg-2)}
.shell-nav{display:flex;gap:var(--ps-space-6);margin-left:var(--ps-space-6);flex:1}
.shell-nav a{font-size:14px;color:var(--fg-3);text-decoration:none;border-bottom:0;padding:8px 0;
  border-top:2px solid transparent}
.shell-nav a:hover{color:var(--fg-1)}
.shell-nav a[aria-current]{color:var(--fg-1);border-top-color:var(--label-accent)}
.ws-switch{font-family:var(--ps-font-mono);font-size:12px;color:var(--fg-3);
  border:var(--ps-stroke) solid var(--rule);padding:4px 12px;background:transparent;cursor:pointer}
.ws-switch:hover{color:var(--fg-1)}
/* Version pill (Arvind ruled 2026-09-29; V0R3 from 2026-10-16): far-right item in .shell-bar, rendered by
   shell.js's buildVersionPillHtml from platformVersion.js's PLATFORM_VERSION — the one place
   that owns the string. --ps-positive-700 is a FILL token (A23, above): paper text on it
   measures >=4.6:1 on any ground, and -700 fills do not flip per theme (only their *label*
   counterpart, --label-positive, does) — so this one rule is correct in both light and dark
   without a :root[data-theme="dark"] override, the same reasoning .btn-primary's
   --ps-violet-700 fill already relies on. flex:0 0 auto keeps it from being squeezed by
   .shell-nav's flex:1 at narrow widths (FINDING-005's 375px overflow case). */
.version-pill{flex:0 0 auto;margin-left:auto;font-family:var(--ps-font-mono);font-size:12px;font-weight:600;
  letter-spacing:.02em;color:var(--ps-paper);background:var(--ps-positive-700);
  border-radius:999px;padding:4px 12px;white-space:nowrap}

/* ── Inbox (migrations/0210; js/inboxBadge.js, js/inboxView.js) ───────────────────────────────
   The header link sits before the version pill (shell.js renderShell mounts it; it is not a nav item). Its
   count is a filled pill on --ps-violet-700, the same fill the primary button uses, so paper text on it
   clears 4.5:1 in both themes. The pill keeps its own far-right margin when there is no Inbox link; with the
   link present the link takes the auto margin and the pill follows it at a fixed gap. */
.shell-inbox{flex:0 0 auto;margin-left:auto;display:inline-flex;align-items:center;gap:var(--ps-space-2);
  font-size:14px;color:var(--fg-2);text-decoration:none;border-bottom:0;padding:8px 0}
.shell-inbox:hover{color:var(--fg-1)}
.shell-inbox[aria-current]{color:var(--fg-1)}
.shell-inbox + .version-pill{margin-left:var(--ps-space-4)}
.shell-inbox-count{font-family:var(--ps-font-mono);font-size:11px;font-weight:600;line-height:1;color:var(--ps-paper);
  background:var(--ps-violet-700);border-radius:999px;padding:3px 7px;min-width:20px;text-align:center}
.inbox-main{max-width:880px;padding:var(--ps-space-6) var(--gutter) 80px}
.inbox-main .head{padding-left:0;padding-right:0}
.inbox-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ps-space-4);margin-bottom:var(--ps-space-4)}
.inbox-tabs{display:flex;flex-wrap:wrap;gap:var(--ps-space-2);align-items:center}
.inbox-tab{font-family:var(--ps-font-sans);font-size:14px;padding:6px 12px;border:var(--ps-stroke) solid var(--rule);
  background:transparent;color:var(--fg-2);cursor:pointer;min-height:36px}
.inbox-tab:hover{color:var(--fg-1);border-color:var(--fg-3)}
.inbox-tab[aria-pressed="true"]{color:var(--fg-1);border-color:var(--fg-1);font-weight:600}
.inbox-email{font-size:14px;color:var(--fg-2);display:flex;gap:var(--ps-space-2);align-items:center}
.inbox-list{list-style:none;margin:0;padding:0;border-top:var(--ps-stroke) solid var(--fg-1)}
.inbox-item{padding:var(--ps-space-5) 0;border-bottom:var(--ps-stroke) solid var(--rule)}
.inbox-item.is-unread{border-left:3px solid var(--label-accent);padding-left:var(--ps-space-4)}
.inbox-top{display:flex;flex-wrap:wrap;gap:var(--ps-space-3);align-items:center}
.inbox-chip{flex:0 0 auto}
.inbox-title{font-size:16px;font-weight:500;margin:0;display:flex;align-items:center;gap:var(--ps-space-2)}
.inbox-item.is-unread .inbox-title{font-weight:700}
.inbox-dot{width:8px;height:8px;border-radius:50%;background:var(--label-accent);display:inline-block;flex:0 0 auto}
.inbox-meta{margin:var(--ps-space-2) 0 0;font-size:13px;color:var(--fg-3)}
.inbox-text{margin:var(--ps-space-3) 0 0;font-size:14px;color:var(--fg-1);white-space:pre-wrap;overflow-wrap:anywhere}
.inbox-facts,.inbox-note{margin:var(--ps-space-2) 0 0;font-size:13px;color:var(--fg-2)}
.inbox-projects{margin:var(--ps-space-2) 0 0;padding-left:var(--ps-space-4);font-size:13px}
.inbox-act{display:flex;flex-wrap:wrap;gap:var(--ps-space-3);align-items:center;margin-top:var(--ps-space-3)}
.inbox-tools{display:flex;flex-wrap:wrap;gap:var(--ps-space-2);margin-top:var(--ps-space-3)}
.inbox-reply,.inbox-compose{display:grid;gap:var(--ps-space-2);margin:var(--ps-space-4) 0;padding:var(--ps-space-4);
  border:var(--ps-stroke) solid var(--rule);background:var(--bg-2)}
.inbox-reply label,.inbox-compose label{font-size:13px;color:var(--fg-2)}
.inbox-reply textarea,.inbox-compose textarea,.inbox-compose select{font:inherit;font-size:14px;padding:8px;
  border:var(--ps-stroke) solid var(--rule);background:var(--bg-1);color:var(--fg-1);width:100%;box-sizing:border-box}
.inbox-error{margin:var(--ps-space-2) 0;font-size:14px;color:var(--label-negative, var(--label-signal))}
.inbox-ok{margin:var(--ps-space-2) 0;font-size:14px;color:var(--fg-2)}
@media (max-width:900px){
  .shell-inbox{order:1;margin-left:auto}
  .inbox-main{padding-top:var(--ps-space-4)}
}

/* ── Controls ──────────────────────────────────────────────────── */
.btn{font-family:var(--ps-font-sans);font-size:14px;font-weight:500;padding:8px 16px;
  border:var(--ps-stroke) solid var(--fg-1);background:transparent;color:var(--fg-1);cursor:pointer;
  transition:color var(--ps-dur-fast) var(--ps-ease),background var(--ps-dur-fast) var(--ps-ease),
             border-color var(--ps-dur-fast) var(--ps-ease)}
.btn:hover{background:var(--fg-1);color:var(--bg-1)}
.btn-sm{font-size:13px;padding:8px 12px}
.btn-accent{border-color:var(--label-accent);color:var(--label-accent)}
/* A23 · the hover fill must be the -700 token itself, not --accent (#A14ADA, 4.05:1) —
   a filled background needs the fill token's 5.6:1 pairing with paper text, which --accent
   alone does not measure. */
.btn-accent:hover{background:var(--ps-violet-700);color:var(--bg-1);border-color:var(--ps-violet-700)}
.btn[disabled]{border-color:var(--rule);color:var(--fg-4);cursor:not-allowed;background:transparent}
/* A22/measured (sign-in's "Sign in" button, prototype) · a primary action is FILLED at
   rest, not on hover — .btn-accent's outline-then-fill-on-hover is for a secondary accent
   action. background is the -700 fill token directly (a real fill, paper-text pairing). */
/* THE CENTRING IS LOAD-BEARING, NOT TIDINESS. This rule sets its height with `min-height:44px`
   and NO vertical padding, which centres the label only because a <button> centres its own
   content by default. On an <a class="btn-primary"> — the landing page's Sign in — the same
   declarations gave 2px above the text and 24px below: the label sat on the top edge of a
   44px violet box. Measured, not guessed. inline-flex + centring makes the box behave the
   same whichever element wears the class, and is a no-op for the <button>s already using it
   (including the full-width submits on sign-in, which stay full-width and centred). */
/* Batch B2 design pass: text was `color:var(--bg-1)` — correct by coincidence in light mode,
   where --bg-1 resolves to paper, and wrong in dark mode, where --bg-1 is redefined to the
   page's own dark surface (A23's page-wide flip, this file's own block above) — so every
   .btn-primary on a dark ground rendered near-black text on violet, measured at ~2.9:1,
   under the 4.5:1 floor. --bg-1/--bg-2 are PAGE-GROUND tokens; a filled button's text needs
   the fixed "paper text" pairing the header comment above already describes, in both themes,
   which is --ps-paper directly (the raw token, never flipped) — not whatever the page ground
   happens to be. Pre-existing on every .btn-primary this file already had (signin.html's own
   "Sign in", confirmed); surfaced by this pass because S2 extended the class to far more
   buttons, not introduced by it. Same reasoning covers the ink hover fill below. */
.btn-primary{font-family:var(--ps-font-sans);font-size:15px;font-weight:500;letter-spacing:.01em;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0 16px;min-height:var(--control-h);border:0;background:var(--ps-violet-700);color:var(--ps-paper);
  cursor:pointer;transition:background var(--ps-dur-fast) var(--ps-ease)}
.btn-primary:hover{background:var(--ps-ink);color:var(--ps-paper)}
/* Batch B2 review: an <a class="btn-primary"> inherited a:hover's violet text over the ink fill
   (4.15:1 at 13px), and on the dark ground an ink fill is invisible (1.03:1 against --bg-1) —
   so the hover keeps paper text explicitly and, in dark mode, fills violet instead of ink. */
:root[data-theme="dark"] .btn-primary:hover{background:var(--ps-violet);color:var(--ps-paper)}
.btn-primary[disabled]{background:var(--rule);color:var(--fg-4);cursor:not-allowed}
/* S2 · a row-level primary. .btn-primary is sized for a page-level action (15px, 44px tall);
   dropped into a queue row it is oversized. Follows .btn-primary's own box model — no vertical
   padding, height from min-height — rather than .btn-sm's, so the two do not fight.
   THE NARROW-SCREEN RULE BELOW IS PART OF THIS, NOT SEPARATE. The media query's `.btn,.btn-sm`
   is specificity 0,1,0; this compound is 0,2,0 and would WIN even inside the media query,
   holding a 36px tap target on touch while every control beside it grows to 44px — a
   regression on exactly the breakpoint that rule exists to fix. Found by Track F before it
   shipped. The paired override is at the end of the narrow-screen block; do not remove one
   without the other. */
.btn-primary.btn-sm{font-size:13px;min-height:var(--control-h);padding:0 12px}
/* S2 · "Secondary actions beside them are quiet outlines (Edit, Reject, Create site)" — a
   third weight below .btn's own ink outline, for a row action that is neither the row's main
   forward step (.btn-primary) nor a plain secondary tool (.btn). Borderless at rest, a rule
   only on hover, so it reads as the quietest control on the row without vanishing on focus.
   Consolidated here from three byte-identical page-local copies (bill-file.html, bill-reject.html,
   console.html) — the .demo-banner story above, recurring: nobody chose three copies, it is
   what happens when a fourth page needing this is written without checking for the first. */
.btn-quiet{border-color:transparent;color:var(--fg-3)}
.btn-quiet:not([disabled]):hover{background:transparent;color:var(--fg-1);border-color:var(--rule)}
.cost{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--fg-3)}
/* A23 audit · was `background:#fff` — a hardcoded ground that could never follow the flip.
   `--bg-1` is the one token every other ground on this surface already reads from (body,
   .shell-bar); re-tokened here, not restyled — in light mode --bg-1 is --ps-paper (#F2EFE7),
   visually indistinguishable from #fff at this size, and in dark mode it now correctly
   becomes the dark surface instead of staying white-on-dark. */
/* ONE FIELD STYLE, ONE CONTROL HEIGHT (Arvind, 2026-10-04, items 47 and 49).
   FILL: a field has the page background, a normal border and nothing else - no ink-tinted fill, in either theme. A
   disabled field reads as disabled by a dashed border and faded text, not by a grey ground.
   HEIGHT: every input, select and button is --control-h, the height of .btn (14px text + 8px padding top and bottom +
   the 1px border = 35px); padding is the button's 8px 16px. A textarea takes the same padding and the same fill but
   grows with its content, so it is exempt from the height. Checkboxes, radios, ranges, files and hidden inputs are not
   text fields and keep their native box. :where() holds the specificity at 0,0,1 so a page can still set a width.
   A dense list sets the two tokens on its row (--control-h and --control-pad-y, the field's top and bottom padding, 8px
   unless a row says otherwise), never a height or padding on the field itself. */
:root{--control-h:35px}
:where(input):not(:where([type=checkbox],[type=radio],[type=range],[type=file],[type=hidden],[type=button],[type=submit],[type=reset],[type=color],[type=image])),
select,textarea{
  font-family:var(--ps-font-sans);font-size:14px;color:var(--fg-1);
  background:var(--bg-1);border:var(--ps-stroke) solid var(--rule);border-radius:0;
  padding:var(--control-pad-y,8px) 16px;box-sizing:border-box}
:where(input):not(:where([type=checkbox],[type=radio],[type=range],[type=file],[type=hidden],[type=button],[type=submit],[type=reset],[type=color],[type=image])),
select{height:var(--control-h);min-height:var(--control-h);line-height:1.2}
input[type=text],input[type=email],input[type=password]{width:100%}
:where(input,select,textarea):disabled{background:var(--bg-1);color:var(--fg-4);-webkit-text-fill-color:var(--fg-4);
  opacity:1;border-style:dashed;cursor:not-allowed}
.btn,.btn-sm{box-sizing:border-box;min-height:var(--control-h)}
input:focus{outline:none;border-color:var(--label-accent);box-shadow:inset 0 0 0 1px var(--label-accent)}
label{display:block;font-size:13px;color:var(--fg-2);margin-bottom:8px}
/* A22, measured · the lockup a pre-auth/pre-grant page shows in place of the persistent
   shell-bar (no <header> at all pre-auth in the prototype) — Urbanist 700, tight tracking,
   the mark (js/shell.js's markSvg) beside it, same as the persistent .lockup. */
.auth-lockup{display:flex;align-items:center;gap:var(--ps-space-3);
  font-family:var(--ps-font-sans);font-weight:700;font-size:29px;
  letter-spacing:-0.018em;margin-bottom:var(--ps-space-8)}

/* ── Status chips. Colour never carries status alone (D11). ────── */
.state-chip{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;padding:2px 8px;
  border:var(--ps-stroke) solid var(--rule);color:var(--fg-2);display:inline-block;
  border-radius:var(--ps-radius-1)}
.state-chip.calm,.state-chip.not-checked{color:var(--fg-3)}
.state-chip.warn{color:var(--label-signal);border-color:var(--label-signal)}
.state-chip.fault{color:var(--fg-1);border-color:var(--fg-1);font-weight:600}
.state-chip.good{color:var(--label-positive);border-color:var(--label-positive)}
/* STATUS PILL + POPOVER (Arvind, 2026-10-04; statusPill.js). A short status word; the full text opens on click, tap or
   Enter, and closes on Esc or a click outside. One component for the journey stages, the "What the bill says" header and
   an engine warning in a component table. The word carries the status; colour only echoes it (D11). The button is a pill,
   not a form button, so it keeps its own compact size. */
.status-pill-wrap{position:relative;display:inline-block;vertical-align:middle;letter-spacing:normal;text-transform:none}
.status-pill{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;line-height:1.3;padding:3px 10px;
  display:inline-block;white-space:nowrap;cursor:pointer;min-height:0;height:auto;
  background:transparent;border:var(--ps-stroke) solid var(--rule);color:var(--fg-2);border-radius:var(--ps-radius-1)}
.status-pill:hover{background:var(--bg-2)}
.status-pill:focus-visible{outline:2px solid var(--label-accent);outline-offset:2px}
.status-pill[aria-expanded="true"]{background:var(--bg-2)}
.status-pill-calm{color:var(--fg-3)}
.status-pill-good{color:var(--label-positive);border-color:var(--label-positive)}
.status-pill-warn{color:var(--label-signal);border-color:var(--label-signal)}
.status-pill-fault{color:var(--fg-1);border-color:var(--fg-1);font-weight:600}
.status-pill-pop{position:fixed;z-index:60;box-sizing:border-box;width:min(380px,calc(100vw - 16px));max-height:60vh;overflow:auto;
  padding:var(--ps-space-3) var(--ps-space-4);background:var(--bg-1);color:var(--fg-1);
  border:var(--ps-stroke) solid var(--fg-3);border-radius:var(--ps-radius-1);box-shadow:0 6px 24px rgba(0,0,0,.18);
  font-family:var(--ps-font-sans);font-size:13px;font-weight:400;line-height:1.5;letter-spacing:normal;text-align:left;text-transform:none;white-space:normal}
.status-pill-pop[hidden]{display:none}
.status-pill-text{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
.status-pill-link{display:inline-block;margin-top:var(--ps-space-2);font-size:13px}
/* 0167 (STALE_PILL_0167_LIVE): the automatic Stale pill. Same chip look as .state-chip.warn; the word carries the status. */
.stale-pill{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;padding:2px 8px;display:inline-block;white-space:nowrap;
  border:var(--ps-stroke) solid var(--label-signal);color:var(--label-signal);border-radius:var(--ps-radius-1)}
.stale-mark-active{white-space:nowrap}
.board-card-badges .stale-pill{display:block;width:fit-content;max-width:100%;overflow:hidden;text-overflow:ellipsis}
/* 0171 (PROJECT_LINKS_0171_LIVE): the "Linked (N)" chip. The peers are listed in a popup on hover or keyboard focus;
   the same text is the chip's title, so a touch screen and a screen reader get it too. */
.link-chip{position:relative;font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;padding:2px 8px;display:inline-block;white-space:nowrap;
  border:var(--ps-stroke) solid var(--label-accent);color:var(--label-accent);border-radius:var(--ps-radius-1);cursor:default}
.link-chip:focus-visible{outline:2px solid var(--label-accent);outline-offset:2px}
.link-chip-peers{display:none;position:absolute;left:0;top:100%;margin-top:4px;z-index:20;min-width:200px;max-width:320px;white-space:normal;
  background:var(--bg-1);border:var(--ps-stroke) solid var(--rule);border-radius:var(--ps-radius-1);padding:6px 10px;
  color:var(--fg-1);letter-spacing:normal;text-align:left}
.link-chip:hover .link-chip-peers,.link-chip:focus .link-chip-peers,.link-chip:focus-within .link-chip-peers{display:block}
.link-chip-peers-head{display:block;font-size:10px;color:var(--fg-3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.link-chip-peers ul{list-style:none;margin:0;padding:0;font-family:var(--ps-font-sans);font-size:13px}
.link-chip-peers li{padding:1px 0}
.link-peer-hidden{color:var(--fg-3)}

/* ── Origin chip (projectOrigin.js). Arvind, 2026-09-22: "the 'External' should be an amber
   pill". It had NO rule at all until now — `.chip`/`.chip-external` were never defined, so the
   word rendered as bare text wedged against the project name on nine surfaces. Same geometry as
   .state-chip so it lines up beside one, amber on --label-signal ("attention", the token the
   warn chip already uses) and a filled tint rather than outline-only, so a project that did not
   come from the platform reads as different at a glance. Colour is never the only signal (D11):
   the chip still says the word "External", and its title attribute still names the source. */
.chip{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;padding:2px 8px;
  border:var(--ps-stroke) solid var(--rule);color:var(--fg-2);display:inline-block;
  border-radius:var(--ps-radius-1);vertical-align:middle}
.chip-external{color:var(--label-signal);border-color:var(--label-signal);
  background:color-mix(in srgb, var(--label-signal) 12%, transparent)}

/* ── THE AGENT MARK (js/agentMark.js; named-agents spec, Arvind 2026-10-22). One mark for everything an agent produced: name · state · date
   (· person, Confirmed only). Same geometry as .chip and .state-chip so it lines up beside them. Colour is never the only signal (D11): the
   state WORD is always printed, and Suggested differs from Confirmed in OUTLINE (dashed against solid), so a value no person has confirmed never
   looks like one that was. ──────────────────────────────────────────── */
.agent-mark{font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;line-height:1.4;padding:2px 8px;
  border:var(--ps-stroke) solid var(--rule);color:var(--fg-2);display:inline-flex;flex-wrap:wrap;align-items:center;gap:0 2px;
  border-radius:var(--ps-radius-1);vertical-align:middle;max-width:100%;box-sizing:border-box}
.agent-mark-name{font-weight:600;color:var(--fg-1)}
.agent-mark-state{display:inline-flex;align-items:center;gap:6px}
.agent-mark-spin{width:10px;height:10px;border-width:2px}
.agent-mark-person{color:var(--fg-1)}
.agent-mark-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.agent-mark-working{color:var(--fg-3)}
.agent-mark-suggested{border-style:dashed;border-color:var(--label-signal);color:var(--label-signal)}
.agent-mark-suggested .agent-mark-name{color:var(--label-signal)}
.agent-mark-waiting{border-style:solid;border-color:var(--label-signal);color:var(--label-signal);
  background:color-mix(in srgb, var(--label-signal) 12%, transparent)}
.agent-mark-waiting .agent-mark-name{color:var(--label-signal)}
.agent-mark-confirmed{border-style:solid;border-color:var(--label-positive);color:var(--label-positive)}
.agent-mark-confirmed .agent-mark-name{color:var(--label-positive)}
.agent-mark-could-not-finish{border-style:solid;color:var(--fg-3)}
.agent-mark-could-not-finish .agent-mark-name{color:var(--fg-3)}
.agent-mark-not-run{border-color:transparent;padding-left:0;padding-right:0;color:var(--fg-3)}
.agent-mark-wrap{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;max-width:100%}
.agent-mark-more{font-size:12px;color:var(--fg-2)}
.agent-mark-more summary{cursor:pointer;font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;color:var(--fg-3)}
.agent-mark-line{display:block;font-family:var(--ps-font-sans);letter-spacing:normal;padding-top:2px}
@media (prefers-reduced-motion:reduce){.agent-mark-spin{animation:none}}

/* ── GATES-1 (2026-09-10, Arvind ruled on the live Charlie review): "all four should
   be single line titles that can expand when clicked... use amber... seems to be
   reversed here" — that screen showed the CLEAR document-integrity gate with the
   amber left bar and the FAILING policy gate with a plain tan background and a
   grey eyebrow. Each review-screen gate (reviewDetailView.js's buildGateHtml) is a
   native <details>/<summary> row — no JS needed for the toggle, keyboard-reachable
   by default. Attention is drawn ONLY on a gate that has gone wrong (`.gate-bad`,
   set by the same state each gate already computed): the eyebrow turns amber, the
   left rule appears, and the row's own `.state-chip.warn` (defined above) carries
   the same colour. A clear gate gets a plain eyebrow, a calm/good/fault chip as
   before, and NO rule and NO background on either side — colour is never the only
   signal (D11): the eyebrow/chip TEXT still says "clear" / "blocks QUAL-2 · QUAL-3"
   / "not verified" regardless of which of these rules apply. ─────────────────── */
/* Every row carries the same left rule, transparent unless the gate is bad, and sits in the
   left gutter by a negative margin — so the four single-line titles align whatever their state
   (Batch B review, 2026-09-10: a bad row used to indent by the rule's own width). */
.gate{border-bottom:var(--ps-stroke) solid var(--rule);border-left:2px solid transparent;
  margin-left:calc(-1 * (var(--ps-space-5) + 2px));padding-left:var(--ps-space-5)}
.gate:last-child{border-bottom:0}
.gate-static .gate-summary{cursor:default}
.gate-summary{display:flex;align-items:baseline;gap:var(--ps-space-5);padding:var(--ps-space-5) 0;
  cursor:pointer;list-style:none}
.gate-summary::-webkit-details-marker{display:none}
.gate-summary::marker{display:none}
.gate-question{font-size:16px;font-weight:500;color:var(--fg-1);flex:0 0 auto}
.gate-verdict{font-size:14px;color:var(--fg-2);flex:1 1 auto;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
/* Closed: one line, clipped. Open: the whole verdict wraps — the blocker sentences live only
   here, so expanding must reveal all of them (Batch B review, 2026-09-10). */
.gate[open] .gate-verdict{white-space:normal;overflow:visible;text-overflow:clip}
.gate-chevron{flex:0 0 auto;width:8px;height:8px;position:relative;margin-left:var(--ps-space-3)}
.gate-chevron::after{content:"";position:absolute;top:0;left:0;width:6px;height:6px;
  border-right:var(--ps-stroke) solid var(--fg-3);border-bottom:var(--ps-stroke) solid var(--fg-3);
  transform:rotate(45deg);transition:transform .15s ease}
.gate[open] .gate-chevron::after{transform:rotate(-135deg);top:3px}
.gate-detail{padding:0 0 var(--ps-space-5)}
.gate-body{font-size:14px;line-height:var(--ps-leading-normal);color:var(--fg-1);max-width:78ch}
.gate-detail .consequence{color:var(--fg-3);font-size:13px;display:block}
.gate-aside{font-family:var(--ps-font-mono);font-size:12px;color:var(--fg-3);text-align:right;
  margin-top:var(--ps-space-3)}
.gate-summary .eyebrow.warn{color:var(--label-signal)}
.gate.gate-bad{border-left-color:var(--label-signal)}

/* ── Page furniture ────────────────────────────────────────────── */
.crumb{padding:var(--rhythm-page) var(--gutter) 0;display:flex;gap:var(--ps-space-2);align-items:center}
.crumb a{font-size:13px;color:var(--fg-3);border-bottom:0;text-decoration:none}
.crumb a:hover{color:var(--fg-1)}
.crumb span{color:var(--fg-4);font-size:13px}
.head{padding:var(--ps-space-3) var(--gutter) var(--rhythm-page);display:flex;align-items:flex-end;
  justify-content:space-between;gap:var(--ps-space-8)}
/* S6 (design review 2026-09-07, measured by Track F): the design system's h1 default is
   32px at weight 300 (ds/tokens/tokens.css:41, ds/colors_and_type.css:82). The design uses
   28px at weight 500 — SMALLER and FIRMER. Ours being larger and much lighter is why our
   pages read thin where the prototype reads dense. -0.01em is the design's -0.28px at 28px,
   expressed so it holds if the size moves. ds/ is vendored, so this is an override here and
   NOT an edit to the token. */
.head h1{font-size:28px;font-weight:500;letter-spacing:-.01em}
.head .sub{font-size:14px;color:var(--fg-2);margin-top:8px}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--ps-space-6);
  border-bottom:var(--ps-stroke) solid var(--fg-1);padding-bottom:var(--rhythm-row);
  margin-bottom:var(--rhythm-section)}
.sec-head h2{font-size:19px;font-weight:500}
.sec-note{font-size:12px;color:var(--fg-3);max-width:46ch;text-align:right}

/* ── Vertical rhythm ───────────────────────────────────────────────
   page    (24)  crumb top, and the gap under a page's title block (.head, above)
   section (16)  under a section header (.sec-head, above), and a section body's top and bottom
   row     ( 8)  a section header's own bottom padding, and the top and bottom of every list row
   Pages (broker-project, broker-projects, console, review-detail) carry no vertical
   margin/padding for these classes; change a step here, not there. */
.pp-section-toggle{padding-top:var(--rhythm-row);padding-bottom:var(--rhythm-row)}
.pp-section-body{padding-top:var(--rhythm-section);padding-bottom:var(--rhythm-section)}
.pp-section-body > *{margin-bottom:var(--rhythm-row)}
.pp-section-body > *:last-child{margin-bottom:0}
.checklist-item,.doc-row,.console-row,.console-row-done,.project-row{padding-top:var(--rhythm-row);padding-bottom:var(--rhythm-row)}

/* Body copy inside a section, as opposed to .sec-note's job of a right-aligned aside next
   to a heading. Arvind, 2026-09-12, on the live review screen: "why the formatting
   difference between the first sub section [and] the remaining." Screening assumptions
   renders a full-width bullet list; every other sub-section under it was using .sec-note
   for prose the operator actually has to READ, so four of the five sub-sections sat in a
   ragged-left 46ch column next to one that did not. Same muted register, read like text. */
.finding-body{font-size:12px;color:var(--fg-3);text-align:left}

/* Arvind, 2026-09-06: the live database holds one project and one site, both self-labelled
   "(E2E test)" — an honestly empty real account is not an edge case in this design, it is the
   MAIN case for a long while yet, and it deserves to read as unmistakably its own state, never
   confusable with .sec-note's OTHER two jobs on this same surface: a top-level load failure
   (load().catch() across every page, session.js's resolveClientState()) and a terse secondary
   note buried inside a populated section. Deliberately the opposite visual register from both:
   centered and spacious rather than a clipped right-aligned aside, a real heading at fg-1
   rather than fg-3's muted meta tone — reads as "nothing here yet, and that's expected," not
   as a diagnostic or a truncated error. Used only for a PAGE-LEVEL or TAB-LEVEL primary empty
   state (the whole visible content, not a sub-section note inside content that does exist). */
.empty-state{padding:var(--ps-space-16) var(--gutter);text-align:center}
.empty-state-title{font-size:var(--ps-text-h2);color:var(--fg-1);margin-bottom:var(--ps-space-2)}
.empty-state-sub{font-size:var(--ps-text-body);color:var(--fg-2);max-width:52ch;margin:0 auto}
@media (max-width:900px){
  .empty-state{padding:var(--ps-space-10) var(--gutter)}
}

/* Mobile: the section head stacks and the note goes left-aligned.
   A right-aligned 46ch note under a wrapped serif heading reads as
   two competing columns at 375px. */
@media (max-width:900px){
  .sec-head{flex-direction:column;align-items:flex-start;gap:var(--ps-space-2)}
  .sec-head h2{font-size:18px}
  .sec-note{text-align:left;max-width:100%}
  .head{flex-direction:column;align-items:flex-start;gap:var(--ps-space-4)}
  .crumb{flex-wrap:wrap}

  /* FINDING-001 · touch targets. SCREENS.md D13 says ">=44px on broker
     screens" and nothing implemented it: nav links measured 35px, .btn-sm
     29px, chips 24px, inline links 16px. Height comes from padding so the
     hit area grows without the type changing size. Inline links in prose
     get a vertical hit area via padding + negative margin, so they stay on
     the text baseline and do not push the line box around. */
  /* FINDING-005 · the shell overflowed at 375px: 'Console' was clipped
     mid-word and the workspace switcher sat entirely off-screen, with no
     scroll and no wrap. A control a broker cannot reach is not a control.
     Two rows on mobile: identity above, navigation below. */
  .shell-bar{flex-wrap:wrap;height:auto;padding-top:var(--ps-space-2);gap:var(--ps-space-4)}
  .shell-nav{order:3;flex-basis:100%;margin-left:0;gap:var(--ps-space-5);
    border-top:var(--ps-stroke) solid var(--rule)}
  .ws-switch{margin-left:auto}
  /* .shell-nav drops to row 2 (order:3) at this width, so it no longer sits between the
     identity items and the pill to push the pill right by itself (desktop's flex:1 trick,
     above) — margin-left:auto on the pill itself keeps it top-right of row 1, same technique
     already used for .ws-switch on this line. */
  .version-pill{margin-left:auto;font-size:11px;padding:3px 8px}
  /* The pill stays top-right: it takes row 1 beside the lockup, and the workspace name gets
     its own row 2 (in full, never clipped) above the nav. Left in DOM order, a long workspace
     name wrapped to row 2 and carried the pill with it at 375px. */
  .version-pill{order:1}
  .cobrand{order:2;flex-basis:100%;border-left:0;padding-left:0}
  /* Phone: the shell mark stays at its old 44px (Arvind, 2026-09-29: "leave the logo the prior
     size on phone"). width/height in CSS beat the svg's width/height attributes; margins, position,
     z-index and pointer-events go back to the plain in-flow mark, so nothing overlaps. */
  .lockup > svg{width:44px;height:44px;margin:0;position:static;z-index:auto;pointer-events:auto}
  .shell-nav a{min-height:44px;display:flex;align-items:center}
  :root{--control-h:44px}
  .btn,.btn-sm{min-height:var(--control-h);padding-top:11px;padding-bottom:11px}
  /* The compound half of the row-primary pair above: same 0,2,0 specificity, later in the
     file, so it beats the 36px. min-height ONLY — .btn-primary gets its height from
     min-height with zero vertical padding, so adding padding here would overshoot 44px
     instead of reaching it. */
  .btn-primary.btn-sm{min-height:var(--control-h)}
  .ws-switch{min-height:44px;padding-top:12px;padding-bottom:12px}
  /* Prose links: 44px of hit area, zero px of layout impact.
     The link underline must come from text-decoration, not border-bottom:
     the padding that creates the hit area pushes a border 14px below the
     baseline, leaving a violet rule floating under the word. */
  .hit{display:inline-block;padding:14px 0;margin:-14px 0;
       border-bottom:0;text-decoration:underline;text-underline-offset:2px}
}

/* The banner strip every page uses to say it is NOT showing live data — demo fixtures, or
   (2026-09-10) that you are signed out. It lived as twelve byte-identical copies in twelve
   page <style> blocks, and the two pages that needed it MOST had no copy at all: admin.html,
   whose "Not signed in. Sign in to use Admin." notice has therefore been rendering as bare
   unstyled text at the top-left of the page this whole time, and larch.html, which worked
   around the absence by inlining the same four declarations on the element. Nobody chose
   that; it is what a copy-pasted rule does when a thirteenth page is written. One copy. */
/* STICKY (Arvind, 2026-09-16): a demo tab's fixture battery/capex figures were mistaken for
   this workspace's real numbers — the banner naming them as fixtures had scrolled out of
   view. "Impossible to look at a demo screen and not know it" only holds if this stays on
   screen at any scroll position, so it now pins to the top rather than scrolling away with
   the content beneath it. z-index above the shell bar (shell.js) so neither can hide the
   other when both are present. */
.demo-banner{background:var(--ps-signal-700);color:#fff;padding:var(--ps-space-2) var(--gutter);
  font-family:var(--ps-font-mono);font-size:12px;letter-spacing:.04em;
  position:sticky;top:0;z-index:50}
.demo-banner a{color:#fff}

/* Admin › Projects (0119). The only table on this surface that grows a full-width row in
   the MIDDLE of itself: asking to delete a row inserts a colspan=6 confirm panel directly
   under it. Rendered and looked at rather than reasoned about, that is what showed the
   problem — on a browser-default auto-width table the panel is by far the widest cell, so
   every column jumped sideways the moment an operator clicked Delete and jumped back on
   Cancel, under a heading that had not moved. width:100% settles the columns before any
   panel exists, so the panel opens underneath a table that stays still. The rest is the
   left-aligned eyebrow header and hairline row rules adminEnginesView.js's runs table
   already inlines; it is a rule here rather than a fourth inline copy because this table
   has six columns and two row shapes, and because the dark theme has to reach it. */
.admin-projects-table{width:100%;border-collapse:collapse;font-size:14px}
.admin-projects-table thead tr{border-bottom:var(--ps-stroke) solid var(--rule)}
.admin-projects-table th{text-align:left;font-weight:500;padding:0 var(--ps-space-3) 8px 0;
  font-family:var(--ps-font-mono);font-size:11px;letter-spacing:.06em;color:var(--fg-3);
  text-transform:uppercase}
.admin-projects-table td{padding:10px var(--ps-space-3) 10px 0;vertical-align:middle;
  border-bottom:var(--ps-stroke) solid var(--rule)}
.admin-projects-table th:last-child,.admin-projects-table td:last-child{padding-right:0}
/* 0107's serial under the project's name, the same muted-mono pairing broker-project.html's
   .pp-serial uses beside a project title — the only thing that tells two archived "Meridian"
   rows on one site apart, and this list's action is permanent. */
.admin-projects-table .project-serial{display:block;font-family:var(--ps-font-mono);
  font-size:11px;letter-spacing:.04em;color:var(--fg-3);margin-top:3px}
.admin-projects-table td.actions{text-align:right;white-space:nowrap}
.admin-projects-table td.delete-confirm{background:var(--bg-2);padding:20px 22px;
  border-left:2px solid var(--ps-signal-700)}
/* The refusal the server sent back is the whole reason the panel is still open — it names
   the projects to delete first, or the job to wait for. .finding-body's 12px muted aside is
   the wrong register for a line the operator has to act on (it rendered as grey small print
   at the very bottom edge of the panel), so this reads at body size in the signal colour,
   above the buttons that produced it rather than below them. */
.admin-projects-table .delete-confirm-error{font-size:15px;line-height:1.55;
  color:var(--ps-signal-700);margin:0 0 14px;max-width:74ch}

/* Admin > Failed jobs (0120). Reuses .admin-projects-table wholesale -- same eyebrow header,
   same hairline row rules, same right-aligned actions column -- and only adds what a job row
   has that a project row does not. */
.admin-failed-jobs-table td{vertical-align:top}
.admin-failed-jobs-table .failed-job-kind{font-family:var(--ps-font-mono);font-size:12px;
  letter-spacing:.04em;color:var(--fg-1);margin-bottom:5px}
.admin-failed-jobs-table td.stopped,.admin-failed-jobs-table td.attempts{white-space:nowrap;
  color:var(--fg-2)}
.admin-failed-jobs-table .failed-job-project{font-size:14px;color:var(--fg-1)}
.admin-failed-jobs-table .failed-job-id{font-family:var(--ps-font-mono);font-size:11px;
  letter-spacing:.04em;color:var(--fg-3);margin-top:2px;word-break:break-all}
/* The one line on this surface that means the operator was told something untrue -- the
   project is gone, the files are not. It reads at the signal colour and at body weight, not
   as a muted aside, for the same reason .delete-confirm-error above does: it is a line to
   act on, not a footnote. */
.admin-failed-jobs-table .failed-job-gone{font-size:13px;line-height:1.45;font-weight:600;
  color:var(--ps-signal-700);margin-top:4px;max-width:34ch}
.admin-failed-jobs-table .failed-job-why{display:block;font-size:13px;line-height:1.5;
  color:var(--fg-2);max-width:52ch;overflow-wrap:anywhere}
.admin-failed-jobs-table .failed-job-error{font-size:13px;line-height:1.5;
  color:var(--ps-signal-700);margin:8px 0 0;max-width:34ch;text-align:right}
/* The key list belongs to the job row above it, so the pair reads as one block: the job
   row's own bottom rule is the only one between this job and the next. */
.admin-failed-jobs-table td.failed-job-storage{background:var(--bg-2);padding:14px 18px 16px;
  border-left:2px solid var(--ps-signal-700)}
.admin-failed-jobs-table .failed-job-keys{list-style:none;margin:0;padding:0;
  font-family:var(--ps-font-mono);font-size:12px;line-height:1.7;color:var(--fg-2)}
.admin-failed-jobs-table .failed-job-keys li{overflow-wrap:anywhere}
.admin-failed-jobs-table .failed-job-bucket{color:var(--fg-3);margin-right:10px}

/* Shared project filter bar (projectFiltersView.js). The base layout lives here so every page that
   mounts the bar (console review list, broker projects) lays the selects out in one row that wraps,
   rather than one select per line. broker-projects.html adds its own sticky/padding on top. */
.pf-bar{display:flex;flex-wrap:wrap;align-items:end;gap:var(--ps-space-3)}
.pf-bar-label{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--fg-3);
  flex:1 1 11rem;min-width:9rem;max-width:16rem}
.pf-bar-label select{width:100%;min-width:0}
/* The Starred / Stale / Linked checkboxes: sized to their text (not to a select's 11rem slot), the
   box and its text on one line, and the same height as the selects so all of them sit on one
   line along the bottom of the bar (product owner, 2026-10-02: the checkboxes were misaligned and
   Linked dropped its box onto a line of its own). Two classes, so a page's own later
   .pf-bar-label rule (broker-projects.html) cannot undo it. */
.pf-bar-label.pf-bar-starred,.pf-bar-label.pf-bar-stale,.pf-bar-label.pf-bar-linked{flex:0 0 auto;min-width:0;max-width:none;
  flex-direction:row;align-items:center;gap:6px;height:var(--control-h);font-size:12px;white-space:nowrap}
.pf-bar-starred input,.pf-bar-stale input,.pf-bar-linked input{margin:0}
.pf-bar-count{font-size:12px;color:var(--fg-3);margin-left:auto;align-self:center}

/* Resources shell (resourcesMenu.js): the one left-hand menu and the one page header shared by
   Code, the Information documents and Coverage. Square, hairline, no shadow; violet marks the
   active entry only. Top-level entries and group titles are Urbanist 600 14px; sub-entries are
   JetBrains Mono 11px uppercase, indented. Every row has the same 12px of padding, so the spacing
   between rows is equal. Content is 1180px wide with 32px sides. */
.rm-wrap{display:grid;grid-template-columns:264px minmax(0,1fr);align-items:start}
.rm-menu{position:sticky;top:56px;max-height:calc(100vh - 56px);overflow-y:auto;display:flex;
  flex-direction:column;padding:24px 0;border-right:var(--ps-stroke) solid var(--rule)}
.rm-top,.rm-gt,.rm-sub{display:block;padding:12px 20px;border-left:2px solid transparent;
  border-bottom:0;text-decoration:none;color:var(--fg-3)}
.rm-top,.rm-gt{font:600 14px/1.3 var(--ps-font-sans)}
.rm-sub{font:500 11px/1.4 var(--ps-font-mono);letter-spacing:.12em;text-transform:uppercase;padding-left:32px}
a.rm-top:hover,a.rm-sub:hover{color:var(--fg-1)}
.rm-menu a[aria-current="page"]{color:var(--fg-1);border-left-color:var(--ps-violet);background:var(--bg-2)}
.rm-menu a:focus-visible{outline:2px solid var(--ps-violet);outline-offset:-2px}
.rm-main{min-width:0;width:100%;max-width:1180px;padding:40px 32px 80px}
.rm-head{display:flex;flex-direction:column;gap:12px;padding-bottom:24px;border-bottom:var(--ps-stroke) solid var(--rule)}
.rm-eyebrow{font:400 11px/1 var(--ps-font-mono);text-transform:uppercase;letter-spacing:.12em;color:var(--fg-3)}
.rm-h1{margin:0;font-family:"Fraunces",Georgia,"Times New Roman",serif;font-size:42px;font-weight:300;
  letter-spacing:-.025em;line-height:1.1;color:var(--fg-1)}
.rm-sub-text{margin:0;font-size:15px;color:var(--fg-3)}
.rm-doc{display:block;width:100%;height:calc(100vh - 260px);min-height:480px;margin-top:24px;
  border:var(--ps-stroke) solid var(--rule);background:var(--bg-1)}
.rm-doc-open{display:inline-block;margin-top:12px;font:400 11px/1 var(--ps-font-mono);
  text-transform:uppercase;letter-spacing:.12em}
.rm-status{margin:0;font-size:14px;color:var(--fg-2)}
@media (max-width:820px){
  .rm-wrap{grid-template-columns:minmax(0,1fr)}
  .rm-menu{position:static;max-height:none;flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:0;
    border-right:0;border-bottom:var(--ps-stroke) solid var(--rule)}
  .rm-group{display:flex}
  .rm-gt{display:none}
  .rm-top,.rm-sub{white-space:nowrap;padding:14px;border-left:0;border-bottom:2px solid transparent}
  .rm-menu a[aria-current="page"]{border-bottom-color:var(--ps-violet);background:transparent}
  .rm-main{padding:24px 16px 64px}
  .rm-h1{font-size:32px}
}
.rm-slot{display:contents}
/* Slide-in panel (js/slidePanel.js; Arvind 2026-10-14, MAPLE review layout rulings). Results stay on the page;
   anything an operator edits or looks up opens here, from the right, over a dimmed page. */
body.slide-locked{overflow:hidden}
.slide-root{position:fixed;inset:0;z-index:80}
.slide-backdrop{position:absolute;inset:0;background:rgba(20,16,28,.32);opacity:0;transition:opacity .18s ease-out}
.slide-panel{position:absolute;top:0;right:0;bottom:0;display:flex;flex-direction:column;box-sizing:border-box;
  width:min(560px,100vw);background:var(--bg-1);color:var(--fg-1);border-left:var(--ps-stroke) solid var(--rule);
  box-shadow:-8px 0 32px rgba(0,0,0,.16);transform:translateX(24px);opacity:0;transition:transform .2s ease-out,opacity .2s ease-out}
.slide-panel-wide{width:min(960px,100vw)}
.slide-panel-full{width:min(1320px,100vw)}
.slide-in .slide-backdrop{opacity:1}
.slide-in .slide-panel{transform:none;opacity:1}
.slide-head{display:flex;align-items:center;justify-content:space-between;gap:var(--ps-space-3);
  padding:var(--ps-space-4) var(--ps-space-5);border-bottom:var(--ps-stroke) solid var(--rule)}
.slide-title{margin:0;font-size:20px;font-weight:400;letter-spacing:-.01em}
.slide-close{font:400 11px/1 var(--ps-font-mono);text-transform:uppercase;letter-spacing:.12em;padding:8px 12px;
  background:transparent;border:var(--ps-stroke) solid var(--rule);color:var(--fg-2);border-radius:var(--ps-radius-1);cursor:pointer}
.slide-close:hover{background:var(--bg-2)}
.slide-close:focus-visible,.slide-trigger:focus-visible{outline:2px solid var(--label-accent);outline-offset:2px}
.slide-body{flex:1;overflow:auto;padding:var(--ps-space-4) var(--ps-space-5) var(--ps-space-6)}
.slide-trigger{font:inherit;font-size:13px;padding:5px 12px;background:transparent;border:var(--ps-stroke) solid var(--rule);
  color:var(--fg-1);border-radius:var(--ps-radius-1);cursor:pointer}
.slide-trigger:hover{background:var(--bg-2)}
.slide-trigger-primary{background:var(--ps-violet);border-color:var(--ps-violet);color:#fff}
.slide-trigger-primary:hover{background:var(--ps-violet);opacity:.9}
.slide-trigger-link{border:0;padding:0;color:var(--ps-violet);text-decoration:underline;text-underline-offset:3px}
.slide-trigger-link:hover{background:transparent}
.bill-shown,.bill-nav-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.bill-nav{display:inline-flex;flex-wrap:wrap;gap:6px}.bill-nav a.slide-trigger{text-decoration:none;color:inherit;line-height:1.2}
@media (prefers-reduced-motion:reduce){.slide-backdrop,.slide-panel{transition:none}}
/* Size and value, and the acknowledgement checklist (js/reviewDetailView.js; Arvind 2026-10-14, MAPLE review layout R7/R8/R10).
   The page shows results; the working is in the "Size and value details" panel (a <template> opened with openSlidePanel). The panel
   sits under <body>, so these rules are not scoped to the page's .size-value. */
.size-value .sec-head{align-items:center}
.size-value .sv-group + .sv-group{margin-top:var(--ps-space-5)}
.size-value .sv-sum{display:block;text-align:left;max-width:none;margin:4px 0 0}
.sv-block{margin:0 0 var(--ps-space-6)}
.sv-h{margin:0 0 var(--ps-space-3);font-size:15px;font-weight:600}
.sv-table{width:100%;border-collapse:collapse;font-size:13px}
.sv-table th,.sv-table td{text-align:left;vertical-align:top;padding:8px var(--ps-space-4) 8px 0;
  border-bottom:var(--ps-stroke) solid var(--rule)}
.sv-table thead th{font:400 11px/1.4 var(--ps-font-mono);text-transform:uppercase;letter-spacing:.08em;color:var(--fg-3)}
.sv-table .num{text-align:right;white-space:nowrap;padding-right:var(--ps-space-5)}
.sv-sizing-table tr.sizing-col{border:0;background:transparent;padding:0}
.sv-sizing-table .sizing-col-head{min-height:0;text-transform:none;letter-spacing:0;font-size:13px;font-weight:500;color:var(--fg-1)}
.sv-sizing-table .sizing-kw{margin:0;font-size:15px}
.sv-sizing-table .sec-note{text-align:left;max-width:none;margin:2px 0 0}
.sv-sizing-table .sizing-how{color:var(--fg-2);line-height:1.5}
.sv-save-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ps-space-3);margin:var(--ps-space-4) 0}
.sv-save-row .sec-note{text-align:left;max-width:none}
.sv-unvalued{margin:var(--ps-space-3) 0;font-size:13px}
.sv-unvalued > summary{cursor:pointer;color:var(--fg-2)}
.sv-edit-btn{font-size:12px;padding:3px 10px}
.stream-edit[hidden],.stream-edit-stale[hidden]{display:none}
.sv-share .customer-share-control{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ps-space-3)}
.sv-share-preview{text-align:left;max-width:none;margin:var(--ps-space-2) 0 0}
.sv-share-preview:empty{display:none}
/* The checklist sits directly above Confirm / Reject: one line per item (box and title), the detail behind "Details". */
.ack-block{margin:var(--ps-space-10) var(--gutter) 0}
.ack-block + .decide{margin-top:var(--ps-space-5)}
.ack-compact .ack-item{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--ps-space-4);padding:var(--ps-space-2) 0}
.ack-compact .ack-row{flex:1 1 0;min-width:0;align-items:center}
.ack-compact .ack-row input.ack-box{margin-top:0}
.ack-compact .ack-more{flex:0 0 auto}
.ack-compact .ack-more[open]{flex:1 0 100%}
.ack-compact .ack-more > summary{cursor:pointer;font:400 11px/1.4 var(--ps-font-mono);text-transform:uppercase;letter-spacing:.08em;color:var(--fg-3)}
.ack-compact .ack-more-body{margin:var(--ps-space-2) 0 var(--ps-space-2) 26px}
.ack-compact .ack-meta,.ack-compact .ack-error{flex:1 0 100%}
/* The Matching table (Arvind 2026-10-14, MAPLE review layout R3): one table; agreeing rows fold, exceptions stay open; the row expansion carries the charge detail. */
.matching-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:var(--ps-space-3)}
.matching-table th,.matching-table td{text-align:left;vertical-align:top;padding:8px var(--ps-space-4) 8px 0;border-bottom:var(--ps-stroke) solid var(--rule)}
.matching-table thead th{font:400 11px/1.4 var(--ps-font-mono);text-transform:uppercase;letter-spacing:.08em;color:var(--fg-3)}
.matching-table .num,.matching-table .mr-amt{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.matching-table tbody[hidden],.matching-table tr[hidden],.matching-aside[hidden]{display:none}
.matching-row[data-group-state="open"] td,.matching-row[data-group-state="flagged"] td,.matching-row[data-row-kind="unplaced"] td,.matching-row[data-row-kind="not-on-bill"] td{background:var(--bg-2,transparent)}
.matching-row .mr-bill,.matching-row .mr-tariff{overflow-wrap:break-word}
.matching-table .mr-h-bill,.matching-row .mr-bill{width:24%;min-width:13rem}
.matching-table .mr-h-tariff,.matching-row .mr-tariff{width:30%;min-width:14rem}
.matching-row .mr-status{min-width:14rem}
.matching-row .mr-status .sec-note{display:block;text-align:left;max-width:none;margin:2px 0 0}
.matching-row .mr-action{white-space:nowrap}
.matching-row .mr-action .matching-actions{display:flex;flex-wrap:wrap;gap:var(--ps-space-2);justify-content:flex-end}
.matching-row-detail > td{padding:var(--ps-space-3) 0 var(--ps-space-4) var(--ps-space-4)}
.mr-toggle,.matching-agree-toggle,.matching-aside-toggle{font-size:12px;padding:2px 10px}
.matching-agree-head td{border-bottom:0;padding-left:0}
.matching-aside-wrap{margin-top:var(--ps-space-3)}
.matching-aside-wrap .matching-aside{list-style:none;margin:var(--ps-space-2) 0 0;padding:0}
.matching-head .matching-actions{margin-left:auto}
.mr-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:760px){.matching-table{display:block;overflow-x:auto}}
/* The unmatched-lines fix screen and the per-group editor, opened in a slide-in panel (R3). */
.slide-panel .fix-panel{border:0;padding:var(--ps-space-4);margin:0;display:flex;flex-direction:column;gap:var(--ps-space-4)}
.slide-panel .fix-panel ul{list-style:none;margin:0;padding:0}
.slide-panel .fix-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--ps-space-5)}
.slide-panel .fix-reason{width:100%;box-sizing:border-box;font:inherit}
.slide-panel .fix-actions{display:flex;flex-wrap:wrap;gap:var(--ps-space-2);align-items:center}
.fix-unmatched .un-line,.fix-unmatched .un-comp{display:flex;align-items:baseline;gap:var(--ps-space-2);padding:var(--ps-space-2) 0;border-top:var(--ps-stroke) solid var(--rule)}
.fix-unmatched .un-line-fixed{color:var(--fg-3)}
.fix-unmatched .un-pair-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ps-space-3);padding:var(--ps-space-2) 0}
.fix-unmatched .un-pending{margin:var(--ps-space-3) 0;padding:0}
.fix-unmatched .un-pair-hint{margin:0}
.slide-panel .fix-totals{margin:var(--ps-space-2) 0}
.fix-unmatched .un-aside-cat{margin-left:auto}
.un-undo-btn,.un-pair-btn{font-size:12px;padding:2px 10px}
@media (max-width:760px){.slide-panel .fix-cols{grid-template-columns:minmax(0,1fr)}}
/* Action progress (actionProgress.js): the in-place "this is working" line for any button that starts work finishing later.
   Text and a plain turning ring - never a percentage. The ring stands still for people who ask for less motion; the elapsed time still ticks. */
.ap-board{margin:var(--ps-space-2) 0}
.ap{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ps-space-2);padding:var(--ps-space-2) var(--ps-space-3);border:var(--ps-stroke) solid var(--rule);font-size:14px;color:var(--fg-2)}
.ap + .ap{margin-top:var(--ps-space-2)}
.ap-spin{width:14px;height:14px;box-sizing:border-box;border:2px solid var(--rule);border-top-color:var(--label-accent);border-radius:50%;animation:ap-turn 0.9s linear infinite;flex:none}
.ap-elapsed{font-family:var(--ps-font-mono,ui-monospace,monospace);font-size:12px;color:var(--fg-3);font-variant-numeric:tabular-nums}
.ap-stage{font-size:12px;color:var(--fg-3)}
.ap-slow{flex-basis:100%;font-size:12px;color:var(--fg-3)}
.ap-failed{color:var(--label-negative);border-color:var(--label-negative)}
.ap-failed .ap-label,.ap-stopped .ap-label{flex:1 1 auto}
.ap .btn{font-size:12px;padding:2px 10px}
@keyframes ap-turn{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ap-spin{animation:none;border-top-color:var(--rule);border-left-color:var(--label-accent)}}
