/* ============================================================================
   THE TABLET TIER — html.tms-tablet
   ============================================================================

   WHAT THIS FILE IS NOT. It is not a second mobile shell. Above 760px the
   desktop's own arrangement fits: an iPad in portrait gives #docview 784px,
   which is enough for a document and a sheet, and the settings window opens at
   707px with its rail beside it. view-mobile.js's opening comment is right that
   a responsive rewrite of the desktop is the wrong answer, and this file does
   not attempt one.

   WHAT IT IS. Everywhere the desktop assumes a POINTER is driving it. That
   assumption is not in one place, it is in every place, and it was measured
   rather than guessed. At 820x1180 with a coarse pointer, before this file:

     Project Management     50 of 50 visible controls under the 44px floor
     The corpus editor      37 of 41
     The document           49 of 51
     Every dialog           100% of form controls under 16px type
     The Bible catalogue    40 rows of 28px, packed edge to edge, 13px boxes
     The phase spine        4 pills of 28px — the surface's only navigation

   THE SCOPE. `html.tms-tablet` is set by view-mobile.js on
   `(min-width:761px) and (pointer:coarse)`. Read its TABLET_Q comment for why
   the pointer is in the predicate and the width has no upper bound. Nothing
   here is a media query, so nothing here can reach a mouse — which is the whole
   reason the class exists rather than the `@media (pointer:coarse)` block that
   assets/mobile.css already carries.

   WHY NOT JUST WIDEN mobile.css's SCOPE. The two look like the same rules and
   are not. The phone's are about 390px: a control is full width because there
   is no room for two. The tablet's are about a finger: a control is 44px
   because a fingertip is 44px, and it keeps the width the desktop gave it.
   Sharing the selectors would have meant every later phone change reasoning
   about a host it cannot see. mobile.css is untouched by this file.

   ORDER. Linked after mobile.css, so on the impossible day both classes are set
   the tablet wins — but syncTablet() will not let that day arrive.

   ---------------------------------------------------------------------------
   THREE KINDS OF RULE, AND THE KIND DECIDES WHERE IT LIVES. Written down because
   the failure mode of a tier like this is that the three blur into one within a
   dozen commits, and then nobody can say what the class means any more.

     DEVICE   A fingertip is 44px. iOS zooms under 16px. A window-drag has no
              referent. True of the INPUT, at any size. → html.tms-tablet, in
              this file, never a media query.

     GESTURE  This particular contact was a finger, or a pen, or a mouse. True of
              one EVENT and nothing else. → read from event.pointerType at the
              handler. Lives in the JS, reaches every host, costs no pixels.

     FIT      This container is narrower than the layout inside it. True of a
              BOX, whatever is driving it. → [data-w] / [data-h] written by a
              ResizeObserver on the surface's own host. May not contain a finger
              assumption: no 44px, no 16px, no chrome removal.

   THE TEST OF WHICH KIND A RULE IS: would it be right on a mouse-driven desktop
   whose window happens to be exactly this narrow? Yes → it is FIT and does not
   belong in this file. No → it is DEVICE and does.

   That test is why the tablet keeps the desktop's arrangement and only changes
   what a finger needs, and it is also the honest answer to the hybrid: a
   trackpad-driven touchscreen laptop gets every FIT rule (because its box really
   is narrow) and every GESTURE guard (because its contacts really are a mouse),
   and none of this file. `any-pointer:coarse` is rejected for exactly that
   reason — it would put a 44px floor and a 16px type floor on a machine being
   driven by a trackpad.
   ========================================================================= */

/* On the class, not on :root. A custom property declared on a bare :root is a
   declaration this file makes about every host including the desktop — harmless
   in effect, since only scoped rules read it, but the header above promises
   nothing here can reach a mouse and that promise should be literally true. */
html.tms-tablet{
  /* Apple's own minimum, and the one the phone shell already uses as --m-tap.
     Named separately because these two hosts must be free to move apart. */
  --t-tap:44px;
}

/* ======================= 1 · the touch floor =======================
   Every control the app draws, raised to a fingertip. A LIST rather than a
   blanket `*`: an <a> inside a paragraph is a control by the census's
   definition and giving it 44px of line-height would tear prose apart. What is
   here is the app's actual control vocabulary, read off app.html and the view
   modules.

   min-height, never height: several of these wrap to two lines at 768px, and a
   fixed height would clip the second one. */
