/* ═══════════════════════════════════════════════════════════════════════════
   Shrinkguard portal — application stylesheet
   Hand-written. No library, no CDN, no preprocessor, no build step. The Shrinkguard brand (shrinkguard.ai): navy
   #06245A / #0A438F, red #DC3028, DM Sans + DM Serif Display — the faces are SELF-HOSTED in wwwroot/fonts (OFL),
   because the CSP blocks font CDNs.

   Three scopes:
     :root                the report on paper stock, follows the OS theme
     [data-theme="dark"]  the same identity INVERTED — warm charcoal, still
                          reading as printed stock
     .ink                 the auditor island. Pinned. No theme, no media query
                          and no future toggle reaches in.

   Every SVG fill / stroke / <pattern> rect in markup resolves through one of
   these custom properties, so print and dark are a token swap, not a redraw.
   There are no literal hex values in markup.

   Contrast is measured against the scope's own --paper.
   Marks (bars, reference lines, rails) are held to >= 3:1.
   Text is held to >= 4.5:1.
   Hairline rules are decorative separators and are exempt from 1.4.11; any
   rule that carries STATE (selection rail, focus ring, threshold reference
   line) is held to >= 3:1.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1 · TOKENS ─────────────────────────────────────────────────────────── */

@font-face{font-family:"DM Sans";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/dm-sans-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"DM Sans";font-style:normal;font-weight:500 600;font-display:swap;src:url("fonts/dm-sans-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"DM Sans";font-style:normal;font-weight:700 800;font-display:swap;src:url("fonts/dm-sans-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2")}

:root{
  /* ---- ground: warm stock, cool ink.  INVERTS with theme. ---- */
  --paper:#F4F8FF;      /* page stock. Warm neutral, deliberately not cream    */
  --leaf:#FFFFFF;       /* figure + panel ground, one step above the page      */
  --band:#EAF3FC;       /* hover fill, chip ground, KPI wash                   */
  --sel:#DCE8F7;        /* selected row. The one COOL neutral, so selection
                           can never be mistaken for hover                     */
  --rule:#D5E3F2;       /* primary hairline, warm so it reads as printed rule  */
  --rule-2:#A9C1DE;     /* structural rule: table head, section underline      */
  --rule-hair:#E6EEF8;  /* in-table row rules, chart gridlines                 */

  /* ---- ink.  INVERTS. ---- */
  --ink:#06245A;        /* body + headings.  16.2:1                            */
  --ink-2:#2C4A6E;      /* captions, apparatus, legends.  7.9:1                */
  --ink-3:#3A5478;      /* micro labels, muted meta.  4.55:1 — this is the
                           floor; nothing lighter carries text                 */

  /* ---- data marks.  INVERTS. ---- */
  --bar:#4F6A92;        /* ordinary series.  5.6:1.  Steel, so it never
                           competes with the signal hues                       */
  --bar-2:#8DA3C2;      /* secondary series (value ribbon, mix bars).  3.4:1   */

  /* ---- signal.  RE-PEGGED, NOT INVERTED: same hue in both grounds,
         luminance re-pegged so each holds its ratio. ---- */
  --sig0:#087452;       /* average reference.  Incumbent's green.  5.7:1       */
  --sig0-ink:#087452;   /* text form — same, already clears 4.5                */
  --sig1:#B0651A;       /* >= 1.25x.  Incumbent's orange re-pegged for toner.
                           3.9:1 — legal as a MARK, illegal as text            */
  --sig1-ink:#8A4A10;   /* text form of sig1.  6.1:1.  Use for every label,
                           ratio and caption set in the 1.25x colour           */
  --sig2:#B82520;       /* >= 1.75x.  Incumbent's red.  7.1:1, mark and text   */
  --sig2-ink:#B82520;
  --nodata:#8E8B80;     /* missing denominator, mark form.  3.05:1             */
  --nodata-ink:#6B6862; /* missing denominator, text form.  4.95:1             */

  /* ---- interaction.  INVERTS. ---- */
  --link:#0A438F;       /* the only blue in the system.  9.8:1                 */
  --focus:#0A438F;      /* focus ring, 2px, 2px offset                         */

  /* ---- faces: system stacks only. The CSP blocks font CDNs and a silent
         fallback is worse than an honest stack. ---- */
  /* brand: navy + red (shrinkguard.ai). Red is the BRAND accent; --sig2 stays the "problem" signal. */
  --brand:#0A438F; --brand-deep:#06245A; --accent:#DC3028;
  --card-shadow:0 18px 50px rgba(10,27,54,.06),0 4px 14px rgba(10,27,54,.04);   /* shrinkguard.ai card */
  --display:"DM Serif Display",Georgia,"Times New Roman",serif;
  --serif:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --sans:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono: ui-monospace,"SF Mono","Cascadia Mono","Segoe UI Mono",Consolas,
          "Liberation Mono","DejaVu Sans Mono",monospace;

  /* ---- INVARIANT: identical in every scope, every theme, print included ---- */
  --u:4px;              /* spacing unit. Every padding/gap is a multiple.
                           Declared here and ENFORCED — no 7px, no 9px, no 11px */
  --radius:6px;         /* near-square. Equipment, not cards                   */
  --t-watch:1.1875;     /* watch floor  = 0.95 x 1.25                          */
  --t-warn:1.25;        /* incumbent threshold, unchanged                      */
  --t-crit:1.75;        /* incumbent threshold, unchanged                      */

  /* ---- type scale. Root is 16px. ---- */
  --t-micro:.625rem;    /* 10 · sans 600, .14em, uppercase — eyebrows, th, axis */
  --t-fine:.6875rem;    /* 11 · sans 400/1.5 — marginalia, footnotes, kbd       */
  --t-cap:.75rem;       /* 12 · sans 400/1.45 — figure captions, chip text      */
  --t-dense:.8125rem;   /* 13 · sans or mono/1.4 — table body, drilldown rows   */
  --t-body:.9375rem;    /* 15 · SERIF 400/1.62 — report prose, max-width 64ch   */
  --t-lede:1.0625rem;   /* 17 · SERIF 400/1.55 — lede, figure titles            */
  --t-sec:1.3125rem;    /* 21 · SERIF 400 — section heads                       */
  --t-stat:1.5rem;      /* 24 · MONO 500, -.02em — KPI figures                  */
  --t-mast:2.125rem;    /* 34 · SERIF 400, -.01em — masthead outlet name        */
}

/* ---- report, dark: the paper identity INVERTED, not replaced. Warm charcoal
        ground, rule kept warmer than the panel, so the "printed stock" reading
        survives the inversion. Guarded so an explicit light toggle wins. ---- */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#061833; --leaf:#0A2348; --band:#0F2C58; --sel:#173A72;
    --rule:#1C3C6B; --rule-2:#2D5287; --rule-hair:#122C54;
    --ink:#EAF3FC;        /* 14.1:1  warm off-white                            */
    --ink-2:#B9CDE8;
    --ink-3:#8FA9CF;      /* 5.2:1                                             */
    --bar:#6F8BB8;        /* 3.8:1  warm steel                                 */
    --bar-2:#3B5888;
    --sig0:#4FB892; --sig0-ink:#7FD0B0;   /* 6.2:1 / 8.6:1                     */
    --sig1:#D9953F; --sig1-ink:#E8B071;   /* 7.0:1 / 9.7:1 — the incumbent
                                             amber, unchanged on dark          */
    --sig2:#F0645B; --sig2-ink:#F7958E;   /* 4.8:1 / 7.3:1                     */
    --nodata:#6B7C99; --nodata-ink:#9AABC6;
    --link:#8FB8F0; --focus:#8FB8F0;
  }
}

/* Same block repeated verbatim, so an explicit toggle wins in BOTH directions:
   dark under a light OS as well as light under a dark OS. */
:root[data-theme="dark"]{
  --paper:#061833; --leaf:#0A2348; --band:#0F2C58; --sel:#173A72;
  --rule:#1C3C6B; --rule-2:#2D5287; --rule-hair:#122C54;
  --ink:#EAF3FC; --ink-2:#B9CDE8; --ink-3:#8FA9CF;
  --bar:#6F8BB8; --bar-2:#3B5888;
  --sig0:#4FB892; --sig0-ink:#7FD0B0;
  --sig1:#D9953F; --sig1-ink:#E8B071;
  --sig2:#F0645B; --sig2-ink:#F7958E;
  --nodata:#6B7C99; --nodata-ink:#9AABC6;
  --link:#8FB8F0; --focus:#8FB8F0;
}

/* ---- AUDITOR ISLAND.  Same token NAMES, so every shared component works
        unchanged; values are the shipped VA-centre palette, untouched.
        This is a COOL dark, deliberately different from the report's warm
        dark: it is not the paper identity inverted, it is the instrument
        ground that eighteen people have eight years of muscle memory in,
        and it sits beside a CCTV monitor.
        No media query. No data-theme. No exceptions.

        The workstation roots are listed alongside `.ink` so the island is
        self-pinning: /review, /qa, /labels and the nav stay dark whether or
        not the markup carries class="ink", and no future Daylight toggle can
        reach them.

        `:root.ink` is listed as well as `.ink`: the brief puts the class on
        <html class="ink">, and there the bare `.ink` (0,1,0) would LOSE to the
        dark media block's `:root:not([data-theme="light"])` (0,2,0) and hand
        the auditor the report's warm dark. The pin has to out-specify the
        thing it is pinning against, not merely follow it in source order. ---- */
:root.ink, .ink, .rv, .cp-nav{
  color-scheme: dark;
  --paper:#061833;      /* shipped --rv-bg                                     */
  --leaf:#0A2348;       /* shipped --rv-panel                                  */
  --band:#0F2C58;
  --sel:#173A72;        /* shipped --rv-sel                                    */
  --rule:#1C3C6B;       /* shipped --rv-rule                                   */
  --rule-2:#2D5287; --rule-hair:#122C54;
  --ink:#EAF3FC;        /* shipped --rv-ink.  16.5:1                           */
  --ink-2:#B9CDE8; --ink-3:#8FA9CF;   /* shipped --rv-muted, 5.9:1             */
  --bar:#6F8BB8; --bar-2:#3B5888;
  --sig0:#4FB892; --sig0-ink:#7FD0B0;
  --sig1:#D9953F; --sig1-ink:#E8B071; /* shipped --rv-accent, 7.4:1            */
  --sig2:#F0645B; --sig2-ink:#F7958E;
  --nodata:#6B7C99; --nodata-ink:#9AABC6;
  --link:#8FB8F0; --focus:#8FB8F0;
}

/* ── 2 · BASE ───────────────────────────────────────────────────────────── */

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}

/* An explicit background from a token. A transparent body renders light text
   on the browser's white — this project has already shipped that bug once. */
body{
  background:var(--paper); color:var(--ink); margin:0; min-height:100%;
  font:var(--t-body)/1.62 var(--serif);
}
/* Shrinkguard: page and section titles in the brand serif, the way shrinkguard.ai sets its headlines. */
h1, h2{font-family:var(--display); font-weight:400; letter-spacing:-.01em}

a{color:var(--link)}
:focus-visible{outline:2px solid var(--focus); outline-offset:2px}
h1:focus{outline:none}

/* Every figure is mono. Georgia ships OLD-STYLE numerals: 3, 4, 5, 7 and 9
   descend below the baseline and destroy any column of figures. Nothing
   numeric is ever set in --serif. */
/* Shrinkguard: figures in the brand sans with tabular (fixed-width) digits, so columns still align; kbd stays mono. */
kbd{ font-family:var(--mono); }
.num, td.n, th.n, .kpi .v, svg text{
  font-family:var(--sans);
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* Currency is never a literal and never {0:C} — 32 of 84 outlets trade in N$.
   The symbol comes from the outlet; the number is formatted invariant. */
.cur{font-family:var(--sans); font-size:.82em; color:var(--ink-3); padding-right:.18em}

/* ── 3 · DOCUMENT SHELL ─────────────────────────────────────────────────── */

.wrap{max-width:1120px; margin:0 auto; padding:0 calc(var(--u)*6) calc(var(--u)*24)}

/* the document grid: reading column + marginalia */
.doc-grid{display:grid; grid-template-columns:minmax(0,1fr) 232px; gap:calc(var(--u)*8)}
aside .margin{font:400 var(--t-fine)/1.5 var(--sans); color:var(--ink-2);
  border-top:1px solid var(--rule); padding-top:calc(var(--u)*2);
  margin-bottom:calc(var(--u)*4)}
aside .margin b{color:var(--ink); display:block; font-weight:650;
  font-size:var(--t-micro); letter-spacing:.1em; text-transform:uppercase;
  margin-bottom:var(--u)}
/* minmax(0,1fr), not 1fr. A grid track defaults to min-content as its floor, so a child wider
   than the column — a table, a <pre>, a long unbroken uid — makes the TRACK wider rather than
   overflowing inside it, and the document shell blows out past the viewport. The page then
   scrolls sideways, carrying the nav and the masthead with it, and no amount of overflow on the
   table can pull it back. Measured at 834: /incidents/rejected and /incidents/find. */
@media (max-width:920px){ .doc-grid{grid-template-columns:minmax(0,1fr)} }

/* section apparatus */
.secmark{display:flex; align-items:baseline; gap:calc(var(--u)*3);
  border-bottom:1.5px solid var(--ink); padding-bottom:calc(var(--u)*2);
  margin:calc(var(--u)*16) 0 calc(var(--u)*6)}
.secmark .n{font-family:var(--mono); font-size:var(--t-cap); color:var(--sig1-ink);
  border:1px solid var(--rule-2); padding:1px 6px; border-radius:var(--radius); flex:none}
h2.sec{font:400 var(--t-sec)/1.2 var(--display); margin:0; letter-spacing:-.005em}
.secmark .t{margin-left:auto; font:400 var(--t-fine)/1.4 var(--sans);
  color:var(--ink-3); text-align:right; max-width:46ch}

.eyebrow{font:600 var(--t-micro)/1.3 var(--sans); letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-3)}
.cap{font:400 var(--t-cap)/1.45 var(--sans); color:var(--ink-2); max-width:72ch}
.prose{max-width:64ch}
.prose p{margin:0 0 calc(var(--u)*3)}
.small{font:400 var(--t-fine)/1.5 var(--sans); color:var(--ink-3)}

/* ── 4 · MASTHEAD ───────────────────────────────────────────────────────── */

.mast{border-bottom:3px double var(--ink); padding:calc(var(--u)*12) 0 calc(var(--u)*4)}
.mast .kicker{display:flex; gap:calc(var(--u)*4); flex-wrap:wrap; align-items:baseline;
  font:400 var(--t-fine)/1.4 var(--sans); color:var(--ink-3);
  border-bottom:1px solid var(--rule); padding-bottom:calc(var(--u)*2);
  margin-bottom:calc(var(--u)*3)}
/* the masthead never truncates — the scale steps down instead, so
   SUPERSPAR-BRACKENFELL-HYPER fits */
.mast h1{font:400 clamp(1.5rem,3.4vw,var(--t-mast))/1.05 var(--display);
  letter-spacing:-.01em; margin:0 0 calc(var(--u)*2); text-wrap:balance}
.dateline{font:400 var(--t-cap)/1.5 var(--sans); color:var(--ink-2)}
.dateline select{font:inherit; background:transparent; color:var(--ink);
  border:0; border-bottom:1px dotted var(--rule-2); padding:1px 2px; cursor:pointer}

.readfirst{border:1px solid var(--rule-2); border-left:3px solid var(--sig1);
  background:var(--leaf); padding:calc(var(--u)*4) calc(var(--u)*5);
  margin:calc(var(--u)*5) 0; max-width:78ch}
.readfirst b:first-child{font-family:var(--sans); font-size:var(--t-micro);
  letter-spacing:.1em; text-transform:uppercase; color:var(--sig1-ink);
  display:block; margin-bottom:calc(var(--u)*2)}
.readfirst p{margin:0; font-size:var(--t-body)}

/* ── 5 · KPI BAND — hairline cells on a rule. Not cards. ────────────────── */

.kpi{display:grid; grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
  margin:calc(var(--u)*6) 0; background:var(--leaf); border:1px solid var(--rule); border-radius:1rem;
  box-shadow:var(--card-shadow); overflow:hidden}
.kpi > div{padding:calc(var(--u)*3) calc(var(--u)*4) calc(var(--u)*4);
  border-right:1px solid var(--rule)}
.kpi > div:last-child{border-right:0}
.kpi .k{font:600 var(--t-micro)/1.3 var(--sans); letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-3); display:block;
  margin-bottom:calc(var(--u)*2); min-height:2.6em}
.kpi .v{font-family:var(--display); font-size:2rem; font-weight:400; letter-spacing:-.01em;
  color:var(--ink); display:block; line-height:1.1}
.kpi .s{font:400 var(--t-fine)/1.4 var(--sans); color:var(--ink-3);
  display:block; margin-top:calc(var(--u)*2)}
@media (max-width:760px){ .kpi > div{border-right:0; border-bottom:1px solid var(--rule)} }

/* ── 6 · FIGURES ────────────────────────────────────────────────────────── */

figure{margin:calc(var(--u)*8) 0; break-inside:avoid}
figcaption{margin-top:calc(var(--u)*3)}
.figtitle{font:400 var(--t-lede)/1.3 var(--display); margin:0 0 calc(var(--u)*2)}
.figtitle .fno{font-family:var(--mono); font-size:var(--t-cap); color:var(--sig1-ink);
  margin-right:calc(var(--u)*2)}
svg.chart{width:100%; height:auto; display:block; background:var(--leaf);
  border:1px solid var(--rule)}
svg text{font-family:var(--sans)}      /* labels are apparatus … */
svg text.fig{font-family:var(--mono)}  /* … figures are mono     */
/* Drilldown targets (§5 graft 10). Charts.cs emits every day column as
   <rect class="hit" style="fill:none" pointer-events="all">, wrapped in <a> when the
   column has a drilldown. Painting nothing is the point — the rect must not sit over
   the bar it covers — so the affordance is a wash that only appears on hover/focus.
   `fill` is animated by nothing; §6.10 forbids transitions on the island and there is
   no reason to have one here either. */
svg .hit{fill:none}
svg a:hover .hit, svg a:focus-visible .hit, svg .hit:hover{fill:var(--ink); opacity:.06}
svg a:focus-visible{outline:2px solid var(--focus); outline-offset:-2px}
svg a:focus-visible .hit{fill:var(--ink); opacity:.09}

.legend{display:flex; gap:calc(var(--u)*5); flex-wrap:wrap;
  font:400 var(--t-fine)/1.4 var(--sans); color:var(--ink-2);
  margin-top:calc(var(--u)*2)}
/* The swatch carries the FOURTH channel — dash pattern — so the three reference lines
   stay distinguishable with hue stripped (§4.2). border-top-width alone draws nothing:
   the initial border-style is `none`, so a width without a style is an invisible rule.
   Style and colour are set here rather than left to the markup, because a legend key
   that disagrees with the line it labels is worse than no legend. */
.legend i{display:inline-block; width:22px; height:0; vertical-align:middle;
  margin-right:5px; border-top:2px solid var(--ink-3)}
.legend i.avg {border-top:2px solid var(--sig0)}       /* solid       = average / rate */
.legend i.warn{border-top:2px dashed var(--sig1)}      /* dashed 5 3  = 1.25x          */
.legend i.crit{border-top:2px dotted var(--sig2)}      /* fine-dotted = 1.75x          */
.legend i.gap {border-top:2px dashed var(--nodata)}    /* the void band                */
.legend .avg-t {color:var(--sig0-ink)}
.legend .warn-t{color:var(--sig1-ink)}
.legend .crit-t{color:var(--sig2-ink)}
.legend .gap-t {color:var(--nodata-ink)}

/* ── 7 · SIGN-OFF ───────────────────────────────────────────────────────── */

.signoff{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:calc(var(--u)*8); margin-top:calc(var(--u)*12);
  font:400 var(--t-fine)/1.4 var(--sans); color:var(--ink-3); break-inside:avoid}
.signoff .line{border-bottom:1px solid var(--ink-3); height:calc(var(--u)*9)}

/* ── 8 · CHIPS, BUTTONS, FORM CONTROLS ──────────────────────────────────── */

.chip{display:inline-flex; align-items:center; gap:4px; font:600 var(--t-micro)/1 var(--sans);
  letter-spacing:.07em; text-transform:uppercase; padding:4px 7px;
  border:1px solid var(--rule-2); border-radius:var(--radius);
  background:var(--band); color:var(--ink-2); white-space:nowrap}
.chip.watch{border-color:var(--sig1); color:var(--sig1-ink); background:transparent}
.chip.over {border-color:var(--sig1); color:var(--sig1-ink); background:transparent}
.chip.crit {border-color:var(--sig2); color:var(--sig2-ink); background:transparent}
/* a feed fault never wears the alarm reserved for the store's own behaviour */
.chip.gap  {border-style:dashed; border-color:var(--nodata); color:var(--nodata-ink);
  background:transparent}

.btn{font:600 var(--t-cap)/1 var(--sans); padding:7px 12px; border-radius:999px;
  border:1px solid var(--rule-2); background:var(--leaf); color:var(--ink); cursor:pointer}
