/*
  TMS shared design system — the single source of visual truth.
  Extracted verbatim from the reference PC app (user/tms.html <style>, tokens + components)
  so the web shell (app.html) and index.html render identically to the installed app.
  Tokens: --blue #1a5fb4 (brand accent) · --ink #222 · --line #d8d8d8 · --panel #f7f7f5.
*/
:root{
  --red:#c0392b; --red-bg:#fde8e8; --green:#1e8e3e; --green-bg:#e6f6e6;
  --amber:#b7791f; --amber-bg:#fdf3e0; --blue:#1a5fb4; --ink:#222; --mut:#666;
  --line:#d8d8d8; --panel:#f7f7f5; --sel:#444;
  /* --bg IS HERE BECAUSE A DIALOG IS NOT ON A SURFACE — bug-260909-213826:
     *"rerun on server button brings up this menu which is mostly transparent?"*

     It was declared only on the surfaces that use it — `#view-findings,
     #view-shared-audit, [data-av-surface]` (view-audit.css) and `#view-corpus`
     (view-corpus.css) — and five dialogs are built by those modules and appended
     to `document.body`, which is an ANCESTOR of the surfaces, not a descendant.
     Their inline `background:var(--bg)` therefore resolved to nothing, and an
     undefined custom property makes the whole declaration invalid at
     computed-value time: `background-color` falls back to its initial value,
     `transparent`. Measured, not deduced — a dialog on `body` computes
     `rgba(0, 0, 0, 0)`.

     "Mostly" transparent, because the same inline style asks for `--ink` and
     `--line` too and those were already here, so the frame and the words drew
     while the panel behind them did not. That asymmetry is the whole bug: --bg
     was the one token of the five in that rule that was not global.

     The two surface blocks still declare `--bg:#fff` themselves, to the same
     value, so nothing on a surface changes — this only reaches the elements that
     had no answer at all. It is not a theme hook: no `[data-theme]` block in this
     tree redefines it, and the only other consumer is one rule inside
     `#view-corpus`, which shadows this with the identical colour.

     Note the token is NOT `--bg2`: `user/tms.html` uses that one for code panes,
     always written `var(--bg2,#f6f7f8)` with a fallback, and it is a different
     colour for a different job. */
  --bg:#fff;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font:14px/1.45 "Segoe UI",system-ui,sans-serif;color:var(--ink);display:flex;flex-direction:column;background:#fff}

/* ---------- top bar ---------- */
#menubar{display:flex;align-items:center;gap:2px;padding:4px 10px;border-bottom:1px solid var(--line);background:var(--panel);flex-wrap:wrap}
#menubar .brand{font-weight:700;color:var(--blue)}
.version-badge{display:inline-block;background:var(--blue);color:#fff;font-size:11px;font-weight:600;line-height:1;padding:3px 8px;border-radius:9px;margin:0 14px 0 6px;letter-spacing:.3px;vertical-align:middle}
.version-badge.stale{background:#b45309}
#menubar button{background:none;border:1px solid transparent;border-radius:4px;padding:5px 10px;font:inherit;cursor:pointer}
#menubar button:hover:not(:disabled){background:#ececea;border-color:var(--line)}
#menubar button:disabled{color:#aaa;cursor:default}
#menubar .spacer{flex:1}
/* Grouped dropdown menus (Project / Translate / Settings / Program) */
.menu-root{display:flex;gap:2px}
.menu{position:relative}
.menu-top{background:none;border:1px solid transparent;border-radius:4px;padding:5px 10px;font:inherit;cursor:pointer}
.menu-top:hover,.menu.open .menu-top{background:#ececea;border-color:var(--line)}
.menu-panel{position:absolute;top:100%;left:0;z-index:60;min-width:210px;background:#fff;
  border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 20px rgba(0,0,0,.14);padding:4px;display:none}
.menu.open .menu-panel{display:block}
#menubar .menu-panel button{display:block;width:100%;text-align:left;background:none;border:1px solid transparent;
  border-radius:4px;padding:6px 12px;font:inherit;cursor:pointer;white-space:nowrap}
#menubar .menu-panel button:hover:not(:disabled){background:#ececea;border-color:transparent}
/* pointer-events:none lets the panel still receive mousemove over a disabled
   item, so its hover description shows even while the action is locked. */
#menubar .menu-panel button:disabled{color:#aaa;cursor:default;pointer-events:none}
.menu-sep{height:1px;background:var(--line);margin:4px 6px}
.menu-label{padding:5px 12px 2px;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--mut);pointer-events:none;user-select:none}
/* THE AVATAR (§6.1 / §3.3). `Settings ▾` and `Program ▾` were two words on the
   left of the strip; this is one round control on the right of it, and the
   `#menubar button` rules above are why every one of these is id-scoped — a bare
   `.avatar-top:hover` loses to `#menubar button:hover` and the circle turns grey.

   THE PANEL OPENS RIGHT-ALIGNED. `.menu-panel` is `left:0`, which is correct for
   a menu near the left edge and wrong for the only one that is not: a 210px
   panel hung off the side of the window, because this control's own left edge is
   within 40px of it. */
#menubar #avatar-menu{margin-left:6px}
#menubar .avatar-top{display:flex;align-items:center;justify-content:center;width:28px;height:28px;
  padding:0;border-radius:50%;background:var(--blue);border:1px solid var(--blue);flex:0 0 auto}
#menubar .avatar-top:hover,#menubar .menu.open .avatar-top{background:#14488a;border-color:#14488a}
#avatar-ini{font-size:11.5px;font-weight:700;letter-spacing:.02em;color:#fff;line-height:1}
#avatar-menu .menu-panel{left:auto;right:0}

/* ======== the review surface's chrome, on the menu row (§9, 17 Sep) ========
   Pushed to the right of the strip by `margin-left:auto`, exactly as the avatar
   is; the avatar follows it because it is declared after. */
/* THIS GROUP MUST NEVER BE THE REASON THE STRIP WRAPS, and `min-width:0` alone
   is not enough for that — it took two measurements to get right.

   `min-width:0` FIRST: a flex item will not shrink below its content, and this
   group's one elastic child is the status sentence, so without it the sentence's
   `text-overflow` never gets the chance to act. Measured at 768, where `#menubar`
   is `nowrap`: its `scrollWidth` went 768 (fitting) to 964 (196px off the edge)
   when §9.11 put the longer sentence here, and back to fitting with this.

   `flex:1 1 0` SECOND, and it is the half that generalises. At DESK widths
   `#menubar` is `flex-wrap:wrap`, and flex WRAPS before it shrinks — a line is
   broken on the items' base sizes, and only then are the items on it shrunk. So
   `min-width:0` bought nothing there: with `margin-left:auto` and a base of
   `auto`, the group's max-content width counted toward the line and §9.13's third
   tab took the total past 1280. Measured: the strip became 76px and two rows on
   the review surface at 1280, which is what `desk_resolution` block A asserts
   against. A base of 0 means the group can never contribute to that decision at
   any width, which is the form that has no screen it is wrong about — rather than
   a `max-width` on the sentence, which would be a number picked for 1280 and
   wrong at the next tab somebody adds. `justify-content:flex-end` keeps the
   right-hand alignment `margin-left:auto` was for, since the group now grows into
   the slack instead of being pushed by it. */
.mb-audit{display:flex;align-items:center;gap:2px;margin-left:auto;min-width:0}
.mb-audit[hidden]{display:none}
.mb-tabs{display:flex;margin-right:8px}
.mb-tabs .vt{font-size:12.5px;padding:4px 12px}
.mb-phase,.mb-live,.mb-counts{font-size:12px;white-space:nowrap;margin:0 0 0 8px}
.mb-phase:empty,.mb-live:empty,.mb-counts:empty{display:none}
/* THE DOCUMENT'S STATUS LINE LIVES HERE NOW (§9.11) and it is a sentence, not a
   count: `Pages · 447 open · 727 findings · 280 potential · one side rendered ·
   read-only`. It has to be allowed to CLIP rather than push the menus off the
   strip — the whole point of §9 was the document's width — so it shrinks and
   ellipsises, and the full text is on its `title`. `min-width:0` because a flex
   item will not shrink below its content without it, which is how a nowrap
   sentence overflows a row that had room. */
/* AND IT IS CAPPED, BECAUSE FLEX WRAPS BEFORE IT SHRINKS. `min-width:0` lets this
   clip once the line is decided; it cannot stop the line being BROKEN in the first
   place, because wrapping is decided on items' base sizes and only then are the
   items on a line shrunk. Measured with the suite's own fixture at 1280, document
   tab: brand 34 + the shell's menus 251 + this group 989 + the avatar 28 + gaps
   = 1312 against 1280, so the AVATAR went to a second row (`top: 40`) and the
   strip became 76px — which is what `desk_resolution` block A caught and what my
   own first measurement missed by checking `scrollWidth` and not height.
   A PROPORTION rather than a pixel cap: the constraint is a proportion of the
   line, so a proportion is what scales with it, and above ~1560 the sentence never
   reaches the cap at all. Below the desk band `#menubar` is `nowrap`, so there it
   clips instead of wrapping and this cap only makes it clip a little sooner. The
   full text is on the title either way.

   THE CAP WAS `28vw` AND IT HAD NO SLACK, WHICH IS WHY IT DID NOT SURVIVE THE NEXT
   ADDITION — the very thing the paragraph above was written to prevent. Restoring
   the version pill put 92px on this line (72px of badge plus its 20px of margin)
   and the strip went to two rows at **1280, 1366 and 1380**, measured against
   `origin/main` at the same widths in a second worktree: base 41px / 3 rows, branch
   71-76px / 4 rows. So the arithmetic that chose 28vw was right and its MARGIN was
   the mistake: 46px of slack is one control.

   `20vw` was chosen from the sweep rather than from the sum — candidate caps driven
   at 1180/1280/1366/1380/1440 with the pill present: 28vw wraps four of the five,
   24vw still wraps 1280, **22vw is the first that clears** and 20vw clears with 26px
   to spare at 1280. The first value that works is the value the next addition
   breaks, so this takes the one below it.

   1180 WRAPS AT EVERY CAP, INCLUDING 18vw, AND IT WRAPS ON THE BASE TOO —
   re-measured on `origin/main` with the work out of the tree, not reasoned about:
   76px, 4 rows, no pill. That is a real defect and it is not this line's to fix;
   it needs the shell's own menus to give something up, and it is below the desk
   band the brief asks about. Recorded here so the next reader does not discover it
   as a regression of this cap. */
.mb-counts{color:var(--mut,#666);min-width:0;max-width:14vw;overflow:hidden;
  text-overflow:ellipsis}
.mb-counts b{color:var(--ink,#222);font-weight:600}
/* THE PROJECT CHIP — the two facts worth keeping out of `#wf-status` (§11.1).

   ONE RULE DECIDES WHICH OF THE TWO IS ON SCREEN, and it is a sibling combinator
   rather than a second opinion in JavaScript: `#mb-project` sits after
   `#mb-audit` in `app.html` exactly so this can be written. They want the same
   slot, the strip's width budget has room for one of them, and the DOM already
   knows which — `avSyncMenubar` writes `#mb-audit`'s `hidden` from `S.aid`, so
   asking a second module to agree with it would be the shape §9.10 and §9.11
   both were.

   CAPPED LIKE `.mb-counts` AND FOR THE SAME REASON: flex wraps on base sizes and
   shrinks only within a line, so an uncapped title would break the strip rather
   than clip. 20vw, the value the version pill's own measurement settled on. */
.mb-project{color:var(--mut,#666);font-size:12px;margin-left:auto;min-width:0;
  max-width:20vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mb-project[hidden]{display:none}
.mb-project b{color:var(--ink,#222);font-weight:600}
#mb-audit:not([hidden]) ~ .mb-project{display:none}
/* A disabled submenu parent is a div, so `:disabled` cannot reach it. */
#menubar .mb-sub.mb-off{color:#aaa;pointer-events:none}
#menubar .mb-sub.mb-off .mb-arrow{color:#ccc}
/* ---- and the rows the group replaces, in the Document tab only ----
   `.mb-gone` rather than `hidden`, because `#filterbar` already uses `.hide`
   for a different question — whether an audit is open at all — and one class
   answering two questions is how a row comes back at the wrong moment. */
.mb-gone{display:none !important}
/* §11.1 RETIRED `html.av-doc-chrome`, AND THE CLASS IS GONE WITH IT.

   §9.4 hid `#wf-status` and released `.wf-next`'s basis under that root class,
   which `avSyncMenubar` set when the REVIEW SURFACE was in document view. It
   worked, and it was the wrong lever: a shell row's height was being decided by
   a module's own view, so the same project screen came out 39px or 85px of spine
   according to whether a review module somewhere happened to be on a document —
   one question, two answers, settled by which door the reader came through.

   The one-row shape is unconditional now (see `.wf-next` below) and `#wf-status`
   is removed from the markup rather than hidden, so there is nothing left for the
   class to switch and nothing left to write it. Driven before and after: the
   Findings tab was 276px on `93e3e18a` and 276px after §9 — that surface never
   got the gain at all, which is what the owner was looking at when they said it
   was not the vertical space the mockups showed. */
/* THE BLIND-PASS CHIP. `.fb-btn.is-blind`'s colours are scoped to
   `[data-av-surface]` and the strip is not inside one, so the same signal is
   restated here rather than reached for — same amber, same weight, sized for a
   41px strip. It exists only while a blind pass is on, so it costs nothing the
   rest of the time. */
.mb-blind{background:#fdf6e7;border:1px solid #ecdaae;color:#7a5510;font-weight:600;
  font-size:12px;padding:3px 8px;border-radius:999px;cursor:pointer;white-space:nowrap}
.mb-blind:hover{filter:brightness(.98)}
/* THE PANELS OPEN LEFTWARD, for the reason the avatar's does: they are the last
   things on the strip, so a panel anchored `left:0` runs off the window edge. */
.mb-audit .menu-panel{left:auto;right:0;min-width:236px}
/* THE AUDIT PICKER (§11.3). It is the FIRST thing in the group, not the last, so
   its panel is the one that hangs off the LEFT edge if it opens leftward — hence
   the override back. Capped like everything else that carries a title on this
   strip: the option text it replaces is 625px, which is the whole point. */
.mb-pick > .menu-panel{left:0;right:auto;min-width:300px;max-width:min(520px, 46vw)}
.mb-pick[hidden]{display:none}
/* 14vw, AND THE NUMBER IS FROM A SWEEP RATHER THAN FROM TASTE. At 24vw the button
   was 307px at 1280 and the strip went to FOUR ROWS at 1180, 1280, 1366, 1440 and
   1600 — §9.14's defect, made by me, one release after the paragraph warning about
   it. The strip's group had 28px of slack at 1280; a 307px control does not fit in
   28px, so something had to leave, and `#mb-phase` is what left (see the rule
   below). The full option text is on the button's `title` and in the panel.

   THE PAIR WAS CHOSEN FROM A SWEEP, and then RE-CHOSEN when §11.6 found what the
   first sweep had not measured. 12vw + `.mb-counts` 16vw cleared 1280 and 1366 —
   and it cleared them on a strip that did not yet have `#mb-live` on it.

   `#mb-live` IS 35px THAT ARRIVES LATE. `setLive` writes `#a-live` from the 5s
   `/changes` poll and `avSyncMenubar` mirrors it, so the chip is ABSENT for the
   first seconds of every session and present forever after. Every sweep I ran
   before §11.6 measured inside that window; the ceiling suite waits past it and
   drives two tab switches, and the strip came back at 71px — two rows — at 1280.
   A reviewer would have watched it reflow under them a few seconds after arriving.

   Re-swept at 1180/1280/1366/1440 WITH the chip: as-is wraps 1280; picker 10vw
   alone clears it; counts 14vw alone clears it; both together clear it with room.
   This takes both, because the margin is exactly what was missing twice — once for
   the version pill and once for the picker. 1180 wraps at every candidate and
   wraps on `origin/main` too, so nothing is made worse there. */
.mb-pick .menu-top{max-width:10vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* THE PHASE BADGE STANDS DOWN WHERE THE PICKER STANDS UP, because they say the same
   thing. `#mb-phase` mirrors `#a-phase` — "③ Document Audit" — and the picker's
   own label is the audit's disambiguated name, which `renderAuditSelector` builds
   with the phase glyph in front of it and the phase spelled out at the end
   ("③ Five Solas One Gospel … (Phase 3)"). Two controls for one fact is what §9.10
   and §9.11 were both about; here it also costs 136px on a line that has 28. */
.mb-pick:not([hidden]) ~ .mb-phase{display:none}
/* THE LIST SCROLLS RATHER THAN RUNNING OFF THE SCREEN. A reviewer with a project
   per course has more audits than a panel can be tall, and `max-height` on the
   panel alone would clip the phase rows above it out of reach. */
.mb-pickpanel #mb-pick-list{max-height:46vh;overflow-y:auto}
.mb-pickpanel button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-sep{height:1px;background:var(--line);margin:5px 8px}
/* THE CHECK IS A COLUMN, NOT A PREFIX CHARACTER. Written as a fixed-width span so
   the unchecked labels line up with the checked ones instead of shifting by the
   width of a tick every time state changes. */
#menubar .mb-panel button .mb-ck,#menubar .mb-sub > .mb-ck{
  display:inline-block;width:17px;color:var(--accent,#1a5fb4);font-weight:700;
}
/* A SUBMENU PARENT IS A DIV, not a button — see the markup's reasoning — so it has
   to be given the padding and the hover a `.menu-panel button` gets for free. */
#menubar .mb-sub{
  position:relative;display:block;width:100%;padding:6px 10px;border-radius:5px;
  font:inherit;font-size:13px;cursor:default;border:1px solid transparent;
}
#menubar .mb-sub:hover,#menubar .mb-sub:focus-visible,#menubar .mb-sub.open{background:#ececea}
#menubar .mb-sub:focus-visible{outline:2px solid var(--accent,#1a5fb4);outline-offset:-2px}
.mb-arrow{float:right;color:var(--mut,#666);margin-left:18px}
/* AND THE SUB-PANEL SLIDES LEFT AGAIN, because its parent panel is already pinned
   to the right edge of the window. `top:-6px` lines its first row up with the row
   that opened it rather than with the panel's padding box. */
.mb-subpanel{
  position:absolute;right:100%;top:-6px;margin-right:3px;z-index:70;min-width:228px;
  background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px;
  box-shadow:0 10px 26px rgba(0,0,0,.16);display:none;
}
#menubar .mb-sub.open > .mb-subpanel{display:block}
#menubar .mb-subpanel button{
  display:block;width:100%;text-align:left;background:none;border:1px solid transparent;
  border-radius:5px;padding:6px 10px;font:inherit;font-size:13px;cursor:pointer;
}
#menubar .mb-subpanel button:hover{background:#ececea}
/* The identity row is a NAME, not a group heading, so it keeps `.menu-label`'s
   one useful half — it is not a control — and drops the 10.5px uppercase
   treatment that would print somebody's name as a section header. Truncated
   rather than wrapped: a long display name must not make the panel wider than
   the items under it. */
#menubar #whoami{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:600;color:var(--ink);
  padding:7px 12px 5px;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#menubar #whoami b{font-weight:400;color:var(--mut)}
/* Floating per-item description card */
.menu-desc{position:fixed;z-index:70;max-width:260px;background:#2c3340;color:#fff;font-size:12px;line-height:1.4;
  padding:7px 10px;border-radius:6px;box-shadow:0 6px 18px rgba(0,0,0,.22);pointer-events:none;display:none}
#progressbar{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--mut)}
.sevchip{display:inline-block;min-width:20px;text-align:center;border-radius:9px;padding:1px 7px;font-size:11.5px;font-weight:700;color:#fff}
/* Review D6: these chips are OPEN counts while the Phase-3 dashboard's are TOTALS, and
   the only thing saying so was a title tooltip — so one severity showed two numbers on
   one screen. This labels the axis on screen. Negative margin so the word hugs the chips
   it describes instead of sitting one flex gap away from everything. */
.sevaxis{font-size:11.5px;color:var(--mut);margin-right:-4px}
.sev-CRITICAL{background:#7f1d1d}.sev-HIGH{background:#b3261e}.sev-MODERATE{background:#e07020}.sev-MINOR{background:#c2a200}
#helperdot{width:10px;height:10px;border-radius:50%;background:#bbb;margin-left:8px}
#helperdot.ok{background:var(--green)} #helperdot.bad{background:var(--red)}
#claude-status{display:inline-flex;align-items:center;gap:5px;margin-left:10px;font-size:11px;font-weight:600;color:var(--mut);cursor:pointer;user-select:none}
#claude-status .dot{width:9px;height:9px;border-radius:50%;background:#bbb;flex:none}
#claude-status.ok .dot{background:var(--green)} #claude-status.bad .dot{background:var(--red)}
#claude-status.checking .dot{background:var(--amber);animation:cs-pulse 1.1s ease-in-out infinite}
@keyframes cs-pulse{0%,100%{opacity:1}50%{opacity:.25}}
#banner{display:none;background:var(--amber-bg);border-bottom:1px solid #e8d9b0;padding:7px 14px;font-size:13px}
#banner.error{background:var(--red-bg)}
/* ---------- guest session ---------- */
/* A persistent strip, not a toast: a guest CAN edit, and the fact that none of it
   is saved never stops applying, so the notice has to outlive any one dismissal.
   Sits under the menubar, above #banner, drawn only when the host un-hides it. */
#guest-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  background:#eef3fb;border-bottom:1px solid #cddcf0;padding:6px 14px;font-size:12.5px;color:#1b3f6d}
#guest-bar b{color:var(--blue)}
#guest-bar .gb-spacer{flex:1}
#guest-bar a{color:var(--blue);font-weight:600;text-decoration:none;white-space:nowrap}
#guest-bar a:hover{text-decoration:underline}
/* The live count of changes that exist only on this screen. Amber, because it is a
   quantity of work the visitor stands to lose, not a success message. */
#guest-edits{font-weight:700;color:var(--amber)}

main{flex:1;min-height:0;display:flex;flex-direction:column}
.view{flex:1;min-height:0;display:none;overflow:auto}
.view.active{display:flex;flex-direction:column}

/* ---------- welcome ---------- */
#view-welcome{align-items:center;justify-content:center}
#welcome-card{max-width:640px;padding:34px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
#welcome-card h1{margin:0 0 6px;font-size:22px;color:var(--blue)}
#welcome-card .dep{margin:4px 0;font-size:13px}
#welcome-card .dep b{display:inline-block;min-width:110px}
.okmark{color:var(--green);font-weight:700}.badmark{color:var(--red);font-weight:700}
#recent-list{margin-top:10px}
#recent-list a{display:block;padding:4px 0;color:var(--blue);cursor:pointer;text-decoration:none;font-size:13px}
#recent-list a:hover{text-decoration:underline}
.bigbtn{background:var(--blue);color:#fff;border:none;border-radius:6px;padding:9px 18px;font:inherit;font-weight:600;cursor:pointer;margin-top:14px}
.bigbtn:hover{filter:brightness(1.1)}

/* ---------- findings ---------- */
#view-findings{padding:14px 18px}
#findings-summary{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
#findings-summary .stat{font-size:13px;color:var(--mut)}
#findings-summary .stat b{color:var(--ink);font-size:16px}
#findings-filters{display:flex;gap:8px;align-items:center;margin-bottom:8px;font-size:12.5px;flex-wrap:wrap}
#findings-filters select{font:inherit;padding:2px 4px}
#findings-filters label{display:inline-flex;gap:4px;align-items:center;cursor:pointer}
.batch-wrap{position:relative;display:inline-block}
.batch-btn{font:inherit;padding:2px 9px;cursor:pointer;border:1px solid var(--line);border-radius:5px;background:#fff}
.batch-btn:disabled{color:#aaa;cursor:default}
.batch-menu{position:absolute;right:0;top:calc(100% + 3px);z-index:40;background:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 4px 16px rgba(0,0,0,.16);min-width:240px;padding:4px}
.batch-menu button{display:block;width:100%;text-align:left;border:0;background:none;padding:6px 10px;font:inherit;cursor:pointer;border-radius:4px}
.batch-menu button:hover:not(:disabled){background:#f0f4ff}
.batch-menu button:disabled{color:#bbb;cursor:default}
.reeval-badge{display:inline-block;margin-left:6px;font-size:10.5px;background:#fff3d6;color:#8a5a00;border:1px solid #e8d9b0;border-radius:8px;padding:0 5px;vertical-align:middle}
.facet-badge{display:inline-block;margin-left:6px;font-size:10.5px;background:#eef2ff;color:#3a4a8a;border:1px solid #cdd6f5;border-radius:8px;padding:0 5px;vertical-align:middle}
#ff-reeval{background:#fff8e8;border:1px solid #e8d9b0;border-radius:6px;padding:7px 11px;margin-bottom:9px;font-size:12.5px}
#ff-reeval button{margin-left:8px}
tr.frow.grouped td{background:#f4f8ff}
table.findings{width:100%;border-collapse:collapse;font-size:13px}
table.findings th{text-align:left;border-bottom:2px solid var(--line);padding:6px 8px;font-size:12px;color:var(--mut);position:sticky;top:0;background:#fff}
table.findings td{border-bottom:1px solid #eee;padding:6px 8px;vertical-align:top}
tr.frow{cursor:pointer} tr.frow:hover{background:#fafafa}
tr.frow.resolved td{opacity:.55}
tr.fdetail td{background:#fbfbf9;padding:12px 16px}
.fdetail .q{margin:6px 0;padding:7px 10px;border-left:3px solid var(--line);background:#fff;font-size:13px;white-space:pre-wrap}
.fdetail .q.en{border-color:#7da7d9}.fdetail .q.ceb{border-color:#d9a77d}
.seglink{color:var(--blue);cursor:pointer;text-decoration:underline;margin-right:8px;font-size:12.5px}
.resbtns button{margin-right:6px;font:inherit;font-size:12px;padding:3px 10px;border:1px solid var(--line);border-radius:4px;background:#fff;cursor:pointer}
.resbtns button.on{background:var(--ink);color:#fff;border-color:var(--ink)}
/* `.fres` / `.fres-lbl` / `.fres-btn` stood here — the one finding action set
   (Accept fix · Keep as-is · Dismiss · Reopen) drawn by the findings list and by
   the per-segment editor. Both are gone: the decision is the Resolve window now,
   and what a row or a card carries is the RECORD of the answer. The rules are
   removed rather than left behind, because nothing in either host renders those
   classes any more and a stylesheet that dresses elements that do not exist is
   the next reader's false trail. Their replacements are `.f-resolve` /
   `.f-settled` (a list row) and `.fresolved` (a card), both in view-audit.css
   where the surface that draws them lives, and `.avw-*` for the window itself,
   which is below with the dialogs because it is appended to `document.body`. */
.unverified-tag{color:var(--red);font-size:11px;font-weight:700;border:1px solid var(--red);border-radius:3px;padding:0 4px;margin-left:6px}
#synthesis{margin-top:18px;border:1px solid var(--line);border-radius:8px;padding:12px 16px;background:var(--panel);font-size:13px}
#synthesis h3{margin:0 0 8px;font-size:15px}
#synthesis .sum-exec{white-space:pre-wrap;margin-bottom:12px}
#synthesis .sum-cols{display:flex;gap:24px;flex-wrap:wrap}
#synthesis .sum-col{flex:1;min-width:240px}
#synthesis .sum-col h4{margin:0 0 6px;font-size:13px;color:var(--mut);text-transform:uppercase;letter-spacing:.04em}
#synthesis ol.sum-prio{margin:0;padding-left:20px}
#synthesis ol.sum-prio li{margin-bottom:6px;cursor:pointer}
#synthesis ol.sum-prio li:hover{text-decoration:underline}
#synthesis ul.sum-pat{margin:0;padding-left:18px;list-style:none}
#synthesis ul.sum-pat li{margin-bottom:6px}
#synthesis ul.sum-pat li::before{content:"•";color:var(--mut);margin-left:-12px;margin-right:6px}
#synthesis .sum-resolved{color:var(--mut)}
#synthesis .sum-edited{margin-top:12px;padding:8px 10px;border-radius:6px;background:var(--amber-bg);border:1px solid #e8d9b0}
#synthesis details.sum-more{margin-top:12px}
#synthesis details.sum-more>summary{cursor:pointer;color:var(--mut)}
#synthesis details.sum-more .sum-text{white-space:pre-wrap;margin-top:8px}
#synthesis .sum-note{color:var(--mut)}

/* ---------- editor ---------- */
#view-editor{flex-direction:row !important;overflow:hidden}
#edpanel{width:400px;min-width:300px;max-width:80vw;border-right:1px solid var(--line);display:flex;flex-direction:column;overflow:hidden;background:var(--panel)}
#edpanel.hidden{display:none}
/* draggable width handle between the edit panel and the document panes */
#ed-resizer{flex:0 0 6px;align-self:stretch;cursor:col-resize;background:var(--line);transition:background .12s}
#ed-resizer:hover,#ed-resizer.dragging{background:var(--blue)}
#edpanel.hidden + #ed-resizer{display:none}
#edpanel section{padding:10px 12px;border-bottom:1px solid var(--line)}
#edpanel h3{margin:0 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.4px;color:var(--mut)}
/* edit panel: fixed top (nav+actions), then original+translation at their
   natural height (no internal scroll), then notes/findings below which scroll
   independently as needed */
#ed-top{flex:0 0 auto;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel)}
#ed-meta{font-size:11.5px;margin-bottom:6px}
#ed-text{flex:0 0 auto;overflow:visible}
#ed-text section:last-child{border-bottom:none}
#ed-notes-wrap{flex:1 1 auto;min-height:130px;overflow-y:auto;border-top:2px solid var(--line)}
#ed-notes-wrap section{border-bottom:none}
#ed-original{background:#fff;border:1px solid var(--line);border-radius:4px;padding:8px 10px;min-height:40px;font-size:14px}
#ed-quill{background:#fff;border:2px solid var(--line);border-radius:4px}
#ed-quill .ql-editor{min-height:70px;font-size:14px;padding:8px 10px}
/* E2E-005: the compact edit boxes show text at the box's readable size, not the
   run's true point size (a 72pt title shouldn't fill the box). Display-only — the
   run/Quill-delta size & font are preserved for save; faithful point sizes live in
   the big document panes. B/I/U + colour still render (only size/family normalized). */
#ed-original span[style*="font-size"], #ed-quill .ql-editor span[style*="font-size"]{font-size:inherit !important}
#ed-original span[style*="font-family"], #ed-quill .ql-editor span[style*="font-family"]{font-family:inherit !important}
/* Status fill mirroring the segment under edit: the whole translation box is
   tinted (and its border coloured) — red = open findings (flagged),
   amber = not yet reviewed, green = done. */
#ed-quill.ed-stat-flagged{border-color:var(--red);background:var(--red-bg)}
#ed-quill.ed-stat-pending{border-color:var(--amber);background:var(--amber-bg)}
#ed-quill.ed-stat-done{border-color:var(--green);background:var(--green-bg)}
#ed-quill .ql-editor{background:transparent}
/* Matecat-style inline formatting tags: dark labelled chips marking where
   formatting (Bold/Italic/Underline/Color) opens & closes and where special
   spacing (Tab/NBSP) sits. Read-only decorations — dropped on save. */
.fmt-tag{display:inline-block;background:#2c3340;color:#fff;font:600 10px/1.5 -apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing:.02em;padding:0 5px;margin:0 1px;border-radius:3px;vertical-align:1px;white-space:nowrap;
  cursor:default;user-select:none;-webkit-user-select:none}
.fmt-tag.close{background:#5b6472}
.fmt-tag.ws{background:#1a5fb4}
.fmt-tag.style{background:#6b3fa0}
.fmt-tag .fmt-num{display:inline-block;background:rgba(255,255,255,.28);border-radius:2px;
  padding:0 3px;margin-right:4px;font-weight:700}
#ed-notes .note{border:1px solid var(--line);border-left-width:4px;border-radius:4px;background:#fff;padding:7px 9px;margin-bottom:7px;font-size:12.5px}
#ed-notes .note .rec{margin-top:4px;font-style:italic}
#ed-notes .note button{font-size:11.5px;margin-top:5px;padding:2px 8px;cursor:pointer}
#ed-notes .card-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
#ed-notes .card-actions button{margin-top:0}
/* ---- back-translation findings (two registers) ---------------------------
   The chip / track / class / row / caveat classes themselves come from the
   shared assets/view-audit.css, which both hosts load document-wide — one BT
   visual language across the desktop app and the online reviewer, per the P2.1
   convergence rule. Only the note-card chrome is set here. Graded by tier (how
   likely a reader takes the Cebuano the wrong way), never by severity: a
   different scale, so deliberately not a .sevchip. */
#ed-notes .note.card-bt .bt-tech{margin-top:5px}
#ed-notes .note.card-bt .bt-plain{margin:4px 0 0;border:0;padding:0}
#ed-notes .note.card-bt .bt-row{padding:3px 0}
#ed-notes .note.card-bt .bt-row b{color:#55606e;font-weight:600}
#ed-notes .note.card-bt .bt-parity{margin-top:5px}
#ed-notes .note.card-bt-theo{background:#fffdfd}
#ed-notes .note.card-bt .bt-caveats{margin-top:4px}
#ed-notes .scr-cebulb{margin-top:5px;background:#f4f1fb;border-radius:4px;padding:4px 7px}
#ed-notes .scr-diff{margin-top:5px;line-height:1.55}
#ed-notes .scr-held{margin-top:4px;font-size:11.5px}
#ed-notes .occ-walk{margin-top:5px;font-size:11.5px;display:flex;gap:5px;align-items:center}
#ed-notes .d-ins{background:#dff5e0}
#ed-notes .d-del{background:#fde0e0;text-decoration:line-through}
.cbadge{display:inline-block;font-size:10.5px;border:1px solid var(--line);border-radius:9px;padding:0 7px;color:#555;vertical-align:middle}
.cbadge.cb-accepted{background:#e6f6e6;border-color:#9c9}
.cbadge.cb-rejected{background:#fff3cd;border-color:#f0d27a}
#ed-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#ed-actions button{font:inherit;padding:7px 14px;border-radius:5px;border:1px solid var(--line);background:#fff;cursor:pointer}
#ed-actions #btn-save{background:var(--green);border-color:var(--green);color:#fff;font-weight:600}
#ed-actions #btn-save:disabled{background:#a8cfae;border-color:#a8cfae;cursor:default}
#ed-status{font-size:12px;color:var(--mut);margin-top:6px;min-height:1em}
#panes{flex:1;min-width:0;display:grid;grid-template-rows:1fr 26px 1fr}
.pane{overflow:auto;position:relative;background:#fff}
.pane-inner{max-width:900px;margin:0 auto;padding:14px 26px}
#divider{background:var(--panel);border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 14px;font-size:12px;color:var(--mut);cursor:row-resize;user-select:none}
#divider label{cursor:pointer;display:flex;gap:4px;align-items:center}
#divider button{font:inherit;font-size:11.5px;padding:1px 8px;border:1px solid var(--line);border-radius:4px;background:#fff;cursor:pointer;color:var(--ink)}
#divider button:hover{background:#ececea}
#view-editor.panel-right{flex-direction:row-reverse !important}
#view-editor.panel-right #edpanel{border-right:none;border-left:1px solid var(--line)}
/* ---- detached editor regions (assets/popout.js) ----
   The edit panel's drag handle resizes a panel that is no longer here; the
   placeholder that took its place is a one-line strip, not a resizable column. */
#view-editor.popped-edpanel > #ed-resizer{display:none}
#view-editor.popped-edpanel > [data-popout-slot="edpanel"]{flex:none;align-self:flex-start;max-width:320px}
.popout-group{display:inline-flex;align-items:center;gap:5px}
.popout-group .lbl{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut)}
#divider .popout-group button.on{background:var(--accent-soft,#eaf1fb);border-color:var(--blue,#1a5fb4);color:var(--blue,#1a5fb4)}
#ed-nav{display:flex;gap:6px;margin-bottom:8px;align-items:center}
#ed-nav button{font:inherit;font-size:15px;line-height:1;padding:4px 9px;border-radius:5px;border:1px solid var(--line);background:#fff;cursor:pointer}
#ed-nav button:hover{background:#ececea}
#ed-nav button:disabled{opacity:.45;cursor:default}
#ed-nav .nav-sep{flex:1}
#find-panel{display:none;position:fixed;top:84px;right:28px;width:430px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 40px rgba(0,0,0,.3);z-index:60;flex-direction:column;max-height:72vh}
#find-head{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel);cursor:move;font-weight:600;font-size:13px;border-radius:8px 8px 0 0;user-select:none}
#find-head button{font:inherit;font-size:12px;padding:2px 10px;border:1px solid var(--line);border-radius:4px;background:#fff;cursor:pointer}
#find-body{padding:8px 12px;display:flex;flex-direction:column;min-height:0}
#find-body input,#find-body select{font:inherit;padding:5px 8px;border:1px solid var(--line);border-radius:4px}
#find-results{overflow-y:auto;margin-top:6px;min-height:0}
.find-row{padding:6px 8px;border-bottom:1px solid #eee;cursor:pointer;font-size:12.5px;line-height:1.4}
.find-row:hover{background:#f6f6f2}
.find-row mark{background:#ffe58f;padding:0 1px}
.find-row .stchip{display:inline-block;border-radius:8px;padding:0 7px;font-size:10.5px;font-weight:700;color:#fff}

/* ---------- the Resolve window (assets/view-audit.js) ----------------------

   ON `body`, NOT ON THE SURFACE, which is why this lives here and not in
   view-audit.css: the surface's own stylesheet scopes its tokens to
   `[data-av-surface]`, and this element is appended to `document.body`, an
   ANCESTOR of that — the exact trap the --bg note above records. Every colour
   below therefore comes from the global tokens or is written out.

   NOT a <dialog>. `showModal` is shimmed modeless (see the layer note below)
   and this window needs none of what that shim buys — it is not draggable and
   it is not one of the app's windows. It takes the same STACKING as them, which
   is the part that matters: above the content, below the menubar, so a menu
   opened over it still draws on top. */
.avw-scrim{position:fixed;inset:0;z-index:900;background:rgba(0,0,0,.42);
  display:flex;align-items:center;justify-content:center;padding:20px}
.avw-scrim[hidden]{display:none}
.avw{position:relative;z-index:940;width:min(660px,100%);max-height:calc(100vh - 40px);
  display:flex;flex-direction:column;background:var(--bg);color:var(--ink);
  border:1px solid var(--line);border-radius:12px;overflow:hidden;
  box-shadow:0 18px 56px rgba(0,0,0,.3)}
.avw-head{display:flex;align-items:flex-start;gap:12px;padding:15px 18px 12px;
  border-bottom:1px solid var(--line)}
.avw-eyebrow{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);
  font-weight:600;margin-bottom:5px}
.avw-title{margin:0;font-size:17px;font-weight:700;line-height:1.25}
.avw-x{margin-left:auto;flex:none;width:30px;height:30px;font:inherit;font-size:13px;
  border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--mut);cursor:pointer}
.avw-x:hover{color:var(--ink);border-color:var(--mut)}

/* The rail — one dot per issue, ticked as they are answered. Phase 1 says
   "reviewing 3 of 8"; this says the same thing in a shape that can also be
   clicked to go back to one. */
.avw-rail{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 18px;
  background:var(--panel);border-bottom:1px solid var(--line)}
.avw-step{flex:none;width:26px;height:26px;border-radius:50%;font:600 11px/1 ui-monospace,Menlo,monospace;
  border:1.5px solid var(--line);background:var(--bg);color:var(--mut);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center}
.avw-step[aria-current="true"]{border-color:var(--blue);background:var(--blue);color:#fff}
.avw-step.is-done{border-color:var(--green);background:var(--green-bg);color:#14622c}
.avw-step:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.avw-railnote{margin-left:auto;font-size:12px;color:var(--mut)}

.avw-body{flex:1;min-height:0;overflow-y:auto;padding:16px 18px}

/* WHO WROTE THE FLAG. It leads the window because it is the fact the question
   below depends on — a reviewer who cannot see it cannot tell why this issue is
   being put differently from the last one. */
.avw-src{display:flex;align-items:flex-start;gap:9px;font-size:12.5px;line-height:1.5;
  border:1px solid;border-radius:8px;padding:8px 11px;margin-bottom:14px}
.avw-src.is-model{background:#eef3fb;border-color:#c9d9ef;color:#1b3f6d}
.avw-src.is-code{background:#fdf6e7;border-color:#ecdaae;color:#7a5510}
.avw-srcico{flex:none;font-size:14px;line-height:1.35}
.avw-src b{font-weight:600}

.avw-iss{border:1px solid var(--line);border-left:4px solid var(--amber);border-radius:8px;
  background:var(--panel);padding:12px 14px;margin-bottom:16px}
.avw-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.avw-adv{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  border:1px solid #d6cdea;background:#f4f1fa;color:#5b4a86;border-radius:4px;padding:3px 7px}
.avw-text{margin:0 0 8px;font-size:14px;line-height:1.6;white-space:pre-wrap}
.avw-text:last-child{margin-bottom:0}
.avw-extra{margin:0 0 7px;font-size:12.5px;line-height:1.5;color:var(--mut)}
.avw-extra b{color:var(--ink);font-weight:600}
.avw-rec{margin:9px 0 0;font-size:13px;line-height:1.55;color:#1a5fb4;background:#f3f8ff;
  border:1px solid #dbe6f6;border-radius:6px;padding:8px 10px}

.avw-ask{margin:0 0 11px;font-size:11.5px;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--mut)}
.avw-branches{display:grid;gap:10px;margin-bottom:15px}
.avw-branch{border:1.5px solid var(--line);border-radius:10px;background:var(--bg);overflow:hidden}
.avw-branch.is-on{border-color:var(--blue);box-shadow:0 0 0 3px rgba(26,95,180,.12)}
.avw-bbtn{display:flex;align-items:center;gap:11px;width:100%;text-align:left;
  padding:12px 14px;border:0;background:none;font:inherit;color:var(--ink);cursor:pointer}
.avw-dot{flex:none;width:17px;height:17px;border-radius:50%;border:2px solid var(--line)}
.avw-branch.is-on .avw-dot{border-color:var(--blue);background:var(--blue);
  box-shadow:inset 0 0 0 3px var(--bg)}
.avw-blabel{font-size:14.5px;font-weight:600}
.avw-bhint{display:block;font-size:12.5px;font-weight:400;color:var(--mut);margin-top:2px}
/* The follow-on pair appears only under the branch that was chosen: two
   questions on screen at once is how a reviewer answers the wrong one. */
.avw-subs{display:none;gap:8px;flex-wrap:wrap;padding:0 14px 13px 42px}
.avw-branch.is-on .avw-subs{display:flex}
.avw-sub{font:inherit;font-size:12.5px;font-weight:600;padding:8px 15px;border-radius:7px;
  border:1.5px solid var(--line);background:var(--bg);color:var(--mut);cursor:pointer}
.avw-sub:hover{border-color:var(--blue);color:var(--ink)}
.avw-sub[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:#fff}
.avw-subhint{flex-basis:100%;margin:0;font-size:12px;color:var(--mut)}
/* THE DIGIT THAT PRESSES IT, on the thing it presses. `avwDrawKeys` sets the
   attribute from the same read the key handler uses, on every draw, so the hint
   cannot get out of step with what the numbers actually do — and it is drawn
   from the attribute rather than from an element in the button because these
   buttons' `textContent` is the ANSWER, which four suites read. */
.avw-bbtn[aria-keyshortcuts]::after,
.avw-sub[aria-keyshortcuts]::before{
  content:attr(aria-keyshortcuts);flex:none;display:inline-block;
  font:600 10.5px/1 ui-monospace,Menlo,monospace;color:var(--mut);
  border:1px solid var(--line);border-radius:4px;padding:3px 5px;background:var(--panel)}
.avw-bbtn[aria-keyshortcuts]::after{margin-left:auto}
.avw-sub[aria-keyshortcuts]::before{margin-right:6px;vertical-align:1px}
.avw-sub[aria-pressed="true"]::before{border-color:rgba(255,255,255,.45);
  background:rgba(255,255,255,.16);color:#fff}

.avw-notelbl{display:block;font-size:11.5px;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--mut);margin-bottom:7px}
.avw-note{width:100%;font:inherit;font-size:13.5px;line-height:1.55;padding:9px 11px;
  border:1.5px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);resize:vertical}
.avw-note:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px rgba(26,95,180,.12)}

.avw-foot{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 18px;
  border-top:1px solid var(--line);background:var(--panel)}
.avw-foot button{font:inherit;font-size:13px;font-weight:600;padding:9px 15px;border-radius:8px;
  border:1.5px solid var(--line);background:var(--bg);color:var(--mut);cursor:pointer}
.avw-foot button:hover:not(:disabled){border-color:var(--mut);color:var(--ink)}
.avw-foot .avw-go{background:var(--green-bg);border-color:var(--green);color:#14622c}
.avw-foot .avw-go:hover:not(:disabled){filter:brightness(.97);color:#14622c}
.avw-foot button:disabled{opacity:.45;cursor:default}
.avw-count{font:500 12px/1 ui-monospace,Menlo,monospace;color:var(--mut);font-variant-numeric:tabular-nums}
.avw-grow{flex:1}

/* ---- ③ "Why did you change it?" — the Resolve window's frame, eight reasons.
   Several reasons can be true at once (a wrong term is often a meaning error
   too), so these are toggles, not a radio group; the digit on each is the key
   that toggles it. Follow-on details appear only under a chosen reason. */
.dec-win .avw-ask .dec-sub{font-weight:500;text-transform:none;letter-spacing:0;color:var(--mut);margin-left:6px}
.dec-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.dec-r{display:flex;align-items:flex-start;gap:9px;text-align:left;padding:9px 11px;border:1.5px solid var(--line);
  border-radius:9px;background:var(--bg);font:inherit;color:var(--ink);cursor:pointer}
.dec-r:hover{border-color:var(--mut)}
.dec-r:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.dec-rk{flex:none;font:600 10.5px/1 ui-monospace,Menlo,monospace;color:var(--mut);border:1px solid var(--line);
  border-radius:4px;padding:3px 5px;background:var(--panel);margin-top:1px}
.dec-r b{display:block;font-size:13.5px;font-weight:600}
.dec-r .h{display:block;font-size:11.5px;color:var(--mut);margin-top:2px;line-height:1.35}
.dec-r.on{border-color:var(--blue);box-shadow:0 0 0 3px rgba(26,95,180,.12)}
.dec-r.on .dec-rk{background:var(--blue);border-color:var(--blue);color:#fff}
.dec-r.soft b{color:var(--mut)}
.dec-follow{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:-2px 0 14px;padding:9px 11px;
  border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.dec-follow .lbl{font-size:11.5px;font-weight:600;margin-right:4px}
.dec-pill{font:inherit;font-size:12px;font-weight:600;padding:5px 11px;border-radius:7px;
  border:1.5px solid var(--line);background:var(--bg);color:var(--mut);cursor:pointer}
.dec-pill:hover{border-color:var(--blue);color:var(--ink)}
.dec-pill.on{background:var(--blue);border-color:var(--blue);color:#fff}
.dec-pill.doc{border-style:dashed}
.dec-row{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-bottom:6px}
.dec-sp{flex:1}
.dec-sevhint{margin:0 0 14px;font-size:11.5px;color:var(--mut)}
.dec-seg3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.dec-seg3 .dec-r b{font-size:13px}
.dec-was{font-size:12.5px;line-height:1.5;margin:14px 0 8px}
.dec-was b{font-weight:600}
.dec-win .dec-diff{margin:0 0 14px}

@media (max-width:560px){
  .avw-scrim{padding:0;align-items:stretch}
  .dec-grid,.dec-seg3{grid-template-columns:1fr}
  .avw{max-height:100vh;width:100%;border:0;border-radius:0}
  .avw-subs{padding-left:14px}
}
@media (prefers-reduced-motion:reduce){ .avw,.avw-scrim{transition:none} }

/* ---------- dialogs ---------- */
dialog{border:1px solid var(--line);border-radius:10px;padding:0;max-width:680px;width:92%;box-shadow:0 12px 40px rgba(0,0,0,.25)}
dialog::backdrop{background:rgba(0,0,0,.35)}
/* ---- the modeless-modal layer (assets/tms-shell.js) ----
   showModal() is shimmed to open the dialog NON-modally, so that the menubar
   and the bug reporter's button stay reachable while a window is up — under
   the browser's own modal they were in an inert page below an unreachable top
   layer. That trades the top layer for ordinary stacking, which means these
   four values are the whole ordering, and it is deliberate:

     900  the backdrop         dims and blocks the content
     940  the open dialog      above the dim
     950  the menubar          above the dialog, so a dropdown opened while a
                               window is up draws over it rather than under
     2147483000  the reporter's button (assets/bug-reporter.css) — above all
                               of it, always, which is the point of it.

   The dim stops at the menubar rather than covering it. That is the honest
   picture: the menu is the one part of the app that still answers. */
#dlg-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:900}
#dlg-backdrop[hidden]{display:none}
/* The geometry the UA gives a modal and withholds from `show()`: centred in the
   viewport rather than laid out in the flow near the top of the page — but
   centred BELOW THE MENUBAR, which is now above the dialog rather than under
   it. A tall window centred in the whole viewport slides its own title bar,
   drag handle and ✕ under that bar; the Admin one is tall enough to do it, and
   the top layer used to hide the problem by drawing over everything.
   `--tms-menubar-h` is measured by assets/tms-shell.js, because the bar wraps
   to two rows on a narrow window. */
dialog.dlg-modeless[open]{position:fixed;inset:var(--tms-menubar-h,0px) 0 0 0;margin:auto;
  z-index:940;max-height:calc(100vh - var(--tms-menubar-h,0px) - 10px)}
/* Dragged out of the centre — carries `[open]` so it outranks the rule above,
   whose attribute selector would otherwise pull a dropped window back. */
dialog.dlg-modeless.dlg-floating[open]{inset:auto;margin:0}
/* Above the backdrop, and the reason the reader is not stuck. Raised only as a
   stacking context; nothing about the bar's own layout changes. */
#menubar{position:relative;z-index:950}
/* And the toast above all of it, at 960. It was 200 — under the backdrop at 900
   — so every confirmation and every failure the app reported while a window was
   open was painted behind the dim and never seen. That was invisible before
   these dialogs became windows, because the native modal put itself in the top
   layer and nothing could reach past it; making them ordinary elements is what
   turned it into a z-index anyone can read. Above the menubar too, and safe
   there: the toast is pointer-events:none and clears itself after four seconds,
   so it can cover a control without ever taking a press from one. */
dialog .dhead{padding:12px 18px;border-bottom:1px solid var(--line);font-weight:700;font-size:15px;display:flex;justify-content:space-between}
dialog .dhead .x{cursor:pointer;color:var(--mut)}
dialog .dbody{padding:14px 18px;max-height:70vh;overflow-y:auto}
dialog .dfoot{padding:12px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}
/* ---- 3-stage workflow stepper + global status bar (plan §8.2) ---------- */
#workflow-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:5px 12px;background:#fafafa;border-bottom:1px solid var(--line)}
/* ON A DESK IT SHRINKS INSTEAD OF WRAPPING, and this is the half of the bare
   project's two-row spine that dropping the ·empty hints did NOT fix.

   MEASURED, on a project with nothing bound to any phase. The hints took
   `#wf-steps` from 1016 to 782 — real, and not enough: the bar's other child is
   `#wf-next` at **663px**, which is the progress meter 110 + "Nothing to review
   yet — this project has no corpus or audit data." at **424** + "Run it below"
   109 + its two gaps. 782 + 663 + 14 is 1459 against 1256 of usable width at
   1280, so the bar still broke, at 1280, 1366 and 1440.

   §9.14 FOR THE FOURTH TIME THIS RELEASE, and `.wf-next-text`'s own comment is
   what gives it away: it says *"IT CLIPS RATHER THAN PUSHES"* and it carries
   `min-width:0`, `overflow:hidden` and `text-overflow:ellipsis` — all of which
   govern SHRINKING WITHIN A LINE. Flex decides WRAPPING on base sizes, and that
   sentence's base is the whole sentence. So the rule already intended to clip and
   only ever clipped where the line had already been formed.

   `nowrap` IS THE GENERAL FORM and a cap is not. A `max-width` tight enough for
   1280 clips a sentence that fits at 1920, and it would have to be re-chosen
   every time a phase, a chip or a sentence changes; this says what is actually
   wanted — one line, and whatever does not fit ellipses — for any sentence and
   any number of chips. `#wf-steps` has no `min-width:0`, so the pills never
   shrink below their own content and it is the sentence that gives, which is the
   right one to lose.

   FROM 1180 ONLY, because below its minimum a nowrap line OVERFLOWS rather than
   wraps, and content off the right edge is worse than a second row. The minimum
   here is `#wf-steps` + the meter + the button + gaps + padding ≈ 1059px, so
   1180 clears it; phones and tablets are narrower than the query and keep the
   wrapping bar they have. `chrome_ceiling` asserts nothing reaches past the right
   edge at every desk width, which is the guard on that boundary. */
@media (min-width:1180px){ #workflow-bar{flex-wrap:nowrap} }
.wf-steps{display:flex;align-items:center;gap:4px}
.wf-step{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;
  padding:4px 12px;border-radius:14px;background:#ececec;color:#555;cursor:pointer;
  border:1px solid transparent;white-space:nowrap}
.wf-step:hover{border-color:#cdcdcd}
/* ⓪ with nothing in it is a <button> (it opens the New Project flow rather than
   linking at an empty screen), and a button brings the UA's own font, colour and
   padding with it. The rail is one row of identical pills, so it has to shed
   them. */
button.wf-step{font-family:inherit;line-height:inherit;text-align:left;margin:0}
.wf-step.active{background:var(--blue,#1a5fb4);color:#fff}
.wf-step.done{background:#e6f6e6;color:#2a7a2a}
.wf-step.ready{background:#eaf2fb;color:var(--blue,#1a5fb4);border-color:#cfe0f5}
.wf-step.locked{opacity:.55;cursor:not-allowed}
/* NOTHING BOUND TO THIS PHASE, AT ZERO WIDTH. The pill used to say so in words —
   `·empty` on ①②③ and `·add a document` on ⓪ — and on a project with nothing
   bound to any phase, which is every project on its first day, those words were
   280px of a `#wf-steps` measuring **1016px** against 793 for the §11.6 fixture.
   The spine was two rows at 1280, 1366 AND 1440 because of them. Dropped on the
   owner's instruction of 18 Sep.

   A DASHED BORDER RATHER THAN A DIMMING, for two reasons. `.wf-step` already
   reserves `border:1px solid transparent`, so changing its style and colour costs
   NO WIDTH — which is the entire point of the change. And `opacity` is taken:
   `.locked` is .55, and an empty phase can also be locked, so a second dimming
   would have made the two states indistinguishable exactly where both are true.

   AFTER `.ready`, because an empty ⓪ is drawn `ready is-empty` — it is the one
   empty pill the reader can act on — and the dashed edge has to survive that
   rule's own `border-color`.

   AND IT HAS TO GIVE THE HOVER BACK, which the first cut of this comment got
   wrong in the other direction: it claimed `:hover` "still wins, being later
   again", and `.wf-step:hover` is at line 698 while this is at 724. Same
   specificity, later rule wins — so the plain rule silently took the hover
   affordance off every empty pill. Restated as a rule rather than trusted. */
.wf-step.is-empty{border-style:dashed;border-color:#c4c4c4}
.wf-step.is-empty:hover{border-color:#8f8f8f}
/* …EXCEPT WHERE IT IS A LINK, and the difference is not cosmetic. ④ Finalize is
   a <span>: it genuinely cannot be pressed until the walk reaches it, so
   `not-allowed` tells the truth there. ⓪①②③ are <a href> and STAY pressable
   when locked — the lock says "not your turn yet", never "you may not", because
   the panel behind it carries the Complete button that is how a reader gets
   past the phase. A cursor that says otherwise would be the only thing on the
   screen lying about it. */
a.wf-step.locked{cursor:pointer}
a.wf-step.locked:hover{opacity:.8}
/* Advisory, and it has to LOOK advisory. Amber rather than red: nothing here is
   an error and nothing is refused — the sentence's own job is to say so. */
.pj-locknote{color:#8a6d1f;background:#fdf6e3;border:1px solid #e8d9a8;
  border-radius:8px;padding:8px 10px;line-height:1.5}
.pj-locknote a{color:inherit}
.wf-step .wf-tick{font-size:11px}
.wf-sep{color:#bbb;font-size:13px}
/* ‹ Back / Next › — MOVING through the phases, which the rail's pills allow but
   do not ANNOUNCE. Deliberately not pill-shaped: a reader scanning the spine has
   to be able to tell the two apart at a glance, because the pills say where you
   may go and these say which way is on. Square corners, no fill, and a gap from
   the chips they bracket. Disabled at each end rather than removed — a missing
   control reads as an oversight, a greyed one with a tooltip reads as a rule
   (Next stops at ③ because ④ Finalize is reached by walking, not by clicking
   past: bug-260831-075324). */
.wf-nav{font:inherit;font-size:12px;font-weight:600;line-height:1;padding:5px 9px;
  margin:0;border:1px solid var(--line);border-radius:6px;background:#fff;
  color:var(--blue,#1a5fb4);cursor:pointer;white-space:nowrap}
.wf-nav:first-child{margin-right:6px}
.wf-nav:last-child{margin-left:6px}
.wf-nav:hover:not(:disabled){background:#eaf2fb;border-color:#cfe0f5}
.wf-nav:disabled{opacity:.4;cursor:not-allowed;color:var(--mut,#666)}
/* THE SAVED-TO-SERVER PILL, in the one strip that is on every phase. Two states
   and no third: everything on this screen is on the server (green, with when), or
   some of it is not (orange, with how many, and pressing it sends them). Sized as
   a status rather than a control — for the whole of a healthy session it is one —
   and `margin-left:auto` puts it at the far end of the chips, where the reporter's
   screenshots drew it, with `.wf-status` following on its own margin. */
.wf-savepill{font:inherit;font-size:11.5px;font-weight:600;line-height:1.5;
  padding:2px 9px;border-radius:999px;border:1px solid transparent;white-space:nowrap;
  margin-left:auto}
.wf-savepill.is-saved{background:#e8f5ec;border-color:#bfe3c5;color:#1a7f37;cursor:default}
.wf-savepill.is-unsaved{background:#fff4e5;border-color:#fed7aa;color:#9a5700;cursor:pointer}
.wf-savepill.is-unsaved:hover:not(:disabled){background:#ffe9cc}
.wf-savepill:disabled{opacity:.75}
/* `.wf-status` AND ITS SIBLING RULE ARE GONE (§11.1) — the element is not in
   `app.html` any more. `.wf-savepill{margin-left:auto}` above is what pushes the
   right-hand end of the bar now, which is what it already did whenever the pill
   was present. */
/* "Next action" + progress meter — BESIDE the stepper, not under it (§11.1).

   `flex-basis:100%` is what put this on a row of its own, and it was
   unconditional: hiding `#wf-status` alone left the bar at 91px, measured. With
   the basis released it sits after the phase steps and the bar is ONE ROW on
   every screen — 91px -> 43px, which is 48px back on ⓪, ①, ②, ③'s setup and
   ④, and the reason every phase can now start its content at the same 84px.

   `min-width:0` because `.wf-next-text` may carry a live run's sentence, which is
   news and is kept rather than dropped; without it a nowrap sentence would push
   the Finish pill off the end instead of clipping. The dashed rule and the top
   margin went with the row they separated. */
.wf-next{flex-basis:auto;display:flex;align-items:center;gap:10px;margin-left:auto;
  min-width:0}
.wf-next:empty{display:none}
.wf-progress{flex:0 0 110px;height:6px;border-radius:4px;background:#e4e4e4;overflow:hidden}
.wf-progress-fill{display:block;height:100%;background:var(--blue,#1a5fb4);transition:width .3s}
/* IT CLIPS RATHER THAN PUSHES, now that it shares a row. §9 hid it outright on
   the document tab for want of room; there is room on one row, and hiding it
   everywhere would have taken a LIVE RUN's sentence with it — `workerNext`
   replaces this text while a job is queued or running, and that is the one thing
   on the project happening somewhere the reader cannot see. */
.wf-next-text{font-size:12.5px;color:var(--ink,#222);min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.wf-next-text b{font-weight:700}
.wf-next-btn{margin-left:auto;font-size:12px;font-weight:600;padding:4px 13px;border-radius:6px;
  border:1px solid var(--blue,#1a5fb4);background:var(--blue,#1a5fb4);color:#fff;cursor:pointer;
  white-space:nowrap;text-decoration:none;display:inline-block}
.wf-next-btn:hover:not(:disabled){filter:brightness(1.08)}
/* THE GUIDE HAS A GREY STATE, and it is the honest one rather than a missing
   control: on a phase whose processing has not run, there is no review to send
   anybody to, and a live button offering one would say the results exist. So on
   the phase's own setup page — where the dials and Run are in the card below —
   the guide greys out and names the act instead of pointing at a screen that
   holds nothing yet. Same rule the `.wf-nav` ends already follow. */
.wf-next-btn:disabled{background:#fff;color:var(--mut,#666);border-color:var(--line);
  cursor:not-allowed;opacity:.75;filter:none}
/* THE FINISH BUTTON GOES GREEN WHEN THE PHASE'S WORK IS DONE.

   bug-260908-102618: *"I have reviewed all terms in the corpus but the
   completion pop up did not trigger and the top right button did not go
   green."* The strip's Finish button looked identical after the last term as
   before the first, so nothing marked the moment the phase's work finished. The
   rail's pills cannot say it — the phase the reader is standing on paints
   `.active` and nothing else — and this button is the one control the answer is
   actually about, so it carries it. `phaseFinishHtml` sets `.is-ready` off the
   same two-test rule everything else uses (a human said so, or nothing is open),
   minus the half this press exists to record.

   Written for `.wf-fin` rather than for `.wf-next-btn` because the same button
   is drawn in ⓪'s own head bar with the shell's `.btn.primary`, and the state
   means the same thing in both places. */
.wf-fin.is-ready{background:#1f8a3d;border-color:#1a7534;color:#fff}
.wf-fin.is-ready:hover:not(:disabled){background:#1a7534}
/* The finish role is `phaseFinishHtml`, which is one button when the phase is
   open and a ✓/Reopen/hand-off trio once it is closed. The wrapper carries the
   `margin-left:auto` that only a lone `.wf-next-btn` would get, so both shapes
   sit at the same end of the strip. */
.wf-next-fin{margin-left:auto;display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.wf-next-fin .wf-next-btn{margin-left:0}
.wf-next.is-done .wf-next-text{color:#2a7a2a;font-weight:600}
/* ---- Stage-1 / Stage-2 editor screens --------------------------------- */
.stage-wrap{padding:14px 18px;max-width:1100px;margin:0 auto;overflow:auto;height:100%}
.stage-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.stage-head h2{margin:0;font-size:17px}
.stage-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 14px;
  padding:8px 10px;background:var(--panel,#f7f7f5);border:1px solid var(--line);border-radius:6px}
.st1-term{border:1px solid var(--line);border-radius:6px;padding:9px 11px;margin-bottom:8px;background:#fff}
.st1-term.accepted{background:#f1f8f1;border-color:#bfe0bf}
.st1-term.skipped{opacity:.5}
.st1-term .st1-en{font-weight:600}
.st1-term .st1-meta{font-size:11.5px;color:var(--mut,#666);margin:2px 0 6px}
.st1-term .st1-ex{font-size:11.5px;color:#555;border-left:2px solid #e0e0e0;padding-left:7px;margin:3px 0}
.st1-term input.st1-ceb{width:280px;max-width:60%;padding:3px 6px;font-size:13px}
.st2-card{border:1px solid var(--line);border-left:4px solid #6a4ec2;border-radius:6px;
  padding:12px 14px;background:#fff}
.st2-row{margin:6px 0;font-size:13px}
.st2-row .lbl{display:inline-block;min-width:74px;color:var(--mut,#666);font-weight:600;font-size:11.5px}
.st2-tier{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11px;font-weight:600}
.st2-tier.AUTO{background:#e6f6e6;color:#2a7a2a}
.st2-tier.PROPOSE{background:#fdf3e0;color:#b7791f}
.st2-tier.REFUSE{background:#fde8e8;color:#c0392b}
.st2-cebulb{background:#f6f4fb;border-radius:4px;padding:6px 8px;font-size:13px}
.scr-diff .del{background:#fde8e8;text-decoration:line-through;color:#a23}
.scr-diff .ins{background:#e6f6e6;color:#176}
/* ---- Stage-3 audit dashboard ------------------------------------------ */
.st3-empty{border:1px dashed var(--line);border-radius:8px;padding:22px;text-align:center;color:var(--mut,#666);font-size:13px}
.st3-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--mut,#666);margin:2px 0 12px}
.st3-meta b{color:var(--ink,#222);font-weight:600}
.st3-meta .st3-badge{display:inline-block;padding:1px 8px;border-radius:9px;font-weight:600;font-size:11px}
.st3-badge.ok{background:var(--green-bg);color:#2a7a2a}
.st3-badge.warn{background:var(--amber-bg);color:#8a6d00}
.st3-badge.bad{background:var(--red-bg);color:#a33}
.st3-gate-banner{display:flex;align-items:center;gap:12px;border-radius:8px;padding:12px 16px;margin-bottom:14px;font-size:13.5px}
.st3-gate-banner .gi{font-size:22px;line-height:1}
.st3-gate-banner.ok{background:var(--green-bg);border:1px solid #bfe3c5}
.st3-gate-banner.bad{background:var(--red-bg);border:1px solid #ecb7b0}
.st3-gate-banner b{font-weight:700}
.st3-gate-banner .gact{margin-left:auto}
.st3-gate-banner .gact button{font:inherit;font-size:12px;padding:4px 12px;border-radius:5px;border:1px solid #c98;background:#fff;cursor:pointer;font-weight:600;color:#a33}
.st3-sevrow{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.st3-sevchip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:20px;padding:4px 12px 4px 5px;font-size:12.5px;cursor:pointer;background:#fff}
.st3-sevchip:hover{background:#fafafa}
.st3-sevchip .n{min-width:20px;text-align:center;border-radius:9px;padding:1px 7px;font-size:11.5px;font-weight:700;color:#fff}
.st3-sevchip .n-all{background:#555}
/* The back-translation tiers — the other scale a finding can be graded on. Colours
   mirror .bt-tierchip.bt-* in the shared view-audit.css so one grade wears one
   colour wherever it appears. */
/* Unscoped as well as under .st3-sevchip: the always-visible status bar renders a
   solid .sevchip with the same class, and a descendant-only rule left every
   back-translation count there colourless. Pre-existing — the status bar used to
   emit `sev-LIKELY`, which had no rule either — but the confidence bands below DO
   get an unscoped rule, so without this the two scales would look different for
   no reason a reader could work out. */
.st3-sevchip .n-bt-likely,.sevchip.n-bt-likely{background:#b3261e}
.st3-sevchip .n-bt-probable,.sevchip.n-bt-probable{background:#e07020}
.st3-sevchip .n-bt-possible,.sevchip.n-bt-possible{background:#c2a200}
/* Judge-agreement confidence — the scale that replaced the tiers in every list.
   Colours mirror .bt-confchip.conf-* in view-audit.css, same reason. The status
   bar's solid .sevchip uses these too, so a grade reads the same in both rows. */
.st3-sevchip .n-conf-very-high,.sevchip.n-conf-very-high{background:#7f1d1d}
.st3-sevchip .n-conf-high,.sevchip.n-conf-high{background:#b3261e}
.st3-sevchip .n-conf-medium,.sevchip.n-conf-medium{background:#e07020}
.st3-sevchip .n-conf-low,.sevchip.n-conf-low{background:#c2a200}
/* The open count beside the total, shown only when they differ (review D6). Muted and
   lighter than the label so the chip still reads as one thing. */
.st3-sevopen{color:var(--mut);font-size:11.5px}
.st3-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;margin-bottom:16px}
.st3-lens{border:1px solid var(--line);border-left:4px solid #999;border-radius:7px;background:#fff;overflow:hidden}
.st3-lens>.lh{display:flex;align-items:center;gap:9px;padding:9px 11px;cursor:pointer;user-select:none}
.st3-lens>.lh:hover{background:#fafafa}
.st3-lens .li{font-size:16px;line-height:1}
.st3-lens .lname{font-weight:600;font-size:13px}
.st3-lens .lcount{margin-left:auto;font-size:12px;color:var(--mut,#666)}
.st3-lens .lcount b{color:var(--ink,#222)}
.st3-lens .lbody{display:none;border-top:1px solid var(--line);padding:4px 0}
.st3-lens.open{grid-column:1/-1}   /* an expanded lens spans the full row for comfortable rows */
.st3-lens.open .lbody{display:block}
.st3-lens.open>.lh{background:#fafafa}
.st3-frow{display:flex;align-items:center;gap:8px;padding:6px 11px;font-size:12.5px;cursor:pointer;border-bottom:1px solid #f0f0f0}
.st3-frow:last-child{border-bottom:none}
.st3-frow:hover{background:#f6f8fb}
.st3-frow .fseg{color:var(--blue);font-weight:600;min-width:34px}
.st3-frow .fissue{flex:1;min-width:0;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st3-frow .fmore{color:var(--mut,#666);font-size:11px;white-space:nowrap}
.st3-frow .sevchip{flex:none}
.st3-flagship{border:1px solid var(--line);border-radius:8px;background:var(--panel,#f7f7f5);padding:10px 14px;margin-bottom:14px}
.st3-flagship h4{margin:0 0 8px;font-size:13px}
.st3-syn{border:1px solid var(--line);border-radius:8px;background:var(--panel,#f7f7f5);padding:12px 16px;font-size:13px;margin-bottom:6px}
.st3-syn h4{margin:0 0 6px;font-size:13px}
.st3-syn .exec{white-space:pre-wrap;margin-bottom:8px}
.st3-syn .exec code,#synthesis .sum-exec code{background:rgba(0,0,0,.06);border-radius:3px;padding:0 3px;font-size:.92em}
.st3-syn ol{margin:4px 0 0;padding-left:20px}
.st3-syn ol li{cursor:pointer;margin:3px 0}
/* shared (collaborative) audit dialog (E6) */
.sa-row{border:1px solid var(--line);border-radius:6px;padding:8px 10px;margin-bottom:6px;cursor:pointer;background:#fff}
.sa-row:hover{border-color:var(--blue,#1a5fb4);background:#fafcff}
.sa-head{font-size:13px;margin-bottom:8px}
.sa-filters{display:flex;align-items:center;gap:14px;font-size:12.5px;margin-bottom:8px;color:var(--mut)}
.sa-live{font-weight:600}
.sa-f{border:1px solid var(--line);border-left-width:4px;border-radius:5px;background:#fff;padding:8px 10px;margin-bottom:7px;font-size:12.5px}
.sa-f.res-open{border-left-color:var(--blue,#1a5fb4)}
.sa-f.res-fixed,.sa-f.res-accepted{border-left-color:#2a7a2a;opacity:.75}
.sa-f.res-dismissed{border-left-color:#999;opacity:.6}
.sa-f-top{display:flex;align-items:center;gap:7px}
.sa-cat{font-weight:600}
.sa-seg{font-size:11.5px}
.sa-lock{font-size:11.5px;color:#b07d2a}
.sa-issue{margin-top:5px}
.sa-rec{margin-top:3px;font-style:italic;color:#444}
.sa-txt{margin-top:3px;font-size:11.5px;color:#555}
.sa-by{margin-top:4px;font-size:11px}
.st3-syn ol li:hover{color:var(--blue)}
.cb-variants-body table{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:6px}
.cb-variants-body td,.cb-variants-body th{border:1px solid var(--line);padding:3px 6px;vertical-align:top;text-align:left}
dialog .dfoot button{font:inherit;padding:7px 16px;border-radius:5px;border:1px solid var(--line);background:#fff;cursor:pointer}
dialog .dfoot button.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
dialog .dfoot button:disabled{opacity:.5;cursor:default}
.bsv-spin{display:inline-block;width:11px;height:11px;border:2px solid #888;border-top-color:transparent;border-radius:50%;animation:bsv-spin .6s linear infinite;vertical-align:-2px}
@keyframes bsv-spin{to{transform:rotate(360deg)}}
.field{margin-bottom:12px}
.field label{display:block;font-size:12.5px;color:var(--mut);margin-bottom:3px}
.field input[type=text],.field select,.field textarea{width:100%;font:inherit;padding:6px 8px;border:1px solid var(--line);border-radius:4px}
.field textarea{min-height:130px;font-size:12.5px}

/* ---------- numbered steps + bold section dividers (Corpus Builder, Run Audit, Project Corpus) ---------- */
.cb-step{border-top:2px solid #b3b3b3;padding-top:11px;margin-top:13px}
.cb-step:first-of-type{border-top:none;padding-top:0;margin-top:4px}
.cb-step-head{display:flex;align-items:center;gap:8px;font-weight:700;font-size:13.5px;color:var(--ink);margin-bottom:9px}
.cb-step-head .cb-num{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--blue);color:#fff;font-size:12px;font-weight:700;flex:none}
.cb-step-head .cb-sub{font-weight:400;font-size:11.5px;color:var(--mut)}
.cb-step .field{margin-bottom:8px}
.cb-step .field:last-child{margin-bottom:0}
.cb-actions{display:flex;gap:8px 14px;align-items:center;flex-wrap:wrap}
.cb-tools{border-top:2px solid #b3b3b3;margin-top:13px;padding-top:10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cb-tools .cb-toolslabel{font-weight:700;color:var(--ink);font-size:12px}

/* ---------- Generic popup chrome — every <dialog> is movable / resizable / minimizable / closable ----------
   chromeDialog() (JS) tags each dialog with .dlg-chrome and injects a minimize button + drag handle.
   The header drags the window (it becomes .dlg-floating on first drag); the native resize grip lives in
   the bottom-right corner; the minimize button toggles .dlg-min to collapse to just the title bar. */
/* Only style the chrome layout when the dialog is actually open — a closed <dialog>
   must stay display:none (UA default) or it would render on top of everything. */
dialog.dlg-chrome{flex-direction:column;overflow:hidden;resize:both;
  max-width:98vw;max-height:96vh;min-width:340px;min-height:140px}
dialog.dlg-chrome[open]{display:flex}
dialog.dlg-chrome .dbody{max-height:none;flex:1 1 auto;min-height:0}
dialog.dlg-chrome.dlg-floating{position:fixed;margin:0;inset:auto}
dialog.dlg-chrome.dlg-min{resize:none;min-height:0;min-width:0}
/* Step-up password confirmation. Uses the shared dialog chrome above --
   .tms-stepup only adds the input's own layout, nothing structural. */
.tms-stepup .dbody{display:flex;flex-direction:column;gap:6px;min-width:280px}
.tms-stepup .tsu-label{font-size:12px;color:var(--mut)}
.tms-stepup .tsu-pw,.tms-stepup .tsu-code{font:inherit;padding:8px 10px;border:1px solid var(--line);
  border-radius:6px;width:100%;box-sizing:border-box}
/* Two-step on the step-up (Admin::grantStepUp): the app's code, or a passkey. */
.tms-stepup .tsu-2fa{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.tms-stepup .tsu-2fa[hidden],.tms-stepup .tsu-pk[hidden]{display:none}
.tms-stepup .tsu-code{letter-spacing:3px;font-variant-numeric:tabular-nums}
.tms-stepup .tsu-pk{align-self:flex-start;margin-top:4px}
.tms-stepup .tsu-err{color:var(--red);font-size:12px;min-height:1em}

dialog.dlg-chrome.dlg-min .dbody,dialog.dlg-chrome.dlg-min .dfoot,dialog.dlg-chrome.dlg-min .setwin-foot{display:none}
.dhead{cursor:move}
.dlg-minbtn{cursor:pointer;color:var(--mut);font-size:16px;line-height:1;padding:0 8px;user-select:none}
.dlg-minbtn:hover{color:var(--ink)}

/* ---------- Corpus Builder — a full-area in-app view (like the Corpus Editor #view-corpus) ----------
   #view-corpusbuild is a <section class="view"> inside <main>: the menubar stays on top, the steps
   scroll in the middle, and Build Activity is docked as a scrollable panel at the bottom. No window
   chrome — you leave it by switching views from the menubar. */
#view-corpusbuild{padding:0;overflow:hidden}
.cbv-head{flex:none;display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line);background:#fff}
.cbv-head .cbv-title{font-weight:700;font-size:17px;color:var(--ink)}
#view-corpusbuild>.dbody{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;padding:14px 18px}

/* ---------- Edit Corpus — the same full-area chrome, hosting the reusable #ce-editor
   module (shared with dlg-corpusedit). On this page the terms table gets the full
   viewport height instead of the dialog's 52vh cap. */
#view-corpusedit{padding:0;overflow:hidden}
#view-corpusedit>.dbody{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;padding:14px 18px}
#view-corpusedit #ce-tablewrap{max-height:calc(100vh - 290px)!important}
#ced-finalize{font:inherit;font-weight:600;cursor:pointer;padding:6px 14px;border:1px solid var(--blue,#1a5fb4);
  border-radius:6px;background:var(--blue,#1a5fb4);color:#fff}
#ced-finalize:disabled{background:#eef0f3;border-color:var(--line);color:var(--mut);cursor:not-allowed}

/* Build Activity — docked, scrollable panel at the bottom of the view (own height resize) */
#cb-activity{flex:none;height:28vh;min-height:90px;max-height:60vh;display:flex;flex-direction:column;
  border-top:2px solid #b3b3b3;background:var(--panel);overflow:hidden;resize:vertical}
.cbawin-head{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;
  border-bottom:1px solid var(--line);background:var(--panel);font-weight:700;font-size:13px;user-select:none}
.cbawin-head>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cbawin-head .cbawin-ctl{display:flex;gap:6px;flex:none}
.cbawin-head button{font:inherit;font-size:13px;line-height:1;padding:2px 9px;border:1px solid var(--line);
  border-radius:4px;background:#fff;cursor:pointer;color:var(--mut)}
.cbawin-head button:hover{background:#fff;border-color:var(--mut)}
.cbawin-body{padding:10px 12px;display:flex;flex-direction:column;gap:4px;overflow:auto;flex:1;min-height:0}
#cb-activity.cbawin-min{height:auto!important;min-height:0;resize:none}
#cb-activity.cbawin-min .cbawin-body{display:none}
/* Detached (floating) — lifted out of the docked flow into a movable, resizable
   window with its own scrollbars (the .cbawin-body / #cb-results keep overflow).
   Maximized — fills the viewport. Both keep the header controls + drag/close. */
#cb-activity.cbawin-float{position:fixed;left:12vw;top:14vh;width:72vw;height:60vh;z-index:60;
  border:1px solid #9a9a9a;border-radius:8px;box-shadow:0 12px 44px rgba(0,0,0,.30);
  resize:both;max-height:94vh;max-width:98vw;min-width:280px}
#cb-activity.cbawin-float>.cbawin-head{cursor:move}
#cb-activity.cbawin-max{position:fixed!important;left:1.5vw;top:1.5vh;width:97vw;height:95vh;z-index:61;
  border:1px solid #9a9a9a;border-radius:8px;box-shadow:0 12px 44px rgba(0,0,0,.30);resize:none}
#cb-activity.cbawin-float.cbawin-min,#cb-activity.cbawin-max.cbawin-min{height:auto!important;resize:none}

/* ---------- Shared Activity panel (Phase 2 Scripture + Phase 3 Audit) ----------
   The same docked ⇄ float ⇄ maximize ⇄ minimize panel as the Corpus Builder's
   Build Activity (#cb-activity), generalized to a class so Phases 2/3 get the
   identical form/detail. Docked at the bottom of a stage view; the .stage-wrap
   above it scrolls. Reuses the .cbawin-* head/body/state classes verbatim. */
.actwin{flex:none;height:28vh;min-height:90px;max-height:60vh;display:flex;flex-direction:column;
  border-top:2px solid #b3b3b3;background:var(--panel);overflow:hidden;resize:vertical}
.actwin.cbawin-min{height:auto!important;min-height:0;resize:none}
.actwin.cbawin-min .cbawin-body{display:none}
.actwin.cbawin-float{position:fixed;left:12vw;top:14vh;width:72vw;height:60vh;z-index:60;
  border:1px solid #9a9a9a;border-radius:8px;box-shadow:0 12px 44px rgba(0,0,0,.30);
  resize:both;max-height:94vh;max-width:98vw;min-width:280px}
.actwin.cbawin-float>.cbawin-head{cursor:move}
.actwin.cbawin-max{position:fixed!important;left:1.5vw;top:1.5vh;width:97vw;height:95vh;z-index:61;
  border:1px solid #9a9a9a;border-radius:8px;box-shadow:0 12px 44px rgba(0,0,0,.30);resize:none}
.actwin.cbawin-float.cbawin-min,.actwin.cbawin-max.cbawin-min{height:auto!important;resize:none}
/* Dock the panel at the view's bottom: the stage body flexes + scrolls above it
   (parity with #view-corpusbuild's head / dbody / cb-activity column layout). */
#view-stage0>.stage-wrap,#view-stage0doc>.stage-wrap,#view-stage2>.stage-wrap,#view-stage3>.stage-wrap{flex:1 1 auto;min-height:0;height:auto}

/* ---------- Phase 0 · Reconcile — the memory vs. the translated document ----------
   Every class below is prefixed `s0-`, and every id the two views use is `#view-stage0`,
   `#view-stage0doc`, `#st0-*` or `#s0doc-*`. That is a hard constraint, not a preference:
   assets/view-corpus.css owns UNSCOPED `.chip .row .card .tag .warn .bar .actions .evi` and
   assets/view-audit.css owns unscoped `.badge`, both sheets are loaded document-wide by
   user/tms.html, and developer/tests/e2e/css_bleed_guard.cjs (a suite in run_checks.sh)
   fails the build the moment an element outside the corpus/audit surfaces matches one of
   them. The plan's mockups wrote those bare names verbatim, which would have silently
   dressed Phase 0 in the corpus sheet AND broken the gate — hence the prefix on the lot.
   Ids too: `#panes` / `#divider` / `#pane-en` / `#pane-tl` belong to the editor and are
   regexed for adjacency by test_editor_popout.py. */

/* The counts strip. The number is the chip's first child and the caption everything after,
   so a chip needs no per-part class and a state variant recolours the number by position. */
/* The web app's Phase-0 panel draws its own frame, because it renders into
   #view-project rather than into a .stage-wrap: the installed app's phase views
   are <section>s with that chrome around them, and the web app's project view is
   one host element this module fills. Four classes rather than a copy of the
   stage chrome, so nothing here can drift against a layout it does not own. */
/* 1100px was a reading measure borrowed from a column of prose, and this is not
   prose: the row grid is 26px + 140px + 1fr + 260px, so the whole of the width a
   1100px cap gives away comes off the MEMORY cell — the one column here that is
   full sentences. On a 1707px screen that left 600px empty on either side while
   the memory wrapped at forty characters (bug-260830-110553). 92vw is the ~90%
   asked for; the 1600px ceiling keeps a 4K screen from stretching the same four
   columns across two feet of glass. */
.s0-wrap{max-width:min(1600px,92vw);margin:0 auto;padding:14px 16px;display:flex;flex-direction:column;min-height:0}
/* THE READING-COLUMN SCREENS DO NOT SHRINK TO THE VIEW. `#view-project` is a flex
   column with `overflow:auto`, so it is the thing that scrolls — but only if what
   it holds is allowed to be taller than it. `.s0-wrap` is a flex item with the
   default `flex-shrink:1` and `min-height:0`, so the difference list was squeezed
   to exactly the view's height, and every `.s0-rowlist` (a flex item too, and
   `overflow:hidden`, whose automatic minimum height is therefore 0) was squeezed
   with it: on KOT L1 at 1440x900 all four groups were cut mid-row, "Text differs"
   showed 31px of its one 80px row, the last row could not be reached, and the view
   had nothing to scroll. The document view is the one `.s0-wrap` that must fill
   the view and no more, and it says so itself (`.s0-docwrap`, below); every other
   one is sized by its content. */
.s0-wrap:not(.s0-docwrap){flex-shrink:0}
.s0-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.s0-head h2{margin:0;font-size:17px;color:var(--ink)}
.s0-bar{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding-bottom:10px;
  margin-bottom:12px;border-bottom:1px solid var(--line)}
/* The pane view fills the height it is given: the panes scroll, the page does not.
   `width:100%` for the reason set out above `.s0-docwrap` — same inherited auto
   margins, same shrink-to-fit collapse, and this one had it latent too. */
.s0-panewrap{height:100%;max-width:none;width:100%}

/* ---- ⓪'s document view: the ⓪ bar, and the mounted review surface ----------
   The bar is the only part of that screen Phase 0 draws. Everything under
   .s0-surface is a second mount of the shared review surface (view-project.js,
   recMountSurface), so it brings its own stylesheet with it — all this has to do
   is give it a box with a height, which a flex column with min-height:0 does and
   a plain block does not. */
/* ---- ⓪'s full-width screens fill the view; they are not sized by their text --
   `.s0-wrap` centres a reading column with `margin:0 auto`. The two screens
   below override its `max-width` to take the whole view — and inherited the auto
   side margins with it, which is the whole defect.

   `#view-project` is `display:flex; flex-direction:column` (`.view.active`), and
   a flex item with AUTO CROSS-AXIS MARGINS IS NOT STRETCHED: the auto margins win
   over `align-items:stretch`, so the box falls back to shrink-to-fit and is
   centred at whatever width its own content happens to want. These two screens
   were therefore sized by their text rather than by the window.

   WHAT THAT COST (bug-260907-114744: *"WHAT THE HECK IS THIS RENDERED VIEW!!! It
   looks NOTHING LIKE the original plan… I want the view to look like phase 3
   audit. We had this already!!!"*). ⓪ mounts Phase 3's review surface, and that
   surface arranges itself from its OWN measured width via `TMS.fit` — 1450+ is
   `wide`, under 900 is `tablet`, and `inspectorMode()` puts the Inspector across
   the foot rather than beside the document for anything that narrow. On the
   reporter's 1697px window the frozen DOM measured `.s0-docwrap` at **862px**,
   centred with ~418px of dead white on each side, and `[data-av="docview"]`
   accordingly carried `data-w="tablet"`: memory column squeezed to 9px tall,
   Inspector dumped along the bottom, three columns gone. Nothing had been
   redesigned — the page was rendering Phase 3's narrow-screen layout at a third
   of the width it had been given.

   And it corrected ITSELF, which is what made it read as random: ⓪ paints before
   the document's sentence stream arrives, so the memory column starts with a row
   or two and the shrink-to-fit width is small. When the real ~981 sentences land
   the column's max-content grows, the wrap jumps out to the 92vw cap, docview
   re-buckets to `wide`, and the three columns appear — *"after I went two
   sentences on, it switched to the view I was looking for."*

   `width:100%` rather than `margin-inline:0`, because it states the intent
   directly and holds whether the parent is a flex container or not; the auto
   margins are then simply inert. Guarded by
   `developer/tests/e2e/phase0_docwrap_width.cjs`, which fails on a wrap narrower
   than its own parent BEFORE any document has loaded — the state the bug lived
   in and the only one in which it is visible. */
.s0-docwrap{height:100%;max-width:none;width:100%;display:flex;flex-direction:column;min-height:0}
.s0-surface{flex:1;min-height:0;display:flex;flex-direction:column;
  border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
/* The clone is a <section> that was a top-level .view; without .view it has no
   layout of its own, and the surface inside expects to fill its host. */
.s0-surface > [data-p0-surface]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto}
.s0-docbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding-bottom:9px;
  margin-bottom:10px;border-bottom:1px solid var(--line)}
.s0-minichips{display:flex;gap:5px;flex-wrap:wrap}
/* A flex row with a gap, because the chip's parts are now three — the total, the
   kind, and the count still owed an answer — and they used to be two joined by a
   literal space in the markup. Both chip rows are built by one function now
   (recChipHtml), so the separator has to come from here for either to read. */
.s0-minichip{font-size:11px;border:1px solid var(--line);border-radius:9px;padding:1px 8px;
  color:var(--mut);white-space:nowrap;display:inline-flex;align-items:baseline;gap:5px}
.s0-minichip b{color:var(--ink);font-variant-numeric:tabular-nums}
/* The open count, when it differs from the total: quieter than either, because
   it is the qualifier and not the headline. */
.s0-minichip>:first-child~*~*{opacity:.75;font-variant-numeric:tabular-nums}
.s0-minichip.s0-chip-warn{background:var(--amber-bg);border-color:#ecd7a8;color:#8a5600}
.s0-minichip.s0-chip-bad{background:var(--red-bg);border-color:#eec4c4;color:var(--red)}
/* Nothing left owed on this kind. The alarm colour comes OFF — a settled group
   in red keeps claiming work that is done — and the row still shows it, because
   a kind that disappeared would read as a kind that never existed. */
.s0-minichip.s0-chip-ok{background:var(--green-bg);border-color:#bfe3c5;color:#2a7a2a}
.s0-minichip.s0-chip-ok b{color:#2a7a2a}

/* WHAT ⓪ HIDES ON THE SURFACE IT BORROWS. The mount brings the whole review
   surface, and some of it belongs to Phase 3 and says so out loud: an audit
   PICKER (⓪ is pinned to the audit its own differences live on, and switching it
   would silently change which project's document is on screen), the phase filter,
   "Re-run on the server", the audit summary and the findings tab. (The Tools bar
   was on this list until bug-260911-032753 removed it from the surface for
   everyone; ⓪ no longer has it to hide.)
   Hidden here rather than suppressed in view-audit.js
   because none of it is wrong — it is simply not this phase's, and a host that
   borrows a surface should be able to say so without the surface growing a flag
   for every borrower. The Coverage tab stays: those ARE ⓪'s differences. */
[data-p0-surface] [data-av="audit-sel"],
[data-p0-surface] [data-av="a-phase"],
[data-p0-surface] [data-av="av-rerun"],
[data-p0-surface] [data-av="summary"],
[data-p0-surface] [data-av="av-tab-findings"],
/* `[data-av="av-tools"]` was here too. The Tools bar is gone from the surface
   altogether now (bug-260911-032753), so ⓪ has nothing left to hide — a
   selector for a node that no longer exists reads as a rule somebody forgot to
   delete, which is the next reader's wasted minute. */
[data-p0-surface] [data-av="a-recluster"],
[data-p0-surface] [data-av="a-phasefilter"],
[data-p0-surface] [data-av="sync-wrap"],
[data-p0-surface] [data-av="flagged-wrap"]{display:none!important}

/* ⓪ BORROWS THE PAGE, NOT THE PAIR. The surface's two document panes are the
   translation and the ORIGINAL — the same text in two languages — and neither is
   the translation memory. ⓪'s second column is the memory, which it draws
   itself, so the surface is asked for one pane only: the rendered document. The
   Inspector STAYS: it is where a difference is read and answered now that the
   dock along the bottom is gone, so hiding it would leave the screen with no way
   to settle anything. */
[data-p0-surface] .docpane.en,
[data-p0-surface] .av-pdiv,
[data-p0-surface] [data-av="doc-layout"],
[data-p0-surface] [data-av="doc-swap"],
[data-p0-surface] [data-av="insp-side"]{display:none!important}
/* applyPaneSplit writes an inline flex basis for the first pane; with the second
   one gone that basis is what stops the page filling the column. */
[data-p0-surface] .docpane.tl{flex:1 1 auto!important}
[data-p0-surface] .docpane.tl>h3{display:none}

/* ---- the two columns, the handle between them, and the dock ---------------- */
.s0-bpanes{flex:1;min-height:0;display:flex;align-items:stretch}
.s0-bpanes>.s0-surface{min-width:0}
.s0-bdiv{flex:none;width:9px;cursor:col-resize;background:var(--panel);
  border-left:1px solid var(--line);border-right:1px solid var(--line);
  display:grid;place-items:center}
.s0-bdiv>i{display:block;width:3px;height:34px;border-radius:2px;
  background:repeating-linear-gradient(#9a9a96,#9a9a96 2px,transparent 2px,transparent 4px)}
.s0-bdiv:hover,.s0-bdiv[data-drag],.s0-bdiv:focus-visible{background:#dce8f7;border-color:var(--blue)}
.s0-bdiv:hover>i,.s0-bdiv[data-drag]>i{background:repeating-linear-gradient(var(--blue),var(--blue) 2px,transparent 2px,transparent 4px)}
.s0-mem{flex:1;min-width:0;display:flex;flex-direction:column;background:#fcfcfa;
  border:1px solid var(--line);border-radius:8px;overflow:hidden}
.s0-memhead{flex:none;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  color:var(--mut);padding:7px 10px;background:var(--panel);border-bottom:1px solid var(--line)}
.s0-memlist{flex:1;min-height:0;overflow:auto;padding:6px 8px}
/* THE ONLY MARK ON A MEMORY ROW, since the column became TMX text and nothing
   else (bug-260831-112046). The kind chip, the settled note and the English all
   moved to the Inspector; this coloured edge is what is left saying "there is a
   difference here", and the column is scrolled and scanned, so removing it would
   leave a reader stepping through 981 rows to find 23. */
.s0-mrow{padding:7px 9px;border-bottom:1px solid #ececea;font-size:12.5px;line-height:1.5;
  cursor:pointer;border-left:3px solid transparent}
.s0-mrow:hover{background:#f4f6f9}
.s0-mrow.is-on{outline:2px solid var(--blue);outline-offset:-2px;background:#eef4fc}
.s0-mrow.is-settled{opacity:.62}
.s0-mrow.s0-m-in_memory_only,.s0-mrow.s0-m-unplaceable{background:var(--red-bg);border-left-color:var(--red)}
.s0-mrow.s0-m-sentence_boundary{background:var(--amber-bg);border-left-color:var(--amber)}
.s0-mrow.s0-m-page_furniture{background:#f0f0ee;border-left-color:#8a8a86}
.s0-mrow.s0-m-text_differs{border-left-color:var(--line)}
.s0-mghost{color:var(--mut);font-style:italic;font-size:11.5px;line-height:1.45}
/* THE ANNOTATIONS IN THE INSPECTOR — what kind of difference this is, what it
   means, the sentence's English, and the note once it is settled. They were in
   the memory column until "Notes and results shall be in the Inspector section
   ONLY" (bug-260831-112046), and they are dressed quietly here on purpose: the
   Inspector already carries the finding's own text above them, and a second
   loud block would compete with it. */
.s0-inote{margin:6px 0 2px;padding-top:6px;border-top:1px solid var(--line)}
.s0-iblurb{color:var(--mut);font-size:11.5px;line-height:1.45;margin-top:4px}

/* Both of these dressed the memory column until its contents moved to the
   Inspector; they dress the Inspector's own rows now. Kept as the same names
   because they style the same two facts — the document's English under a
   sentence, and a settled row's note — and a second pair of names for one pair
   of facts is how two screens start disagreeing about what green means. */
.s0-men{color:var(--mut);font-size:11.5px;margin-top:3px}
.s0-msettled{display:block;color:var(--green);font-size:11px;margin-bottom:2px}
/* THE ANSWERS ON A MEMORY ROW, for the one class of difference the Inspector
   cannot be pointed at: `in_memory_only` and `unplaceable` name no sentence, so
   there is nothing to select and nothing for the Inspector to draw. One row at a
   time — the one the cursor is on — and dressed quietly, because the row's job is
   still to show the MEMORY and these sit under it. */
.s0-macts{display:flex;gap:6px;flex-wrap:wrap;align-items:center;
  margin-top:7px;padding-top:6px;border-top:1px solid var(--line)}
.s0-macts button{font-size:11.5px;padding:3px 9px}

/* ---- the one arrangement --------------------------------------------------
   ⓪'s memory column and its handle sit INSIDE the surface's own document view,
   so the three columns — page, memory, Inspector — are one flex row and the
   surface's .av-idiv splits the memory from the Inspector. The strip they came
   from is then a single full-width child.

   THERE USED TO BE TWO, chosen by a ▥ Dock / ▤ Inspector toggle. The other one
   was defined by hiding the Inspector in favour of the bar along the bottom;
   that bar is gone, so the toggle's only remaining effect would have been to
   take the reader's way of answering off the screen. `.s0-lay-inspector` and
   `.s0-lay-dock` are gone with it — one arrangement needs no class to select
   it. */
.s0-docwrap .s0-bpanes>.s0-surface{flex:1 1 auto!important}
[data-p0-surface] [data-av="docview"]>.s0-mem{flex:1 1 0;min-width:0;border-radius:0;
  border-top:0;border-bottom:0}
[data-p0-surface] [data-av="docview"]>.s0-bdiv{border-radius:0}
.s0-chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.s0-chip{display:flex;flex-direction:column;gap:2px;min-width:118px;padding:8px 12px;
  border:1px solid var(--line);border-radius:9px;background:#fcfcfa}
.s0-chip>:first-child{font-size:20px;font-weight:600;line-height:1.1;font-variant-numeric:tabular-nums}
.s0-chip>:first-child~*{font-size:11px;letter-spacing:.03em;text-transform:uppercase;color:var(--mut)}
.s0-chip.s0-chip-warn{background:var(--amber-bg);border-color:#ecd7a8}
.s0-chip.s0-chip-warn>:first-child{color:#8a5600}
.s0-chip.s0-chip-bad{background:var(--red-bg);border-color:#eec4c4}
.s0-chip.s0-chip-bad>:first-child{color:var(--red)}
.s0-chip.s0-chip-ok{background:var(--green-bg);border-color:#bfe3c5}
.s0-chip.s0-chip-ok>:first-child{color:#2a7a2a}

/* The dashboard list: severity dot · kind · the text in dispute · the decision buttons.
   The ROWS share one grid so the tags and the buttons stay in column — a row whose
   Cebuano wraps to three lines must not shove its neighbour's buttons sideways.
   THE HEAD IS NOT ON THAT GRID. It is one caption, "In TMX only · 5" (view-project.js
   recRender), not four column labels; on the grid its single text node was the only
   item and landed in the 26px dot column, so every group heading read one word per
   line. It spans the list as a plain block, and a long label wraps at the list's
   width instead. */
.s0-rowlist{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.s0-row{display:grid;grid-template-columns:26px 140px 1fr 260px;gap:10px;padding:7px 11px;align-items:start}
.s0-rowhead{display:block;padding:7px 11px;background:#f4f4f1;border-bottom:1px solid var(--line);font-size:11px;
  letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
.s0-row{border-bottom:1px solid #efefe9;font-size:12.5px;cursor:pointer}
.s0-row:last-child{border-bottom:none}
.s0-row:hover{background:#fafafa}
.s0-row.is-sel{background:#eef3fb}
/* The severity dot, in the same four colours as the status bar's .sev-* chips so one
   severity wears one colour on every screen. MINOR is the base grey — most reconcile rows
   are MINOR, and giving the commonest case its own rule would say something it does not. */
.s0-sev{display:block;width:9px;height:9px;margin-top:5px;border-radius:50%;background:#8a8a8a}
.s0-sev.s0-sev-CRITICAL{background:#7f1d1d}
.s0-sev.s0-sev-HIGH{background:#b3261e}
.s0-sev.s0-sev-MODERATE{background:#e07020}
/* Kind tags. The suffix IS the row's `kind` from /api/reconcile/pairs, so the renderer can
   write 's0-tag s0-tag-' + row.kind with no lookup table to drift out of date, and an
   unknown kind falls back to the neutral tag instead of rendering unstyled. `unplaceable`
   shares `in_memory_only`'s red for the severity, not the reason: that one is document
   text no sentence could be built from, so no review pass has read it and an edit to it
   would not reach the export. Colours pair with the .s0-seg states below. */
.s0-tag{display:inline-block;padding:1px 6px;border-radius:4px;background:#efefe9;color:#55595e;
  font-size:10.5px;letter-spacing:.05em;text-transform:uppercase}
.s0-tag.s0-tag-in_memory_only,.s0-tag.s0-tag-unplaceable{background:var(--red-bg);color:var(--red)}
.s0-tag.s0-tag-sentence_boundary{background:var(--amber-bg);color:#8a5600}
.s0-tag.s0-tag-page_furniture{background:#e8eefb;color:#2c4a7c}
.s0-tag.s0-tag-in_document_only{background:var(--green-bg);color:#2a7a2a}
.s0-tag.s0-tag-text_differs{background:#f4f1fb;color:#553d8c}
/* A project whose memory and document already agree still has a Phase 0. It says so here,
   rather than showing an empty list that reads as a failed load (mirrors .st3-empty). */
.s0-empty{border:1px dashed var(--line);border-radius:8px;padding:22px;text-align:center;color:var(--mut);font-size:13px}
/* Decision buttons, shared by the list rows and the pane view's evidence bar. Only the
   settle-as-it-stands action is primary — "Decide later" must never look recommended. */
.s0-row button,.s0-evidence button{font:inherit;font-size:12px;padding:4px 12px;
  border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--ink);cursor:pointer}
.s0-row button:hover:not(:disabled),.s0-evidence button:hover:not(:disabled){background:#ececea}
.s0-row button:disabled,.s0-evidence button:disabled{opacity:.5;cursor:default}
.s0-row button.s0-primary,.s0-evidence button.s0-primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.s0-row button.s0-primary:hover:not(:disabled),.s0-evidence button.s0-primary:hover:not(:disabled){background:var(--blue);filter:brightness(1.08)}

/* ---- the pane pair (#view-stage0doc): left = the translation memory, right = the
   translated .docx, one visual row per stream position on both sides ----
   A two-COLUMN grid, deliberately not #panes: that one is a three-ROW grid whose divider is
   a row-resize drag handle, and applyPaneRows() assumes rows. Here the pair is read across,
   and its divider is a control strip that must never start a drag.
   The floor is 320px rather than min-height:0 because the pair sits inside a scrolling
   .stage-wrap, where a grid told it may be zero tall collapses to nothing on the first
   paint — before any pair has been appended — and the reviewer sees a blank strip. */
.s0-panes{flex:1 1 auto;display:grid;grid-template-columns:1fr 1fr;min-height:320px;overflow:hidden}
.s0-pane{overflow:auto;position:relative;padding:10px 12px;background:#fff}
.s0-pane+.s0-pane{border-left:1px solid var(--line)}
.s0-panetitle{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px;
  font-size:11px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--mut)}
/* The control strip above the panes: the sync lock, the Differences only / All segments
   filter, the ‹ N / M › jump and the legend. */
.s0-divider{flex:none;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:5px 12px;
  background:var(--panel);border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  font-size:11.5px;color:var(--mut);user-select:none}
.s0-divider label{display:flex;align-items:center;gap:4px;cursor:pointer}
.s0-divider button{font:inherit;font-size:11.5px;padding:1px 8px;border:1px solid var(--line);
  border-radius:4px;background:#fff;color:var(--ink);cursor:pointer}
.s0-divider button:hover{background:#ececea}
.s0-divider select{font:inherit;font-size:11.5px;padding:1px 4px;border:1px solid var(--line);
  border-radius:4px;background:#fff;color:var(--ink)}
.s0-divider b{color:var(--ink);font-variant-numeric:tabular-nums}
/* One row of a stream. The state names WHICH SIDE is short, because that is the thing being
   decided: is-missing = one side has it and the other does not (in_memory_only, where the
   memory is the side that has it; unplaceable, where the document is); is-extra = the document has it and the memory does not (in_document_only);
   is-boundary = one sentence in the document where the memory has two; is-furniture =
   header / footer / note; is-differs = both sides have it, worded differently (text_differs,
   which carries no finding id and so no buttons in v1 — hence the quieter register). */
.s0-seg{margin-bottom:3px;padding:5px 8px;border:1px solid transparent;border-radius:6px;font-size:12.5px;cursor:pointer}
.s0-seg.is-missing{background:var(--red-bg);border-color:#eec4c4}
.s0-seg.is-differs{background:#f4f1fb;border-color:#d9d0ee}
.s0-seg.is-extra{background:var(--green-bg);border-color:#bfe3c5}
.s0-seg.is-furniture{background:#e8eefb;border-color:#c9d8f0}
.s0-seg.is-boundary{background:var(--amber-bg);border-color:#ecd7a8}
.s0-seg.is-on{outline:2px solid var(--blue);outline-offset:-2px}
.s0-seg:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
/* Dimmed, never hidden: "All segments" only stays honest if the pairs that agree keep their
   place in the stream, because the scroll sync and the twin lookup are both index-based. */
.s0-seg.is-dim{opacity:.42}
/* The twin that does not exist. Hatched so it is never mistaken for text you could read or
   edit — it holds the position the missing sentences would occupy, which is what keeps
   pair[i] on the left facing pair[i] on the right. */
.s0-ghost{margin-bottom:3px;padding:5px 8px;border:1px dashed #eec4c4;border-radius:6px;
  font-size:11.5px;color:var(--red);
  background:repeating-linear-gradient(135deg,#fdf2f2,#fdf2f2 6px,var(--red-bg) 6px,var(--red-bg) 12px)}
/* A ghost takes the same two states as the .s0-seg it faces, because the renderer puts them
   on BOTH twins and a state that lands on only one of a pair is worse than no state at all.
   is-dim is the one that was actually visible: under "All segments" every pair that agrees is
   dimmed, and a segment the memory never held has a ghost on its LEFT — so the document side
   faded to .42 while the hatched block beside it stayed at full strength, which reads as the
   quiet row being the loud one. */
.s0-ghost.is-on{outline:2px solid var(--blue);outline-offset:-2px}
.s0-ghost.is-dim{opacity:.42}
/* The decision bar under the panes: what the selected row is (<b>), one line of evidence
   (<span>, which takes the slack so the buttons stay right-aligned), then the buttons. */
.s0-evidence{flex:none;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:9px 12px;
  border-top:1px solid var(--line);background:#fafaf8;font-size:12.5px}
.s0-evidence b{color:var(--ink)}
.s0-evidence span{flex:1;min-width:180px;color:var(--mut)}
/* Narrow windows: the pair stops sharing the width and stacks, at the same 980px break the
   corpus surface uses (assets/view-corpus.css) so the app has one narrow layout, not two.
   Below it each pane would hold under 460px, and a Cebuano sentence wraps three times in
   that — two half-legible columns are worse than one legible one above another. */
@media (max-width:980px){
  .s0-panes{grid-template-columns:1fr;grid-template-rows:1fr 1fr}
  .s0-pane+.s0-pane{border-left:none;border-top:1px solid var(--line)}
}

/* ---------- unified Settings / Admin window ---------- */
dialog.setwin{max-width:980px}
/* THE WIDTH OF THE SCREEN, ON THE DESK (bug-260928-003848). The owner: "Lets just
   make the admin popup the width of the screen, and if there is content that
   exceeds the screens horiz widht lets have a horiz scroll bar for it." The 980px
   cap above left a 709px pane on a 1697px window, and Pay ▸ Rates is 954px wide.
   The tablet keeps the cap (tablet.css scrolls each pane itself) and the phone
   overrides every dialog to 100vw with !important (mobile.css).

   AND THE SIDEWAYS SCROLL IS THE PANE'S. `.pay-scroll` scrolled the card inside
   its own box, whose scrollbar sat at the bottom of a 750px table — below what
   the pane showed, so the reader saw columns cut off and no bar. In this window
   the overflow reaches `.setwin-body` instead, whose bottom edge is on screen.
   Scoped to this window: `.pay-scroll` keeps its own scroll everywhere else,
   the phone's pay screens included. */
html:not(.tms-tablet):not(.tms-mobile) dialog.setwin{width:calc(100vw - 24px);max-width:none}
html:not(.tms-tablet):not(.tms-mobile) #dlg-admin .pay-scroll{overflow-x:visible}
.setwin .dbody{padding:0;max-height:78vh;display:flex;overflow:hidden}
.setwin-nav{flex:0 0 196px;background:var(--panel);border-right:1px solid var(--line);padding:10px 8px;display:flex;flex-direction:column;gap:1px;overflow-y:auto}
.setwin-nav .nav-group{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:var(--mut);margin:14px 10px 4px;font-weight:700}
.setwin-nav .nav-group:first-child{margin-top:2px}
.setwin-nav button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;border:none;background:none;font:inherit;font-size:13px;color:var(--ink);padding:7px 10px;border-radius:6px;cursor:pointer}
.setwin-nav button:hover{background:#ececea}
.setwin-nav button.active{background:var(--blue);color:#fff;font-weight:600}
.setwin-nav button .ico{font-size:14px;width:17px;text-align:center;flex:none}
.setwin-body{flex:1;min-width:0;padding:18px 22px;overflow-y:auto;overflow-x:auto}
.setwin-body h3{margin:0 0 2px;font-size:16px}
.setwin-body .pane-sub,#dlg-projmgmt .pane-sub{color:var(--mut);font-size:12.5px;margin:0 0 16px}
.pm-tabs{display:flex;gap:6px;margin:0 0 16px;border-bottom:1px solid var(--line);padding-bottom:10px}
.pm-tabs button{font:inherit;font-size:13px;padding:6px 15px;border:1px solid var(--line);background:var(--panel);border-radius:7px;cursor:pointer;color:var(--ink)}
.pm-tabs button.active{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.pm-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.pm-toolbar input[type=search]{flex:1;min-width:190px;font:inherit;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}
.pm-toolbar select{font:inherit;padding:5px 8px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}
.pm-toolbar label{font-size:12px;color:var(--mut);display:flex;gap:5px;align-items:center}
.pm-row{border:1px solid var(--line);border-radius:9px;margin:6px 0;overflow:hidden;background:var(--panel)}
.pm-row-head{display:flex;gap:10px;align-items:center;padding:9px 12px;cursor:pointer}
.pm-row-head:hover{background:rgba(127,127,127,.08)}
.pm-caret{width:12px;display:inline-block;transition:transform .12s;color:var(--mut);font-size:11px}
.pm-row.open .pm-caret{transform:rotate(90deg)}
.pm-row-title{flex:1;font-weight:600}
.pm-badge{font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px;background:var(--line);color:var(--ink);white-space:nowrap}
.pm-badge.all{background:#1a7f37;color:#fff}
.pm-badge.arch{background:#8a6d00;color:#fff}
.pm-row-mini{font-size:11.5px;color:var(--mut);white-space:nowrap}
.pm-row-body{display:none;padding:8px 14px 14px;border-top:1px solid var(--line)}
.pm-row.open .pm-row-body{display:block}
.pm-phase{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:9px 0;border-bottom:1px dashed var(--line)}
.pm-phase:last-child{border-bottom:0}
.pm-phase-name{min-width:158px;font-weight:600;font-size:12.5px}
/* ③'s review rounds sit indented under Phase 3: part of it, not phases after it. */
.pm-phase.pm-round{padding-left:22px;background:linear-gradient(90deg,rgba(26,95,180,.05),transparent 60%)}
.pm-phase.pm-round .pm-phase-name{min-width:136px}
.pm-round-add{gap:12px}
.pm-rstate{font:600 10.5px/1.7 -apple-system,Segoe UI,Roboto,Arial,sans-serif;padding:0 7px;border-radius:9px;
  border:1px solid;white-space:nowrap;margin-right:6px}
.pm-rstate.run{color:#1a5fb4;background:#eaf2fb;border-color:#cfe0f5}
.pm-rstate.wait{color:#6a7280;background:#f3f4f6;border-color:#e1e3e8}
.pm-rstate.done{color:#14622c;background:#e6f6e6;border-color:#bfe3c4}
.pm-rstate.skip{color:#8a6d1f;background:#fdf6e3;border-color:#e8d9a8}
.pm-phase-meta{flex:1;min-width:140px;font-size:12px;color:var(--mut)}
/* A phase with something actually bound (a corpus, a published audit) gets called
   out as a card — tinted, accent-barred, edge-to-edge — so the one action worth
   taking in this row (Open …) isn't just another line of muted text. The -14px
   margin bleeds it to .pm-row-body's own 14px side padding. */
.pm-phase.pm-phase-ready{background:#eaf1fb;margin:4px -14px 0;padding:13px 14px 13px 18px;border-radius:8px;border-bottom:none;border-left:4px solid var(--blue)}
.pm-assignees{font-size:11.5px;color:var(--ink)}
#pm-assign-users label{display:flex;gap:8px;align-items:center;padding:4px 4px;font-size:13px;cursor:pointer;border-radius:5px}
#pm-assign-users label:hover{background:rgba(127,127,127,.08)}
/* THE PHASE PANEL'S MEASURE (bug-260831-112750). The panel used to be a fixed
   560px column written inline in view-project.js, so a 1707px screen drew the
   same 545px of form a 707px one did, with the dropdowns clipped. Held here
   rather than inline because the width and the controls inside it have to agree:
   widening the column achieves nothing while every select is still capped at
   380px, which is the pair of facts that produced "many dropdowns that have
   their options not visible".

   The ceiling is lower than ⓪'s 1600px on purpose — see the note at the call
   site: ⓪ is panes of text, this is a form. */
.pj-panel{max-width:min(1180px,92vw);margin:48px auto;text-align:center;color:var(--mut)}
/* Sized to their own longest option rather than to a number somebody picked.
   Scoped to the panel so the admin screens, which share `.set-row`, keep the
   tidy fixed column that suits a page of short values. */
.pj-panel .set-row .ctl select{width:auto;max-width:100%}
.pj-panel .set-row .ctl input[type=text],
.pj-panel .set-row .ctl input[type=number]{max-width:520px}
/* The stage table gets the room too: at 560px its four columns were what forced
   the model and effort selects narrow in the first place. */
.pj-panel #cb-stage-row .ctl table{width:100%}

/* ======================================================================
   THE PHASE PAGE AS A NUMBERED WALK  ·  .pj-steps / .pj-step / .pj-monitor
   ======================================================================

   *"I want you to walk the full audit process and each page and clearly
   seperate each step, number each, put a border around each, and organize the
   page to route the user clearly from first step to last on the page."*

   WHAT WAS THERE BEFORE. Every phase page was a stack of `.set-card`s — a
   1px hairline, an uppercase 10.5px caption, no number and no order stated
   anywhere. Phase 3 put "what is ready", "the dials", and the Run button in ONE
   card, so the three beats the whole workflow is built on (set up · run ·
   review) were three regions of one box; Phase 1 drew four cards with no
   numbers and no way to tell which came first. The reader had to infer the
   sequence from the prose.

   THE NUMBER IS TEXT, written by `numberSteps()` in one pass over the finished
   page — not by each builder, and not by a CSS counter. Not by each builder
   because a page's steps come from four of them (docImportHtml, corpusBindHtml,
   the phase card, the review step) and several are conditional, so the first
   absent step would put two 3s on one page. Not by a counter because generated
   content cannot be read by a screen reader or by a test, and this number is
   information rather than decoration.

   THE ARROW BETWEEN STEPS is what "route the user from first to last" asks for
   in the only place it can be said without words. */
/* THE CORPUS BUILDER'S RAIL (§6.4). The walk's overview: seven beats over a
   ~3000px stack, so a reader four cards down can still see where they are and
   what is left. `#cbi-rail`-scoped throughout — `.pj-step` is shared with the
   phase panels, and nothing here may reach them.

   `cbi-`, NOT `cb-`, AND THAT IS NOT A STYLE PREFERENCE. `cb-` is already taken:
   `.cb-step`, `.cb-step-head`, `.cb-num`, `.cb-sub` and `.cb-variants-body` below
   belong to the project rail's corpus-build card, and `view-project.js` builds
   ids from a bare `'cb-'`. The first cut of this rail took `cb-rail` / `cb-beat`
   and `test_corpus_builder_independent`'s prefix sweep caught it — that guard
   exists because two surfaces share one generator and `getElementById` answers
   with whichever card came first.

   STICKY UNDER THE STRIP, which is what makes it an overview rather than a
   heading; `z-index` stays under `#menubar`'s 950 so the menus still open over
   it. The state classes are the CARDS' own (`is-done` / `is-now` / `is-todo` /
   `is-optional`), copied across in `paintWalk`'s one pass, so a beat and its
   card cannot disagree. */
.cbi-rail{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:2px;
  flex-wrap:wrap;margin:0 0 14px;padding:7px 2px;background:var(--panel,#f7f7f5);
  border-bottom:1px solid var(--line)}
.cbi-rail:empty{display:none}
.cbi-beat{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:12.5px;
  font-weight:600;line-height:1;padding:5px 9px;border:1px solid transparent;
  border-radius:7px;background:none;color:var(--ink,#222);cursor:pointer}
.cbi-beat:hover{border-color:#cdcdcd;background:#fff}
.cbi-beat-n{flex:none;width:19px;height:19px;border-radius:50%;background:var(--blue,#1a5fb4);
  color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;
  justify-content:center;font-variant-numeric:tabular-nums}
.cbi-beat-sep{color:#bbb;font-size:12px;user-select:none}
.cbi-beat.is-done{background:#e6f6e6;color:#2a7a2a}
.cbi-beat.is-done .cbi-beat-n{background:#2a7a2a}
.cbi-beat.is-now{background:#eaf2fb;color:var(--blue,#1a5fb4);border-color:#cfe0f5}
/* A beat still to do is dimmed, NEVER hidden — the same rule `.pj-step.is-todo`
   follows, and for the same reason: the page has to show where the walk ends. */
.cbi-beat.is-todo{opacity:.62}
.cbi-beat.is-todo .cbi-beat-n{background:#fff;color:var(--mut,#666);box-shadow:inset 0 0 0 1px var(--line)}
/* Optional work reads at full strength, because a reader skipping it should be
   doing so on purpose (bug-260909-033532, the same call the cards make). */
.cbi-beat.is-optional.is-todo{opacity:1}
/* AND IT DOES NOT PRINT THE WORD "OPTIONAL", because the cards do not. A first
   cut put ` · optional` after four of the seven labels: it added a vocabulary
   the surface it summarises does not use, repeated the same word four times,
   and the extra ~208px wrapped the rail onto a second row at 1280. The word is
   in each beat's `title`, where the step's own subtitle already says it in
   prose — "Free. Read the set before you spend anything on it." */
.pj-steps{text-align:left;display:flex;flex-direction:column}
.pj-step{border:2px solid var(--line);border-radius:11px;
  background:#fff;overflow:hidden}
/* The connector. On the step BELOW the gap, so the first step has none. */
.pj-step + .pj-step{margin-top:28px;position:relative}
.pj-step + .pj-step::before{content:"\2193";position:absolute;left:20px;top:-25px;
  font-size:17px;line-height:1;color:var(--mut);opacity:.8}
.pj-step-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  padding:10px 14px;background:#fafaf8;border-bottom:1px solid var(--line)}
.pj-step-n{flex:none;align-self:center;width:25px;height:25px;border-radius:50%;
  background:var(--blue,#1a5fb4);color:#fff;font-size:13px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;
  font-variant-numeric:tabular-nums}
.pj-step-t{font-size:14px;font-weight:700;color:var(--ink)}
.pj-step-sub{font-size:12px;color:var(--mut);flex:1;min-width:120px}
.pj-step-body{padding:12px 15px 15px}
/* A step whose work is behind it. `numberSteps` writes a tick into the badge
   instead of the digit, and goes on counting the step — renumbering the ones
   after it the moment a run finished is the one thing a numbered walk must not
   do. */
.pj-step.is-done{border-color:#bfe3c5}
.pj-step.is-done .pj-step-n{background:#2a7a2a}
.pj-step.is-done .pj-step-head{background:var(--green-bg,#eef7ef)}
/* A step that cannot be worked yet — drawn, never hidden, so the page always
   shows the whole walk and where it ends. */
.pj-step.is-todo{border-color:var(--line);opacity:.72}
/* bug-260909-033532 — a step the walk does not require (①'s coverage probe,
   every phase's dials) is available now, not later. It keeps the plain frame
   of a step that is not the current one and loses the fade that says "not
   yet", which on a form full of live controls reads as "disabled". */
.pj-step.is-todo.is-optional{opacity:1}
.pj-step.is-todo .pj-step-n{background:#fff;color:var(--mut);
  box-shadow:inset 0 0 0 1px var(--line)}
/* Where the reader is. */
.pj-step.is-now{border-color:var(--blue,#1a5fb4)}
.pj-step.is-now .pj-step-head{background:#eaf2fb}
/* The cards that used to draw their own frame now sit INSIDE one, so their
   border and their caption would be a second box around the first. */
.pj-step-body>.set-card,.pj-step-body>.card{border:0;border-radius:0;padding:0;
  margin:0;background:transparent}
.pj-step-body>.set-card>.card-title,.pj-step-body>.card>.card-title{display:none}
.pj-step-body>.set-card>.set-row:first-child{border-top:none}

/* ---- the run monitor: progress, log and AI calls, at the foot of the page ---
   *"On the processing pages, put the progress bar and detailed logging and AI
   calls live scrolling in expandable bars on the bottom."*

   BELOW THE STEPS AND OUTSIDE THEM, because it is not a step: it is what the
   page shows WHILE a step is executing, and it stays useful after the run for
   reading back what happened. Each bar mounts its own feed when it is opened
   and drops it when it is closed — three pollers against a shared vault for a
   panel nobody has expanded is traffic nobody reads. */
.pj-monitor{margin-top:30px;padding-top:14px;border-top:2px solid var(--line);
  text-align:left}
.pj-monitor-head{font-size:11px;letter-spacing:.5px;text-transform:uppercase;
  font-weight:700;color:var(--mut);margin-bottom:8px}
.pj-bar{border:1px solid var(--line);border-radius:9px;background:#fff;margin-top:8px}
.pj-bar>summary{cursor:pointer;list-style:none;padding:9px 13px;font-size:13px;
  font-weight:600;color:var(--ink);display:flex;align-items:center;gap:9px;
  flex-wrap:wrap}
.pj-bar>summary::-webkit-details-marker{display:none}
.pj-bar>summary::before{content:"\25B8";color:var(--mut);font-size:11px;flex:none}
.pj-bar[open]>summary::before{content:"\25BE"}
.pj-bar[open]>summary{border-bottom:1px solid var(--line)}
.pj-bar>summary .pj-bar-note{font-weight:400;font-size:12px;color:var(--mut);
  flex:1;min-width:100px}
.pj-bar-body{padding:11px 13px}
/* The live tapes. Fixed height and their own scrollbar — a log that grows the
   page pushes the steps above it off screen while a reader is still using them. */
.pj-tape{max-height:32vh;overflow:auto;margin:0;padding:7px 9px;
  background:var(--bg2,#f6f7f8);border:1px solid var(--line);border-radius:5px;
  font:11.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  white-space:pre-wrap}
.pj-calls{max-height:38vh;overflow:auto}
/* ⓪'s import bar. INDETERMINATE, because the import reports messages and no
   total — `npWatchJob` reads `progress.msg` and there is nothing to divide by.
   A percentage invented from the number of messages seen would be the screen
   reporting something it has not measured, which is the one thing the run
   card's own scale note refuses to do. */
.np-prog{height:8px;border-radius:4px;background:var(--line);overflow:hidden;position:relative}
.np-prog>span{position:absolute;top:0;bottom:0;left:0;width:34%;border-radius:4px;
  background:var(--blue,#1a5fb4);opacity:.25}
.np-prog.is-live>span{opacity:1;animation:np-slide 1.5s ease-in-out infinite}
@keyframes np-slide{0%{left:-34%}100%{left:100%}}
@media (prefers-reduced-motion:reduce){.np-prog.is-live>span{animation:none;left:0;width:100%;opacity:.55}}
/* Read, and finished. The resting state is a faint third of a bar, which on a
   completed import reads as stuck a third of the way through. */
.np-prog.is-done>span{left:0;width:100%;opacity:1;background:#2a7a2a;animation:none}

.set-card{border:1px solid var(--line);border-radius:9px;padding:6px 16px;margin-bottom:14px;background:#fff}
.set-card>.card-title{font-size:10.5px;letter-spacing:.5px;text-transform:uppercase;color:var(--mut);font-weight:700;padding:10px 0 2px}
.set-row{display:flex;align-items:flex-start;gap:14px;padding:9px 0;border-top:1px solid #f0f0ee}
.set-card>.card-title+.set-row,.set-card>.set-row:first-child{border-top:none}
.set-row .lbl{flex:0 0 230px;font-size:13px;padding-top:6px}
.set-row .lbl .hint{display:block;font-size:11.5px;color:var(--mut);margin-top:2px;font-weight:400;line-height:1.35}
.set-row .ctl{flex:1;min-width:0}
.set-row .ctl input[type=text],.set-row .ctl input[type=number],.set-row .ctl input[type=email],.set-row .ctl input[type=password],.set-row .ctl select{width:100%;max-width:380px;font:inherit;padding:6px 8px;border:1px solid var(--line);border-radius:5px}
.set-row .ctl .note{display:block;font-size:11.5px;color:var(--mut);margin-top:4px}
.set-row .ctl input[type=checkbox]{width:16px;height:16px;margin-top:6px}
.setwin-foot{padding:12px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px}
.setwin-foot .save-note{font-size:12.5px;color:var(--green);font-weight:600;opacity:0;transition:opacity .25s}
.setwin-foot .save-note.show{opacity:1}
.btn{font:inherit;padding:7px 16px;border-radius:6px;border:1px solid var(--line);background:#fff;cursor:pointer}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.btn.sm{padding:4px 11px;font-size:12.5px}
.btn:hover:not(:disabled){filter:brightness(.97)}
.btn:disabled{opacity:.5;cursor:default}

/* ---------- Help & guides (§6.5) ----------
   One row per guide page. `em` is the honest-label line — it says which app the
   page describes, and it is the whole reason these are linked at all rather
   than suppressed: three of the five walk into the installed app, and a reader
   sent there unwarned has been answered with the deprecated product. */
.guide-row{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);
  border-radius:10px;padding:11px 13px;background:var(--bg)}
.guide-row:hover{border-color:var(--blue);background:#f7faff}
.guide-row b{display:block;font-size:14px;color:var(--ink)}
.guide-row span{display:block;font-size:12.5px;line-height:1.5;color:var(--mut);margin-top:3px}
.guide-row em{display:block;font-size:11.5px;font-style:normal;font-weight:600;margin-top:5px;
  color:#7a5510;background:#fdf6e7;border:1px solid #ecdaae;border-radius:5px;padding:3px 7px}
/* The card for the screen Help was opened from (TMS.openGuides). Above the list,
   in the app's own blue, because it is the answer to "what do I do HERE" and the
   list below is the answer to everything else. */
.guide-here{border:1px solid #bcd3f5;background:#eef4fd;border-radius:10px;padding:11px 13px;margin:0 0 14px}
.guide-here .gh-k{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--blue)}
.guide-here b{display:block;font-size:14.5px;color:var(--ink);margin-top:2px}
.guide-here .gh-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.guide-here .gh-links a{font-size:13px;font-weight:700;text-decoration:none;color:var(--blue);background:#fff;
  border:1px solid #bcd3f5;border-radius:8px;padding:5px 10px}
.guide-here .gh-links a:hover{border-color:var(--blue)}

/* ---------- Simple | Advanced on a run card (brief §5) ----------
   THE MODE IS A CSS STATE, off `data-run-mode` on the run-settings panel, and
   that is a correctness decision rather than a styling one. `collectSettings`
   in view-project.js walks the fifteen levers and DROPS any whose element is
   missing, so a Simple mode that removed the other fourteen from the DOM would
   send a run without them — the reader's last Advanced choices silently gone.
   A `display:none` control is still in the document, still holds its value and
   its `data-touched`, and is still found by `getElementById`.

   Selected on the ATTRIBUTE, never on `#pj-run-setup`: three hosts render this
   panel (the phase page, the findings view's re-run dialog, the phone's Run
   settings sheet), they carry the same ids on purpose, and each one's mode is
   its own. Doing it here rather than in `wire()` also means the panel is
   correct the instant it is parsed, whatever order a host wires in. */
/* `!important`, and it is not a shortcut. `mobile.css` declares
   `#m-runset #pj-levers > label{display:block!important}` and the same for
   `#pj-steps label`, because one dial per row is what a phone needs — so a
   plain rule here loses to it and the mode HALF-APPLIES: on a phone the ten
   dials in `#pj-levers` stayed on screen while `#pj-steps` and `#pj-confrow`,
   which carry no important display, went away. Measured, not deduced —
   `mobile_parity_smoke` reported five levers at height 0 and four bands at 0
   while eleven were still 44px. A MODE is a stronger claim than a layout, so
   it is declared as one. */
[data-run-mode="simple"] [data-lever]:not([data-lever="depth"]),
[data-run-mode="simple"] #pj-confrow,
[data-run-mode="simple"] #pj-steps{display:none!important}
/* The corpus build card's own Simple (task 3.3). Same attribute, same reason
   for `!important`, different lead: `builder` is this card's "how thorough"
   axis the way `depth` is the audit card's. Note what is NOT written here —
   there is no `display:...` for the advanced state, on purpose: `cbSetupWire`
   shows and hides the v2/v3/stage rows with the `hidden` attribute as the
   builder changes, and an advanced rule would override it and put a v2 pass
   list on a v4 build. */
[data-run-mode="simple"] [data-cbdial]:not([data-cbdial="builder"]){display:none!important}
/* The corpus bind/create pair, in the two places it is offered — the binder card
   and the build card's refusal. Its own row with room around it, because both
   halves used to be `btn sm` set inline inside a sentence and the reader could
   not find them (bug-260901-051612). */
.pj-corpus-cta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
/* The deleted-projects bin's own controls — bug-260901-122258. The list is five
   to a page with a search and a date range above it and prev/next below, so the
   bin cannot grow into an unbounded wall of rows. */
.pm-bin-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px;font-size:12px}
.pm-bin-filter input[type=search]{font:inherit;padding:5px 8px;border:1px solid var(--line);border-radius:6px;min-width:180px}
.pm-bin-filter input[type=date]{font:inherit;padding:4px 6px;border:1px solid var(--line);border-radius:6px}
.pm-bin-filter label{display:inline-flex;align-items:center;gap:4px;color:var(--mut)}
.pm-bin-pager{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px}
table.tms-tbl{width:100%;border-collapse:collapse;font-size:13px}
table.tms-tbl th{text-align:left;border-bottom:2px solid var(--line);padding:7px 8px;font-size:10.5px;text-transform:uppercase;letter-spacing:.4px;color:var(--mut)}
table.tms-tbl td{border-bottom:1px solid #f0f0ee;padding:7px 8px;vertical-align:middle}
table.tms-tbl tbody tr:hover td{background:#fafafa}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.toolbar label{font-size:12.5px;color:var(--mut);display:flex;align-items:center;gap:5px}
.toolbar select,.toolbar input{font:inherit;padding:5px 7px;border:1px solid var(--line);border-radius:5px}
.lvl-chip{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;padding:1px 7px;border-radius:9px;color:#fff;vertical-align:middle}
.lvl-debug{background:#8a8a8a}.lvl-info{background:#1a5fb4}.lvl-warn{background:#b7791f}.lvl-error{background:#c0392b}
/* Bug Reports ▸ Shared. U2A.3b: assets/view-admin.js has rendered `ab-badge ab-full` /
   `ab-idx` / `ab-no` since it was ported, and NOTHING in the tree styled any of them —
   not this file, not pc.css, not app.html — so the web app's Shared column has always
   been three plain words in body text with no visual distinction at all. Written here,
   in the shared base stylesheet BOTH hosts load, because the merged pane is in both.
   Deliberately the same shape as .lvl-chip above so the two chips in one row agree. */
.ab-badge{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;padding:1px 7px;border-radius:9px;color:#fff;vertical-align:middle}
.ab-full{background:var(--green)}.ab-idx{background:var(--blue)}.ab-no{background:#8a8a8a}
/* Bug Reports ▸ View, second half: which of the three UI states filed the report
   (pc / tablet / mobile, or `installed` from the app). Quieter than .ab-badge —
   it qualifies the view name beside it rather than standing alone as a value. */
.ab-ui{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;
  padding:0 5px;border-radius:4px;background:#e9edf3;color:#5b6472;vertical-align:middle}
/* The merged table is NINE columns wide, and the report text is the only column that wants
   room. MEASURED rather than guessed, after two wrong fixes: the eight other columns take a
   fixed **613px** (checkbox 66, timestamp 143 nowrap, who 57, priority 75, view 59, shared
   67, size 44, button 102), and the PC's Admin dialog gives the card only ~735px. So there
   is no slack to distribute — `width:100%` alone left the prose 96px and a 271px-tall row,
   and a bare `min-width` pushed Size and the Download button off the edge with no way to
   reach them, which is worse than what it fixed.
   The pair is what works, and both halves are load-bearing: the floor keeps the text
   readable (260px, a 91px row at the PC's width) and `overflow-x:auto` turns the resulting
   overflow into a SCROLL instead of a clip, so no control can become unreachable. At the
   web app's wider settings window there is slack, nothing overflows, and the prose simply
   takes 533px. The e2e asserts the no-unreachable-control half directly. */
table.tms-tbl td.ab-what,table.tms-tbl th.ab-what{width:100%;min-width:20em;vertical-align:top}
#ab-list{overflow-x:auto}
.pill-actions{display:flex;gap:5px;flex-wrap:wrap}
.filerow{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:13px}
.filerow b{min-width:170px;font-weight:600}
#np-log,#auact-log,#s2act-log{font:12px/1.5 Consolas,monospace;background:#222;color:#cfe8cf;border-radius:6px;padding:10px 12px;max-height:240px;overflow-y:auto;margin-top:10px;display:none;white-space:pre-wrap}
.verdict{padding:10px 12px;border-radius:6px;margin-top:10px;font-size:13px;display:none}
.verdict.match{background:var(--green-bg);border:1px solid #bfe3c5}
.verdict.match_with_differences{background:var(--amber-bg);border:1px solid #ecd9ad}
.verdict.mismatch{background:var(--red-bg);border:1px solid #ecb7b0}
.stageline{display:flex;gap:8px;align-items:baseline;margin:2px 0}
.stagelist{margin-top:10px;font-size:13px}
.st-running::before{content:"⏳ "} .st-done::before{content:"✅ "} .st-error::before{content:"❌ "} .st-skipped::before{content:"⏭ "} .st-retrying::before{content:"🔁 "}
kbd{background:#eee;border:1px solid #ccc;border-radius:3px;padding:0 4px;font-size:11px}
.muted{color:var(--mut);font-size:12px}

/* ---------- shell additions (tms-shell.js) ---------- */
[hidden]{display:none !important}
.hide{display:none !important}
#tms-toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(12px);
  background:#2c3340;color:#fff;font:600 13px/1.4 "Segoe UI",system-ui,sans-serif;
  padding:9px 16px;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.28);
  opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:960;max-width:70vw}
#tms-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
#tms-toast.ok{background:#1e6b32}#tms-toast.err{background:#a5271c}
/* menu item "installed app" tag (web-unavailable actions kept for parity) */
.mtag{float:right;margin-left:16px;font-size:9.5px;font-weight:700;letter-spacing:.02em;
  color:var(--mut);border:1px solid var(--line);border-radius:6px;padding:0 5px;vertical-align:1px}

/* The segment's Summary of Issues, on the PC's own review pane. Its own rules
   rather than view-audit.css's: that stylesheet is scoped to [data-av-surface]
   and #ed-notes is outside it, so sharing the CSS there would leak the module's
   chrome onto a pane it does not own. What the two panes share is the GROUPING
   RULE (TMSViewAudit.problems), never the markup.

   Open by default while the cards below stay as they are — this block is what a
   reviewer reads instead of opening six cards, so it cannot itself be a click. */
#ed-notes .pc-summary{border:1px solid var(--blue,#1a73e8);background:#eef4fd;border-radius:8px;
  padding:8px 11px;margin-bottom:10px}
#ed-notes .pc-summary > summary{cursor:pointer;list-style:none;display:flex;align-items:center;
  gap:8px;flex-wrap:wrap;-webkit-user-select:none;user-select:none}
#ed-notes .pc-summary > summary::-webkit-details-marker{display:none}
#ed-notes .pc-summary > summary::after{content:"+";margin-left:auto;font:700 16px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--blue,#1a73e8)}
#ed-notes .pc-summary[open] > summary::after{content:"−"}
#ed-notes .sum-pill{background:var(--blue,#1a73e8);color:#fff;font-size:10.5px;font-weight:600;
  letter-spacing:.03em;padding:2px 9px;border-radius:20px;white-space:nowrap}
#ed-notes .sum-head{font-size:12px;font-weight:600}
#ed-notes .sum-body{margin-top:8px;padding-top:8px;border-top:1px solid rgba(26,115,232,.22)}
/* The written summary. Scoped to #ed-notes like everything else here, because
   view-audit.css is scoped to [data-av-surface] and this pane sits outside it —
   the same reason the rest of this block is duplicated rather than shared.
   pre-wrap so a summary that arrives with line breaks keeps them. */
#ed-notes .sum-written{font-size:11.5px;line-height:1.6;color:#2b3240;margin-bottom:8px;
  white-space:pre-wrap}
#ed-notes .sum-grp{margin-bottom:7px;font-size:11.5px}
#ed-notes .sum-grp > b{display:block;margin-bottom:2px}
#ed-notes .sum-hint{color:#6b7280;font-size:11px;margin-bottom:2px}
#ed-notes .sum-li{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;padding:1px 0}
#ed-notes .sum-cat{font-size:10.5px;font-weight:600;color:#3a4150}
#ed-notes .sum-sev{font-size:10px;font-weight:700;color:#6b7280}
#ed-notes .sum-what{font-size:11px;color:#3a4150}
/* "3 flags": this card speaks for more findings than itself. Amber, because it
   is a caution — the segment is not done until they have all been looked at. */
#ed-notes .fdupe{font-size:10px;font-weight:700;color:#8a5a10;background:#fdf3e0;
  border:1px solid #e8d9b0;border-radius:20px;padding:1px 7px;white-space:nowrap}
/* Which check found the finding. Quiet: it explains a pile, it is not a grade. */
#ed-notes .fsrc{font-size:10px;color:#6b7280;background:#f6f7f9;border:1px solid #e5e7eb;
  border-radius:5px;padding:1px 6px;white-space:nowrap;font-weight:400}
/* The rest of a grouped problem, inside the card that leads it. */
#ed-notes .pc-also{margin-top:8px;padding-top:7px;border-top:1px dashed #d7dbe2}
#ed-notes .pc-also .also-head{font-size:10.5px;color:#6b7280;margin-bottom:5px}
#ed-notes .pc-sub{border-left:2px solid #d7dbe2;padding:3px 0 3px 8px;margin-bottom:6px;font-size:12px}

/* ---- Audit Worker: server load + tasks ---------------------------------- */
/* Meters and one-series traces, not charts: these are magnitudes on a fixed
   0-100 scale. Colour is reserved for state that is genuinely a problem --
   memory, swap, disk -- because a CPU pinned at 100% during an audit is the
   machine working, and painting that red teaches an admin to ignore colour.
   The number is always beside the bar, so nothing is encoded by colour alone. */
.aw-vit{border-top:1px solid var(--line);padding:12px 0}
.aw-vit:first-child{border-top:none;padding-top:4px}
.aw-vit-head{font-size:13px;margin-bottom:9px}
.aw-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(158px,1fr));gap:14px}
.aw-metric-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.aw-metric-label{font-size:10.5px;letter-spacing:.5px;text-transform:uppercase;
  color:var(--mut);font-weight:700}
.aw-metric-val{font-size:16px;font-weight:600;color:var(--ink);
  font-variant-numeric:tabular-nums}
.aw-metric-val.warn{color:var(--amber)}
.aw-metric-val.bad{color:var(--red)}
.aw-bar{height:6px;border-radius:3px;background:var(--panel);
  border:1px solid var(--line);overflow:hidden;margin-top:4px}
.aw-bar-fill{display:block;height:100%;background:var(--blue);border-radius:3px 0 0 3px}
.aw-bar-fill.warn{background:var(--amber)}
.aw-bar-fill.bad{background:var(--red)}
.aw-metric-sub{font-size:11.5px;color:var(--mut);margin-top:3px}
/* The trace is recessive by design: it is context for the number above it, not
   the reading itself. Gaps in it are real -- a break means the server was not
   checking in, and joining the ends would draw a line across an outage. */
.aw-spark{display:block;width:100%;height:22px;margin-top:5px;
  stroke:var(--blue);opacity:.45}

.aw-tablewrap{overflow-x:auto}
.aw-table{width:100%;border-collapse:collapse;font-size:13px}
.aw-table th{text-align:left;font-size:10.5px;letter-spacing:.5px;text-transform:uppercase;
  color:var(--mut);font-weight:700;padding:6px 10px 6px 0;white-space:nowrap;
  border-bottom:1px solid var(--line)}
.aw-table td{padding:7px 10px 7px 0;border-bottom:1px solid var(--line);vertical-align:top}
.aw-table tr:last-child td{border-bottom:none}
.aw-table td.num{font-variant-numeric:tabular-nums;white-space:nowrap}
/* The Tasks table's pager (bug-260911-074101). Its own row under the table
   rather than a floating control: the reader's eye is already at the bottom of
   the five rows when they want the next five. */
.aw-pager{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:12px}
.aw-pager button[disabled]{opacity:.45;cursor:default}
.aw-pill{display:inline-block;font-size:11px;font-weight:600;letter-spacing:.3px;
  padding:1px 7px;border-radius:999px;background:var(--panel);color:var(--mut);
  border:1px solid var(--line);white-space:nowrap}
.aw-pill.ok{background:var(--green-bg);color:var(--green);border-color:transparent}
.aw-pill.warn{background:var(--amber-bg);color:var(--amber);border-color:transparent}
.aw-pill.bad{background:var(--red-bg);color:var(--red);border-color:transparent}

/* ---------------------------------------------------------------------------
   VPS / AI Workers — the one admin pane that now holds both machines.

   Here rather than in either host's own <style>: the pane's interior is a
   PARITY CONTRACT (test_shared_surface_markup_parity.py), and a rule that
   existed in one host's stylesheet and not the other would let the two panes
   render differently while their markup still compared equal.
   --------------------------------------------------------------------------- */
.vps-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px;
  border-bottom:1px solid var(--line);padding-bottom:12px}
.vps-tabs .vps-tab.on{background:var(--blue);color:#fff;border-color:var(--blue)}

/* The setup wizard. Numbered rows rather than cards, because the numbers are
   the point: the order is a real dependency chain (nothing to install until
   the package is published; no code to paste until one is minted), not a
   presentational sequence. */
.vps-steps{list-style:none;margin:0;padding:0}
.vps-step{display:grid;grid-template-columns:30px 1fr;gap:2px 12px;
  padding:14px 0;border-bottom:1px solid var(--line)}
.vps-step:last-child{border-bottom:none}
.vps-step .n{grid-row:1/span 3;font-variant-numeric:tabular-nums;font-weight:700;
  font-size:13px;color:var(--mut);padding-top:2px}
.vps-step .h{display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  font-weight:600;font-size:14.5px}
.vps-step .d{color:var(--mut);font-size:13px;line-height:1.5;margin:5px 0 0;max-width:66ch}
.vps-step .c{margin-top:9px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* A step nothing can be done about YET is dimmed rather than hidden, so the
   admin can still read what is coming and why it is waiting. */
.vps-step.blocked .h,.vps-step.blocked .d{opacity:.55}

/* The command block. `user-select:all` so a click-drag grabs the whole thing
   even for someone who does not trust the Copy button.

   `white-space:pre` and NOT `pre-wrap` with `word-break:break-all`, which is
   what this had first: that broke `install-converter.sh` across a line as
   "install-converter.s / h", and an admin typing what they read would run a
   command that does not exist. The command already carries its own `\` line
   continuations, so it lays out correctly and scrolls sideways when it must. */
.vps-cmd{white-space:pre;overflow-x:auto;user-select:all;
  background:var(--panel);border:1px solid var(--line);border-radius:6px;
  padding:10px 12px;font:12.5px/1.6 ui-monospace,Menlo,Consolas,monospace;
  margin:9px 0 0}

/* The Dev Server tab (view-devbox-admin.js). Its command boxes are textareas,
   so a full-width block the admin can select all of; its per-server facts a
   two-column table that wraps rather than widening the pane. */
.dvb-cmd{display:block;width:100%;box-sizing:border-box;resize:vertical;color:var(--ink)}
.dvb-facts{border-collapse:collapse;font-size:13px;margin:6px 0 10px;width:100%}
.dvb-facts th{text-align:left;font-weight:600;color:var(--mut);padding:3px 12px 3px 0;
  white-space:nowrap;vertical-align:top;width:1%}
.dvb-facts td{padding:3px 0;overflow-wrap:anywhere}
.dvb-buttons{display:flex;gap:6px;flex-wrap:wrap}
/* Harmonize's review (view-devbox-admin.js harmonizeReviewHtml): a conflict
   per block, its path as the label and git's own conflict-marker text as the
   starting point to edit down — not a diff viewer, a text box, same family as
   .dvb-cmd above. */
.dvb-harmonize{margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}
.dvb-clean{margin:4px 0 0;padding-left:18px;font-size:12.5px;color:var(--mut)}
.dvb-conflict{margin:8px 0}
.dvb-conflict label{display:block;font-size:12.5px;font-weight:600;margin-bottom:3px}
.dvb-conflict .dvb-resolve{font:12.5px/1.5 ui-monospace,Menlo,Consolas,monospace}


/* The cron-install steps in Admin ▸ Project Backups. Numbered rather than prose
   because this is the one part of the backup system a person has to perform by
   hand on the server, and a paragraph is easy to read past — which, here, means
   believing backups are running when no cron job was ever installed. Sized with
   the pane's own muted body text so the list reads as instructions, not chrome. */
.bk-steps{margin:0 0 10px;padding-left:20px;color:var(--mut);font-size:12.5px;line-height:1.65}
.bk-steps>li{margin:0 0 7px}
.bk-steps>li>b{color:var(--ink)}

/* --- the worker concurrency probe -------------------------------------------
   A result an admin compares across months, so the runs stack newest-first and
   only the newest is open. The table is small and numeric; tabular figures stop
   the columns dancing between runs. */
.aw-probe{margin-top:9px;border-left:2px solid #d6dbe3;padding-left:11px}
.aw-probe-run > summary{cursor:pointer;font-size:12.5px;color:#4a5261;padding:3px 0}
.aw-probe-verdict{font-size:13px;line-height:1.5;color:#2b3240;margin:4px 0 7px}
.aw-probe-err{font-size:12.5px;color:#a6432f;margin:4px 0}
.aw-probe-t{border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}
.aw-probe-t th{text-align:left;font-weight:600;color:#6b7280;padding:2px 12px 2px 0;
  font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.aw-probe-t td{padding:2px 12px 2px 0;color:#3a4150}


/* ---- ⓪'s bulk answers, behind one control (§11.5) ----------------------
   `.s0-docbar` carried three buttons totalling 772px on a bar that also holds the
   back link, the kind chips, the summary and Finish — about 1500px against 1476,
   so it wrapped to two rows (61px) at every desk width below 1920. Behind this
   control the row is 31px and ⓪'s document starts 30px higher.

   THE POPUP IS ABSOLUTE so opening it cannot re-wrap the bar it is in, which is
   the whole point: a `<details>` that pushes its own bar taller when opened would
   have traded a permanent 30px for an intermittent one. */
.s0-bulk{position:relative;flex:none}
.s0-bulk > summary{list-style:none;cursor:pointer;font:inherit;font-size:12px;
  padding:3px 10px;border:1px solid var(--line);border-radius:6px;background:#fff;
  color:var(--ink);white-space:nowrap}
.s0-bulk > summary::-webkit-details-marker{display:none}
.s0-bulk > summary:hover{background:#f2f2f0}
.s0-bulk[open] > summary{background:#ececea;border-color:#c9c9c9}
/* HIDDEN WHEN CLOSED, EXPLICITLY — and this is not belt and braces. The UA
   collapses a `<details>`' non-summary children with `content-visibility`, which
   does NOT hide an ABSOLUTELY POSITIONED child: driven, the popup came back
   `open:false` with `popVisible:true` and `display:flex`, so all three buttons
   were floating under the bar permanently. The bar measured 35px and one row
   while the thing it was meant to fold away was still on screen — a source read
   would have called that a success. */
.s0-bulk:not([open]) > .s0-bulkpop{display:none}
.s0-bulkpop{position:absolute;right:0;top:calc(100% + 4px);z-index:60;background:#fff;
  border:1px solid #c2c2c2;border-radius:8px;box-shadow:0 10px 26px rgba(0,0,0,.16);
  padding:6px;min-width:300px;max-width:min(460px,86vw);
  display:flex;flex-direction:column;align-items:stretch;gap:4px}
.s0-bulkpop button{display:block;width:100%;text-align:left;white-space:normal}
/* The uncovered-rows sentence rides with the buttons it explains — it is the
   answer to "why is the count higher than these add up to" (bug-260901-051229),
   which is a question a reader only has once the buttons are in front of them. */
.s0-bulkpop .muted{padding:4px 6px 2px;line-height:1.45}


/* ---- the findings search, on the spine (§11.4a option A) ------------------
   Capped like everything else that shares a line somebody keeps adding to: flex
   decides WRAPPING on base sizes and shrinks only within a line, so an input with
   a content-sized base would break the bar rather than narrow (§9.14, and twice
   more since). An `<input>`'s base is its `size` attribute's content width — 170px
   here — and that is exactly what happened: the first cut of this rule read
   `min-width:120px;max-width:16vw`, which leaves the BASE at 170 because 16vw is
   204px at 1280, and the spine went to two rows at 1280 and 1366.

   THE BUDGET, written here because arithmetic is the only thing that decides
   whether this bar wraps, and the next person to add a control to it needs the
   numbers rather than a warning. At 1280 the spine's inner width is 1256px and it
   carries, at their base sizes: `#wf-steps` 793 (min-content — the chips are
   nowrap, and that is what the five-phase walk with its two nav buttons costs),
   the save pill 73, `#wf-next` 189 on the review surface once the progress meter
   stands down (see `view-project.js`), and three 14px gaps. That is 1097, so this
   control has 159px before the row breaks.

   `min(170px, 9vw)` SPENDS 115 OF THEM AT 1280 and grows with the desk — 129 at
   1440, 144 at 1600, 170 (its content width, where a cap stops helping) from
   1889. 44px of slack at the width that broke, which is about the margin the spine
   had before this control existed, and it is slack the phase chips can need: a
   project whose phases are empty draws `·empty 🔒` on each of them and
   §11.6's fixture measures one such chip at 171px against 79 for a full one.
   Widen this and measure, at 1280, with `chrome_ceiling`. */
.wf-search{flex:0 1 auto;width:min(170px, 9vw);min-width:96px;font:inherit;font-size:12px;
  padding:3px 9px;border:1px solid var(--line);border-radius:6px;background:#fff;
  color:var(--ink)}
.wf-search[hidden]{display:none}
.wf-search::placeholder{color:#9a9a9a}

/* ③ and its optional review rounds, as one group on the spine: the rounds are
   part of Phase 3, not phases after it, so they sit inside its outline rather
   than behind a `→` of their own. */
.wf-p3{display:inline-flex;align-items:center;gap:2px;padding:1px;border-radius:16px;
  background:#f3f4f6;border:1px solid #e1e3e8}
.wf-p3 .wf-round{padding-left:9px;padding-right:9px;font-size:12px}
.wf-step.is-skipped{background:transparent;color:#9aa1ab;border:1px dashed #d6d8dc;text-decoration:line-through;
  text-decoration-color:rgba(138,145,155,.7);font-weight:500}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .wf-p3{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}
}
:root[data-theme="dark"] .wf-p3{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}

/* ---------- Pay per 1,000 words (assets/view-pay.js) ---------- */
.pay-scroll{overflow-x:auto}
.pay-scroll table.tms-tbl{min-width:560px}
.pay-scroll .r{text-align:right;font-variant-numeric:tabular-nums}
.pay-pill{display:inline-block;font-size:11px;font-weight:600;padding:1px 8px;border-radius:9px;vertical-align:middle}
.pay-draft{background:#eef1f5;color:#445}.pay-submitted{background:var(--amber-bg);color:var(--amber)}
.pay-approved{background:var(--green-bg);color:var(--green)}.pay-paid{background:#e3ecf8;color:var(--blue)}
.pay-warn{background:var(--amber-bg);color:#7a5610;border-radius:6px;padding:7px 10px;margin:8px 0;font-size:12.5px}
.pay-st-head{display:flex;flex-direction:column;gap:2px;margin:6px 0 8px}
.pay-lines tr.pay-held td{color:var(--mut)}
.pay-lines tr.pay-total td{font-weight:700;border-bottom:none}
.pay-units{margin:10px 0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fafaf8}
.pay-units-head{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:6px;font-size:13px}
.pay-queries{margin:10px 0;font-size:12.5px;display:grid;gap:3px}
.pay-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0 4px}
.pay-actions input[type=text],.pay-form input,.pay-form select{font:inherit;padding:5px 7px;border:1px solid var(--line);border-radius:5px}
.pay-inline{display:inline-flex;gap:5px;align-items:center;font-size:12.5px;color:var(--mut)}
.pay-msg{min-height:1.2em;font-size:12.5px;color:var(--red);margin:4px 0}
.pay-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:14px}
.pay-tile{border:1px solid var(--line);border-radius:8px;padding:9px 12px;display:grid;gap:1px;background:#fff}
.pay-tile .k{font-size:10.5px;letter-spacing:.5px;text-transform:uppercase;color:var(--mut);font-weight:700}
.pay-tile .v{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
.pay-tile .d{font-size:12px;color:var(--mut)}
table.tms-tbl tr.pay-row{cursor:pointer}
table.tms-tbl tr.pay-row.on td{background:#eef4fc}
table.tms-tbl tr.pay-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.pay-hint{font-size:12px;line-height:1.45;margin:8px 0}
.pay-form{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;padding:6px 0 4px;font-size:12.5px}
.pay-form label{display:inline-flex;gap:5px;align-items:center;color:var(--mut)}
/* The pickers are filled by a request, so at rest — and in tablet_touch_floor's sweep,
   which opens every dialog — an empty <select> collapses to 36px, under the 44px floor. */
#pay-period,#pay-project{min-width:12em}
/* Pay pane tabs, rate card and progress (v1.150.0). */
.pay-subtabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:12px}
.pay-subtab{font:inherit;background:none;border:0;border-bottom:2px solid transparent;padding:7px 14px;cursor:pointer;color:var(--mut)}
.pay-subtab[aria-selected="true"]{border-bottom-color:var(--blue);color:var(--ink);font-weight:600}
.pay-subtab:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
table.pay-rc{min-width:760px}
table.pay-rc td{padding:4px 5px;vertical-align:top}
table.pay-rc tr.pay-rc-grp td{background:var(--panel);font-size:10.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--mut)}
.pay-rc-who{white-space:nowrap;font-weight:600}
.pay-rc-who small{display:block;font-weight:400;color:var(--mut);font-size:11px}
.pay-cell{display:block;width:100%;min-height:44px;text-align:left;white-space:nowrap;font:inherit;font-size:12.5px;border:1px dashed transparent;border-radius:6px;padding:4px 7px;background:none;cursor:pointer;color:var(--ink);font-variant-numeric:tabular-nums}
.pay-cell small{display:block;font-size:10.5px;color:var(--mut);font-weight:400}
.pay-cell.set{font-weight:600;background:#eef4fc}
.pay-cell.inh{color:var(--mut)}
.pay-cell.inh::before{content:"\2191  ";opacity:.7}
.pay-cell:hover,.pay-cell:focus-visible{border-color:var(--blue);outline:none}
.pay-cell.on{border:1px solid var(--blue)}
.pay-cell.ro{cursor:default}
.pay-editor{border:1px solid var(--blue);border-radius:8px;padding:8px 12px;margin:10px 0}
.pay-chain{display:grid;gap:4px;font-size:12.5px;margin:8px 0}
.pay-chain div{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;padding:5px 8px;border:1px solid var(--line);border-radius:6px;color:var(--mut)}
.pay-chain div.win{border-color:var(--green);background:var(--green-bg);color:var(--ink)}
.pay-bar{height:10px;flex:0 0 180px;background:#eef1f5;border-radius:5px;overflow:hidden}
.pay-bar i{display:block;height:100%;background:var(--green)}
.pay-g-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:6px 0 10px;font-size:13px}
table.pay-g-tbl{min-width:760px}
.pay-g-log{margin:8px 0 12px}
/* My pay — the translator's own view (v1.151.0; view-pay.js "My pay"). */
.pay-estimate{background:#fff6dc;border:1px solid #e8cf86;color:#5b4508;border-radius:8px;padding:9px 12px;margin:0 0 12px;font-size:13px;line-height:1.45}
.pay-estimate b{color:#3f2f04}
.pay-estimate.sm{font-size:12px;padding:6px 9px;margin:0}
.pay-note{background:#eef4fc;border:1px solid #c9dbf3;border-radius:8px;padding:7px 10px;margin:0 0 10px;font-size:13px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pay-half-head{display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;align-items:baseline;font-size:13px;margin-bottom:6px}
.pay-days{height:8px;border-radius:4px;background:#e8edf3;overflow:hidden;margin:0 0 12px}
.pay-days i{display:block;height:100%;background:var(--blue);border-radius:4px}
.pay-tile.hero{border-color:var(--blue);background:#f3f7fd}
.pay-tile.warn{border-color:#e3c27a;background:var(--amber-bg)}
.pay-tile .k{display:flex;align-items:center;gap:6px}
.pay-sw{display:inline-block;width:10px;height:10px;border-radius:2px;flex:none}
.pay-sw-worked{background:#2a78d6}.pay-sw-rev{background:#8db7ea}.pay-sw-term{background:#eb6834}.pay-sw-held{background:#d9a441}
.pay-sw-doc{background:#6b5bd2}.pay-sw-cite{background:#1b9e77}
/* Rates ▸ Defaults for everyone (v1.152.0): one labelled field per column, each in its unit. */
.pay-def-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:4px 0 10px}
/* Rates: how a rate is chosen, in override order (① → ④), and the sections below it. */
.pay-order-steps{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin:4px 0 10px;padding:0}
.pay-order-steps li{border:1px solid var(--line);border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;position:relative}
.pay-order-steps li span{font-size:12px;color:var(--mut)}
.pay-sec .card-title .muted{font-weight:400;text-transform:none;letter-spacing:0}
.pay-half{white-space:nowrap}
.pay-def{display:grid;gap:3px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fff}
.pay-def .k{font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--mut)}
.pay-def .d{font-size:11.5px;color:var(--mut)}
.pay-def-in{display:flex;align-items:center;gap:4px}
.pay-def-in .cur{color:var(--mut);font-weight:600}
.pay-def-in input{font:inherit;font-size:15px;font-variant-numeric:tabular-nums;width:100%;min-height:36px;padding:4px 8px;border:1px solid var(--line);border-radius:6px}
.pay-def-in input:disabled{background:#f4f4f2;color:var(--mut)}
table.pay-rc th small{display:block;font-weight:400;font-size:10.5px;color:var(--mut);text-transform:none;letter-spacing:0}
.pay-sw-last{background:none;border-top:2px dashed #7a8594;height:0;width:14px;border-radius:0}
.pay-two{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:12px;margin-bottom:12px}
@media (max-width:760px){.pay-two{grid-template-columns:1fr}}
.pay-panel{border:1px solid var(--line);border-radius:8px;padding:10px 12px;display:grid;gap:8px;align-content:start;min-width:0;background:#fff;font-size:13px}
.pay-panel-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
svg.pay-chart{width:100%;height:auto;display:block}
svg.pay-chart text{font-size:10.5px;fill:var(--mut)}
svg.pay-chart text.today,svg.pay-chart text.val{fill:var(--ink);font-weight:600}
svg.pay-chart .gl{stroke:#e2e6eb;stroke-width:1}
svg.pay-chart .future{fill:#f1f3f6}
svg.pay-chart .area{fill:var(--blue);opacity:.12}
svg.pay-chart .line{fill:none;stroke:var(--blue);stroke-width:2.2;stroke-linejoin:round}
svg.pay-chart .last{fill:none;stroke:#7a8594;stroke-width:1.5;stroke-dasharray:4 3}
svg.pay-chart .dot{fill:var(--blue);stroke:#fff;stroke-width:2}
svg.pay-chart .b-worked{fill:#2a78d6}svg.pay-chart .b-rev{fill:#8db7ea}svg.pay-chart .b-term{fill:#eb6834}
svg.pay-chart .hit{fill:transparent}
svg.pay-chart .hit:hover{fill:rgba(26,95,180,.06)}
.pay-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11.5px;color:var(--mut)}
.pay-legend span{display:inline-flex;align-items:center;gap:5px}
.pay-chg{display:grid}
.pay-chg-it{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);font-size:12.5px}
.pay-chg-it:last-child{border-bottom:0}
.pay-chg-it small{display:block;color:var(--mut);font-size:11.5px;margin-top:1px}
.pay-chg-it .amt{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.pay-chg-it .amt.up{color:var(--green)}.pay-chg-it .amt.dn{color:var(--red)}
.pay-chg-sum{background:#f7f8fa;border-radius:6px;padding:7px 8px;border-bottom:0;margin-bottom:2px}
.pay-since .btn{justify-self:start}
.pay-heldbox{border:1px solid #e3c27a;background:var(--amber-bg);border-radius:8px;padding:10px 12px;display:grid;gap:8px;font-size:12.5px;margin:0 0 12px}
.pay-held-it{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;border-top:1px solid #efd9a6;padding-top:8px}
.pay-heldbox>b+.pay-held-it{border-top:0;padding-top:0}
.pay-steps{display:inline-flex;gap:2px;vertical-align:middle;margin-right:4px}
.pay-steps i{width:14px;height:5px;border-radius:3px;background:#dfe5ec}
.pay-steps i.on{background:var(--blue)}.pay-steps i.paid{background:var(--green)}
.pay-next{display:block;color:var(--mut);font-size:11px}
table.pay-hist{min-width:680px}
table.pay-myrates{min-width:720px}
table.pay-myrates td{white-space:nowrap}
/* The menu-bar figure and its summary. */
.pay-chip{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:12.5px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;padding:1px 10px 1px 4px;margin-right:6px;cursor:pointer;font-variant-numeric:tabular-nums;white-space:nowrap;min-height:26px}
.pay-chip[hidden]{display:none}
/* Dev mode (view-devbox-admin.js). Small on purpose: the strip has a measured
   width budget (the pay chip's notes below), and this is shown to admins only. */
.dev-chip{display:inline-flex;align-items:center;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;
  border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;padding:1px 10px;margin-right:6px;min-height:26px}
button.dev-chip{cursor:pointer}
button.dev-chip:hover{border-color:var(--blue)}
.dev-chip[hidden]{display:none}
.dev-chip.here{background:var(--red);border-color:#f5c518;border-width:2px;border-radius:0;color:#fff;letter-spacing:.4px}
.pay-chip:hover,.pay-chip[aria-expanded="true"]{border-color:var(--blue)}
.pay-chip:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.pay-chip svg{display:block;flex:none}
.pay-chip .ring-bg{fill:none;stroke:#dfe5ec;stroke-width:3}
.pay-chip .ring-on{fill:none;stroke:var(--blue);stroke-width:3}
.pay-chip .dl{color:var(--mut)}
@media (max-width:1439px){.pay-chip .dl{display:none}}
/* THE AUDIT SURFACE'S TOOLBAR TAKES THE STRIP, as it does from `.mb-project` (line
   ~177), and for the reason that rule gives: the line has room for one of them.
   Measured, not assumed: with #mb-audit up, the figure wrapped the strip from 41px
   to 71–76px at 1280, 1366 and 1440 (and it is one row at each of them without it).
   A reviewer in an audit reaches My pay from the Review menu, one click away. */
#mb-audit:not([hidden]) ~ .pay-chip{display:none}
html.tms-mobile .pay-chip,html.tms-mobile .pay-pop{display:none!important}
.pay-pop{position:fixed;z-index:60;width:320px;max-width:calc(100vw - 16px);background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px -12px rgba(20,32,48,.35);padding:12px 14px;display:grid;gap:9px;font-size:13px}
.pay-pop[hidden]{display:none}
.pay-pop .big{font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.15}
.pay-pop .row{display:flex;justify-content:space-between;gap:10px;font-variant-numeric:tabular-nums}
.pay-pop .row span:first-child{color:var(--mut)}
.pay-pop .row.warn{color:var(--amber)}
.pay-pop hr{border:0;border-top:1px solid var(--line);margin:0}
.pay-pop .pay-days{margin:0}
.pay-pop .btn{justify-self:start}
/* The phone's My pay (view-mobile.js mypayScreen → view-pay.js mountPhone). */
.pay-ph{display:grid;gap:10px;padding:12px}
.pay-ph .pay-estimate{margin:0}
.pay-ph-seg{display:flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.pay-ph-seg button{flex:1;min-height:44px;font:inherit;font-size:14px;background:#fff;border:0;color:var(--mut)}
.pay-ph-seg button.on{background:var(--blue);color:#fff;font-weight:600}
.pay-ph-card{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:grid;gap:4px;background:#fff}
.pay-ph-card .k{font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.5px;font-weight:700}
.pay-ph-card .v{font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.15}
.pay-ph-card.list{gap:0}
.pay-ph-card .li{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 2px;border:0;border-bottom:1px solid var(--line);font:inherit;font-size:14px;background:none;text-align:left;width:100%;min-height:44px;font-variant-numeric:tabular-nums;color:var(--ink)}
.pay-ph-card .li:last-child{border-bottom:0}
.pay-ph-card .li small{display:block;color:var(--mut);font-size:12px}
.pay-ph-card .li.on{background:#eef4fc}
.pay-ph-card .li.warn{color:var(--amber)}
.pay-ph .btn{min-height:44px}
.pay-ph .pay-heldbox,.pay-ph .pay-note{margin:0}