html.tms-tablet button,
html.tms-tablet .btn,
html.tms-tablet .btn.sm,
html.tms-tablet .bigbtn,
html.tms-tablet .menu-top,
html.tms-tablet #menubar .menu-panel button,
html.tms-tablet .nav-btn,
html.tms-tablet #setwin-nav .nav-btn,
html.tms-tablet .setwin-nav button,
html.tms-tablet .menu-panel button,
html.tms-tablet .term-item,
html.tms-tablet .vt,
html.tms-tablet .f-resolve,
html.tms-tablet .f-changeres,
html.tms-tablet .wf-step,
/* §6.4's rail. A beat is a button a finger presses, and this file's own rule
   is NAMED CLASSES ONLY — a bare `button` selector once turned the corpus
   editor's list into a column of centred boxes — so a new named control has to
   be added here or it silently keeps the desk's 32px. */
html.tms-tablet .cbi-beat,
html.tms-tablet #ed-nav button,
html.tms-tablet #ew-nav button,
html.tms-tablet select,
html.tms-tablet input:not([type=checkbox]):not([type=radio]),
html.tms-tablet textarea,
html.tms-tablet summary{
  min-height:var(--t-tap);
}
/* Centred, because min-height without alignment leaves the label at the top
   edge of a box that is now half as tall again.

   NAMED CLASSES ONLY here, never a bare `button`. Half this app's lists are
   built from buttons — the corpus term list, the projects list, the settings
   rail — and `.term-item` is `display:block;width:100%;text-align:left` for a
   reason. The first cut of this file put `display:inline-flex;
   justify-content:center` on `button` and turned the corpus editor's only
   navigation into a column of centred boxes. The floor above still reaches
   them, because min-height is not a layout change. */
html.tms-tablet .btn,
html.tms-tablet .btn.sm,
html.tms-tablet .bigbtn,
html.tms-tablet .menu-top,
html.tms-tablet .vt,
html.tms-tablet .wf-step,
html.tms-tablet .cbi-beat,
html.tms-tablet .f-resolve{
  display:inline-flex;align-items:center;justify-content:center;
}
/* …except the settings rail, which is a LIST: its labels are left-aligned and
   centring them would turn a menu into a stack of titles.

   The MENU items are deliberately not here. §9 gives them `display:block`,
   because `.mtag` is float:right and a flex container ignores float — which is
   how "shared server" and "installed app" came to be mislaid on every tablet by
   the first cut of this file. */
html.tms-tablet .nav-btn,
html.tms-tablet #setwin-nav .nav-btn,
html.tms-tablet .setwin-nav button{
  display:flex;align-items:center;justify-content:flex-start;
}

/* A CHECKBOX IS 13x13, AND IT IS THE CONTROL. The eight Organization settings,
   the two Review Feedback consent boxes that start and stop storing a
   colleague's document text, the forty Bible catalogue picks, and every
   translator assignment in Project Management are all a 13px box with no
   <label> wrapping the words beside it — so the box is the only target there
   is. Scaling the control itself is the only fix that does not need markup.

   `!important`, and it is not laziness: `.set-row .ctl input[type=checkbox]` in
   tms.css:576 pins 16x16 at a higher specificity than any class-scoped selector
   this file can write without naming every host pane, and it is the rule that
   dresses nine of them — Finalize's milestone box, Git Sync's eight sync
   toggles. Measured after the first cut of this file: nine checkboxes were
   still 16x16 while every other one in the app had grown. */
html.tms-tablet input[type=checkbox],
html.tms-tablet input[type=radio]{
  width:24px!important;height:24px!important;flex:none;
}
/* …AND WHERE A <label> DOES WRAP THE BOX, THAT IS THE TARGET, at the full 44.
   The rule above says "the box is the only target there is", and for the Bible
   catalogue and the Organization settings that is true. It is not true
   everywhere: #doc-sync sits in <label id="sync-wrap">, #sc-recover in a label
   of its own, #fin-milestone in one wrapping a whole sentence — and clicking a
   label toggles the control it wraps, so those three were 24px targets with a
   44px target available for free. Wave E found them measuring 24x24.

   `align-items` AND NOT `display:flex`, deliberately. §1's own rule is that
   min-height is not a layout change and centring is, which is why centring
   there is named-classes-only. `align-items` on a label that is not already a
   flex container does nothing at all, so this reaches the two that are
   (sync-wrap, fin-milestone) and leaves the rest exactly as they were.

   THE TREE'S FIRST `:has()`, and it costs no browser: app.html carries 17
   <dialog> elements and 37 showModal() calls, whose Safari floor is 15.4 — the
   same release that shipped :has(). The alternative was naming these labels one
   by one, which is exactly what wave E is a correction of: of the ten ids its
   own task named, four no longer exist anywhere in the tree.

   developer/tests/e2e/tablet_touch_floor.cjs measures this, and measures the
   24px floor above separately, so the compromise is asserted rather than merely
   written down. */
