/*
  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;
}
*{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}
/* 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:#b3261e}.sev-HIGH{background:#e07020}.sev-MODERATE{background:#c2a200}.sev-MINOR{background:#8a8a8a}
#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)}

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)}
/* The one finding action set (Accept fix · Keep as-is · Dismiss · Reopen),
   shared by the audit findings list and the per-segment editor — identical to
   the installed app's review cards. */
.fres{display:inline-flex;gap:4px;flex-wrap:wrap;align-items:center}
.fres-btn{font:inherit;font-size:11.5px;line-height:1.5;padding:2px 8px;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--ink);cursor:pointer}
.fres-btn.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.fres-btn.reopen{color:var(--mut)}
.fres-btn:disabled{opacity:.5;cursor:default}
.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}

/* ---------- 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)}
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)}
.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}
.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}
.wf-step .wf-tick{font-size:11px}
.wf-sep{color:#bbb;font-size:13px}
.wf-status{display:flex;gap:14px;flex-wrap:wrap;margin-left:auto;
  font-size:11.5px;color:var(--mut,#666)}
.wf-status b{color:var(--ink,#222);font-weight:600}
/* "Next action" banner + progress meter (persistent, under the stepper) */
.wf-next{flex-basis:100%;display:flex;align-items:center;gap:10px;margin-top:6px;
  padding-top:7px;border-top:1px dashed var(--line)}
.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}
.wf-next-text{font-size:12.5px;color:var(--ink,#222)}
.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{filter:brightness(1.08)}
.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. */
.st3-sevchip .n-bt-likely{background:#7c2d12}
.st3-sevchip .n-bt-probable{background:#1e4c8f}
.st3-sevchip .n-bt-possible{background:#4b5563}
/* 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}
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-stage2>.stage-wrap,#view-stage3>.stage-wrap{flex:1 1 auto;min-height:0;height:auto}

/* ---------- unified Settings / Admin window ---------- */
dialog.setwin{max-width:980px}
.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}
.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}
.pm-phase-meta{flex:1;min-width:140px;font-size:12px;color:var(--mut)}
.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)}
.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}
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}
/* 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:200;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}
