/* ============================================================================
   BRACE owners portal: the grouped look (Nov 2026).
   Loaded after portal.css and wins over it. Within the brand: charcoal
   ground, off-white type, tracer orange #F05A28 for the one primary action
   and live states, green and red only for hit and miss, Instrument Sans for
   words and mono only for figures.

   The idea, borrowed from a Mac's Settings: the page is a deep graphite
   ground; everything you read or change sits in rounded grouped panels a
   step lighter, rows divided by inset hairlines, the action on the right of
   the row it acts on. One large figure per page is the only loud thing.
   ========================================================================== */
:root{
  --bg:        #121312;
  --side:      #171817;
  --group:     #1C1D1C;
  --group-2:   #242524;
  --ink-1:     #F3F2EE;
  --ink-2:     rgba(243,242,238,.64);
  --ink-3:     rgba(243,242,238,.54);
  --rule:      rgba(255,255,255,.07);
  --rule-2:    rgba(255,255,255,.12);
  --r:         10px;
  --r-group:   14px;
  --text-1:var(--ink-1); --text-2:var(--ink-2); --text-3:var(--ink-3);
  --line:var(--rule); --line-strong:var(--rule-2);
}

body { background: var(--bg); color: var(--ink-2); font-size: 14px; letter-spacing: -.003em; }
::selection { background: rgba(240,90,40,.35); color: var(--ink-1); }

/* ---------- Sidebar ---------- */
.crm { grid-template-columns: 236px minmax(0, 1fr); }
.side { background: var(--side); border-right: 1px solid var(--rule); padding: 22px 12px 18px; }
.side .brand { margin: 2px 12px 26px; }
.side .brand img { height: 15px; }
.views { gap: 1px; }
.views a, .views .navhead, .navmore > summary {
  font: 500 13.5px/20px var(--ui); color: var(--ink-2);
  padding: 6px 10px; border-left: 0; border-radius: 7px; }
.views a:hover, .navmore > summary:hover { color: var(--ink-1); background: rgba(255,255,255,.04); }
.views a.on { color: var(--ink-1); background: rgba(255,255,255,.09); font-weight: 600; }
.views a.on::before { content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--accent); margin: 0 2px 0 -4px; }
.navhead-s { font: 600 11.5px/16px var(--ui); color: var(--ink-3);
  padding: 18px 10px 6px; letter-spacing: 0; }
.navgap { height: 14px; }
.navmore a { padding-left: 18px; }
.side-foot { border-top: 1px solid var(--rule); padding-top: 14px; }

/* ---------- Page ---------- */
.crm main { max-width: 1040px; padding: 44px 56px 120px; }
.crm-head { margin-bottom: 36px; align-items: flex-start; }
.crm-head > div { max-width: 680px; }
.crm-head h1, h1 { font: 650 30px/36px var(--ui); letter-spacing: -.022em; color: var(--ink-1); }
.crm-head h1 .count { font: 500 15px/1 var(--ui); color: var(--ink-3); letter-spacing: 0; }
/* The line under a title says what the page is for; one line, quiet. */
.crm-head p { display: block; margin-top: 8px; font-size: 14.5px; line-height: 22px;
  color: var(--ink-2); max-width: 64ch; }
.crm-head .btn { margin-top: 4px; }

section.s { margin-bottom: 44px; }
/* Section headers: sentence case, set like a title, not a stencil. */
.over, .t-over, section.s > .over { font: 600 15px/20px var(--ui); color: var(--ink-1);
  text-transform: none; letter-spacing: -.01em; margin-bottom: 12px; }
.over .s { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.t-h2 { font-size: 15px; }
.pnote, .s.pnote { font-size: 13px; line-height: 19px; color: var(--ink-3); max-width: 72ch; margin-top: 10px; }
.empty { color: var(--ink-3); background: var(--group); border-radius: var(--r-group);
  padding: 18px 20px; font-size: 14px; }
.linky { color: var(--ink-1); border-bottom: 1px solid var(--rule-2); }
.linky:hover { border-bottom-color: var(--ink-1); }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--r); padding: 9px 16px; font: 600 14px/20px var(--ui); }
.btn-ghost, .btn.btn-ghost, .mini-btn, .callbtn, .clipsend, .btn-copy {
  border: 0; background: rgba(255,255,255,.08); color: var(--ink-1);
  border-radius: var(--r); padding: 8px 14px; font-weight: 500; }
.btn-ghost:hover, .mini-btn:hover, .callbtn:hover, .clipsend:hover, .btn-copy:hover {
  background: rgba(255,255,255,.13); color: var(--ink-1); }