html.tms-tablet label:has(> input[type=checkbox]),
html.tms-tablet label:has(> input[type=radio]){
  min-height:var(--t-tap);align-items:center;
}
/* A file input's button is the OS's and cannot be styled; what can be given
   room is the row it sits in. */
html.tms-tablet input[type=file]{min-height:var(--t-tap);padding:8px 0}

/* The ✕ that closes a dialog measured 13 x 22px — the only exit from the
   settings window and from Project Management, both of which are modal. */
html.tms-tablet dialog .dhead .x{
  min-width:var(--t-tap);min-height:var(--t-tap);
  display:inline-flex;align-items:center;justify-content:center;
  margin:-10px -6px -10px 0;font-size:19px;border-radius:8px;
}
/* It is a <span>, so none of the button rules below reach it — and it is the
   only exit from a modal on a device with no Escape key, which makes it the one
   control in the app that most needs to say it was pressed. */
html.tms-tablet dialog .dhead .x:active{background:rgba(20,28,42,.12)}

/* A GLYPH BUTTON IS AS WIDE AS IT IS TALL — the half of the floor a min-height
   list cannot reach. §1 gives every `button` 44px of HEIGHT and nothing gives
   any of them WIDTH, which is invisible on a labelled button (its text sets the
   width) and decisive on one whose whole content is a single arrow. The
   Inspector's segment walk measured 32x44 for ◀ ▶ and 38x44 for ⏪ ⏩: a
   control tall enough for a finger that a finger still misses sideways.

   The dialog ✕ above is the precedent for both the min-width and the
   inline-flex centring, and for the same reason — a glyph in a box that is now
   wider than its text needs somewhere to sit.

   NAMED, per this file's rule, and `#ew-nav` alone. `#ed-nav button` sits in
   §1's list beside it and is DEAD: tms.css:420-424 still styles it, this file
   still names it, and no markup anywhere — app.html or any view module —
   creates it. Left alone rather than swept up here, because removing a dead
   selector is not what wave E is, and a stale rule that matches nothing costs a
   reader a grep rather than a reviewer a mis-hit. */
html.tms-tablet #ew-nav button{
  min-width:var(--t-tap);
  display:inline-flex;align-items:center;justify-content:center;
}

/* ======================= 2 · the type floor =======================
   iOS Safari zooms the viewport when a control under 16px takes focus, and does
   not zoom back. Every form control on every tablet surface measured under it —
   12px on the New Project title, 12px on the Bible catalogue's language filter,
   13.3px on every checkbox.

   `!important` for the reason mobile.css records at its own copy of this rule:
   the desktop tree carries `style="font:inherit"` inline on 23 form controls,
   and an inline shorthand beats any selector without it. */
html.tms-tablet input,
html.tms-tablet select,
html.tms-tablet textarea{font-size:16px!important}

/* ======================= 3 · wide tables scroll in a box =======================
   Four admin panes put a table wider than the pane inside it, and the pane's
   overflow is visible — so the table pushes the dialog sideways instead of
   scrolling within it, and the right-hand columns are unreachable rather than
   merely off screen. The phone containerises table.tms-tbl and .usage-tbl; the
   tablet has more tables than those two selectors know about, so it wraps the
   PANE, which is the one ancestor every one of them shares.

   THE CONTAINER SCROLLS, NOT THE TABLE. The first cut of this file did what the
   phone does — `display:block` on the table with `display:table` put back on
   thead and tbody — and that is safe at 390px where the phone's tables are two
   or three columns. It is not safe here: it makes the head and the body two
   INDEPENDENT tables, so their columns size themselves separately and the
   header stops standing over its own data. The admin users table is nine
   columns and 1395px wide; a header off by one column there is worse than a
   table that has to be pushed sideways.

   So the box around it scrolls and the table stays a table. Every wide thing in
   this app sits in one of three: a settings pane, a settings row's control
   cell, or a project card. */
html.tms-tablet .setwin-pane,
html.tms-tablet .set-row .ctl,
html.tms-tablet #view-project .card{
  max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;
}
/* A scroll container clips what overflows it vertically too, and these three
   hold nothing that needs to escape upward — no menus, no sticky heads. Stated
   so the next person does not have to re-derive that it was checked. */