.btn:hover{background:var(--band)}
/* A link styled as a button stays an inline box otherwise: its padding spills over the line above and its top margin is
   ignored ("All goals →" sat on the flagged list, 2026-11-12). Buttons are inline-block already. */
a.btn{display:inline-flex; align-items:center; gap:.35em; text-decoration:none}
.btn.quiet{background:transparent; color:var(--link); border-color:var(--rule)}
/* Moved up from the /admin/sites block, which also carried a SECOND `.btn` and `.btn.quiet`.
   Those two were byte-for-byte overrides at equal specificity, so they won on source order —
   application-wide, on every screen, not only the seven admin ones. `.primary` and `:disabled`
   were the only definitions and had to come with them. */
.btn.primary{background:var(--brand-deep, var(--link)); border-color:var(--brand-deep, var(--link)); color:#fff; font-weight:600}
.btn.primary:hover{background:var(--brand); border-color:var(--brand)}
.btn:disabled{opacity:.5; cursor:not-allowed}

.f{font:400 var(--t-cap)/1.2 var(--sans); background:var(--leaf); color:var(--ink);
  border:1px solid var(--rule-2); border-radius:var(--radius); padding:5px 7px}
/* long outlet names truncate HERE and nowhere else, with the full string in title */
select.f{max-width:26ch; text-overflow:ellipsis}

/* ── 9 · DOCUMENT TABLES ────────────────────────────────────────────────── */
/* Scoped to .wrap. The reference plate is a single-page document and can style
   bare `table`; this app also serves the pinned workstation on the same
   stylesheet, and a bare `tbody tr:hover td` background would paint over the
   queue's selected-row rail. No zebra striping anywhere — 1px hairlines only. */

.wrap table{border-collapse:collapse; width:100%; font:400 var(--t-dense)/1.4 var(--sans)}
.wrap thead th{text-align:left; font:600 var(--t-micro)/1.3 var(--sans); letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-3); padding:calc(var(--u)*2);
  border-bottom:1px solid var(--rule-2); white-space:nowrap}
.wrap tbody td{padding:calc(var(--u)*2); border-bottom:1px solid var(--rule-hair);
  color:var(--ink-2); vertical-align:baseline}
.wrap tbody tr:hover td{background:var(--band)}
.wrap tbody td:first-child{color:var(--ink)}
.wrap td.n, .wrap th.n{text-align:right; white-space:nowrap}
/* The wrapper every wide table needs. `overscroll-behavior-x` stops a horizontal flick inside a
   table turning into a browser back-navigation, which on a review workstation loses the clip. */
.scroll{overflow-x:auto; overscroll-behavior-x:contain}
/* Below the table's own comfortable width, scroll rather than crush every column to one word
   per line. 46rem is the narrowest any of these tables reads at. */
.scroll > table{min-width:min(46rem, 100%)}

/* Dates and states are one token each and must not wrap. /admin/users' LAST SEEN was wrapping to
   three lines and stealing the width CREDENTIAL needed for its own header. */
.wrap td.when, .wrap th.when, .grid td.when, .grid th.when,
.wrap td.state, .wrap th.state, .grid td.state, .grid th.state{white-space:nowrap}

/* A rejection reason is prose in a table cell. Two lines, then an ellipsis, with the whole of it
   in `title` — a cell that grows to eleven lines pushes every other column off the screen. */
.wrap td.clamp2, .grid td.clamp2{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; max-width:44ch}

/* A KPI value that is one long unbroken token — a uid, an email — was crossing the rule into the
   next cell rather than wrapping inside its own. */
.kpi .v, .kpi .s, .kpi .k{overflow-wrap:anywhere}

.wrap kbd{display:inline-block; min-width:15px; text-align:center; padding:1px 4px;
  margin-right:4px; font-size:9.5px; border:1px solid var(--rule-2);
  border-bottom-width:2px; border-radius:var(--radius);
  background:var(--paper); color:var(--ink)}

/* ── 10 · BLAZOR PLUMBING ───────────────────────────────────────────────── */

.valid.modified:not([type=checkbox]){outline:1px solid var(--sig0)}
.invalid{outline:1px solid var(--sig2)}
.validation-message{color:var(--sig2-ink)}

/* MainLayout renders #blazor-error-ui unconditionally and the framework un-hides it by
   setting an inline display when a circuit dies. The rule that hides it the rest of the
   time is NOT optional plumbing: without it the bar "An unhandled error has occurred.
   Reload 🗙" is permanently visible on every route, sits over the auditor's transport
   bar, and prints at the foot of the client's signed exception finding. Do not delete
   this as scaffold.
   The framework toggles `display`, so the default must be `display:none` WITHOUT
   !important, or the inline style it sets can never win. */
#blazor-error-ui{
  display:none; position:fixed; left:0; right:0; bottom:0; z-index:1000;
  padding:calc(var(--u)*3) calc(var(--u)*10) calc(var(--u)*3) calc(var(--u)*5);
  background:var(--band); color:var(--ink);
  border-top:2px solid var(--sig2);
  font:400 var(--t-cap)/1.5 var(--sans);
}
#blazor-error-ui .reload{color:var(--link); margin-left:calc(var(--u)*3)}
#blazor-error-ui .dismiss{position:absolute; right:calc(var(--u)*3); top:calc(var(--u)*2);
  cursor:pointer; color:var(--ink-3)}

/* the scaffolded error page: there is no Bootstrap, so .text-danger has to be real */
.text-danger{color:var(--sig2-ink)}

.blazor-error-boundary{
  background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding:1rem 1rem 1rem 3.7rem;
  color:#fff;
}
.blazor-error-boundary::after{content:"An error has occurred."}

/* ═══════════════════════════════════════════════════════════════════════════
   11 · REVIEW WORKSTATION
   Preserved verbatim in structure and geometry; refactored off the old --rv-*
   variables onto the shared token names, all inside the .ink scope, so /review
   and /qa render byte-identical while becoming theme-proof:
     --rv-bg -> --paper      --rv-panel -> --leaf    --rv-rule -> --rule
     --rv-ink -> --ink       --rv-muted -> --ink-3   --rv-accent -> --sig1
     --rv-sel -> --sel
   The verdict greens, reds and ambers below stay literal on purpose: the token
   equivalents are re-pegged and would visibly change a screen eighteen people
   read all day. Nothing in here moves, glows or casts a shadow.
   ═══════════════════════════════════════════════════════════════════════════ */

/* The island paints the viewport behind itself, so the light body never shows
   through above or beside a workstation route. */
/* overflow-x:auto, not hidden. The body below carries a min-width, so on a narrow screen there
   IS something to scroll to — hiding it would clip the receipt off the right instead. */
.rv{ position:fixed; inset:0; display:flex; flex-direction:column;
     overflow-y:auto; overflow-x:auto;
     background:var(--paper); color:var(--ink);
     font:14px/1.5 var(--sans); }
/* The selectors stay put — the shell scrolls now (see .rv-body's floor). */
.rv-bar{ position:sticky; top:0; z-index:6;
         display:flex; gap:1rem; align-items:center; flex-wrap:wrap;
         padding:.55rem .9rem; border-bottom:1px solid var(--rule); background:var(--leaf); }
.rv-bar label{ display:flex; gap:.4rem; align-items:center; font-size:.78rem; color:var(--ink-3); }
.rv-bar select,.rv-bar input{ background:var(--paper); color:var(--ink);
  border:1px solid var(--rule); border-radius:4px; padding:.25rem .4rem; font-size:.82rem;
  max-width:22ch; text-overflow:ellipsis; }
.rv-find{ display:flex; gap:.25rem; align-items:center; margin:0; }
.rv-find input{ width:15rem; }
.rv-status{ margin-left:auto; font-size:.76rem; color:var(--sig1);
  font-family:var(--mono); }

/* The queue was 200px holding four nowrap columns, so Value — the column that
   says how much is at stake — sat behind a horizontal scrollbar and was the one
   thing an auditor could not see while choosing what to open. Widened, and the
   table is fixed-layout below so the camera name ellipsises instead of pushing
   the money off the edge. */
/* ── the site strip ───────────────────────────────────────────────────────
   A row between the filters and the work, not a column: it is read once on
   arrival and must not take width from the video or the receipt for the rest
   of the shift. flex:none so it never grows at the body's expense. */
.rv-site{ flex:none; background:var(--leaf); border-bottom:1px solid var(--rule); }
.rv-site-t{ display:flex; gap:.6rem; align-items:center; width:100%; text-align:left;
  background:none; border:0; color:var(--ink-2); cursor:pointer;
  padding:.35rem .9rem; font:inherit; font-size:.78rem; }
.rv-site-t:hover{ color:var(--ink); }
.rv-site-t .caret{ font-size:.7rem; color:var(--ink-3); width:.8em; }
.rv-site-t b{ font-weight:650; color:var(--ink); }
.rv-site-t .chip{ font-size:.66rem; letter-spacing:.04em; border:1px solid var(--rule);
  border-radius:3px; padding:.08em .4em; color:var(--ink-3); }
