/*
  TMS mobile shell — everything here is scoped to `html.tms-mobile`.

  SCOPING RULE (the same one view-audit.css and view-corpus.css carry, and for
  the same reason): this sheet is loaded document-wide, and the installed PC app
  loads the shared stylesheets too. `html.tms-mobile` is set only by
  assets/view-mobile.js, only in the web shell, only under the breakpoint — so
  no rule below can reach the PC app, and developer/tests/e2e/css_bleed_guard.cjs
  stays quiet. Never write an unscoped rule in this file.

  The breakpoint is a CLASS, not a media query, because the change is structural
  rather than cosmetic: the shell swaps its navigation, the findings list becomes
  a queue, and JS needs to agree with CSS about which one is on screen. A media
  query alone would let the two disagree at the boundary.

  Tablets deliberately do NOT get this. Above 760px the desktop panes still fit
  and the menubar is worth having; those sizes get the touch-target and
  viewport-unit fixes at the bottom of this file instead.
*/

/* ============================ tokens ============================ */
html.tms-mobile{
  --m-tab-h:56px;            /* legacy: the tab bar's height, kept for the sheets */
  --m-safe-b:env(safe-area-inset-bottom,0px);
  --m-safe-t:env(safe-area-inset-top,0px);
  --m-tap:44px;              /* the floor for anything you press */
  --m-sheet-r:18px;
  --m-shadow:0 -6px 26px rgba(16,20,28,.16);
}

/* ============================ shell ============================ */
/* 100vh is taller than the visible area while mobile Safari's URL bar is
   showing, which puts a bottom-anchored bar under browser chrome. dvh tracks
   the real viewport; the vh line stays first as the fallback. */
html.tms-mobile, html.tms-mobile body{height:100vh;height:100dvh;overflow:hidden}
html.tms-mobile body{padding-top:var(--m-safe-t)}

/* The menubar is replaced wholesale: four dropdowns whose help lives in hover
   tooltips cannot work on a touch screen. Its items move to the drawer. */
html.tms-mobile #menubar{display:none!important}
/* Its seventeen entries are not lost: they are nine destinations in the
   navigation drawer, in the menubar's own four groups. See NAV in
   assets/view-mobile.js and developer/docs/mobile_menus_design_2026-08.html. */
/* The 4-step stepper does not fit as four labelled pills with a meter; Home
   carries the same information as a vertical rail. */
html.tms-mobile #workflow-bar{display:none!important}
/* The guest strip is NOT hidden — a read-only session is exactly the fact a small
   screen most needs stated, since the drawer's absent rows are invisible evidence.
   Tightened to about one line, and the spacer dropped so the sign-in link wraps in
   right after the sentence instead of being pushed to a far edge. */
html.tms-mobile #guest-bar{padding:5px 12px;font-size:11.5px;gap:8px}
html.tms-mobile #guest-bar .gb-spacer{display:none}
html.tms-mobile main{flex:1;min-height:0;overflow:hidden}
html.tms-mobile .view.active{min-height:0}
/* The deck's undo snackbar and the document's findings drawer are absolutely
   positioned against the shell, so the shell has to be the containing block. */
html.tms-mobile #view-mobile{position:relative;overflow:hidden}

/* --- top bar: project identity + search, ~48px --- */
html.tms-mobile #m-topbar{
  flex:none;display:flex;align-items:center;gap:10px;padding:7px 12px 8px;
  background:var(--panel);border-bottom:1px solid var(--line);
}
html.tms-mobile #m-topbar .proj{
  flex:1;min-width:0;text-align:left;background:none;border:0;padding:0;color:var(--ink);
  min-height:var(--m-tap);
}
html.tms-mobile #m-topbar .proj .t{display:block;font-weight:700;font-size:14px;line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.tms-mobile #m-topbar .proj .s{display:block;font-size:11px;color:var(--mut);margin-top:1px}
html.tms-mobile #m-topbar .ico{
  flex:none;width:var(--m-tap);height:var(--m-tap);border-radius:10px;border:1px solid var(--line);
  background:#fff;color:var(--mut);font-size:16px;display:flex;align-items:center;justify-content:center;
}

/* ===================== the bottom bar =====================
   One job: navigate. It was five tabs until 1.72.0, then the current screen's
   controls until 1.74.0 — which put Rendered/Split/Text here AND in the
   document's mode row, six controls doing the work of three. It is ☰ plus the
   three review surfaces now, identical on every screen.

   The review deck's resolutions sit in .ra, a row of their own directly above,
   so they keep their words instead of being squeezed into symbols by a sixth
   control. The bottom ~150px is all thumb, so a second row up is still reach. */
html.tms-mobile #m-actbar{
  flex:none;display:flex;flex-direction:column;background:#fcfcfb;
  border-top:1px solid var(--line);position:relative;z-index:45;
  padding-bottom:var(--m-safe-b);
}
html.tms-mobile #m-actbar .ra{
  display:flex;gap:6px;align-items:stretch;padding:7px 10px 0;
}
html.tms-mobile #m-actbar .ra button{
  flex:1;min-height:var(--m-tap);border:1px solid var(--line);background:#fff;border-radius:11px;
  font:inherit;font-size:12.5px;font-weight:650;color:var(--ink);cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;
}
html.tms-mobile #m-actbar .ra button[disabled]{opacity:.42;cursor:default}
html.tms-mobile #m-actbar .ra button.accept{background:#e8f5eb;border-color:#bfe0c8;color:#166b31}
/* Phase 1's lifecycle step. Green is reserved for the act that closes a term;
   the steps before it are the screen's primary action, not its conclusion. */
html.tms-mobile #m-actbar .ra button.go{background:var(--blue);border-color:var(--blue);color:#fff}
html.tms-mobile #m-actbar .ra button.accept .g{font-size:14px}
html.tms-mobile #m-actbar .ra button.nav{flex:0 0 40px;font-size:17px;padding:0}
html.tms-mobile #m-actbar .qn{display:flex;gap:6px;padding:7px 10px 8px}
html.tms-mobile #m-actbar .qn button{
  flex:1;min-height:var(--m-tap);border:1px solid var(--line);background:#fff;border-radius:11px;
  font:inherit;cursor:pointer;color:var(--mut);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
}
html.tms-mobile #m-actbar .qn button .g{font-size:15px;line-height:1}
html.tms-mobile #m-actbar .qn button .l{font-size:10px;font-weight:650}
html.tms-mobile #m-actbar .qn button.on{background:#e6eefa;border-color:#cfdcec;color:#154c90}
html.tms-mobile #m-actbar .qn button.menu{
  flex:0 0 52px;background:#eef3fa;border-color:#cfdcec;color:var(--blue);font-size:19px;position:relative;
}
html.tms-mobile #m-actbar .qn button.menu .badge-n{
  position:absolute;top:3px;right:5px;background:var(--red);color:#fff;
  font-size:9px;font-weight:700;border-radius:9px;padding:1px 4px;line-height:1.3;
}

/* ===================== Viewing Options =====================
   Three chrome rows became one. 290px of 844 — 34% of the screen — went on
   chrome in the document view; collapsed this is 46px, and the header names the
   current mode so a shut panel still says what it is set to. */
html.tms-mobile #m-vo{flex:none;background:#fcfcfb;border-bottom:1px solid var(--line)}
html.tms-mobile #m-vo .hd{
  display:flex;align-items:center;gap:9px;width:100%;border:0;background:none;font:inherit;
  padding:0 12px;min-height:46px;cursor:pointer;color:var(--ink);text-align:left;
}
html.tms-mobile #m-vo .hd .car{
  font-size:12px;color:var(--blue);width:16px;text-align:center;flex:none;
  transition:transform .18s;display:inline-block;
}
html.tms-mobile #m-vo.open .hd .car{transform:rotate(90deg)}
html.tms-mobile #m-vo .hd .lbl{flex:1;font-size:13.5px;font-weight:700;color:var(--blue);
  letter-spacing:.02em;text-transform:uppercase}
html.tms-mobile #m-vo .hd .now{font-size:11.5px;color:var(--mut);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;max-width:46%}
html.tms-mobile #m-vo .bd{display:none;padding:0 12px 10px}
html.tms-mobile #m-vo.open .bd{display:block}
html.tms-mobile #m-vo .grp{
  font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--mut);
  padding:8px 2px 4px;
}
html.tms-mobile #m-vo .m-chips{padding:0;background:none;border:0;flex-wrap:wrap}
/* The shared .fc chip is 36px, which is fine on a filter strip you glance at
   and wrong for the primary control of this panel. Inside Viewing Options every
   chip is a real tap target. */
html.tms-mobile #m-vo .m-chips .fc{min-height:var(--m-tap);padding:0 13px}

/* ===================== the navigation drawer =====================
   Rises from the bottom edge so it opens next to the hand rather than across
   the screen from it — the one real argument against a hamburger was reach. */
html.tms-mobile #m-navscrim{
  position:fixed;inset:0;background:rgba(12,18,26,.44);z-index:80;
  animation:m-navfade .16s ease-out;
}
@keyframes m-navfade{from{opacity:0}to{opacity:1}}
html.tms-mobile #m-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:81;background:var(--bg,#fff);
  border-radius:18px 18px 0 0;max-height:86dvh;display:flex;flex-direction:column;
  box-shadow:0 -6px 26px rgba(12,18,26,.22);animation:m-navrise .2s cubic-bezier(.3,.7,.3,1);
}
@keyframes m-navrise{from{transform:translateY(100%)}to{transform:translateY(0)}}
html.tms-mobile #m-nav .dh{
  flex:none;padding:9px 15px 10px;border-bottom:1px solid var(--line);position:relative;
}
html.tms-mobile #m-nav .dh .grab{width:36px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 9px}
html.tms-mobile #m-nav .dh b{display:block;font-size:16px;font-weight:750}
html.tms-mobile #m-nav .dh span{display:block;font-size:11.5px;color:var(--mut);margin-top:1px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.tms-mobile #m-nav .dh .x{
  position:absolute;right:8px;top:14px;width:var(--m-tap);height:var(--m-tap);border:0;background:none;
  font-size:16px;color:var(--mut);cursor:pointer;border-radius:9px;
}
html.tms-mobile #m-nav .dbody{
  flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:4px 12px calc(14px + var(--m-safe-b));overscroll-behavior:contain;
}
html.tms-mobile #m-nav .dgrp{
  font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--mut);
  padding:14px 4px 4px;
}
html.tms-mobile #m-nav .ditem{
  display:flex;align-items:center;gap:11px;width:100%;border:0;background:none;font:inherit;
  text-align:left;padding:9px 10px;border-radius:10px;cursor:pointer;min-height:var(--m-tap);color:var(--ink);
}
html.tms-mobile #m-nav .ditem:hover{background:var(--panel)}
html.tms-mobile #m-nav .ditem.on{background:#e6eefa;color:#154c90}
html.tms-mobile #m-nav .ditem.on .l{font-weight:650}
html.tms-mobile #m-nav .ditem[disabled]{opacity:.45;cursor:default}
html.tms-mobile #m-nav .ditem .g{flex:0 0 22px;text-align:center;font-size:15px}
html.tms-mobile #m-nav .ditem .l{flex:1;min-width:0;font-size:14.5px}
html.tms-mobile #m-nav .ditem .l span{display:block;font-size:11px;color:var(--mut);font-weight:400;
  line-height:1.35;margin-top:1px}
html.tms-mobile #m-nav .ditem .n{background:var(--red);color:#fff;font-size:9.5px;font-weight:700;
  border-radius:9px;padding:1px 6px}
html.tms-mobile #m-nav .ditem .tag{font-size:9px;font-weight:700;background:var(--panel);color:var(--mut);
  border-radius:5px;padding:2px 5px;white-space:nowrap}

/* ===================== settings / destination screens ===================== */
html.tms-mobile .m-search{
  width:100%;min-height:var(--m-tap);font:inherit;font-size:14px;padding:8px 12px;
  border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);margin-bottom:4px;
}
/* NOT .m-card — that class is the deck's card, which is position:absolute and
   defined later in this file, so a settings card wearing it would be absolutely
   positioned and stacked on top of its siblings. */
html.tms-mobile .m-panel{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 13px;margin-bottom:11px;
}
html.tms-mobile .m-panel .ct{font-size:12.5px;font-weight:700;color:var(--ink);margin-bottom:6px}
html.tms-mobile .m-srow{padding:9px 0;border-top:1px solid var(--line)}
html.tms-mobile .m-srow:first-of-type{border-top:0;padding-top:2px}
html.tms-mobile .m-srow .k{font-size:12px;font-weight:600;color:var(--mut);margin-bottom:5px;display:block}
html.tms-mobile .m-srow .k .hint{display:block;font-weight:400;font-size:11px;color:var(--mut);
  opacity:.85;margin-top:2px;line-height:1.35}
/* Every control full width at 46px. All 53 of the desktop's were under 44 —
   .set-row was built for a mouse and the override that stacked it never touched
   the heights. */
html.tms-mobile .m-srow input[type=text],html.tms-mobile .m-srow input[type=email],
html.tms-mobile .m-srow input[type=password],html.tms-mobile .m-srow select,
html.tms-mobile .m-srow textarea{
  width:100%;min-height:46px;font:inherit;font-size:14px;padding:9px 11px;
  border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);
}
html.tms-mobile .m-srow textarea{min-height:92px;resize:vertical}
/* The saved settings a view profile holds, read out as a line rather than as a
   control — there is nothing here to operate, only something to check before
   deciding to delete the profile. */