/* ======================= 4 · label above control =======================
   .set-row is a 230px label column beside its control. At 707px — the settings
   window's width on a portrait iPad — that is a third of the pane spent on the
   word "Detail level", and it is why the dropdown beside it renders as
   "Info — normal activ⌄". The phone stacks it; a tablet needs the same and for
   the same reason, which is the column width rather than the screen width. */
html.tms-tablet .set-row{flex-direction:column;gap:6px}
html.tms-tablet .set-row .lbl{flex:none;width:100%;padding-top:0}
html.tms-tablet .set-row .ctl input[type=text],
html.tms-tablet .set-row .ctl input[type=number],
html.tms-tablet .set-row .ctl input[type=email],
html.tms-tablet .set-row .ctl input[type=password],
html.tms-tablet .set-row .ctl select{max-width:none}

/* ======================= 5 · a pressed state =======================
   The app has never had one. `:active` appears three times in the whole tree
   and all three are on the bug-report button. On a desk that is survivable —
   the cursor is a pointer, hover tints the control under it, and a click that
   missed is obvious. Under a fingertip there is no cursor and no hover, the
   finger covers the control it is pressing, and the only evidence a tap landed
   is what happens afterwards. On a slow request that is nothing at all, which
   is what produces the double tap that fires an action twice.

   Deliberately cheap: a tint and a hair of scale, no transition on the way in,
   so it appears on contact rather than easing in after it. */
html.tms-tablet button:active,
html.tms-tablet .btn:active,
html.tms-tablet .bigbtn:active,
html.tms-tablet .menu-top:active,
html.tms-tablet #menubar .menu-panel button:active:not(:disabled),
html.tms-tablet .nav-btn:active,
html.tms-tablet .vt:active,
html.tms-tablet .wf-step:active,
html.tms-tablet summary:active{
  filter:brightness(.93);
}
/* brightness() on a transparent background changes nothing, and the menubar,
   the settings rail and every ghost button in this app are transparent. They
   need a tint of their own or the press is still silent on exactly the controls
   that are hardest to hit. */
html.tms-tablet .menu-top:active,
html.tms-tablet #menubar .menu-panel button:active:not(:disabled),
html.tms-tablet .nav-btn:active,
html.tms-tablet #setwin-nav .nav-btn:active,
html.tms-tablet .setwin-nav button:active,
html.tms-tablet .term-item:active,
html.tms-tablet .vt:active,
html.tms-tablet .wf-step:active,
html.tms-tablet summary:active{
  background:rgba(20,28,42,.10);
}
html.tms-tablet button:active,
html.tms-tablet .btn:active,
html.tms-tablet .bigbtn:active{transform:scale(.985)}
@media (prefers-reduced-motion:reduce){
  html.tms-tablet button:active,
  html.tms-tablet .btn:active,
  html.tms-tablet .bigbtn:active{transform:none}
}
/* The tap highlight iOS paints by default is a grey block the size of the
   element's border box, which on a 44px control now covers the label. Cleared
   ONLY on the controls the rules above replace it for: cleared document-wide it
   would take the one piece of feedback the app has from every control this file
   does not name — a link in prose, a native summary marker, anything a view
   module renders with a class nobody here has read. Removing feedback is not
   the same as replacing it. */
html.tms-tablet button,
html.tms-tablet .btn,
html.tms-tablet .bigbtn,
html.tms-tablet .menu-top,
html.tms-tablet #menubar .menu-panel button,
html.tms-tablet .nav-btn,
html.tms-tablet #setwin-nav .nav-btn,
html.tms-tablet .setwin-nav button,
html.tms-tablet .term-item,
html.tms-tablet .vt,
html.tms-tablet .wf-step,
html.tms-tablet summary,
html.tms-tablet dialog .dhead .x{-webkit-tap-highlight-color:transparent}

/* ======================= 6 · dialog chrome a finger cannot use =======================
   The drag itself is disarmed in tms-shell.js, per gesture rather than per
   device, so a touchscreen laptop keeps it for its mouse. What is left here is
   the chrome that ADVERTISED it: a move cursor over a header that no longer
   drags, and the native resize grip — a second window gesture with no undo,
   sitting under the corner a thumb rests on.

   THE MINIMIZE BUTTON IS HIDDEN, and it is worth saying why it stays hidden now
   that these dialogs are windows rather than walls. Minimizing collapses a
   window to its title bar, which on a desk reveals the application underneath.
   It does not here: the backdrop stays up for as long as the window is open, so
   a tablet reader trades a full-width window for a title bar centred over the
   same dim, with no drag to move it anywhere and nothing new revealed. The
   control that actually gets them back to the rest of the app is the menubar,
   which is above the backdrop on every host now — and on this one it is also
   44px with every destination explaining itself. */