.btn-ghost:disabled { opacity: .4; }
.sm, .btn-ghost.sm { padding: 6px 12px; font-size: 13px; line-height: 18px; border-radius: 8px; }
.runrow { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Grouped panels ---------- */
.group { background: var(--group); border-radius: var(--r-group); overflow: hidden; }
.group + .group { margin-top: 12px; }
.g-row { display: flex; align-items: center; gap: 20px; padding: 14px 20px;
  position: relative; min-height: 56px; }
.g-row + .g-row::before { content: ''; position: absolute; top: 0; left: 20px; right: 0;
  height: 1px; background: var(--rule); }
.g-main { flex: 1 1 auto; min-width: 0; }
.g-t { font: 600 14px/20px var(--ui); color: var(--ink-1); display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap; }
.g-s { font-size: 13px; line-height: 18px; color: var(--ink-3); margin-top: 2px; max-width: 64ch; }
.g-fig { flex: 0 0 auto; width: 132px; text-align: right; display: flex; flex-direction: column; }
.g-fig b { font: 500 16px/22px var(--mono); color: var(--ink-1); font-variant-numeric: tabular-nums; }
.g-fig span { font-size: 11.5px; line-height: 15px; color: var(--ink-3); white-space: nowrap; }
.g-act { flex: 0 0 auto; display: flex; gap: 6px; justify-content: flex-end; min-width: 264px; }
.g-row .inp { width: 260px; flex: 0 0 auto; }

/* Status pills: live is the orange state; the rest are quiet. */
.pill { font: 600 11px/16px var(--ui); padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--ink-2); }
.pill-live { background: rgba(240,90,40,.16); color: #FF8A5E; }
.pill-proposed { background: rgba(255,255,255,.08); color: var(--ink-1); }
.pill-rejected, .pill-retired { color: var(--ink-3); }

/* Segmented control */
.seg { flex: 0 0 auto; display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px;
  background: rgba(255,255,255,.06); }
.seg button { font: 500 13px/18px var(--ui); color: var(--ink-2); padding: 5px 12px;
  border-radius: 7px; transition: background .15s var(--ease-out), color .15s var(--ease-out); }
.seg button:hover { color: var(--ink-1); }
.seg button.on { background: rgba(255,255,255,.16); color: var(--ink-1);
  box-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* Inputs */
.inp, .field input, .field select, .field textarea {
  background: rgba(255,255,255,.06); border: 1px solid transparent; border-radius: 8px;
  color: var(--ink-1); padding: 7px 10px; font-size: 13.5px; }
.inp:focus { border-color: rgba(240,90,40,.6); outline: none; background: rgba(255,255,255,.08); }

/* ---------- The one loud thing: a hero figure ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px;
  background: var(--group); border-radius: var(--r-group); padding: 28px 28px 26px; align-items: end; }
.hero-fig b { display: block; font: 500 68px/1 var(--ui); letter-spacing: -.035em;
  color: var(--ink-1); font-variant-numeric: tabular-nums; }
/* The one display figure is set in the UI face: at this size the mono's
   wide decimal point floats free of its digits. Every other figure stays mono. */
.hero-fig span { display: block; margin-top: 12px; font-size: 14px; line-height: 20px;
  color: var(--ink-2); max-width: 32ch; }
.hero-side { display: flex; flex-direction: column; }
.hero-side > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0;
  border-top: 1px solid var(--rule); font-size: 13.5px; }
.hero-side > div:first-child { border-top: 0; }
.hero-side .k { color: var(--ink-3); }
.hero-side .v { color: var(--ink-1); text-align: right; }

/* ---------- Tables: inside a group, sentence-case headers ---------- */
.gtable, .ref-table, .matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.group .gtable th, .gtable th { font: 600 12px/16px var(--ui); color: var(--ink-3); text-align: left;
  text-transform: none; letter-spacing: 0; padding: 12px 16px 8px; }
.gtable td { padding: 10px 16px; border-top: 1px solid var(--rule); color: var(--ink-2); }
.gtable th.num, .gtable td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gtable th.num { font-family: var(--ui); }
.gtable td.strong { color: var(--ink-1); }
.gtable tr:hover td { background: rgba(255,255,255,.02); }

.ref-table { background: var(--group); border-radius: var(--r-group); overflow: hidden; width: 100% !important; max-width: none !important; }
.ref-table th { font: 600 12px/16px var(--ui) !important; color: var(--ink-3); text-transform: none !important;
  letter-spacing: 0 !important; padding: 12px 16px 8px; text-align: left; }
.ref-table th.num { text-align: right; }
.ref-table td { padding: 10px 16px; border-top: 1px solid var(--rule); }
.ref-table .ref-changed { color: var(--accent); }

/* Key figures row */
.kpis { gap: 0; background: var(--group); border-radius: var(--r-group); padding: 6px 4px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 0 12px; }
.kpi { padding: 12px 16px; gap: 4px; }
.kpi i { font: 500 12px/16px var(--ui); color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.kpi b { font: 500 17px/22px var(--mono); color: var(--ink-1); }
.kpi b .s, .kpi b span { font-size: 12px; color: var(--ink-3); }

/* Old figure rows on other pages pick up the same surface. */
.figs { background: var(--group); border-radius: var(--r-group); padding: 22px 24px; gap: 32px; }
.fig .n { font-weight: 400; letter-spacing: -.03em; color: var(--ink-1); }
.fig .k { color: var(--ink-2); text-transform: none; letter-spacing: 0; }

/* Lists on older pages: rows sit in the group surface. */
.row { border-top: 1px solid var(--rule); padding: 12px 4px; }
.cols2 { gap: 32px; }
.ref-worst, .ref-hist { background: var(--group); border-radius: var(--r-group); padding: 4px 16px; }
.ref-worst .line, .ref-hist .line { border-top: 1px solid var(--rule); padding: 10px 0; }
.ref-worst .line:first-child, .ref-hist .line:first-child { border-top: 0; }

/* Training: the call buttons keep their meaning colours. */
.ref-btn { border: 0; background: rgba(255,255,255,.07); border-radius: 12px; }

@media (max-width: 900px) {
  .crm { grid-template-columns: minmax(0, 1fr); }
  .side { padding: 12px 16px; border-right: 0; }
  .views a.on::before { display: none; }
  .views a.on { background: none; }
  .crm-head { flex-wrap: wrap; gap: 14px; }
  .crm-head .btn { margin-top: 0; }
  .hero-side > div { font-size: 13px; }
  .g-act { min-width: 0; }
  .crm main { padding: 28px 18px 96px; }
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .hero-fig b { font-size: 48px; }
  .g-row { flex-wrap: wrap; gap: 10px 16px; }
  .g-fig { width: auto; text-align: left; }
  .g-row .inp { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .seg button { transition: none; } }

/* Augmentation on the detector training card: a row that opens into one
   line per setting. */
.g-row.aug { flex-wrap: wrap; align-items: flex-start; }
.g-row.aug .g-main { flex: 1 1 0; min-width: 240px; }
.g-row.aug .g-act { align-items: center; flex-wrap: wrap; }
.aug-panel { flex: 1 1 100%; border-top: 1px solid var(--rule); margin-top: 4px; padding-top: 12px; }
.aug-note { font-size: 13px; line-height: 18px; color: var(--ink-3); max-width: 72ch; margin-bottom: 6px; }
.aug-set { display: grid; grid-template-columns: 236px 170px 104px minmax(0, 1fr); gap: 2px 18px;
  align-items: center; padding: 9px 0; }
.aug-set + .aug-set { border-top: 1px solid var(--rule); }
.aug-head { border-top: 1px solid var(--rule); margin: 0; padding: 12px 0 6px; color: var(--ink-2); }
.aug-name { font: 600 13.5px/18px var(--ui); color: var(--ink-1); white-space: nowrap; }
.aug-val { font: 500 13px/18px var(--ui); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aug-set.is-changed .aug-val { color: var(--ink-1); }
.aug-set.is-changed .aug-name::after { content: 'changed'; margin-left: 8px; font: 600 11px/16px var(--ui);
  padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ink-2); }
.aug-what { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.aug-std { white-space: nowrap; color: var(--ink-2); }
.aug-set input[type=range] { width: 100%; height: 24px; margin: 0; accent-color: var(--ink-1); }
.aug-more { border-top: 1px solid var(--rule); }
.aug-more summary { cursor: pointer; padding: 11px 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.aug-more[open] summary { border-bottom: 1px solid var(--rule); }
@media (max-width: 1100px) {
  .aug-set { grid-template-columns: 236px minmax(0, 1fr) 104px; }
  .aug-what { grid-column: 1 / -1; }
}

/* Figure rows on Home and older pages: display figures in the UI face too,
   so a word ("January") or a price does not turn into a typewriter. */
.fig .n { font-family: var(--ui); font-weight: 500; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; }
.fig.zero .n { color: var(--ink-3); }

/* ---------- Review fixes (2 Nov) ---------- */
/* One orange per page: buttons and changed values inside tables go quiet. */
.ref-table .btn:not(.btn-ghost) { background: rgba(255,255,255,.08); color: var(--ink-1); }
.ref-table .btn:not(.btn-ghost):hover { background: rgba(255,255,255,.13); }
.ref-table .ref-changed { color: var(--ink-1); font-weight: 600; }

/* Key figures sit on one baseline whatever their label length. */
.kpis { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); padding: 8px 4px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 16px 14px; }
.kpi i { min-height: 16px; }

/* Older pages: sentence-case subheads, words not set in mono. */
.grouphead { font: 600 13px/18px var(--ui); text-transform: none; letter-spacing: 0;
  color: var(--ink-2); padding: 22px 0 8px; }
.bd-row .num { font: 500 13.5px/20px var(--ui); font-variant-numeric: tabular-nums; color: var(--ink-1); }
.bd-row .s { color: var(--ink-3); }

/* One inner edge, 20px, for every panel. */
.hero { padding: 24px 20px 22px; }
.gtable th:first-child, .gtable td:first-child,
.ref-table th:first-child, .ref-table td:first-child,
.matrix th:first-child, .matrix td:first-child { padding-left: 20px; }
.gtable th:last-child, .gtable td:last-child,
.ref-table th:last-child, .ref-table td:last-child,
.matrix th:last-child, .matrix td:last-child { padding-right: 20px; }
.ref-worst, .ref-hist { padding: 4px 20px; }

/* Figure panels spread across their width. */
.figs { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  justify-content: stretch; gap: 24px; padding: 22px 20px; }

/* Training history: room for "1 Nov 23:25". */
.ref-hist .line { grid-template-columns: 104px 52px minmax(0, 1fr) auto; column-gap: 12px; }
@media (max-width: 560px) { .ref-hist .line { grid-template-columns: 96px 44px minmax(0, 1fr) auto; } }

/* By camera gets the wider column; stack below desktop. */
.cols2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1180px) { .cols2 { grid-template-columns: 1fr; gap: 28px; } }
/* The phone's rail is one scrolling row: group names would sit between links. */
@media (max-width: 900px) { .navhead-s { display: none; } }

/* ---------- The rail: four collapsible groups ---------- */
.navgrp { margin: 0; }
.navgrp > summary { list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  font: 600 13.5px/20px var(--ui); color: var(--ink-1); padding: 8px 10px; border-radius: 7px; }
.navgrp > summary::-webkit-details-marker { display: none; }
.navgrp > summary::after { content: ''; width: 6px; height: 6px; margin-left: auto;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .18s var(--ease-out); }
.navgrp[open] > summary::after { transform: rotate(45deg); }
.navgrp > summary:hover { background: rgba(255,255,255,.04); }
.navgrp > summary .warn-dot { margin-left: 4px; }
.navgrp > a { padding-left: 20px; }
.navgrp + .navgrp { margin-top: 2px; }
.views a.navtop { font-weight: 600; color: var(--ink-1); padding: 8px 10px; margin-bottom: 2px; }
.navgrp[open] { padding-bottom: 8px; }
@media (max-width: 900px) {
  .navgrp > a { padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) { .navgrp > summary::after { transition: none; } }

/* Verdicts: disagreement review strips */
.disgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 12px; }
.discard { margin: 0; background: var(--card, #1d1d1d); border-radius: 12px; overflow: hidden; }
.discard img { display: block; width: 100%; height: auto; background: #111; }
.discard figcaption { padding: 8px 12px; font-size: 13px; }

/* ML overview: verdict accuracy trend */
.trend { width: 100%; height: auto; max-width: 760px; display: block; }
.trend .tr-grid { stroke: var(--line, rgba(255,255,255,.08)); stroke-width: 1; }
.trend .tr-ax { fill: var(--ink-3, rgba(255,255,255,.54)); font: 11px var(--ui, system-ui); }
.trend .tr-line { fill: none; stroke: var(--accent, #f15a24); stroke-width: 2; }
.trend .tr-dot { fill: var(--accent, #f15a24); }
.trend .tr-lab { fill: var(--ink-1, #fff); font: 600 13px var(--ui, system-ui); }

/* The labelling study's chart: one line with its 95% interval as a wash. */
.study-chart { position: relative; max-width: 760px; }
.study-chart .trend { outline: none; }
.study-chart .trend:focus-visible { outline: 1px solid var(--rule-2); outline-offset: 4px; border-radius: 6px; }
.trend .st-band { fill: var(--accent, #F05A28); opacity: .12; stroke: none; }
.trend .st-whisker { stroke: var(--accent, #F05A28); stroke-width: 2; opacity: .35; }
.trend .st-end { fill: var(--accent, #F05A28); stroke: var(--bg, #121312); stroke-width: 2; }
.trend .st-cross { stroke: var(--rule-2, rgba(255,255,255,.12)); stroke-width: 1; }
.trend .st-cross[hidden] { display: none; }
.trend .st-pm { fill: var(--ink-3); font-weight: 500; }
.study-tip { position: absolute; top: 0; transform: translate(-50%, -4px); pointer-events: none; white-space: nowrap;
  background: var(--group-2); border: 1px solid var(--rule-2); border-radius: 8px; padding: 6px 10px;
  font: 12px/16px var(--ui); color: var(--ink-2); }
.study-tip b { color: var(--ink-1); font-weight: 600; }
.study-figs { margin: 6px 0 2px; }
.study-figs summary { cursor: pointer; color: var(--ink-3); font: 12px/18px var(--ui); }
.study-figs .group { margin-top: 8px; }
.ref-study .kpi > .s { font: 12px/16px var(--ui); color: var(--ink-3); }
.ref-study .ref-targets { margin-bottom: 18px; }
.ref-study .pnote .callbtn { margin-left: 8px; }

/* RTR: variable status dots and changes */
.rtr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3, #777); }
.rtr-ok { background: #3fb27f; }
.rtr-watch { background: #d9a43a; }
.rtr-low { background: #e5533d; }
.rtr-d { font-variant-numeric: tabular-nums; }
.rtr-d.up { color: #3fb27f; }
.rtr-d.down { color: #e5533d; }

/* RTR milestones: bars toward the next accuracy step */
.ms-step { margin-top: 14px; }
.ms-group { padding: 6px 0; }
.ms-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 3fr) 110px 80px; gap: 14px; align-items: center; padding: 10px 18px; }
.ms-row + .ms-row { border-top: 1px solid var(--line, rgba(255,255,255,.06)); }
.ms-label b { display: block; font-weight: 600; font-size: 14px; }
.ms-label span { display: block; font-size: 12px; color: var(--ink-3, rgba(255,255,255,.54)); margin-top: 2px; }
.ms-bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; }
.ms-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #3fb27f; border-radius: 6px; }
.ms-bar em { position: absolute; left: 8px; top: -2px; font-size: 11px; font-style: normal; color: var(--ink-3, rgba(255,255,255,.54)); }
.ms-num { text-align: right; font-size: 13px; }
.ms-how { font-size: 12px; color: var(--ink-3, rgba(255,255,255,.54)); text-align: right; }
@media (max-width: 720px) {
  .ms-row { grid-template-columns: 1fr 90px; }
  .ms-bar { grid-column: 1 / -1; order: 3; }
  .ms-how { display: none; }
}

/* ---- RTR ops globe (portal/ops-globe.js) ---- */
.ops{position:relative;z-index:20;width:100%;height:100dvh;min-height:460px;margin:56px 0 -120px;border-radius:0;overflow:hidden;
  background:radial-gradient(ellipse at 50% 55%,#06121a 0%,#020507 60%,#000 100%);border:0;
  font-family:'JetBrains Mono',ui-monospace,monospace;color:#bff6ea;letter-spacing:.06em;isolation:isolate}
.ops .ops-map{position:absolute;inset:0;z-index:1}
.ops-map canvas{filter:saturate(.85) contrast(1.08)}
.ops-stars{position:absolute;inset:0;z-index:0;opacity:.7;background-image:
  radial-gradient(1px 1px at 12% 18%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 78% 12%,#fff 50%,transparent 51%),
  radial-gradient(1px 1px at 33% 72%,#cfe 50%,transparent 51%),radial-gradient(1.5px 1.5px at 88% 64%,#fff 50%,transparent 51%),
  radial-gradient(1px 1px at 56% 8%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 6% 86%,#fff 50%,transparent 51%),
  radial-gradient(1px 1px at 64% 90%,#dff 50%,transparent 51%),radial-gradient(1px 1px at 22% 44%,#fff 50%,transparent 51%),
  radial-gradient(1px 1px at 93% 34%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 45% 30%,#fff 50%,transparent 51%);
  transition:opacity 1.2s}
.ops.near .ops-stars{opacity:0}
.ops-scan{position:absolute;inset:0;z-index:3;pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(0,0,0,.18) 0 1px,transparent 1px 3px);mix-blend-mode:multiply}
.ops-scan::after{content:"";position:absolute;left:0;right:0;height:22%;top:-22%;
  background:linear-gradient(180deg,transparent,rgba(63,224,197,.07),transparent);animation:opsSweep 5.5s linear infinite}
@keyframes opsSweep{to{top:100%}}
.ops-vig{position:absolute;inset:0;z-index:3;pointer-events:none;box-shadow:inset 0 0 140px 30px rgba(0,0,0,.85)}
.ops-brk{position:absolute;z-index:4;width:34px;height:34px;border:2px solid rgba(63,224,197,.75)}
.ops-brk.k-tl{top:14px;left:14px;border-right:0;border-bottom:0}.ops-brk.k-tr{top:14px;right:14px;border-left:0;border-bottom:0}
.ops-brk.k-bl{bottom:14px;left:14px;border-right:0;border-top:0}.ops-brk.k-br{bottom:14px;right:14px;border-left:0;border-top:0}
.ops-reticle{position:absolute;z-index:4;left:50%;top:50%;width:180px;height:180px;margin:-90px 0 0 -90px;pointer-events:none;
  border:1px dashed rgba(63,224,197,.35);border-radius:50%;animation:opsSpin 24s linear infinite;transition:width .8s,height .8s,margin .8s,border-color .8s}
.ops-reticle i{position:absolute;background:rgba(63,224,197,.7)}
.ops-reticle i:nth-child(1){left:50%;top:-14px;width:1px;height:28px}.ops-reticle i:nth-child(2){left:50%;bottom:-14px;width:1px;height:28px}
.ops-reticle i:nth-child(3){top:50%;left:-14px;height:1px;width:28px}.ops-reticle i:nth-child(4){top:50%;right:-14px;height:1px;width:28px}
.ops-reticle{transition:opacity .6s}.ops.locked .ops-reticle{opacity:0}
@keyframes opsSpin{to{transform:rotate(360deg)}}
.ops-top{position:absolute;z-index:5;top:22px;left:60px;right:60px;display:flex;justify-content:space-between;font-size:11px;text-transform:uppercase}
.ops-dim{color:rgba(191,246,234,.55)}
.ops-rec{display:inline-block;width:8px;height:8px;border-radius:50%;background:#ff3b30;margin-right:8px;vertical-align:1px;animation:opsBlink 1s steps(2) infinite}
@keyframes opsBlink{50%{opacity:.15}}
.ops-tele{position:absolute;z-index:5;top:56px;left:26px;display:grid;gap:5px;font-size:11px;
  background:rgba(2,10,12,.55);border-left:2px solid rgba(63,224,197,.6);padding:10px 14px;backdrop-filter:blur(2px)}
.ops-tele div{display:flex;gap:14px}.ops-tele span{width:30px;color:rgba(191,246,234,.5)}.ops-tele b{font-weight:500;color:#e8fffa;font-variant-numeric:tabular-nums}
.ops-log{position:absolute;z-index:5;right:26px;top:56px;width:min(340px,46%);font-size:10.5px;line-height:1.7;color:rgba(191,246,234,.8);text-align:left}
.ops-log .red{color:#ff5a4f}
.ops-lock{position:absolute;z-index:5;left:50%;top:calc(50% + 70px);transform:translateX(-50%);text-align:center;opacity:0;transition:opacity .6s;
  background:rgba(20,0,0,.55);border:1px solid rgba(255,59,48,.65);padding:10px 18px;white-space:nowrap}
.ops.locked .ops-lock{opacity:1}
.ops-lock-t{color:#fff;font-weight:500;font-size:14px;letter-spacing:.08em;margin-bottom:4px}
.ops-lock-w{color:#fff;font-size:15px;margin:4px 0}.ops-lock-s{color:rgba(255,220,215,.75);font-size:10px}
.ops-bar{position:absolute;z-index:5;left:26px;right:26px;bottom:24px;display:flex;justify-content:space-between;align-items:center;font-size:11px}
.ops-bar span::before{content:"\25A0  ";color:#3fe0c5}.ops.locked .ops-bar span::before{color:#ff3b30}
.ops-btn{font:inherit;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:#bff6ea;background:rgba(2,10,12,.6);
  border:1px solid rgba(63,224,197,.5);padding:6px 12px;border-radius:4px;cursor:pointer}
.ops-btn:hover{border-color:#3fe0c5;color:#fff}
.ops-attr{position:absolute;z-index:5;right:60px;bottom:6px;font-size:9px;color:rgba(255,255,255,.45);letter-spacing:0}
.ops-ping{width:16px;height:16px}
.ops-ping b{position:absolute;inset:3px;border-radius:50%;background:#ff2d20;box-shadow:0 0 10px 3px rgba(255,45,32,.85)}
.ops-ping i{position:absolute;inset:0;border-radius:50%;border:2px solid #ff3b30;animation:opsPing 2.1s cubic-bezier(.2,.7,.3,1) infinite;opacity:0}
.ops-ping i:nth-child(2){animation-delay:.7s}.ops-ping i:nth-child(3){animation-delay:1.4s}
@keyframes opsPing{0%{transform:scale(.6);opacity:.95}100%{transform:scale(7);opacity:0}}
@media (max-width:640px){.ops-log{display:none}.ops-top{left:26px;right:26px}.ops-top .ops-dim{display:none}.ops-lock{white-space:normal;width:80%}}
.ops-ping{transition:opacity .6s}.ops:not(.near) .ops-ping{opacity:0!important}

/* ---- Brace loader (every page): the A, a white light passing through once ---- */
.bl{display:flex;align-items:center;justify-content:center;min-height:min(62vh,560px);width:100%}
.bl-mark{width:64px;height:auto}
.bl-band{transform:translateX(-330px);animation:blBand 1.2s cubic-bezier(.45,0,.25,1) .1s forwards}
@keyframes blBand{to{transform:translateX(760px)}}
@media (prefers-reduced-motion:reduce){.bl-band{animation:none}}
/* first paint: the A on its own for a fixed 1.5 s, then the portal */
.boot{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;background:var(--bg,#1b1b1b);
  animation:bootOut .3s ease 1.5s forwards;pointer-events:none}
.boot .bl-mark{width:72px}
@keyframes bootOut{to{opacity:0;visibility:hidden}}
/* ---- hide / show the menu ---- */
.brand-row{display:flex;align-items:center;justify-content:space-between;margin:0 0 26px}
.side .brand-row .brand{margin:2px 12px 0}
.nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;
  color:var(--ink-3);background:transparent;border:0;cursor:pointer;transition:color .15s,background .15s}
.nav-toggle:hover{color:var(--ink-1);background:rgba(255,255,255,.06)}
.nav-show{display:none;position:fixed;z-index:30;top:18px;left:18px;background:var(--side,#202020);border:1px solid var(--rule)}
html.nav-hidden .crm{grid-template-columns:minmax(0,1fr)}
html.nav-hidden .side{display:none}
html.nav-hidden .nav-show{display:inline-flex}
html.nav-hidden .crm main{max-width:none;padding-left:88px}
@media (max-width:900px){.nav-toggle{display:none!important}}
/* page loader: dead centre of the working area, beside the menu */
.crm main .bl{position:fixed;top:0;bottom:0;left:236px;right:0;min-height:0;width:auto;z-index:5}
html.nav-hidden .crm main .bl{left:0}
@media (max-width:900px){.crm main .bl{position:static;min-height:60vh}}

/* never scroll the page sideways; wide tables scroll inside their section */
html{overflow-x:clip}
.crm main{min-width:0}
.crm main section.s:has(table){overflow-x:auto}
.ref-numbers td:first-child,.ref-numbers th:first-child{min-width:240px}
details.older{margin-top:14px}
details.older summary{cursor:pointer;color:var(--ink-2);font-size:13px;margin-bottom:10px}

/* Roboflow page: frames waiting to be boxed, and the quiet line under a table. */
.rf-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rf-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px;
  background: var(--group); display: block; }
.rf-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.rf-warn, .hero-side .v.rf-warn, .gtable td.rf-warn { color: var(--accent); }
@media (max-width: 900px) { .rf-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Game pages: two tables side by side (by hardware, by bird), a ShotKam
   generation set in under its total, and the bird ticks under a search. */
.gcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.gtable td.sub, .gtable td.sub:first-child { padding-left: 38px; color: var(--ink-3); }
.birdticks { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 2px; }
.birdticks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) { .gcols { grid-template-columns: 1fr; } }

/* The camera question on the calling card: one tap, answers for the whole video. */
.ref-cam { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 2px;
  padding: 10px 12px; background: var(--group); border-radius: var(--r); }
.ref-cam .s { flex: 1 1 260px; }
.ref-cam .s b { font-weight: 600; }
.ref-cam .s i { font-style: normal; opacity: 0.75; }
.ref-cam-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-cam .callbtn.hint { outline: 1px solid var(--accent); }

/* Training: which queue is in use, and the four answers an upload's shot can have. */
.ref-mode { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.ref-mode .callbtn { min-height: 40px; padding: 0 16px; }
.ref-mode .callbtn .s { margin-left: 6px; }
.bench-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .bench-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The strip under the film: the stretch being played, a numbered dot at each
   bang the audio found (the number is its row's), and where the film is. */
.ref-tl { margin: 10px 0 2px; user-select: none; -webkit-user-select: none; }
.ref-tl-bar { position: relative; height: 32px; border-radius: var(--r); background: var(--group); }
.ref-tl-track { position: absolute; left: 16px; right: 16px; top: 0; bottom: 0; cursor: pointer; }
.ref-tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: var(--rule-2); border-radius: 1px; }
.ref-tl-head { position: absolute; top: 4px; bottom: 4px; left: 0; width: 2px; margin-left: -1px;
  background: var(--ink-1); border-radius: 1px; pointer-events: none; }
.ref-dot { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0;
  border-radius: 50%; border: 1px solid var(--ink-3); background: var(--group-2); color: var(--ink-2);
  font: 600 11px/20px var(--mono); text-align: center; cursor: pointer; }
.ref-dot.live { border-color: var(--accent); color: var(--ink-1); box-shadow: 0 0 0 2px rgba(240, 90, 40, .35); }
.ref-dot.is-hit { background: var(--hit); border-color: var(--hit); color: #fff; }
.ref-dot.is-miss { background: var(--miss); border-color: var(--miss); color: #fff; }
.ref-dot.is-void, .ref-dot.is-unclear, .ref-dot.is-not_mine { background: rgba(255, 255, 255, .16); color: var(--ink-1); }
.ref-dot.off { opacity: .5; border-style: dashed; }
.ref-dot.ping { animation: ref-ping .65s ease-out; }
.ref-row.ping .ref-num { border-color: var(--accent); color: var(--ink-1); }
@keyframes ref-ping { 0% { box-shadow: 0 0 0 0 rgba(240, 90, 40, .9); } 100% { box-shadow: 0 0 0 14px rgba(240, 90, 40, 0); } }
@media (prefers-reduced-motion: reduce) { .ref-dot.ping { animation: none; outline: 2px solid var(--accent); } }
.ref-tl-ends { display: flex; justify-content: space-between; margin-top: 4px; font: 11px/14px var(--mono); color: var(--ink-3); }
/* A bang heard in the file that has no row on this card: someone else's gun
   as far as the clipper could tell, or the owner's shot on another card. */
.ref-tick { position: absolute; top: 0; bottom: 0; width: 12px; margin-left: -6px; cursor: pointer; }
.ref-tick::before { content: ''; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px;
  background: var(--ink-3); opacity: .55; }
.ref-tick.card::before { top: 6px; bottom: 6px; background: var(--ink-2); opacity: .9; }
.ref-tick:hover::before { background: var(--ink-1); opacity: 1; }
.ref-tl-bar { touch-action: pan-y; }
/* A grip at each end of the kept stretch, as the trim bar in a phone's
   camera roll has: drag one out to show more of the film, in to show less.
   The frame between them wears the same colour along its top and bottom, so
   the two grips read as the ends of one frame, and what lies outside it is
   shaded. The grip's own box is wider and taller than the bar drawn in it,
   so a thumb can take it. portal.js (tlLay) places all of these: the 28px
   and the 14px here are the ones it counts with. */
.ref-tl.grab .ref-tl-track { left: 28px; right: 28px; }
.ref-tl-keep { position: absolute; left: 28px; right: 28px; top: 0; bottom: 0; pointer-events: none; }
.ref-tl-frame { position: absolute; top: 0; bottom: 0; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  background: rgba(255, 255, 255, .05); }
.ref-tl-shade { position: absolute; top: 0; bottom: 0; background: rgba(0, 0, 0, .55); }
.ref-tl-shade.start { left: -28px; border-radius: var(--r) 0 0 var(--r); }
.ref-tl-shade.end { right: -28px; border-radius: 0 var(--r) var(--r) 0; }
.ref-grip { position: absolute; top: -6px; bottom: -6px; width: 28px; min-width: 0; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; appearance: none; -webkit-appearance: none; font-size: 0;
  cursor: ew-resize; touch-action: none; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.ref-grip::before { content: ''; position: absolute; top: 6px; bottom: 6px; width: 14px; background: var(--accent); }
.ref-grip.start::before { left: 8px; border-radius: var(--r) 3px 3px var(--r); }
.ref-grip.end::before { right: 8px; border-radius: 3px var(--r) var(--r) 3px; }
.ref-grip::after { content: ''; position: absolute; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: #fff; opacity: .92; }
.ref-grip.start::after { left: 13.5px; }
.ref-grip.end::after { right: 13.5px; }
.ref-grip:hover::before, .ref-tl.gripping .ref-grip::before { filter: brightness(1.15); }
.ref-grip:focus { outline: none; }
.ref-grip:focus-visible::before { box-shadow: 0 0 0 2px var(--ink-1); }
.ref-tl.gripping, .ref-tl.gripping .ref-tl-track { cursor: ew-resize; }
.ref-video { cursor: pointer; }
/* Three rows under the film on a library clip, on one time axis: Time (the
   ruler, the playhead and the trim grips), Bangs (the numbered markers, each
   dragged to where the shot really is) and Audio (the clip's sound, with its
   spikes marked). Every row's track is inset as the Time row's is, so a
   moment sits at the same x in all three. */
.ref-tl.lanes { margin-top: 10px; }
.ref-lane { display: flex; align-items: stretch; gap: 6px; margin-top: 4px; }
.ref-lane:first-child { margin-top: 0; }
.ref-lane-k { flex: 0 0 46px; display: flex; align-items: center; font: 600 10px/12px var(--mono);
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.ref-lane > .ref-tl-bar, .ref-lane-body { flex: 1 1 auto; min-width: 0; position: relative; border-radius: var(--r); background: var(--group); }
.ref-tl.lanes .ref-tl-bar { height: 40px; }
.ref-lane-body { height: 50px; touch-action: pan-y; }
.ref-lane-body.audio { height: 44px; }
.ref-lane-track { position: absolute; left: 16px; right: 16px; top: 0; bottom: 0; }
.ref-tl.grab .ref-lane-track { left: 28px; right: 28px; }
.ref-tl.lanes .ref-tl-ends { margin-left: 52px; }
.ref-lane-head { position: absolute; top: 3px; bottom: 3px; left: 0; width: 2px; margin-left: -1px;
  background: var(--ink-1); opacity: .45; border-radius: 1px; pointer-events: none; }
.ref-rule { position: absolute; bottom: 0; width: 1px; height: 7px; background: var(--ink-3); pointer-events: none; }
.ref-rule b { position: absolute; bottom: 9px; left: 0; transform: translateX(-50%); font: 10px/12px var(--mono);
  color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.ref-tl.lanes .ref-tl-track::before { top: auto; bottom: 0; }
.ref-bang { width: 28px; height: 28px; margin: -14px 0 0 -14px; font: 600 12px/26px var(--mono);
  touch-action: none; cursor: grab; z-index: 2; }
.ref-bang.hi { top: calc(50% - 10px); }
.ref-bang.lo { top: calc(50% + 10px); }
.ref-bang.sel { z-index: 3; border-color: var(--ink-1); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.ref-bang.moved { border-width: 2px; line-height: 24px; }
.ref-bang.held { cursor: grabbing; z-index: 3; }
.ref-lanes-drag, .ref-lanes-drag * { cursor: grabbing !important; }
.ref-ghost { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 1.5px dashed var(--ink-3); opacity: .65; pointer-events: none; }
.ref-ghost-line { position: absolute; top: 50%; height: 0; border-top: 1.5px dashed var(--ink-3); opacity: .5; pointer-events: none; }
.ref-struck { position: absolute; bottom: 1px; width: 18px; height: 18px; margin: 0 0 0 -9px; padding: 0; min-width: 0; min-height: 0;
  border-radius: 50%; border: 1px dashed var(--ink-3); background: var(--group); color: var(--ink-2); opacity: .75;
  font: 12px/16px var(--mono); text-align: center; cursor: pointer; z-index: 3; }
.ref-struck:hover { opacity: 1; }
.ref-bang-x { position: absolute; top: -3px; width: 20px; height: 20px; margin-left: 8px; padding: 0; min-width: 0; min-height: 0;
  border-radius: 50%; border: 0; background: var(--miss); color: #fff; font: 700 12px/20px var(--mono); text-align: center;
  cursor: pointer; z-index: 4; }
.ref-bang-tip { position: absolute; top: -18px; transform: translateX(-50%); font: 11px/14px var(--mono); color: var(--ink-1);
  background: var(--group-2); padding: 0 4px; border-radius: 3px; pointer-events: none; white-space: nowrap; z-index: 5; }
.ref-audio-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.ref-spike { position: absolute; top: 0; bottom: 0; width: 16px; margin-left: -8px; padding: 0; min-width: 0; min-height: 0;
  border: 0; background: none; cursor: pointer; z-index: 2; }
.ref-spike::before { content: ''; position: absolute; left: 3px; top: 1px; border: 5px solid transparent; border-top: 7px solid var(--accent); }
.ref-spike:hover::before, .ref-spike.on::before { border-top-color: var(--ink-1); }
.ref-spike-add { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 4; white-space: nowrap;
  font-size: 11px; font-weight: 600; line-height: 14px; padding: 5px 8px; border-radius: 12px; border: 1px solid var(--accent);
  background: var(--group-2); color: var(--ink-1); cursor: pointer; min-height: 0; }
.ref-audio-why { position: absolute; inset: 0; padding: 0 10px; font-size: 12px; line-height: 44px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-audio-why[hidden] { display: none; }
.ref-audio-why .callbtn { padding: 4px 9px; line-height: 18px; vertical-align: middle; }
.ref-bangbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 2px 52px; font-size: 12px; color: var(--ink-2); }
.ref-bangbar .callbtn { padding: 4px 9px; }
.ref-bang-unsaved { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .ref-lane-k { flex-basis: 40px; font-size: 9px; }
  .ref-tl.lanes .ref-tl-ends, .ref-bangbar { margin-left: 46px; }
  .ref-bang { width: 32px; height: 32px; margin: -16px 0 0 -16px; line-height: 30px; }
  .ref-bang.moved { line-height: 28px; }
  .ref-lane-body { height: 60px; }
  .ref-lane-body.audio { height: 44px; }
  .ref-bang.hi { top: calc(50% - 13px); }
  .ref-bang.lo { top: calc(50% + 13px); }
}
/* The film's box. Zoomed, the film is bigger than its box and is dragged
   about inside it; the ring marks where the engine thought the clay was. */
.ref-film { position: relative; overflow: hidden; border-radius: var(--r); background: #000; cursor: pointer; }
.ref-film.zoomed { cursor: grab; touch-action: none; }
.ref-zoomer { position: relative; transform-origin: 0 0; }
.ref-film .ref-video { border-radius: 0; }
.ref-film.boost .ref-video { filter: contrast(1.75) saturate(1.9) brightness(.9); }
/* Flatten sky: #ref-flat is put in the page by filmFlatDef(). With boost the
   flattening goes first, so boost stretches what is left around mid grey;
   no brightness cut then, the sky is already mid grey. The film's own black
   backing comes off (the box behind is black anyway): left on, the bars
   beside a tall film are flat black, so they go grey with a bright rim. */
.ref-film.flat .ref-video { filter: url(#ref-flat); background: transparent; }
/* boost on top of a white sky would push a faint grey clay back to white: white sky wins */
.ref-film.flat.boost .ref-video { filter: url(#ref-flat); }
.ref-ring { position: absolute; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(0, 0, 0, .65);
  pointer-events: none; }
.ref-ring[hidden] { display: none; }
/* The dark-trail picture under the rows: every frame before the bang in one. */
.ref-trail { margin: 14px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.ref-trail-pic { display: block; border-radius: var(--r); overflow: hidden; background: var(--group); min-height: 40px; padding: 0; }
.ref-trail-pic .s { display: block; padding: 10px 12px; }
.ref-trail-pic img { display: block; width: 100%; height: auto; }
/* The instant the gun fired, on the picture: a flash of the frame and the row's number. */
.ref-film.ping::after { content: attr(data-bang); position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 600 12px/18px var(--mono); pointer-events: none; z-index: 2; }
.ref-film.ping { box-shadow: inset 0 0 0 3px var(--accent); }
/* More of the file either side of the stretch. */
.ref-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.ref-more .s { flex: 1 1 auto; text-align: center; }
.ref-more .callbtn { min-height: 32px; padding: 0 12px; }
.ref-why { grid-column: 1 / -1; margin-top: -2px; }
@media (max-width: 720px) {
  .ref-more .s { order: 9; flex-basis: 100%; text-align: left; }
  .ref-more [data-bench-more="after"] { margin-left: auto; }
}
.ref-num { display: inline-block; min-width: 20px; height: 20px; margin-right: 6px; border-radius: 50%;
  border: 1px solid var(--ink-3); font: 600 11px/18px var(--mono); text-align: center; color: var(--ink-2); }
@media (min-width: 900px) { .ref-row { grid-template-columns: 132px minmax(0, 1fr) 40px; } }

@media (max-width: 760px) {
  .g-row.aug .g-act { width: 100%; justify-content: flex-start; }
  .aug-set { grid-template-columns: minmax(0, 1fr) auto; }
  .aug-val { text-align: right; }
  .aug-set input[type=range] { grid-column: 1 / -1; grid-row: 2; height: 32px; }
  .aug-what { grid-row: 3; }
}

/* My bangs (Training): every bang heard in an upload as a marker on its
   strip. Orange is his, an orange ring is the machine's guess he has not
   checked, grey is not his. A marker is a 30px button whatever it draws, so
   a finger finds it; the one the keys act on wears a white ring. */
.bm-card .ref-film { margin-top: 10px; }
/* the film and the strip are used together, so the film never pushes the strip off the screen */
.bm-card .ref-video { max-height: min(50vh, 560px); }
.bm-pick { display: flex; gap: 8px; align-items: center; }
.bm-pick select { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border-radius: var(--r);
  background: var(--group); border: 1px solid var(--rule); color: var(--ink-1); font: 500 14px/20px var(--ui); }
.bm-pick .callbtn { min-height: 40px; min-width: 44px; padding: 0 10px; }
.bm-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 14px 0 8px; color: var(--ink-1); }
.bm-count .bm-n { font: 650 30px/32px var(--ui); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bm-count b { font-weight: 600; }
.bm-count .bm-save { margin-left: auto; min-width: 48px; text-align: right; }
.bm { user-select: none; -webkit-user-select: none; }
.bm-bar { position: relative; height: 56px; border-radius: var(--r); background: var(--group); touch-action: pan-y; cursor: pointer; }
.bm-track { position: absolute; left: 18px; right: 18px; top: 0; bottom: 0; }
.bm-track::before { content: ''; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px; border-radius: 1px; background: var(--rule-2); }
.bm-head { position: absolute; top: 4px; bottom: 4px; left: 0; width: 2px; margin-left: -1px; border-radius: 1px;
  background: var(--ink-1); pointer-events: none; z-index: 5; }
.bm-m { position: absolute; top: 0; bottom: 0; width: 30px; min-width: 0; min-height: 0; margin: 0 0 0 -15px; padding: 0;
  border: 0; background: none; cursor: pointer; z-index: 1; touch-action: none; }
/* the stem, down to the line, and the head on top of it */
.bm-m::before { content: ''; position: absolute; left: 14px; top: 22px; bottom: 14px; width: 2px; border-radius: 1px; background: var(--ink-3); opacity: .55; }
.bm-m::after { content: ''; position: absolute; left: 10px; top: 14px; width: 10px; height: 10px; border-radius: 50%;
  box-sizing: border-box; background: var(--ink-3); }
.bm-m.is-guess { z-index: 2; }
.bm-m.is-guess::before { background: var(--accent); opacity: .7; }
.bm-m.is-guess::after { left: 7px; top: 8px; width: 16px; height: 16px; background: var(--group); border: 2px solid var(--accent); }
.bm-m.is-yours { z-index: 3; }
.bm-m.is-yours::before { background: var(--accent); opacity: 1; }
.bm-m.is-yours::after { left: 6px; top: 6px; width: 18px; height: 18px; background: var(--accent); }
.bm-m.is-yours.added::after { content: '+'; color: var(--accent-ink); font: 700 15px/18px var(--ui); text-align: center; }
.bm-m.is-struck::before { opacity: .3; }
.bm-m.is-struck::after { content: '×'; left: 7px; top: 8px; width: 16px; height: 16px; background: none; border: 1px dashed var(--ink-3);
  color: var(--ink-3); font: 500 12px/14px var(--ui); text-align: center; }
.bm-m.sel { z-index: 4; }
.bm-m.sel::after { box-shadow: 0 0 0 2px var(--group), 0 0 0 4px var(--ink-1); }
.bm-m:hover::after { filter: brightness(1.2); }
.bm-m:focus { outline: none; }
.bm-m:focus-visible::after { box-shadow: 0 0 0 2px var(--group), 0 0 0 4px var(--accent); }
.bm-m.held { z-index: 6; cursor: ew-resize; }
.bm-m.held::before { top: 4px; background: var(--ink-1); opacity: 1; }
.bm.dragging .bm-bar { cursor: ew-resize; }
.bm.dragging .bm-head { opacity: 0; }
.bm-tip { position: absolute; top: -26px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; z-index: 7;
  background: var(--ink-1); color: #121312; font: 600 12px/18px var(--mono); white-space: nowrap; pointer-events: none; }
.bm-ends { display: flex; justify-content: space-between; margin-top: 4px; font: 11px/14px var(--mono); color: var(--ink-3); }
.bm-ends #bm-now { color: var(--ink-1); }
/* the whole file in one line, with the stretch the strip shows boxed */
.bm-map { position: relative; height: 18px; margin-top: 6px; border-radius: 6px; background: var(--group); overflow: hidden;
  cursor: pointer; touch-action: pan-y; }
.bm-map i { position: absolute; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; background: var(--ink-3); opacity: .45; pointer-events: none; }
.bm-map i.is-guess { background: var(--accent); opacity: .6; }
.bm-map i.is-yours { top: 2px; bottom: 2px; width: 3px; background: var(--accent); opacity: 1; }
.bm-map i.is-struck { opacity: .2; }
.bm-map .bm-win { top: 0; bottom: 0; margin: 0; background: rgba(255, 255, 255, .08); border: 1px solid var(--rule-2); border-radius: 6px;
  box-sizing: border-box; opacity: 1; }
.bm-map .bm-maphead { top: 0; bottom: 0; width: 2px; background: var(--ink-1); opacity: 1; }
.bm-sel { min-height: 40px; margin: 10px 0 8px; line-height: 20px; }
.bm-sel b { color: var(--ink-1); font-weight: 600; }
.bm-acts { display: grid; grid-template-columns: repeat(9, minmax(0, auto)); gap: 8px; justify-content: start; margin-bottom: 4px; }
.bm-acts .callbtn { min-height: 44px; padding: 0 12px; white-space: nowrap; }
.bm-acts .callbtn:disabled { opacity: .4; cursor: default; }
.bm-acts .bm-main { min-width: 150px; }
.bm-acts kbd { font: 400 11px/1 var(--mono); color: var(--ink-3); margin-left: 4px; }
.bm-acts .callbtn.on kbd { color: var(--accent-ink); opacity: .7; }
.bm-spans { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; color: var(--ink-3); font-size: 13px; }
@media (max-width: 1100px) { .bm-acts { grid-template-columns: repeat(5, minmax(0, auto)); } }
@media (max-width: 720px) {
  .bm-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .bm-acts .bm-main { grid-column: 1 / -1; grid-row: 1; min-width: 0; min-height: 52px; }
  .bm-acts kbd { display: none; }
  .bm-count .bm-save { flex-basis: 100%; text-align: left; margin-left: 0; min-height: 0; }
  .bm-sel { min-height: 60px; }
  .bm-spans { margin-left: 0; }
  .bm-card .ref-video { max-height: 42vh; }
}

/* Mastersheet filters: two labelled groups of segmented buttons, each with
   its count in a pill. "Waiting for you" gets the orange dot while anything
   waits. Scrolls sideways on a phone rather than wrapping mid-group. */
.msf { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 4px 0 18px; }
.msf-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.msf-title { font: 600 11px/14px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.msf .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.msf .seg::-webkit-scrollbar { display: none; }
.msf .seg button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.msf .seg .n { font: 500 11px/16px var(--ui); font-variant-numeric: tabular-nums; padding: 0 6px;
  border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ink-2); }
.msf .seg button.on .n { background: rgba(255,255,255,.16); color: var(--ink-1); }
.msf .seg button.ask::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #F05A28); }
/* On a phone a sheet row's actions drop under the title instead of
   running off the edge. */
@media (max-width: 640px) {
  .panel .row:has(.vthumb) { flex-wrap: wrap; }
  .panel .row:has(.vthumb) .end { margin-left: 0; width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .msf .seg { flex-wrap: wrap; overflow-x: visible; }
}
.msf-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between;
  background: var(--group); border-radius: var(--r-group); padding: 12px 16px; margin: 0 0 14px; color: var(--ink-2); }
.msf-acts { display: flex; align-items: center; gap: 10px; }
.msf-bar.sel { position: sticky; top: 8px; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.45); background: var(--group-2); }
/* The sidebar sits above full-width panels (the RTR page's globe stretches
   under it), so Password, Sign out and the menu are always clickable. */
.side { z-index: 30; }

/* Augmentation: the plate check grid. Big middle frame with the spots
   ringed, then first / middle / last, the caption and the two calls. */
.aug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 10px; }
.aug-card { position: relative; background: var(--group-2); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid transparent; }
.aug-card.approved { border-color: rgba(80,200,120,.45); }
.aug-card.rejected { opacity: .55; }
.aug-pick { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.55);
  border-radius: 6px; padding: 4px 5px; line-height: 0; }
.aug-big { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; cursor: zoom-in; display: block; }
.aug-none { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; cursor: default; }
.aug-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #000; }
.aug-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; cursor: zoom-in; display: block; }
.aug-cap { padding: 10px 12px 4px; }
.aug-cap .t { color: var(--ink-1); font-size: 13px; }
.aug-cap .s { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.aug-cap .s b { color: #FFB25E; font-weight: 600; }
.aug-acts { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 8px 12px 12px; margin-top: auto; }
.aug-sheets { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.aug-sheets img { width: 100%; height: auto; border-radius: var(--r); background: #000; cursor: zoom-in; display: block; }

/* ---------- Mastersheet rings ---------- */
.rings .rings-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.rings .rings-head .seg { flex-wrap: wrap; max-width: 100%; }
.rings .rings-dates { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.rings .rings-dates .inp { max-width: 160px; }
.ring-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
  background: var(--group); border-radius: var(--r-group); padding: 22px 16px 18px; }
.ring { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ring-dial { position: relative; width: 112px; max-width: 100%; aspect-ratio: 1; }
.ring-svg { width: 100%; height: 100%; display: block; }
.ring-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 9; }
.ring-arc { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring-n { position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 24px/1 var(--ui); letter-spacing: -.02em; color: var(--ink-1); font-variant-numeric: tabular-nums; }
.ring-label { margin-top: 10px; font: 600 13px/18px var(--ui); color: var(--ink-1); }
.ring-sub { font: 500 12px/16px var(--ui); color: var(--ink-3); }
.rings-strip { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin-top: 14px;
  padding: 0 4px; border-bottom: 1px solid var(--rule); }
.rs-day { flex: 1 1 0; display: flex; align-items: flex-end; gap: 1px; height: 100%; min-width: 0; }
.rs-bar { flex: 1 1 0; min-height: 1px; border-radius: 2px 2px 0 0; }
.rs-found, .rings-key i.rs-found { background: rgba(243,242,238,.55); }
.rs-judged, .rings-key i.rs-judged { background: var(--accent, #F05A28); }
.rings-key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.rings-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rings-key .rings-span { margin-left: auto; }
@media (max-width: 720px) {
  .ring-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .ring-dial { width: 92px; }
  .ring-n { font-size: 20px; }
}
@media (max-width: 420px) { .ring-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ring-arc { transition: none; } }

/* Augmentation, the four steps: one card each, the open one lit, the one
   that waits on the owner marked with the orange dot. */
.aug-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 18px; }
.aug-step { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px;
  border-radius: var(--r-group); background: var(--group); color: var(--ink-2); border: 1px solid transparent;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out); }
.aug-step:hover { background: var(--group-2); color: var(--ink-1); }
.aug-step.on { background: var(--group-2); border-color: var(--rule-2); color: var(--ink-1); }
.aug-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font: 600 13px/1 var(--ui); background: rgba(255,255,255,.08); color: var(--ink-1); }
.aug-step.on .aug-num { background: var(--accent, #F05A28); color: var(--accent-ink, #1A1109); }
.aug-i { font-style: italic; }
.aug-step-t { display: flex; flex-direction: column; font: 600 14px/18px var(--ui); min-width: 0; }
.aug-step-t .s { font: 400 12px/16px var(--ui); color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aug-step.ask .aug-step-t .s { color: #FFB25E; }
.aug-sum { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--r-group); background: var(--group); color: var(--ink-2); font-size: 14px; }
.aug-sum b { color: var(--ink-1); font-weight: 600; }
.aug-uprow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 6px; }
.aug-cam { font: 500 13px/18px var(--ui); padding: 6px 30px 6px 12px; border-radius: 8px; border: 0;
  background: rgba(255,255,255,.08); color: var(--ink-1); min-width: 260px; max-width: 100%; }
@media (max-width: 760px) { .aug-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aug-cam { min-width: 0; flex: 1 1 100%; } }

/* Home: Clays and Game side by side, stacked on a phone. Game pages carry a
   strip of every game page, since Game is not in the menu. */
.discs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.disc-col { min-width: 0; }
.disc-col > .over { margin-bottom: 12px; }
a.disc-link { color: inherit; text-decoration: none; position: relative; }
a.disc-link:hover { background: rgba(255,255,255,.04); }
.disc-go { flex: 0 0 auto; color: var(--ink-3); font-size: 18px; line-height: 20px; }
.disc-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.disc-strip a { font: 500 13px/18px var(--ui); color: var(--ink-2); padding: 5px 12px; border-radius: 9px;
  background: rgba(255,255,255,.06); text-decoration: none; }
.disc-strip a:hover { color: var(--ink-1); }
.disc-strip a.on { background: rgba(255,255,255,.16); color: var(--ink-1); }
@media (max-width: 760px) { .discs { grid-template-columns: 1fr; } }
.aug-reals { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.aug-reals figure { margin: 0; background: var(--group-2); border-radius: var(--r); overflow: hidden; }
.aug-reals img, .aug-reals .aug-none { width: 100%; aspect-ratio: 1; object-fit: contain; background: #000; display: flex; cursor: zoom-in; }
.aug-reals figcaption { font-size: 12px; color: var(--ink-3); padding: 6px 8px; }
/* five steps now: A, the clearer view, then the synthetic-clay steps */
.aug-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .aug-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aug-enh-h { color: var(--ink-1); font-weight: 600; margin: 14px 0 6px; }
.aug-enh { margin: 0 0 12px; background: var(--group-2); border-radius: var(--r); overflow: hidden; }
.aug-enh video { width: 100%; display: block; background: #000; }
.aug-enh figcaption { font-size: 12px; color: var(--ink-3); padding: 6px 10px; }

/* Training: camera filter beside the mode tabs */
.ref-mode{flex-wrap:wrap}
.ref-cams{display:inline-flex;gap:6px;align-items:center;margin-left:auto;flex-wrap:wrap}