.rv-site-t .chip.warn{ border-color:#5a4526; color:#c9a227; }
.rv-site-t .chip.crit{ border-color:#5a3a36; color:#c07a72; }

.rv-site-b{ display:grid; gap:.1rem 1.6rem; padding:.2rem .9rem .6rem 2.2rem;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.rv-site-b .stat{ display:flex; flex-direction:column; gap:.05rem;
  padding:.35rem 0; border-top:1px solid var(--rule); }
.rv-site-b .k{ font-size:.62rem; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); }
.rv-site-b .v{ font-family:var(--mono); font-size:1.05rem; font-variant-numeric:tabular-nums;
  color:var(--ink); line-height:1.2; }
.rv-site-b .v.bad{ color:#c07a72; }
.rv-site-b .v.none{ color:var(--ink-3); }
.rv-site-b .v .of{ font-size:.7em; color:var(--ink-3); }
.rv-site-b .s{ font-size:.68rem; color:var(--ink-3); }
.rv-site-b .s b.up{ color:#c9a227; }
.rv-site-b .s b.stale{ color:#c9a227; }
/* The feed-absent note is prose, not a number — it gets the whole row. */
.rv-site-b .stat.feedless{ grid-column:1/-1; }
.rv-site-b .stat.feedless .s{ max-width:80ch; }

/* ── why this clip ────────────────────────────────────────────────────────
   A page row under the site strip, sharing its ground so the two read as one
   header block. It was a stacked block inside the receipt column and took a
   third of the till slip's height to say something read once per clip.

   Full width means the blocks go SIDE BY SIDE, which is also what makes this
   version shorter than the one it replaces. flex:none so it never grows into
   the video. */
.rv-ctx{ flex:none; border-bottom:1px solid var(--rule); background:var(--leaf); }
.rv-ctx-t{ display:flex; gap:.6rem; align-items:center; width:100%; text-align:left;
  background:none; border:0; color:var(--ink-2); cursor:pointer;
  padding:.35rem .9rem; font:inherit; font-size:.78rem; }
.rv-ctx-t:hover{ color:var(--ink); }
.rv-ctx-t .caret{ font-size:.7rem; color:var(--ink-3); width:.8em; }
.rv-ctx-t b{ color:var(--ink); font-weight:650; }
.rv-ctx-t .chip{ font-size:.66rem; letter-spacing:.04em; border:1px solid var(--rule);
  border-radius:3px; padding:.08em .4em; color:var(--ink-3); }
.rv-ctx-t .chip.warn{ border-color:#5a4526; color:#c9a227; }
.rv-ctx-t .chip.crit{ border-color:#5a3a36; color:#c07a72; }

.rv-ctx-b{ display:grid; gap:0 1.6rem; align-items:start;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  padding:.1rem .9rem .5rem 2.2rem; max-height:30vh; overflow-y:auto; }
.ctx-blk{ padding:.35rem 0; border-top:1px solid var(--rule); }
/* Columns, not a stack — the rule that separated stacked blocks now runs along
   the top of each one instead. */
.ctx-blk + .ctx-blk{ margin-top:0; }
.ctx-blk h5{ margin:0 0 .25rem; font-size:.72rem; color:var(--sig1); font-weight:650; }
.ctx-blk h5 em{ font-style:normal; color:var(--ink-3); font-weight:400; margin-left:.4rem;
  font-size:.9em; }
.ctx-list{ list-style:none; margin:0; padding:0; }
/* THREE columns on ONE line: label, number, qualifier. In the narrow receipt column the
   qualifier had to wrap under the number, which doubled every row's height — six rows
   became twelve lines and the panel grew tall enough to squeeze the video. Full width is
   what buys the single line back, and it is the whole reason this moved. */
.ctx-list li{ display:grid; grid-template-columns:8.5rem auto 1fr; gap:0 .5rem;
  padding:.11rem 0; font-size:.73rem; align-items:baseline; }
.ctx-list span{ color:var(--ink-3); font-size:.66rem; letter-spacing:.05em;
  text-transform:uppercase; }
.ctx-list b{ font-family:var(--mono); font-variant-numeric:tabular-nums; color:var(--ink);
  font-weight:650; white-space:nowrap; }
.ctx-list b.up{ color:#c9a227; }
.ctx-list b .of{ font-size:.8em; color:var(--ink-3); font-weight:400; }
.ctx-list em{ font-style:normal; font-size:.68rem; color:var(--ink-3);
  overflow:hidden; text-overflow:ellipsis; }
.ctx-list em b{ font-size:1em; font-family:var(--mono); }
.ctx-none{ margin:.2rem 0 0; font-size:.7rem; color:var(--ink-3); line-height:1.45; }
.ctx-none b{ color:var(--ink-2); }

/* ── still open at this site ──────────────────────────────────────────────
   A page-level row under the body. Bounded height: it is a reference list and
   is never allowed to become the page. */
.rv-open{ flex:none; background:var(--leaf); border-top:1px solid var(--rule); }
.rv-open-t{ display:flex; gap:.5rem; align-items:center; width:100%; text-align:left;
  background:none; border:0; color:var(--ink-2); cursor:pointer;
  padding:.35rem .9rem; font:inherit; font-size:.76rem; }
.rv-open-t:hover{ color:var(--ink); }
.rv-open-t .caret{ font-size:.7rem; color:var(--ink-3); width:.8em; }
.rv-open-t b{ color:var(--ink); font-weight:650; }
.rv-open-t em{ font-style:normal; color:var(--ink-3); font-size:.9em; }
.rv-open-b{ max-height:26vh; overflow-y:auto; }
.rv-open-b table{ width:100%; border-collapse:collapse; font-size:.74rem; }
.rv-open-b th{ position:sticky; top:0; background:var(--leaf); text-align:left;
  padding:.3rem .6rem; font-size:.62rem; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-3); border-bottom:1px solid var(--rule); }
.rv-open-b td{ padding:.3rem .6rem; border-bottom:1px solid var(--rule);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:26ch; }
.rv-open-b td.d{ font-family:var(--mono); color:var(--ink-2); }
.rv-open-b td.note{ color:var(--ink-3); max-width:38ch; }
.rv-open-b tbody tr{ cursor:pointer; }
.rv-open-b tbody tr:hover{ background:var(--band); }
.rv-open-b tbody tr.sel{ background:var(--sel); }

/* The override door. Deliberately the quietest of the three actions on the gate:
   it is legitimate and it is not the one to reach for first. */
.rv-gate .gate-over{ background:none; border:1px dashed var(--rule-2); color:var(--ink-3); }
.rv-gate .gate-over:hover{ color:#c9a227; border-color:#5a4526; }
/* A triggered recalibration is a different alarm from an unverified camera — the
   camera looks fine and is not. */
.rv-gate.triggered{ border-color:#c9a227; }

/* The stage carries a FLOOR, and its single row is pinned to that floor.
   Two separate faults, both of which put the video on top of the findings section:

   1. flex:1 means flex-basis:0, so with both info panels open on a 768px screen the free
      space went negative and this box collapsed to h=0. min-height is the floor for that.
   2. A floor alone was not enough. The row was `auto`, so it sized to CONTENT — and the
      content includes a <video> at width:100%, which takes its aspect-ratio height (350px
      at a 623px column) whatever min-height:0 says. Measured after the floor went in:
      body h=400, its three columns h=493, findings at 508 — 93px of video and hint strip
      painted over the queue and the findings below. minmax(0,1fr) makes the row exactly
      as tall as the box, so the frame sizes to the space it is given rather than the other
      way round, and .rv-player needs min-height:0 to accept it.

   Below the floor the stack is simply taller than the window and .rv scrolls the
   difference, which is what "move down" means here. */
/* THE FLOOR UNDER THE THREE PANELS.
   Without a min-width the grid honours its two minima and gives the CENTRE — the clip, the thing
   the screen exists to show — whatever is left. Measured at 834 before this: queue 258, receipt
   400, player 120. A 120px video is not a small video, it is not a video.
   The sum of the intended minima is 258 + 700 + 400; below that the workstation scrolls AS A
   UNIT (see `.rv`), which keeps every panel usable and moves one scrollbar to the shell instead
   of crushing the middle. This is the containment half of D31; the rest of that deliverable —
   the receipt yielding below 1440 so ALLOCATED TO survives, and the board leaving the grid while
   nothing is selected — is still open. */
.rv-body{ flex:1; display:grid; grid-template-columns:minmax(258px,17%) 1fr minmax(400px,32%);
          grid-template-rows:minmax(0,1fr);
          min-width:1358px;
          min-height:min(58vh,400px); }
.rv-queue,.rv-receipt{ overflow-y:auto; background:var(--leaf); min-height:0; }
.rv-queue{ border-right:1px solid var(--rule); }
.rv-receipt{ border-left:1px solid var(--rule); }
.rv-queue table{ width:100%; border-collapse:collapse; font-size:.78rem; }
.rv-queue th{ position:sticky; top:0; background:var(--leaf); text-align:left;
  padding:.4rem .55rem; font-size:.66rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); border-bottom:1px solid var(--rule); }
.rv-queue td{ padding:.32rem .55rem; border-bottom:1px solid var(--rule); white-space:nowrap; }
.rv-queue tbody tr{ cursor:pointer; }
.rv-queue tbody tr:hover{ background:var(--band); }
.rv-queue tr.sel{ background:var(--sel); }
/* Clicked, not yet open. Dimmer than `sel` so the two are not confused, and present from the
   frame after the click rather than after three round trips. */
.rv-queue tr.pending{ background:var(--band); }
.rv-queue tr.pending td:first-child{ box-shadow:inset 2px 0 0 var(--sig1); }
.rv-queue td.n,.rv-queue th.n{ text-align:right; font-variant-numeric:tabular-nums;
  font-family:var(--mono); }
.rv-queue td.n.warn{ color:var(--sig1); font-weight:700; }
.rv-queue table{ table-layout:fixed; }
.rv-queue th:nth-child(1), .rv-queue td:nth-child(1){ width:23%; }
.rv-queue th:nth-child(2), .rv-queue td:nth-child(2){ width:27%; }
.rv-queue th:nth-child(3), .rv-queue td:nth-child(3){ width:26%; }
.rv-queue th:nth-child(4), .rv-queue td:nth-child(4){ width:24%; }
.rv-queue td{ overflow:hidden; text-overflow:ellipsis; }

/* QA's queue is three columns, not Review's four, and the middle one carries the
   claim being judged — it gets the room. Without this the widths above apply and
   the finding text, the only column a QA reviewer scans on, is the one clipped. */
.rv-body.qa .rv-queue th:nth-child(1), .rv-body.qa .rv-queue td:nth-child(1){ width:18%; }
.rv-body.qa .rv-queue th:nth-child(2), .rv-body.qa .rv-queue td:nth-child(2){ width:54%; }
.rv-body.qa .rv-queue th:nth-child(3), .rv-body.qa .rv-queue td:nth-child(3){ width:28%; }
.rv-body.qa .rv-queue th:nth-child(4), .rv-body.qa .rv-queue td:nth-child(4){ width:auto; }
.rv-queue .none{ color:var(--ink-3); font-style:italic; }

.rv-empty{ padding:1rem; color:var(--ink-3); font-size:.8rem; }

/* ---- the front door: where the unreviewed work is -------------------------
   Sits over the stage while no clip is open (see Review.razor). The stage is
   black, so this is a panel rather than a wash — it has to read as a thing to
   act on, not as an empty player with text on it. */
.rv-start{ position:absolute; inset:0; z-index:4; display:flex; flex-direction:column;
  background:var(--paper); color:var(--ink); }
.rv-start-hd{ flex:none; padding:1rem 1.1rem .7rem; border-bottom:1px solid var(--rule); }
.rv-start-hd h3{ margin:0 0 .25rem; font-size:1rem; font-weight:650; letter-spacing:-.01em; }
.rv-start-hd p{ margin:0; font-size:.8rem; color:var(--ink-3); line-height:1.5; max-width:58ch; }
.rv-start-scroll{ flex:1; overflow-y:auto; min-height:0; }
.rv-start table{ width:100%; border-collapse:collapse; font-size:.8rem; }
.rv-start th{ position:sticky; top:0; z-index:1; background:var(--leaf); text-align:left;
  padding:.45rem .7rem; font-size:.64rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); border-bottom:1px solid var(--rule); }
.rv-start td{ padding:.4rem .7rem; border-bottom:1px solid var(--rule); white-space:nowrap; }
.rv-start tbody tr{ cursor:pointer; }
.rv-start tbody tr:hover{ background:var(--band); }
.rv-start td.n, .rv-start th.n{ text-align:right; font-family:var(--mono);
  font-variant-numeric:tabular-nums; }
.rv-start td.d{ font-family:var(--mono); color:var(--ink-2); }
.rv-start td.c{ color:var(--ink-3); }
/* Allocation. Yours is marked on the row, not only by position — the sort puts your work
   at the top, but "the top" is not a fact you can point at once you have scrolled. */
.rv-start tbody tr.mine{ background:var(--band); }
.rv-start tbody tr.mine td.d{ box-shadow:inset 2px 0 0 var(--sig1); color:var(--ink); }
.rv-start tbody tr.theirs{ opacity:.62; }
.rv-start tbody tr.theirs:hover{ opacity:1; }
.rv-start td.a select{ background:var(--paper); color:var(--ink-2); font-size:.72rem;
  border:1px solid var(--rule); border-radius:3px; padding:.1rem .2rem; max-width:11rem; }
.rv-start td.a select:hover{ color:var(--ink); border-color:var(--sig1); }

.rv-player{ display:flex; flex-direction:column; min-width:0; min-height:0; background:#000; }
.rv-stage{ position:relative; flex:1; min-height:0; display:flex; }
#clip{ flex:1; width:100%; min-height:0; background:#000; object-fit:contain; }
/* One panel per camera on the till: the labelled clip (with the zone overlay) plus any linked camera's view of
   the same sale beside it. Each panel is its own positioning box, so the overlay still letterboxes onto #clip. */
.rv-view{ position:relative; flex:1; min-width:0; min-height:0; display:flex; }
/* Stacked, not side by side: the player column is taller than it is wide, so two 16:9 views stacked are ~3x the
   picture of two squeezed next to each other. Only a very wide screen gets them side by side. */
.rv-stage.dual{ gap:2px; flex-direction:column; flex:1 1 0; min-height:min(52vh,440px); }
/* Two views need a floor, or a short screen squeezes them to postage stamps (~68 px each at 600 px tall) and
   whatever no longer fits under them (calibration, clip bar, the verdict panel) is clipped with no way to reach it.
   With the floor, the column scrolls instead: a tall screen is unchanged, a short one scrolls to the panel. */
.rv-player:has(.rv-stage.dual){ overflow-y:auto; }
/* A follower still fetching from the box (the labelled clip waits for it — scanbench.js follow()). */
.rv-view.syncing .rv-camtag::after{ content:" · loading…"; color:var(--sig1); }
/* Not-scanned draft: which view the item is boxed on (the labelled clip or a linked camera). */
.rv-boxon{ display:inline-flex; gap:.3rem; align-items:center; font-size:.72rem; color:var(--ink-3); margin-left:.4rem; }
.rv-boxon .btn{ font-size:.7rem; padding:.18rem .5rem; }
.rv-boxon .btn.on{ color:var(--sig1); border-color:var(--sig1); font-weight:600; }
@media (min-width:2400px){ .rv-stage.dual{ flex-direction:row; } }
.rv-view video.clip-linked{ flex:1; width:100%; min-height:0; background:#000; object-fit:contain; }
.rv-camtag{ position:absolute; top:.4rem; right:.5rem; z-index:2; pointer-events:none; font-size:.68rem;
  color:#fff; background:rgba(0,0,0,.6); padding:.12em .5em; border-radius:3px; letter-spacing:.02em; }

/* Scan-zone / detector-box overlay. viewBox is frame pixels + preserveAspectRatio meet, so it
   letterboxes identically to the video's object-fit:contain and a fractional zone lands true. */
.zoneov{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.zoneov .z-scan{ fill:none; stroke:var(--sig1); stroke-width:2; vector-effect:non-scaling-stroke;
  stroke-dasharray:6 4; opacity:.9; }
.zoneov .z-det{ fill:var(--sig2); fill-opacity:.14; stroke:var(--sig2); stroke-width:2;
  vector-effect:non-scaling-stroke; }
/* The reviewer's own training box, and the live rubber-band while dragging it. */
.zoneov .z-human{ fill:var(--sig1); fill-opacity:.16; stroke:var(--sig1); stroke-width:2.5;
  vector-effect:non-scaling-stroke; }
.zoneov .z-draw{ display:none; fill:var(--sig1); fill-opacity:.10; stroke:var(--sig1);
  stroke-width:2; stroke-dasharray:5 3; vector-effect:non-scaling-stroke; }
.rv-draw .box-set{ color:var(--sig1); font-weight:600; }
.rv-notscanned{ border-left:3px solid var(--sig1); padding-left:.5rem; }
.rv-notscanned .chk{ color:var(--sig1); font-weight:700; }

/* Per-clip calibration read-out under the player. */
.rv-calib{ display:flex; gap:1.2rem; flex-wrap:wrap; align-items:baseline;
  padding:.3rem .8rem; background:var(--leaf); border-top:1px solid var(--rule);
  font-size:.72rem; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.rv-calib b{ color:var(--ink); font-weight:600; }
.rv-calib em{ font-style:normal; color:var(--ink-3); font-size:.66rem;
  border:1px solid var(--rule); border-radius:3px; padding:0 .3em; }
.rv-calib .bad{ color:var(--sig2-ink); font-weight:600; }

/* Clip id at the head of the slip. */
.rv-clipid{ position:sticky; top:0; z-index:3; display:flex; gap:.5rem; align-items:baseline;
  background:var(--paper); border-bottom:1px solid var(--sig1);
  padding:.35rem .55rem; font:.72rem/1.4 var(--mono); }
.rv-clipid .lbl{ color:var(--sig1); text-transform:uppercase; letter-spacing:.1em; font-size:.62rem; }
.rv-clipid b{ color:var(--ink); }
.rv-clipid .rid{ margin-left:auto; color:var(--ink-3); }
.rv-clipid .rv-slip{ color:var(--ink); font-weight:600; }
.rv-clipid .rv-when{ color:var(--ink-2); }

/* 7-day quality strip in the top bar. */
.qstrip{ display:flex; gap:2px; align-items:flex-end; height:26px; margin-left:auto; }
.qbar{ position:relative; width:9px; height:100%; display:flex; align-items:flex-end;
  background:var(--rule-hair); border-radius:1px; }
.qbar i{ display:block; width:100%; min-height:2px; border-radius:1px; background:var(--ink-3); }
.qbar.ok   i{ background:#2e7d46; }
.qbar.warn i{ background:#c98a1a; }
.qbar.bad  i{ background:var(--sig2); }
.qbar.none i{ background:var(--rule); height:4px; }
.rv-hint{ display:flex; gap:1rem; flex-wrap:wrap; padding:.4rem .8rem;
  background:var(--leaf); border-top:1px solid var(--rule);
  font-size:.7rem; color:var(--ink-3); }
.rv-hint kbd{ background:var(--paper); border:1px solid var(--rule); border-radius:3px;
  padding:.05em .35em; font-family:var(--mono); font-size:.9em; margin:0 .1em; }
.rv-tip{ margin-left:auto; color:var(--sig1); }

/* receipt: monospace because these are column-aligned till slips and the
   alignment carries meaning */
/* The slip scrolls horizontally as ONE block, so every line shifts together and
   the columns stay aligned. Ellipsis was hiding the price and SQN columns — which
   are the fields an auditor is actually reading. */
#receipt{ display:flex; flex-direction:column; min-width:max-content; }
.rv-receipt{ overflow:auto; }
.txn-head{ position:sticky; top:0; left:0; z-index:2; background:var(--paper);
  border-bottom:1px solid var(--sig1); color:var(--sig1);
  padding:.35rem .55rem; font:600 .68rem/1.4 var(--mono);
  letter-spacing:.1em; text-transform:uppercase; }
.receipt-line{ display:flex; gap:.5rem; min-width:100%; width:max-content;
  text-align:left; cursor:pointer;
  background:none; border:0; border-bottom:1px solid var(--rule-hair);
  padding:.22rem .55rem; font:11.5px/1.45 var(--mono);
  transition:color .12s linear; }
.receipt-line:hover{ background:var(--band); }
.receipt-line .t{ font-variant-numeric:tabular-nums; flex:none; }
.receipt-line .x{ white-space:pre; }   /* never ellipsise — the right-hand columns are the data */

/* Three states. The receipt is shadowed until playback reaches it, then it turns
   white — so the slip reads as a live document and the auditor can see at a glance
   how far through the transaction the video is. */
.receipt-line.future     { color:#4a4f5e; }              /* shadowed — not yet reached */
.receipt-line.future .t  { color:#3a3f4c; }
.receipt-line.past       { color:#ffffff; }              /* revealed by playback */
.receipt-line.past .t    { color:var(--ink-3); }
.receipt-line.current    { background:var(--sel); color:#fff; }
.receipt-line.current .t { color:var(--sig1); }
.receipt-line.current .x { font-weight:600; }
/* No object to see — vouchers, airtime, cashback. Kept visible but recessed,
   because they still matter to the auditor even though a vision model must
   never be scored on them. */
.receipt-line.nonphysical .x{ font-style:italic; opacity:.65; }

/* ── training-QA scan states ──────────────────────────────────────────────
   A left rail carries the state so it reads at a glance down an otherwise-uniform
   slip: RED for anything that is NOT the ordinary "one item crosses" — a detector
   proposal to check (flag, unjudged) or a confirmed signal (sig) — GREEN once a
   scan is confirmed clean. Rail only, so playback's future/past reveal still shows
   through. */
.receipt-line.flag{ box-shadow:inset 3px 0 0 var(--sig2); }
.receipt-line.flag .x{ color:var(--sig2-ink); }
.receipt-line.ok  { box-shadow:inset 3px 0 0 var(--sig0); }
.receipt-line.sig { box-shadow:inset 3px 0 0 var(--sig2); }
.receipt-line.sig .x{ color:var(--sig2-ink); font-weight:600; }
.receipt-line.excl{ opacity:.6; }
/* Detector hasn't scored this line yet — neutral dotted rail, NOT the red anomaly rail. */
.receipt-line.unscored{ box-shadow:inset 3px 0 0 var(--rule-2); }
.flag-txt{ color:var(--sig2-ink); font-weight:600; }
.unscored-txt{ color:var(--ink-3); font-weight:600; }
/* Clip in the queue carries a proposed anomaly — same red rail as its lines. */
.rv-queue tr.flag td:first-child{ box-shadow:inset 3px 0 0 var(--sig2); }
.rv-queue tr.flag td.n{ color:var(--sig2-ink); font-weight:600; }

/* Actioned — a reviewer has already saved labels here. Green so finished work reads at a glance;
   defined AFTER .flag so an actioned-but-flagged clip shows green (it has been dealt with). */
.rv-queue tr.done td:first-child{ box-shadow:inset 3px 0 0 var(--sig0); }
.rv-queue tr.part td:first-child{ box-shadow:inset 3px 0 0 color-mix(in srgb, var(--sig0) 55%, transparent); }
.receipt-line.actioned{ background:color-mix(in srgb, var(--sig0) 16%, transparent); }
.receipt-line.actioned .x{ color:var(--sig0-ink); }
.receipt-line .ok-check{ margin-left:.35rem; color:var(--sig0-ink); font-weight:700; }
/* Selected slip line — an orange glow so the line being labelled is unmistakable. Outline (not the
   inset rail box-shadow) draws the ring so it stacks over any flag/actioned state; the outer
   box-shadow is the glow. Defined last so selection wins the eye over every other line state. */
.receipt-line.on{ background:color-mix(in srgb, var(--sig1) 15%, transparent);
  outline:1.5px solid var(--sig1); outline-offset:-1px; position:relative; z-index:1;
  box-shadow:0 0 9px 1px color-mix(in srgb, var(--sig1) 55%, transparent); }
.receipt-line.on .x{ color:#fff; font-weight:600; }
.receipt-line.on .t{ color:var(--sig1); }
/* A box saved on a prior action for the selected line — dashed green, distinct from the solid live
   draw (z-human) and the detector's proposal (z-det). */
.zoneov .z-saved{ fill:var(--sig0); fill-opacity:.10; stroke:var(--sig0); stroke-width:2;
                  stroke-dasharray:5 4; vector-effect:non-scaling-stroke; }
/* ── Training-QA action panel: clip toolbar + one work card per scan ──────────────
   Replaces the old stack of look-alike .rv-verdict bars (which showed the detector's
   call twice and blurred clip-level with line-level). Clip status + clip actions sit
   in one toolbar; everything about the ONE scan being judged is a single bordered card. */
.rv-clipbar{ display:flex; gap:.5rem 1rem; align-items:center; justify-content:space-between;
  flex-wrap:wrap; padding:.45rem .8rem; background:var(--leaf); border-top:1px solid var(--rule); }
.rv-counts{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.rv-clipacts{ display:flex; gap:.4rem; align-items:center; }
.rv-counts .chk{ font-size:.66rem; letter-spacing:.07em; text-transform:uppercase;
  color:var(--sig1); border:1px solid var(--sig1); border-radius:3px; padding:.14em .45em; }
.rv-counts .tag{ font-size:.68rem; color:var(--ink-2); background:var(--band);
  border-radius:3px; padding:.14em .5em; white-space:nowrap; }
.rv-counts .tag.ok{ color:var(--sig0-ink); }
.rv-counts .tag.flag{ color:var(--sig2-ink); font-weight:600; }
.rv-counts .tag.mute{ color:var(--ink-3); }

/* The scan being judged — one card, so line-level and clip-level never blur. */
.rv-work{ margin:.55rem .7rem .7rem; background:var(--leaf); border:1px solid var(--rule);
  border-radius:6px; padding:.6rem .7rem; display:flex; flex-direction:column; gap:.55rem; }
.rv-work.rv-notscanned{ border-left:3px solid var(--sig1); }
.rv-work-head{ display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
.rv-work-head .chk{ font-size:.74rem; letter-spacing:.05em; text-transform:uppercase;
  color:var(--sig1); font-weight:700; border:0; padding:0; }
.rv-work-head .bc{ font-family:var(--mono); font-size:.72rem; color:var(--ink-2);
  background:var(--band); border-radius:3px; padding:.1em .4em; }
.rv-work-head .at{ font-size:.72rem; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.rv-work-head .hint{ font-size:.72rem; color:var(--ink-3); }
.rv-work-head > .btn{ margin-left:auto; }

/* Model read: what the detector proposed → what a human set, plus the gesture shadow. One line. */
.rv-read{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap;
  font-size:.74rem; padding:.35rem .5rem; background:var(--paper); border-radius:4px; }
.rv-read .io em{ font-style:normal; color:var(--ink-3); text-transform:uppercase;
  font-size:.6rem; letter-spacing:.06em; margin:0 .25em; }
.rv-read .io b{ color:var(--ink); }
.rv-read .io.set b{ color:var(--sig0-ink); }
.rv-read .io.pend b{ color:var(--sig1); }
.rv-read .arrow{ opacity:.5; }
.rv-read .gest{ margin-left:auto; color:var(--ink-2); }
.rv-read .gest.flag{ color:var(--sig1); font-weight:600; }

.rv-boxrow{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; font-size:.72rem; }
.rv-boxrow .ok{ color:var(--sig0-ink); font-weight:600; }
.rv-boxrow .hint{ color:var(--ink-3); }

/* The verdict buttons — the primary action, set off by a divider above them. */
.rv-actions{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.rv-actions .btn{ font-size:.78rem; padding:.4rem .7rem; }
.rv-actions.verdicts{ padding-top:.5rem; border-top:1px dashed var(--rule); }
.rv-actions .btn b{ display:inline-block; min-width:1.05em; text-align:center;
  margin-right:.35em; color:var(--sig1); }
.rv-actions .btn.primary b{ color:inherit; }

.idle-line{ margin:.7rem; color:var(--ink-2); font-size:.8rem; line-height:1.55; }

/* Void SOP panel — only on a void clip: the presence model's compliance call + the human confirm. */
.rv-void{ margin:.55rem .7rem 0; background:var(--leaf); border:1px solid var(--rule);
  border-left:3px solid var(--sig1); border-radius:6px; padding:.55rem .7rem;
  display:flex; flex-direction:column; gap:.5rem; }
.rv-void-head{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.rv-void-head .vlbl{ font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--sig1); }
.rv-void-head .vcall{ font-size:.74rem; font-weight:700; border-radius:3px; padding:.12em .5em; }
.rv-void-head .vcall.ok{ color:var(--sig0-ink); background:color-mix(in srgb, var(--sig0) 16%, transparent); }
.rv-void-head .vcall.bad{ color:var(--sig2-ink); background:color-mix(in srgb, var(--sig2) 16%, transparent); }
.rv-void-head .vmeta{ font-size:.72rem; color:var(--ink-3); }
.rv-void-head > .btn{ margin-left:auto; }
.rv-void-acts{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.rv-void-acts .btn{ font-size:.76rem; padding:.38rem .65rem; }
.rv-void-conf{ font-size:.72rem; color:var(--sig0-ink); }
/* A void line on the slip — orange rail + tag, judged by the Void SOP panel, not scan verdicts. */
.receipt-line.void-line{ box-shadow:inset 3px 0 0 var(--sig1); }
.receipt-line.void-line .x{ color:var(--sig1); font-weight:600; }
.receipt-line .vtag{ margin-left:auto; font-size:.64rem; color:var(--sig1);
  border:1px solid var(--sig1); border-radius:3px; padding:.02em .35em; white-space:nowrap; }
/* A between-scans proposal — not a slip line: the box saw an item cross with no line here. Dashed red
   rail so it reads as "something the slip is missing", distinct from any real line. */
.receipt-line.betweenscan{ box-shadow:inset 3px 0 0 var(--sig2); border-top:1px dashed var(--sig2); border-bottom:1px dashed var(--sig2); }
.receipt-line.betweenscan .x{ color:var(--sig2); font-weight:600; }
.receipt-line.vfind{ box-shadow:inset 3px 0 0 var(--sig1); }   /* a line the Verifier asks about */
.receipt-line .vfind-tag{ cursor:pointer; }
.receipt-line.vfind-ns{ border-color:var(--sig1); box-shadow:inset 3px 0 0 var(--sig1); }
.receipt-line.vfind-ns .x{ color:var(--sig1); }
/* Void looks correct (supervisor present) → green; violation → red. Base (unscored) stays orange. */
.receipt-line.void-line.void-ok{ box-shadow:inset 3px 0 0 var(--sig0); }
.receipt-line.void-line.void-ok .x{ color:var(--sig0-ink); }
.receipt-line.void-line.void-ok .vtag{ color:var(--sig0-ink); border-color:var(--sig0-ink); }
.receipt-line.void-line.void-bad{ box-shadow:inset 3px 0 0 var(--sig2); }
.receipt-line.void-line.void-bad .x{ color:var(--sig2-ink); }
.receipt-line.void-line.void-bad .vtag{ color:var(--sig2-ink); border-color:var(--sig2-ink); }
/* Master-NVR Start/Stop record boundary — a quiet structural marker bracketing the transaction. */
.receipt-line.trig{ color:var(--ink-3); background:var(--band);
  border-top:1px solid var(--rule-2); border-bottom:1px solid var(--rule-2); }
.receipt-line.trig .x{ font-weight:700; letter-spacing:.1em; font-size:.66rem; }
.receipt-line.trig .t{ color:var(--ink-3); }

/* ── camera annotation (A2/A4) ───────────────────────────────────────── */
.rv-toggle{ display:flex; gap:.35rem; align-items:center; cursor:pointer;
  color:var(--sig1); font-size:.76rem; }
.rv-stage{ position:relative; flex:1; min-height:0; display:flex; }
.rv-stage #clip{ flex:1; min-height:0; }
#zonecanvas{ position:fixed; pointer-events:none; z-index:5; display:none; }
#zonecanvas.on{ display:block; pointer-events:auto; cursor:crosshair; }

/* The opened-out half of the calibration panel. Was .rv-annot, a right-hand aside
   holding a second copy of the gate's three controls and a second save that did not
   sign — see the comment in Review.razor. Same rules, one surface, and it is now a
   block INSIDE the gate rather than a column beside the video, so it lays out in
   columns of its own rather than a single tall stack. */
.rv-cal{ display:grid; gap:.6rem 1.4rem; min-width:0; margin-top:.6rem;
  padding-top:.6rem; border-top:1px solid var(--rule-2);
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); align-items:start; }
.rv-cal label{ display:flex; flex-direction:column; gap:.2rem;
  font-size:.7rem; color:var(--ink-3); text-transform:uppercase; letter-spacing:.07em; }
.rv-cal select,.rv-cal textarea{ background:var(--paper); color:var(--ink);
  border:1px solid var(--rule); border-radius:4px; padding:.3rem; font-size:.82rem;
  text-transform:none; letter-spacing:0; font-family:inherit; }
.rv-hint-sm{ margin:0; font-size:.68rem; color:var(--ink-3); line-height:1.4; }
.rv-hint-sm kbd{ background:var(--paper); border:1px solid var(--rule); border-radius:3px;
  padding:.02em .28em; font-family:var(--mono); }

.rv-zones{ display:flex; flex-wrap:wrap; gap:.35rem; }
.rv-zones .lbl{ width:100%; font-size:.7rem; color:var(--ink-3);
  text-transform:uppercase; letter-spacing:.07em; }
.rv-zones .lbl::before{ content:none; }   /* not the /labels page root */
.zbtn{ background:var(--paper); color:var(--ink-3); cursor:pointer;
  border:1px solid var(--rule); border-left:3px solid var(--zc,#666);
  border-radius:4px; padding:.25rem .5rem; font-size:.74rem; }
.zbtn:hover{ color:var(--ink); }
.zbtn.set{ color:var(--ink); }
.zbtn.act{ background:var(--sel); color:#fff; border-color:var(--zc); }

.rv-flags{ display:flex; flex-direction:column; gap:.25rem; }
.rv-flags label{ flex-direction:row; align-items:center; gap:.4rem;
  text-transform:none; letter-spacing:0; font-size:.76rem; color:var(--ink); }
.rv-actions{ display:flex; gap:.5rem; align-items:center; }
.rv-actions .primary{ background:var(--sig1); color:#12131a; border:0; border-radius:4px;
  padding:.4rem .8rem; font-weight:650; font-size:.8rem; cursor:pointer; }
.rv-actions .ghost{ color:var(--ink-3); font-size:.74rem; text-decoration:underline; }
/* Annotating adds a fourth column. Below 1600px the receipt yields, because the
   frame and the zone panel are what the operator needs while annotating. */

/* ── GATE-1 FOCUS ─────────────────────────────────────────────────────────
   An unverified camera is one question, and while it is open the screen asks
   only that: the gate, the frame, and the list of clips waiting. Everything
   that supports JUDGING a clip is put away, because none of it can be trusted
   until the camera under it is — a cashier's exception count means nothing if
   the frame it was seen in belongs to a till nobody has confirmed.

   display:none, not @if. The receipt div and the video element are bound by id
   by clipsync.js on load; removing either from the tree loses the binding for
   the rest of the session. */
.rv.focus .rv-site,
.rv.focus .rv-ctx,
.rv.focus .rv-open,
.rv.focus .rv-sop,
.rv.focus .rv-verdict,
.rv.focus .rv-receipt{ display:none; }

/* Two columns without the till slip, three when the correction rail is open —
   that rail is how the gate gets answered, so it is the one thing focus keeps. */
.rv.focus .rv-body{ grid-template-columns:minmax(258px,17%) 1fr minmax(360px,28%); }

/* The gate is the whole point of the mode, so it gets the room the receipt gave
   up rather than staying a strip under a letterboxed frame.

   The frame is capped for the same reason. #clip is flex:1 and will happily take
   every pixel the hidden panels released, which pushes the gate's three buttons
   to the bottom edge — they landed at y=973 of a 1000px viewport, and below
   ~900px they would be off-screen entirely. A mode built to make one question
   unavoidable must not be able to scroll that question out of sight. */

.prov{ font-size:.68rem; line-height:1.45; padding:.4rem .5rem; border-radius:4px;
  display:flex; flex-direction:column; gap:.15rem; }
.prov.unconf{ background:#3a2b16; color:#e0b070; border:1px solid #5a4526; }
.prov.conf{ background:#1d2c23; color:#79a98a; border:1px solid #2c4536; }
.prov em{ opacity:.75; font-style:normal; }

/* ── verdict bar + finding capture ───────────────────────────────────── */
.rv-verdict{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap;
  padding:.45rem .8rem; background:var(--leaf); border-top:1px solid var(--rule); }
.rv-verdict .chk{ font-size:.68rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--sig1); border:1px solid var(--sig1); border-radius:3px;
  padding:.12em .45em; }
.rv-verdict button{ border:1px solid var(--rule); background:var(--paper);
  color:var(--ink); border-radius:4px; padding:.3rem .7rem; font-size:.78rem;
  cursor:pointer; }
.rv-verdict button:disabled{ opacity:.35; cursor:default; }
.rv-verdict button kbd{ background:var(--leaf); border:1px solid var(--rule);
  border-radius:3px; padding:0 .28em; font-family:var(--mono); margin-right:.3em; }
/* red = Incident on key 1, green = No incident on key 0. Never paint the safe
   verdict red — that costs a hesitation on every clean clip. */
.rv-verdict .v-ok{ border-color:#37624a; color:#79a98a; }
.rv-verdict .v-done{ border-color:var(--sig1); color:var(--sig1); }
.rv-verdict .v-bad{ border-color:#5a3a36; color:#c07a72; }
/* "Add finding" is the neutral capture action, not a verdict — it must not wear either
   verdict colour. It sits beside them in Review.razor and had no rule at all. */
.rv-verdict .v-find{ border-color:var(--rule-2); color:var(--ink-2); }
.rv-verdict .v-find:hover{ color:var(--ink); border-color:var(--sig1); }
.rv-verdict .finding{ font-size:.72rem; background:var(--sel); color:#fff;
  border-radius:3px; padding:.14em .4em; font-family:var(--mono); }
.rv-verdict .finding button{ border:0; background:none; color:#c07a72; padding:0 0 0 .3em;
  font-size:.9rem; cursor:pointer; }

/* ── /candidates, as a fourth workstation ─────────────────────────────────
   Four rules. Everything else on that screen is `.rv-*`, `.pill`, `.btn` and
   `.receipt-line`, already defined above and above that. */

/* The check filter, lifted out of the <h2> whose accessible name it had become.
   Wraps rather than scrolls: five checks today, and a strip that scrolls hides
   the count an auditor came to read. */
.rv-pills{ display:flex; gap:.35rem; align-items:center; flex-wrap:wrap; }

/* Column widths, because the check code is the thing being chosen BY and it was the
   thing being clipped: at 258px with three nowrap columns the browser gave CHECK
   whatever was left, and "SWEETHEART" arrived as "SWEETHEA". The camera name is the
   one that can afford to ellipsise — Till 01..Till 07 differ in the last character. */
.rv-body.cand .rv-queue th:nth-child(1), .rv-body.cand .rv-queue td:nth-child(1){ width:46%; }
.rv-body.cand .rv-queue th:nth-child(2), .rv-body.cand .rv-queue td:nth-child(2){ width:28%; }
.rv-body.cand .rv-queue th:nth-child(3), .rv-body.cand .rv-queue td:nth-child(3){ width:26%; }
.rv-body.cand .rv-queue table{ table-layout:fixed; }
.rv-body.cand .rv-queue td{ overflow:hidden; text-overflow:ellipsis; }
/* The check code must never be the column that ellipsises — it is what the row IS. */
.rv-body.cand .rv-queue td:nth-child(1){ overflow:visible; }
/* The one selected filter. `.pill` alone gives no selected state at all, so the
   active filter was indistinguishable from the four inactive ones. */
.pill.on{ border-color:var(--sig1); color:var(--sig1); }

/* A queue row's first cell is a real button, so Tab reaches it and Enter opens
   the clip. It has to look like the table cell it replaces — the affordance is
   the row, not a control inside it. */
.rv-queue .qrow{ background:none; border:0; padding:0; margin:0; font:inherit;
  color:inherit; text-align:left; cursor:pointer; width:100%; }
.rv-queue .qrow:disabled{ cursor:default; opacity:.5; }

/* Nothing loaded. The instruction goes where the frame will be, vertically centred, rather
   than at the top of a 735px black slab — which reads as a broken player with a caption. */
.rv-player .rv-tip.idle{ flex:1; display:flex; flex-direction:column; gap:.6rem;
  align-items:center; justify-content:center; text-align:center; margin:0;
  padding:2rem; max-width:46ch; align-self:center; }

/* A stage with no film in it. Same box as the video so the layout does not jump when a clip
   does load, and legible against the black rather than painted over it. */
.rv-stage.novideo{ align-items:center; justify-content:center; background:#000;
  color:var(--ink-2); padding:2rem; }
.rv-stage.novideo > div{ max-width:56ch; text-align:center; }
.rv-stage.novideo b{ display:block; color:var(--sig1); font-size:.95rem; margin-bottom:.5rem; }
.rv-stage.novideo p{ margin:.4rem 0; font-size:.82rem; line-height:1.55; }
.rv-stage.novideo .cap{ color:var(--ink-3); }

/* What the player is doing, over the frame rather than instead of it — the video keeps its size
   and controls, so nothing moves when the picture arrives.
   No spinner: app.css's reduced-motion rule kills every animation, and an indicator that
   disappears for the readers least able to guess is worse than none. This is a sentence and,
   where the browser knows it, a real percentage on the same `.bar` the calibration queue uses. */
.rv-loading{ position:absolute; inset:auto 0 3.2rem 0; display:flex; gap:.5rem;
  align-items:center; justify-content:center; pointer-events:none; z-index:3; }
.rv-loading .what{ background:rgb(0 0 0 / .72); color:var(--ink); border:1px solid var(--rule);
  border-radius:3px; padding:.3rem .6rem; font-size:.78rem; }
.rv-loading .bar{ background:rgb(0 0 0 / .72); }
.rv-loading .pct{ background:rgb(0 0 0 / .72); color:var(--ink-2); border:1px solid var(--rule);
  border-radius:3px; padding:.3rem .45rem; font:.72rem var(--mono); }

/* A label inside the verdict strip — "moments", ahead of the seek buttons. */
.rv-verdict .sep{ font-size:.68rem; color:var(--ink-3); text-transform:uppercase;
  letter-spacing:.08em; }

/* The standard. Sits directly above the verdict bar and wears the same ground, so it
   reads as the first half of one strip rather than a second panel to notice. */
.rv-sop{ display:flex; gap:.9rem; align-items:center; flex-wrap:wrap;
  padding:.4rem .8rem; background:var(--leaf); border-top:1px solid var(--rule); }
.rv-sop .lbl{ font-size:.68rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); }
.rv-sop label{ display:inline-flex; align-items:center; gap:.3rem; font-size:.76rem;
  color:var(--ink-2); cursor:pointer; }
.rv-sop label:hover{ color:var(--ink); }
.rv-sop input{ accent-color:var(--sig1); cursor:pointer; }
.rv-sop em{ font-style:normal; font-size:.72rem; color:#79a98a; }
.rv-sop.clear{ border-left:2px solid #37624a; }

.rv-modal{ position:absolute; left:50%; top:18%; transform:translateX(-50%);
  z-index:20; width:min(520px,86%); background:var(--leaf);
  border:1px solid var(--sig1); border-radius:6px; padding:1rem 1.1rem;
  box-shadow:0 20px 60px -20px rgba(0,0,0,.8); display:flex; flex-direction:column; gap:.6rem; }
.rv-modal h4{ margin:0; font-size:.95rem; }
.rv-modal .anchor{ margin:0; font-size:.72rem; color:var(--ink-3); }
.rv-modal .anchor code{ font-size:.9em; color:var(--ink); }
.rv-modal .anchor.warn{ color:#c9a227; }
.rv-modal label{ display:flex; flex-direction:column; gap:.2rem; font-size:.7rem;
  text-transform:uppercase; letter-spacing:.07em; color:var(--ink-3); }
.rv-modal select,.rv-modal textarea{ background:var(--paper); color:var(--ink);
  border:1px solid var(--rule); border-radius:4px; padding:.35rem;
  font-size:.85rem; text-transform:none; letter-spacing:0; font-family:inherit; }
.rv-player{ position:relative; }

/* ── QA screen ───────────────────────────────────────────────────────── */
.qa-title{ font-size:.85rem; color:var(--sig1); }
.qa-ctx{ font-size:.74rem; color:var(--ink-3); }
.qa-ctx em{ font-style:normal; opacity:.7; margin-left:.5rem; }
.qa-tiers{ display:flex; gap:.35rem; margin-left:.8rem; }
.qa-tiers .tier{ font-size:.62rem; letter-spacing:.06em; text-transform:uppercase;
  border:1px solid var(--rule); border-radius:3px; padding:.1em .4em; color:var(--ink-3);
  font-family:var(--mono); }
.qa-tiers .qa_confirmed{ border-color:#37624a; color:#79a98a; }
.qa-tiers .qa_rejected{ border-color:#5a3a36; color:#c07a72; }
.qa-tiers .raised{ border-color:var(--sig1); color:var(--sig1); }

.rv-body.qa{ grid-template-columns:minmax(240px,20%) 1fr minmax(300px,26%); }

.qa-claim{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap;
  padding:.5rem .8rem; background:var(--leaf); border-top:1px solid var(--rule); }
.qa-claim .at{ font-family:var(--mono); color:var(--sig1); font-weight:650; }
.qa-claim .what{ font-weight:600; font-size:.86rem; }
.qa-claim .anchor{ font-family:var(--mono); font-size:.72rem;
  background:var(--paper); border:1px solid var(--rule); border-radius:3px; padding:.15em .4em;
  color:var(--ink-3); }
.qa-claim .anchor.warn{ color:#c9a227; border-color:#5a4526; }
.qa-claim em{ font-size:.75rem; color:var(--ink-3); }

.qa-verdict{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap;
  padding:.5rem .8rem; background:var(--leaf); border-top:1px solid var(--rule); }
.qa-verdict button{ border:1px solid var(--rule); background:var(--paper); color:var(--ink);
  border-radius:4px; padding:.32rem .6rem; font-size:.76rem; cursor:pointer; }
.qa-verdict kbd{ background:var(--leaf); border:1px solid var(--rule); border-radius:3px;
  padding:0 .28em; font-family:var(--mono); margin-right:.35em; }
.qa-verdict .v-yes{ border-color:#37624a; color:#79a98a; }
.qa-verdict .v-no.hard{ border-color:#5a3a36; color:#c07a72; }
/* Soft rejections are EXCLUSIONS, not negatives — a camera you cannot see through
   teaches a model nothing. Visually distinct so the difference is obvious. */
.qa-verdict .v-no.soft{ border-color:#4a4526; color:#c9a227; }
.qa-verdict .sep{ font-size:.68rem; color:var(--ink-3); text-transform:uppercase;
  letter-spacing:.08em; margin:0 .2rem; }
.qa-hint{ margin:0; padding:.3rem .8rem .6rem; font-size:.68rem; color:var(--ink-3);
  background:var(--leaf); }

.qa-correct{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap;
  padding:.4rem .8rem; background:var(--leaf); border-top:1px solid var(--rule);
  font-size:.74rem; color:var(--ink-3); }
.qa-correct label{ display:flex; gap:.35rem; align-items:center; cursor:pointer; }
.qa-correct .cur{ display:flex; gap:.4rem; align-items:center; }
.qa-correct button{ background:var(--paper); color:var(--ink); border:1px solid var(--rule);
  border-radius:4px; padding:.22rem .5rem; font-size:.74rem; cursor:pointer; }
.qa-correct em{ font-style:normal; color:var(--sig1); font-family:var(--mono); }
.qa-correct select{ background:var(--paper); color:var(--ink); border:1px solid var(--rule);
  border-radius:4px; padding:.22rem .35rem; font-size:.76rem; max-width:270px;
  text-overflow:ellipsis; }

/* ── 12 · NAV — the collapsible left rail ───────────────────────────────────
   Two widths, one custom property. Everything that has to make room for the
   rail reads --nav-w, so the collapse is a single token change and no page
   needs to know the number. The attribute is set on <html> by an inline script
   before first paint (App.razor) and flipped afterwards by nav.js.

   The rail is inside the .ink scope (§1) — it is pinned dark on every route,
   including the light document pages, so the chrome stays one constant thing
   while the content changes ground under it. */

:root{ --nav-w:212px; }
:root[data-nav="mini"]{ --nav-w:56px; }

/* Make room. Fixed-position descendants (.rv) resolve against the viewport and
   ignore this padding, so they set their own `left` below. */
/* The rail is position:fixed, so the page has to leave room for it. `:has(.cp-nav)` scopes that
   to the pages that actually draw one — the sign-in and enrolment screens do not, and were being
   offset by 212px of nothing, which put the "centred" card visibly off-centre beside a cream
   stripe. Supported everywhere this product runs; the fallback if it were not is the layout the
   authenticated screens want, which is the safer of the two to get wrong. */
body:has(.cp-nav){ padding-left:var(--nav-w); }

.cp-nav{ position:fixed; top:0; left:0; bottom:0; width:var(--nav-w); z-index:50;
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--brand-deep,#06245A); border-right:1px solid rgba(255,255,255,.08);
  font:500 .78rem/1 var(--sans); }

/* Width is the only animated property, and only when the user has not asked
   otherwise. The rail carries the page's whole horizontal offset, so an
   unthrottled transition here reflows every route beside it. */
:root:not([data-nav]) .cp-nav, .cp-nav{ transition:width .13s ease; }
@media (prefers-reduced-motion:reduce){ .cp-nav{ transition:none; } }

.cp-sprite{ position:absolute; width:0; height:0; }

.cp-head{ display:flex; align-items:center; gap:.4rem; flex:none;
  height:38px; padding:0 .5rem 0 .75rem; border-bottom:1px solid var(--rule); }
/* `display:block`, not the flex row every other rail link gets: the wordmark is
   one word split across two elements for colour, and the row's gap would open a
   space inside "CuraPortal". */
.cp-nav .brand{ display:block; color:var(--ink); text-decoration:none; font:700 1.05rem/1 var(--sans);
  letter-spacing:-.06em; white-space:nowrap; overflow:hidden; flex:1;
  padding:0; margin:0; }
.cp-nav .brand:hover{ background:none; color:var(--ink); }
.cp-nav .brand span{ color:var(--accent); font-weight:700; }
/* The wordmark anywhere else (sign-in card): navy SHRINK, red GUARD. */
.sg-brand{ font:700 1.9rem/1 var(--sans); letter-spacing:-.06em; color:var(--brand-deep); white-space:nowrap; }
.sg-brand b{ color:var(--accent); font-weight:700; }

.cp-burger{ flex:none; width:26px; height:26px; display:grid; place-items:center;
  background:none; border:1px solid transparent; border-radius:4px;
  color:var(--ink-3); cursor:pointer; padding:0; }
.cp-burger:hover{ color:var(--ink); background:var(--leaf); }
.cp-burger .bars, .cp-burger .bars::before, .cp-burger .bars::after{
  display:block; width:13px; height:1.5px; background:currentColor; border-radius:1px; }
.cp-burger .bars{ position:relative; }
.cp-burger .bars::before, .cp-burger .bars::after{ content:""; position:absolute; left:0; }
.cp-burger .bars::before{ top:-4px; }
.cp-burger .bars::after{ top:4px; }

/* screen-reader-only: the burger's glyph carries no text */
.cp-nav .vh{ position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

.cp-scroll{ flex:1; overflow-y:auto; overflow-x:hidden; padding:.5rem 0 1rem;
  scrollbar-width:thin; }
.cp-nav ul{ list-style:none; margin:0 0 .1rem; padding:0; }

.cp-nav .sec{ margin:.85rem 0 .25rem; padding:0 .75rem;
  font:600 .62rem/1 var(--sans); letter-spacing:.11em; text-transform:uppercase;
  color:var(--ink-3); white-space:nowrap; }
.cp-scroll > .sec:first-child{ margin-top:.1rem; }

.cp-nav a{ display:flex; align-items:center; gap:.6rem; position:relative;
  color:var(--ink-3); text-decoration:none;
  padding:.42rem .75rem; margin:1px .35rem; border-radius:4px;
  white-space:nowrap; }
.cp-nav .cp-scroll a{ font-size:.79rem; }
.cp-nav a:hover{ color:var(--ink); background:rgba(255,255,255,.07); }
.cp-nav a.on{ color:#fff; background:rgba(255,255,255,.12); }
/* "you are here" must survive the collapse, where the label is gone and the
   background alone is doing the work */
.cp-nav a.on::before{ content:""; position:absolute; left:-.35rem; top:15%; bottom:15%;
  width:3px; border-radius:0 2px 2px 0; background:var(--accent,#DC3028); }

.cp-nav .ic{ flex:none; width:16px; height:16px; fill:none; stroke:currentColor;
  stroke-width:1.35; stroke-linecap:round; stroke-linejoin:round; }
.cp-nav .t{ overflow:hidden; text-overflow:ellipsis; }

.cp-foot{ flex:none; border-top:1px solid var(--rule); padding:.5rem .75rem;
  color:var(--ink-3); font:400 .72rem/1.3 var(--sans);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cp-foot .who{ display:block; color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; }
a.who{ text-decoration:none; } a.who:hover{ text-decoration:underline; color:var(--ink); }
.cp-foot .role{ display:block; color:var(--ink-3); font-size:.68rem; }
/* A form control, so it takes focus and announces itself. The rail's own links are the visual
   reference; this deliberately does not look like one of them — ending a session is not
   navigation and should not be one keystroke away from being mistaken for it. */
.cp-foot .signout{ margin-top:.4rem; width:100%; padding:.3rem .4rem;
  font:inherit; color:var(--ink-2); background:transparent;
  border:1px solid rgba(255,255,255,.18); border-radius:999px; cursor:pointer; }
.cp-foot .signout:hover{ color:var(--ink); border-color:var(--ink-3); }
.cp-foot .signout:focus-visible{ outline:2px solid var(--sig1); outline-offset:1px; }

/* The 56px variant, shown exactly when .cp-foot is hidden — never both, never neither. */
.cp-foot-mini{ display:none; flex:none; border-top:1px solid var(--rule); padding:.4rem 0; }
.cp-foot-mini form{ display:flex; justify-content:center; }
.cp-foot-mini button{ display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; padding:0; color:var(--ink-3); background:transparent;
  border:1px solid transparent; border-radius:4px; cursor:pointer; }
.cp-foot-mini button:hover{ color:var(--ink); border-color:var(--rule); }
.cp-foot-mini button:focus-visible{ outline:2px solid var(--sig1); outline-offset:1px; }
.cp-foot-mini .ic{ width:16px; height:16px; fill:none; stroke:currentColor;
  stroke-width:1.35; stroke-linecap:round; stroke-linejoin:round; }

/* ---- collapsed: an icon rail that is still navigable ---------------------
   The incumbent's collapse goes to width 0 and leaves a bare hamburger. Here
   the labels go and the targets stay, so the rail keeps working at 56px. */
:root[data-nav="mini"] .cp-nav .brand span,
:root[data-nav="mini"] .cp-nav .sec,
:root[data-nav="mini"] .cp-foot{ display:none; }
:root[data-nav="mini"] .cp-foot-mini{ display:block; }
:root[data-nav="mini"] .cp-head{ padding:0; justify-content:center; }
:root[data-nav="mini"] .cp-nav .brand{ display:none; }
:root[data-nav="mini"] .cp-nav a{ justify-content:center; padding:.42rem 0; margin:1px .3rem; }

/* Each section still needs to read as a group once its heading is gone. */
:root[data-nav="mini"] .cp-nav ul + .sec{ display:block; height:1px; padding:0;
  margin:.45rem .55rem; background:var(--rule); overflow:hidden; text-indent:-999em; }

/* The label becomes a flyout. Not display:none — that removes it from the
   accessible name AND from the tab order's reading, so the rail would be
   sixteen unlabelled icons to a screen reader. Kept in the DOM, moved out of
   flow, revealed on hover and on keyboard focus. */
/* The flyout is positioned OUTSIDE the scroll container (left: 100% + 6px), so the container
   has to stop clipping while it is drawn — otherwise the only thing distinguishing two 16px
   glyphs is cut off at the rail's edge.
   `overflow-x:visible` alone would not do it: CSS computes a `visible` on one axis to `auto`
   whenever the other axis is not visible, which turns the clip into a horizontal SCROLLBAR.
   Both axes have to go, and they can here — the mini rail is icons only, and its full height is
   under 800px even with every group a VA administrator sees. */
:root[data-nav="mini"] .cp-scroll{ overflow:visible; }

:root[data-nav="mini"] .cp-nav .t{
  position:absolute; left:calc(100% + 6px); top:50%; transform:translateY(-50%);
  padding:.3rem .55rem; border-radius:4px; font-size:.76rem;
  background:#0d0f14; border:1px solid var(--rule); color:var(--ink);
  box-shadow:0 4px 14px rgb(0 0 0 / .45);
  opacity:0; pointer-events:none; z-index:60; }
:root[data-nav="mini"] .cp-nav a:hover .t,
:root[data-nav="mini"] .cp-nav a:focus-visible .t{ opacity:1; }

.rv{ top:0; left:var(--nav-w); }
.rv-queue tr.held{ opacity:.45; }
.rv-queue tr.held td:first-child{ color:#c9a227; }

/* ── 13 · LABEL SET PAGE ────────────────────────────────────────────────── */

.lbl{ max-width:60rem; margin:0 auto; padding:1.6rem 1.4rem 4rem;
  color:var(--ink); font:15px/1.6 var(--sans); }
/* paint the viewport behind the centred column so the light body never shows
   in the gutters of a pinned-dark route. Inset from the left by the rail's
   width: this is fixed-position, so without that it paints UNDER the rail and
   the two dark grounds meet with no edge between them. */
.lbl::before{ content:""; position:fixed; inset:0 0 0 var(--nav-w);
  background:var(--paper); z-index:-1; }
.lbl h2{ margin:0 0 .3rem; font-size:1.5rem; letter-spacing:-.015em; }
.lbl h3{ margin:2.2rem 0 .3rem; font-size:1rem; }
.lbl .sub{ color:var(--ink-3); font-size:.86rem; margin:0 0 1rem; max-width:44rem; }
.lbl code{ background:var(--leaf); padding:.08em .3em; border-radius:3px;
  font-family:var(--mono); font-size:.88em; }
.lbl .cards{ display:flex; gap:.7rem; flex-wrap:wrap; }
.lbl .card{ flex:1 1 190px; background:var(--leaf); border:1px solid var(--rule);
  border-left:3px solid var(--rule); border-radius:6px; padding:.8rem .9rem;
  display:flex; flex-direction:column; gap:.15rem; }
.lbl .card.qa_confirmed{ border-left-color:#79a98a; }
.lbl .card.qa_rejected{ border-left-color:#c07a72; }
.lbl .card.raised{ border-left-color:var(--sig1); }
.lbl .card.clean{ border-left-color:#6f8fb0; }
.lbl .card .n{ font-size:1.6rem; font-weight:650; font-variant-numeric:tabular-nums;
  font-family:var(--mono); }
.lbl .card .k{ font-size:.66rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-3); }
.lbl .card .d{ font-size:.74rem; color:var(--ink-3); line-height:1.4; }
.lbl .tablewrap{ overflow-x:auto; border:1px solid var(--rule); border-radius:6px;
  background:var(--leaf); }
.lbl table{ width:100%; border-collapse:collapse; font-size:.84rem; }
.lbl th{ text-align:left; padding:.5rem .7rem; font-size:.66rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-3); border-bottom:1px solid var(--rule); }
.lbl td{ padding:.45rem .7rem; border-bottom:1px solid var(--rule); }
.lbl tr:last-child td{ border-bottom:none; }
.lbl td.n,.lbl th.n{ text-align:right; font-variant-numeric:tabular-nums;
  font-family:var(--mono); }
.lbl td.good{ color:#79a98a; } .lbl td.bad{ color:#c07a72; }
.lbl .hint{ color:var(--ink-3); font-size:.74rem; margin-left:.4rem; }

/* ── 14 · MOTION ────────────────────────────────────────────────────────── */
/* Nothing in the auditor sheet moves or glows in the first place; this covers
   whatever the report grows. */
@media (prefers-reduced-motion:reduce){
  *{animation:none!important; transition:none!important; scroll-behavior:auto!important}
}

/* ═══════════════════════════════════════════════════════════════════════════
   15 · PRINT
   The document is the product, so this is first-class, not an afterthought.
   Placed AFTER both dark blocks and after .ink. Order alone is not enough:
   `prefers-color-scheme:dark` can still match while printing, and that block
   is (0,2,0) while a bare `:root` is (0,1,0) — it would beat print on order-
   independent grounds. So the print scope repeats the dark selectors verbatim,
   matching their specificity and winning on order as intended.
   Print is a token swap: no SVG is redrawn.
   ═══════════════════════════════════════════════════════════════════════════ */

@page{ size:A4 portrait; margin:14mm }

@media print{
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"],
  :root.ink, .ink, .rv, .cp-nav, .lbl{
    --paper:#FFF; --leaf:#FFF; --band:#F2F2F2; --sel:#EDEDED;
    --rule:#999; --rule-2:#777; --rule-hair:#CCC;
    --ink:#000; --ink-2:#333; --ink-3:#555;
    --bar:#666; --bar-2:#A8A8A8;
    --sig0:#1A5C40; --sig0-ink:#1A5C40;   /* darkened for toner                */
    --sig1:#8A4C10; --sig1-ink:#7A3F0C;
    --sig2:#7D1712; --sig2-ink:#7D1712;
    --nodata:#8A8A8A; --nodata-ink:#555;
    --link:#000; --focus:#000;
    color-scheme:light;
  }

  /* from the tokens above, not from literals — print is a token swap */
  html, body{ background:var(--paper); color:var(--ink); }
  /* the rail is display:none below; reclaim the gutter it was holding open, or
     every printed page carries a 212px indent for chrome that is not there */
  body{ font-size:10.5pt; padding-left:0 }

  /* Screen chrome and internal routes never reach the client's printer.
     #blazor-error-ui is in this list as a belt-and-braces measure: the framework
     un-hides it with an INLINE display, which beats the stylesheet rule above, so a
     circuit that dropped while the manager was reading would otherwise put "An
     unhandled error has occurred" across the foot of a signed exception finding. */
  #plate, #auditor, #rationale, .noprint, .cp-nav, .rv,
  #blazor-error-ui{ display:none !important }

  .wrap{ max-width:none; padding:0 }

  /* the 200px marginalia column collapses; notes render as an end-block, so
     figures get the full 182mm measure and day labels stay above 6pt */
  aside{ display:none }
  .doc-grid{ grid-template-columns:1fr }

  figure, .kpi, .signoff, .readfirst{ break-inside:avoid }
  .secmark{ break-after:avoid }
  thead{ display:table-header-group }
  tr{ break-inside:avoid }

  svg.chart{ border-color:var(--rule); background:var(--leaf) }
  svg .hit{ fill:none !important }        /* a hover wash must never be printed */
  a{ color:var(--ink); text-decoration:none }
  :focus-visible{ outline:none }
}

/* ── small multiples ─────────────────────────────────────────────────
   Two per row so they read as a comparison rather than as two more full
   figures. Without this they inherit the figure width and stop being
   small, which defeats the point of the form. */
.multiples{ display:grid; grid-template-columns:1fr 1fr; gap:calc(var(--u)*6); }
.multiples .eyebrow{ margin-bottom:calc(var(--u)*2); }
@media (max-width:760px){ .multiples{ grid-template-columns:1fr; } }

/* The lead exception type, echoed from the ribbon highlight into the table. */
tbody tr.lead td{ background:var(--band); }
tbody tr.lead td:first-child{ font-weight:650; }

/* ── scan-zone evidence, in the annotation rail ──────────────────────
   The machine's opinion, shown before the auditor draws. Deliberately not
   styled as a recommendation: the estimator lands inside a hand-marked box
   3 times in 10, so this is evidence to argue with, not a proposal. */
.rv-evid{ border:1px solid var(--rule); border-radius:var(--radius);
  background:var(--leaf); padding:calc(var(--u)*2); margin:calc(var(--u)*2) 0; }
.rv-evid .hd{ display:flex; align-items:center; justify-content:space-between;
  gap:calc(var(--u)*2); margin-bottom:calc(var(--u)*2); }
.rv-evid .lbl{ font:600 9.5px var(--sans); letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-3); }
.rv-evid-toggle{ display:flex; align-items:center; gap:6px; font-size:11px;
  color:var(--ink-2); margin-bottom:calc(var(--u)*2); cursor:pointer; }
.rv-evid .advice{ font-size:11px; line-height:1.5; color:var(--ink-2);
  margin:0 0 calc(var(--u)*2); }
.rv-evid-stats{ display:grid; grid-template-columns:auto 1fr; gap:2px calc(var(--u)*2);
  margin:0 0 calc(var(--u)*2); font-size:10.5px; }
.rv-evid-stats dt{ color:var(--ink-3); }
.rv-evid-stats dd{ margin:0; font-family:var(--mono); font-variant-numeric:tabular-nums;
  color:var(--ink); text-align:right; }
.rv-evid-use{ width:100%; font:600 11px var(--sans); padding:5px 8px;
  border:1px solid var(--rule-2); border-radius:var(--radius);
  background:var(--paper); color:var(--ink); cursor:pointer; }
.rv-evid-use:hover{ background:var(--band); }

/* ── 20 · NAV, NARROW VIEWPORTS ──────────────────────────────────────────────
   §12 holds the rail. The hover-menu machinery that used to live here went with
   the horizontal bar: a vertical rail lists all seventeen routes at once, so
   there is nothing left to hide behind a group label.

   Below 900px nav.js collapses the rail to the icon width unless the user has
   chosen otherwise. This is the floor beneath that: if JS never ran, the rail
   still must not eat a third of a small screen. Same token, so the pages beside
   it follow without knowing anything happened. */
@media (max-width:900px){
  :root:not([data-nav="full"]){ --nav-w:56px; }
  :root:not([data-nav="full"]) .cp-nav .brand,
  :root:not([data-nav="full"]) .cp-nav .sec,
  :root:not([data-nav="full"]) .cp-foot{ display:none; }
  :root:not([data-nav="full"]) .cp-foot-mini{ display:block; }
  :root:not([data-nav="full"]) .cp-head{ padding:0; justify-content:center; }
  :root:not([data-nav="full"]) .cp-nav a{ justify-content:center; padding:.42rem 0; }
  :root:not([data-nav="full"]) .cp-scroll{ overflow:visible; }
  :root:not([data-nav="full"]) .cp-nav .t{
    position:absolute; left:calc(100% + 6px); top:50%; transform:translateY(-50%);
    padding:.3rem .55rem; border-radius:4px; font-size:.76rem;
    background:#0d0f14; border:1px solid var(--rule); color:var(--ink);
    box-shadow:0 4px 14px rgb(0 0 0 / .45);
    opacity:0; pointer-events:none; z-index:60; }
  :root:not([data-nav="full"]) .cp-nav a:hover .t,
  :root:not([data-nav="full"]) .cp-nav a:focus-visible .t{ opacity:1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   22 · FINDING DIALOG  (.fd-*)                          APPENDED — nothing above
                                                         this banner is touched.
   The fast capture surface for Components/Shared/FindingDialog.razor.

   It renders INSIDE the workstation (.rv), so every colour below resolves from
   the .ink island's tokens — --paper, --leaf, --rule, --ink, --sig1, --sel — and
   the dialog stays dark under any theme without redeclaring the palette. If it
   is ever mounted outside a `.rv` / `.ink` scope it will inherit the light page
   tokens and look wrong; mount it inside the workstation.

   Deliberately the same weight as .rv-modal: same --leaf ground, same --sig1
   hairline, same 6px radius, same one shadow. No new visual language — this is
   the same modal, given a keyboard.

   Nothing here moves. There is no transition and no animation anywhere in this
   block, and .fd-list pins scroll-behavior:auto so even the programmatic
   scrollIntoView is instant. The prefers-reduced-motion block at the end is
   belt-and-braces against a future edit.
   ═══════════════════════════════════════════════════════════════════════════ */

.fd-scrim{ position:fixed; inset:0; z-index:40; background:rgb(0 0 0 / .58);
  display:flex; align-items:flex-start; justify-content:center;
  padding:5vh 1rem 1rem; }

.fd{ position:relative; display:flex; flex-direction:column; width:min(760px,94vw); max-height:88vh;
  background:var(--leaf); color:var(--ink);
  border:1px solid var(--sig1); border-radius:6px;
  box-shadow:0 20px 60px -20px rgb(0 0 0 / .8);
  font:14px/1.5 var(--sans); }

/* the two ends of the focus trap: focusable, no size, no ink */
.fd-sent{ position:absolute; width:1px; height:1px; padding:0; overflow:hidden;
  clip-path:inset(50%); }

.fd-hd{ display:flex; align-items:baseline; gap:.6rem; padding:.7rem .9rem .35rem; }
.fd-hd h4{ margin:0; font-size:.95rem; font-weight:650; }
/* the moment, stated. Mono + tabular so it does not shimmy between clips. */
.fd-at{ font-family:var(--mono); font-size:.78rem; font-variant-numeric:tabular-nums;
  color:var(--sig1); }
.fd-check{ margin-left:auto; font-size:.62rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--sig1); border:1px solid var(--sig1); border-radius:3px; padding:.12em .45em; }

.fd-anchor{ margin:0; padding:0 .9rem .5rem; font-size:.72rem; color:var(--ink-3); }
.fd-anchor code{ font-family:var(--mono); font-size:.95em; color:var(--ink); }
/* amber, not red: a missing anchor is a weaker sample, not an error */
.fd-anchor.warn{ color:#c9a227; }

.fd-search{ display:flex; align-items:center; gap:.6rem; padding:0 .9rem .5rem; }
.fd-q{ flex:1; min-width:0; background:var(--paper); color:var(--ink);
  border:1px solid var(--rule-2); border-radius:4px; padding:.42rem .55rem;
  font:15px/1.3 var(--sans); }
.fd-q:focus{ outline:2px solid var(--sig1); outline-offset:-1px; border-color:var(--sig1); }
.fd-q::placeholder{ color:var(--ink-3); }
.fd-n{ flex:none; font-family:var(--mono); font-size:.7rem; color:var(--ink-3);
  font-variant-numeric:tabular-nums; }

.fd-list{ flex:1; min-height:0; overflow-y:auto; scroll-behavior:auto;
  background:var(--paper);
  border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }

/* The relevance divider. This is the whole point of the segregation: the auditor
   must SEE that they have left the set that matters for this check rather than
   discovering it forty rows into SOP VIOLATION. Sticky, so the band you are in is
   readable while its rows scroll under it. */
.fd-band{ position:sticky; top:0; z-index:1; background:var(--paper);
  display:flex; align-items:baseline; gap:.5rem; flex-wrap:wrap;
  padding:.5rem .9rem .25rem; border-top:1px solid var(--rule-2);
  font:650 .64rem/1.5 var(--sans); letter-spacing:.11em; text-transform:uppercase;
  color:var(--sig1); }
.fd-band:first-child{ border-top:0; }
.fd-band em{ font:400 .68rem/1.5 var(--sans); letter-spacing:0; text-transform:none;
  color:var(--ink-3); }
/* the drop itself — dashed rule and muted heading, so "less relevant" reads as
   less relevant without a second glance */
.fd-band.drop{ border-top:1px dashed var(--rule-2); color:var(--ink-3); }

.fd-cathead{ padding:.35rem .9rem .1rem 2.35rem;
  font:650 .68rem/1.5 var(--sans); color:var(--ink-2); }
.fd-cathead span{ font-weight:400; color:var(--ink-3); font-family:var(--mono);
  font-size:.9em; margin-left:.4em; }

.fd-opt{ display:flex; align-items:baseline; gap:.55rem;
  padding:.3rem .9rem .3rem .55rem; cursor:pointer; font-size:.85rem;
  /* clears the sticky band heading when a row is scrolled into view */
  scroll-margin:2.4rem 0 .7rem; }
.fd-opt:hover{ background:var(--band); }
.fd-opt.on{ background:var(--sel); color:#fff; }

/* the numeral. Shown against the top nine so the positions of the ones you use
   get learned, not looked up. */
.fd-num{ flex:none; width:1.5rem; text-align:center;
  font-family:var(--mono); font-size:.72rem; line-height:1.35;
  color:var(--ink-3); border:1px solid var(--rule); border-radius:3px; }
.fd-num:empty{ border-color:transparent; }
.fd-opt.on .fd-num{ color:var(--sig1); border-color:var(--sig1); }

.fd-txt{ flex:1; min-width:0; }
.fd-cat{ flex:none; font-size:.62rem; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-3); }
.fd-opt.on .fd-cat{ color:#c9cbd4; }
.fd-use{ flex:none; font-family:var(--mono); font-size:.68rem; color:var(--ink-3);
  font-variant-numeric:tabular-nums; }

.fd-none{ margin:0; padding:1.1rem .9rem; font-size:.8rem; color:var(--ink-3); }
.fd-none b{ color:var(--ink); font-weight:650; }
.fd-none span{ display:block; margin-top:.3rem; font-size:.72rem; }

.fd-note{ display:flex; flex-direction:column; gap:.2rem; padding:.55rem .9rem .1rem; }
.fd-note label{ font-size:.66rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); }
.fd-note em{ font-style:normal; text-transform:none; letter-spacing:0; opacity:.8; }
.fd-note textarea{ background:var(--paper); color:var(--ink);
  border:1px solid var(--rule); border-radius:4px; padding:.35rem .5rem;
  font:.85rem/1.45 var(--sans); resize:vertical; }
.fd-note textarea:focus{ outline:2px solid var(--sig1); outline-offset:-1px; }
/* Amber, not red: this is a second look, never a refusal. */
.fd-spell{ margin:.15rem 0 0; font-size:.7rem; color:#c9a227; }
.fd-spell b{ font-family:var(--mono); background:var(--band); border-radius:3px;
  padding:.05em .3em; margin:0 .2em; color:#e0b840; }
.fd-spell span{ color:var(--ink-3); }
.fd-spell.none{ color:var(--ink-3); }

.fd-act{ display:flex; align-items:center; gap:.6rem; padding:.55rem .9rem .1rem; }
.fd-save{ background:var(--sig1); color:#12131a; border:0; border-radius:4px;
  padding:.4rem .8rem; font:650 .8rem var(--sans); cursor:pointer; }
.fd-save:disabled{ opacity:.35; cursor:default; }
.fd-cancel{ background:none; border:1px solid var(--rule); border-radius:4px;
  color:var(--ink-3); padding:.35rem .7rem; font-size:.78rem; cursor:pointer; }
.fd-cancel:hover{ color:var(--ink); }
/* echo of what ↵ would take, so the primary button is never a guess */
.fd-picked{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:.74rem; color:var(--ink-3); }

/* the map, at the foot, compact enough to be learned by use */
.fd-keys{ display:flex; flex-wrap:wrap; gap:.1rem .9rem; padding:.55rem .9rem .7rem;
  font-size:.68rem; color:var(--ink-3); }
.fd-keys kbd{ background:var(--paper); border:1px solid var(--rule); border-radius:3px;
  padding:.05em .35em; font-family:var(--mono); font-size:.9em; margin:0 .1em; }

@media (max-height:640px){ .fd-scrim{ padding:2vh .5rem .5rem; } .fd{ max-height:96vh; } }

@media (prefers-reduced-motion:reduce){
  .fd-scrim, .fd, .fd-opt, .fd-list{ transition:none; animation:none;
    scroll-behavior:auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   23 · CAMERA GATE  (.rv-gate-*)                        APPENDED — nothing above
                                                         this banner is touched.
   Gate 1 of the review workflow, in Components/Pages/Review.razor. It sits
   between the frame and the verdict bar, inside .rv, so every colour resolves
   from the workstation's own dark tokens.

   AMBER, NOT RED. The same #3a2b16 / #e0b070 pair .prov.unconf already uses for
   an unconfirmed profile — because this is the identical fact wearing a louder
   voice, and an auditor who learns that colour once should not have to learn it
   again. Red would say "you did something wrong"; nobody has. Red is also
   already spent on Unreviewable two rows below, and two reds meaning different
   things in 60 vertical pixels is worse than no colour at all.

   It is a STRIP, not a scrim. A modal would block the frame, and the auditor
   has to be able to watch the clip in order to answer the question the gate is
   asking. Nothing here moves or animates.
   ═══════════════════════════════════════════════════════════════════════════ */

.rv-gate{ display:flex; flex-direction:column; gap:.5rem;
  padding:.55rem .8rem .6rem;
  background:#3a2b16; color:#e9c896;
  border-top:1px solid var(--rule); border-bottom:1px solid #5a4526;
  /* the one heavy stroke on the screen: the gate's left edge. It reads as a
     stop before any word is parsed. */
  box-shadow:inset 3px 0 0 0 #D9953F;
  font-size:.78rem; }

.rv-gate-hd{ display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap; }
.rv-gate-hd .step{ font:650 .6rem/1 var(--sans); letter-spacing:.12em;
  text-transform:uppercase; color:#12131a; background:#D9953F;
  border-radius:3px; padding:.28em .5em; }
.rv-gate-hd h4{ margin:0; font-size:.86rem; font-weight:650; color:#f4dcb8; }
.rv-gate-hd .cam{ margin-left:auto; font-size:.76rem; color:#e0b070; }
.rv-gate-hd .cam small{ font-family:var(--mono); font-size:.72rem; opacity:.75;
  margin-left:.35em; }

.rv-gate-why{ margin:0; max-width:96ch; font-size:.74rem; line-height:1.5;
  color:#d9bb8e; }

/* Four facts across, collapsing to two then one. Fixed minimums rather than
   equal fractions: a 'Scan direction' label must never wrap to two lines while
   'Mount' sits in half a column of white space. */
.rv-gate-grid{ display:grid; gap:.5rem .8rem;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); align-items:start; }
.rv-gate-grid > label{ display:flex; flex-direction:column; gap:.2rem;
  font-size:.64rem; letter-spacing:.08em; text-transform:uppercase; color:#c9a97e; }
.rv-gate-grid select{ background:var(--paper); color:var(--ink);
  border:1px solid #6a5433; border-radius:4px; padding:.28rem .35rem;
  font:.82rem/1.3 var(--sans); text-transform:none; letter-spacing:0;
  max-width:100%; }
.rv-gate-grid select:focus{ outline:2px solid #D9953F; outline-offset:-1px; }

/* The scan zone answers with evidence instead of a control, so it takes the full
   width of the strip: its advice line is a sentence, not a value, and a sentence
   set in a 274px column is four ragged lines. */
.rv-gate-zone{ grid-column:1 / -1; display:flex; flex-direction:column; gap:.25rem;
  min-width:0; padding-top:.35rem; border-top:1px solid #5a4526; }
/* .zlbl, NOT .lbl — `.lbl` is the /labels workstation's page-root class and brings
   its own box metrics with it. */
.rv-gate-zone .zlbl{ font-size:.64rem; letter-spacing:.08em; text-transform:uppercase;
  color:#c9a97e; }
.rv-gate-zone .row{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.rv-gate-zone .advice{ margin:0; font-size:.72rem; line-height:1.45; color:#d9bb8e; }
.rv-gate-zone .peek{ background:transparent; color:#e0b070; cursor:pointer;
  border:1px solid #6a5433; border-radius:4px; padding:.16rem .45rem; font-size:.72rem; }
.rv-gate-zone .peek:hover{ border-color:#D9953F; color:#f4dcb8; }
.rv-gate-zone .peek.on{ background:#D9953F; color:#12131a; border-color:#D9953F; }

.rv-gate-act{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }

/* One filled button on the strip, and it is the common path. Everything else on
   the gate is an outline, so "confirm" is findable without reading. */
.rv-gate-act .gate-go{ background:#D9953F; color:#12131a; border:0; border-radius:4px;
  padding:.4rem .8rem; font:650 .82rem/1.2 var(--sans); cursor:pointer; }
.rv-gate-act .gate-go:hover{ background:#e8b071; }
.rv-gate-act .gate-go:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
.rv-gate-act .gate-go kbd{ background:rgb(0 0 0 / .22); border:1px solid rgb(0 0 0 / .3);
  border-radius:3px; padding:0 .3em; font-family:var(--mono); margin-right:.4em; }

.rv-gate-act .gate-fix{ background:transparent; color:#e0b070; cursor:pointer;
  border:1px solid #6a5433; border-radius:4px; padding:.36rem .7rem; font-size:.78rem; }
.rv-gate-act .gate-fix:hover{ border-color:#D9953F; color:#f4dcb8; }

/* The escape hatch, stated on the gate itself. An auditor who cannot see a way
   past a block will invent one, and the invented one is always worse. */
.rv-gate-act .rv-gate-esc{ margin-left:auto; font-size:.7rem; color:#c9a97e; }
.rv-gate-act .rv-gate-esc b{ font-family:var(--mono); font-weight:400; color:#f4dcb8; }

/* Gate 1, satisfied. Green and quiet — it is a receipt, not an announcement,
   and it shares the verdict bar's own confirmed green (.prov.conf). */
.rv-verdict .cam-ok{ font-size:.7rem; color:#79a98a; border:1px solid #2c4536;
  border-radius:3px; padding:.12em .45em; }

@media (prefers-reduced-motion:reduce){
  .rv-gate, .rv-gate-act .gate-go, .rv-gate-act .gate-fix{ transition:none; animation:none; }
}

/* ── 20 · CALIBRATION ───────────────────────────────────────────────────────
   The calibration pages reuse the workstation (.rv) and the document column
   (.lbl) rather than inventing a third look — it is the same two-human loop as
   Review→QA, over camera profiles instead of findings, and a person who has
   learnt one screen should not have to learn another.

   Reusing them surfaced two collisions that were ALREADY breaking Review.razor.
   Both are fixed here, in the one file that owns the cascade, rather than by
   inline styles on each page that trips over them. */

/* `.lbl` is two unrelated things: the /labels page ROOT (§13 — a 60rem centred
   column with 34px of top margin and a fixed ::before that paints the whole
   viewport) and the small-caps eyebrow inside a workstation panel. §12 escapes
   it for .rv-zones only, so every OTHER eyebrow inherits a page root's box: the
   annotation rail's "What the detector saw" is centred, indented, pushed down
   ~130px, and paints a spurious backdrop over the dark workstation. Renaming one
   of the two is the real fix and belongs to whoever owns Review.razor; until
   then, scoping the escape to the panel that contains it costs nothing and the
   descendant selector (0,2,0) outranks the bare class (0,1,0). */
.rv .lbl, .rv-evid .lbl, .rv-cal .lbl, .rv-zones .lbl{
  max-width:none; margin:0 0 .35rem; padding:0;
  font:600 9.5px var(--sans); letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-3); }
.rv .lbl::before, .rv-evid .lbl::before, .rv-cal .lbl::before,
.rv-zones .lbl::before{ content:none; }

/* `.rv-cal label` (0,1,1) beats `.rv-evid-toggle` (0,1,0), so the heatmap
   checkbox inherits the rail's stacked field layout and renders as a centred
   uppercase column instead of a checkbox beside its word. Matching the losing
   rule's specificity is enough; it does not need to win by more. */
.rv-cal label.rv-evid-toggle, .rv-evid .rv-evid-toggle{
  flex-direction:row; align-items:center; gap:6px;
  font:400 11px/1.3 var(--sans); letter-spacing:0; text-transform:none;
  color:var(--ink-2); cursor:pointer; }

/* ── QA: uncalibrated overrides ───────────────────────────────────────────
   Above the queue, not inside it: these are not findings to adjudicate, they are
   a caveat on findings QA is about to adjudicate. Amber rather than red — an
   override is a legitimate act, and the auditor already said so. */
.qa-over{ flex:none; background:var(--leaf); border-bottom:1px solid #5a4526; }
.qa-over-hd{ display:flex; gap:.6rem; align-items:baseline; padding:.4rem .9rem .2rem; }
.qa-over-hd b{ font-size:.78rem; color:#c9a227; font-weight:650; }
.qa-over-hd em{ font-style:normal; font-size:.7rem; color:var(--ink-3); }
.qa-over-b{ max-height:18vh; overflow-y:auto; }
.qa-over-b table{ width:100%; border-collapse:collapse; font-size:.74rem; }
.qa-over-b th{ text-align:left; padding:.25rem .9rem; font-size:.62rem; letter-spacing:.07em;
  text-transform:uppercase; color:var(--ink-3); }
.qa-over-b td{ padding:.25rem .9rem; border-top:1px solid var(--rule); white-space:nowrap; }
.qa-over-b td.d{ font-family:var(--mono); color:var(--ink-2); }

/* Leaving calibration on a camera that was not blocking. Quiet — it is the door you
   take when there was nothing to answer, not an action in its own right. */
.rv-gate .gate-close{ background:none; border:1px solid var(--rule); color:var(--ink-3); }
.rv-gate .gate-close:hover{ color:var(--ink); border-color:var(--rule-2); }
/* The ✓ chip is now a button — the only way back into calibration once the gate has
   been satisfied, since the header checkbox that used to open the duplicate rail is gone. */
.rv-verdict button.cam-ok{ cursor:pointer; background:none; }
.rv-verdict button.cam-ok:hover{ color:#9fd4b2; border-color:#79a98a; }

/* ── the floor ────────────────────────────────────────────────────────────
   .rv is fixed and full height; every child but .rv-body is flex:none, so this
   bar is what tells the body how much room it actually has. Without it the body
   sized against the viewport and its taller children ran past the bottom edge. */
.rv-foot{ flex:none; display:flex; gap:1rem; flex-wrap:wrap; align-items:center;
  padding:.35rem .9rem; background:var(--leaf); border-top:1px solid var(--rule);
  font-size:.7rem; color:var(--ink-3); }
.rv-foot kbd{ background:var(--paper); border:1px solid var(--rule); border-radius:3px;
  padding:.05em .35em; font-family:var(--mono); font-size:.9em; margin:0 .1em; }
.rv-foot .rv-tip{ color:var(--sig1); }
.rv-foot .rv-foot-r{ margin-left:auto; font-family:var(--mono); color:var(--ink-3); }

/* ── the calibration panel as a column ────────────────────────────────────
   Stated after the base .rv-gate rule above, which is later in this file and
   would otherwise win on source order.

   Under the video the panel grew downwards as it opened out and pushed its own
   confirm button past the bottom of the window — the one control it exists for
   was the first thing to go off screen. As a column it scrolls internally and
   pins its actions to the foot, so confirm is reachable at any height. */
.rv-gate{ min-height:0; overflow:hidden; margin:0; border-radius:0;
  border-top:0; border-bottom:0; border-left:3px solid #c9a227; }
.rv-gate > *{ flex:0 0 auto; }
/* The opened-out half is the only part allowed to grow, so it is the only part
   that scrolls. */
.rv-gate .rv-cal{ flex:1 1 auto; min-height:0; overflow-y:auto; }
.rv-gate .rv-gate-act{ margin-top:auto; padding-top:.55rem;
  border-top:1px solid #5a4526; position:sticky; bottom:0; background:#3a2b16; }
/* The frame no longer shares its column with the panel, so it no longer needs a
   cap — that existed only to keep the gate's buttons above the fold. */

/* ── micro marks in the review panels ─────────────────────────────────────
   EMPHASIS, not categorical: one accent and one de-emphasis hue, everywhere.
   Every chart on these two strips is either a single series or "this one against
   the others", so no identity palette is needed — and a categorical ramp here
   would bury the single bar that is the whole point.

   Validated with the skill's checker against the dark surface #211F1C:
   accent #D9953F vs de-emphasis #7A736A — CVD separation dE 16.5 (protan),
   normal-vision 19.8, both over 3:1 on the surface. The two categorical checks
   it also reports (lightness band, chroma floor) FAIL by design: the grey is
   MEANT to read as grey, which is the check's own definition of a non-identity
   mark, and the tool states its scope as categorical palettes only. */
/* Intrinsic size, not width:100%. These carry width/height attributes from Charts.cs
   and a stretched 46px figure became a 97px block the first time this said 100%. */
.spark, .meter, .rank{ display:block; max-width:100%; overflow:visible; }
.spark .sl{ fill:none; stroke:var(--bar); stroke-width:1.5;
  stroke-linejoin:round; stroke-linecap:round; }
.spark .sd{ fill:var(--sig1); stroke:var(--leaf); stroke-width:1.5; }

.meter .mt{ fill:var(--bar); opacity:.25; }
.meter .mf.ok{ fill:var(--sig0); }
.meter .mf.watch{ fill:var(--sig1); }
.meter .mf.crit{ fill:var(--sig2); }

.rank .rb{ fill:var(--bar); opacity:.55; }
.rank .rb.on{ fill:var(--sig1); opacity:1; }

/* value + one line of reading, under the mark */
.ctx-fig{ display:flex; flex-direction:column; gap:.25rem; padding:.1rem 0 .3rem; }
.ctx-fig-t{ display:flex; gap:.35rem; align-items:baseline; flex-wrap:wrap; }
.ctx-fig-t > b{ font-family:var(--mono); font-size:1rem; color:var(--ink); font-weight:650; }
.ctx-fig-t b.up{ color:var(--sig1-ink); }
.ctx-fig-t span{ font-size:.68rem; color:var(--ink-3); }
.ctx-fig-t span b{ font-family:var(--mono); color:var(--ink-2); font-weight:650; }
.ctx-fig-t span b.up{ color:var(--sig1-ink); }

/* the site tiles: value, one reading line, one mark */
.rv-site-b .stat .d{ font-size:.68rem; color:var(--ink-3); }
.rv-site-b .stat .d.up{ color:var(--sig1-ink); }
.rv-site-b .stat .d.stale{ color:var(--sig1-ink); }
.rv-site-b .stat .spark, .rv-site-b .stat .meter{ margin-top:.25rem; }

/* Which rows of the site-wide event list are the ones already in the left-hand queue.
   Without it the list reads as a second, unrelated queue rather than a superset of it. */
.rv-open-b .here{ font-size:.6rem; letter-spacing:.05em; text-transform:uppercase;
  color:var(--sig1-ink); border:1px solid var(--rule); border-radius:3px;
  padding:.02em .3em; margin-left:.4rem; }
.rv-open-b tbody tr.held{ opacity:.55; }

/* The logged-findings list: a record you can act on, so its actions are visible rather
   than hover-only — an auditor scanning for the note they typed an hour ago should not
   have to discover that rows are interactive. */
.rv-open-b td.act{ white-space:nowrap; }
.rv-open-b .lnk{ background:none; border:0; padding:0 .4rem 0 0; cursor:pointer;
  font:inherit; font-size:.72rem; color:var(--sig1-ink); text-decoration:underline; }
.rv-open-b .lnk:hover{ color:var(--ink); }
.rv-open-b .lnk.warn{ color:var(--ink-3); }
.rv-open-b .lnk.warn:hover{ color:#c07a72; }
.rv-open-b .hint{ font-size:.66rem; color:var(--ink-3); font-style:italic; }
.rv-open-b tr.ruled{ opacity:.62; }
.rv-open-b tr.ruled:hover{ opacity:1; }
.rv-open-b td.d{ cursor:pointer; }
.rv-open-b .chip{ font-size:.62rem; letter-spacing:.04em; text-transform:uppercase;
  border:1px solid var(--rule); border-radius:3px; padding:.05em .35em; color:var(--ink-3); }
.rv-open-b .chip.confirmed{ border-color:#37624a; color:#79a98a; }
.rv-open-b .chip.rejected{ border-color:#5a3a36; color:#c07a72; }
.rv-open-b .chip.wait{ border-color:#5a4526; color:#c9a227; }

/* ---- auth: /login, /enrol. Deliberately plain — the one route everybody passes through
   works with no JavaScript, no circuit and no layout chrome. ---- */
/* The product's own stock, not a third background colour. `#f6f7f9` was cooler than --paper and
   nothing else in the system used it, so the one screen every person passes through was the one
   screen that did not look like the product. */
.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:2rem 1rem;
  background:linear-gradient(115deg, var(--leaf) 0 51%, var(--band) 51% 100%)}
.auth-card{width:100%;max-width:26rem;background:var(--leaf);border:1px solid var(--rule);border-radius:1rem;
  padding:2.25rem 2rem;box-shadow:0 18px 50px rgba(10,27,54,.08),0 4px 14px rgba(10,27,54,.04);display:flex;flex-direction:column}
.auth-card h1{margin:0 0 .5rem;font-size:1.35rem;letter-spacing:.01em;color:var(--ink)}
.auth-card h1.sg-brand{font-family:var(--sans)}
.auth-sub{margin:0 0 1.25rem;color:var(--ink-2);font-size:.9rem}
.auth-card label{font-size:.8rem;font-weight:600;color:var(--ink-2);margin:.65rem 0 .2rem}
.auth-card input{padding:.6rem .75rem;border:1px solid var(--rule-2);border-radius:.625rem;font:inherit;font-size:.95rem;
  background:var(--leaf);color:var(--ink)}
.auth-card input:focus{outline:2px solid var(--brand);outline-offset:0;border-color:var(--brand)}
.auth-card button{margin-top:1.25rem;padding:.7rem;border:0;border-radius:999px;background:var(--accent);
  color:#fff;font:600 .95rem/1 var(--sans);cursor:pointer;box-shadow:0 12px 32px rgba(220,48,40,.28)}
.auth-card button:hover{background:#B82520}
.auth-hint{margin:.5rem 0 0;font-size:.78rem;color:var(--ink-3)}
.auth-foot{margin:1.25rem 0 0;font-size:.82rem;color:var(--ink-2);text-align:center}
/* A submit button that reads as the link beside it. It has to be a button — sign-out is a POST,
   and a GET that ends a session is one a link prefetcher can fire — but it sits in a sentence of
   links and should not look like the card's primary action. */
.auth-card .linkish{width:auto;margin:0;padding:0;font:inherit;color:inherit;
  background:none;border:0;border-radius:0;box-shadow:none;text-decoration:underline;cursor:pointer}
.auth-card .linkish:focus-visible{outline:2px solid var(--sig1);outline-offset:2px}
.auth-err{margin:0 0 .75rem;padding:.5rem .65rem;border-radius:.3rem;background:#fdeaea;
  border:1px solid #f0b4b4;color:#8a1c1c;font-size:.85rem}
.auth-ok{margin:0 0 .75rem;padding:.5rem .65rem;border-radius:.3rem;background:#eaf7ee;
  border:1px solid #a9d9bb;color:#1b5e33;font-size:.85rem}

/* ---- /admin/sites, re-pegged onto the token layer ----------------------------------------
   This block grew as one screen's stylesheet and quietly became everyone's. Two of its rules —
   `.btn` and `.btn.quiet` — were exact-specificity duplicates of the token definitions in §token
   and won on source order APPLICATION-WIDE, so every button in the product was drawn by the
   /admin/sites block. They are gone; `.primary` and `:disabled` moved up beside the originals.

   The greys were the other half. `#9ca3af` on this paper measures 2.27:1 — it carried `.none`,
   `.grid small`, `.tag.dead` and `.tag.lic-none`, which is to say it carried every ABSENCE the
   admin screens report. The state a reader most needs to notice was the one hardest to see.
   `--nodata-ink` is the token for exactly this and measures 4.95:1.

   Nothing here changes what any rule DOES. Every literal is replaced by the token nearest it,
   and the four that were below the contrast floor move up to the token that clears it. */
.panel{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--rule);border-radius:1rem;background:var(--leaf);box-shadow:var(--card-shadow)}
.panel h2{margin:0 0 .5rem;font-size:1.05rem;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.panel .hint{margin:.4rem 0 .8rem;font-size:.85rem;color:var(--ink-3);max-width:62ch}
.form3{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap}
.form3 label{display:flex;flex-direction:column;font-size:.78rem;font-weight:600;gap:.2rem}
.form3 input,.form3 select{padding:.4rem .5rem;border:1px solid var(--rule-2);border-radius:.25rem;font-size:.9rem;min-width:14rem}
.grid{width:100%;border-collapse:collapse;font-size:.86rem}
.grid th{text-align:left;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--ink-3);
  border-bottom:1px solid var(--rule);padding:.4rem .5rem}
.grid td{padding:.35rem .5rem;border-bottom:1px solid var(--rule-hair);vertical-align:middle}
.grid td.n{text-align:right;font-variant-numeric:tabular-nums}
.grid tr.dead{opacity:.45}
.grid small{color:var(--nodata-ink);margin-left:.3rem}
.uid{font-family:var(--mono);font-size:.8rem}
/* The absence marker. Text, so it takes the ink form of the token, not the mark form. */
.none{color:var(--nodata-ink)}
.tag{display:inline-block;font-size:.68rem;text-transform:uppercase;letter-spacing:.03em;
  padding:.1em .4em;border-radius:3px;border:1px solid;margin-left:.2rem}
.tag.box{border-color:var(--link);color:var(--link)}
.tag.legacy{border-color:var(--nodata);color:var(--ink-3)}
.tag.live{border-color:var(--sig0);color:var(--sig0-ink)}
.tag.off{border-color:var(--sig1);color:var(--sig1-ink)}
.tag.stale{border-color:var(--sig1);color:var(--sig1-ink)}
.tag.dead{border-color:var(--nodata);color:var(--nodata-ink)}
.tag.a-responsive{border-color:var(--sig0);color:var(--sig0-ink)}
.tag.a-slow{border-color:var(--sig1);color:var(--sig1-ink)}
.tag.a-abandoned,.tag.a-never{border-color:var(--sig2);color:var(--sig2-ink)}
/* Licence state. Unlicensed is grey, not red: until A9 ships on the box an unlicensed box still
   audits, and colouring it as a fault would claim an enforcement that does not exist yet. */
.tag.lic-active{border-color:var(--sig0);color:var(--sig0-ink)}
.tag.lic-pending{border-color:var(--link);color:var(--link)}
.tag.lic-expired,.tag.lic-revoked{border-color:var(--sig2);color:var(--sig2-ink)}
.tag.lic-none{border-color:var(--nodata);color:var(--nodata-ink)}
.pill{font-size:.72rem;font-weight:400;color:var(--ink-2);border:1px solid var(--rule);border-radius:99px;padding:.1em .6em}
.pill.live{border-color:var(--sig0);color:var(--sig0-ink)}
/* The once-only token. Deliberately loud — it is shown once and never recoverable. */
.tok{margin:1.5rem 0;padding:1.25rem;border:2px solid var(--sig0);border-radius:.4rem;background:#f2fbf5}
.tok h2{margin:0 0 .5rem;font-size:1.05rem;color:var(--sig0-ink)}
.tokval{margin:.75rem 0;padding:.7rem;background:#0f172a;color:#a7f3d0;border-radius:.3rem;
  font-family:var(--mono);font-size:.82rem;word-break:break-all;white-space:pre-wrap}
.tokhow{font-size:.83rem;color:var(--ink-2)}
.err{padding:.5rem .7rem;border-radius:.3rem;background:#fdeaea;border:1px solid #f0b4b4;color:#8a1c1c;font-size:.88rem}
.okmsg{padding:.5rem .7rem;border-radius:.3rem;background:#eaf7ee;border:1px solid #a9d9bb;color:#1b5e33;font-size:.88rem}
.lede{color:var(--ink-2);max-width:70ch}

/* The manager report's population funnel. A list, not a table: it is three facts about one
   window, and a table would promise columns that reconcile — which the third line explicitly
   does not (it is a floor, not a total). */
.funnel{margin:.35rem 0 .6rem 0;padding:0 0 0 1.1rem;max-width:70ch}
.funnel li{margin:.25rem 0}
.funnel b{font-variant-numeric:tabular-nums}

/* A control that will refuse, drawn as one — but still focusable, still clickable, and still
   able to say why. `disabled` cannot: it fires no event, takes no focus and announces nothing,
   so the only explanation was a `title` a keyboard user never sees. */
/* A control that takes a shop off the air must not be the same grey as the one beside it that
   does nothing. Colour is not the only channel — the confirm panel names the site in the button
   text — but it should not be NO channel either. */
.btn.danger{ border-color:var(--sig2); color:var(--sig2-ink); }
.btn.danger:hover{ background:var(--sig2); color:var(--leaf); }

.refuses{ opacity:.55; }
.refuses:hover{ opacity:.8; }

/* ---- calibration plan: progress bar and the start action ---- */
.bar{ display:inline-block; width:70px; height:7px; border:1px solid var(--rule,#444);
  border-radius:1px; overflow:hidden; vertical-align:middle; margin-right:.4rem; }
.bar > span{ display:block; height:100%; background:#4ade80; }
a.go{ display:inline-block; font-size:.78rem; font-weight:600; padding:.22rem .5rem;
  border:1px solid currentColor; border-radius:2px; text-decoration:none; white-space:nowrap; }

/* ---- calibration: choose the ground image ---- */
.imgpick{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; margin:.4rem 0; }
.imgpick button{ font-size:.78rem; padding:.25rem .6rem; border:1px solid var(--rule,#555);
  background:transparent; color:inherit; border-radius:2px; cursor:pointer; }
.imgpick button:hover{ border-color:#4ade80; }
.imgpick button.on{ background:#4ade80; border-color:#4ade80; color:#0b1410; font-weight:600; }
.imgpick .cap{ margin-left:.4rem; }

/* ================= Models workspace (/models, /bench) — AlexB ================= */
.mw{ display:flex; height:calc(100dvh - var(--topbar,0px)); background:var(--paper); }
.mw-empty{ margin:auto; text-align:center; color:var(--ink-3); }
.mw-empty b{ display:block; font-size:1rem; color:var(--ink); margin-bottom:.3rem; }

/* --- left rail: the race at a glance --- */
.mw-rail{ width:290px; flex:none; border-right:1px solid var(--rule); overflow-y:auto; padding:.85rem .7rem; background:var(--paper-2, var(--paper)); }
.mw-railhead{ padding:.15rem .35rem .7rem; }
.mw-railhead h1{ font-size:1.05rem; margin:0; letter-spacing:-.01em; }
.mw-railhead .mw-sub{ color:var(--ink-3); font-size:.68rem; }
.mw-lane{ display:flex; align-items:center; gap:.55rem; width:100%; text-align:left; cursor:pointer;
  background:none; border:1px solid transparent; border-radius:10px; padding:.6rem .6rem; margin-bottom:.3rem; transition:background .12s, border-color .12s; }
.mw-lane:hover{ background:color-mix(in srgb, var(--ink) 4%, transparent); }
.mw-lane.sel{ background:color-mix(in srgb, var(--sig1) 10%, transparent); border-color:color-mix(in srgb, var(--sig1) 45%, transparent); }
.mw-lane-main{ flex:1; min-width:0; }
.mw-lane-top{ display:flex; align-items:center; gap:.4rem; }
.mw-lane-top b{ font-size:.83rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mw-lane-sub{ display:block; color:var(--ink-3); font-size:.66rem; margin-top:.12rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mw-spark{ width:60px; height:24px; flex:none; color:var(--ink-3); opacity:.8; }
.mw-lane.sel .mw-spark{ color:var(--sig1); opacity:1; }

/* status dot + badges, tone-coloured */
.mw-dot{ width:8px; height:8px; border-radius:50%; flex:none; background:var(--ink-3); }
.mw-dot.ok{ background:#22c55e; } .mw-dot.warn{ background:#f59e0b; } .mw-dot.bad{ background:#ef4444; } .mw-dot.none{ background:var(--ink-4,#9aa); }
.mw-badge{ margin-left:auto; font-family:var(--mono); font-size:.72rem; font-weight:700; padding:.02rem .35rem; border-radius:5px;
  background:color-mix(in srgb, var(--ink) 6%, transparent); color:var(--ink-2); }
.mw-badge.ok{ color:#15803d; background:color-mix(in srgb, #22c55e 15%, transparent); }
.mw-badge.warn{ color:#b45309; background:color-mix(in srgb, #f59e0b 16%, transparent); }
.mw-badge.bad{ color:#b91c1c; background:color-mix(in srgb, #ef4444 14%, transparent); }
.mw-badge.none{ color:var(--ink-3); }

/* --- detail --- */
.mw-main{ flex:1; min-width:0; overflow-y:auto; padding:1.4rem 1.6rem 2.5rem; max-width:920px; }
.mw-hero{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.mw-hero-t{ display:flex; align-items:center; gap:.55rem; }
.mw-hero-t h2{ margin:0; font-size:1.35rem; letter-spacing:-.02em; }
.mw-status{ font-size:.66rem; text-transform:uppercase; letter-spacing:.07em; font-weight:700; padding:.14rem .45rem; border-radius:999px;
  background:color-mix(in srgb, var(--ink) 7%, transparent); color:var(--ink-2); }
.mw-status.ok{ color:#15803d; background:color-mix(in srgb, #22c55e 15%, transparent); }
.mw-status.warn{ color:#b45309; background:color-mix(in srgb, #f59e0b 16%, transparent); }
.mw-status.bad{ color:#b91c1c; background:color-mix(in srgb, #ef4444 14%, transparent); }
.mw-hero-v{ text-align:right; font-family:var(--mono); font-size:.8rem; color:var(--ink-2); }
.mw-hero-v .code{ display:block; color:var(--ink-3); font-size:.66rem; margin-top:.1rem; }

.mw-tiles{ display:grid; grid-template-columns:repeat(4,1fr); gap:.7rem; margin:1.1rem 0 1.4rem; }
.tile{ border:1px solid var(--rule); border-radius:12px; padding:.7rem .8rem; background:var(--paper); }
.tile .k{ display:block; color:var(--ink-3); font-size:.62rem; text-transform:uppercase; letter-spacing:.07em; }
.tile .v{ display:block; font-family:var(--mono); font-size:1.5rem; font-weight:700; line-height:1.15; margin-top:.15rem; letter-spacing:-.02em; }
.tile .v.sm{ font-size:1.05rem; }
.tile .v.ok{ color:#16a34a; } .tile .v.warn{ color:#d97706; } .tile .v.bad{ color:#dc2626; } .tile .v.none{ color:var(--ink-3); }
.tile .u{ display:block; color:var(--ink-3); font-size:.66rem; margin-top:.1rem; }

.mw-cards{ display:grid; gap:.9rem; margin-bottom:1.6rem; }
.mw-block{ border:1px solid var(--rule); border-radius:12px; padding:.85rem 1rem; }
.mw-block h3{ margin:0 0 .35rem; font-size:.68rem; text-transform:uppercase; letter-spacing:.07em; color:var(--ink-3); }
.mw-block p{ margin:0; font-size:.88rem; line-height:1.55; color:var(--ink); }
.mw-block.improve{ border-color:color-mix(in srgb, var(--sig1) 40%, var(--rule)); background:color-mix(in srgb, var(--sig1) 5%, transparent); }

.mw-panel{ margin-bottom:1.8rem; }
.mw-panel h3{ font-size:.95rem; margin:0 0 .7rem; letter-spacing:-.01em; }
.mw-note{ color:var(--ink-3); font-size:.82rem; margin:0; }
.mw-chart{ border:1px solid var(--rule); border-radius:12px; padding:.8rem 1rem; max-width:560px; }
.mw-chart svg{ width:100%; height:auto; display:block; }
.mw-chart .grid{ stroke:var(--rule); stroke-width:1; }
.mw-chart-x{ display:flex; justify-content:space-between; margin-top:.4rem; color:var(--ink-3); font-size:.66rem; font-family:var(--mono); }
.mw-chart-x .scale{ color:var(--ink-4,var(--ink-3)); }

/* product-detector coverage panel (the 20/80 split) */
.pd-cov .pd-split{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; max-width:640px; margin-bottom:1rem; }
.pd-grp{ display:flex; flex-direction:column; gap:.15rem; border:1px solid var(--rule); border-radius:10px; padding:.7rem .9rem; }
.pd-grp.top{ border-left:3px solid var(--sig1); }
.pd-grp.tail{ border-left:3px solid var(--ink-3); }
.pd-grp .k{ font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3); }
.pd-grp .v{ font-size:1.4rem; font-variant-numeric:tabular-nums; }
.pd-grp .v small{ font-size:.7rem; color:var(--ink-3); }
.pd-grp .u{ font-size:.76rem; color:var(--ink-3); }
.pd-chart{ max-width:760px; }
.pd-chart .pd-mark{ stroke:var(--ink-3); stroke-width:1; stroke-dasharray:3 3; }
.pd-chart .pd-ax{ fill:var(--ink-3); font-size:9px; font-family:var(--mono); }
.pd-lg{ padding:0 .3em; border-radius:3px; }
.pd-lg.vol{ background:var(--rule); color:var(--ink); }
.pd-lg.gold{ background:color-mix(in srgb, var(--sig1) 22%, transparent); color:var(--sig1); }
.pd-top{ width:100%; border-collapse:collapse; font-size:.82rem; max-width:640px; margin-top:1rem; }
.pd-top th{ text-align:left; font-size:.68rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3); padding:.3rem .5rem; border-bottom:1px solid var(--rule); }
.pd-top th.n, .pd-top td.n{ text-align:right; font-variant-numeric:tabular-nums; }
.pd-top td{ padding:.3rem .5rem; border-bottom:1px solid var(--rule-hair); }
.pd-bar{ display:inline-block; width:120px; height:9px; border-radius:5px; background:var(--rule); overflow:hidden; vertical-align:middle; }
.pd-bar i{ display:block; height:100%; }
.pd-bar.ok i{ background:#49c17a; } .pd-bar.part i{ background:#f0a020; } .pd-bar.none i{ background:#e05252; }

.mw-gallery{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:.8rem; }
.shot{ margin:0; }
.shot-stage{ position:relative; aspect-ratio:16/9; background:#0b0d0f; border-radius:10px; overflow:hidden; border:1px solid var(--rule); }
.shot-stage video{ width:100%; height:100%; object-fit:fill; display:block; }
.shot-box{ position:absolute; border:2px solid #38bdf8; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.45), 0 0 8px rgba(56,189,248,.5); pointer-events:none; }
.shot-score{ position:absolute; right:.35rem; bottom:.35rem; font-family:var(--mono); font-size:.66rem; font-weight:700;
  color:#fff; background:rgba(0,0,0,.6); padding:.05rem .3rem; border-radius:4px; }
.shot figcaption{ display:flex; gap:.4rem; align-items:baseline; margin-top:.3rem; font-size:.68rem; }
.shot .ev{ font-weight:600; color:var(--ink); } .shot .cl{ margin-left:auto; color:var(--ink-3); font-family:var(--mono); }

@media (max-width:900px){ .mw-tiles{ grid-template-columns:repeat(2,1fr); } .mw-rail{ width:230px; } }

/* vision-finding overlays on the Models gallery (pose skeleton / person boxes) */
.shot-ov{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.shot-ov .ov-box{ fill:none; stroke:#38bdf8; stroke-width:2; vector-effect:non-scaling-stroke; }
.shot-ov .ov-limb{ stroke:#22c55e; stroke-width:2.5; vector-effect:non-scaling-stroke; stroke-linecap:round; }
.shot-ov .ov-kp{ fill:#f43f5e; }

/* candidates table on the Models page */
.mw-cand{ width:100%; border-collapse:collapse; font-size:.82rem; }
.mw-cand th,.mw-cand td{ text-align:left; padding:.4rem .55rem; border-bottom:1px solid var(--rule); }
.mw-cand th.n,.mw-cand td.n{ text-align:right; font-variant-numeric:tabular-nums; font-family:var(--mono); }
.mw-cand thead th{ color:var(--ink-3); font-weight:600; text-transform:uppercase; letter-spacing:.06em; font-size:.62rem; }
.mw-cand td.star{ width:1.4rem; color:#f59e0b; font-size:.95rem; }
.mw-cand tr.champ{ background:color-mix(in srgb, var(--sig1) 7%, transparent); }
.mw-cand tr.champ b{ color:var(--sig1); }

.mw-cand td.act{ text-align:right; }
.mw-cand .in-use{ color:var(--sig1); font-size:.66rem; font-weight:600; }
.mw-mk{ font-size:.7rem; padding:.15rem .5rem; border:1px solid var(--sig1); border-radius:5px;
  background:transparent; color:var(--sig1); cursor:pointer; }
.mw-mk:hover:not(:disabled){ background:var(--sig1); color:var(--paper); }
.mw-mk:disabled{ opacity:.5; cursor:default; }

/* scan-gesture shadow call in Training QA */
.rv-verdict.gest-flag .finding{ color:var(--sig1); }
.receipt-line .gflag{ margin-left:.35rem; font-size:.8rem; opacity:.85; }

/* The Verifier panel (Training QA): the VLM's findings on this sale, answered blind by the reviewer. */
.rv-verify{ margin:.55rem .7rem 0; background:var(--leaf); border:1px solid var(--rule); border-left:3px solid var(--sig3, var(--sig1));
  border-radius:6px; padding:.55rem .7rem; display:flex; flex-direction:column; gap:.4rem; }
.rv-verify-head{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.rv-verify-head .vlbl{ font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.rv-verify-head .vmeta{ font-size:.72rem; color:var(--ink-3); }
.rv-verify-row{ display:flex; gap:.55rem; align-items:center; flex-wrap:wrap; text-align:left; font:inherit; font-size:.78rem;
  background:none; border:1px solid var(--rule); border-radius:4px; padding:.3rem .5rem; cursor:pointer; color:inherit; }
.rv-verify-row.on{ border-color:var(--ink-3); }
.rv-verify-row.done{ opacity:.8; }
.rv-verify-row .vk{ font-size:.68rem; font-weight:700; padding:.08em .4em; border-radius:3px; }
.rv-verify-row .vk.or{ color:var(--sig2-ink); background:color-mix(in srgb, var(--sig2) 15%, transparent); }
.rv-verify-row .vk.ns{ color:var(--sig1); background:color-mix(in srgb, var(--sig1) 15%, transparent); }
.rv-verify-row .vt{ color:var(--ink-3); font-variant-numeric:tabular-nums; }
.rv-verify-row .vp{ font-weight:600; }
.rv-verify-row .va{ margin-left:auto; font-size:.72rem; color:var(--sig0-ink); }
.rv-verify-row .va.pend{ color:var(--sig1); font-weight:600; }
.rv-verify-row .vr{ font-size:.72rem; color:var(--ink-3); }
.rv-verify-row .vr.ok{ color:var(--sig0-ink); } .rv-verify-row .vr.bad{ color:var(--sig2-ink); }
.rv-verify-card{ border-top:1px dashed var(--rule); padding-top:.4rem; display:flex; flex-direction:column; gap:.35rem; }
.rv-verify-qrow{ display:flex; gap:.6rem; align-items:center; justify-content:space-between; }
.rv-verify-q{ font-size:.8rem; font-weight:700; }
.rv-verify .rv-verify-qrow .btn{ flex:none; padding:.3rem .7rem; font-size:.74rem; }
.rv-verify-how{ font-size:.72rem; color:var(--ink-2, var(--ink-3)); }
.rv-verify-how summary{ cursor:pointer; list-style:none; }
.rv-verify-how summary::-webkit-details-marker{ display:none; }
.rv-verify-how summary .more{ color:var(--link); margin-left:.4rem; white-space:nowrap; }
.rv-verify-how summary .more::after{ content:" ▸"; } .rv-verify-how[open] summary .more::after{ content:" ▾"; }
.rv-verify-how ul{ margin:.25rem 0 0; padding-left:1.1rem; }
.rv-verify-opts{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:.3rem; }
@media (max-width:1500px){ .rv-verify-opts{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
/* cards, not pills: the brand's `.sg-page .btn` (pill, line-height 1) comes later at equal specificity and squeezed
   the two-line text outside the rounded edge (2026-11-12) — hence the extra `.rv-verify` */
.rv-verify .rv-verify-opts .btn{ display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:.2rem;
  text-align:left; font-size:.76rem; line-height:1.3; padding:.35rem .55rem; border-radius:.5rem; white-space:normal; height:100%; }
.rv-verify .rv-verify-opts .btn b{ line-height:1.2; }
.rv-verify .rv-verify-opts .btn small{ font-size:.66rem; line-height:1.25; font-weight:400; opacity:.8; }
.rv-verify-note{ flex:1; min-width:220px; font:inherit; font-size:.76rem; padding:.35rem .5rem; border:1px solid var(--rule); border-radius:4px; background:transparent; color:inherit; }
.rv-verify-acts{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.rv-verify-acts .hint{ font-size:.72rem; color:var(--ink-3); }
.rv-verify-head .vguide{ margin-left:auto; font-size:.72rem; }
/* Verifier queue triage: Priority = the Verifier thinks a finding may be real; Check = it handed one to a person.
   The whole row is tinted (the clip id is truncated in the narrow column, and the older red "detector flagged" rail
   is on most rows, so a tag or rail alone does not show) plus a one-letter badge in front of the clip id. */
.rv-queue tr.vq-pri td{ background:color-mix(in srgb, var(--accent,#DC3028) 22%, transparent); }
.rv-queue tr.vq-chk td{ background:color-mix(in srgb, #D9953F 16%, transparent); }
.vq-tag{ display:inline-block; margin-right:.3rem; min-width:1.1rem; text-align:center; font:700 .62rem/1.35 var(--sans);
  padding:0 .25em; border-radius:3px; vertical-align:middle; }
.vq-tag.pri{ color:#fff; background:var(--accent,#DC3028); }
.vq-tag.chk{ color:#1b1203; background:#D9953F; }

/* ═══════════════════════════════════════════════════════════════════════════
   SHRINKGUARD PAGE LAYER (2026-11-11)
   The portal was built as a printed report: serif-weight headings, 10–13px type, a 232px marginalia column,
   double rules. shrinkguard.ai is the opposite and sets the client's expectation: bold sans headlines, generous
   type, white cards on a pale ground, serif kept for the big numbers. This layer restyles the shared shell
   classes (.wrap .mast .kpi .doc-grid .secmark tables) so every document page changes at once, and defines the
   sg-* primitives new pages use directly. The dark work islands (.ink/.rv — Training QA, Review) keep their own
   dense scale: the type tokens are re-set only inside the document shell.
   ═══════════════════════════════════════════════════════════════════════════ */

.wrap, .sg-page{
  --t-micro:.6875rem; --t-fine:.8125rem; --t-cap:.8125rem; --t-dense:.875rem;
  --t-body:1rem; --t-lede:1.0625rem; --t-sec:1.5rem; --t-mast:2.75rem;
  --radius:10px;
  --sg-card-r:1rem;
  --sg-border:var(--rule);
}
.wrap, .sg-page{max-width:1240px; margin:0 auto; padding:40px 48px 96px; font-family:var(--sans)}
@media (max-width:760px){ .wrap, .sg-page{padding:24px 16px 64px} }

/* ── headlines: bold sans, tight, navy — the marketing site's voice ── */
.wrap h1, .wrap h2, .sg-page h1, .sg-page h2, .sg-page h3{font-family:var(--sans); font-weight:700; letter-spacing:-.02em; color:var(--ink)}

/* ── page header ── */
.mast, .sg-head{border:0; padding:8px 0 28px; margin:0}
.mast .kicker, .sg-head .sg-eyebrow{border:0; padding:0; margin:0 0 14px; display:flex; gap:12px; flex-wrap:wrap; align-items:center;
  font:700 .6875rem/1.3 var(--sans); letter-spacing:.16em; text-transform:uppercase; color:var(--ink-2)}
.mast .kicker a{color:var(--ink-2); text-decoration:none}
.mast .kicker a:hover{color:var(--link); text-decoration:underline}
.mast .kicker > span:first-child b{color:var(--ink)}
.mast h1, .sg-head h1{font:700 clamp(1.9rem,3.2vw,2.75rem)/1.08 var(--sans); letter-spacing:-.025em; margin:0 0 12px; text-wrap:balance}
.mast .dateline, .mast > p, .sg-head .sg-lede{font:400 1.0625rem/1.6 var(--sans); color:var(--ink-2); max-width:72ch; margin:0 0 6px}
.sg-head{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 24px; align-items:end}
.sg-head > :not(.sg-actions){grid-column:1}
.sg-head .sg-actions{grid-column:2; grid-row:1 / span 3; display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; align-self:end}
@media (max-width:760px){ .sg-head{grid-template-columns:1fr} .sg-head .sg-actions{grid-column:1; grid-row:auto; justify-content:flex-start} }

/* ── section headings: red number eyebrow + bold sans title, no rules ── */
.secmark{border:0; padding:0; margin:56px 0 18px; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.secmark .n{border:0; padding:0; font:700 .75rem/1 var(--sans); letter-spacing:.12em; color:var(--accent)}
.secmark .n::before{content:"0"}
h2.sec, .sg-sec h2{font:700 1.5rem/1.2 var(--sans); letter-spacing:-.02em; margin:0}
.wrap h2.sec{margin-top:48px}
.secmark h2.sec{margin-top:0}
.secmark .t{font:400 .875rem/1.4 var(--sans); color:var(--ink-3)}
.sg-sec{margin:48px 0 16px}
.sg-sec .sg-eyebrow{font:700 .6875rem/1.3 var(--sans); letter-spacing:.16em; text-transform:uppercase; color:var(--accent); margin-bottom:8px}
.sg-sec p{margin:6px 0 0; color:var(--ink-2); max-width:72ch}

/* ── stat cards: separate white cards, big serif figure (shrinkguard.ai's 48% / 74× / 0 hours) ── */
.kpi, .sg-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px;
  background:none; border:0; box-shadow:none; overflow:visible; margin:8px 0 8px}
.kpi > div, .sg-stat{background:var(--leaf); border:1px solid var(--sg-border); border-radius:var(--sg-card-r);
  box-shadow:var(--card-shadow); padding:20px 22px 22px; border-right:1px solid var(--sg-border); display:flex; flex-direction:column}
.kpi > div:last-child{border-right:1px solid var(--sg-border)}
.kpi .k, .sg-stat .k{font:700 .6875rem/1.3 var(--sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-2); min-height:0; margin:0 0 14px}
.kpi .v, .sg-stat .v{font:400 2.75rem/1 var(--display); letter-spacing:-.01em; color:var(--ink); font-variant-numeric:lining-nums}
.kpi .s, .sg-stat .s{font:400 .8125rem/1.45 var(--sans); color:var(--ink-3); margin-top:10px}
.sg-stat.hero{background:var(--brand-deep); border-color:var(--brand-deep)}
.sg-stat.hero .k, .sg-stat.hero .s{color:#B9CDE8} .sg-stat.hero .v{color:#fff}
.sg-stat.alert .v{color:var(--accent)}
@media (max-width:760px){ .kpi > div{border-bottom:1px solid var(--sg-border)} }

/* ── cards ── */
.sg-card, .wrap .panel{background:var(--leaf); border:1px solid var(--sg-border); border-radius:var(--sg-card-r);
  box-shadow:var(--card-shadow); padding:24px 26px; margin:0 0 16px}
.sg-card > h2, .sg-card > h3, .wrap .panel > h2{font:700 1.125rem/1.3 var(--sans); letter-spacing:-.01em; margin:0 0 6px}
.sg-card .sg-sub{color:var(--ink-3); font-size:.875rem; margin:0 0 16px}
.sg-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px}
.sg-icon{width:36px; height:36px; border-radius:10px; display:inline-grid; place-items:center; background:var(--brand-deep); color:#fff; margin-bottom:14px}
.sg-icon.red{background:var(--accent)}
.sg-icon svg{width:18px; height:18px}

/* ── tables: the report table on the marketing site — tracked caps head, roomy rows, inside a card ── */
.wrap .scroll, .sg-table-card{background:var(--leaf); border:1px solid var(--sg-border); border-radius:var(--sg-card-r);
  box-shadow:var(--card-shadow); padding:6px 8px; margin:0 0 16px}
.wrap table, .sg-table{border-collapse:collapse; width:100%; font:400 .875rem/1.45 var(--sans)}
.wrap thead th, .sg-table thead th{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3);
  padding:14px 14px 10px; border-bottom:1px solid var(--sg-border); text-align:left; white-space:nowrap}
.wrap tbody td, .sg-table tbody td{padding:13px 14px; border-bottom:1px solid var(--rule-hair); color:var(--ink-2); vertical-align:middle}
.wrap tbody tr:last-child td, .sg-table tbody tr:last-child td{border-bottom:0}
.wrap tbody td:first-child, .sg-table tbody td:first-child{color:var(--ink); font-weight:600}
.wrap tbody td a, .sg-table tbody td a{color:var(--link); font-weight:600; text-decoration:none}
.wrap tbody td a:hover, .sg-table tbody td a:hover{text-decoration:underline}
.sg-table td.n, .sg-table th.n{text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums}

/* key/value list — the "Immediate incident report" card */
.sg-kv{display:grid; grid-template-columns:minmax(120px,max-content) 1fr; margin:0}
.sg-kv dt{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); padding:12px 24px 12px 0; border-bottom:1px solid var(--rule-hair)}
.sg-kv dd{margin:0; padding:10px 0; border-bottom:1px solid var(--rule-hair); font-weight:600; color:var(--ink)}

/* ── marginalia: no side column. The notes move under the page as quiet cards ── */
.doc-grid{display:block}
.doc-grid > aside{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; margin-top:56px; padding-top:24px; border-top:1px solid var(--rule)}
.doc-grid > aside::before{content:"Notes"; grid-column:1 / -1; font:700 .6875rem/1 var(--sans); letter-spacing:.16em; text-transform:uppercase; color:var(--ink-3)}
aside .margin{border:1px solid var(--rule); border-radius:12px; background:transparent; padding:16px 18px; margin:0;
  font:400 .8125rem/1.55 var(--sans); color:var(--ink-3)}
aside .margin b{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; color:var(--ink-2); margin-bottom:6px}

/* ── callouts, hints, chips, pills ── */
.readfirst, .sg-callout{border:1px solid var(--rule); border-left:4px solid var(--accent); border-radius:12px; background:var(--leaf);
  padding:16px 20px; margin:16px 0; max-width:none; box-shadow:var(--card-shadow)}
.readfirst b:first-child{color:var(--accent)}
.wrap .hint, .wrap .cap, .wrap .small{font-size:.875rem; color:var(--ink-3)}
.wrap .chip, .sg-pill{font:700 .625rem/1 var(--sans); letter-spacing:.1em; text-transform:uppercase; padding:.5em .85em; border-radius:999px}
.sg-pill{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--rule-2); color:var(--ink-2)}
.sg-pill.red{border-color:var(--accent); color:var(--accent)} .sg-pill.green{border-color:var(--sig0); color:var(--sig0-ink)}
.sg-pill.navy{background:var(--brand-deep); border-color:var(--brand-deep); color:#fff}
.sg-pill.dot::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor}

/* ── buttons and inputs: the marketing pill buttons ── */
.wrap .btn, .sg-page .btn{font:700 .8125rem/1 var(--sans); padding:11px 18px; border-radius:999px}
.wrap .btn.primary, .sg-page .btn.primary{box-shadow:0 8px 20px rgba(6,36,90,.18)}
.btn.red{background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 8px 20px rgba(220,48,40,.22)}
.btn.red:hover{filter:brightness(.95)}
.wrap input:not([type=checkbox]):not([type=radio]), .wrap select, .wrap textarea, .wrap .f,
.sg-page input:not([type=checkbox]):not([type=radio]), .sg-page select, .sg-page textarea{
  font:400 .9375rem/1.3 var(--sans); color:var(--ink); background:var(--leaf); border:1px solid var(--rule-2);
  border-radius:10px; padding:10px 12px; min-height:42px}
.wrap .dateline select{min-height:0; padding:2px 6px; font-size:inherit}
.wrap label, .sg-page label{font:600 .8125rem/1.3 var(--sans); color:var(--ink-2)}
.wrap input:focus, .wrap select:focus, .wrap textarea:focus,
.sg-page input:focus, .sg-page select:focus, .sg-page textarea:focus{outline:2px solid var(--focus); outline-offset:1px; border-color:var(--focus)}

/* empty state */
.sg-empty{background:var(--leaf); border:1px dashed var(--rule-2); border-radius:var(--sg-card-r); padding:36px; text-align:center; color:var(--ink-3)}
.sg-empty b{display:block; color:var(--ink); font-size:1.0625rem; margin-bottom:6px}
/* a table already inside a card is not a second card */
.wrap .panel .scroll, .sg-card .scroll, .sg-card .sg-table-card{border:0; box-shadow:none; padding:0; margin:0; background:none}

/* Models workspace and Label set in the page language (2026-11-11): sans headlines, serif figures, white cards,
   the brand navy for selection instead of the orange signal colour. */
.mw-railhead h1{font:700 1.5rem/1.1 var(--sans); letter-spacing:-.02em; color:var(--ink); margin:0 0 6px}
.mw-railhead .mw-sub{font-size:.8125rem}
.mw-lane.sel{background:color-mix(in srgb, var(--brand) 8%, var(--leaf)); border-color:color-mix(in srgb, var(--brand) 45%, transparent)}
.mw-lane.sel .mw-spark{color:var(--brand)}
.mw-hero-t h2{font:700 1.75rem/1.15 var(--sans); letter-spacing:-.02em; color:var(--ink)}
.mw-tiles{gap:14px}
.tile{background:var(--leaf); border-radius:1rem; padding:16px 18px; box-shadow:var(--card-shadow)}
.tile .k{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; color:var(--ink-2)}
.tile .v{font:400 2.25rem/1.05 var(--display); letter-spacing:-.01em; margin-top:8px}
.tile .v.sm{font-size:1.5rem}
.tile .u{font-size:.8125rem; margin-top:6px}
.mw-block{background:var(--leaf); border-radius:1rem; padding:18px 20px; box-shadow:var(--card-shadow)}
.mw-block h3{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; color:var(--ink-2)}
.mw-block p{font-size:.9375rem}
.lbl{max-width:1240px; padding:40px 48px 96px}
.lbl::before{display:none}
.lbl h2{font:700 clamp(1.9rem,3.2vw,2.75rem)/1.08 var(--sans); letter-spacing:-.025em; margin:0 0 12px}
.lbl h3{font:700 1.5rem/1.2 var(--sans); letter-spacing:-.02em; margin:48px 0 8px}
.lbl .sub{font-size:1.0625rem; color:var(--ink-2); max-width:72ch}
.lbl .card{border-radius:1rem; border-left-width:4px; padding:18px 20px; box-shadow:var(--card-shadow)}
.lbl .card .n{font:400 2.5rem/1 var(--display)}
.lbl .card .k{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em}
.lbl .tablewrap{border-radius:1rem; box-shadow:var(--card-shadow); padding:4px 8px}
.lbl th{font:700 .6875rem/1.3 var(--sans); letter-spacing:.12em; padding:12px}
.lbl td{padding:12px}
/* six stat cards sit in one row on a laptop */
.kpi, .sg-stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}

/* ── Administration (2026-11-11): one estate, client → store → box. Tabs, setup checklist, status, forms. ── */
.adm-tabs{display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--rule); margin:8px 0 24px}
.adm-tabs a{font:600 .875rem/1 var(--sans); color:var(--ink-3); text-decoration:none; padding:12px 14px; border-bottom:2px solid transparent; margin-bottom:-1px; display:inline-flex; gap:6px; align-items:center}
.adm-tabs a:hover{color:var(--ink)}
.adm-tabs a.on{color:var(--ink); border-bottom-color:var(--accent)}
.adm-tabs .ct{font:700 .6875rem/1 var(--sans); background:var(--band); color:var(--ink-2); border-radius:999px; padding:3px 7px}
.adm-tabs.sub{margin:-12px 0 20px; border-bottom:0; gap:2px}
.adm-tabs.sub a{padding:8px 12px; border:1px solid var(--rule); border-radius:999px; margin:0; font-size:.8125rem}
.adm-tabs.sub a.on{background:var(--band); border-color:var(--ink-3)}
.adm-dot{display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--nodata); margin-right:6px; vertical-align:middle}
.adm-dot.ok{background:#16a34a} .adm-dot.bad{background:var(--accent)} .adm-dot.warn{background:#d97706}
.adm-check{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:0 0 8px}
.adm-check a{display:flex; gap:10px; align-items:flex-start; padding:14px 16px; border:1px solid var(--rule); border-radius:12px; background:var(--leaf); text-decoration:none; color:var(--ink-2); font-size:.8125rem; line-height:1.4}
.adm-check a b{display:block; color:var(--ink); font-size:.875rem}
.adm-check a.done{border-color:color-mix(in srgb, #16a34a 40%, var(--rule))}
.adm-check a.todo{border-style:dashed}
.adm-check .n{flex:none; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font:700 .75rem/1 var(--sans); background:var(--band); color:var(--ink-2)}
.adm-check a.done .n{background:#16a34a; color:#fff}
.adm-form{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px 18px; margin:14px 0 4px}
.adm-form label{display:flex; flex-direction:column; gap:6px}
.adm-form label input, .adm-form label select{width:100%}
.adm-form .wide{grid-column:1 / -1}
.adm-acts{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:16px}
.adm-msg{border-radius:12px; padding:12px 16px; margin:0 0 16px; font-size:.9375rem}
.adm-msg.ok{background:color-mix(in srgb, #16a34a 10%, var(--leaf)); color:#0f6b3a}
.adm-msg.bad{background:color-mix(in srgb, var(--accent) 10%, var(--leaf)); color:var(--sig2-ink)}
.adm-confirm{border:1px solid var(--accent); border-radius:12px; padding:16px 18px; margin-top:14px; background:var(--leaf)}
.adm-confirm > b{display:block; margin-bottom:8px; color:var(--ink)}
.adm-token{border:1px solid var(--brand); border-radius:12px; padding:16px 18px; margin:0 0 16px; background:color-mix(in srgb, var(--brand) 5%, var(--leaf))}
.adm-token code{display:block; font:700 1rem/1.4 var(--mono); word-break:break-all; color:var(--ink); margin:8px 0; user-select:all}
.adm-grid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:16px}
.adm-attn{list-style:none; margin:0; padding:0}
.adm-attn li{display:flex; gap:12px; align-items:center; padding:12px 4px; border-bottom:1px solid var(--rule-hair)}
.adm-attn li:last-child{border-bottom:0}
.adm-attn li .w{color:var(--ink-3); font-size:.8125rem; margin-left:auto; white-space:nowrap}
.adm-attn li a{font-weight:600; color:var(--ink); text-decoration:none} .adm-attn li a:hover{color:var(--link)}
.adm-muted{color:var(--ink-3); font-size:.8125rem}
a.btn{text-decoration:none}
.adm-chks{display:flex; flex-direction:column; gap:8px}
.adm-chks label{flex-direction:row !important; align-items:center; gap:10px; font-weight:500; color:var(--ink)}
.adm-form label input[type=checkbox]{width:auto; min-height:0}
/* the one action in an empty state is a button, not a text link (2026-11-11) */
.sg-empty a{display:inline-flex; align-items:center; margin-top:14px; font:700 .8125rem/1 var(--sans); padding:11px 18px; border-radius:999px;
  background:var(--brand-deep); color:#fff; text-decoration:none; box-shadow:0 8px 20px rgba(6,36,90,.18)}
.sg-empty a::after{content:" →"; white-space:pre}
.sg-empty a:hover{background:var(--brand)}
.sg-empty b + a{margin-left:0}
.sg-empty{display:flex; flex-direction:column; align-items:center}
.mw-goals{margin:6px 0 2px; padding:7px 12px !important; font-size:.75rem !important}
.mw-more{display:block; width:100%; text-align:left; background:none; border:0; color:var(--ink-3); font:600 .8125rem/1 var(--sans); padding:12px 10px; cursor:pointer}
.mw-more:hover{color:var(--ink)}
.mw-acc{margin-bottom:10px}
.mw-main .sg-card{margin-top:14px}
.mw-group{font:700 .6875rem/1 var(--sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3); padding:16px 10px 6px}
.mw-facts{margin:14px 0 4px; background:var(--leaf); border:1px solid var(--rule); border-radius:1rem; padding:6px 20px; box-shadow:var(--card-shadow)}
.mw-facts dd{font-weight:500}
.mw-era{font-size:.75rem; color:var(--ink-3); margin-top:6px; line-height:1.4}
.mw-era-btn{display:inline; width:auto; padding:2px 0 !important; font-size:.75rem !important; color:var(--link) !important; text-decoration:underline}

/* clipcache.js: the clip's download, and "downloading first" on a slow line (2026-11-19) */
.clipdl{ position:absolute; left:.5rem; bottom:3.2rem; z-index:5; pointer-events:none; font:600 .72rem/1.2 var(--sans);
  color:#fff; background:rgba(6,36,90,.82); padding:.3rem .65rem; border-radius:999px; }
.clipdl.done{ background:rgba(31,169,113,.9); }
.clipdl.big{ left:50%; top:50%; bottom:auto; transform:translate(-50%,-50%); pointer-events:auto; border-radius:.9rem;
  padding:1rem 1.25rem; display:flex; flex-direction:column; gap:.45rem; align-items:center; text-align:center;
  font-size:.85rem; min-width:15rem; box-shadow:0 8px 28px rgba(0,0,0,.35); }
.clipdl.big b{ font-size:.92rem; }
.clipdl-bar{ display:block; width:100%; height:.35rem; border-radius:999px; background:rgba(255,255,255,.25); overflow:hidden; }
.clipdl-bar i{ display:block; height:100%; background:#fff; transition:width .25s; }
.clipdl.big button{ font:600 .78rem var(--sans); color:#06245A; background:#fff; border:0; border-radius:999px; padding:.35rem .9rem; cursor:pointer; }