/* From the retired `(pointer:coarse) and (min-width:761px)` block in
   mobile.css: a dialog that is taller than the screen has its own header off the
   top, and the header is where the close control lives. */
html.tms-tablet dialog.dlg-chrome{max-height:96dvh}
html.tms-tablet dialog .dhead{cursor:default}
html.tms-tablet dialog .dlg-minbtn{display:none}
html.tms-tablet dialog.dlg-chrome{resize:none}

/* ======================= 9 · the menubar IS the tablet's navigation =======================
   The study proposed replacing it with a left rail drawn from the phone's NAV
   table. That is rejected, and the reason is arithmetic: a 76px rail costs 76px
   of WIDTH on every surface at every viewport to buy back 53-74px of height
   once, and the width comes out of the corpus editor's term column — 438px to
   362 on an iPad Air in landscape — which is the pane a reviewer actually works
   in. It would also make the phone's NAV table a second source of truth for
   navigation, and NAV is itself a hand-kept copy of this menubar.

   So the menubar stays and becomes what it already nearly is. Two things were
   wrong with it on a tablet and both are here.

   (a) IT WRAPPED TO TWO ROWS. 73.7px at 768 and 820, which pushed the severity
   chips — the app's only global reading of how much work is open — onto a second
   row, and spent a third of the vertical budget of a surface that has none to
   spare. All three declarations below are load-bearing: `nowrap` alone pushes
   the bar past the viewport, so something must be allowed to give, and it must
   not be `.menu-root` — the four menu names are the navigation. `min-width:0` is
   what lets `#whoami` be the thing that ellipsises, and it is the guard for a
   localized build whose menu names are longer than these. */
html.tms-tablet #menubar{flex-wrap:nowrap}
html.tms-tablet #menubar .menu-root{flex:none;min-width:0}
/* NOTHING NEEDS TO GIVE ANY MORE, AND THAT IS A MEASUREMENT RATHER THAN A TIDY-UP.
   A `#whoami{min-width:0;…ellipsis}` rule stood here, and the note above still
   explains why: `nowrap` needs something elastic or the bar runs off a 768px
   viewport, and the display name was the elastic thing. §6.1 moved that label
   inside the avatar's panel, so the subject went with it.

   A substitute was written first — the same declarations aimed at `#progressbar`
   — and watching the guard fail is what stopped it shipping: removing it changed
   nothing, at any width, because `#progressbar` IS EMPTY IN THIS HOST. The only
   code that fills it is `user/tms.html:6145`; nothing under `assets/` writes it.
   An inert rule that reads as load-bearing is worse than no rule.

   What is left on the strip is a brand, three fixed menu names and a 44px circle.
   Measured at 768, 820 and 1180: `scrollWidth - clientWidth` is 0 at all three,
   with and without any elastic rule. If §2.1's named counts ever land in that
   span the arithmetic changes — `tablet_smoke.cjs` block 2 asserts the overflow
   directly, which the old rule's own claim never was. */
/* THE AVATAR IS A CIRCLE, AND `min-height:var(--t-tap)` ABOVE WOULD MAKE IT AN
   ELLIPSE. `.menu-top` is in that list, and 28px of width against a 44px floor on
   height is not a rounding error — it is a 28×44 lozenge. A fingertip needs the
   44 and the shape needs both, so the tablet gets a 44px circle. */
html.tms-tablet #menubar .avatar-top{width:var(--t-tap);height:var(--t-tap)}
html.tms-tablet #avatar-ini{font-size:14px}

/* (b) THE DESCRIPTIONS WERE MOUSE-ONLY, AND THEY ARE THE APP'S ONLY EXPLANATION
   OF ITSELF. Eighteen menu items carry a `data-desc` sentence — "Queue a new
   audit on the shared audit server. It runs there on the team's shared Claude
   subscription…" — and the only way to read one is to hover it: showCard() is
   reached from a `mousemove` handler on the panel and a `focusin`, and a tap
   fires neither before it fires the action. So on a tablet the menus are
   eighteen bare labels and the sentences are unreachable.

   As a PSEUDO-ELEMENT rather than a span the JS appends. `content:attr(data-desc)`
   cannot exist while the class is off, so there is nothing to build when the
   tier arms, nothing to tear down when it disarms, no event to hang the build
   on, and no possibility of the subtitles drifting from app.html's own strings —
   because they ARE those strings, read live.

   `display:block`, restoring tms.css:33's own value over §1's flex, and NOT
   `flex-direction:column`. `.mtag` is `float:right` (tms.css:645), a flex
   container ignores float, and §1's flex had already mislaid "shared server" and
   "installed app" on every tablet. `white-space:normal` because tms.css pins
   nowrap for a one-line label.

   `!important` on the floating card: tms-shell.js sets its display as an inline
   style, so nothing without it can keep the card down. */