html.tms-mobile .m-srow .m-vp-sum{display:block;font-size:13px;line-height:1.4;color:var(--ink)}
html.tms-mobile .m-btn{
  width:100%;min-height:48px;border-radius:11px;border:1px solid var(--line);background:#fff;
  font:inherit;font-size:14px;font-weight:650;color:var(--ink);cursor:pointer;margin-top:8px;
}
html.tms-mobile .m-btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
html.tms-mobile .m-btn.danger{background:#fdf2f1;border-color:#f2d5d2;color:#8a2f2f}
html.tms-mobile .m-warn{
  font-size:12.5px;line-height:1.5;color:#8a2f2f;background:#fdf6f5;border:1px solid #f2d5d2;
  border-radius:10px;padding:9px 12px;margin-bottom:11px;
}
html.tms-mobile .m-note{font-size:11.5px;line-height:1.5;color:var(--mut);padding:8px 2px 0;margin:0}
html.tms-mobile .m-check{font-size:12.5px;line-height:1.7;color:var(--ink)}
html.tms-mobile .m-check .warn{color:#a8710f}
html.tms-mobile .m-check .ok{color:#1e8e3e}
html.tms-mobile .m-list .rtag{
  font-size:9px;font-weight:700;background:var(--panel);color:var(--mut);border-radius:5px;
  padding:2px 5px;white-space:nowrap;margin-right:4px;
}
/* ===================== Git Sync: results and the confirm ===================== */
html.tms-mobile .m-out{
  font-size:12.5px;line-height:1.5;border-radius:10px;padding:9px 12px;margin-top:10px;
  background:var(--panel);border:1px solid var(--line);color:var(--mut);
}
html.tms-mobile .m-out.ok{background:#eef7f0;border-color:#c6e3cd;color:#166b31}
html.tms-mobile .m-out.bad{background:#fdf2f1;border-color:#f2d5d2;color:#8a2f2f}
/* Succeeded, with something the reader did not ask for — a dirty-tree build is
   the case this exists for. Neither green nor red, and the same amber the
   desktop pane already draws that outcome in. */
html.tms-mobile .m-out.warn{background:#fdf6e9;border-color:#eedcb6;color:#7a5300}
/* A build log inside a result strip. WRAPPED, not side-scrolled: the enrolment
   command elsewhere scrolls because a wrapped `sha256sum` breaks mid-token and
   somebody retypes it wrong, but nobody retypes a build log — they read it, and
   a horizontal scroller inside a card is a thing a thumb never finds. */
html.tms-mobile .m-out pre{
  margin:6px 0 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;
}
html.tms-mobile .m-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:46px}
/* A SWITCH SHOWS WHICH WAY IT IS SET. `.m-sw` had no rule at all, so every
   category on Publish server data drew as the same empty button, on or off —
   the reader could not see what Publish was about to send. The button keeps the
   tap floor; the track and the knob are drawn inside it. */
html.tms-mobile .m-sw{position:relative;flex:none;width:56px;min-height:var(--m-tap);padding:0;
  border:0;background:none;cursor:pointer}
html.tms-mobile .m-sw::before{content:"";position:absolute;left:3px;right:3px;top:50%;height:30px;
  margin-top:-15px;border-radius:15px;background:var(--line);transition:background .15s}
html.tms-mobile .m-sw::after{content:"";position:absolute;left:6px;top:50%;width:24px;height:24px;
  margin-top:-12px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);
  transition:transform .15s}
html.tms-mobile .m-sw.on::before{background:var(--blue)}
html.tms-mobile .m-sw.on::after{transform:translateX(20px)}
html.tms-mobile .m-sw:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:15px}
@media (prefers-reduced-motion:reduce){
  html.tms-mobile .m-sw::before,html.tms-mobile .m-sw::after{transition:none}
}

/* A confirm that names the consequence. window.confirm() on a phone is a system
   dialog the page cannot label, and the message is the only place these
   operations explain what they change. */
html.tms-mobile #m-confirmscrim{
  position:fixed;inset:0;background:rgba(12,18,26,.5);z-index:90;animation:m-navfade .16s ease-out;
}
html.tms-mobile #m-confirm{
  position:fixed;left:0;right:0;bottom:0;z-index:91;background:var(--bg,#fff);
  border-radius:18px 18px 0 0;padding:10px 16px calc(16px + var(--m-safe-b));
  box-shadow:0 -6px 26px rgba(12,18,26,.24);animation:m-navrise .2s cubic-bezier(.3,.7,.3,1);
}
html.tms-mobile #m-confirm .grab{width:36px;height:4px;border-radius:2px;background:var(--line);
  margin:0 auto 12px}
html.tms-mobile #m-confirm b{display:block;font-size:16.5px;font-weight:750;margin-bottom:6px}
html.tms-mobile #m-confirm p{font-size:13px;line-height:1.55;color:var(--mut);margin:0 0 14px}

/* A pushed screen shows its own name where the project picker sits. */
html.tms-mobile #m-topbar .proj.as-title{display:block;flex:1;min-width:0}

/* ============================ chrome rows ============================ */
html.tms-mobile .m-seg{
  flex:none;display:flex;gap:8px;align-items:center;padding:8px 12px;
  background:var(--panel);border-bottom:1px solid var(--line);
}
html.tms-mobile .m-segctl{display:flex;flex:1;border:1px solid var(--line);border-radius:9px;
  overflow:hidden;background:#fff}
html.tms-mobile .m-segctl button{flex:1;border:0;background:#fff;color:var(--mut);
  font:inherit;font-size:12.5px;font-weight:650;min-height:var(--m-tap);cursor:pointer}
html.tms-mobile .m-segctl button.on{background:var(--blue);color:#fff}
/* The Coverage channel's open count. Inherits the tab's colour rather than
   setting its own, so it stays legible on both the resting and the selected
   background — the same reasoning the desktop tab's `.n` carries. Three tabs at
   12.5px still fit 390px; the count is what pushes it, so it shrinks and not the
   words. */
html.tms-mobile .m-segctl button .n{
  display:inline-block;margin-left:5px;font-size:10px;font-weight:700;line-height:1.6;
  border-radius:9px;padding:0 5px;
}
html.tms-mobile .m-segctl button:not(.on) .n{background:#eef1f5;color:var(--mut)}
html.tms-mobile .m-segctl button.on .n{background:rgba(255,255,255,.24);color:#fff}
/* A coverage finding's chip is its CATEGORY, not a severity — see gradeChip().
   Neutral on purpose: these are mechanical, deterministic and finite, and a red
   badge would rank an inventory row against a judged one. */
html.tms-mobile .chip.cov-chip{
  background:#eef1f5;color:#4a525c;border:1px solid var(--line);font-weight:650;
}
html.tms-mobile .m-seg .m-filt{
  flex:none;min-height:var(--m-tap);padding:0 13px;border:1px solid var(--line);border-radius:9px;
  background:#fff;color:var(--ink);font:inherit;font-size:12.5px;font-weight:600;
  display:flex;align-items:center;gap:6px;cursor:pointer;
}
html.tms-mobile .m-seg .m-filt .n{background:var(--blue);color:#fff;border-radius:9px;
  font-size:10px;padding:0 5px;font-weight:700}

html.tms-mobile .m-chips{
  flex:none;display:flex;gap:6px;padding:8px 12px;overflow-x:auto;background:#fff;
  border-bottom:1px solid #f0f0ee;scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
html.tms-mobile .m-chips::-webkit-scrollbar{display:none}
html.tms-mobile .m-chips .fc{
  flex:none;font:inherit;font-size:11.5px;font-weight:600;border:1px solid var(--line);
  border-radius:20px;padding:0 12px;min-height:36px;background:#fff;color:var(--mut);
  display:flex;align-items:center;gap:5px;white-space:nowrap;cursor:pointer;
}
html.tms-mobile .m-chips .fc.on{background:var(--blue);border-color:var(--blue);color:#fff}
/* What a severity filter is hiding — back-translation findings, which have no
   severity (sevHiddenBT in view-mobile.js). */
html.tms-mobile .m-sevbt{flex:none;margin:0;padding:8px 12px;font-size:12px;line-height:1.45;
  color:#475569;background:#fbfcfe;border-bottom:1px solid #f0f0ee}

/* ============================ the deck ============================ */
html.tms-mobile #m-deck{flex:1;min-height:0;display:flex;flex-direction:column;background:#fff}
html.tms-mobile .m-prog{flex:none;padding:8px 12px 7px;border-bottom:1px solid #f0f0ee}
html.tms-mobile .m-prog .ln{display:flex;justify-content:space-between;align-items:baseline;
  font-size:11.5px;color:var(--mut);margin-bottom:5px}
html.tms-mobile .m-prog .ln b{color:var(--ink);font-size:12.5px;font-variant-numeric:tabular-nums}
html.tms-mobile .m-prog .bar{height:4px;border-radius:3px;background:#eaecef;overflow:hidden}
html.tms-mobile .m-prog .bar i{display:block;height:100%;background:var(--blue);transition:width .28s}
html.tms-mobile .m-stage{flex:1;min-height:0;position:relative;overflow:hidden;background:#f2f3f5}
html.tms-mobile .m-card{
  position:absolute;inset:9px;background:#fff;border:1px solid var(--line);
  border-left:4px solid var(--amber);border-radius:14px;overflow-y:auto;
  padding:13px 14px 18px;box-shadow:0 2px 10px rgba(20,30,50,.09);
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
  transition:transform .26s cubic-bezier(.22,.9,.3,1);
}
html.tms-mobile .m-card.res-fixed,
html.tms-mobile .m-card.res-accepted{border-left-color:var(--green)}
html.tms-mobile .m-card.res-dismissed{border-left-color:var(--mut)}
html.tms-mobile .m-card .top{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:9px}
html.tms-mobile .m-card .issue{font-size:14px;line-height:1.5;color:var(--ink);margin-bottom:8px}
html.tms-mobile .m-card .issue.clamp{display:-webkit-box;-webkit-line-clamp:7;
  -webkit-box-orient:vertical;overflow:hidden}
html.tms-mobile .m-card .more{background:none;border:0;color:var(--blue);font:inherit;
  font-size:12.5px;font-weight:650;padding:4px 0 10px;min-height:var(--m-tap);cursor:pointer}
html.tms-mobile .m-card .rec{
  font-size:13px;line-height:1.5;color:#1a5fb4;background:#f3f8ff;border:1px solid #dbe6f6;
  border-radius:9px;padding:9px 11px;margin-bottom:11px;white-space:pre-wrap;
}
html.tms-mobile .m-card .rec b{display:block;font-size:10px;letter-spacing:.1em;
  text-transform:uppercase;color:#5b7fb0;margin-bottom:3px}

/* Back-translation findings, which carry no `issue` and no `recommendation` —
   the plain-language rows and the reader count ARE the finding. The desktop
   hides all of this behind `title=` and a collapsed <details>; neither works
   under a thumb, so it is laid out. Used on the deck card and inside a
   sentence-screen finding card, hence the two-selector prefixes. */
html.tms-mobile .m-card .m-btwhy,
html.tms-mobile .m-f .bd .m-btwhy{
  font-size:11.5px;line-height:1.45;color:#7c4a1e;background:#fdf5ee;
  border:1px solid #f0dcc6;border-radius:8px;padding:6px 9px;margin-bottom:10px;
}
html.tms-mobile .m-card .m-btrows,
html.tms-mobile .m-f .bd .m-btrows{
  border:1px solid var(--line);border-radius:9px;background:var(--panel);
  padding:4px 11px;margin-bottom:11px;
}
html.tms-mobile .m-card .m-btrow,
html.tms-mobile .m-f .bd .m-btrow{
  font-size:13px;line-height:1.5;color:var(--ink);padding:8px 0;
  border-bottom:1px solid var(--line);
}
html.tms-mobile .m-card .m-btrow:last-child,
html.tms-mobile .m-f .bd .m-btrow:last-child{border-bottom:0}
html.tms-mobile .m-card .m-btrow b,
html.tms-mobile .m-f .bd .m-btrow b{display:block;font-size:9.5px;letter-spacing:.09em;
  text-transform:uppercase;color:var(--mut);margin-bottom:2px}
html.tms-mobile .m-card .m-btrow .w,
html.tms-mobile .m-f .bd .m-btrow .w{font-weight:650;color:#7c2d12}
html.tms-mobile .m-card .m-bttech,
html.tms-mobile .m-f .bd .m-bttech{font-size:12px;line-height:1.5;color:var(--mut);margin-bottom:11px}
html.tms-mobile .m-card .m-btcav,
html.tms-mobile .m-f .bd .m-btcav{
  font-size:11.5px;line-height:1.45;color:#7a2f2f;background:#fdf2f1;
  border:1px solid #f2d5d2;border-radius:8px;padding:6px 9px;margin-bottom:8px;
}
html.tms-mobile .m-card .m-btcav b,
html.tms-mobile .m-f .bd .m-btcav b{display:block;font-weight:700;margin-bottom:2px}
html.tms-mobile .m-q{border-radius:9px;background:var(--panel);border:1px solid var(--line);
  padding:9px 11px;margin-bottom:8px}
html.tms-mobile .m-q .lb{font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--mut);margin-bottom:4px;display:flex;justify-content:space-between}
html.tms-mobile .m-q .tx{font-size:13.5px;line-height:1.55;color:#2e3540;white-space:pre-wrap}
html.tms-mobile .m-q.ceb .tx{font-size:14px}
html.tms-mobile .m-q mark{background:#ffe9c9;color:#6d4a12;border-radius:3px;padding:0 2px;font-weight:600}
html.tms-mobile .m-rowbtns{display:flex;gap:7px;margin-top:4px}
html.tms-mobile .m-rowbtns button{
  flex:1;min-height:var(--m-tap);background:#fff;border:1px solid var(--line);border-radius:9px;
  font:inherit;font-size:13px;font-weight:600;color:var(--blue);cursor:pointer;
}
html.tms-mobile .m-empty{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:9px;text-align:center;padding:30px;color:var(--mut);
}
html.tms-mobile .m-empty .g{font-size:38px}
html.tms-mobile .m-empty b{color:var(--ink);font-size:16px}
html.tms-mobile .m-empty p{margin:0;font-size:13px;line-height:1.5;max-width:26ch}
/* The button under an empty state was a bare UA control — the only `.m-filt`
   rule in this file is scoped to `.m-seg`, so this one inherited nothing and
   rendered at whatever the browser felt like, well under the tap floor. */
html.tms-mobile .m-empty .m-filt{
  min-height:var(--m-tap);border:1px solid var(--line);background:#fff;border-radius:11px;
  padding:0 16px;font:inherit;font-size:13px;font-weight:650;color:var(--blue);cursor:pointer;
}
html.tms-mobile .m-empty .m-fine{max-width:30ch;margin:0}
/* THE TWO EMPTY DECKS THAT ARE NOT GOOD NEWS. A green tick is the wrong shape
   for "the findings were withheld" and for "the passes failed", and colour is
   the fastest thing on the screen to read — so the tick goes and the ground
   changes with it. See emptyDeckHtml() in assets/view-mobile.js. */
html.tms-mobile .m-empty.blind{background:#f5f7fb}
html.tms-mobile .m-empty.blind .g{color:var(--blue)}
html.tms-mobile .m-empty.blind b{color:#154c90}
html.tms-mobile .m-empty.bad{background:var(--red-bg)}
html.tms-mobile .m-empty.bad .g{color:var(--red)}
html.tms-mobile .m-empty.bad b{color:var(--red)}

/* The thumb zone. Everything that COMMITS lives here, at the same place on every
   card, never in the scrolling region above where a long finding would move it. */
html.tms-mobile .m-acts{
  flex:none;display:flex;gap:6px;padding:9px 10px 10px;background:#fff;border-top:1px solid var(--line);
}
html.tms-mobile .m-acts button{
  flex:1;min-height:48px;border-radius:11px;border:1px solid var(--line);background:#fff;
  font:inherit;font-size:12px;font-weight:650;color:var(--ink);cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  line-height:1.2;white-space:nowrap;
}
html.tms-mobile .m-acts button .g{font-size:15px}
html.tms-mobile .m-acts button.accept{background:var(--green);border-color:var(--green);color:#fff}
html.tms-mobile .m-acts button.nav{flex:0 0 36px;font-size:16px;color:var(--mut)}
html.tms-mobile .m-acts button:disabled{opacity:.4}

/* Undo instead of confirm: fewer taps, and safe. Clears the action bar and the
   tab bar so it never covers what it is offering to undo. */
html.tms-mobile #m-snack{
  position:absolute;left:11px;right:11px;bottom:calc(var(--m-tab-h) + var(--m-safe-b) + 78px);
  z-index:60;background:#2c3340;color:#fff;border-radius:11px;padding:11px 13px;
  display:flex;align-items:center;gap:10px;font-size:13px;box-shadow:0 8px 24px rgba(0,0,0,.3);
}
html.tms-mobile #m-snack .t{flex:1;min-width:0}
html.tms-mobile #m-snack button{background:none;border:0;color:#8fc0ff;font:inherit;
  font-weight:700;font-size:13px;padding:6px;min-height:var(--m-tap);cursor:pointer}

/* ============================ document ============================ */
html.tms-mobile #m-doc{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--line)}
html.tms-mobile #m-doc.land{flex-direction:row}
html.tms-mobile .m-pane{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;background:#fff}
html.tms-mobile .m-pane .ph{
  flex:none;font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--mut);background:#f7f8fa;border-bottom:1px solid var(--line);padding:5px 12px;
  display:flex;justify-content:space-between;align-items:center;gap:8px;
}
html.tms-mobile .m-pane .ph .swap{
  border:1px solid var(--line);background:#fff;border-radius:7px;padding:5px 10px;
  font:inherit;font-size:10.5px;font-weight:700;letter-spacing:.06em;color:var(--blue);
  text-transform:uppercase;cursor:pointer;
}
html.tms-mobile .m-divider{
  flex:none;height:16px;background:var(--panel);border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center;
  cursor:row-resize;touch-action:none;
}
html.tms-mobile #m-doc.land .m-divider{height:auto;width:16px;border:0;
  border-left:1px solid var(--line);border-right:1px solid var(--line);cursor:col-resize}
html.tms-mobile .m-divider i{display:block;width:34px;height:3px;border-radius:2px;background:#c4c9d0}
html.tms-mobile #m-doc.land .m-divider i{width:3px;height:34px}
html.tms-mobile .m-frame{flex:1;min-height:0;overflow-y:auto;background:#fff;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html.tms-mobile .m-frame iframe{width:100%;border:0;display:block;background:#fff}

/* Text mode: EN and CEB paired inside one card, so alignment is structural and
   nothing has to stay scroll-locked. */
html.tms-mobile .m-textdoc{flex:1;min-height:0;overflow-y:auto;padding:12px 12px 120px;background:#fbfbfa}
html.tms-mobile .m-tseg{
  display:block;width:100%;text-align:left;background:#fff;border:1px solid var(--line);
  border-left:3px solid transparent;border-radius:11px;padding:10px 12px;margin-bottom:8px;
  font:inherit;cursor:pointer;
}
html.tms-mobile .m-tseg .hd{display:flex;align-items:center;gap:7px;margin-bottom:6px}
html.tms-mobile .m-tseg .hd .n{font:600 11px/1 ui-monospace,Consolas,monospace;color:#7b8390}
html.tms-mobile .m-tseg .hd .sp{flex:1}
html.tms-mobile .m-tseg .cnt{font-size:10px;font-weight:700;border-radius:9px;padding:1px 6px;color:#fff}
html.tms-mobile .m-tseg .en{display:block;font-size:12px;line-height:1.5;color:#7d8590;margin-bottom:6px}
html.tms-mobile .m-tseg .ceb{display:block;font-size:14px;line-height:1.6;color:var(--ink)}
html.tms-mobile .m-tseg.clean{opacity:.72}

/* The findings drawer over the document. Hinged at the bottom in portrait; on
   the right in landscape, because height is what landscape is short of. */
html.tms-mobile #m-drawer{
  position:absolute;left:0;right:0;bottom:calc(var(--m-tab-h) + var(--m-safe-b));z-index:40;
  background:#fff;border-top:1px solid var(--line);border-radius:15px 15px 0 0;
  box-shadow:var(--m-shadow);display:flex;flex-direction:column;max-height:55%;
  transition:transform .24s cubic-bezier(.22,.9,.3,1);
}
html.tms-mobile #m-drawer.shut{transform:translateY(calc(100% - 46px))}
html.tms-mobile #m-drawer.side{
  left:auto;right:0;top:0;bottom:calc(-1 * (var(--m-tab-h) + var(--m-safe-b)));width:290px;
  max-height:none;border-radius:15px 0 0 15px;border-top:0;border-left:1px solid var(--line);
  box-shadow:-8px 0 26px rgba(16,20,28,.16);
}
html.tms-mobile #m-drawer.side.shut{transform:translateX(100%)}
html.tms-mobile #m-drawer .dh{
  flex:none;display:flex;align-items:center;gap:9px;padding:0 12px;height:46px;
  background:none;border:0;width:100%;text-align:left;font:inherit;cursor:pointer;
}
html.tms-mobile #m-drawer .dh .car{color:var(--mut);font-size:12px;transition:transform .24s}
html.tms-mobile #m-drawer.shut .dh .car{transform:rotate(180deg)}
html.tms-mobile #m-drawer.side .dh .car{transform:rotate(90deg)}
html.tms-mobile #m-drawer .dh .t{flex:1;min-width:0;font-size:13px;font-weight:650}
html.tms-mobile #m-drawer .dh .ed{
  flex:none;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--blue);
  font:inherit;font-size:12.5px;font-weight:650;padding:8px 11px;min-height:38px;cursor:pointer;
}
html.tms-mobile #m-drawer .db{flex:1;min-height:0;overflow-y:auto;padding:2px 12px 16px;
  border-top:1px solid var(--line)}

/* ============================ sentence ============================ */
html.tms-mobile .m-sub{
  flex:none;display:flex;align-items:center;gap:8px;padding:6px 8px;background:var(--panel);
  border-bottom:1px solid var(--line);
}
html.tms-mobile .m-sub .bk{border:0;background:none;color:var(--blue);font:inherit;font-size:14px;
  font-weight:650;padding:0 6px;min-height:var(--m-tap);cursor:pointer}
html.tms-mobile .m-sub .ttl{flex:1;text-align:center;font-weight:700;font-size:13.5px;
  font-variant-numeric:tabular-nums}
/* The audit's live line in the top bar's second line, the desk's colours. */
html.tms-mobile .m-live.on{color:#1e8e3e}
html.tms-mobile .m-live.down{color:#b06000}
/* The edit sheet's ↶ ↷ Reset, the desk strip's three, over the text box. */
html.tms-mobile .m-edtools{display:flex;gap:8px;margin:12px 0 6px}
html.tms-mobile .m-edtools button{min-width:var(--m-tap);min-height:var(--m-tap);border:1px solid var(--line);
  background:#fff;border-radius:9px;color:var(--ink);font:inherit;font-size:15px;cursor:pointer;padding:0 12px}
html.tms-mobile .m-edtools button:disabled{opacity:.45;cursor:default}
/* The Sentence screen's title is the jump box (a sentence by number), so it is a
   button that still reads as the title; it gives way first when the row is full. */
html.tms-mobile .m-sub button.ttl{border:0;background:none;color:var(--ink);font-family:inherit;
  min-width:0;min-height:var(--m-tap);padding:0 4px;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
html.tms-mobile .m-sub .nav{display:flex;gap:4px}
html.tms-mobile .m-sub .nav button{width:var(--m-tap);min-height:var(--m-tap);border:1px solid var(--line);
  background:#fff;border-radius:9px;color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
html.tms-mobile .m-body{flex:1;min-height:0;overflow-y:auto;padding:12px 12px 20px;background:#fff;
  -webkit-overflow-scrolling:touch}
html.tms-mobile .m-lb{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--mut);margin:0 0 5px;display:flex;align-items:center;justify-content:space-between}
html.tms-mobile .m-en{background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:11px 12px;font-size:13.5px;line-height:1.6;color:#3a4150;white-space:pre-wrap;margin-bottom:12px}
html.tms-mobile .m-ceb{
  width:100%;text-align:left;background:#fff;border:2px solid var(--amber);border-radius:10px;
  padding:11px 12px;font:inherit;font-size:15px;line-height:1.6;color:var(--ink);
  min-height:80px;margin-bottom:12px;white-space:pre-wrap;cursor:pointer;
}
html.tms-mobile .m-ceb .hint{display:block;margin-top:8px;font-size:11.5px;color:var(--blue);font-weight:650}
html.tms-mobile .m-lbl{font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--mut);margin:16px 0 7px}

/* The segment's Summary of Issues — the block above the cards, on the sentence
   screen and in the document drawer.

   OPEN by default, and that asymmetry with the cards below it is the whole
   point: a finding card on a phone is collapsed to a number, a grade and a
   category, so this is the only place the sentence's findings are described in
   words without opening them one at a time.

   The inner class names (.sum-*) are the vocabulary the other two panes use, so
   the three read alike in source. The rules are re-declared here because
   view-audit.css's copies are desktop-sized and hang off --accent, a token
   defined only on #view-findings/#view-shared-audit — #view-mobile is neither,
   so the pill and the border would come up bare. Every one below outranks the
   unscoped copy (html.tms-mobile .m-sum .sum-x beats .sum-x), which is what
   keeps the phone's sizes from being a fight with the desktop's. */
html.tms-mobile .m-sum{border:1px solid var(--blue);background:#eef4fd;border-radius:10px;
  margin-bottom:10px;overflow:hidden}
html.tms-mobile .m-sum .sh{display:flex;align-items:center;gap:8px;width:100%;
  background:none;border:0;text-align:left;font:inherit;padding:9px 11px;
  min-height:var(--m-tap);cursor:pointer}
html.tms-mobile .m-sum .sh .car{flex:none;width:16px;text-align:center;
  font:700 18px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--blue)}
html.tms-mobile .m-sum .sum-pill{flex:none;background:var(--blue);color:#fff;
  font-size:10.5px;font-weight:700;letter-spacing:.03em;line-height:1.55;
  padding:2px 10px;border-radius:20px;white-space:nowrap}
/* The middle column, and the only one allowed to give: the count wraps inside its
   own width rather than pushing the +/- onto a second line away from the pill. */
html.tms-mobile .m-sum .sum-head{flex:1;min-width:0;font-size:12px;font-weight:650;
  color:var(--ink);font-variant-numeric:tabular-nums}
html.tms-mobile .m-sum .sum-body{padding:9px 11px 10px;border-top:1px solid rgba(26,115,232,.22)}
html.tms-mobile .m-sum .sum-written{font-size:13px;line-height:1.6;color:#2b3240;
  margin-bottom:10px;white-space:pre-wrap}
html.tms-mobile .m-sum .sum-grp{margin-bottom:9px;font-size:12px}
html.tms-mobile .m-sum .sum-grp:last-child{margin-bottom:0}
html.tms-mobile .m-sum .sum-grp > b{display:block;color:var(--ink);font-size:11.5px;margin-bottom:4px}
html.tms-mobile .m-sum .sum-hint{color:var(--mut);font-size:11.5px;line-height:1.45;margin-bottom:4px}
/* Wraps rather than truncating: a phone line is ~40 characters, and a summary
   row that ran off the edge would hide the very words it exists to show. */
html.tms-mobile .m-sum .sum-li{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;
  padding:4px 0;border-top:1px solid rgba(26,115,232,.14)}
html.tms-mobile .m-sum .sum-grp > b + .sum-li{border-top:0}
html.tms-mobile .m-sum .sum-cat{font-size:11px;font-weight:700;color:#3a4150}
html.tms-mobile .m-sum .sum-sev{font-size:9.5px;font-weight:700;letter-spacing:.05em;color:var(--mut)}
html.tms-mobile .m-sum .sum-dupe{font-size:9.5px;font-weight:700;letter-spacing:.04em;
  color:#7c4a1e;background:#fdf5ee;border:1px solid #f0dcc6;border-radius:20px;padding:1px 7px}
html.tms-mobile .m-sum .sum-what{flex:1 1 100%;color:#3a4150;font-size:12px;line-height:1.45}
html.tms-mobile .m-sum .sum-nos{font:650 10.5px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color:var(--mut)}
html.tms-mobile .m-sum .sum-grades{margin-top:8px;padding-top:7px;font-size:11.5px;color:var(--mut);
  border-top:1px solid rgba(26,115,232,.16)}

/* A finding on the sentence screen and in the drawer — one shape, both places. */
html.tms-mobile .m-f{border:1px solid var(--line);border-left:4px solid var(--amber);
  border-radius:10px;background:#fff;margin-bottom:8px;overflow:hidden}
html.tms-mobile .m-f.res-fixed,html.tms-mobile .m-f.res-accepted{border-left-color:var(--green)}
html.tms-mobile .m-f.res-dismissed{border-left-color:var(--mut);opacity:.75}
html.tms-mobile .m-f .sm{display:flex;align-items:center;gap:7px;padding:11px;width:100%;
  background:none;border:0;text-align:left;font:inherit;min-height:var(--m-tap);cursor:pointer}
html.tms-mobile .m-f .sm .sp{flex:1}
html.tms-mobile .m-f .sm .car{color:#b8bec6;font-size:12px}
html.tms-mobile .m-f .bd{padding:0 11px 11px;font-size:13px;line-height:1.55;color:#3a4150;
  border-top:1px solid #f0f0ee;padding-top:9px;white-space:pre-wrap}
html.tms-mobile .m-fres{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
html.tms-mobile .m-fres button{flex:1;min-width:92px;min-height:var(--m-tap);border:1px solid var(--line);
  border-radius:9px;background:#fff;font:inherit;font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer}
html.tms-mobile .m-fres button.on{background:var(--ink);border-color:var(--ink);color:#fff}
html.tms-mobile .m-note{border:1px solid var(--line);border-radius:10px;background:#fff;
  padding:10px 11px;margin-bottom:8px}
html.tms-mobile .m-note .who{font-size:11.5px;color:var(--mut);margin-bottom:3px}
html.tms-mobile .m-note .who b{color:var(--ink);font-size:12px}
html.tms-mobile .m-note .tx{font-size:13px;line-height:1.5;white-space:pre-wrap;word-break:break-word}

/* ============================ sheets ============================ */
html.tms-mobile #m-scrim{position:fixed;inset:0;background:rgba(16,20,28,.42);z-index:120}
html.tms-mobile #m-sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:121;background:#fff;
  border-radius:var(--m-sheet-r) var(--m-sheet-r) 0 0;box-shadow:var(--m-shadow);
  display:flex;flex-direction:column;max-height:92dvh;
  animation:m-sheet-up .26s cubic-bezier(.22,.9,.3,1);
  padding-bottom:var(--m-safe-b);
}
@keyframes m-sheet-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){
  html.tms-mobile #m-sheet{animation:none}
  html.tms-mobile #m-drawer,html.tms-mobile .m-card,html.tms-mobile .m-prog .bar i{transition:none}
}
html.tms-mobile #m-sheet .grab{flex:none;padding:9px 0 4px;display:flex;justify-content:center}
html.tms-mobile #m-sheet .grab i{width:38px;height:4px;border-radius:3px;background:#d2d6db;display:block}
html.tms-mobile #m-sheet .sh{flex:none;display:flex;align-items:center;gap:10px;padding:2px 16px 11px;
  border-bottom:1px solid var(--line)}
html.tms-mobile #m-sheet .sh b{flex:1;font-size:15.5px}
html.tms-mobile #m-sheet .sh button{border:0;background:none;color:var(--blue);font:inherit;
  font-size:14px;font-weight:650;padding:8px;min-height:var(--m-tap);cursor:pointer}
html.tms-mobile #m-sheet .sb{flex:1;min-height:0;overflow-y:auto;padding:14px 16px 8px}
html.tms-mobile #m-sheet .sf{flex:none;padding:10px 16px 16px;border-top:1px solid var(--line);
  display:flex;gap:8px}
html.tms-mobile #m-sheet .sf button{flex:1;min-height:48px;border-radius:11px;font:inherit;
  font-size:14.5px;font-weight:700;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}
html.tms-mobile #m-sheet .sf button.primary{background:var(--blue);border-color:var(--blue);color:#fff}
html.tms-mobile .m-opt{display:flex;align-items:center;gap:11px;padding:0;min-height:52px;width:100%;
  background:none;border:0;border-bottom:1px solid #f2f2f0;text-align:left;font:inherit;
  font-size:14.5px;color:var(--ink);cursor:pointer}
html.tms-mobile .m-opt .tick{width:22px;color:var(--blue);font-weight:700;flex:none}
html.tms-mobile .m-opt .gr{width:26px;text-align:center;font-size:17px;flex:none}
html.tms-mobile .m-opt .sub{display:block;font-size:11.5px;color:var(--mut);margin-top:2px}
html.tms-mobile .m-grid{display:flex;flex-wrap:wrap;gap:7px;margin:4px 0 6px}
html.tms-mobile .m-grid button{border:1px solid var(--line);border-radius:20px;background:#fff;
  padding:0 14px;min-height:var(--m-tap);font:inherit;font-size:12.5px;font-weight:600;
  color:var(--mut);cursor:pointer}
html.tms-mobile .m-grid button.on{background:var(--blue);border-color:var(--blue);color:#fff}
html.tms-mobile #m-sheet textarea.m-edit{
  width:100%;border:2px solid var(--blue);border-radius:10px;padding:11px 12px;
  font:inherit;font-size:16px;line-height:1.6;color:var(--ink);resize:none;min-height:140px;background:#fff;
}
html.tms-mobile .m-quick{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
html.tms-mobile .m-quick button{border:1px solid #dbe6f6;background:#f3f8ff;color:#1a5fb4;
  border-radius:9px;padding:0 12px;min-height:var(--m-tap);font:inherit;font-size:12.5px;
  font-weight:650;cursor:pointer}

/* ============================ lists (Home / Terms / More) ============================ */
html.tms-mobile .m-pad{flex:1;min-height:0;overflow-y:auto;padding:14px 12px 20px;background:#fff;
  -webkit-overflow-scrolling:touch}
html.tms-mobile .m-resume{
  background:linear-gradient(160deg,#1a5fb4,#134a8f);color:#fff;border-radius:14px;
  padding:15px 16px 14px;margin-bottom:14px;border:0;width:100%;text-align:left;
}
html.tms-mobile .m-resume .k{font-size:10.5px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;opacity:.72}
html.tms-mobile .m-resume .t{font-size:17px;font-weight:700;margin:5px 0 3px;line-height:1.25}
html.tms-mobile .m-resume .s{font-size:12.5px;opacity:.82;line-height:1.45}
html.tms-mobile .m-resume .go{margin-top:12px;width:100%;background:#fff;color:#134a8f;border:0;
  border-radius:9px;padding:0;min-height:48px;font:inherit;font-size:14.5px;font-weight:700;cursor:pointer}
html.tms-mobile .m-sevrow{display:flex;gap:7px;overflow-x:auto;padding-bottom:3px;
  scrollbar-width:none;margin-bottom:4px}
html.tms-mobile .m-sevrow::-webkit-scrollbar{display:none}
html.tms-mobile .m-sevrow button{
  flex:none;display:flex;flex-direction:column;align-items:flex-start;gap:2px;
  border:1px solid var(--line);border-radius:11px;background:#fff;padding:8px 11px;
  min-width:82px;min-height:var(--m-tap);font:inherit;cursor:pointer;
}
html.tms-mobile .m-sevrow button.on{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
html.tms-mobile .m-sevrow .n{font-size:19px;font-weight:750;font-variant-numeric:tabular-nums;line-height:1.1}
html.tms-mobile .m-sevrow .l{font-size:10.5px;font-weight:650;color:var(--mut);white-space:nowrap}
html.tms-mobile .m-list{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:14px}
html.tms-mobile .m-list button{width:100%;display:flex;align-items:center;gap:11px;padding:0 13px;
  min-height:52px;background:#fff;border:0;border-bottom:1px solid #f0f0ee;text-align:left;
  font:inherit;font-size:14px;color:var(--ink);cursor:pointer}
html.tms-mobile .m-list button:last-child{border-bottom:0}
html.tms-mobile .m-list button:disabled{opacity:.45;cursor:default}
html.tms-mobile .m-list button .g{font-size:17px;width:24px;text-align:center;flex:none}
html.tms-mobile .m-list button .sp{flex:1;min-width:0}
html.tms-mobile .m-list button .sp b{display:block;font-weight:600}
html.tms-mobile .m-list button .sp span{display:block;font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-list button .arw{color:#c3c8cf;flex:none}
html.tms-mobile .m-off{background:#fbfbf9;border:1px dashed var(--line);border-radius:12px;padding:13px 14px}
html.tms-mobile .m-off h5{margin:0 0 4px;font-size:13px}
html.tms-mobile .m-off p{margin:0 0 10px;font-size:12px;line-height:1.5;color:var(--mut)}
html.tms-mobile .m-off ul{margin:0 0 11px;padding-left:17px;font-size:12px;color:var(--mut);line-height:1.65}
/* Both selectors, deliberately: `.send` is sometimes a button INSIDE the dashed
   panel and sometimes the panel itself (the sentence screen's "Read this in the
   full document", the word screen's "All the evidence"). The descendant form
   alone left the second kind at 43px — under the tap floor this file sets. */
html.tms-mobile .m-off .send,
html.tms-mobile .m-off.send{width:100%;min-height:var(--m-tap);border:1px solid var(--blue);
  background:#fff;color:var(--blue);border-radius:10px;font:inherit;font-size:13.5px;font-weight:650;cursor:pointer;
  padding:10px 12px;margin-bottom:10px}

/* ======================== Phase 1 · terms and the word ========================
   The corpus destination, which until 1.83.2 was a stub that handed the whole
   viewport to the desktop editor. The list is a screen and a term is a screen,
   laid out the way the sentence screen is — see
   developer/docs/mobile_word_editing_2026-08.html.

   .m-bar, .m-alt and .m-ex predate this: they were styled for the term deck
   study I proposed and never built. They are adopted here rather than
   duplicated, which is why some of their metrics read as inherited. */
html.tms-mobile .m-term-en{font-size:23px;font-weight:750;letter-spacing:-.015em;line-height:1.2;margin-bottom:3px}
html.tms-mobile .m-term-ceb{font-size:19px;font-weight:650;color:var(--blue);margin-bottom:9px}
html.tms-mobile .m-bar{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--mut);margin-bottom:4px}
html.tms-mobile .m-bar .track{flex:1;height:6px;border-radius:4px;background:#eef0f3;overflow:hidden}
html.tms-mobile .m-bar .track i{display:block;height:100%;background:var(--blue)}
html.tms-mobile .m-bar .pc{font-variant-numeric:tabular-nums;font-weight:650;color:var(--ink);
  min-width:34px;text-align:right}
html.tms-mobile .m-ex{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:10px 11px;
  margin-bottom:8px}
html.tms-mobile .m-ex .en{font-size:12px;color:#7d8590;line-height:1.5;margin-bottom:5px}
html.tms-mobile .m-ex .ceb{font-size:13.5px;line-height:1.55}

/* ---- the terms list ---- */
html.tms-mobile .m-cname{flex:none;display:block;width:100%;text-align:left;background:var(--panel);
  border:0;border-bottom:1px solid var(--line);padding:8px 12px;min-height:var(--m-tap);font:inherit;cursor:pointer}
html.tms-mobile .m-cname .k{display:block;font-size:9.5px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;color:var(--mut)}
html.tms-mobile .m-cname .t{display:block;font-size:14px;font-weight:650;color:var(--ink)}
html.tms-mobile .m-cfilters{flex:none;padding:8px 12px;background:#fff;border-bottom:1px solid var(--line)}
html.tms-mobile .m-trow{display:block;width:100%;text-align:left;border:1px solid #e9ecef;border-radius:12px;
  background:#fff;font:inherit;padding:10px 12px;margin-bottom:7px;min-height:56px;cursor:pointer}
html.tms-mobile .m-trow.done{background:#fbfcfb;border-color:#e2eee6}
html.tms-mobile .m-trow .en{display:block;font-size:15.5px;font-weight:700;letter-spacing:-.01em}
html.tms-mobile .m-trow .ceb{display:block;font-size:13.5px;font-weight:600;color:var(--blue);margin-top:1px}
html.tms-mobile .m-trow .ceb.none{color:var(--amber);font-weight:600}
html.tms-mobile .m-trow .sub{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-top:6px}

/* ---- chips: one vocabulary for the list rows, the word screen and the sheets ---- */
html.tms-mobile .m-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
html.tms-mobile .tg{font-size:11px;font-weight:650;border-radius:20px;border:1px solid var(--line);
  background:var(--panel);color:var(--mut);padding:2px 9px;white-space:nowrap}
html.tms-mobile .tg.st-unreviewed{color:#6b7280;border-color:#d6dae0;background:#f3f4f6}
html.tms-mobile .tg.st-under_review{color:#b7791f;border-color:#ecd9b0;background:#fdf6e7}
html.tms-mobile .tg.st-finalized{color:#1e8e3e;border-color:#bfe3c8;background:#eaf7ee}
html.tms-mobile .tg.warn{color:#b45309;background:#fff7ed;border-color:#fed7aa}
html.tms-mobile .tg.score{color:#9c3a6b;background:#fdeef6;border-color:#e0a3c0}
html.tms-mobile .tg.bib{color:#166534;background:#dcfce7;border-color:#bbf7d0}
html.tms-mobile .m-fine{font-size:11.5px;line-height:1.5;color:var(--mut);margin:0 0 10px;
  overflow-wrap:anywhere}
html.tms-mobile .m-lock{font-size:12px;line-height:1.5;color:#7c4a1e;background:#fdf5ee;
  border:1px solid #f0dcc6;border-radius:9px;padding:8px 10px;margin-bottom:10px}

/* ---- what is wrong with this term. Clamped: the flags run to a paragraph each,
        and two of them is a screenful before the rendering. ---- */
html.tms-mobile .m-att{border:1px solid #fde68a;background:#fffbeb;border-radius:11px;
  padding:10px 12px;margin-bottom:12px}
html.tms-mobile .m-att b{display:block;font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;
  color:#b45309;margin-bottom:5px}
html.tms-mobile .m-att p{margin:0 0 6px;font-size:12.5px;line-height:1.5;color:#7c4a1e}
html.tms-mobile .m-att p:last-of-type{margin-bottom:0}
html.tms-mobile .m-att p.clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
html.tms-mobile .m-att .more{background:none;border:0;color:#b45309;font:inherit;font-size:11.5px;
  font-weight:700;padding:6px 0 0;min-height:var(--m-tap);cursor:pointer}
/* A note's own ALL-CAPS label, set down rather than left shouting mid-sentence
   (bug-260910-234754). A span, not a <b>: `.m-att b` above is the card's heading
   and would turn this into a second one. */
html.tms-mobile .m-att .m-antag{font-size:10px;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:#92400e;margin-right:5px}

/* Where a reading came from (bug-260911-232957). Chips, because the phone shows
   one screen at a time and the statement behind each flag is a tap away under
   "All the evidence". Colours match the desktop's .rs-* so the two renderers of
   this corpus teach one vocabulary. */
html.tms-mobile .m-src{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 7px}
html.tms-mobile .tg.src-document{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}
html.tms-mobile .tg.src-bible{color:#166534;background:#dcfce7;border-color:#bbf7d0}
html.tms-mobile .tg.src-ai{color:#9a3412;background:#fff7ed;border-color:#fed7aa}
html.tms-mobile .tg.src-manual,
html.tms-mobile .tg.src-imported{color:#6b7280;background:#f3f4f6;border-color:#d6dae0}

/* ---- the primary rendering: this screen's answer to the sentence screen's
        amber translation box, and the same gesture — tap it to edit. ---- */
html.tms-mobile .m-prim{display:block;width:100%;text-align:left;background:#fff;border:2px solid var(--blue);
  border-radius:11px;padding:12px 13px;font:inherit;margin-bottom:8px;cursor:pointer}
html.tms-mobile .m-prim.none{border-color:var(--amber);cursor:default}
html.tms-mobile .m-prim .w{font-size:22px;font-weight:750;letter-spacing:-.015em;line-height:1.2;
  color:#134a8f;margin-right:7px}
html.tms-mobile .m-prim.none .w{font-size:15px;font-weight:650;color:#b45309;display:block}
html.tms-mobile .m-prim .why{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  font-size:12.5px;line-height:1.5;color:var(--mut);margin-top:7px}
html.tms-mobile .m-prim .hint{display:block;margin-top:9px;font-size:11.5px;color:var(--blue);font-weight:650}
html.tms-mobile #m-sheet .m-prim .why{-webkit-line-clamp:none;display:block}

/* ---- alternates, observed variants and prohibited renderings: one card
        shape, three states. ---- */
html.tms-mobile .m-alt{border:1px solid var(--line);border-radius:11px;margin-bottom:8px;
  background:#fff;overflow:hidden}
html.tms-mobile .m-alt.needs{border-color:#fed7aa;background:#fffdf9}
html.tms-mobile .m-alt.obs{border-style:dashed;background:#fbfbf9}
html.tms-mobile .m-alt.proh{border-color:#fecaca;background:#fff7f7}
html.tms-mobile .m-alt .hd{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;
  text-align:left;font:inherit;padding:9px 11px;min-height:52px;color:var(--ink)}
html.tms-mobile .m-alt button.hd{cursor:pointer}
html.tms-mobile .m-alt .w{font-size:15px;font-weight:700;flex:none}
html.tms-mobile .m-alt.proh .w{color:#991b1b;text-decoration:line-through}
html.tms-mobile .m-alt .sp{flex:1;min-width:0;display:flex;gap:5px;flex-wrap:wrap}
html.tms-mobile .m-alt .car{flex:none;width:16px;text-align:center;color:#8b95a3;font-size:13px}
html.tms-mobile .m-alt .rm{flex:none;width:var(--m-tap);min-height:var(--m-tap);border:0;background:none;
  color:var(--red);font:inherit;font-size:15px;cursor:pointer}
html.tms-mobile .m-alt .bd{padding:2px 11px 11px;border-top:1px solid #f0f0ee;font-size:12.5px;
  line-height:1.55;color:#3a4150}
html.tms-mobile .m-alt .bd .when{background:var(--panel);border:1px solid #eceff2;border-radius:9px;
  padding:8px 10px;margin:9px 0}
html.tms-mobile .m-alt .bd .when b{display:block;font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--mut);margin-bottom:3px}
html.tms-mobile .m-alt .bd .when .miss{color:#b45309;font-weight:600}
html.tms-mobile .m-alt .bd .why{color:var(--mut);margin-top:6px}
html.tms-mobile .m-rowbtns button.del{color:var(--red)}
html.tms-mobile .m-evi{border:1px solid var(--line);border-radius:11px;padding:10px 11px;margin-bottom:10px;background:#fff}
html.tms-mobile .m-evi .hd{display:flex;align-items:center;gap:8px;margin-bottom:7px}
html.tms-mobile .m-evi .w{font-size:15px;font-weight:700}
html.tms-mobile .m-lbl .r{float:right;font-weight:650;letter-spacing:0;text-transform:none;
  font-size:11px;color:var(--amber)}

/* ---- what is blocking Finalize, above the button it disables ---- */
html.tms-mobile #m-actbar .m-blk{font-size:11.5px;line-height:1.4;color:#b45309;
  padding:7px 12px 0}

/* ---- sheet fields ---- */
html.tms-mobile .m-fld{margin-bottom:12px}
html.tms-mobile .m-fld label{display:block;font-size:11.5px;font-weight:650;color:var(--mut);margin-bottom:4px}
html.tms-mobile .m-fld .req{color:#b45309}
html.tms-mobile .m-fld input,html.tms-mobile .m-fld select,html.tms-mobile .m-fld textarea{
  width:100%;font:inherit;font-size:16px;border:1px solid var(--line);border-radius:9px;
  padding:9px 10px;background:#fff;color:var(--ink);min-height:var(--m-tap)}
html.tms-mobile .m-fld textarea{min-height:92px;line-height:1.5;resize:vertical}
html.tms-mobile .m-cmt{border:1px solid var(--line);border-radius:9px;padding:8px 10px;margin-bottom:8px;
  background:var(--panel)}
html.tms-mobile .m-cmt .who{display:block;font-size:11px;color:var(--mut);margin-bottom:3px}
html.tms-mobile .m-cmt .tx{display:block;font-size:13px;line-height:1.55}

/* ============================ inherited surfaces ============================ */
/* Dialogs the mobile shell still shows go full-screen — the desktop chrome
   (drag handle, resize grip, minimize) has no meaning on a touch screen and
   chromeDialog()'s 340px floor plus 92% width leaves an unusable gutter. */
html.tms-mobile dialog{
  max-width:100vw!important;width:100vw!important;max-height:100dvh!important;height:100dvh!important;
  margin:0!important;border-radius:0!important;border:0!important;inset:0!important;
  resize:none!important;
}
html.tms-mobile dialog .dhead{cursor:default;padding-top:calc(12px + var(--m-safe-t))}
html.tms-mobile dialog .dlg-minbtn{display:none}
/* THE ✕ IS THE WAY OUT, AND IT MEASURED 13 x 22px. The tablet gave it the tap
   floor long ago (tablet.css, `dialog .dhead .x`); the phone full-screened every
   inherited window above and never sized the one control that closes it — Project
   Management, AI calls, the run log, Settings, Finalize and the rest. It is a
   <span>, so no button rule reaches it; the negative margins keep the header the
   height it was. */
html.tms-mobile dialog .dhead .x{
  min-width:var(--m-tap);min-height:var(--m-tap);display:inline-flex;align-items:center;
  justify-content:center;margin:-10px -8px -10px 0;font-size:19px;border-radius:8px;
  -webkit-tap-highlight-color:transparent;
}
html.tms-mobile dialog .dhead .x:active{background:rgba(20,28,42,.12)}
html.tms-mobile dialog .dbody{max-height:none;flex:1;min-height:0}
html.tms-mobile dialog .dfoot,html.tms-mobile dialog .setwin-foot{padding-bottom:calc(12px + var(--m-safe-b))}
/* --- the step-up password prompt -------------------------------------------
   The two rules above only bite inside a dialog that is a FLEX COLUMN, and the
   only rule in the tree that makes one is `dialog.dlg-chrome[open]{display:flex}`
   in tms.css. The step-up prompt is deliberately not `.dlg-chrome` — the native
   resize grip that class brings landed on top of its OK button — so under the
   forced 100dvh above it is a UA `display:block` box, and its title, field and
   buttons crowd into the top of an otherwise empty full-height screen.
   `[open]` is load-bearing: a closed <dialog> must stay display:none. */
html.tms-mobile dialog.tms-stepup[open]{display:flex;flex-direction:column}
/* The dialog's ONLY child is <form method="dialog">, which is display:block, so
   the rule above by itself just moves the problem down one level. This is what
   lets .dbody{flex:1} and the safe-area .dfoot padding above actually apply. */
html.tms-mobile .tms-stepup form{display:flex;flex-direction:column;flex:1;min-height:0}
/* `.tms-stepup .tsu-pw{font:inherit}` (0,2,0) outranks the blanket
   `html.tms-mobile input{font-size:16px}` (0,1,2) below, so the field renders at
   14px and iOS zooms the page the moment it is focused — the exact thing that
   blanket rule exists to prevent, on the one field where the zoom lands mid-password. */
html.tms-mobile .tms-stepup .tsu-pw{font-size:16px;min-height:var(--m-tap)}
/* tms.css sizes a .dfoot button for a mouse; these two are the whole decision. */
html.tms-mobile .tms-stepup .dfoot button{flex:1;min-height:var(--m-tap)}
/* THE DESK'S FORM DIALOGS, on a phone (#508, 2026-09-28). Six builders make a
   desk dialog one way — an inline-styled <dialog> whose one child is
   <form method="dialog">: view-audit's ciDialog, avRerunDialog and
   avSummaryDialog, view-corpus's glossDlgShell, view-project's projDialog, and
   the step-up above. The blanket rule full-screens them and sizes nothing
   inside. The phone's deck opens three of them (Add to Corpus ▸, #508's
   Add as alternate ▸ / When to use ▸, and the "Update the other sentences" that
   follows a change), and measured at 390px: Save and Cancel 21px tall, the
   fields 33-34px, and the alternate's situation picker as wide as its longest
   option, 417px — which widened the body's grid column, so every field ran to
   x=433, off the screen.
   So by what the control is, over the family rather than three ids.
   THE WIDTH NEEDS THREE PARTS, each measured, not reasoned — the first cut was
   `max-width:100%` on the select alone, on the theory that a percentage makes a
   <select> shrinkable, and every field still ran to x=433. Four of the six
   builders lay their body out as `display:grid` (the second child of the form,
   after the title), and a grid item's `min-width:auto` means "no narrower than
   my content": a select's content is its longest option, and that sized the
   column. `min-width:0` on the select lets it go when the select is the grid
   item; with the field wrapped in a block box instead, the WRAPPER is the grid
   item and holds the column open (measured: x=433 again), so the body's own
   children take `min-width:0` too, and `max-width:100%` then holds the select to
   whatever box it is in. (`minmax(0,1fr)` columns on the grid, tried first,
   still overflowed.) */
html.tms-mobile dialog > form[method="dialog"] :is(button,select,input:not([type=checkbox]):not([type=radio])){min-height:var(--m-tap)}
html.tms-mobile dialog > form[method="dialog"] > div:nth-child(2) > *{min-width:0}
html.tms-mobile dialog > form[method="dialog"] select{max-width:100%;min-width:0}
/* A tick is the phone's usual 22px box, and its <label> is what takes the
   finger — the #m-runset and pay convention. The propagation list's ticks were
   13px with no label at all; ciPropagate now wraps each one, inline-flex, so
   this floor reaches it. */
html.tms-mobile dialog > form[method="dialog"] input[type=checkbox]{width:22px;height:22px;margin:0}
html.tms-mobile dialog > form[method="dialog"] label:has(> input[type=checkbox]){min-height:var(--m-tap);min-width:var(--m-tap)}
/* THE KEPT RECORD, on a phone (Tools ▸ Run records / Capture, 2026-09-24).
   Both are view-project.js's own dialogs, full-screened by the blanket rule; what
   is wrong at 390px is only SHAPE. MEASURED before these rules: Run records drew
   a five-column table 649px wide in a 390px dialog, so each run's Download link
   sat at x=659 — off screen, reachable only by scrolling the dialog sideways —
   and every download link was 25–32px tall. So each run becomes a card: when
   and phase on one line, the job and its settings under them, and the size
   beside a Download of full height. `!important` because the cells carry their
   padding, wrapping and alignment inline. */
html.tms-mobile #dlg-run-records table,
html.tms-mobile #dlg-run-records tbody,
html.tms-mobile #dlg-run-records tr{display:block;width:auto}
html.tms-mobile #dlg-run-records th{display:none}
html.tms-mobile #dlg-run-records tr{padding:8px 0}
html.tms-mobile #dlg-run-records td{
  display:block;padding:2px 0!important;text-align:left!important;white-space:normal!important;
}
html.tms-mobile #dlg-run-records td:nth-child(1),
html.tms-mobile #dlg-run-records td:nth-child(2){display:inline-block;margin-right:10px;font-weight:600}
html.tms-mobile #dlg-run-records td:nth-child(3){overflow-wrap:anywhere}
html.tms-mobile #dlg-run-records td:nth-child(3) div{max-width:none!important}
/* The size said as what it is: stacked, a bare "46.0 MB" has lost its column. */
html.tms-mobile #dlg-run-records td:nth-child(4){display:inline-block;margin-right:12px;vertical-align:middle!important}
html.tms-mobile #dlg-run-records td:nth-child(4)::before{content:'Transcript ';color:var(--mut)}
html.tms-mobile #dlg-run-records td:nth-child(5){display:inline-block;vertical-align:middle!important}
html.tms-mobile #dlg-run-records a.btn,
html.tms-mobile #dlg-capture a.btn{
  display:inline-flex;align-items:center;min-height:var(--m-tap);padding:0 16px;
}
/* PAY, on a phone (#503, v1.149.0). My pay (`dlg-mypay`) and Team ▸ Pay
   (`#pay-pane`) are the desk's own dialog and pane, drawn by view-pay.js and
   full-screened by the blanket rule above; what is wrong at 390px is SHAPE, as
   with the kept records. MEASURED before these rules: every pay table is 560px
   wide in a 312–354px box, so a translator's statement showed Project · stage and
   Bucket and a "Total" row with NO FIGURE — Words, the rate, the amount and each
   line's Sentences button (x 640–750) were off screen, and the Sentences button
   is the only way to see what a line is made of. Every pay control was 28–37px.

   So each row is a card: the first cell is its title, every other cell sits
   under its column's name (`data-l`, written from the table's own <th>s by
   view-pay.js's labelCells, so there is no second list of columns here). Written
   against `.pay-scroll`, the wrapper every pay table shares, not per table — and
   that is what carried #505 (v1.150.0): its rate card (820px) and progress,
   activity and Corpus Builder tables (760px) are cards by these same rules. */
html.tms-mobile .pay-scroll{overflow:visible}
html.tms-mobile .pay-scroll table.tms-tbl{display:block;min-width:0;white-space:normal;overflow:visible}
html.tms-mobile .pay-scroll thead{display:none}
html.tms-mobile .pay-scroll tbody{display:block}
html.tms-mobile .pay-scroll tr{
  display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 18px;
  padding:10px 2px;border-bottom:1px solid var(--line);
}
html.tms-mobile .pay-scroll td{display:block;padding:0;border:0;text-align:left;overflow-wrap:anywhere}
html.tms-mobile .pay-scroll td:first-child{flex:1 1 100%;font-weight:600}
html.tms-mobile .pay-scroll td[data-l]::before{
  content:attr(data-l);display:block;margin-bottom:1px;
  font-size:10.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--mut);
}
/* A title needs no caption, except the sentence number, which is only a number. */
html.tms-mobile .pay-scroll td:first-child::before{display:none}
html.tms-mobile .pay-units td:first-child::before{display:inline}
html.tms-mobile .pay-units td:nth-child(2){flex:1 1 100%}
html.tms-mobile .pay-scroll td:empty{display:none}
/* "Total ₱109.84" on one line: a lone figure under a full-width "Total" reads as
   the next line's. */
html.tms-mobile .pay-scroll tr.pay-total td:first-child{flex:1 1 auto}
html.tms-mobile .pay-scroll tr.pay-total{align-items:baseline}
/* tms.css paints CELLS — the chosen person's, a rate card's group row, and every
   row on hover. As a card the gaps between cells would stay white, and on a touch
   screen :hover sticks to whatever was last tapped, so a card came out patched
   grey. So on a phone NO pay cell is painted: the card is, and hover not at all. */
html.tms-mobile .pay-scroll table.tms-tbl td{background:transparent}
html.tms-mobile table.tms-tbl tr.pay-row.on{background:#eef4fc}
html.tms-mobile .pay-scroll tr.pay-rc-grp{background:var(--panel)}
/* A rate card's row title is `nowrap` on the desk, where it has a column to itself. */
html.tms-mobile .pay-scroll .pay-rc-who{white-space:normal}
/* "Which rate applies?": the desk's three-column chain gives the figures their
   full width (`auto`) and squeezes each level's name to a word a line at 390px
   ("John / · / Cebuano / · / Phase / 0"). On a phone the figures go under the
   name instead: number, name, and the figures on the line below it. */
html.tms-mobile .pay-chain div{grid-template-columns:22px minmax(0,1fr)}
html.tms-mobile .pay-chain div > span:last-child{grid-column:2}
/* The tap floor, on every control inside the two pay surfaces — by what a control
   IS, not by a list of ids, which is what let #505's sub-tabs, date and filter
   pickers arrive at 33px. `button` is safe here, unlike tablet.css's reason for
   never writing it: every button view-pay.js draws is a control (the rate card's
   cells are block buttons that tms.css already gives 44px). */
html.tms-mobile :is(#dlg-mypay .dbody,#pay-pane,#m-mypay-slot) :is(button,select,input:not([type=checkbox]):not([type=radio])),
html.tms-mobile :is(#dlg-mypay .dbody,#pay-pane,#m-mypay-slot) label:has(> input[type=checkbox]){min-height:var(--m-tap)}
/* My pay's phone screen (#507, `mypayScreen`) scrolls in the shell's `.m-pad`;
   its view (`.pay-ph`) pads itself, so the scroller does not add a second margin
   at the sides. AT THE FOOT IT ADDS ROOM FOR THE BUG REPORTER'S BUTTON, which is
   fixed 14px above the scroller's foot, 48px tall, at the right edge — exactly
   where the statement's last control, Ask, sits. With `.m-pad`'s 20px the full
   scroll left Ask at y=705 under it (a tap there opens the reporter); 76px lets
   the last row scroll clear. */
html.tms-mobile .m-pad.m-mypay{padding:0 0 calc(76px + env(safe-area-inset-bottom, 0px))}
html.tms-mobile .pay-actions input[type=text]{flex:1 1 160px;min-width:0}
/* A form's own pickers and free-text fields, a line each; the labelled fields
   (Full, Review %, Takes effect) keep their label beside them. `min-width:0`
   because a field's `size` is its intrinsic width, and a flex item will not shrink
   below that: the rate editor's Reason (`size="40"`) ran to x=413 on a 390px
   screen without it. */
html.tms-mobile .pay-form > select,html.tms-mobile .pay-form > input[type=text]{flex:1 1 100%;max-width:none;min-width:0}
/* A <select> is as wide as its LONGEST OPTION, and these pickers list project
   titles. With the seed's "John · Cebuano" nothing showed; with a real title the
   rate card's Show picker ran to x=942 and Progress's Project picker to x=881. So
   each labelled picker takes a line, and the picker fills what is left of it
   rather than sizing to its options. */
html.tms-mobile :is(#dlg-mypay .dbody,#pay-pane) .toolbar label{flex:1 1 100%;min-width:0}
html.tms-mobile :is(#dlg-mypay .dbody,#pay-pane) .toolbar label > select{flex:1 1 0;width:0;min-width:0}
/* Stacked label + control: a 230px label beside a control leaves 160px on a
   390px screen, which is narrower than the shortest value either holds. */
html.tms-mobile .set-row{flex-direction:column;gap:6px}
html.tms-mobile .set-row .lbl{flex:none;width:100%;padding-top:0}
html.tms-mobile .set-row .ctl input[type=text],html.tms-mobile .set-row .ctl input[type=number],
html.tms-mobile .set-row .ctl input[type=email],html.tms-mobile .set-row .ctl input[type=password],
html.tms-mobile .set-row .ctl select{max-width:none}
html.tms-mobile .setwin-layout{flex-direction:column}
html.tms-mobile #setwin-nav{width:auto;border-right:0;border-bottom:1px solid var(--line);
  display:flex;overflow-x:auto;gap:4px;padding:8px}
html.tms-mobile #setwin-nav .nav-group{display:none}
html.tms-mobile #setwin-nav .nav-btn{width:auto;white-space:nowrap;min-height:var(--m-tap)}
/* Wide tables scroll in their own box rather than the page. */
html.tms-mobile table.tms-tbl,html.tms-mobile .usage-tbl{display:block;overflow-x:auto;white-space:nowrap}
/* Detaching a region into an OS window has no referent here. */
html.tms-mobile .popout-group{display:none!important}
/* iOS zooms the page when a focused control is under 16px. */
/* `!important`, and it took an inherited dialog to show why. This rule is the
   one that stops iOS zooming the viewport when a control under 16px takes focus,
   and it was losing: the desktop tree carries `style="font:inherit"` inline on
   23 form controls, and an inline shorthand beats any selector without
   !important. So every field in every inherited dialog — Project Management, New
   Project, the run dials — zoomed the page on focus, on the one host this rule
   exists for. The .tms-stepup password field above was the same bug, found and
   fixed one field at a time; this is the general case. */
html.tms-mobile input,html.tms-mobile select,html.tms-mobile textarea{font-size:16px!important}

/* ============================ tablets & up ============================ */
/* RETIRED, and the file it moved to says why. This block was the whole tablet
   story: eight selectors raised to 38 or 40px on `(pointer:coarse) and
   (min-width:761px)` — the same predicate assets/tablet.css now carries as a
   CLASS, over the app's real control vocabulary, at 44. Leaving it here would
   have left a second and LOWER floor stated for eight of the same selectors,
   which is the kind of thing that is only ever discovered by someone wondering
   why a control is 38px in a tier that promises 44.

   `dialog.dlg-chrome{max-height:96dvh}` was the one rule with no counterpart,
   so it went with the rest rather than being left behind alone. */

/* ===================== the project's three phases =====================
   The desktop's ①→②→③ spine as a vertical rail. `#workflow-bar` is still hidden
   above — four labelled pills with a meter do not fit a 390px row, and that part
   of the old comment was right; what was wrong was the claim that Home carried
   the same information. It carries a resume card. See projectScreen(). */
html.tms-mobile .m-phase{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 13px;margin-bottom:11px;
}
/* WHERE YOU ARE, marked on the rail rather than only in the sentence above it —
   a reader arriving from the document needs to find their place before they can
   read anything else on the screen. */
html.tms-mobile .m-phase.here{border-color:#cfdcec;background:#f7faff}
html.tms-mobile .m-phase.empty{background:var(--panel);border-style:dashed}
html.tms-mobile .m-phase .ct{
  display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--ink);
  margin-bottom:6px;
}
html.tms-mobile .m-phase .ph-i{font-size:15px;color:var(--mut);flex:none}
html.tms-mobile .m-phchip{
  margin-left:auto;flex:none;font-size:10.5px;font-weight:700;letter-spacing:.02em;
  border-radius:9px;padding:2px 8px;border:1px solid transparent;white-space:nowrap;
}
html.tms-mobile .m-phchip.open{background:#fdf3e0;color:#8a5a12;border-color:#f0dcb4}
html.tms-mobile .m-phchip.done{background:var(--green-bg);color:#166b31;border-color:#bfe0c8}
html.tms-mobile .m-phchip.empty{background:#eef1f5;color:var(--mut);border-color:var(--line)}

/* THE WALK, DRAWN FROM THE DESKTOP'S OWN STEPS (wave D). Deliberately NOT a list
   of controls: the phone renders the desktop's model as a reading list, and the
   card's existing buttons remain the only things it offers to press. That is why
   nothing here is a tap target and why the rows are 13px — a 44px floor on four
   or five rows would push the card's real controls off the screen to make room
   for text nobody can press.

   THREE STATES, AND ONLY ONE OF THEM IS LOUD. `now` is the ring paintWalk draws
   on the desktop — the first step that is neither done nor optional — and it is
   the one thing a reader is looking for. `done` recedes, `todo` is plain. An
   optional step is NOT dimmed, for the same reason tablet.css gives about
   `is-todo`: available now and merely not required reads wrongly as disabled. */
html.tms-mobile .m-walk{margin:0 0 10px}
html.tms-mobile .m-walk .wh{
  font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--mut);
  text-transform:uppercase;margin:0 0 5px;
}
html.tms-mobile .m-walk ol{list-style:none;margin:0;padding:0}
html.tms-mobile .m-walk li{
  display:flex;align-items:flex-start;gap:8px;padding:3px 0;font-size:13px;line-height:1.35;
}
html.tms-mobile .m-walk li .n{
  flex:none;width:18px;height:18px;border-radius:50%;margin-top:1px;
  display:flex;align-items:center;justify-content:center;
  font-size:10.5px;font-weight:700;border:1px solid var(--line);
  background:#fff;color:var(--mut);
}
html.tms-mobile .m-walk li.done .n{background:var(--green-bg);color:#166b31;border-color:#bfe0c8}
html.tms-mobile .m-walk li.done .t{color:var(--mut)}
html.tms-mobile .m-walk li.now .n{background:#154c90;color:#fff;border-color:#154c90}
html.tms-mobile .m-walk li.now .t{font-weight:700;color:var(--ink)}
html.tms-mobile .m-walk li .o{
  font-size:10.5px;font-weight:600;color:var(--mut);white-space:nowrap;
}

/* ================= the run monitor, in a sheet (wave D) =================
   EVERY PIXEL INSIDE `.m-mon` BELONGS TO ANOTHER MODULE. view-activity.js and
   view-aicalls.js write their own markup into these hosts, with the desktop's
   inline styles and its `.btn.sm` on the minimise control. This shell owns the
   container and the lifecycle and must not restyle their internals — a rule this
   file can keep because the two modules are the single renderer for both hosts,
   which is the whole reason the phone mounts them rather than redrawing them.

   SO WHAT IS HERE IS BOXING AND TYPE, and one thing that is not cosmetic: the
   tape and the call list scroll INSIDE their own box. Without a max-height an
   hour-long run's log grows without limit inside a sheet that is already
   scrolling, and the reader loses the panel below it entirely. */
html.tms-mobile .m-mon{
  border:1px solid var(--line);border-radius:10px;background:var(--panel);
  padding:10px;margin:0 0 10px;font-size:12.5px;
}
html.tms-mobile .m-mon:last-child{margin-bottom:0}
html.tms-mobile .m-mon .act-body,
html.tms-mobile .m-mon .pj-calls{max-height:38vh;overflow:auto}
/* The minimise control is the modules' own `.btn.sm`; give it a fingertip
   without touching anything else they draw. */
html.tms-mobile .m-mon .btn.sm{min-height:var(--m-tap);padding:0 12px}
/* THE PHASE'S OWN COMPLETION, on its card. `.m-rcdone` below is the same controls
   as a BAND — its own panel, standing clear of the differences above it — which
   is right on ⓪'s screen and wrong inside a card that is already a panel. Here it
   is a footer: a hairline above it, and nothing else. Every card carries one,
   including an empty phase's, because the phases are a sequence a reader walks
   and a card with no control is where that walk stopped. */
html.tms-mobile .m-phfin{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;
  border-top:1px solid var(--line);margin-top:10px;padding-top:10px;
}
html.tms-mobile .m-phfin .m-btn{width:auto;flex:1 1 auto;min-width:130px}
html.tms-mobile .m-phfin .m-note{flex:1 1 100%}
/* The same control as a FOOTER, appended by render() to the screen a phase is
   worked on. Padded clear of whatever the screen ended with — a terms list, a
   deck, the run card — because it is a claim about the phase and not about the
   last row above it. */
html.tms-mobile .m-phfoot{padding-top:0;padding-bottom:18px}

/* ---- the page walk, appended by render() above the phase footer ----
   FLEX:NONE, EXPLICITLY, and that is not a precaution. `.m-pad` is `flex:1;
   min-height:0;overflow-y:auto` because on most screens it IS the scroller —
   so a second `.m-pad` appended as a sibling would take an equal share of the
   host's height (`flex-basis:0` plus equal grow), and on the document screen
   it would take that share from `#m-doc`. The band is chrome: it is as tall as
   its one row and it never scrolls. `.m-phfoot` above rides on the same class
   and is bounded only by its content; this one is bounded on purpose. */
html.tms-mobile .m-pagebar{
  flex:none;overflow:visible;padding:10px 12px 12px;
  border-top:1px solid var(--line);background:#fcfcfb;
}
html.tms-mobile .m-pagebar .pb{display:flex;gap:8px;align-items:center}
html.tms-mobile .m-pagebar .pb .m-btn{width:auto;flex:0 0 auto;margin:0}
html.tms-mobile .m-pagebar .pb .at{
  flex:1 1 auto;text-align:center;font-size:11.5px;color:var(--mut);
}
html.tms-mobile .m-pagebar > .m-btn{width:100%;margin:8px 0 0}
/* Deploy ▸ Backups & log: five backups at a time (bug-260925-230334). */
html.tms-mobile .m-bkpager{display:flex;gap:8px;align-items:center;margin-top:8px}
html.tms-mobile .m-bkpager .m-btn{width:auto;flex:0 0 auto;margin:0}
html.tms-mobile .m-bkpager .m-btn[disabled]{opacity:.45}
html.tms-mobile .m-bkpager .at{flex:1 1 auto;text-align:center;font-size:11.5px;color:var(--mut)}
/* The band sits directly on top of the phase footer when both are drawn, so the
   footer drops the border it would otherwise repeat two rows down. */
html.tms-mobile .m-pagebar + .m-phfoot .m-phfin{border-top:0;margin-top:0;padding-top:0}

/* ---- what the last document autosave did (M4) ----
   FLEX:NONE for the reason .m-pagebar carries one: this sits inside #view-mobile's
   flex column beside #m-doc, which is flex:1, and a growing sibling would take the
   document's height. One line, wrapping at most to two. */
html.tms-mobile .m-docsave{
  flex:none;font-size:12px;line-height:1.45;padding:7px 12px;
  background:var(--green-bg,#eef6f0);color:#166b31;border-bottom:1px solid #bfe0c8;
}
html.tms-mobile .m-docsave.bad{background:#fbeeee;color:#8d2c2c;border-bottom-color:#e6c6c6}
/* The way back, drawn only when the page can no longer be saved (Phase 1 · the
   paragraph guard). Full width at the tap floor: it is the one thing the line asks
   the reviewer to do. */
html.tms-mobile .m-docsave .m-docrestore{
  display:block;width:100%;min-height:var(--m-tap,44px);margin:6px 0 2px;
  font:inherit;font-size:13px;font-weight:600;color:#8d2c2c;background:#fff;
  border:1px solid #e6c6c6;border-radius:8px;
}

/* WHERE A GUEST'S DOCUMENT STOPS, in the one band of chrome on this screen that
   does not move. Its own band and NOT a line inside Viewing Options, because
   that panel collapses — a reader who has never opened it would be told the
   document is cut by a control they have to find first.

   The panel it belongs with is `.guest-wall`, which view-audit.css already
   defines and app.html already loads here; only its measure needs a phone. Its
   `margin:22px auto 30px` was written for a 46em column, and at 390px that is
   22px of nothing above a full-bleed box. */
html.tms-mobile .m-guestbar{
  flex:none;font-size:12px;line-height:1.45;padding:7px 12px;
  background:#fdf3e0;color:#5a4a28;border-bottom:1px solid #e8d9b0;
}
html.tms-mobile .guest-wall{margin:14px 10px 20px;padding:12px 14px;font-size:13px}

/* WHY THE DOCUMENT IS READ-ONLY. Its own band rather than the guest one's amber:
   a guest is read-only BY DESIGN and the amber says "you are visiting", while
   this is a reviewer who expected to be able to write and could not — a
   different fact, and one with a remedy. Neutral, because it is not a warning
   about anything the reader did. */
html.tms-mobile .m-accessbar{
  flex:none;font-size:12px;line-height:1.45;padding:7px 12px;
  background:#eef1f5;color:#445061;border-bottom:1px solid #d6dce4;
}

/* ---- ② Find the quoted Scripture (A3'), one panel per numbered step ----
   THE NUMBER AND THE STATE COME FROM THE DESK. `TMSViewProject.steps()` returns
   paintWalk's own rule — the ring is the first step that is neither done nor
   optional — so these three classes are painted from the same answer the desktop
   page paints, never from a second reading of the project. A done step goes
   quiet, the ring gets the accent, and an optional one says so in words as well
   as in colour, because colour alone is not a label. */
html.tms-mobile .m-scr .ct{display:flex;align-items:center;gap:8px}
html.tms-mobile .m-scr .ct .n{
  flex:none;display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;font-size:12px;font-weight:700;
  border:1px solid var(--line);background:#fff;color:var(--mut);
}
html.tms-mobile .m-scr.done .ct .n{background:var(--green-bg);color:#166b31;border-color:#bfe0c8}
html.tms-mobile .m-scr.done .ct{color:var(--mut)}
html.tms-mobile .m-scr.now .ct .n{background:#154c90;color:#fff;border-color:#154c90}
html.tms-mobile .m-scr.now{border-color:#154c90}
/* The checkbox is inside a <label> with the words, so the whole row is the
   target — §1's tablet floor exists because of the boxes that are NOT. */
html.tms-mobile .m-scr-chk{
  display:flex;gap:10px;align-items:flex-start;font-size:13.5px;line-height:1.45;
  min-height:44px;padding:4px 0;
}
html.tms-mobile .m-scr-chk input{flex:none;width:22px;height:22px;margin-top:1px}
html.tms-mobile .m-scr-dials{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
html.tms-mobile .m-scr-dials label{flex:1 1 140px;display:flex;flex-direction:column;gap:4px}
html.tms-mobile .m-scr-dials label span{font-size:11px;color:var(--mut)}
html.tms-mobile .m-scr-dials select{
  width:100%;min-height:44px;font:inherit;font-size:13px;padding:6px 8px;
  border:1px solid var(--line);border-radius:8px;background:#fff;
}
html.tms-mobile .m-scr-dials select:disabled{background:#f4f4f2;color:var(--mut)}

/* ========================= ⓪ Reconcile =========================
   The desktop's two columns turned ninety degrees. 390px has no room for the
   memory beside the document, so a pair STACKS — the document first, because it
   is what the reader gets, and the memory under it, because it is what the
   document is being checked against. The pairing is still by index, so a card is
   one pair and never two halves that have drifted apart. See rcDocScreen(). */
html.tms-mobile .m-rcchips{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 10px}
html.tms-mobile .m-rcchip{
  font-size:10.5px;border:1px solid var(--line);border-radius:9px;padding:2px 8px;
  color:var(--mut);background:#fff;white-space:nowrap;
}
html.tms-mobile .m-rcchip b{color:var(--ink);font-variant-numeric:tabular-nums}
html.tms-mobile .m-rcchip.warn{background:var(--amber-bg);border-color:#ecd7a8;color:#8a5600}
html.tms-mobile .m-rcchip.bad{background:var(--red-bg);border-color:#eec4c4;color:var(--red)}

/* The phase's own completion, in a band of its own rather than inside a card:
   it is a claim about the WHOLE phase, and a reader must not read it as the
   answer to whichever difference happens to sit above it. */
html.tms-mobile .m-rcdone{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;
  background:var(--panel);border:1px solid var(--line);border-radius:12px;
  padding:11px 13px;margin-bottom:12px;
}
html.tms-mobile .m-rcdone .m-btn{width:auto;flex:1 1 auto;min-width:150px}

html.tms-mobile .m-rcrow{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 13px;margin-bottom:9px;
}
html.tms-mobile .m-rcrow.settled{background:var(--panel)}
html.tms-mobile .m-rcrow .tags,
html.tms-mobile .m-rcpair .tags{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:7px}
html.tms-mobile .m-rctag{
  font-size:10px;letter-spacing:.04em;text-transform:uppercase;font-weight:700;
  border-radius:4px;padding:2px 7px;background:#eef1f5;color:var(--mut);
}
html.tms-mobile .m-rctag.in_memory_only,
html.tms-mobile .m-rctag.unplaceable{background:var(--red-bg);color:var(--red)}
html.tms-mobile .m-rctag.sentence_boundary,
html.tms-mobile .m-rctag.in_document_only{background:var(--amber-bg);color:#8a5600}
html.tms-mobile .m-rcrow .mem{font-size:14px;line-height:1.5;color:var(--ink)}
html.tms-mobile .m-rcrow .mem div+div{margin-top:4px}
html.tms-mobile .m-rcfine{margin:5px 0 0;font-size:11.5px;line-height:1.45;color:var(--mut)}
html.tms-mobile .m-rcsettled{margin:8px 0 0;font-size:12.5px;color:#166b31;font-weight:600}
html.tms-mobile .m-rcacts{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
html.tms-mobile .m-rcacts .m-btn{width:auto;flex:1 1 auto;min-width:140px}

html.tms-mobile .m-rcbar{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
html.tms-mobile .m-rcbar .m-btn{width:auto;flex:0 0 auto}

html.tms-mobile .m-rcpair{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 13px;margin-bottom:9px;
}
/* A pair with nothing to settle is still drawn — dropping it would renumber the
   walk and hide the agreement that makes the differences meaningful — but it is
   quieter than one that carries a difference. */
html.tms-mobile .m-rcpair:not(.flag){background:var(--panel);border-style:dashed}
html.tms-mobile .m-rcpair.here{border-color:#cfdcec;box-shadow:0 0 0 2px #dce8f7}
html.tms-mobile .m-rcpair .half+.half{margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}
html.tms-mobile .m-rcpair .lb{
  display:block;font-size:10px;letter-spacing:.07em;text-transform:uppercase;
  font-weight:700;color:var(--mut);margin-bottom:3px;
}
html.tms-mobile .m-rcpair p{margin:0;font-size:14px;line-height:1.5}
html.tms-mobile .m-rcpair p+p{margin-top:4px}
/* A GHOST IS NOT AN EMPTY BOX. One side having nothing is the finding, so it is
   said in words rather than left as blank space a reader reads as a bug. */
/* The pair's English belongs to NEITHER half — it is the sentence both sides are
   a rendering of — so it sits below the rule rather than flush under the memory,
   where it read as the memory's own English. */
/* ---- ⓪ M2: the rendered page, and the sheet over it ------------------------
   The OUTER box is the scroller, never the iframe: rcAnnotate sizes the frame to
   its whole content, which is what makes offsetTop measurable and scrollTop
   assignable, and it sidesteps the iOS "an iframe will not scroll under a finger"
   problem entirely. The height is explicit because this box is NOT inside #m-doc,
   whose flex column is what gives Phase 3's .m-frame its size. */
html.tms-mobile .m-rcdoc{flex:1;min-height:0;display:flex;flex-direction:column;background:#e6e6e3}
html.tms-mobile .m-rcdochead{flex:none;display:flex;gap:6px;padding:8px 10px;background:var(--panel);
  border-bottom:1px solid var(--line)}
html.tms-mobile .m-rcdochead .m-btn{width:auto;flex:1 1 auto;min-height:38px;margin:0;font-size:12.5px}
html.tms-mobile .m-rcframe{flex:1;min-height:0;overflow-y:auto;background:#fff;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html.tms-mobile .m-rcframe iframe{width:100%;border:0;display:block;background:#fff}
html.tms-mobile .m-rcsheet{flex:none;background:var(--panel);border-top:2px solid var(--blue);
  padding:10px 12px calc(12px + var(--m-safe-b));max-height:52vh;overflow-y:auto}
html.tms-mobile .m-rcsheet .grab{width:34px;height:4px;border-radius:2px;background:var(--line);
  margin:2px auto 9px}
html.tms-mobile .m-rcnav{display:flex;gap:6px;align-items:center;margin-bottom:8px;font-size:12px}
html.tms-mobile .m-rcnav .sp{flex:1}
html.tms-mobile .m-rcnav button{min-height:36px;padding:0 12px;border:1px solid var(--line);
  border-radius:9px;background:#fff;font:inherit;font-size:12.5px;font-weight:650;color:var(--ink)}
html.tms-mobile .m-rcnav b{font-variant-numeric:tabular-nums;min-width:52px;text-align:center}
html.tms-mobile .m-rcmem{background:#fcfcfa;border:1px solid var(--line);border-radius:9px;
  padding:8px 10px;margin:7px 0 0;font-size:12.5px;line-height:1.5}
html.tms-mobile .m-rcmem p{margin:0 0 4px}
html.tms-mobile .m-rcmem p:last-child{margin:0}
html.tms-mobile .m-rcmem .ghost{color:var(--mut);font-style:italic}
html.tms-mobile .m-rcpair .pairen{
  margin-top:9px;padding-top:8px;border-top:1px solid var(--line);
}
html.tms-mobile .m-rcpair .ghost{
  color:var(--mut);font-style:italic;font-size:12.5px;
  background:repeating-linear-gradient(135deg,#f4f4f2,#f4f4f2 6px,#ebebe8 6px,#ebebe8 12px);
  border-radius:6px;padding:6px 9px;
}

/* ============== the run screen's borrowed parts ==============
   #pj-prereqs, #pj-scale and the dials in #m-runset are rendered by
   assets/view-project.js — its wording, its rules, its ids. What is wrong with
   them here is only SHAPE: the levers are a wrapping flex row of inline labels
   built for a 1100px panel, and every control in them is mouse-sized. Restyling
   is a stylesheet's job; re-rendering them would be a second copy of eight
   levers, four confidence bands and the conventions box to keep in step. */
html.tms-mobile .m-prereq,
html.tms-mobile .m-scale{font-size:12.5px;line-height:1.9;color:var(--ink)}
/* The ticks stay INLINE and wrap. Making each span a block was the first
   instinct and it is wrong: view-project.js joins them with a ' · ' TEXT NODE,
   which no selector can reach, so blocking the spans strands a lone middot on a
   line of its own between every pair. Wrapping a run of short phrases is what
   this line was already built to do. */
html.tms-mobile .m-prereq{word-spacing:.02em}
html.tms-mobile .m-scale a{font-weight:650}

html.tms-mobile #m-runset details{border:0!important;padding:0!important;margin:0!important}
/* The summary is the sheet's own title here, so it says nothing twice. */
html.tms-mobile #m-runset summary{display:none}
/* `!important` on both, and it is not laziness: view-project.js sets
   `display:flex;flex-wrap:wrap` and a font size as INLINE styles on these two,
   and an inline style outranks any selector without it. The alternative is
   editing the desktop's markup to suit a second renderer, which is the coupling
   the api() seam exists to avoid. */
html.tms-mobile #m-runset #pj-levers{display:block!important}
/* Label above control, full width, 44px — the same shape .set-row is given
   above, for the same reason: a 230px label beside a control leaves the control
   less room than its own longest value. One dial per row, because two of these
   labels are three words long and the pair that shared a row lost both. */
html.tms-mobile #m-runset #pj-levers > label{
  display:block!important;margin:0 0 14px;font-size:12.5px!important;font-weight:600;color:var(--mut);
}
/* THE STEP BLOCK NEEDS ITS OWN PAIR, and the selector is not the same one.
   `#pj-steps` draws the five steps as rows, so its labels sit one level deeper
   than the flat list's — inside a per-step `div`, not directly under the
   container — and `#pj-levers > label` reaches none of them. The step rows also
   carry their own inline `display:flex`, so the same `!important` reasoning as
   above applies: without this the three step dials share rows on a phone, which
   is exactly the defect the comment above describes and which
   `mobile_parity_smoke`'s "one dial per row" check caught when the block landed. */
html.tms-mobile #m-runset #pj-steps > div{display:block!important}
html.tms-mobile #m-runset #pj-steps label{
  display:block!important;margin:0 0 14px;font-size:12.5px!important;font-weight:600;color:var(--mut);
}
/* The step number and its note are prose, not controls: they read as one line
   above the dial rather than as a column of orphaned fragments. */
html.tms-mobile #m-runset #pj-steps span{display:inline;min-width:0!important}
html.tms-mobile #m-runset select,
html.tms-mobile #m-runset textarea{
  display:block;width:100%;margin-top:5px;min-height:var(--m-tap);
  padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);
}
html.tms-mobile #m-runset textarea{min-height:96px;resize:vertical}
/* The four confidence bands. Checkboxes at the 44px floor with the whole row as
   the target, not the 16px box — this is the control that decides which
   back-translation findings a run accepts, and a mis-tap changes the audit. */
html.tms-mobile #m-runset #pj-confrow{margin-top:4px!important;font-size:12.5px!important}
html.tms-mobile #m-runset #pj-confrow > span:last-child{display:block!important;margin-left:0!important}
html.tms-mobile #m-runset #pj-confrow label{
  display:flex;align-items:center;gap:10px;min-height:var(--m-tap);
  border-top:1px solid #f0f0ee;font-size:13px;color:var(--ink);
}
html.tms-mobile #m-runset #pj-confrow input[type=checkbox]{width:22px;height:22px;flex:none}
html.tms-mobile #m-runset .btn{
  width:100%;min-height:var(--m-tap);border-radius:11px;font:inherit;font-size:14px;font-weight:650;
}

/* The Remove link on a note the reader wrote. A link rather than a button
   because it is destructive and secondary — the primary act on this sheet is
   adding one — but still at the tap floor, since a mis-tap here deletes prose
   somebody wrote. */
html.tms-mobile .m-cmt .m-lnk{
  float:right;min-height:var(--m-tap);padding:0 4px;border:0;background:none;
  font:inherit;font-size:11.5px;font-weight:650;color:var(--red);cursor:pointer;
}

/* ============== the inherited New Project wizard ==============
   The wizard a phone gets IS the desktop's, full-screened by the blanket rule
   above. Two things about it are wrong at 390px and neither is worth a second
   renderer to fix.

   THE ACTION ROW SCROLLED AWAY. It lives inside `.dbody`, which the rule above
   makes the dialog's one scrolling region — so Continue, Back, Skip and "Open
   the project" left the screen as the pane grew, and on the import step, whose
   pane is a 300px console, they were never on it. Sticking it to the bottom of
   the scroller is the whole fix; the desktop keeps its ordinary flow row. */
html.tms-mobile #np2-foot{
  position:sticky;bottom:0;z-index:2;margin-top:14px!important;
  background:#fff;border-top:1px solid var(--line);
  padding:10px 0 calc(6px + var(--m-safe-b))!important;
}
html.tms-mobile #np2-foot .btn{flex:1;min-height:var(--m-tap);min-width:44%}
html.tms-mobile #np2-foot #np2-status{flex-basis:100%;order:9}
/* The three file rows are a 190px label beside a native picker, which leaves the
   picker 160px of a 390px screen. Stacked, each row is its own decision. */
html.tms-mobile #dlg-newproject .np2-pane label{display:block}
html.tms-mobile #dlg-newproject .np2-pane label > span:first-child{
  display:block!important;width:auto!important;margin-bottom:5px;font-weight:600;
}
html.tms-mobile #dlg-newproject input[type=file]{display:block;width:100%;min-height:var(--m-tap)}
/* The step rail wraps to two lines at 390px rather than being squeezed to
   initials; four steps is the one thing on this screen a reader needs early. */
html.tms-mobile #np2-rail{gap:4px 8px!important;font-size:12px!important}

/* A run in flight, seen from anywhere. The desktop's #workflow-bar follows a run
   across every view; this shell hid #workflow-bar (four labelled pills with a
   meter do not fit 390px) and put nothing in its place, so an hour-long run was
   invisible from every screen except the one that queued it. */
html.tms-mobile #m-topbar .m-runchip{
  flex:none;display:flex;align-items:center;gap:6px;min-height:var(--m-tap);
  padding:0 11px;border:1px solid #cfdcec;border-radius:11px;background:#eef3fa;
  font:inherit;font-size:11.5px;font-weight:700;color:#154c90;cursor:pointer;white-space:nowrap;
}
html.tms-mobile #m-topbar .m-runchip .dot{
  width:7px;height:7px;border-radius:50%;background:var(--blue);flex:none;
  animation:m-runpulse 1.4s ease-in-out infinite;
}
@keyframes m-runpulse{0%,100%{opacity:1}50%{opacity:.25}}
/* A run NOBODY IS HEARING does not pulse. The pulse says "something is
   happening", and this is the one busy state where nothing reaches the page:
   the server running it has not answered for minutes (`run_state` quiet or
   lost, bug-260924-231233). Amber, the colour of the run screen's own warning
   line and the desk card's quiet state. */
html.tms-mobile #m-topbar .m-runchip.unheard{border-color:#e8c98a;background:#fff4e0;color:#8a5200}
html.tms-mobile #m-topbar .m-runchip.unheard .dot{background:#b26a00;animation:none}
@media (prefers-reduced-motion:reduce){
  html.tms-mobile #m-topbar .m-runchip .dot{animation:none}
}

/* IS MY WORK SAFE — the whole screen's answer, in two words.
   Shaped on .m-runchip above rather than invented, because they are the same
   kind of thing: a status that is sometimes a button, in the one strip that is
   on every screen. Two states and no third — a count in amber, or a tick and a
   time in green. The desktop's pill says exactly the same two things from the
   same `TMSViewAudit.saveState()`; only the chrome is this host's.

   THE UNSAVED ONE IS A <button> AND THE SAVED ONE IS A <span>, which is why the
   floor is on both selectors and the cursor on neither: pressing "saved" would
   do nothing, and a control that looks pressable and is not is the dead end this
   phone shell has spent three waves removing. */
html.tms-mobile #m-topbar .m-savepill{
  flex:none;display:flex;align-items:center;gap:6px;min-height:var(--m-tap);
  padding:0 11px;border-radius:11px;border:1px solid transparent;
  font:inherit;font-size:11.5px;font-weight:700;white-space:nowrap;
}
html.tms-mobile #m-topbar button.m-savepill{cursor:pointer}
html.tms-mobile #m-topbar .m-savepill.unsaved{
  border-color:#e8c48a;background:#fdf3e3;color:#8a5a12;
}
html.tms-mobile #m-topbar .m-savepill.unsaved .dot{
  width:7px;height:7px;border-radius:50%;background:var(--amber,#b8791f);flex:none;
}
html.tms-mobile #m-topbar .m-savepill.saved{
  border-color:#bfe0c6;background:#eef7f0;color:#1d6b33;
}
html.tms-mobile #m-topbar .m-savepill[disabled]{opacity:.55}

/* ================== New Project, the four screens ==================
   M8. The flow is view-project.js's; these are the screens the shell draws for
   it. Everything here is a shape the rest of this stylesheet already has — the
   panel, the list row, the thumb bar — reused rather than reinvented, so the
   wizard does not read like a fifth idea of what this app looks like. */

/* The rail. Four numbers and the name of the step you are on, because a reader
   deciding whether to start needs to see that settling the differences is part
   of this rather than a surprise after the upload. Numbers, not the four names:
   at 390px the names are the whole width and the name that matters is the
   current one, which is spelled out at the end of the row. */
html.tms-mobile .m-nprail{
  display:flex;align-items:center;gap:6px;margin:0 0 12px;flex-wrap:wrap;
}
html.tms-mobile .m-nprail span{
  flex:none;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;font-size:11px;font-weight:700;
  border:1px solid var(--line);background:#fff;color:var(--mut);
}
html.tms-mobile .m-nprail span.done{background:#eef4ee;border-color:#c7ddcc;color:#2f6b3d}
html.tms-mobile .m-nprail span.now{background:var(--ink);border-color:var(--ink);color:#fff}
html.tms-mobile .m-nprail .lb{font-size:12px;font-weight:700;color:var(--ink);margin-left:2px}

/* The one status line the flow can write to, in the one place on the screen it
   is looked for. `.off` rather than removing it: the element has to survive a
   repaint so the sink can write into it without one. */
html.tms-mobile .m-npsay{
  margin-top:10px;padding:9px 11px;border-radius:9px;border:1px solid #cfdcec;
  background:#eef3fa;font-size:12.5px;line-height:1.45;color:#154c90;
}
html.tms-mobile .m-npsay.bad{border-color:#e6c6c6;background:#fbeeee;color:#8d2c2c}
html.tms-mobile .m-npsay.off{display:none}

/* A plain text field, at the size everything else on this shell is. */
html.tms-mobile .m-in{
  display:block;width:100%;box-sizing:border-box;min-height:var(--m-tap);
  padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;
  font:inherit;color:var(--ink);
}
html.tms-mobile .m-panel .ct .opt{
  font-weight:600;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);
}
html.tms-mobile .m-nplang{margin-top:9px}
/* The picker draws its own side label now (tms-lang.js), so the phone's `.lb`
   pair — "From" / "Into" — is gone and this is the same rule pointed at the
   shared class. One vocabulary for the two sides, in the owner's words. */
html.tms-mobile .m-nplang .tlp-lbl{
  display:block;font-size:10.5px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--mut);margin-bottom:4px;
}
/* tms-lang.js's own picker, unchanged — it is the language registry's control
   and a second one would be a second registry. Only the desk-width geometry is
   overridden: a 200px select beside a 150px name beside a 120px marker is three
   things on one line at 900px and a horizontal scrollbar at 390px. */
html.tms-mobile .m-nplang .tms-lang-picker{display:flex;flex-wrap:wrap;width:100%}
html.tms-mobile .m-nplang .tlp-sel{
  min-width:0;width:100%;min-height:var(--m-tap);border-radius:9px;padding:6px 10px;
}
html.tms-mobile .m-nplang .tlp-free{width:100%;gap:6px}
html.tms-mobile .m-nplang .tlp-name,
html.tms-mobile .m-nplang .tlp-marker{
  flex:1 1 46%;min-width:0;width:auto;min-height:var(--m-tap);border-radius:9px;
}
html.tms-mobile .m-nplang .tlp-ok,
html.tms-mobile .m-nplang .tlp-cancel{flex:1 1 46%;min-height:var(--m-tap);border-radius:9px}

/* The three files. A row you press, rather than a 190px label beside a native
   picker that gets 160px of a 390px screen — the input is the whole row, and
   what it says is the name of the file once there is one. */
html.tms-mobile .m-npfile{
  position:relative;display:flex;align-items:center;gap:11px;width:100%;
  min-height:56px;padding:10px 12px;border:0;border-bottom:1px solid var(--line);
  background:#fff;text-align:left;cursor:pointer;box-sizing:border-box;
}
html.tms-mobile .m-npfiles .m-npfile:last-child{border-bottom:0}
html.tms-mobile .m-npfile .g{
  flex:none;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;font-size:13px;background:#f1f3f6;color:var(--mut);
}
html.tms-mobile .m-npfile.got .g{background:#e8f5eb;color:#166b31}
html.tms-mobile .m-npfile .b{min-width:0;flex:1}
html.tms-mobile .m-npfile .t{display:block;font-size:13.5px;font-weight:650;color:var(--ink)}
html.tms-mobile .m-npfile .s{
  display:block;font-size:11.5px;color:var(--mut);margin-top:1px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
html.tms-mobile .m-npfile.got .s{color:#2f6b3d;font-weight:600}
/* The input covers the row and is invisible: a <label for> would do the same on
   a desk, but on iOS the native control's own hit area is the only reliable one
   and it is 100x22px in the corner. This makes the row the control. */
html.tms-mobile .m-npfile input[type=file]{
  position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;
}
/* What the chosen combination will produce, said before the button is pressed
   rather than discovered afterwards. view-project.js writes the words. */
html.tms-mobile .m-npmsg{
  margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;
  background:#fbfaf7;font-size:12px;line-height:1.5;color:#4a5260;
}
html.tms-mobile .m-npmsg:empty{display:none}

/* The import, as steps. The desktop prints these into a 300px monospace console
   on #1e1e1e, which is a transcript for whoever wrote the importer. Same lines,
   as a list, at the size the rest of this shell is — the reader waiting on it is
   a translator, and the several minutes it takes are the whole screen. */
html.tms-mobile .m-npsteps{list-style:none;margin:0;padding:0}
html.tms-mobile .m-npsteps li{
  display:flex;gap:9px;align-items:flex-start;padding:7px 0;font-size:13px;
  line-height:1.5;color:var(--ink);border-top:1px solid #f1f0ed;
}
html.tms-mobile .m-npsteps li:first-child{border-top:0}
html.tms-mobile .m-npsteps li .g{flex:none;width:16px;text-align:center;font-size:12px}
html.tms-mobile .m-npsteps li.done{color:var(--mut)}
html.tms-mobile .m-npsteps li.done .g{color:#2f6b3d}
html.tms-mobile .m-npsteps li.now{font-weight:650}
html.tms-mobile .m-npsteps li.now .g{color:var(--blue);animation:m-runpulse 1.4s ease-in-out infinite}
html.tms-mobile .m-npsteps li.bad{color:#8d2c2c}
html.tms-mobile .m-npsteps li.warn{color:#8a5a12}
@media (prefers-reduced-motion:reduce){
  html.tms-mobile .m-npsteps li.now .g{animation:none}
}

/* A difference. Same card the review deck uses, because it is the same shape of
   thing: one item, read, then answered from the bar. */
html.tms-mobile .m-npdiff{overflow:hidden}   /* the rows bleed to the panel edge */
html.tms-mobile .m-npdiff .ct{display:flex;gap:8px;align-items:baseline;justify-content:space-between}
html.tms-mobile .m-npdiff .ct .of{flex:none;font-size:11px;font-weight:600;color:var(--mut)}
html.tms-mobile .m-nplbl{
  margin:8px -13px 0;padding:5px 13px;font-size:10px;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:var(--mut);background:#f7f5f0;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
}
html.tms-mobile .m-nprow{
  margin:0 -13px;padding:8px 13px;font-size:13px;line-height:1.55;color:var(--ink);
  border-bottom:1px solid #f1f0ed;word-break:break-word;
}
html.tms-mobile .m-nprow.big{font-size:14px}
html.tms-mobile .m-nprow.muted,
html.tms-mobile .m-nprow.en{font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-nprow:last-child{border-bottom:0;padding-bottom:2px}

/* ==================================================== ③ DECISIONS AND ROUNDS ===
   #473 on the phone (owner's call, 2026-09-23: full parity). The rules are the
   audit module's (`api().decide`, `api().answers`) and the project module's
   (`route.finishTo`, `rounds`); these are the phone's own boxes for them. The
   diff and the chips inside are the desktop's own markup and classes
   (`.dec-diff`, `.dec-chip`, unscoped in view-audit.css), so a changed sentence
   reads the same on both. */
html.tms-mobile .m-round{margin:10px 12px 4px;padding:11px 12px;border:1px solid #cfdcec;
  border-radius:12px;background:#f3f7fc;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
html.tms-mobile .m-round .m-round-h{flex:1 1 100%;display:flex;gap:8px;align-items:baseline}
html.tms-mobile .m-round .m-round-h b{color:var(--blue);font-size:14px}
html.tms-mobile .m-round .m-round-h span{font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-round .m-note{flex:1 1 100%}
html.tms-mobile .m-round .m-btn{width:auto;flex:1 1 auto;min-width:130px}
html.tms-mobile .m-round .m-phfin{flex:1 1 100%;margin:0;padding:0;border:0;background:none}
html.tms-mobile .m-rounds{margin-top:10px;display:flex;flex-direction:column;gap:7px}
html.tms-mobile .m-rrow{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;
  padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
html.tms-mobile .m-rrow .m-rname{font-weight:700;font-size:13px}
html.tms-mobile .m-rrow .m-rstate{font-size:11px;font-weight:700;padding:1px 8px;border-radius:10px;
  background:#f1f3f6;color:var(--mut)}
html.tms-mobile .m-rrow .m-rstate.s-open{background:#e8f5eb;color:#166b31}
html.tms-mobile .m-rrow .m-rstate.s-done{background:#eaf2fb;color:#1a5fb4}
html.tms-mobile .m-rrow .m-rwho{flex:1 1 100%;font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-rrow .m-btn{width:auto;min-width:96px;margin-left:auto}
html.tms-mobile .m-dec{margin:4px 0 10px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
html.tms-mobile .m-decset{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:13px;margin-bottom:6px}
html.tms-mobile .m-decset span{font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-decset .m-btn{width:auto;min-width:96px;margin-left:auto}
html.tms-mobile .m-decset.is-changed b,html.tms-mobile .m-decset.is-pending b{color:#8a5a00}
html.tms-mobile .m-decbtns{display:flex;gap:8px;margin:8px 0 6px}
html.tms-mobile .m-decbtns .m-btn{flex:1;width:auto}
html.tms-mobile .m-dechint.warn{color:#8a5a00}
html.tms-mobile .m-decnext{margin-top:8px}
html.tms-mobile .m-decprior{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
html.tms-mobile .m-prow{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fcfcfb;font-size:13px}
html.tms-mobile .m-prow .dec-meta{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:6px;font-size:11.5px;color:var(--mut)}
html.tms-mobile .m-fres .m-fans{flex:1 1 100%;font-size:12.5px;align-self:center}
html.tms-mobile .m-gate{flex:1 1 100%;text-align:center;margin-top:6px}
html.tms-mobile .m-opt.soft b{font-weight:500 !important}

/* ================= Translate ▸ Corpus Builder, on a phone =================
   The desk's own seven-step walk, mounted into builderScreen's slot by
   `TMSViewCorpusBuild.mount` (2026-09-24, at the owner's request). Every rule
   the walk carries stays in view-corpusbuild.js; what is wrong at 390px is only
   SHAPE, and restyling is a stylesheet's job — the same line the run screen's
   borrowed dials draw above. MEASURED before these rules, by
   mobile_corpus_builder.cjs: the memory list pushed each Remove to x=374-439
   inside a sideways-scrolling table, the rail wrapped to three sticky rows
   (~110px of a 844px screen), and 38 controls were under the 44px floor — the
   rail's beats at 31, Remove at 21, the glossary ticks at 13. */
html.tms-mobile #m-cbi-slot #cbi-page{padding:12px 12px 28px!important}
/* ONE ROW that scrolls sideways within itself, still sticky: an overview that
   costs a third of the screen is not an overview. */
html.tms-mobile #m-cbi-slot .cbi-rail{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
html.tms-mobile #m-cbi-slot .cbi-rail::-webkit-scrollbar{display:none}
html.tms-mobile #m-cbi-slot .cbi-beat,
html.tms-mobile #m-cbi-slot .cbi-beat-sep{flex:none}
/* The floor, for everything a finger presses. The fields also take the full
   width: they carry `min-width:260px`/`240px` inline, built for a 900px page. */
html.tms-mobile #m-cbi-slot button,
html.tms-mobile #m-cbi-slot select,
html.tms-mobile #m-cbi-slot input:not([type=checkbox]):not([type=radio]),
html.tms-mobile #m-cbi-slot summary{min-height:var(--m-tap)}
html.tms-mobile #m-cbi-slot select,
html.tms-mobile #m-cbi-slot input:not([type=checkbox]):not([type=radio]):not([type=file]){
  width:100%;min-width:0!important;box-sizing:border-box;
}
html.tms-mobile #m-cbi-slot summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
/* A tick box is pressed through its label: the glossary's options are block
   labels, and each glossary row's box is wrapped in `.gl-hit` for this. */
html.tms-mobile #m-cbi-slot label:has(> input[type=checkbox]){
  display:flex!important;align-items:center;gap:10px;min-height:var(--m-tap);
}
html.tms-mobile #m-cbi-slot input[type=checkbox]{width:22px;height:22px;flex:none;margin:0}
html.tms-mobile #m-cbi-slot .gl-hit{justify-content:center;min-width:var(--m-tap)}
/* THE MEMORY LIST, one card per memory: the name, then its size and what the
   scan found, then a full-height Remove — rather than four columns in 366px. */
html.tms-mobile #m-cbi-slot [data-step="2"] table,
html.tms-mobile #m-cbi-slot [data-step="2"] tbody,
html.tms-mobile #m-cbi-slot [data-step="2"] tr{display:block;width:auto}
html.tms-mobile #m-cbi-slot [data-step="2"] tr{padding:8px 0;border-top:1px solid var(--line)}
html.tms-mobile #m-cbi-slot [data-step="2"] td{
  display:inline-block;padding:2px 12px 2px 0!important;white-space:normal!important;vertical-align:middle;
}
html.tms-mobile #m-cbi-slot [data-step="2"] td:first-child{display:block;font-weight:600;overflow-wrap:anywhere}
/* THE BUILD CARD'S SIX AI STAGES, on any phone surface that draws the card —
   the builder's step 5 and Phase ①'s Build settings sheet are one generator
   (`TMSViewProject.corpusSetup`). Each row is a stage name held on one line
   beside two selects: MEASURED at 371px in the builder (x=29-400, past a 390px
   screen) and 16-387 in the sheet, which fits by three pixels of padding. So the
   name takes its own line and the two selects share the next, whatever the
   padding or the length of a stage's name. */
html.tms-mobile [data-cbdial="stages"] table,
html.tms-mobile [data-cbdial="stages"] tbody{display:block}
html.tms-mobile [data-cbdial="stages"] tr{display:flex;flex-wrap:wrap;gap:6px;padding:6px 0}
html.tms-mobile [data-cbdial="stages"] td{display:block;padding:0!important}
html.tms-mobile [data-cbdial="stages"] td:first-child{flex:1 1 100%;white-space:normal!important}
/* The model and effort selects share a line; a stage's own extra control (the
   gate's batch, the slate's cap, triage's "use AI", verify's "run") takes the
   next one. Squeezed onto the same line they cut both selects to "Server d". */
html.tms-mobile [data-cbdial="stages"] td:nth-child(2),
html.tms-mobile [data-cbdial="stages"] td:nth-child(3){flex:1 1 calc(50% - 3px);min-width:0}
html.tms-mobile [data-cbdial="stages"] td:nth-child(n+4){flex:1 1 100%;display:flex;align-items:center;gap:8px}
html.tms-mobile [data-cbdial="stages"] td select{width:100%;min-width:0}
/* "NOT YOUR TURN YET" on ①②③ — the desk's lockPanelHtml line, above the
   screen's own panel. A tinted note rather than a warning: it refuses nothing. */
html.tms-mobile .m-turn{margin:0 0 10px;padding:10px 12px;border:1px solid var(--line);
  border-radius:10px;background:var(--panel, #f7f6f2)}
html.tms-mobile .m-turn .m-btn{margin:0}
/* ②'s "Label a missed quote": a disclosure, as on the desk, and the verse the
   lookup returns set as a quotation the reader can compare against. */
html.tms-mobile .m-scmissed{margin-top:10px;border:1px solid var(--line);border-radius:8px;padding:8px 10px}
html.tms-mobile .m-scmissed summary{cursor:pointer;font-size:13px}
html.tms-mobile .m-scmissed input{width:100%;box-sizing:border-box}
html.tms-mobile .m-verse{margin-top:8px;padding:8px;border:1px solid var(--line);border-radius:6px;
  font-size:14px;line-height:1.5;overflow-wrap:anywhere}
/* ①'s terms sheet: one term per block — the tick and the term on a line, the
   rendering full width under it, the example below that. A table's four columns
   are the desk's shape and do not fit 390px. */
html.tms-mobile .m-dterms{display:flex;flex-direction:column;gap:10px}
html.tms-mobile .m-dterm{border-top:1px solid var(--line);padding-top:8px}
html.tms-mobile .m-dterm .h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:32px}
html.tms-mobile .m-dterm .h input{width:20px;height:20px}
html.tms-mobile .m-dterm .m-in{width:100%;box-sizing:border-box;margin:6px 0 4px}
html.tms-mobile .m-dterm .s{font-size:11px;overflow-wrap:anywhere}
html.tms-mobile .m-langpair{color:var(--mut)}
/* FINALIZE ▸ SUBTITLES ON THE PHONE. The desk's own section, moved into the
   shell's slot (TMSViewSubtitles.mount), so view-subtitles.css applies as
   written — including its own ≤900px rule, which already stacks the issues
   under the cues. These are only what a 390px column adds: the section in the
   page's flow rather than a view the shell hides, one column for the setup
   cards, and each cue as three lines (time and flag, English, target) where the
   desk draws four columns. */
html.tms-mobile #m-sub-slot > #view-subtitles{display:flex;flex-direction:column;overflow:visible;min-height:0}
html.tms-mobile #view-subtitles.sv-hosted .sv-top{padding:8px 12px}
html.tms-mobile #view-subtitles.sv-hosted .sv-setup{grid-template-columns:minmax(0,1fr);padding:12px}
html.tms-mobile #view-subtitles.sv-hosted .sv-kv{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
html.tms-mobile #view-subtitles.sv-hosted .sv-ghead{display:none}
html.tms-mobile #view-subtitles.sv-hosted .sv-row{grid-template-columns:minmax(0,1fr) 34px}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tc{grid-column:1;grid-row:1;border-right:0;padding-bottom:0}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tc br{display:none}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tc .te::before{content:" \2192  "}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tc .cps{margin-left:6px}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tc b{display:inline;margin-right:8px}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .flag{grid-column:2;grid-row:1}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .en{grid-column:1 / span 2;border-right:0;padding-bottom:2px}
html.tms-mobile #view-subtitles.sv-hosted .sv-row > .tl{grid-column:1 / span 2;padding-top:2px}
html.tms-mobile #view-subtitles.sv-hosted .sv-side{max-height:none}
html.tms-mobile #view-subtitles.sv-hosted .sv-ilist{max-height:none}
html.tms-mobile #view-subtitles.sv-hosted .btn,
html.tms-mobile #view-subtitles.sv-hosted .sv-seg button,
html.tms-mobile #view-subtitles.sv-hosted .sv-it{min-height:var(--m-tap)}

/* The engine's notes on a finding (view-mobile.js `noteHtml`): the Bible note
   in the desk's blue (`.f-scripture-note`), the inherited-from-the-English note
   in its amber (`.bt-parity`). Both card shells, like the rows above. */
html.tms-mobile .m-card .m-fnote,
html.tms-mobile .m-f .bd .m-fnote{
  font-size:12px;line-height:1.45;border-radius:8px;padding:6px 9px;margin:8px 0;
}
html.tms-mobile .m-card .m-fnote-bible,
html.tms-mobile .m-f .bd .m-fnote-bible{color:#1f4a63;background:#eef6fb;border:1px solid #c9e1ee}
html.tms-mobile .m-card .m-fnote-parity,
html.tms-mobile .m-f .bd .m-fnote-parity{color:#634d1f;background:#fdf8ec;border:1px solid #f1e4bd}

/* ================== PROJECT ▸ SUPER PROJECTS ON THE PHONE ==================
   The desk's own section, moved into superScreen's slot (TMSViewSuper.mount,
   2026-10-11), so every rule and every control is view-super.js's. What a 390px
   column changes is SHAPE: the desk's grid is seven columns and 980px wide, so
   each row becomes a card — the course line with its controls, then one block
   per phase naming who works it, with its button. The phase name is the cell's
   own `data-label`, drawn before it, because the column headings are gone. */
html.tms-mobile #m-super-slot > #view-super{display:block;overflow:visible;min-height:0}
/* One column no wider than the phone: the grid's auto column would otherwise
   take the width of the widest thing in it. */
html.tms-mobile #view-super.sp-hosted .sp-wrap{padding:12px 12px 28px;gap:10px;max-width:none;grid-template-columns:minmax(0,1fr)}
html.tms-mobile #view-super.sp-hosted h2{font-size:18px;margin:0}
html.tms-mobile #view-super.sp-hosted .sp-head{gap:6px}
html.tms-mobile #view-super.sp-hosted .sp-head h2{flex:1 1 100%;order:2;overflow-wrap:anywhere}
html.tms-mobile #view-super.sp-hosted #sp-back{order:1}
html.tms-mobile #view-super.sp-hosted #sp-rename,
html.tms-mobile #view-super.sp-hosted #sp-delete{order:3}
html.tms-mobile #view-super.sp-hosted .sp-bar{gap:8px}
html.tms-mobile #view-super.sp-hosted .sp-bar > .btn{flex:1 1 100%}
html.tms-mobile #view-super.sp-hosted .sp-corpus{margin-left:0;flex:1 1 100%;overflow-wrap:anywhere}
html.tms-mobile #view-super.sp-hosted .sp-phone-note{flex:1 1 100%;margin:0;font-size:12px}
html.tms-mobile #view-super.sp-hosted .sp-new input{min-width:0;flex:1 1 100%;box-sizing:border-box;font-size:16px}
html.tms-mobile #view-super.sp-hosted #sp-new{flex:1 1 auto}
html.tms-mobile #view-super.sp-hosted #sp-filter{max-width:none;flex:1 1 100%;font-size:16px;box-sizing:border-box}
html.tms-mobile #view-super.sp-hosted .sp-filterbar .btn{flex:1 1 0}
html.tms-mobile #view-super.sp-hosted .btn{min-height:var(--m-tap)}
html.tms-mobile #view-super.sp-hosted input[type=text],
html.tms-mobile #view-super.sp-hosted input[type=search]{min-height:var(--m-tap)}
/* The two tables: no sideways scroll, no fixed width. */
html.tms-mobile #view-super.sp-hosted .sp-scroll{overflow-x:visible}
html.tms-mobile #view-super.sp-hosted .sp-tbl,
html.tms-mobile #view-super.sp-hosted .sp-list{min-width:0;width:100%}
html.tms-mobile #view-super.sp-hosted .sp-tbl thead,
html.tms-mobile #view-super.sp-hosted .sp-list thead{display:none}
html.tms-mobile #view-super.sp-hosted .sp-tbl,
html.tms-mobile #view-super.sp-hosted .sp-tbl tbody,
html.tms-mobile #view-super.sp-hosted .sp-list,
html.tms-mobile #view-super.sp-hosted .sp-list tbody{display:block}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr,
html.tms-mobile #view-super.sp-hosted .sp-list tr{
  display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;
  border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin:0 0 8px;background:#fcfcfb;
}
html.tms-mobile #view-super.sp-hosted .sp-tbl td,
html.tms-mobile #view-super.sp-hosted .sp-list td{display:block;border:0;padding:0;background:none!important;min-width:0;white-space:normal}
/* The list of Super Projects: name, then the counts, then Open. */
html.tms-mobile #view-super.sp-hosted .sp-list td:first-child{flex:1 1 100%;font-size:15px}
html.tms-mobile #view-super.sp-hosted .sp-list td:nth-child(2)::after{content:" projects"}
html.tms-mobile #view-super.sp-hosted .sp-list td:nth-child(3)::before{content:"· Shared corpus: ";color:var(--mut)}
html.tms-mobile #view-super.sp-hosted .sp-list td:last-child{margin-left:auto}
/* The grid's rows. The course line and "Every project" lead with their title
   cell across the card; a document leads with lesson, document and read-in. */
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-course{background:var(--panel);border-width:2px}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-all{background:#eef4fc}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-course > td:first-child,
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-all > td:first-child{flex:1 1 100%;line-height:2.2}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-course > td:first-child .btn{margin:2px 0}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-course .sp-fold{min-width:var(--m-tap)}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr.sp-course [data-move-course]{min-width:var(--m-tap)}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr[data-pid] > td:nth-child(-n+2){font-weight:650}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr[data-pid] > td:nth-child(2) a{display:inline-flex;align-items:center;min-height:var(--m-tap)}
html.tms-mobile #view-super.sp-hosted .sp-tbl tr[data-pid] > td:nth-child(3){flex:1 1 100%}
html.tms-mobile #view-super.sp-hosted .sp-why{max-width:none}
/* One block per phase: its name, who works it, and its button on one line. */
html.tms-mobile #view-super.sp-hosted .sp-tbl td.sp-ph{
  flex:1 1 100%;display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding-top:6px;min-width:0;
}
html.tms-mobile #view-super.sp-hosted .sp-tbl td.sp-ph::before{
  content:attr(data-label);flex:0 0 7.5em;font-size:11.5px;font-weight:650;color:var(--mut);
}
html.tms-mobile #view-super.sp-hosted .sp-tbl td.sp-ph span{flex:1 1 auto;min-width:0;margin:0;overflow-wrap:anywhere}
html.tms-mobile #view-super.sp-hosted .sp-tbl td.sp-ph .btn{flex:none}
html.tms-mobile #view-super.sp-hosted .sp-tbl td[colspan]:only-child{flex:1 1 100%}
html.tms-mobile #view-super.sp-hosted .sp-log-lines,
html.tms-mobile #view-super.sp-hosted .sp-check-list{max-height:none}
/* The two pickers are <dialog>s inside the section: full screen, like every
   other dialog on the phone, with the tick boxes at a finger's size. */
html.tms-mobile .sp-pick[open]{display:flex;flex-direction:column}
html.tms-mobile .sp-pick-list{max-height:none;flex:1;min-height:0}
html.tms-mobile .sp-pick-row{min-height:var(--m-tap)}
html.tms-mobile .sp-pick-row input{width:22px;height:22px;margin:0}
html.tms-mobile .sp-pick-foot .btn{min-height:var(--m-tap)}
html.tms-mobile .sp-cpick-name{min-height:var(--m-tap);font-size:16px}
html.tms-mobile[data-theme="dark"] #view-super.sp-hosted .sp-tbl tr.sp-all{background:rgba(26,95,180,.18)}