html.tms-tablet #menubar .menu-panel button[data-desc]{
  display:block;width:100%;text-align:left;white-space:normal;padding:8px 12px;
}
html.tms-tablet #menubar .menu-panel button[data-desc]::after{
  content:attr(data-desc);display:block;margin-top:3px;
  font-size:12px;line-height:1.35;font-weight:400;color:var(--mut);
}
/* A panel that now holds a sentence per item is 815px tall for Translate, which
   does not fit an iPad in landscape. It scrolls rather than being clipped by the
   viewport, and the width is bounded so a sentence does not become one line. */
html.tms-tablet #menubar .menu-panel{
  min-width:300px;max-width:340px;max-height:calc(100dvh - 64px);overflow-y:auto;
}
/* The hover card has nothing left to say, and on a tablet it could only ever
   appear under the finger that was already pressing the thing it describes. */
html.tms-tablet #menu-desc{display:none!important}

/* ======================= 7 · pop-out-into-an-OS-window =======================
   Hidden for the reason the phone hides it: a device with no window manager
   cannot use it, and on iPadOS window.open returns a TAB — so the region
   leaves the page, and the control that would bring it back renders inside the
   tab that took it. Half-working is worse than absent. */
html.tms-tablet .popout-group{display:none!important}

/* ======================= 8 · surfaces whose own rules outrank the tier =======================
   view-corpus.css scopes almost everything to `#view-corpus`, which is an ID, so
   `#view-corpus button` (1,0,1) beats every class-scoped selector this file can
   write. Its own touch floor is 40px and it lives inside `@media
   (max-width:1024px)` — so on a tablet the corpus editor's controls measured 40
   in portrait and 44 in landscape, four pixels under the floor this tier states,
   on the one surface whose entire job is pressing them.

   Matched on the ID rather than raised with !important, because the two rules
   are not in conflict about anything except the number, and a reader comparing
   them should be able to see which one wins from the selectors alone. */
html.tms-tablet #view-corpus button,
html.tms-tablet #view-corpus select,
html.tms-tablet #view-corpus input:not([type=checkbox]):not([type=radio]),
html.tms-tablet #view-corpus textarea,
html.tms-tablet #view-corpus summary{min-height:var(--t-tap)}
html.tms-tablet #view-corpus .rend-caret{width:var(--t-tap);height:var(--t-tap)}
html.tms-tablet #view-corpus .rend-acts button{min-height:var(--t-tap)}

/* ======================= 10 · what the floor in §1 could not reach =======================
   §1 is a hand-written list of the app's control vocabulary, and a hand-written
   list is only as good as the reading behind it. These are the controls the view
   modules render that no entry in it names, each measured rather than guessed.

   Every one of them is a DEVICE rule by the header's test: a bare 15px anchor is
   too small for a fingertip at any window width, and would be perfectly fine on
   a mouse desktop whose window happened to be narrow. */

/* An <a>, not a <button> — view-project.js writes the next-action control as an
   anchor when it has an href and a button when it finalizes, so half the time
   the one call to action on the phase spine was 27px and half the time it was
   floored. Both, now. */
html.tms-tablet .wf-next-btn{
  min-height:var(--t-tap);display:inline-flex;align-items:center;justify-content:center;
  padding:0 14px;
}

/* THE PHASE PILLS ARE THIS SURFACE'S NAVIGATION and they were 28px. §1 floors
   them; what §1 could not know is that `.wf-step.locked` is `cursor:not-allowed`
   and does nothing when pressed — so §5's pressed state was telling a reader
   their tap had landed on a control that was never going to act. */
html.tms-tablet .wf-step.locked:active{filter:none;background:none;transform:none}

/* Project Management's per-project "Open →". It is `white-space:nowrap` inside a
   flex row that runs out of width at 768, so it was not merely small — it was
   CLIPPED to zero and could not be reached at all. Wrapping the row is the fix;
   `margin-left:auto` keeps it at the right edge on the line it lands on.
   `inline-flex`, not `flex`, so it does not claim a line of its own when there
   is room beside the title. */
html.tms-tablet .pm-row-head{flex-wrap:wrap}
html.tms-tablet .pm-row-head .pm-open-proj{
  margin-left:auto;min-height:var(--t-tap);
  display:inline-flex;align-items:center;padding:0 12px;
}

/* The assignment picker is the point of Project Management, and its rows were
   27px bands packed edge to edge with no gap — the shape that produces a silent
   wrong assignment. A separator rather than a gap: the rows are inside a
   scrolling box and a gap would make the box taller without making a mis-tap
   any less likely to land on a row. */
html.tms-tablet #pm-assign-users label{
  min-height:var(--t-tap);align-items:center;padding:4px 8px;
}
html.tms-tablet #pm-assign-users label + label{border-top:1px solid var(--line)}

/* #dlg-pm-assign, #dlg-pm-lang and #dlg-pm-link write their own headers rather
   than a .dhead, so chromeDialog() returns early and §6's 44px close control
   never reaches them. They are modals over a modal, which makes their ✕ the only
   exit from a stack two deep. */
html.tms-tablet #dlg-pm-assign span[onclick],
html.tms-tablet #dlg-pm-lang span[onclick],
html.tms-tablet #dlg-pm-link span[onclick]{
  min-width:var(--t-tap);min-height:var(--t-tap);border-radius:8px;
  display:inline-flex;align-items:center;justify-content:center;
}
html.tms-tablet #dlg-pm-assign span[onclick]:active,
html.tms-tablet #dlg-pm-lang span[onclick]:active,
html.tms-tablet #dlg-pm-link span[onclick]:active{background:rgba(20,28,42,.12)}

/* The corpus editor draws four of its per-comment actions and two of its
   list actions as bare anchors with a cursor and no box at all — 11 to 15px of
   text, run together, where the decision is which of resolve / edit / delete you
   meant. Given a box each rather than a gap, for the same reason as above. */
html.tms-tablet #view-corpus .p-unproh,
html.tms-tablet #view-corpus .a-rec-del,
html.tms-tablet #view-corpus .cmt a,
html.tms-tablet #view-corpus .cmt-acts a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:var(--t-tap);padding:0 10px;border-radius:8px;
  border:1px solid var(--line);cursor:pointer;
}
html.tms-tablet #view-corpus .p-unproh:active,
html.tms-tablet #view-corpus .a-rec-del:active,
html.tms-tablet #view-corpus .cmt a:active,
html.tms-tablet #view-corpus .cmt-acts a:active{filter:brightness(.93)}

/* The Bible catalogue: forty translation rows, 39px tall, packed with zero
   between them, each ticking a different translation. A fat-finger tap picks the
   wrong Bible and says nothing about it. Same separator treatment; the checkbox
   itself is already 24px from §1. */
html.tms-tablet .sbc-row,
html.tms-tablet .bl-row{min-height:var(--t-tap)}
html.tms-tablet .sbc-row + .sbc-row,
html.tms-tablet .bl-row + .bl-row{border-top:1px solid var(--line)}

/* ======================= 11 · what §4's column flip left behind =======================
   `.set-row` is `align-items:flex-start` (tms.css:569), which survives §4's
   `flex-direction:column` and then governs the CROSS axis — so every `.ctl`
   shrink-wraps to its content instead of filling the row it now owns. That is
   why the Corpus Builder's AI-stages table hangs 206px past the right edge of
   its card: the cell is as wide as the table rather than as wide as the row, so
   §3's `overflow-x` on the cell has nothing to scroll inside.

   One line, and it repairs the leftover rather than working around it — which is
   why it is here and not `.set-row > .ctl{width:100%}`. */
html.tms-tablet .set-row{align-items:stretch}

/* ======================= 12 · the toast =======================
   `bottom:26px` puts it under the thumb that is holding the device, and it
   auto-clears after four seconds — so on a tablet the app's confirmations and
   its failures were reported into the one band a hand is most likely to cover.
   Lifted clear of a fingertip's worth of edge. Bottom rather than top: the top
   of a tablet screen is where a dialog header now lives.

   THE OTHER HALF OF THIS IS NO LONGER THIS FILE'S PROBLEM, and was never solvable
   here. A toast fired while a dialog was open could not be seen at either edge,
   because a modal <dialog> sits in the browser's top layer and no z-index reaches
   past it. Dialogs became ordinary windows over an app-drawn backdrop in the
   meantime, which turned that into a z-index anyone can read — and it read 200,
   under the backdrop's 900. Fixed where it belongs, in tms.css, for every host.
   What is left here is the edge it sits at, which is a fact about a thumb. */
html.tms-tablet #tms-toast{
  bottom:calc(var(--t-tap) + 26px);max-width:min(70vw,520px);
}

/* A <label for> now wraps the words beside each Organization setting
   (view-adminsys.js), which makes the sentence a target as well as the box. It
   needs the height to be one. Only where the `for` is, so the label divs that
   name nothing are untouched. */
html.tms-tablet .set-row .lbl[for]{
  min-height:var(--t-tap);display:flex;flex-direction:column;justify-content:center;
}

/* ======================= 13 · the document surface's own touch defects =======================
   These are DEVICE rules on a surface that already arranges itself by FIT — the
   data-w bucket keys them, this file only supplies the finger's numbers. Nothing
   here changes which bucket anything lands in.

   THE PEEK SHEET CLIPS THE ONLY CONTROL IT CONTAINS. view-audit.css pins the
   Inspector's peek height at 34px, and the tier then raised the ib-toggle inside
   it to 44 — so the one control on the bar a reader uses to open the Inspector
   hangs 10px below the bar's own bottom edge and is cut off by its overflow. A
   number the tier changed, so a number the tier repairs; and #doc-panes reserves
   the same figure, so both move together or the last sentence of the document
   ends up underneath the sheet. */
html.tms-tablet #docview[data-w="tablet"] #edwin[data-sheet="peek"],
html.tms-tablet #docview[data-w="phone"] #edwin[data-sheet="peek"]{height:var(--t-tap)}
html.tms-tablet #docview[data-w="tablet"] #doc-panes,
html.tms-tablet #docview[data-w="phone"] #doc-panes{
  padding-bottom:calc(var(--t-tap) + var(--tms-kb-inset,0px));
}

/* A SENTENCE IS THE DOCUMENT'S PRIMARY TARGET and a one-line one is a hairline.
   `.dseg` is an inline span with 1px of vertical padding, so its hit region is
   the font size plus 2 — about 18px — however tall the line is. line-height does
   not move it: an inline box's hit region is not its line box, which is why the
   obvious fix was measured and rejected.

   THE COST, accepted deliberately and written down: `.dseg` carries
   box-decoration-break:clone, so every wrapped fragment gets the padding too and
   two vertically adjacent boxes overlap by a few pixels. A tap in the overlap
   goes to whichever paints later. That is a worse failure to reason about than
   it is to have — the alternative is a target a third the size of a fingertip on
   the one surface the whole app exists to edit. */
html.tms-tablet #docview .docpane .dseg{padding-top:13px;padding-bottom:13px}

/* THE PANES LOSE THEIR NAMES ON A SHORT SCREEN. view-audit.css hides both
   `.docpane h3` at data-h="short", which is right on a laptop that is briefly
   short and wrong on a tablet held sideways, where short is the ORIENTATION and
   the reader is looking at two documents with nothing saying which is the
   translation. Restored under the class only, so the 1280x800 mouse laptop and
   the installed app keep view-audit.css's decision; and at 10.5px, because the
   height it costs is the reason the original rule exists. */
html.tms-tablet #docview[data-h="short"] .docpane h3{
  display:block;padding:2px 18px;margin-bottom:3px;font-size:10.5px;
}

/* ======================= 14 · the corpus lifecycle bar in landscape =======================
   `#lc-sticky` is the pinned Finalize / Start review control, and view-corpus.js
   inserts it as `pane.nextSibling` — a sibling of #detail-pane inside #split.
   #split is a ROW, so anything revealed there becomes a third column rather than
   a bar. It is only ever displayed under `.is-pushed`, which is the narrow
   single-pane layout, so on a tablet in landscape — where both panes are up and
   the term is scrolled — there is no lifecycle control on screen at all and the
   reader has to scroll back to the head of the term to find one.

   The reparenting is in view-corpus.js; this is the reveal, gated on the class so
   no other host gains a bar it did not have. */
html.tms-tablet #view-corpus #lc-sticky{display:block;flex:none}

/* ======================= 15 · what the tier hands to FIT =======================
   §4 stacks `.set-row` under the class, which by this file's own header is the
   wrong home for it: a 230px label column beside a 173px control is a fact about
   a BOX, and it would be just as wrong in a 500px window on a mouse. It belongs
   on [data-w], and the surfaces now write one.

   It is not moved yet, and the reason is ordering rather than doubt. The rule
   has to be true continuously: taking it off a class that always matches and
   handing it to an attribute that only appears once an observer has run means
   there is a frame — and a host — where neither is true. The attribute is
   written by this commit; the rule moves once there is an assertion that setting
   and clearing it flips the row, and once the installed app's own settings
   window has one too. Named here so the next reader knows it is a debt and not
   an opinion. */
html.tms-tablet #setwin-body[data-w="narrow"] .setwin-pane{padding-right:0}
