/* App-specific styles only. All colors come from the DesignSystem tokens - no hex here (07 s6.1).
   Page-level furniture for the admin grid + form modal that is not yet in the shared DesignSystem RCL
   (first admin CRUD page). Candidates to promote into KwtPost.DesignSystem when the shared grid shell
   lands. Logical properties only; every color is a var() token. */

/* ---- Admin body-font ruling REVERSED (owner ruling 2026-07-19, designer README intake) ----
   The designer's authoritative README (docs/reference/postOffice_Admin_html/README.md, intaken
   2026-07-19) declares Arabic body = Alexandria and BANS the mockup's i18n.js runtime
   body{font-family:Tajawal} inline-style as a bug ("No hidden JavaScript font overrides").
   Owner chose "switch back to Alexandria now" over keeping the previous same-day Tajawal wave.
   The override block that lived here is therefore REMOVED — tokens.css defaults apply again
   (Alexandria ar / Inter en). Tajawal @font-face files stay shipped but unused pending the
   designer's updated mockup build (re-verify painted parity against it when it arrives).
   History: the Tajawal wave + its painted-width evidence are in CHANGELOG 2026-07-19. */

/* ---- Admin background-wash anchors are PHYSICAL (owner-caught 2026-07-19) ----
   The admin mockup pins its two blurred blobs top-LEFT (navy) / bottom-RIGHT (gold) with physical
   left/right that never flip with dir (mockup style.css:212-240); the portal mockup deliberately uses
   logical inset-inline (its style.css:6-7), so the shared base.css keeps the logical form and the
   admin re-pins physically here. In RTL the logical form had flipped the navy blob onto the
   sidebar/title edge — the "navy topbar" band the owner flagged. Each pair below first neutralizes
   the logical slot, then sets the physical one (order matters: in LTR both target the same slot). */
body::before {
  inset-inline-start: auto;
  left: -18vw;
}
body::after {
  inset-inline-end: auto;
  right: -18vw;
}

/* ---- Admin body type baseline: 14px / 1.65 (mockup v3 ruling 15 #137, 2026-08-02) ----
   The body SIZE is owned by Bootstrap (--bs-body-font-size: 1rem on its own body rule), and the shared
   base.css body rule — which carries the line-height — is loaded by the portal too, so neither is the
   right home for an admin-only baseline. This sheet is the admin's last-loaded one and only the admin
   loads it, so the same-specificity body rule here wins for the admin alone. The root font-size is left
   at the browser default 16px (the admin ships no html font-size rule; the RTL 106.25% optical inflation
   is portal-only, KwtPost.Portal/wwwroot/css/site.css:21), so every rem-based size keeps its value and
   only text that inherits the body size moves.
   The 1.65 is a LITERAL, not var(--leading-body), on purpose: it deliberately supersedes that token's
   culture-switched values (1.5 latin / 1.6 under html[lang="ar"], tokens.css) for the admin, so both
   languages get the v3 reference's single body ratio instead of an Arabic-only optical leading
   (adjudication 7, ledger 15 #137, 2026-08-02). */
body {
  font-size: var(--text-body);
  line-height: 1.65;
}

a {
  color: var(--color-action-primary);
}

/* ---- The sticky top bar never covers what the browser scrolls to (owner ruling 2026-09-27, #300; restored and
   widened by #307 on 2026-09-28) ----
   Measured before this rule, 8 of 8 in a visible browser (Subscribers and Shipments, both languages, 1440 and
   390 px): a Tab into a tall list's focusable sideways scroller brought the list's top edge and head row to the
   window top, under the bar. The root's scroll padding tells the browser the bar is there, so a Tab's focus
   scroll, every scrollIntoView and the skip link's jump stop their target below it.
   The height is the bar's MEASURED one, never a fixed value: the bar is 64px, and 109px in Arabic at 390 where the
   page title takes its own row. The shared script publishes it on the root and re-publishes it whenever the bar's
   box changes; the landings the page makes without scrolling are brought to this same line there. The small gap
   keeps a landing's focus ring clear of the bar's bottom edge. The property is declared here at 0px, the value a
   page without the bar keeps (nothing publishes one there), so the padding is only the small gap on those pages
   and the declaration never names an undefined property (corrected 2026-09-28: it was left undeclared, and a
   page without the bar dropped the whole padding declaration instead). */
:root {
  --kp-topbar-block-size: 0px;
  scroll-padding-block-start: calc(var(--kp-topbar-block-size) + var(--kp-space-sm));
}

/* ---- A dialog never moves the reader (owner ruling #310, 2026-09-29) ----
   Opening a dialog hides the page's scrollbar and pads the body by its width, and its close gives both back. In the
   one layout that runs a scrollbar's width wider, a line of the page can wrap differently, and the browser's scroll
   anchoring then moved the page to keep its anchor row in place; the move survived the close (measured on Branches,
   Appointments and the App Settings templates at 390 and 1440 px, both languages). The shared script holds this
   class on the root from before a dialog's first scrollbar change until after the last one of its close.
   The bound: this suppresses the browser's scroll-anchor adjustments only. It does not freeze the layout or the
   scroll position, it does not stop the browser clamping the scroll to a shorter page, and an explicit scroll, a
   focus scroll or the top-bar reveal still move the page. */
html.kp-dialog-no-anchor {
  overflow-anchor: none;
}

/* ---- utilities ---- */
.hidden { display: none !important; }

/* ---- Skip link (WCAG 2.2 SC 2.4.1 Bypass Blocks) -- added 2026-09-10 ----------------------------
   The shell's first element, and the bypass around a rail that measured seventeen tab stops at 1440 in
   both languages before the page's own first control.

   OFF-CANVAS, NEVER HIDDEN. `display: none` and `visibility: hidden` both take an element OUT of the tab
   order, which would remove the very stop this exists to provide. The pill is parked above the viewport
   with a transform instead and slides in when it takes keyboard focus, so a pointer reader never sees it
   and a keyboard reader gets it on the first Tab.

   LOGICAL INSETS ONLY. `inset-inline-start` puts the pill on the LEFT in English and the RIGHT in Arabic
   with no per-language rule -- which is where each language's first tab stop already sits.

   ABOVE THE SHELL. The rail is `position: fixed` at z-index 1040 and the bar is sticky at 1030, so a
   lower value would slide the focused pill underneath one of them. 1050 clears both.

   NO RING OF ITS OWN. The admin's global `body:not(.kp-portal) :focus-visible` rule paints the house ring
   with `!important` (owner order 2026-07-20), so this control inherits it like every other; a second ring
   declared here could only lose to that rule or fight it with another !important.

   NO TRANSITION, deliberately: the pill appears at once. Motion here would need a reduced-motion arm to
   be correct, and a control a reader reaches by pressing Tab has nothing to gain from an animation. ---- */
.skip-link {
  position: fixed;
  inset-inline-start: var(--kp-space-md);
  inset-block-start: 0;
  z-index: 1050;
  transform: translateY(-150%);
  display: inline-block;
  padding: var(--kp-space-sm) var(--kp-space-md);
  border-radius: var(--kp-radius-md);
  /* The .btn-primary pair: navy ground, white ink. The sheet paints every <a> in navy above, so the ink
     has to be re-declared here or the label would be navy on navy. */
  background: var(--color-action-primary);
  color: var(--kp-white);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus-visible {
  transform: translateY(var(--kp-space-sm));
}

/* Generic-error surface shell (_ErrorLayout — static, no topbar/sidebar; bug-hunt fix 2026-07-19) */
.error-shell {
  max-width: 640px;
  margin-inline: auto;
  padding: 64px 24px;
}

/* ---- Generic-error surface CARD (parity fix wave P3.5, 2026-08-11) ------------------------------
   The admin ships TWO standalone error surfaces and only one of them was dressed: Account/AccessDenied
   already renders the auth-card family with a real link home, while Views/Shared/Error.cshtml was a bare
   heading, a sentence and a reference id on the page wash — a live destination (UseExceptionHandler
   "/Home/Error" + every controller's AdminErrorResult.ForFailure navigation arm), so an admin who hits a
   DB outage got an unbranded screen with no way back. Dressed here in the shipped .card family rather
   than the auth split-screen, because _ErrorLayout deliberately renders NO service-touching partial
   (bug-hunt fix 2026-07-19) and must keep that property.
   The v3 mockup has no error page, so this is a designed addition on the shipped families (v3 intake
   keep-shipped-extras, ledger 15 #137) — every COLOUR and every spacing step is a token, and no new colour
   is introduced. (A13, corrected 2026-08-12: this read "every value is a token", which the block beneath it
   contradicts — the mark's 44px box, the two icon sizes and the 44ch measure are raw literals, as sizing
   values are throughout this file. The colour half of the claim, which is the half the house law is about,
   is true.) */
.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--kp-space-sm);
  padding: var(--kp-space-xl);
  text-align: center;
}

/* Alert-tinted disc carrying the sprite's info mark at 24px — the base .icon is 18px, so the size is
   restated here rather than left to inherit a grid-row icon's dimensions. Tint + brand-red mark is the
   shipped .note--danger pairing (--status-alert-bg over --status-alert-fg), not a new colour. */
.error-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--kp-radius-full);
  background: var(--status-alert-bg);
  color: var(--status-alert-fg);
  margin-block-end: var(--kp-space-xs);
}

.error-mark .icon {
  width: 24px;
  height: 24px;
}

.error-card .page-title { margin: 0; }

.error-card .page-subtitle {
  margin: 0;
  max-width: 44ch;
}

.error-ref {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.error-card .btn-primary { margin-block-start: var(--kp-space-md); }

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ---- page header ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kp-space-md);
  margin-block-end: var(--kp-space-lg);
}

.page-title {
  font-size: var(--text-heading);
  line-height: var(--leading-tight);
  font-weight: 700;
  color: var(--color-text);
}

.page-subtitle {
  margin-block-start: var(--kp-space-xs);
  color: var(--color-text-muted);
  font-size: var(--text-ui);
  line-height: 1.65;
  max-width: 68ch;
}

.page-header-actions {
  display: flex;
  gap: var(--kp-space-sm);
  flex-wrap: wrap;
}

/* ---- stat row ---- */
/* Every card in a .stat-row renders equal height, across wrapped grid rows too (owner ruling
   2026-08-26, equal-height choice): 1fr implicit rows stop a wrapped label/caption card from
   leaving the shorter row(s) ragged (measured on /PoBoxRequests). */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--kp-space-md);
  margin-block-end: var(--kp-space-lg);
}

/* A stretched short card gains spare vertical space; pack the card interior to the block start so
   the icon/text block stays top-anchored as a natural-height card renders today, while each child
   keeps the base align-items:center within the content-sized track — the 44px tile stays centered
   on its text stack instead of drifting with the stretch. Logical properties only: holds in RTL. */
.stat-row .stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
}

/* THE LOCK'S RING TAKES NO GRID CELL IN A COUNTER CARD (ruling 15 #198c; measured on /Payments 2026-09-23).
   The shared lock paints its ring as an in-flow `::before`, the leading item beside a button's label, and a
   counter card in a `.stat-row` is the two-column grid above -- so while a pressed card's read ran, the ring
   took the first cell, pushed the icon into the second and wrapped the text block onto a new row. The card
   grew by 60px at 1440 and by 54px at 390, every card in its row grew with it (the row's 1fr tracks), and
   the grid below dropped 60px, or 216px where the row stacks.
   Out of flow, the ring occupies no cell, so a locked card keeps exactly the height its own rules give it at
   rest: 16px of block padding on each side of the taller of the icon tile (44px; 38px below 768px) and the
   text column, which is the label's reserve (3.3em of 13px text, or 4.95em where a page reserves three
   lines) plus the label's 4px gap plus one value line (1.1 x the value size). On /Payments that rest height
   was measured at 105.28px (English, 1440), 126.73px (Arabic, 1440) and 122.34px (390).
   Its home is the block-start, inline-end corner: 4px below the card's top edge and 4px clear of the 4px
   accent stripe, away from the icon at the inline start and from the value on the text column's last line.
   A 16px ring does not fit inside the padding band beside the stripe (14px wide from 768px up, 12px below),
   so it can overlap the last few pixels of a first label line that runs all the way to the card's end.
   The card is already `position: relative` (the family's base rule, and the lock's own), so it is the
   ring's containing block, and the card's `overflow: hidden` edge lies outside the ring. The alignment pair
   repeats what the insets say, so the ring lands in that corner whether an out-of-flow box inside a grid is
   placed by its insets alone or by its self-alignment as well; without it the shared rule's
   `align-self: center` would be the only alignment on the ring. No other locked control changes: a text
   button keeps its ring in flow beside its label and an icon-only button keeps it in its icon's place. */
.stat-row .stat-card.btn-loading::before {
  position: absolute;
  inset-block-start: var(--kp-space-xs);
  inset-inline-end: var(--kp-space-sm);
  align-self: start;
  justify-self: end;
}

/* Branch Users has four filter fields plus its action cell. At the 958px/966px content widths,
   five 170px floors plus four 16px gaps need 914px and resolve to 178.8px/180.4px tracks. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #branchUsersFilterRow {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

/* Payments counter row — measured label reserve so every value sits on one baseline while the
   inner grid stays top-anchored (owner ruling 2026-08-26). Round-7 measurement after D22
   (2026-08-29): the captured-KWD Arabic label wraps to three lines at 1440 and still three at
   1280/1024 with the 12px-wider label box; English also needs three lines below 1400px. The reserve
   encodes THAT measured bound — a longer label re-opens it; the row is already as tall as its
   longest label (grid-auto-rows:1fr), so the reserve adds no height, it only aligns the values.
   Base line-height 1.65 at 13px: 4.95em = three lines. */
html[lang="ar"] #paymentsStatRow .stat-info .label { min-block-size: 4.95em; }

@media (max-width: 1399.98px) {
  #paymentsStatRow .stat-info .label { min-block-size: 4.95em; }
  html[lang="ar"] #paymentsStatRow .stat-info .label { min-block-size: 4.95em; }
}

/* Payments counter row inside the middle band (2026-10-10). Measured that day in the browser at every whole-pixel
   window from 992 to 1399px, with the 15px scrollbar and without one, in both languages: the band's rows run
   865-1143px, and with four cards a line the Arabic Captured (KWD) label took four lines on cards up to 225.25px
   (rows 865-949px), one more than the three-line reserve above, so its value sat 21.41px below the other three.
   From a 225.50px card - a 950px row - every label takes three lines at most in both languages. So inside the band
   the row is a size container with four equal tracks: each card spans two, two and two a line, and from a 950px row
   each spans one, four a line. On the two-and-two rows the cards are twice as wide and every label takes one line.
   The three-line reserve above (4.95em) then covers every label in both arrangements, so no reserve here adds
   height (ruling 15 #390: the counter-card height is not changed). The 950px row rests on that label reason
   alone: since ruling 15 #407 a value wider than its card is drawn smaller by the page script (the value rule
   below), so the amount's width no longer decides the arrangement. Outside 992-1399.98px no rule here applies. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #paymentsStatRow { container-type: inline-size; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #paymentsStatRow .stat-card { grid-column: span 2; }
  @container (min-width: 950px) {
    #paymentsStatRow .stat-card { grid-column: span 1; }
  }
}

/* Payments counter row below 992px (2026-10-10). The row keeps the shared family layout here (ruling 15 #406: no
   page-scoped track rule narrows or stretches the cards and no card height changes; the owner's ruling for this
   page, with the reading stated to him that it holds for every Admin counter row below 992px). The family's 200px
   floor and 16px gap put two cards on a line from a 416px row, three from 632px and four from 848px. Measured that
   day in the browser at every whole-pixel window from 360 to 991px, with the 15px scrollbar and without one, in
   both languages: the Arabic Captured (KWD) label takes four lines - a box of 85.75px, four lines of 21.4375px (the
   1.65 line height at 13px, held in the browser's 1/64px layout units) - on rows 416-446px (two and two),
   632-677px (three and one) and 848-949px (four a line), so its value sat 21.41px below the other three; on every
   other row it takes three lines at most, and no English label takes more than three anywhere. Below 768px the
   family's card padding and icon tile are smaller, so there the label takes at most three lines from a 215.33px card,
   against 225.50px from 768px. So on exactly those rows the Arabic labels reserve the box the four-line label
   already has, and the row is a size container so each condition can read the row's own width. Every line of the
   row is as tall as its tallest card (the .stat-row implicit lines are 1fr), and that card already held the four
   lines, so no card's height changes and the values line up. The reserve is written in pixels because 6.6em
   (85.8px) is a fraction of a layout unit taller than those four lines: on a row where the label takes four lines
   it measured 145.98px cards against 145.94px. */
@media (max-width: 991.98px) {
  #paymentsStatRow { container-type: inline-size; }
  @container (min-width: 416px) and (max-width: 446.98px) {
    html[lang="ar"] #paymentsStatRow .stat-info .label { min-block-size: 85.75px; }
  }
  @container (min-width: 632px) and (max-width: 677.98px) {
    html[lang="ar"] #paymentsStatRow .stat-info .label { min-block-size: 85.75px; }
  }
  @container (min-width: 848px) and (max-width: 949.98px) {
    html[lang="ar"] #paymentsStatRow .stat-info .label { min-block-size: 85.75px; }
  }
}

/* The Payments counter values fit their cards (owner ruling 15 #407, 2026-10-10). When a value is wider than its
   card's text column, the page script writes a smaller size, only as much smaller as it needs, to that value's own
   --payments-value-fit property, and this rule draws the value's text at it; a value that fits keeps 1em, the value
   block's own family size. Only the inner text shrinks, and the text has no line height of its own, so the value
   block's line - set by the block's own font and line height - keeps its height and its baseline. Measured that day:
   without the zero, a smaller size's rounded ascent and descent stood up to 1px below that line at some windows, and
   every card in the row grew with it. The shimmer of a value being re-read paints the text's content area, which the
   font sets and the line height does not (CSS 2.1, 10.6.1). */
#paymentsStatRow .stat-info .value bdi { font-size: var(--payments-value-fit, 1em); line-height: 0; }

/* Subscribers sweep round 1 S-06 (2026-08-28): five visible counters must remain one row at the
   1280/1024 layouts. At the 968px content floor, 5 * 170px + 4 * 16px = 914px, leaving 54px
   breathing room; the resulting tracks are about 179.2px at 960px and 180.8px at 968px.
   Sweep round 2 N-R2-1 measured the pending-linking label at three lines on those narrower cards
   in both locales, so the same band reserves all three lines before the values. Base line-height
   1.65 at 13px: 4.95em = three lines; a longer label re-opens the measured bound.
   Dated 2026-10-10 (measured that day in the browser at every whole-pixel window from 992 to 1399px, with the 15px
   scrollbar and without one, in both languages, for every visible-card state a user meets: a super-admin on each box
   tab, an HQ user without Delete on All): the 960/968px rows above were the 1280/1024 layouts only. The band's rows
   run 865-1143px (865px at window 1200, where the 264px rail docks), and the row shows FIVE visible cards (All with
   the deleted card, Physical) or FOUR (All without it, Virtual); the box tabs toggle the cards' `hidden` class live.
   Five tracks of 170px need a 914px row, so the five-card states laid out four and one on rows 865-913px. And a
   five-digit count (00000, the widest digits: 76.27px at the English 24px value size, 75.91px at the Arabic 22px one)
   overflows a card's text column, its width less 96px, on five a line under a 926px row: (W - 4 x 16) / 5 - 96 >=
   76.27 from W = 926px. The bound is a five-digit count, a bound adopted on 2026-10-10 from the reason the owner gave
   in ruling 15 #198c ("fast today, not with big data later"). So four visible cards keep the 170px floor, four a line
   at every row of the band (4 x 170 + 3 x 16 = 728px; a five-digit count fits four a line from a 738px row, 4 x (96 +
   76.27) + 3 x 16 = 737.08px, and was measured to fit on every row from 830 to 1000px, the rows the probe visited),
   and five visible cards - counted over the cards without `hidden`, so the count follows a tab switch - turn the row
   into thirty equal tracks: three cards spanning ten and two spanning fifteen fill two lines under a 926px row, five
   spanning six fill one line from it (the row is a size container for that switch). Every label measured within three
   lines at those widths in both languages, so the reserve stays. Outside 992-1399.98px no rule here applies; below
   992px the row keeps the shared family layout (ruling 15 #406, the owner's ruling for /Payments, with the reading
   stated to him that it holds for every Admin counter row below 992px).
   The five visible cards are matched as five cards without `hidden`, each after the one before, and the fourth and
   fifth as cards after three such cards. Measured that day: under the shorter `:nth-child(5 of :not(.hidden))` test
   the browser did not recompute the row's own style when a box tab unhid the row's last card (an HQ user without
   Delete, All to Physical), so its five cards stood one per line until something else restyled the row; with the
   sibling form the row follows every switch. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #subscribersStatRow { container-type: inline-size; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  #subscribersStatRow .stat-info .label { min-block-size: 4.95em; }
  #subscribersStatRow:has(> .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)
      ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)) {
    grid-template-columns: repeat(30, minmax(0, 1fr));
  }
  #subscribersStatRow:has(> .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)
      ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)) > .stat-card {
    grid-column: span 10;
  }
  #subscribersStatRow:has(> .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)
      ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden))
      > .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card {
    grid-column: span 15;
  }
  @container (min-width: 926px) {
    #subscribersStatRow:has(> .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)
        ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)) > .stat-card,
    #subscribersStatRow:has(> .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden)
        ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden))
        > .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card:not(.hidden) ~ .stat-card {
      grid-column: span 6;
    }
  }
}

/* Company Requests counter row (owner rulings 15 #387, #390 and #401): seven cards in the family's counter row, at
   the family's card height. Outside 992-1399.98px this row has no rule of its own, so the family layout stands
   (three, three and one at 900px, by the owner's word in ruling 15 #401). Inside that band no rule here sets a
   card's height, block size or padding; the one size below is a third label line on the two cards without a
   caption line.
   Dated 2026-10-09 (measured in the browser that day, in English and in Arabic: with a 15px scrollbar at every
   window width from 992 to 1000px and from 1249 to 1264px, and at 1200, 1234, 1240, 1248, 1249, 1263, 1264, 1340,
   1399, 1400 and 1420px with the requests grid holding 25 rows and holding 1; without a scrollbar at 1230, 1233,
   1234, 1236, 1240, 1244, 1248, 1249, 1263 and 1340px): inside the band the cards a line holds and that reserve
   answer to the ROW's width, not the window's.
   The 2026-10-06 and 2026-10-08 rules answered to window widths, and a window width cannot tell whether the page
   draws a scrollbar: a page too short to scroll has a row 15px wider, so at 1234-1248px the row held five cards a
   line without the reserve and the change-requests value sat 21.42px below the licence card's. Their five-card
   start, a 914px row (five 170px floors and four 16px gaps), was also below the 925px row from which the Returned
   card's English label fits two lines; at 914-924px it took three and its value sat 21.42px off the line.
   So the row is a size container in the band and its cards place themselves by its width. It holds twenty equal
   tracks: a card spanning five is one of four a line and a card spanning four one of five, at the widths four or
   five tracks give (W the row, 16px gaps: 5 * (W - 19 * 16) / 20 + 4 * 16 = (W - 3 * 16) / 4, and
   4 * (W - 19 * 16) / 20 + 3 * 16 = (W - 4 * 16) / 5). Five a line start at a 928px row, five 172.8px cards and four
   gaps: every captioned card's label and caption measured two lines from 925px in English and 928px in Arabic. The
   reserve rides on the same condition, so the two caption-less cards, the row's last two, carry it exactly where
   they fill the second line alone (4.95em = three lines of 13px at line height 1.65); there their content stays
   under the captioned cards' height (measured 2026-10-08 at 1340, 1060 and 1000px). Under 928px the row holds four
   a line, the captioned Returned card beside the two caption-less ones on the second, without the reserve.
   The container is the row, not the page wrapper `main`: a container query cannot set its own container's tracks,
   which is why the cards choose their span, and `main` holds the page's fixed request drawer, which browsers
   released before the 2024 containment change (Chrome before 129, for one) confine to a size container. The row's
   cards hold their own decorations (`position: relative` on every stat card) and the row holds no fixed element
   (read in the view on 2026-10-09). */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #companyRequestsStatRow { container-type: inline-size; grid-template-columns: repeat(20, minmax(0, 1fr)); }
  #companyRequestsStatRow .stat-card { grid-column: span 5; }
  @container (min-width: 928px) {
    #companyRequestsStatRow .stat-card { grid-column: span 4; }
    #companyRequestsStatRow .stat-card:not(:has(.change)) .stat-info .label { min-block-size: 4.95em; }
  }
}

/* Arabic counter values at the 1280/1024 admin layouts: Alexandria digits run wider than Inter,
   and a three-decimal money value (nine glyphs) measured 122px at 24px inside a 116–118px
   information box (round-3 browser measurements, 2026-08-27). 23px still overflows by rounding;
   22px is the largest whole-pixel size that fits — the same step the narrow bands already use. */
@media (min-width: 768px) and (max-width: 1399.98px) {
  html[lang="ar"] .stat-row .stat-info .value { font-size: 22px; }
}

/* ---- branch tab bar (Branch Users scope selector) ---- */
/* Owner ruling 2026-08-29 (D23): ONE row that scrolls sideways. It used to wrap, so every branch added past
   the eighth pushed the whole grid down another line. The native scrollbar is hidden because the two
   chevrons beside the strip are the pointer affordance, and the keyboard never needs it: Arrow/Home/End walk
   the tabs and the browser scrolls the focused one into view. The Roles page shares this family with two
   short fixed tab sets that never overflow, so nowrap changes nothing there; if one ever did overflow it
   still scrolls by touch and trackpad and every tab stays reachable by keyboard. */
.branch-tab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--kp-space-xs);
  margin-block-end: var(--kp-space-md);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.branch-tab-scroller {
  display: flex;
  align-items: center;
  gap: var(--kp-space-xs);
  margin-block-end: var(--kp-space-md);
}

/* The scroller owns the spacing below the strip once it wraps it, so the two do not stack their margins. */
.branch-tab-scroller .branch-tab-bar { margin-block-end: 0; }

/* Hidden until the strip really overflows -- a short branch list renders exactly as it did before the
   ruling. The page script writes .is-overflowing on load, on resize and after each web-font batch. */
.branch-tab-scroll {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-full);
  background: var(--kp-white);
  color: var(--color-action-primary);
  cursor: pointer;
}

.branch-tab-scroller.is-overflowing .branch-tab-scroll { display: flex; }

.branch-tab-scroll:hover { background: var(--status-scheduled-bg); }

/* Inactive colorway matches the mockup's branch-identity pill language (docs/reference/mockup-admin/css/style.css
   .branch-badge / .branch-badge-enhanced -- primary-light tint + primary text, radius full); mirrors the page's
   own .chip--branch, which already renders the same tint for branch-name chips (Task 8 fix batch 1). The mockup
   has no interactive tab precedent, so the solid-navy ACTIVE state (below) is kept as the selection affordance. */
.branch-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--kp-radius-full);
  background: var(--status-scheduled-bg);
  color: var(--status-scheduled-fg);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.branch-tab:hover { background: var(--color-focus-ring); }

.branch-tab--active {
  background: var(--color-action-primary);
  border-color: var(--color-action-primary);
  color: var(--kp-white);
}

/* ---- filter + table cards ---- */
.filter-card { margin-block-end: var(--kp-space-md); }

.filter-search { flex: 1 1 220px; }

.data-table-shell { padding: 0; overflow: hidden; }

.grid-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kp-space-sm);
  padding: var(--kp-space-md);
  color: var(--color-text-muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

/* ---- unified first-cell identity cell (icon + name/email stack) ----
   .cell-icon itself (38x38 navy) moved to KwtPost.DesignSystem/components.css Task 6 -- shared,
   identical across all 5 grid partials, matches mockup section 8027 exactly. */
.admin-identity {
  display: flex;
  align-items: center;
  /* 12px matches EVERY mockup first-cell (shipment/emp/admin/role all gap:12px, style.css:4716/5072/7225);
     was 8px. Verified consistent across all mockup grid pages, no sweep override (15 #96 F13b). */
  gap: 12px;
}

/* A FLEX ITEM'S AUTOMATIC MINIMUM SIZE IS ITS OWN CONTENT, which is why this one line matters far more
   than it looks (measured 2026-09-02 on the Retired Roles grid). Without it this tile refuses to shrink
   below its widest child, so the identity row overflows its cell, the descendant description's
   `text-overflow: ellipsis` never sees a constrained box and therefore NEVER FIRES, and the actual cut
   happens one level up at the cell, which clips -- a description reading "...persona tes" with no ellipsis
   and an ellipsis rule that is present and inert. The two user grids already declared this per page for the
   same reason; it belongs to the family that declares the tile, so every grid using it gets the ellipsis
   its own rules already promise. Grids whose column is wide enough are unaffected: there is nothing to
   shrink. */
.admin-identity-text { display: flex; flex-direction: column; min-inline-size: 0; }
.admin-identity-name { font-weight: 600; color: var(--color-text); }
/* Roles grid alone paints the name BOLD (mockup .role-cell .role-name font-weight 700, style.css:7242 —
   deliberately heavier than the admin-users grid's 600). Scoped to .roles-table so other grids keep 600. 15 #96 F7 */
.roles-table .admin-identity-name { font-weight: 700; }
.admin-identity-email { font-size: .78rem; color: var(--color-text-muted); }

/* Roles-grid identity subtitle (description, not Code) -- truncates like the mockup .role-description
   (style.css:7000, max-width:320px); a modifier on the shared .admin-identity-email second line rather than
   a new identity-cell variant.

   TWO MODIFIERS, ONE CLAMP (2026-08-30, owner rulings 2026-08-29, ledger 15 #183). The subtitle renders
   one of two kinds of value and they clip at opposite ends. A description is localized free text and
   keeps the document direction, so its ellipsis correctly eats the tail. The Code fallback -- what the
   column actually shows for a role with no description in either language -- is Latin, and inside the
   Arabic page it lost its BEGINNING, because the ellipsis lands at the block's own inline end, which in
   a right-to-left block is the visual left. The markup marks that case dir="ltr" (Views/Roles), which
   moves the clip to the value's tail; the companion below is the other half of that change, because a
   left-to-right box on a right-to-left page starts at the far side of its cell unless it is realigned. */
.admin-identity-email--desc,
.admin-identity-email--code {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .admin-identity-email--code { text-align: end; }

/* ---- kind pill (distinct from a system badge) ---- */
.kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--kp-radius-full);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.kind-pill--hq { background: var(--status-scheduled-bg); color: var(--status-scheduled-fg); }
.kind-pill--branch { background: var(--status-transit-bg); color: var(--status-transit-fg); }

/* Owner order 2026-07-23 "make all the pills border radius consistent in all the table cells": the
   status/locked .badge family was 8px while the other cell pills (.kind-pill/.count-pill/role-type
   badges) were already full-round, so a grid row mixed a round pill next to a squared badge. Round the
   .badge family up to match -- scoped to .table-custom, because at the time badges elsewhere
   (modals/detail/Profile) deliberately kept their 8px radius.
   REDUNDANT since 2026-08-02 (restyle wave U8, ledger 15 #137): the base .badge in components.css is now
   a full pill in EVERY context, so this rule re-declares a value it already inherits. It is KEPT on
   purpose -- it costs nothing, and it holds the grid pill (the shape the owner actually asked for) if the
   shared base radius is ever revisited. Do not read it as evidence that grid badges differ from the rest. */
.table-custom .badge {
  border-radius: var(--kp-radius-full);
  /* THE GRID STATUS BADGE IS 29.8PX HIGH (owner ruling 15 #377(a), applied in the Action Reasons and App
     Settings page rounds, 2026-10-20). The ruling takes the SMALLER of the shipped and the mockup value for
     the grid status badge: the shared badge paints 19.8px of text (12px at 1.65) inside 5px of block padding
     and its 1px hairline border, 31.8px in all, where the mockup's grid badge is 29.8px on 10 of its 13 grid
     pages. 4px of block padding brings the grid badge to exactly 29.8px and keeps the text, its weight, the
     hairline and the inline padding as they are. Scoped to grids because the ruling names the GRID badge:
     the same badge in a detail pane, a drawer or a card keeps the shared 5px. */
  padding-block: var(--kp-space-xs);
}

/* ---- chips ---- */
.chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kp-space-xs);
}

/* Roles النظام column: breathing room around the type pill + wider gap when the System + Locked pills
   stack (owner order 2026-07-23 "enhance ... bottom spacing"). Scoped to .roles-table so the shared
   .chip-stack on other grids stays untouched. */
.roles-table .chip-stack {
  gap: var(--kp-space-sm);            /* 8px between stacked System + Locked pills (was 4px) */
  padding-block: var(--kp-space-xs);  /* 4px breathing room above/below the pill in the cell */
}

/* The gap is what keeps a chip built from more than one child readable (design sweep 2026-08-30). Flex
   layout removes the whitespace BETWEEN two flex items, so an icon, a number and a word written with
   ordinary spaces between them painted as one run -- the Lookups count chips read "2options" and «5خيار»
   on every row of the default page in both languages. A one-child chip is unchanged, and the two variants
   below that already declare their own gap keep it. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--kp-space-xs);
  padding: 2px 8px;
  border-radius: var(--kp-radius-sm);
  background: var(--color-bg-canvas);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: .72rem;
  font-weight: 500;
  white-space: nowrap;
}

/* PILLS INSIDE A GRID STAY INSIDE THEIR OWN CELL (2026-09-01, the owner's Branch Users screenshot: branch
   chips over three rows' created dates). The cell clip in the shared table component is the guarantee that
   nothing paints on the next column; this pair is what makes the clip land somewhere sensible. A pill is a
   rounded, `nowrap` box, and a wrapping stack does not shrink its items -- a flex item's automatic minimum
   size is its own content -- so without a bound of its own a pill wider than the cell is cut THROUGH its
   border and its background. Held to its container, the pill ends at the cell boundary with its own box
   intact, and the stack is allowed to shrink to the cell instead of pushing past it.
   Grid-scoped: pills outside a table (filters, drawers, detail panels) size from their content as before.

   THE LIST IS THE FAMILY, NOT ONE CLASS -- corrected 2026-09-01 (PK-P35q, N-P35PV-3 and N-P35PV-4). This
   rule first shipped scoped to `.chip` alone, and the live round then measured `.kind-pill` sliced flat on
   Admin Users (16.46px past an 80.17px content box, 14 of 25 rows in English) and on Roles (12.44px), and
   the `.badge` status pill sliced on Branches (3.39px, 7 of 7 rows) -- the precise outcome the paragraph
   above says this rule prevents. Scoping containment to one class name while its siblings share the shape
   is how a rule ends up true of its own example and false of the family. The governance arm now DERIVES the
   census: every rounded inline-flex class a grid cell actually wears must be either covered here or
   registered as a control with a written reason, so the next pill added to a cell fails a test instead of
   shipping sliced. */
.table-custom .chip-stack {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* THE CUT HAS TO BE VISIBLE, not only recoverable (2026-09-02, N-P35QV-2 -- the inline-flex-pill shape trap,
   answered). Holding the pill to its cell keeps its border intact, but `text-overflow` applies to BLOCK
   containers and an inline-flex pill's bare text is an anonymous flex item, so the label was cut with no
   ellipsis at all: the English pill rendered exactly "Headquarter", one character short, reading as a
   plausible word. Nothing on screen said it was incomplete, so nothing prompted the reader to open the
   tooltip that carries the whole value -- a way back nobody is told to take is not a way back.
   The label therefore sits in its own block inside the pill, which CAN carry the ellipsis. The wording is
   untouched (the label is owner territory and stays the full localized string), the cell's title stays, and
   the pill's own box is unchanged -- what changes is that the reader can see there is more. The flex item's
   automatic minimum size is its own content, so `min-inline-size: 0` is what lets it shrink far enough to
   ever show the ellipsis it declares. */
.table-custom .kind-pill-label {
  display: block;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The company requests grid's request-type chip and status badge carry the same inner label block (dated
   2026-10-22): one line in the cell, a cut that shows its ellipsis at the inline end of the page direction, and
   the whole label in the chip's title -- the shape the Admin Users role chips carry (owner ruling 15 #254). The
   role-chip rules are scoped to their own cells, so the two company shapes are named here. */
.table-custom .type-chip .chip-label,
.table-custom .badge .chip-label {
  display: block;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-custom .chip,
.table-custom .badge,
.table-custom .kind-pill,
.table-custom .count-pill,
.table-custom .civil-id-pill,
.table-custom .subscriber-nat-chip,
.table-custom .type-chip {
  max-inline-size: 100%;
  overflow: hidden;
}

/* Bump toward the mockup's pill-shaped branch-identity badge (Task 4, branch-users composition; mockup
   .branch-badge-enhanced, style.css:5056-5070 -- padding 5px 14px, radius-full, 12px leading icon, gap 6px) --
   scoped to .chip--branch only, so the plain .chip / .chip--more neighbors in the same stack keep their
   compact rectangular shape (this is a real one-to-many list, kept as a multi-chip stack, not collapsed).
   WEIGHT 600 added for mockup-v3 (restyle wave U7, ledger 15 #137): it is the one delta the v3 package shows
   on this pill, and BOTH v3 families agree on it -- the branches governorate pill
   (postOfficeAdmin-2/branches.html:110-111, .72rem/600) and the branch-identity badge this rule was modeled
   on (style.css:5294-5303, 12px/600). Size stays .72rem from .chip, which already matches. The weight comes
   from .chip (500) and this rule is the later of the two at equal specificity, so 600 wins here without
   touching the shared .chip. Blast radius is deliberate and family-wide: the same pill is the AdminUsers and
   BranchUsers branch chip, the branch view drawer's governorate chip, and the roles drawer chip
   (roles.js:1027) -- one family, one weight. */
.chip--branch {
  background: var(--status-scheduled-bg);
  border-color: transparent;
  color: var(--status-scheduled-fg);
  padding-block: 5px;
  padding-inline: 14px;
  border-radius: var(--kp-radius-full);
  font-weight: 600;
  gap: 6px;
}
.chip--branch .icon { width: 12px; height: 12px; }
.chip--more { background: transparent; color: var(--color-text-muted); }

/* Item 4 (owner design 2026-07-17): interactive variant of .chip--more -- the AdminUsers Roles column's
   +N/-N toggle chip. .chip--more still supplies the visual look (kept inert as-is on the Branches column's
   own +N chip, untouched); this modifier only adds the button affordance, mirroring .count-pill:hover's
   invert-to-primary treatment above. focus-visible ring is added via the shared list in components.css. */
.chip--toggle { cursor: pointer; }
.chip--toggle:hover { background: var(--color-action-primary); border-color: var(--color-action-primary); color: var(--kp-white); }

/* Structural tier badges (Task 3 SuperAdmin chip, extended by Task 12 with a SystemAdmin sibling; mockup
   .role-badge.super-admin, style.css:5034-5037) -- SuperAdmin reuses the same violet tokens already
   established for the Roles page's "System" role-type badge (--status-role-system-bg/-fg, exact match to
   the mockup's --purple/--purple-light) rather than inventing a new color pair. SystemAdmin reuses the
   sibling "Custom" role-type pair (--status-role-custom-bg/-fg, navy) so the two structural badges are
   visually distinct from each other while staying inside the same already-established role-type token
   family -- no new tokens, no hex. Dynamic per-branch roles keep the neutral .chip look untouched. */
.chip--super-admin { background: var(--status-role-system-bg); border-color: transparent; color: var(--status-role-system-fg); font-weight: 600; gap: 4px; }
.chip--super-admin .icon { width: 13px; height: 13px; }
.chip--system-admin { background: var(--status-role-custom-bg); border-color: transparent; color: var(--status-role-custom-fg); font-weight: 600; gap: 4px; }
.chip--system-admin .icon { width: 13px; height: 13px; }

/* ---- status dot inside the badge — flat currentColor, no glow, no pulse (mockup .badge-status::before,
   style.css:4949-4958: 6px, currentColor, opacity 0.78, no box-shadow/animation). The P2/P3 badge
   consolidation drops the earlier "active/success" halo + pulse. ---- */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--kp-radius-full);
  background: currentColor;
  opacity: 0.78;
}

/* ---- rows + actions ---- */
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--color-shell-soft); }

.audit-info-icon {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  cursor: help;
}

.empty-state {
  text-align: center;
  padding: var(--kp-space-xl);
  color: var(--color-text-muted);
}

/* The one-property repair that used to live here (text-align only) moved into the shared component sheet on
   2026-09-03 and grew to cover every property this family declares: the grid cell rule outranks the base
   `.empty-state` selector on colour and padding as well, and a repair kept one property at a time in the app
   sheet is a rule the next grid cannot inherit. The empty cell now has ONE owner, beside the cell rule it
   has to beat. */

/* The illustrated empty state (design sweep 2026-08-30, N-P1-13). The mockup draws a grid's empty state as
   a glyph above the sentence in a 48/20 block (its .lookup-empty, which this family replaces by name: the
   package calls it "lookup" because it first appears on those pages, and it is not a lookup component). The
   figure lives beside `.empty-state` rather than in the DesignSystem because that is where this family's
   base rule lives, and a family split across two sheets is a cascade question the next reader should not
   have to answer: the modifier below has to LOSE to nothing and win over the base padding, which it can only
   do from the same file, after it. Any grid may bind to it; the cell hands its own padding over so the two
   never stack. */
.empty-state--figure {
  padding: 0;
}

.empty-state-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
}

.empty-state-figure .icon {
  inline-size: 38px;
  block-size: 38px;
  opacity: .5;
}

.empty-state-figure p {
  margin: 0;
  font-size: .9rem;
}

/* THE EMPTY STATE STAYS IN THE WINDOW THE READER SEES (2026-10-20, Action Reasons page round). The figure
   lives in the grid's one full-colspan cell, and that cell is as wide as the TABLE, which keeps every header
   column at its own width while it is empty: measured at 390px, a 719px (Arabic) / 874px (English) cell inside
   a 356px scroller, so the centred glyph and sentence sat past the scroller's edge -- "No reasons fo" at the
   end of the window, the glyph off it. The empty cell now holds its content to the scroller's visible width:
   the scroller becomes an inline-size container while it holds an empty state, and each part of the figure is
   exactly one container width wide and sticky at the scroller's inline-start, so it stays centred in the
   visible window wherever the grid is scrolled, in both directions (inline-start is the right edge in Arabic).
   The containment is taken only while an empty state is SHOWING (a no-match row that waits behind `.hidden`,
   as the templates list keeps one, does not count): a scroller's width comes from its parent, never from its
   table, so an inline-size container keeps the width it had. A grid whose table fits keeps the same picture
   it had, a figure centred across the whole grid.
   Dated 2026-10-24: every empty cell, text-only ones included (their text sits in a span), takes the same shape. */
.table-scroll:has(tr:not(.hidden) > td.empty-state) { container-type: inline-size; }

/* A sticky box sticks to its nearest SCROLL container, and every grid cell clips with `overflow: hidden`
   (components.css, the cell-containment rule), which makes the cell one: the figure would stick to a cell
   that never scrolls and move with the table. `clip` keeps the same cut at the cell's padding box without
   making the cell a scroll container, so the figure sticks to the grid's scroller. */
.table-scroll td.empty-state { overflow: clip; }

.table-scroll td.empty-state > * {
  position: sticky;
  inset-inline-start: 0;
  box-sizing: border-box;
  inline-size: 100cqi;
}

.table-scroll td.empty-state > span { display: block; }

/* A TEXT CELL HANDS ITS INLINE PADDING TO ITS SPAN (dated 2026-10-24), as the figure cell hands its padding to the
   figure: the sticky box is one scroller width wide and starts at the cell's content edge, so a padded cell held it
   one padding inside the window at rest and ran it the same distance past the other edge (measured at 390px in
   Arabic: the box at 5-361 in a 17-373 window). The text keeps the same inset, now inside the box. */
.table-scroll .table-custom tbody td.empty-state:not(.empty-state--figure) { padding-inline: 0; }
.table-scroll .table-custom tbody td.empty-state:not(.empty-state--figure) > span { padding-inline: var(--kp-space-xl); }

@media (max-width: 767.98px) {
  .table-scroll .table-custom tbody td.empty-state:not(.empty-state--figure) > span { padding-inline: 12px; }
}

/* BELOW 768PX ONLY THE ACTIONS COLUMN STAYS FROZEN (owner ruling 15 #265, dated 2026-10-24). The shared frozen-edges
   family freezes a grid's identity column at inline start as well as its Actions column at inline end; at 390px the
   two frozen columns left about 35px for the rest (Action Reasons measured), so most columns and their sort headers
   could not be reached. Under the tablet tier the identity column scrolls with the others. */
@media (max-width: 767.98px) {
  .table-custom--sticky-edges thead th:first-child,
  .table-custom--sticky-edges tbody td:first-child:not(.empty-state) {
    position: static;
    z-index: auto;
    border-inline-end: 0;
  }
}

/* .pager/.pager-btn/.pager-info moved to KwtPost.DesignSystem/components.css Task 6 -- shared,
   identical across all 5 grid partials, reskinned to the mockup's outline-button language. The
   mobile touch-target override below still applies via source order (site.css loads after
   components.css). */

/* ---- form modal ---- */
.form-section { margin-block-end: var(--kp-space-lg); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--kp-space-md);
}

/* Single-column variant — mockup edit-modal geometry (users.html stacks every field full-width;
   owner parity order 2026-07-23). */
.form-grid--stack { grid-template-columns: 1fr; }

/* ---- The Shipments drawers (ruling 15 #855(a), boards 1-9, 2026-10-29) --------------------------------------------
   Add, Edit and View are the house 760px drawer and Status the 560px one (components.css .modal-drawer). The Add and
   Edit drawer is the shipment's details two fields wide, then the route box: the client mockup's routing section
   (shipments.html :731-760) re-expressed in tokens -- a 12px-round box on a 3% navy wash, its head in navy, two white
   10px-round columns side by side, each led by a pill, the sender's first (ruling 15 #803). Below the 576px step the
   drawer is the whole screen and every grid here is one column. Tokens only; the "to" pill is gold, the brand's own
   accent, where the mockup drew an orange outside the palette (Core Rule 13). */
.shipment-form {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-lg);
}

.shipment-form__section {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-md);
}

/* The View drawer's body: the facts, the route box and the audit rows, 24px apart as the form's sections are. */
.shipment-view {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-lg);
}

.form-section__head {
  display: flex;
  align-items: center;
  gap: var(--kp-space-sm);
}

.form-section__head h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.form-section__num {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  inline-size: var(--kp-space-28);
  block-size: var(--kp-space-28);
  border-radius: var(--kp-radius-full);
  background: var(--color-action-primary);
  color: var(--kp-white);
  font-size: var(--text-ui);
  font-weight: 700;
}

.shipment-form__grid,
.shipment-form__audit,
.shipment-view__facts,
.shipment-route__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kp-space-md);
}

/* The View drawer's weight beside its measures, the measures the wider (board 8: one part to two). */
.shipment-view__measures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--kp-space-md);
}

/* A NON-EDITABLE VALUE (ruling 15 #855(a), boards 7 and 8): its label above it, as an editable field's is, and the
   value as TEXT - never a disabled input - in a box the size of the house field beside it (.form-control: 42px, 13px
   inline padding, the field's border and radius) on the canvas tint, so it reads as fixed and never as a control. An
   identifier or a date is a <bdi dir="ltr"> inside the box, which keeps the page's direction, so the value starts on
   the label's side in both languages; a long name or address wraps inside its box. */
/* A block, as each field's own cell is, so its caption sits on a line the way a field's label does and the box keeps its
   neighbouring field's line in both languages (board 1); as a column of flex items the caption sat 1-2px higher. */
.shipment-readonly {
  display: block;
  min-inline-size: 0;
}

/* A branch or area name wider than its select ends in an ellipsis rather than mid-letter (dated 2026-11-06). The other
   selects of this form and every select outside it keep the default. */
.shipment-form__name-select {
  text-overflow: ellipsis;
}

.shipment-readonly__box {
  display: flex;
  align-items: center;
  min-block-size: 42px;
  padding-block: var(--kp-space-xs);
  padding-inline: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-md);
  background: var(--color-bg-canvas);
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Length x width x height, in that order in both languages (the group is left to right). */
.shipment-dims .form-control { min-inline-size: 0; }

/* The engine's message under the three boxes is a sentence of the page's language, not part of the left-to-right
   group it is inserted into (13-RISKS BSA-V3-DIMS-DIRECTION, ruling 15 #1138; 2026-11-10). Measured that day in
   Arabic: it inherited the group's left-to-right direction and started at the left edge, under the Length box, while
   every other message of the form starts on the right. In Arabic it takes the page's direction back and starts on
   its label's side; English needs no rule, the page and the group already agree there. */
html[dir="rtl"] .shipment-dims .field-error-msg {
  direction: rtl;
  text-align: start;
}

/* The route box and its head (mockup .routing-section, .routing-head). */
.shipment-route {
  display: block;
  padding: var(--kp-space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-xl);
  background: var(--kp-navy-600-a03);
}

.shipment-route__head {
  margin-block-end: var(--kp-space-14);
  color: var(--color-action-primary);
}

/* The head's tracking is normal (the mockup's routing head), not the house heading's -.01em (15 #377(c)). */
.shipment-route__head h6 {
  color: inherit;
  font-size: .95rem;
  letter-spacing: normal;
}

.shipment-route__head .icon {
  flex-shrink: 0;
  inline-size: var(--kp-space-18);
  block-size: var(--kp-space-18);
}

/* The anchor, the two columns and the hint; a long value never widens the box past the drawer. */
.shipment-route__body { min-inline-size: 0; }

/* The route rule paints its sentence right after this empty anchor (the form-validation engine), so the sentence is a
   danger note above both columns. The page script hands the keyboard on from the anchor to the sentence itself, so the
   one admin focus ring (owner order 2026-07-20) is drawn once, around the words to act on. */
.shipment-route__check + .field-error-msg {
  margin-block: 0 var(--kp-space-md);
  padding: var(--kp-space-14) var(--kp-space-md);
  border-inline-start: 4px solid var(--status-alert-fg);
  border-radius: var(--kp-radius-md);
  background: var(--status-alert-bg);
  font-size: var(--text-ui);
}

/* One column of the route (mockup .routing-col): its fields 8px apart, and 12px under the pill (the pill's own 4px on
   top of the gap) - the mockup's .mb-2 fields and .75rem pill margin (15 #377(a)). */
.shipment-route__col {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
  min-inline-size: 0;
  padding: var(--kp-space-14);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  background: var(--color-bg-surface);
}

.shipment-route__col .form-label {
  margin-block-end: var(--kp-space-xs);
  font-size: var(--text-small);
}

/* The column's pill (mockup .routing-col-label): navy for the sending party, gold for the receiving party, each led by
   its Lucide glyph - a dot for the side it leaves from, a pin for the side it goes to - at the 20px the mockup paints
   (its 14px rule misses Lucide's svg), .4rem from its word. 13px type (the approved plan's); English lines at 1.5 and
   tracked .02em as the mockup's, Arabic never tracked (15 #377(c)). */
.shipment-route__pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: .4rem;
  margin-block-end: var(--kp-space-xs);
  padding-block: 3px;
  padding-inline: 10px;
  border-radius: var(--kp-radius-full);
  font-size: var(--text-small);
  font-weight: 600;
}

html[lang="en"] .shipment-route__pill {
  line-height: 1.5;
  letter-spacing: .02em;
}

.shipment-route__pill .icon {
  flex-shrink: 0;
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

.shipment-route__pill--sender {
  background: var(--kp-navy-500-a10);
  color: var(--color-action-primary);
}

.shipment-route__pill--recipient {
  background: var(--kp-gold-500-a12);
  color: var(--kp-stamp-gold-text);
}

/* The hint under both columns: 8px above it and .875em type, as the mockup's; English lines at 1.5 (15 #377(a)). */
.shipment-route__hint {
  margin-block: var(--kp-space-sm) 0;
  font-size: .875em;
}

html[lang="en"] .shipment-route__hint { line-height: 1.5; }

/* The typed side: one field to a row (ruling 15 #855(g)), 8px apart as the rest of the column. */
.party-manual {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
}

/* The View drawer's route column is narrower than the drawer the shared detail list's 130px label column was made for,
   so there each value sits under its label and may take the column's whole width, in the found card's shape. */
.shipment-route .modal-detail-list li {
  flex-direction: column;
  gap: var(--kp-space-xs);
}

.shipment-route .modal-detail-list .detail-label { min-inline-size: 0; }

/* Its own width, at the column's start, so a left-to-right value keeps its ink on its label's side in Arabic too. */
.shipment-route .modal-detail-list .detail-value {
  align-self: flex-start;
  max-inline-size: 100%;
}

/* THE HAND-OVER RECORD BOX (owner rulings 15 #918(b), #920): the route box's geometry on a success surface, its three
   white sub-cards (the collector, the delegation, the steps) and the counter's facts in the drawer's own read-only boxes.
   Lists are two columns, one below 576px as the route's columns are; a long value wraps inside its box and never widens
   the drawer. */
.shipment-handover {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-14);
  border-color: var(--badge-success-border);
  background: var(--status-success-bg);
}

.shipment-handover .shipment-route__head { margin-block-end: 0; }

.shipment-handover__card {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
  min-inline-size: 0;
  padding: var(--kp-space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  background: var(--color-bg-surface);
}

.shipment-handover__caption,
.shipment-handover__card-head {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-weight: 600;
}

.shipment-handover__card-head {
  display: flex;
  align-items: center;
  gap: var(--kp-space-sm);
}

.shipment-handover__card-head .icon,
.shipment-handover__mark .icon {
  flex-shrink: 0;
  inline-size: var(--kp-space-md);
  block-size: var(--kp-space-md);
}

.shipment-handover__person {
  display: flex;
  align-items: center;
  gap: var(--kp-space-14);
  min-inline-size: 0;
}

.shipment-handover__avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--kp-radius-full);
  background: var(--kp-gold-500-a12);
  color: var(--kp-stamp-gold-text);
  font-weight: 700;
}

.shipment-handover__who {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-xs);
  min-inline-size: 0;
}

.shipment-handover__name {
  font-size: var(--text-subheading);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* The kind chip: neutral for the account holder and a non-subscriber, gold with the shield mark for a delegate (the
   recipient pill's gold). In a column stack a chip keeps its own width instead of stretching to the column's. */
.shipment-handover__kind {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--kp-space-xs);
  max-inline-size: 100%;
  padding-block: 2px;
  padding-inline: 10px;
  border-radius: var(--kp-radius-full);
  background: var(--kp-navy-500-a10);
  color: var(--color-action-primary);
  font-size: var(--text-small);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.shipment-handover__kind--delegate {
  background: var(--kp-gold-500-a12);
  color: var(--kp-stamp-gold-text);
}

/* The approving focal point's name on the record box's Authorized Signatory row (15 #1464, #1468 reading 4): the weight
   the boards give a person's name, beside his left-to-right Civil ID. */
.shipment-handover__signatory-name { font-weight: 600; }

.shipment-handover__mark { display: inline-flex; }


.shipment-handover__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kp-space-sm) var(--kp-space-md);
  margin: 0;
}

.shipment-handover .modal-detail-list .detail-value { overflow-wrap: anywhere; }

/* No divider under a list's last row as it is DRAWN (the approved board; the route box's last row has none). The shared
   list drops it on its last child, but here the trailing rows are optional and hidden when empty (the phone, the
   document, the signatory), so that rule landed on a hidden row and the last visible one kept its line. The last visible
   row is the one with no visible row after it; written with sibling combinators because this file measured that an
   `of :not(.hidden)` count did not restyle when a sibling's class changed, and this drawer repaints one record after
   another. */
.shipment-handover .shipment-handover__list > li:not(.hidden):not(:has(~ li:not(.hidden))) { border-block-end: none; }

/* In two columns the last drawn row also holds the visible row before the last one when the visible count is even
   (2, 4 or 6: the collector list has at most three rows and the delegation list at most seven). */
@media (min-width: 576px) {
  .shipment-handover .shipment-handover__list:is(
      :has(> li:not(.hidden) ~ li:not(.hidden)):not(:has(> li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden))),
      :has(> li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden)):not(:has(> li:not(.hidden)
        ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden))),
      :has(> li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden)
        ~ li:not(.hidden)):not(:has(> li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden)
        ~ li:not(.hidden) ~ li:not(.hidden) ~ li:not(.hidden))))
    > li:not(.hidden):has(~ li:not(.hidden)):not(:has(~ li:not(.hidden) ~ li:not(.hidden))) { border-block-end: none; }
}


/* The steps: a vertical list, each led by a success circle with its check, its name over its sub-line, and its time at
   the inline end. */
.shipment-handover__steps {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-14);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shipment-handover__step {
  display: flex;
  align-items: center;
  gap: var(--kp-space-14);
  min-inline-size: 0;
}

.shipment-handover__step-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: var(--kp-radius-full);
  background: var(--status-success-bg);
  color: var(--status-success-fg);
}

.shipment-handover__step-mark .icon {
  inline-size: var(--kp-space-md);
  block-size: var(--kp-space-md);
}

.shipment-handover__step-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-inline-size: 0;
}

.shipment-handover__step-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.shipment-handover__step-sub {
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.shipment-handover__step-time {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: var(--text-small);
}


.shipment-handover__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kp-space-md);
}

.shipment-handover__facts .shipment-readonly__box { overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
  .shipment-handover__list,
  .shipment-handover__facts { grid-template-columns: minmax(0, 1fr); }

  /* The shared list's small-screen rule wraps a row and gives its label the whole main axis; in this box's label-over-
     value COLUMN that axis is the height, so a wrapping row would start a second column beside the label and push a
     long value past the drawer's edge (measured at 360px: the grantor's name ended 24px outside). One column, no wrap. */
  .shipment-handover .shipment-handover__list li { flex-wrap: nowrap; }

  /* And the label takes only its own height. Left at the shared 100% basis, a single-line column inside a stretched grid
     item resolves that basis against the row's whole content height: measured 2026-11-01 at 390px and 360px, the label
     was 48.53px tall in a 73.53px row and every value ended 14px below its own row, across the next row's divider. */
  .shipment-handover .shipment-handover__list .detail-label { flex: 0 0 auto; }
}

/* THE FOUND CARD (rulings 15 #781(b)-(d), #855(d)): the success tint after a search; Edit opens it on the column's own
   surface (the approved Edit board). Its facts, its box and its contact rows each stack label over value. */
.party-card {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-md);
  padding-block: var(--kp-space-md);
  padding-inline: calc(var(--kp-space-md) + var(--kp-space-xs));
  border: 1px solid var(--badge-success-border);
  border-radius: var(--kp-radius-xl);
  background: var(--status-success-bg);
}

.party-card--neutral {
  border-color: var(--color-border);
  background: var(--color-bg-surface);
}

.party-card__found {
  display: flex;
  align-items: center;
  gap: var(--kp-space-sm);
  margin: 0;
  color: var(--status-success-fg);
  font-size: var(--text-ui);
  font-weight: 600;
}

.party-card__found .icon {
  flex-shrink: 0;
  inline-size: var(--kp-space-18);
  block-size: var(--kp-space-18);
}

.party-card__facts,
.party-card__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--kp-space-sm) + var(--kp-space-xs));
  margin: 0;
}

.party-card__box {
  padding-block: calc(var(--kp-space-sm) + var(--kp-space-xs));
  padding-inline: var(--kp-space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  background: var(--color-bg-surface);
}

/* Each label above its value, both in the page's direction; a left-to-right value is a <bdi dir="ltr"> inside the
   value, so it keeps its digit order and starts on its label's side in both languages. */
.party-card dt,
.box-choice__label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-weight: 400;
}

.party-card dd {
  margin: 0;
  margin-block-start: var(--kp-space-xs);
  color: var(--color-text);
  font-weight: 600;
}

/* A company's street and building each on their own line (ruling 15 #855(d)). */
.party-card__address-line { display: block; }

/* A fieldset lays its two choice cards out; its legend stays the rendered legend (not a grid item), so the UA float
   Bootstrap's reboot gives it is taken off. In a route column the two cards stack. */
.party-card__choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--kp-space-sm) + var(--kp-space-xs));
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.party-card__choice legend {
  float: none;
  margin-block-end: var(--kp-space-sm);
  padding: 0;
  font-size: var(--text-ui);
  font-weight: 600;
}

.box-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: calc(var(--kp-space-sm) + var(--kp-space-xs));
  margin: 0;
  padding-block: calc(var(--kp-space-sm) + var(--kp-space-xs));
  padding-inline: var(--kp-space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  background: var(--color-bg-surface);
  cursor: pointer;
}

/* An unselected card answers the pointer as the house's sibling choice card does (.hand-over-choice:hover). */
.box-choice:hover { border-color: var(--color-action-primary); }

.box-choice:has(input:checked) {
  border-color: var(--color-action-primary);
  box-shadow: inset 0 0 0 1px var(--color-action-primary);
}

.box-choice input {
  flex-shrink: 0;
  inline-size: var(--kp-space-18);
  block-size: var(--kp-space-18);
  margin-block-start: var(--kp-space-xs);
  accent-color: var(--color-action-primary);
}

/* Rows 8px apart, the two fact columns 12px apart (the question's required line is painted on the fieldset, after both
   cards). In the drawer's route column a card is about 255px wide, so two equal fact columns left the number 90px and
   a VBX number wrapped at its hyphen, its text pulled off its label's side; the number column takes its own width and
   the branch the rest (ruling 15 #855(a)). */
.box-choice__body {
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--kp-space-sm) calc(var(--kp-space-sm) + var(--kp-space-xs));
  min-inline-size: 0;
}

.box-choice__kind {
  grid-column: 1 / -1;
  font-weight: 700;
}

/* Each fact's label above its value. The value of a number is a <bdi dir="ltr">, and as a grid item it would fill the
   cell and set its text at its OWN start -- the left, away from an Arabic label; start-aligned items keep their own
   width and sit at the grid's start, the label's side in both languages (ruling 15 #781(f)). */
.box-choice__fact {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--kp-space-xs);
  font-weight: 600;
}

/* The engine inserts a field's error line right after the input -- inside the input group, before the Search button
   or between the measure boxes -- and the shared input-group rule gives that line a whole row; ordered last, it sits
   under the whole group (ruling 15 #781(e)).
   Dated 2026-11-10 (owner ruling 15 #1187): every Admin form, no longer the Shipments form alone. Measured on the
   Subscription Plans form in both languages before this date: the Discount line took the second row and pushed the
   "%" box to a third, 84px under its input. */
.input-group .field-error-msg { order: 1; }

/* The Status drawer (board 9): the lead line names the item above the fields, in the body's weight with the number at
   13px/700, and every field 16px below the one before it - the mockup's .mb-3 rhythm; the 4px from a label to its
   field stays (15 #377(a)). */
.shipment-status__lead {
  margin-block: 0 var(--kp-space-md);
  font-weight: 400;
}

.shipment-status__lead .tracking-code {
  font-size: .8125rem;
  font-weight: 700;
}

#shipmentStatusForm .form-section { margin-block-end: var(--kp-space-md); }

/* Below the 768px step the route's two columns are narrow, so a choice card's facts stack, the number above the branch,
   and stay inside the card. The weight and the three measure boxes each take the details grid's whole row there, as
   the client mockup's weight and measures cells do below 768 (shipments.html, col-md-4 and col-md-8): in one of two
   columns each measure box had 33-39px, so its name - the box's only visible name - was cut. */
@media (max-width: 767.98px) {
  .box-choice__body { grid-template-columns: minmax(0, 1fr); }
  .shipment-form__weight,
  .shipment-form__measures { grid-column: 1 / -1; }
}

/* The whole-screen drawer below the 576px step: every grid here is one column. */
@media (max-width: 575.98px) {
  .shipment-form__grid,
  .shipment-form__audit,
  .shipment-view__facts,
  .shipment-view__measures,
  .shipment-route__columns,
  .box-choice__body { grid-template-columns: minmax(0, 1fr); }
}

/* A left-to-right input keeps its digit order; in Arabic its value sits on the end -- the side its Arabic label is
   on -- instead of the far side of the box. English needs no rule: there start is already the label's side.
   Dated 2026-11-10 (owner ruling 15 #1187): every Admin field marked left-to-right, no longer the Shipments form
   alone (measured before this date on the Subscription Plans and Branches forms: text-align start, the number at
   the left edge under a label on the right). The typed value keeps its own direction; only its side moves.
   Dated 2026-11-10 (P5 close audit): a multi-line field keeps its start alignment - code and English prose read from the left - so the rule stops at textareas.
   Dated 2026-11-11 (15 #1187): a measurement found the hand-over card's delegate Civil ID search outside the rule - an
   input in the shared inline search box, without .form-control - its typed digits at the far side of the box; the rule
   now names that box's left-to-right input. Its reach on this date, counted over the Admin views and page scripts: 78
   places that mark a one-line field left-to-right (74 tags in the views, 4 field builders in the Branches schedule
   script), the 8 textarea tags excepted. */
html[dir="rtl"] .form-control[dir="ltr"]:not(textarea),
html[dir="rtl"] .table-search-inline input[dir="ltr"] { text-align: end; }

/* ---- The Announcements drawer's bilingual pairs (the 2026-09-12 page audits) -----------------------
   The drawer declares its fields as PAIRS — Arabic title, English title, Arabic description, English
   description — and the shared auto-fit above resolved to THREE 224px columns inside the drawer's 704px
   grid (3 x 224 + 2 x 16 gap = 704 exactly), which pairs the two titles by accident of ordering and then
   pushes the Arabic description into the title row and leaves the English one alone on the next. Measured
   identical in both languages at 1366 and at 768. Two columns give 344px each, comfortably above the
   shared 220px floor, and put each pair on its own row.
   PINNED HERE rather than by widening the floor, and page-scoped through the drawer's own id — the same
   answer, and the same reason, as the /Profile card's own pin a few rules below: the shared auto-fit is
   right for a narrow modal and over-fits a wide one, and no other surface should move because this one
   did. Below the desktop tier it collapses to one column like every other form grid. */
#annFormModal .form-grid { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 767.98px) {
  #annFormModal .form-grid { grid-template-columns: 1fr; }
}

/* ---- /Profile self-service card (owner findings batch 1 correction, 2026-07-23) ---------------------
   Rebuilt to the mockup's personal-account card (postOffice_Admin_html/settings.html:178-212). The shell,
   header and body reuse the shared .card-custom (components.css); these scoped rules port the few mockup
   values the shared classes don't already supply. */

/* Subtitle under the h5 — mockup .card-header small (settings.html:182): 13px, --text-secondary. Our
   --text-small = 0.8125rem = 13px (== the mockup's --text-small, style.css:22); --color-text-muted =
   ink-muted = the mockup's --text-secondary (#475569). */
.profile-card-subtitle {
  margin-block: var(--kp-space-xs) 0;
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

/* Form labels 13px to match the mockup's settings-card label (.settings-form .form-label, style.css:2120
   -> font-size var(--text-small) = 0.8125rem = 13px, weight 600). CENSUS 2026-07-23: the mockup declares
   NO global .form-label font-size base — it scopes per form context (settings + edit modal = 13px via
   --text-small; login = 14px, style.css:2565). So this stays SCOPED to the profile card; the shared
   .form-label base (0.8rem/12.8px, weight 600, components.css:835) is deliberately untouched. */
.profile-card .form-label { font-size: var(--text-small); }

/* 2-column grid = the mockup's row g-3 / col-md-6 (settings.html:187): strict two columns on desktop, one
   column below the md breakpoint (768px). Pinned here rather than the shared .form-grid auto-fit, which
   would fit 3–4 columns on this full-width (non-modal) card. Gap comes from .form-grid's
   var(--kp-space-md) = 16px == the mockup g-3 gutter. */
.profile-card .form-grid { grid-template-columns: repeat(2, 1fr); }

/* AND THE TRACKS NEED THE FLOOR (first measured on the dashboard's date pair, 2026-09-01).
   A grid item's automatic minimum size is its own content, so `1fr` alone does not make two equal columns
   when the cells hold intrinsic-width controls -- these hold text, email and tel inputs, whose intrinsic
   width is wider than a narrow half-track. The floor is declared on the card's own field items, where the
   two/one-column rule above is scoped, so no other form is touched. */
.profile-card .form-grid > div { min-inline-size: 0; }

@media (max-width: 767.98px) {
  .profile-card .form-grid { grid-template-columns: 1fr; }
}

/* Per-branch role breakdown (branch users only) — a kept data feature the mockup's single role field
   lacks. Branch name is <strong>; role names use the grid's neutral .chip (chip-stack supplies wrap+gap). */
.profile-branch-list { display: flex; flex-direction: column; gap: var(--kp-space-md); }
.profile-branch-row { display: flex; flex-direction: column; gap: var(--kp-space-xs); }

/* Save row — mockup col-12 mt-4 (settings.html:204): 24px top gap; the btn-add is inline-flex so it flows
   at the inline-start with no justify needed. mt-4 == 24px == --kp-space-lg. */
.profile-actions { margin-block-start: var(--kp-space-lg); }

.form-toggles { display: flex; gap: var(--kp-space-lg); flex-wrap: wrap; }

.form-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--kp-space-sm);
  font-weight: 500;
  cursor: pointer;
}

/* The other half of the same control (design sweep pair 2, round 2, 2026-08-30). The 2026-08-27 cursor
   ruling is stated as a MECHANISM -- a control the pointer can reach but cannot use says so -- and the rule
   that delivers it elsewhere is written for `:disabled`, which matches the checkbox alone. On a toggle the
   checkbox is a 13.00x13.00px box inside a 105.20x23.09px label, fourteen times its area, so over the part
   of the control a reader's pointer is most likely to be, the page kept promising an action it would not
   perform. The label is the surface the pointer reaches, so the label is where the cue belongs. Six labels
   in three admin form modals carry this class today; only the admin-user form has a route that disables one
   (ticking the branch-kind flag force-unchecks and force-disables both structural toggles to mirror the
   database's headquarters-only constraint), and that lock IS the interaction telling the reader why a choice
   went away. */
.form-toggle:has(:disabled) {
  cursor: not-allowed;
}

/* And the CONTROL inside that label, 2026-09-11. A toggle's checkbox is a bare input carrying no family
   class, so neither the shared checkbox rule nor the label rule above reached it and the 13x13px box said
   `default` while the words around it said `pointer` -- the affordance inverted exactly where the reader
   aims. `inherit` rather than a repeated value: the label already states both halves, and a control that
   takes its cursor from the label it lives in can never disagree with it in either state.
   Dated 2026-11-11: the five Company document types rule boxes of the Lookups dialog now carry the family class,
   so the family's own cursor rule in the design system decides their cursor (pointer while enabled, not-allowed
   while disabled) - the same two values the label states, so nothing a reader sees changes. */
.form-toggle input {
  cursor: inherit;
}

/* The Lookups dialog's one switch box, 2026-11-11 (Core Rule 13, the admin switch family): the reference's
   Lookups dialog sets its one yes/no in a tinted box, the switch and its help sentence side by side and
   wrapping under each other when the row is narrow, and draws that switch 2.4em x 1.3em, flowing in place
   rather than floated into the label's padding. Measured on the served reference at 1440 and 390, ar and en:
   12px x 14px padding, 6px x 14px gaps, a 1px border, a 10px radius, the label 14.4px weight 600, the hint
   12.8px with no margin. Colours are tokens; the switch's own fills stay the family's. */
.lookup-switch-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px var(--kp-space-14);
  padding: 12px var(--kp-space-14);
  background: var(--color-bg-canvas);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
}

.lookup-switch-box .form-check {
  margin: 0;
}

.lookup-switch-box .form-check-input {
  width: 2.4em;
  height: 1.3em;
  margin: 0;
  float: none;
}

.lookup-switch-box .form-check-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text);
}

.lookup-switch-box .form-hint {
  margin: 0;
}

.section-hint {
  color: var(--color-text-muted);
  font-size: .8rem;
  margin-block: var(--kp-space-xs) var(--kp-space-sm);
}

/* A hint EXPLAINS a field and may be quiet; a sentence that states what an action is about to do may not.
   Owner ruling 2026-08-30 (D37): in the reason dialog the consequence sentence was the smallest text
   present, under a 14px note field, in a dialog whose head carries the destructive intent and whose primary
   button is danger-styled. It takes the family's value size instead. COMPOUND on purpose: (0,2,0) beats
   .section-hint's (0,1,0) wherever the two rules end up sitting relative to each other, which is the lesson
   of the disabled-hit-target pair that fought its own family rule to a draw in July. One declaration only:
   the colour and the spacing are the hint family's and stay there. */
.section-hint.modal-confirm-text {
  font-size: var(--text-ui);
}

.mt-3 { margin-block-start: var(--kp-space-md); }

.multiselect {
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-md);
  padding: var(--kp-space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-xs);
  /* A list that scrolls keeps a Tab's landing a ring's reach inside its own edges (2026-10-21). The browser's focus
     scroll, and the drawer landing in site.js, ask every scroller for the NEAREST scroll, which parks a box flush
     with this list's edge, and the ruled ring reaches 4px past the box: measured at 390px in English, the last role
     of a branch block lost 4.2px of its ring at the bottom. The drawer body's own padding cannot reach a nested
     scrollport, so the family carries its own; every list built on the class has it (the branch role lists, the
     branch drawer's role picker, the booking drawer's subscriber results). */
  scroll-padding-block: var(--kp-space-sm);
}

/* A GROUP OF CHECKBOXES IS A FIELD TOO (the per-field validation standard, 2026-09-13). The engine
   paints `.is-invalid` on whatever element a rule names, and every rule until now named a Bootstrap
   form control -- so the red border rules are written for `.form-control`/`.form-select` alone and a
   flagged options box changed nothing on screen but the message underneath it. Same brand red, same
   danger ring on focus, so the group reads as the same kind of problem as a flagged input. */
.multiselect.is-invalid { border-color: var(--status-alert-fg); }
.multiselect.is-invalid:focus-within { border-color: var(--status-alert-fg); box-shadow: var(--focus-ring-danger); }

/* An empty options host is a stray field-shaped box at rest. While options load the shared loading
   overlay is its child, so it is not empty and shows the skeleton as a marked empty host (2026-09-24).
   A roster with no options renders its own .multiselect-empty child and is not empty. */
.multiselect:empty {
  display: none;
}

/* Pair-1 follow-up, 2026-08-29: role lists inside a drawer use the drawer's own scroll budget. At a
   900px viewport the 60vh cap is 540px, above the measured 468px thirteen-role list, so both matching
   Manage Access drawers show that roster without a nested scroll while shorter viewports stay bounded. */
.modal-drawer .branch-role-block .multiselect { max-block-size: 60vh; }

.multiselect-option {
  display: flex;
  align-items: center;
  gap: var(--kp-space-sm);
  padding: 4px 6px;
  border-radius: var(--kp-radius-sm);
  cursor: pointer;
}

.multiselect-option:hover { background: var(--color-bg-canvas); }
.multiselect-empty { color: var(--color-text-muted); font-size: .82rem; padding: 4px 6px; }

/* Held-but-inactive assignment marker (Task 17): shown checked + disabled, visually muted. */
.multiselect-option--inactive { color: var(--color-text-muted); cursor: default; }
.multiselect-option--inactive:hover { background: transparent; }

.branch-block-search { margin-block-end: var(--kp-space-sm); }

/* ---- per-branch role blocks (accordion, one role multiselect per assigned branch) ---- */
.branch-role-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
}

/* THE HEADER ROUNDS ITS OWN CORNERS; THE BLOCK CLIPS NOTHING (2026-10-21). The block used to clip its overflow
   only so the header's canvas background would follow the rounded border, and the header fills the block, so the
   keyboard ring -- 1px drawn 3px outside the header -- was cut on three sides (4px at the top and both inline
   edges, measured in all four drawers that carry these blocks, both languages, at 1440, 768 and 390px). The header now
   draws its corners inside the border (the block's radius less its 1px border); its bottom corners round only
   while the body is collapsed, the one state in which the header is the block's whole height. Bootstrap's
   collapse animation clips with its own `.collapsing` rule, so nothing else relied on the block's clip. */
.branch-role-block {
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-md);
}

.branch-role-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-start-start-radius: calc(var(--kp-radius-md) - 1px);
  border-start-end-radius: calc(var(--kp-radius-md) - 1px);
  background: var(--color-bg-canvas);
  color: var(--color-text);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
}

.branch-role-block:has(> .branch-role-block-body.collapse:not(.show)) > .branch-role-block-header {
  border-end-start-radius: calc(var(--kp-radius-md) - 1px);
  border-end-end-radius: calc(var(--kp-radius-md) - 1px);
}

.branch-role-block-body { padding: var(--kp-space-sm); }

/* ---- view-mode permissions summary (mockup admin-users.html .permissions-grid/.permission-item,
   css/style.css:5336-5357) -- a per-module granted-verb rollup shown in the dedicated read-only View modal
   (P4 Item 6; adminusers.js renderPermissionsSummary, target #admViewPermissionsGrid). Matches the mockup's
   lucide check-circle/x-circle icons via the house sprite (icon-check-circle / icon-x-circle); 14x14 to
   match the mockup's i[data-lucide] sizing (style.css:5351-5354), overriding site.css's 18px base .icon. */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--kp-space-sm);
}

.permission-item {
  display: flex;
  align-items: center;
  gap: var(--kp-space-sm);
  padding: 8px 12px;
  background: var(--color-bg-canvas);
  border-radius: var(--kp-radius-sm);
  font-size: .82rem;
  color: var(--color-text);
}

.permission-item .icon { width: 14px; height: 14px; color: var(--status-success-fg); }

.permission-item.disabled { opacity: .55; }
.permission-item.disabled .icon { color: var(--color-text-muted); }

.permission-item .permission-count { color: var(--color-text-muted); margin-inline-start: 6px; }

@media (max-width: 640px) {
  .permissions-grid { grid-template-columns: 1fr; }
}

/* ---- P4 last-sweep (owner ruling B5, 2026-07-19): shared status-column centering + the two remaining
   frozen-column grids (BranchUsers, AuditLog). --------------------------------------------------------- */

/* Shared status-column centering across every admin grid (deferred parent-plan item). ONE mechanism: any
   .table-custom status th/td tagged .status-col centers its badge -- migrated from the former per-page
   .branches-table th[data-col="status"] rule so all four status-bearing admin grids (Branches, AdminUsers,
   Roles, BranchUsers) center identically. AuditLog has no status column. Matches the mockup, which centers
   the status cell. Tokens-only, zero-inline. */
.table-custom th.status-col,
.table-custom td.status-col { text-align: center; }

/* The uniform 88px status-badge width (mockup v2 .table-custom tbody .badge-status min-inline-size, 15 #96
   F11) was REMOVED 2026-08-02: the v3 reference badge carries no min-width and sizes itself from its own
   text, and the owner adopted that badge shape in ruling D7/U8 — so #137 supersedes F11 (mockup-v3 restyle
   wave, ledger 15 #137). The centering rule above stays; status badges are now centered AND content-width. */

/* Requests-grid status-column legibility FLOOR (design-review capture, 2026-08-24: an "Approved" pill lost
   its final letter at the cell boundary). MECHANISM: under natural table layout a colgroup-free column can
   compress below its own content width — the
   recorded squeeze failure mode (owner screenshot 2026-07-26; .branches-table .hours-cell is the precedent
   shape). The squeezed cell lets the nowrap pill paint past the boundary, where the NEXT cell's opaque
   zebra background covers the overflow: the visible cut. Status here is BOUNDED vocabulary, so per the
   bounded-value rule it earns a column floor.
   Arithmetic of the widest badge — English binds; Arabic ("قيد الانتظار") measures narrower in Alexandria:
      43px  pill chrome: 14+14 inline padding, 1+1 border, 6px dot + 7px gap
      84px  "Under Review", 12 glyphs at 12px/600 (--text-caption)
      32px  cell inline padding 16 + 16
   = 159px -> 160px. This floors the COLUMN against squeeze only; the pill still sizes from its own text
   (the no-badge-minimum authority is the restyle-waves/U8 ruling -- docs/plans/2026-08-02-admin-mockup-v3-
   restyle-waves.md + intake U8; false source citation corrected 2026-08-25). Container-scoped deliberately:
   sibling grids sharing the
   badge-in-column shape carry different vocabularies and need their own measured floors before any
   wider selector could inherit this value. */
#poboxRequestsTableContainer td.status-col { min-inline-size: 160px; }

/* ---- Badge-column legibility FLOORS, whole admin-grid family (plan P6,
   docs/plans/2026-08-25-post-wave-followups-plan.md, 2026-08-25 measured sweep) --------------------
   Same mechanism as the requests-grid floor above, extended to every grid whose BADGE column can be
   compressed by natural table layout: a column compresses below its own content
   width, and a nowrap badge paints past the cell boundary where the next cell's opaque zebra covers it.
   Status/system here is BOUNDED vocabulary on every grid below, so each earns a COLUMN floor -- never a
   badge min-width (a badge still sizes from its own text, untouched by any minimum; citation corrected
   2026-08-25: the no-badge-minimum authority is the restyle-waves/U8 ruling --
   docs/plans/2026-08-02-admin-mockup-v3-restyle-waves.md + intake U8).
   MEASURED SOURCE: the P6 browser survey, both locales at viewport 1024,
   widest live-badge box per column + the uniform 32px cell inline padding (16+16, computed identical on
   all eleven grids). Arabic binds on 8 of the 14 columns -- Alexandria out-measures Inter on the shared
   inactive pair (غير نشط 90.42/77.42 vs Inactive 88.84/75.84) and on the roles system pair
   (مخصص 98.38 vs Custom 92.66); a floor derived from English alone would sit 1.5-5.7px short there.
   Container-scoped deliberately, like the precedent: td.status-col is a SHARED class across every grid,
   so the bare class must never carry one global value.
   Historical width-pressure consequences were superseded by owner ruling 2026-09-01, supersedes-in-part
   15 #137: every checked column stays rendered and these floors can add wrapper-local sideways overflow.
   Per-selector arithmetic (widest badge + 32 -> floor):
      ann status        en "Scheduled"        104.81 + 32 = 136.81 -> 137
      ann schedule      en "Immediate"         90.77 + 32 = 122.77 -> 123
      shipments status  en "Ready for Pickup" 141.47 + 32 = 173.47 -> 174
      subscribers       en "Suspended"        108.75 + 32 = 140.75 -> 141
      plans x4          en "Inactive"          88.84 + 32 = 120.84 -> 121
      reasons system    en "System"            98.48 + 32 = 130.48 -> 131
      reasons status    ar (inactive pair)     90.42 + 32 = 122.42 -> 123
      adminusers /
      branchusers /
      branches /
      roles status      ar (inactive pair)     90.42 + 32 = 122.42 -> 123
      roles system      ar                     98.38 + 32 = 130.38 -> 131
      lookups options /
      settings legal    ar (inactive pair)     77.42 + 32 = 109.42 -> 110
   Deleted-view carry-in (2026-08-25): #subscribersDeletedTableContainer measured floorless -- computed min-inline-size 0 because this rule was scoped to the live container id only; 141 carries over 1:1 -- both tables are the same page's status-col family and the deleted vocabulary (محذوف/Deleted, one value) is strictly narrower than the live grid's measured widest (en "Suspended" 108.75 + 32 = 140.75 -> 141); the BranchUsers carry-over precedent. */
#annTableContainer td.status-col { min-inline-size: 137px; }
#annTableContainer td[data-col="schedule"] { min-inline-size: 123px; }
#shipmentsGridContainer td[data-col="status"] { min-inline-size: 174px; }
#subscribersTableContainer td.status-col,
#subscribersDeletedTableContainer td.status-col { min-inline-size: 141px; }
#plansTableContainer-vbx-individuals td.status-col,
#plansTableContainer-vbx-companies td.status-col,
#plansTableContainer-pobox-individuals td.status-col,
#plansTableContainer-pobox-companies td.status-col { min-inline-size: 121px; }
#reasonsTableContainer td[data-col="system"] { min-inline-size: 131px; }
#reasonsTableContainer td.status-col { min-inline-size: 123px; }
#adminUsersTableContainer td.status-col { min-inline-size: 123px; }
#branchUsersTableContainer td.status-col { min-inline-size: 123px; }
#branchesTableContainer td.status-col { min-inline-size: 123px; }
#rolesTableContainer td.status-col { min-inline-size: 123px; }
#rolesTableContainer td[data-col="system"] { min-inline-size: 131px; }
#lookupOptionsContainer td[data-col="status"] { min-inline-size: 110px; }

/* THE TWO USER GRIDS TAKE THE SAME REQUIREMENT AS A CELL PADDING RATHER THAN A COLUMN FLOOR (PK-P35p,
   N-P35NV-4). Both are fixed-layout tables, and a `min-inline-size` on a `td` is INERT there -- their
   status cells render the colgroup's 110px, not the 123px above, which was measured directly (the table
   sum is the arithmetic sum of its declared bands to the pixel, with no cell floor adding anything). So
   the badge has been living in a 78px content box: the Arabic inactive pair measures 90.42px, and the
   first admin or branch user anyone deactivates would have shown it cut at the cell boundary. The live
   roster has no inactive user today, which is why this went unphotographed and was settled on font metrics
   instead -- a canvas measurement calibrated against the real render returned 90.41px against the survey's
   90.42px.
   WHY THE PADDING AND NOT THE BAND. At their own content requirements the Admin Users default six need
   394 + 112 + 202 + 123 + 184 + 193 = 1208px against a 1197px budget, and every other one of the five is
   already at or below its own requirement -- the branches band is 41.28px UNDER its widest chip -- so no
   band can release the 11px, and widening status there would reopen the sideways scroll that a measured
   round has just closed. The room comes from this one column's own inline padding instead, page-scoped and
   family-consistent across both grids: 110 - 8 - 8 = a 94.00px content box, 3.58px above the widest badge
   and 1.58px above it after the 2px of clearance these pages' bounds keep. The badge is centred, so the
   trimmed gutter is invisible -- at rest an inactive badge sits 9.79px from each cell edge.
   The two floors above stay as they are: they are the natural-layout form of the same requirement, they
   are never below it, and rewriting them would lose the survey's own arithmetic.

   SWEPT TO THE WHOLE FAMILY 2026-09-01 (PK-P35q, N-P35PV-4). The lever first shipped on two of the FOUR
   fixed-layout grids the survey above derives 123px for, and the live round then photographed the third:
   Branches' English "Active" badge (79.84px) cut through its own rounded end in a 76.45px content box, on
   7 of 7 rows. The fourth, Roles, carries the identical latent inactive-badge shortfall the two user grids
   had -- 80px of box against 90.42px -- unphotographable only because no role in the roster is inactive,
   which is exactly the position Admin Users was in one round ago. A standing rule lands with a sweep of
   every existing surface that shares the shape, not only the one that prompted it, so all four take it:
      Admin Users   110 - 16 = 94.00  >= 92.42   (3.58 over the badge, 1.58 after clearance)
      Branch Users  110 - 16 = 94.00  >= 92.42
      Branches      109 - 16 = 93.00  >= 92.42   (2.58 over the badge)
      Roles         112 - 16 = 96.00  >= 92.42   (5.58 over the badge)
   Branches was the one tight case: at its shipped 108px band the lever left 92.00px, which holds the badge
   but is 0.42px short of the 2px of clearance this family's bounds are kept to. Its band takes one pixel,
   paid out of that table's own pre-existing floor slack rather than out of any other column -- see the
   dated note on `.branch-col-status`. No floor moves anywhere here: padding is not a band, and the one band
   that moved stayed inside a floor that was already above its column sum. */
.adminusers-table tbody td.status-col,
.branches-table tbody td.status-col,
.branchusers-table tbody td.status-col,
.roles-table tbody td.status-col { padding-inline: var(--kp-space-sm); }
/* 15 #190f / PO-19, 2026-09-09: the active STATUS HEADER now paints the label, the direction glyph and the
   24px clear control with its 2px gap -- 47.64 + 14 + 6 + 24 + 2 = 93.64px of ink (the recorded English
   run binds; Arabic asks 30.38). Widening the band would reopen the sideways scroll the 2026-09-01 rounds
   closed on the two user grids (the record above: no other default-visible band can release the room), so
   the header takes the same trimmed gutter its cells already take: 110 - 16 = 94.00px holds 93.64px, the
   heading and the badge stay centred on the same axis, and the 1px outline at its 3px offset lands inside
   the cell's own padding. Roles and Branches move 109 -> 110 for the same content box; no user-grid floor
   moves. Pinned by the design-family governance suite's status-header arm. */
.adminusers-table thead th.status-col,
.branches-table thead th.status-col,
.branchusers-table thead th.status-col,
.roles-table thead th.status-col { padding-inline: var(--kp-space-sm); }
#settingsLegalSections td[data-col="status"] { min-inline-size: 110px; }

/* ---- Branch Users P4 grid: reuses AdminUsers' header strings (AdminUsers.Grid.* + Audit.*), so the
   AdminUsers-measured column widths carry over 1:1 -- same uppercase house-style headers, re-verified with
   no ar/en clip in the P4 live pass. fixed layout + colgroup widths so the shared .table-custom--sticky-edges
   freezes the identity (first) + actions (last) columns while the middle scrolls. min-width = the
   default-visible sum (the four audit columns start hidden). A chooser-hidden <col> gets .col-hidden (site.js
   applyColumnPrefs) and collapses to width:0 via the shared sticky-edges rule.

   THE FLOOR IS THE DEFAULT-VISIBLE SUM, RE-DERIVED 2026-09-01 (PK-P35n, N-P35CV-2) -- the same defect and
   the same correction as the sibling grid's, whose block carries the full account. It was 1276px, the sum
   of SEVEN columns: the five the default view renders plus Phone (140px) and Last Login (152px), which
   became born-hidden without the floor being re-derived. The 292px surplus stretched every column by about
   30%, forced 77px of sideways scroll at a 1536px viewport over a row that fitted the 1199px content box,
   and at rest left the status badge 58% hidden under the frozen action cell (29.61px of 70.58px visible in
   Arabic) with its heading reading as four letters. The floor is now the five rendered columns' sum.

   394 + 210 + 184 + 110 + 193 = 1091.

   RE-DERIVED AGAIN 2026-09-01 (PK-P35p). Two measured defects moved two of those five numbers and a third
   changed what the sum has to equal.
   (a) The branches band was narrower than its own widest chip and the chip painted into the Status cell on
       9 of 12 rows; it is now 256px (the derivation sits on the band itself, below).
   (b) A declared sum BELOW the content box is not free. A fixed-layout table spreads the difference across
       every column in proportion, so 1091px inside a 1199px box inflated all five: the action column
       rendered 214.8px against its 193px declaration and the role stack sat in 233.7px of column around
       120px of chips -- "columns the width is too big for its content so its taking spaces for nothing"
       (owner report, 2026-09-01). The sum is therefore held AT the desktop budget -- the measured 1199px
       content box less the 2px of clearance every bound on this page keeps -- and one designated column
       carries the whole difference: the identity band, which is the only one whose content can use it.
       Every other column then renders within half a pixel of the width it declares: k is 1199/1197 =
       1.0017, so the widest fixed band here -- the 256px branches column -- renders 256.43px.

   428 + 210 + 256 + 110 + 193 = 1197. ---- */
/* 15 #190f / PO-19, 2026-09-09: an active header now carries the 24px clear control and its 2px gap beside
   the label and the direction glyph (every glyph in the header run is in the budget, the recorded design rule). The
   born-hidden date band below takes the width its active header asks for (157.02 -> 158); it sits outside
   the default-visible sum, so this floor stays where the 2026-09-01 derivation put it. The status band is
   the one default-visible sortable band that could not pay 26px out of its own width; its room comes from
   the trimmed header gutter recorded beside the td lever above, and the band itself does not move. */
.branchusers-table {
  min-width: 1197px;
  table-layout: fixed;
}

/* The identity and action bands are the sibling grid's, for the reason its block records: every input they
   are derived from is shared -- the same identity markup and 82.00px first-cell overhead, the same widest
   live-roster address (299.27px in Arabic), and the same three-control action set.
   IDENTITY, re-derived 2026-09-01 (PK-P35n): 299.27 + 12.00 (the measured headroom above the widest live
   value) + 82.00 = 393.27 -> 394px. PK-P35h
   had put the headroom in the 324px tier cap alone, which held only while the stale floor was stretching
   this column past its declared width; the declared band now carries it. The cap below is unchanged and
   still binds here at 1536 (the stretched lane reaches 351.00px and the cap holds it at 324.00px, 24.73px
   above the address), which is exactly the number PK-P35h recorded for this grid.
   ACTIONS, N-P35CV-1: the control run measures 160.50px and the cell owes it both sides of its inline
   padding, so 160.50 + 32.00 = 192.50 -> 193px; the touch tier asks for the same number. At 160px the row
   menu button was cut to 18.50px of its 36px and the scroller reported 18px of scroll range past the
   table's real end.
   IDENTITY IS THIS GRID'S FLEXIBLE COLUMN (PK-P35p, N-OWN-1): its minimum is still the 393.27px the
   derivation above produces, but its DECLARED width is the desktop budget less the four fixed columns --
   1197 - (210 + 256 + 110 + 193) = 428px -- so the surplus that used to be shared out across all five
   lands here and nowhere else. The 324px lane cap below is unchanged and still binds, so the address and
   its ellipsis behave exactly as measured; what the extra width buys is that the other four columns stop
   being stretched. The mechanism is a declared width rather than a width-less <col>, because under
   `table-layout: fixed` a width-less column receives the table's width less the SPECIFIED columns and CSS
   2.1 gives a column box no min-width to stand on: with Phone and Last Login ticked on, the specified
   columns already reach 1093px inside a 1199px scrollport, which would render this column at 106px.
   BRANCHES (PK-P35p, N-P35NV-1): the widest one-line chip measures 211.28px in English (203.88px in
   Arabic) at every band above the 1378.98px wrap tier, and it was painting 25.08px past a 202.20px column
   into the Status cell on 9 of 12 rows. A branch name is live roster data, so the band takes the measured
   headroom above the widest measured value exactly as the address band does:
   211.28 + 12.00 + 32.00 (the cell's inline padding, both sides) = 255.28 -> 256px. Below the wrap tier
   the chips no longer need to wrap at this width, which costs the ruled five nothing there and returns the
   row height the wrap was paying. */
.branchusers-table .bru-col-identity { width: 428px; }
.branchusers-table .bru-col-roles { width: 210px; }
.branchusers-table .bru-col-branches { width: 256px; }
.branchusers-table .bru-col-phone { width: 140px; }
.branchusers-table .bru-col-lastlogin { width: 152px; }
.branchusers-table .bru-col-status { width: 110px; }
.branchusers-table .bru-col-date { width: 158px; }
.branchusers-table .bru-col-audit { width: 130px; }
.branchusers-table .bru-col-actions { width: 193px; }

/* Pair-1 round 3, 2026-08-29: the fit state switches this table to auto layout, so its surviving columns
   bound these elastic lanes. The wide desktop state consumes the full cell; only the middle desktop bands
   receive measured caps. Names wrap, email alone may ellipsize, and role stacks wrap whole chips.
   CORRECTED 2026-08-29 by the ruling block below, which is where the caps now live: the round-3 values sat
   above the content and never bit, so the grid went on shedding columns at every band. The base rules here
   are unchanged and still describe the widths above that block's tier.
   EXTENDED 2026-08-29 (round 5) by two measured defects in these same base rules, both of them about what
   happens to a value too wide for its lane rather than about how wide the lane is:
   1. The name had no break rule, so a single unbroken word wider than the lane painted straight across the
      cell boundary instead of wrapping (measured at 119.94px in a 110px lane). `overflow-wrap: break-word`
      breaks ONLY a word that cannot fit on a line of its own -- ordinary names keep breaking at spaces --
      which is why it is not `anywhere`.
   2. The e-mail was clipped at the WRONG END under the Arabic default: `text-overflow` puts its ellipsis at
      the block's inline end, which in a right-to-left block is the visual left -- the beginning of a
      left-to-right address. All twelve rows read as the same domain and the half that identifies the person
      was the half removed. The clipping block is therefore itself left-to-right, so the ellipsis eats the
      end of the address in both languages; and because a left-to-right box starts on the left, the Arabic
      page realigns it to its end edge so the address still sits directly under the name it belongs to.
      This is the house shape the branch e-mail and the error-log message already use. */
.branchusers-table .admin-identity-text {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.branchusers-table .admin-identity-name {
  white-space: normal;
  overflow-wrap: break-word;
}
.branchusers-table .admin-identity-email {
  direction: ltr;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[dir="rtl"] .branchusers-table .admin-identity-email { text-align: end; }
.branchusers-table .bru-roles-cell .chip-stack { flex-wrap: wrap; }
.branchusers-table .bru-roles-cell .chip { white-space: nowrap; }

/* A ROLE NAME TOO WIDE FOR ITS CHIP IS SHORTENED, AND SAYS SO (owner ruling 2026-09-18, ledger 15 #254).
   The ruling was given on the headquarters roster and reaches this grid the same day, for the reason every
   other bound on this cell is that page's number: the same cell, the same plain chip, the same role
   vocabulary and the same wrap budget -- a capped stack plus a `white-space: normal` override, which is now
   gone from the tier below. A rule that lands on one of two grids built from one pattern leaves the next
   reader with two answers to the same question.

   WHY THE LABEL AND NOT THE CHIP. `text-overflow` applies to a BLOCK container, and a chip is an
   inline-flex box whose bare text is an anonymous flex item -- an ellipsis declared on the chip itself
   paints nothing and the name is cut mid-word with no sign that anything is missing (measured on this
   family on 2026-09-02: the kind pill rendered exactly "Headquarter", one character short, reading as a
   plausible word). The label therefore sits in its own block inside the chip, which CAN carry the ellipsis,
   and the chip's own box and padding are untouched. A flex item's automatic minimum size is its own
   content, so `min-inline-size: 0` is what lets the label shrink far enough to ever show the ellipsis it
   declares. The label declares no direction of its own, so it inherits the page's and the ellipsis lands at
   the inline END in both languages -- the opposite of the identity e-mail above, which is a left-to-right
   value inside a right-to-left page and must declare one.

   The two grids keep SEPARATE selector families here, as they do for the identity text, the stack caps and
   the action column: one grouped selector would tie two budgets that are measured independently. The shape
   is the sibling's, byte for byte. */
.branchusers-table .bru-roles-cell .chip-label {
  display: block;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pair-1 rounds 4 and 5, 2026-08-29 -- OWNER RULINGS, ledger 15 #183, both dated clauses at its end
   (design-sweep rulings D26, D28 and D29).

   THE FIRST RULING (D28), and what it bought. With every role name held to ONE line the role column cannot
   go below its widest chip -- 194.38px in Arabic, 266.31px in English -- and the seven business columns were
   then 33.85px short in English at 1440 before the identity lane got a pixel. The owner let a long role name
   take a second line INSIDE its chip, at word boundaries, at the widths that are too narrow for the columns.
   That drops the English role column to 127.22px (its widest chip's shortest possible width, 95.22px, plus
   the cell) and frees 171px of row.

   THE SECOND RULING (D29), and why this block was re-derived. The first ruling was delivered with a 110px
   user lane, and the measured price of that lane was every single e-mail cut short with an ellipsis -- in
   Arabic, cut at the beginning, so twelve rows read alike. Shown that price, the owner ruled again: at 1440
   show the FULL e-mail and let Phone and Last Login hide, five columns -- User, Roles, Branches, Status,
   Actions -- exactly as 1280 already does. The address is what identifies the person; the two secondary
   columns come back on wider screens where the row can pay for them, and they are in the row's view form
   either way. Owner ruling 2026-09-01, supersedes-in-part 15 #137: this historical column-budget account no
   longer authorizes width-pressure hiding; checked Phone and Last Login now remain rendered.

   THE ARITHMETIC, from the live per-column measurements at 1440/1280/1024 in both languages (records
   `a0-natural.json`, `a0-words.json`, `s3-integrity.json`, `s4-accessonly-fit.json`). A column costs its
   content plus its cell: a role column is its stack plus 32px of grid-cell inline padding, and the first
   cell adds a 38px icon and a 12px gap, measured together as exactly 82.00px. Measured minimum column
   widths, English then Arabic: user lane + 82.00; roles 127.22 / 97.25; branches 243.28 / 235.88; phone
   130.17 / 130.17; last login 122.16 / 98.28; status 123.00 both (its badge floor); actions 191.27 / 192.50.
   The widest address measures 286.64px in English and 299.27px in Arabic. Content boxes: 1118px at 1440,
   958px at 1280, 966px at 1024.

   THE CAPS: user lane 324px, role stack 120px. The former 304px lane was the largest value the retired fit
   ladder could afford, but it left only 304 - 299.27 = 4.73px above the widest live address. PK-P35h gives
   every fixed-layout full-content identity lane measured headroom instead: the colgroup width and table floor
   both gain 20px, and this cap gains the same amount, leaving 324 - 299.27 = 24.73px in the declared lane
   budget. Width pressure now scrolls inside .table-scroll (C47), so the old fit-ladder ceiling no longer
   constrains this full-content column. The
   120px stack sits 24.78px above the widest single word a chip must hold (`Reconciliation`, 77.23px at the
   chip's 11.52px text, plus the chip's 18px padding and border), so a second line always starts at a space.

   HISTORICAL MEASUREMENT, per band per language. At 1440 the former width-fit pass shed phone then last login and
   stops: User, Roles, Branches, Status, Actions, with 64.59px of spare in English and 88.10px in Arabic. At
   1280 and 1024 it sheds status as well and keeps BRANCHES, as ruling D26 orders: 27.59px / 51.10px of spare
   at 1280 and 35.59px / 59.10px at 1024. (CORRECTED 2026-08-30, the owner's branch-cell rulings of that day: it no longer sheds
   status there. D26 chose between Status and Branches for a row that could not hold both; with the branch
   chips wrapping inside their floor below 1379px the row holds BOTH, so the middle bands render the same five
   columns the 1440 row does, in either sort state. The spare figures above describe the four-column row and
   are kept as the record of what was measured then.) The narrow-actions view of the same grid keeps at least 27.49px of
   spare in all six of its states, so no state rested inside the former pass's one-pixel tolerance. NO address is
   cut at any band in either language -- the widest is now 24.73px inside the declared cap -- which is the second ruling
   delivered. All seven columns need a 1305.74px box in English and 1258.35px in Arabic, which is a viewport
   of roughly 1628px and 1581px if the page chrome stays the 322px measured at 1280 and 1440 (an estimate:
   nothing above 1440 has been measured).

   THE COST that is still visible, stated because it is: a role name too long for the 120px stack still takes
   a second or third line, so a row carrying several long roles is taller than a plain one. Every name now
   fits on ONE line, which removes the wrapped-name rows the narrower lane produced.

   SCOPE: ONE tier, reaching the widest measured band. Above it nothing changes -- the chip keeps the nowrap
   of its base rule and the lane keeps the whole cell -- so whole one-line role names survive at the widths
   that can pay for them, which is exactly how the first ruling scopes itself.

   CORRECTED 2026-08-29 (round 6) -- THE CEILING. The tier above reached 1440px because that was the widest
   band anyone had measured, not the widest band that needs the caps, and the difference was visible. Above
   the tier the chip returns to its base one-line rule, so the roles column's floor jumps from 127.22px to
   298.31px in English and from 97.25px to 226.38px in Arabic: one extra pixel of container bought 171.09px
   (129.12px in Arabic) of extra row, the former width-fit pass shed STATUS at 1441 in both languages, and it did not
   give it back until 1546 in English and 1481 in Arabic. A 1536-wide window -- what a 1920-wide screen
   gives at the Windows default 125% scale, the commonest laptop window there is -- therefore showed FEWER
   columns than a 1440-wide one, and the rows changed height at the same pixel. Widening a window must never
   take away a column the narrower window had.
   The ceiling below is derived, not chosen. Un-capped, the five ruled columns cost
   368.64 + 298.31 + 243.28 + 123.00 + 191.27 = 1224.50px in English and 1159.02px in Arabic; the page
   chrome measures 322px at every width from 1439 to 1800; and the row is held to the same 2px of clearance
   as the caps are. So the first viewport that can pay for the ruled column set WITHOUT the caps is
   1224.50 + 322 + 2 = 1548.50px, and the tier ends immediately below it, at 1548.98px. Arabic reaches the
   same point at 1483.02px, so the English figure covers both languages with 65.48px to spare -- Arabic
   simply keeps its (already two-line) chips a little further up the scale. Nothing inside the tier moves:
   1440, 1280 and 1024 all sit below the old ceiling, so every number in the paragraphs above still holds.
   Between 1441 and 1548 the row can now pay for SIX columns -- the five above plus Last Login -- with
   50.43px of spare in English and 97.82px in Arabic.

   CORRECTED 2026-08-29 (round 6) -- TWO NUMBERS ABOVE WERE ESTIMATES AND ARE NOW MEASURED. All seven
   columns return at a 1800px viewport in English and 1712px in Arabic, not the roughly 1628px / 1581px
   estimated above: that estimate carried the CAPPED roles column into widths where the cap does not apply,
   and the chrome it assumed (322px) is now measured across the whole range rather than assumed. The Arabic
   tallest row, which could only be bounded at the time, measures 165.59px -- identical to English, and
   69.07px shorter than the row this package replaced.

   EXTENDED 2026-08-29 (round 6, second package) -- THE COLUMN BUDGET MUST NOT DEPEND ON WHO IS
   LOOKING. The last cell builds its row menu only for a viewer who holds the edit or the delete
   right, so a view-only viewer gets one control fewer there and that cell's min-content measured
   151.27px in English and 152.50px in Arabic against 191.27px and 192.50px for a viewer who sees the
   whole set -- 40.00px narrower in both languages. The second ruling above is written for the PAGE
   (at 1440 show the full e-mail, Phone and Last Login hide), not for one viewer's rights; but the
   narrower row could pay for Last Login, so at Arabic 1440 a view-only viewer saw SIX columns, and
   the slack the table then distributed left the capped role stack rendering at 84.58px with 9 of its
   16 chips on four lines and a 217.39px tallest row -- the second ruling missed, and the first
   ruling's word (a second line) missed with it, in one state out of twelve.
   The floor below fixes the cause rather than that state: the actions content reserves the width of
   the FULL action set in every view. 160.5px is the widest measured cell, 192.50px, less the 32.00px
   of grid-cell inline padding, so the actions column costs 192.50px whoever is looking and every
   state re-sums to the state that was measured for the full set. Derived from those measured floors,
   and the same in BOTH views: at 1440 the row is 1054.64px in English with 63.36px of spare and
   1029.90px in Arabic with 88.10px; at 1280 it is 931.64px / 906.90px with 26.36px / 51.10px; at
   1024 the same two rows against a wider box, 34.36px / 59.10px. Five columns at 1440, four at the
   two middle bands, no address cut at any band, tallest row 165.59px throughout, and the tightest of
   all twelve states is 26.36px -- far outside the former pass's one-pixel tolerance. The full-set English
   cell grows 1.23px (159.27 -> 160.50), which is the whole difference between these spares and the
   ones recorded in the paragraphs above.
   TWO BOUNDS, stated rather than left to be discovered. (1) The floor lives INSIDE this tier only.
   Above it no floor applies and none is needed: a view with fewer controls costs LESS row, so it can
   only ever afford MORE columns than the full set does, never fewer, and the full set already
   affords the ruled five at every width from the ceiling upward. (2) Historically, below 992px the former
   pass stood down and this grid returned to its own fixed layout, where a column's width comes from its
   colgroup rather than from its content; the floor changes no column there, it only makes the
   reduced action set ask for the same content width the full set already asked for.

   EXTENDED 2026-08-29 (round 7) -- THE ROLE STACK KEEPS ITS CAP WIDTH WHEREVER THE ROW CAN RE-ADMIT
   A COLUMN. The cap above bounds the stack from ABOVE and nothing bounded it from below, so the
   table's own slack distribution could squeeze it down to its TRUE minimum -- one chip's widest
   WORD, 65.25px in Arabic and 95.22px in English -- wherever the former width-fit pass found a use for the
   room. Inside this tier it did. Between the ruled five-column row and the container there is 60 to
   120px of slack from about 1449 upward, and the pass spent it re-admitting Last Login while the
   stack collapses to pay for it: measured, at Arabic 1449 the grid gains a sixth column, the stack
   renders at 65.25px, role chips break onto four, five and SIX lines, and the tallest row grows from
   165.59px to 251.92px -- the whole twelve-row grid 53% taller for one column of dates. English does
   the same from 1498, with four-line chips and a 217.39px row. The first ruling's word is "a second
   line", so this band was not delivering it.
   THE FLOOR, and it is the CAP'S OWN VALUE. Inside the band below the stack is exactly 120px in
   every state, so the roles column's minimum is 152px (120 + the 32px of grid-cell inline padding)
   instead of the word width, and the stack can no longer be spent. Derived from the same measured
   column floors used above: the ruled five-column row becomes
   368.64 + 152 + 243.28 + 123.00 + 192.50 = 1079.42px in English and
   381.27 + 152 + 235.88 + 123.00 + 192.50 = 1084.65px in Arabic, which both fit the 1119px box at
   1441 with 39.58px and 34.35px of spare. Last Login then returns only where the row can pay for it
   outright -- at a 1524px viewport in English and 1505px in Arabic -- and at 1548, the last width in
   the tier, that six-column row still fits with 24.42px / 43.07px of spare. Phone cannot return
   inside the tier at all: all seven columns cost 1331.75px (English) and 1313.10px (Arabic) against
   a 1226px box there, 105.75px and 87.10px too much. Nothing above the tier moves, because the band
   ends on the same pixel the tier does.
   WHY THE FLOOR STARTS AT 1441 AND NOT AT THIS TIER'S FIRST PIXEL. The bands at and below 1440 are
   the ruled, measured states of the two rulings above and this change does not re-open them. The
   floor would in fact be affordable at 1440 -- the same row against the 1118px box leaves 38.58px in
   English and 33.35px in Arabic, and the ladder already sheds Last Login there with or without it --
   but it cannot be paid at the two MIDDLE bands, which is the whole reason it is scoped instead of
   written for the tier. At Arabic 1280 the floored row measures 961.65px against a 958px box, 2.65px
   past the point where the ladder sheds again, and the only candidate left there is BRANCHES, which
   ruling D26 keeps on screen; at English 1280 it measures 956.42px, inside the box but with
   1.58px of spare, under the 2px of clearance every cap on this page is held to. A floor is scoped
   to the widths that afford it, never dropped for a whole tier because its narrowest band cannot pay.

   CORRECTED 2026-08-29 (round 7). The round-6 ceiling clause above ends "Between 1441 and 1548 the
   row can now pay for SIX columns -- the five above plus Last Login -- with 50.43px of spare in
   English and 97.82px in Arabic". Those two spares are the figures AT 1548 and the sentence reads as
   though they held across the band. Measured this round: the sixth column arrives at 1498 in English
   and at 1449 in Arabic -- and in Arabic that is 32px earlier than any figure the record carried --
   so between 1441 and the arrival width the row carries FIVE columns, and from the arrival width up
   it carried the sixth by squeezing the role stack rather than out of spare. The floor above is what
   makes the sentence true: from 1441 the row carries five, and the sixth arrives at 1524 / 1505 with
   the stack untouched.

   CORRECTED 2026-08-29 (round 7). "The tightest of all twelve states is 26.36px -- far outside the
   ladder's one-pixel tolerance", in the paragraph above, is true of THOSE TWELVE STATES and was read
   as true of the page. It was not: at Arabic 1449 and English 1498 the row measured 1.17px and
   0.80px OVER its container's minimum and the grid rendered with a live one-pixel horizontal
   residual, the ladder's tolerance spent in full. Those two widths are inside the band the floor
   below now covers, and with it the residual is gone. The twelve states' own figures are unchanged.

   DATED CORRECTION 2026-09-01 (PK-P35c, N-P35E-2): the 160.5px row-actions minimum that once sat beside
   these still-live identity and role-stack bounds belonged only to the retired fit ladder. It is removed;
   a frozen action cell must fit the column the table allocates rather than paint phantom scroll beyond it.
   CORRECTED THE SAME DAY (PK-P35n, N-P35CV-1): removing that minimum was right, but the sentence after it
   was written as a rule the code did not yet keep. Measured on this grid in both languages, the cell did
   NOT fit its column -- 160.50px of controls in a 160px band -- so the last control was cut and the
   scroller carried 18px of range past the table's real end. The requirement belongs to the COLUMN, not to
   the cell's contents: the actions band is now 193px, which is the 160.50px control run plus both sides of
   the cell's inline padding. The sentence above is true as of that change.

   DATED CORRECTION 2026-09-18 (owner ruling, ledger 15 #254, widened to this grid the same day). Every
   sentence above about a role name taking a SECOND line inside its own chip is history: the role chip no
   longer wraps at all, and the `white-space: normal` override that produced those lines is gone from this
   block. A long seeded name on the sibling grid took a THIRD line at the Arabic default and grew every
   sibling cell in its row with it; the owner chose truncation with the whole name on hover over a wider
   budget, and the same cell on this grid is bound by the same mechanism. The CAP is unchanged and still
   means what it says -- it decides how wide the stack may grow, and the chip now shortens at that width
   instead of wrapping inside it -- so this grid's column budget and the floor below are untouched. The
   truncation rule itself lives with the base pair above, beside the label block that carries its
   ellipsis. */
@media (max-width: 1548.98px) {
  .branchusers-table .admin-identity-text { max-inline-size: 324px; }
  .branchusers-table .bru-roles-cell .chip-stack { max-inline-size: 120px; }
}

/* The floor from the round-7 clause above: the part of the tier where the row has slack to re-admit a
   secondary column, and therefore the only part where the stack needs a floor as well as a cap. The two
   values are equal on purpose -- inside this band the stack is one fixed 120px box, not an elastic one. */
@media (min-width: 1441px) and (max-width: 1548.98px) {
  .branchusers-table .bru-roles-cell .chip-stack { min-inline-size: 120px; }
}

/* Owner rulings D38 and D38-b (2026-08-30; ledger 15 #183) -- the branch chips wrap, and the stack under
   them takes a floor. Historically, two recorded rules met in one state and pointed opposite ways: the
   width-fit pass preserved the sorted column, while D26 kept Branches on screen at middle widths, so a grid
   sorted by Status kept Status and shed Branches -- at 1280 and 1024, in both languages, on the page whose
   whole subject is branch access. A cap could not settle it, because a branch chip inherits one whole line
   from the base chip rule and the widest chip is therefore the column's own minimum. The lever is the WRAP,
   and with it the five ruled columns (user, roles, branches, status, actions) hold in BOTH sort states at
   both middle bands, with no overflow, no clipped chip and no shortened address in any of the eight
   measured states -- which is what makes this page's Branches lock affordable at last.
   THE FLOOR IS THIS PAGE'S OWN, AND IT DIFFERS BY LANGUAGE, because these chips carry a leading branch
   icon and are 18px wider than the sibling grid's for the same names: 203.88px against 185.88px in Arabic,
   211.28px against 193.28px in English. That extra width costs this grid a whole line at any given floor,
   so the ruled bar -- two lines in Arabic, three in English -- is reachable at 1024 and NOT at 1280, where
   no floor that also keeps Branches under a Status sort gets there. Each language therefore takes the
   LARGEST floor that keeps Branches at the tighter band, which is also the value that meets the bar at the
   wider one, so one number per language serves both: Arabic 130px (three lines at 1280, TWO at 1024) and
   English 114px (four lines at 1280, THREE at 1024). Measured at those floors, all eight middle-band states
   render the five ruled columns with 0 overflow, 0 clipped chips and 0 shortened addresses of twelve. The
   cost is row height and it is the real price of the column: the tallest row goes from 166.59px to 252.92px
   in Arabic at 1280 and 235.66px at 1024, and to 218.39px / 201.13px in English -- because the branch
   floor takes its width from the ROLES cell next door, which this grid does not floor below 1441px, so that
   stack is spent down toward its widest word (98.91px and 105.59px of cell in Arabic, 127.66px and 133.14px
   in English) and the role chips wrap further. Arabic at 1280 is the tightest state on either grid: the
   five-column row costs 381.27 + 97.25 + 123.00 + 162.00 + 192.50 = 956.02px against a 958px box, so it
   fits by 1.98px -- less than the 2px of clearance the caps here are held to, and it is the direct
   consequence of taking the largest floor that keeps the column. It is measured, not derived: the sweep
   records 0 overflow at 130px and Branches shedding at 135px.
   WHY THE TIER ENDS WHERE IT DOES, and why it is not the sibling grid's number. A lock is only an answer
   while the locked set FITS, so the wrap has to cover every width at which the ruled five cannot pay for
   themselves with the chips on one line -- otherwise the lock turns that range into permanent horizontal
   scroll. On THIS grid that costs 368.64 + 127.22 + 123.00 + 243.28 + 192.50 = 1054.64px in English, the
   wider language, plus the page chrome (the content box measures the viewport less 322px at 1280, 1440 and
   1536 alike) and the 2px of clearance every bound on this page is held to: 1378.64px, so the tier ends on
   the pixel below the next whole width. It reaches further than the sibling's ceiling by exactly the width
   the icon adds. 1440 and 1536 are untouched by this block, so ruling D29's five columns at 1440 and the
   measured band interior above 1441 are both unchanged. */
@media (max-width: 1378.98px) {
  .branchusers-table .bru-branches-cell .chip {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  html[dir="rtl"] .branchusers-table .bru-branches-cell .chip-stack { min-inline-size: 130px; }
  html[dir="ltr"] .branchusers-table .bru-branches-cell .chip-stack { min-inline-size: 114px; }
}

/* Pair-1 round 4, 2026-08-29. In Arabic at 1280 and 1024 the Reset button wrapped under Apply: the shared
   five-track filter floor gives this page's action cell 172.39px at 1280 and 174.00px at 1024, and the
   Arabic pair (تطبيق + إعادة تعيين) measures 193.67px there — 21.28px and 19.67px too wide. The pair keeps
   the family wording and the family classes (one concept, one word), so the room comes from the buttons'
   own inline padding, page-scoped and only at the bands that are short: 4 x (20px - 14px) = 24px, which
   leaves the Arabic pair at 169.67px — 2.72px of spare at 1280 and 4.33px at 1024. English measures 155.80px
   there and gains the same 24px, so the two languages keep an identical control. The block padding is
   untouched, so the action row's height and its caption strut are unchanged.

   CORRECTED 2026-08-29 (round 5), which re-measured this cell and found the pair still on two rows. The
   193.67px above is Apply + Reset ALONE. The two buttons sit in a flex cell with an 8px column gap, so what
   the track has to hold is 201.67px; the 24px this rule freed left 177.67px against a 172.39px / 174.00px
   track, which is 5.28px and 3.67px SHORT rather than the spare the note claimed. A width requirement for a
   pair of controls includes the container's gap. The lever is unchanged, taken one step further:
   4 x (20px - 12px) = 32px, so the Arabic pair plus its gap rests at 169.67px — 2.72px of spare at 1280 and
   4.33px at 1024, this time with the gap counted. English rests at 131.80px against a 151.03px track at both
   bands, 19.23px clear. Nothing else about the buttons moves.

   CORRECTED 2026-08-29 (round 6): the English figures in the sentence above were a prediction and the
   measurement is smaller on both sides. The action cell is content-sized (it is clamped by the equal-track
   width, not stretched to it), so trimming the buttons' padding narrowed the TRACK with them: the track
   measures 143.03px and the pair 131.80px, leaving 11.23px of spare rather than 19.23px -- unchanged from
   before this rule, and one line in every state. Arabic is exactly as predicted (+2.72px at 1280, +4.33px
   at 1024), which is the number the fix was made for.

   Dated 2026-09-24: the tier this rule sits in is every width below 1400px, not only the bands where the track
   is short; the pressed rule below it (padding-inline: 0 under the lock) covers the same tier, which is why the
   held pair also fits at 442-469, 638-679 and 842-896.

   Dated 2026-09-28 (owner ruling #296): the shared filter pair now rests at this same 12px, with the same zero
   pressed padding, at every width on every page (the pair's own rule in the shared sheet), so these two rules
   restate the family's values in this tier. They are kept beside the 170px floor this page gives its middle
   bands, the one floor narrower than the family's, where the Arabic pair's 169.67px leaves 0.33px at the
   floor itself and 2.72px / 4.33px in the tracks measured at 1280 / 1024. */
@media (max-width: 1399.98px) {
  #branchUsersFilterRow .filter-actions .btn-apply,
  #branchUsersFilterRow .filter-actions .btn-reset { padding-inline: 12px; }

  /* Dated 2026-09-24 (ruling 15 #198c): the pressed button pays for its ring out of this page's padding, the way
     the shared filter family does. The shared lock paints its ring in flow beside the label, 16px plus its 8px
     gap, and the family's own trade for it is a class-only rule that the id-scoped rule above outranks -- so here
     a pressed Apply or Reset kept 12px on each side and grew by 24px, and the Arabic pair (169.67px at rest)
     needed 193.67px in the 172.39px / 174.00px tracks this page gets at 1280 / 1024: Reset dropped under Apply for
     as long as the read was held. 12 - (16 + 8) / 2 = 0, so the pressed button carries no inline padding and
     0 + 16 + 8 + 0 = 12 + 12: the pressed box is the rest box, in both languages, at every width this tier
     covers (every width below 1400px). Nothing at rest moves. The cost stays inside the pressed button: while the
     read is held its ring sits against the inline-start edge and its label against the inline-end edge. This
     rule weighs the same as the one above and wins by coming after it, so it stays in this tier, below that rule. */
  #branchUsersFilterRow .filter-actions .btn-loading { padding-inline: 0; }
}

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.branchusers-table tbody td { background: var(--color-bg-surface); }
.branchusers-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.branchusers-table tbody tr:hover td { background: var(--color-table-row-hover); }
.branchusers-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* ---- Audit Log P4 grid (read-only): the last column carries the View-details row action, so it still
   freezes per the actions-column law. fixed layout + colgroup widths so the shared .table-custom--sticky-edges
   freezes the DateTime (first) + Details (last) columns while the middle scrolls. No default-hidden columns
   (it IS the audit log); actor/action/entity stay chooser-hideable. Widths measured so no header clips ar/en
   at the uppercase house style (P4 live pass). ---- */
.auditlog-table {
  /* 990 -> 1024px, 2026-09-01 (PK-P35q): the date band below takes its content requirement, and this floor
     is documented as the declared sum, so it moves by the same 34px delta. */
  min-width: 1024px;
  table-layout: fixed;
}

/* THE FIRST CELL HOLDS ITS OWN TIMESTAMP (PK-P35q, closing PK-P35p's recorded sibling). This grid renders
   the identical markup and the identical `yyyy-MM-dd HH:mm` format string as the Error Log's frozen first
   cell, so it carries the identical requirement: the widest measured run (119.47px) plus the 12px of
   headroom a full-content column owes above its widest live value plus the fixed 82.00px first-cell
   overhead (a 38px .cell-icon, the 12px .admin-identity gap
   and 32px of cell padding) = 213.47 -> 214px.
   WHY IT WAS RECORDED RATHER THAN FIXED ONE PACKAGE AGO, and why the record was right to keep it open: this
   table's floor sat BELOW the 1199px content box, so at the flagship band it stretches and the column
   rendered about 218px -- clear of the run, which is why no round had seen it. It is short only where the
   table sits at its own floor, and the live round of 2026-09-01 measured exactly that at 1280: 25 of 25
   rows cut by 11px. The new cell clip had also changed the SYMPTOM, from painting over the neighbouring
   column to a silent cut, which is the more dangerous of the two because nothing on screen says a value is
   incomplete. The cost is the floor: sideways scroll at 1280 goes from 47px to 81px, which owner ruling
   2026-09-01 (supersedes-in-part 15 #137) puts inside the wrapper rather than on the page body. */
.auditlog-table .al-col-datetime { width: 214px; }
.auditlog-table .al-col-actor { width: 210px; }
.auditlog-table .al-col-action { width: 260px; }
.auditlog-table .al-col-entity { width: 220px; }
.auditlog-table .al-col-details { width: 120px; }

/* ---- The three middle cells clamp instead of cutting (the 2026-09-12 page audits, Audit Log G3) ---------------------------------------------------------------------------------------------

   Storage allows ActorName 200, EntityName 100 and EntityId 64 characters. Against the bands declared
   above -- 210, 260 and 220px, minus 32px of cell padding -- a long unbroken value has nowhere to go, and
   the grid's shared cell clip removed its tail with no ellipsis and no other sign: a cut audit value reads
   as the whole value, which on THIS page is the reading a compliance reviewer takes away.
   The clamp sits on an INNER block element rather than on the <td>, which is the Error Log message cell's
   own shape and the one that survives a change of table layout: a clamp on the cell itself has a size to
   clamp against only while `table-layout: fixed` holds. The <td> carries the whole value in its `title`,
   and the text node is never shortened, so a screen reader still reads every character.
   Each max-inline-size is its column's declared band: the block cannot be wider than the cell that holds
   it, and naming the same number keeps the two moving together. ---- */
.auditlog-table .al-actor,
.auditlog-table .al-action,
.auditlog-table .al-entity {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auditlog-table .al-actor { max-inline-size: 210px; }
.auditlog-table .al-action { max-inline-size: 260px; }
.auditlog-table .al-entity { max-inline-size: 220px; }

/* The actor cell's person lines under the name (15 #963, #964): the civil ID or an admin's email, then the
   account type and a company's name. They take the identity-cell family's second-line look (.admin-identity-email
   in the markup), and each clamps on its own block exactly like the name above it, the cell's title carrying
   every line whole. The left-to-right line is realigned to its end edge on an Arabic page, so it starts under
   the name it belongs to rather than at the far side of the cell -- the same two-part shape as .al-entity. The
   left-to-right line carries its own class (.al-actor-id) so that realignment names it alone; the account line
   is page-direction text and keeps the page's own alignment. */
.auditlog-table .al-actor-id {
  display: block;
  max-inline-size: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .auditlog-table .al-actor-id { text-align: end; }

.auditlog-table .al-actor-line {
  display: block;
  max-inline-size: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The entity cell is the only one of the three that declares its own direction (it holds an identifier, so
   it is left-to-right inside a right-to-left page). This rule declares no `text-align`, so the property
   computes to `start`, and `start` resolves against the ELEMENT's direction -- the box's left edge, which
   on an Arabic page is the far side of the cell. Realigning the left-to-right box to its end edge puts the
   value back at the start edge its own column heading uses; in English nothing changes, because there the
   two edges are already the same one. The same two-part shape the Error Log message carries. */
html[dir="rtl"] .auditlog-table .al-entity { text-align: end; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.auditlog-table tbody td { background: var(--color-bg-surface); }
.auditlog-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.auditlog-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* ---- Error Log grid (the Audit Log's read-only sibling, wave plan package P2): same shape — fixed layout
   + colgroup widths so the shared .table-custom--sticky-edges freezes the Date/Time (first) and Details
   (last) columns while the middle scrolls. No audit columns exist on this table (ErrorLog is append-only
   and carries no created-by/updated-by pair), so the born-hidden audit-column rule has nothing to apply to;
   user/path/reference stay chooser-hideable and carry fit priorities. ---- */
.errorlog-table {
  min-width: 1384px; /* the seven column widths below, summed */
  table-layout: fixed;
}

/* THE FIRST CELL HOLDS ITS OWN TIMESTAMP (PK-P35p, N-P35NV-3). Measured 2026-09-01 at a verified
   scrollLeft 0, so this was not the frozen column covering anything: the date text painted 31.17px past
   its own cell and landed on the neighbouring User column's glyphs, three rows deep, with the cell
   reporting scrollWidth 181 against clientWidth 149. The mechanism is the first cell's fixed overhead --
   a 38px .cell-icon, the 12px .admin-identity gap and 32px of cell padding, 82.00px in all -- which left a
   67px text lane for a `white-space: nowrap` run measuring up to 119.47px across the three rows in view.
   A log's timestamp is content ruled to render in full, and the run is a sample rather than a bound (the
   format is fixed but its digits are proportional), so the band takes the measured headroom above the
   widest measured value: 119.47 + 12.00 + 82.00 = 213.47 -> 214px. The floor above moves by the same 64px
   delta, which keeps it the declared sum it is documented as.
   THE SIBLING IS NOT FIXED HERE, and the difference is not an oversight. The Audit Log renders the same
   markup and the same format string in a 180px band, 33.47px short of this requirement -- but its floor
   (990px) sits below the 1199px content box, so at the flagship band its table stretches and that column
   renders about 218px, clear of the run. It is short only at the bands where that table sits at its floor,
   and widening it there trades a 47px scroll at 1280 for an 81px one. Recorded for the next package that
   touches that grid's widths rather than taken silently inside this one's fence. */
.errorlog-table .el-col-datetime { width: 214px; }
.errorlog-table .el-col-user { width: 190px; }
.errorlog-table .el-col-source { width: 180px; }
.errorlog-table .el-col-message { width: 320px; }
.errorlog-table .el-col-path { width: 200px; }
.errorlog-table .el-col-reference { width: 160px; }
/* PK-P35n family sweep (N-P35CV-1): 96px for a cell holding the labelled View button, which measures
   80.50px in Arabic. With the cell's 16px of inline padding a side that is 112.50px of requirement against
   96px of column, so the button painted 16.50px past the frozen cell's inline end and gave the scroller
   that much range beyond the table's real end. The value taken is the READ-ONLY SIBLING'S: the Audit Log
   grid carries the identical single-control Details cell at 120px, so one number serves the pair rather
   than two grids deriving their own for the same content. The floor above moves by the same 24px delta,
   which keeps it the declared sum it is documented as. */
.errorlog-table .el-col-details { width: 120px; }

/* The message is UNBOUNDED free text, so the ellipsis is the intended treatment (the .bc-email precedent) —
   the whole sentence lives one click away in the detail drawer and in the title attribute. The clamp sits on
   an INNER block element, exactly as .announcements-table .ann-body does: under natural table layout the
   <col class="el-col-message"> width above is only a HINT, so a clamp on the <td> itself has no size to clamp
   against and the cell simply widens to the whole sentence. The element carries dir="ltr" in the markup (the
   house LTR-cell form its five siblings use); direction here would otherwise inherit the Arabic page's RTL
   and put the ellipsis at the START of the English exception text, hiding the part that names the failure. */
.errorlog-table .el-message {
  display: block;
  max-inline-size: 320px; /* the el-col-message band, so every grid layout clamps at the same width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The right-to-left half of the rule above (2026-08-29, owner rulings of that day, ledger 15 #183 -- the
   same two-part shape the Branches and Branch Users e-mails carry). The comment above explains why this
   element is left-to-right; what it does not say is that the direction has a second consequence. This rule
   declares no `text-align`, so the property computes to its initial value, `start` -- and `start` resolves
   against the ELEMENT's own direction, which is left-to-right, so it means the box's LEFT edge, the far
   side of a right-to-left cell. Measured on the Arabic error-log grid: the two messages short enough not to
   clip sat 122.28px and 123.11px from the cell's start edge, while all fifteen English rows sat at 0.00. The
   thirteen that DO clip fill the box and so look flush, which is why this went unseen. Realigning the
   left-to-right box to its end edge on a right-to-left page puts every message back at the start edge its
   own column heading uses; in English nothing changes, because there `start` and the cell's start edge are
   already the same edge, and the clip itself is untouched -- it still removes the tail in both languages. */
html[dir="rtl"] .errorlog-table .el-message { text-align: end; }

/* The correlation ID takes the message column's treatment, and for the same reason (PK-P35p, N-P35NV-2).
   Measured 2026-09-01 at rest on the Arabic grid: a 32-character ID rendered 268.39px inside a 128.00px
   content box, so it painted 129.27px past its own cell -- 9.27px of that past the TABLE's own inline end,
   which is exactly the 9px of phantom scroll range this grid was reporting and the one grid in the family
   still doing so. Of the 268.39px, 23px was readable: 125.39px lay outside the scrollport and a further
   120.00px sat under the opaque frozen Details cell, so the column showed the last two or three characters
   of every ID -- the least useful end of the one value an operator reads out when chasing an error.
   WHY THE CLAMP RATHER THAN A WIDER BAND. A band that fits would need 273.27 + 32 = 306px and would add
   146px to this table's floor, buying the reader a value they copy rather than read while pushing every
   other column further behind the scroll. The family already answers this shape one column away: the
   message clamps on an INNER block with a deliberate ellipsis and keeps the whole value on the cell's
   title and in the row's detail drawer, which this grid's drawer already renders for the ID. So the cut is
   visible and honest, the readable half is the START of the code, and nothing paints outside its cell. */
.errorlog-table .el-reference {
  display: block;
  max-inline-size: 160px; /* the el-col-reference band, so every grid layout clamps at the same width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The right-to-left half, identical in shape and reason to the message rule above: this box is
   left-to-right, so its initial `text-align: start` means the box's LEFT edge -- the far side of a
   right-to-left cell. Realigning it to the end edge puts the code back under its own column heading. */
html[dir="rtl"] .errorlog-table .el-reference { text-align: end; }

/* The SOURCE column takes the same treatment, for the same reason (PK-P35q, N-P35PV-1). Measured on screen
   2026-09-01: `KnetPaymentsController` needs 204px of cell against this column's 180px band, and
   `LookupCacheInvalidator` 202px -- two rows of twenty. A controller class name is a single unbroken
   identifier, so `white-space: normal` gives the browser no break opportunity and it simply overflowed;
   before the cell clip landed it painted 24px into the Message column, and after it the name stopped dead
   at the boundary with `text-overflow: clip` and no title, so the reader could neither see that the name
   was incomplete nor recover it. That silent form is the worse one, and closing it is what the family clamp
   is for: the ellipsis says a value continues, and the cell's title and the row's detail drawer carry it
   whole. The clamp costs this table's floor nothing, which a band wide enough for the longest class name
   would not -- and a class name has no bound, so no band could be derived for it anyway. */
.errorlog-table .el-source {
  display: block;
  max-inline-size: 180px; /* the el-col-source band, so every grid layout clamps at the same width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .errorlog-table .el-source { text-align: end; }

/* USER AND PATH TAKE THE SAME CLAMP, and this time the family was derived rather than caught by eye
   (2026-09-02). Both render a bare value straight into the cell, so since the shared clip landed a value
   wider than the band is cut with no ellipsis and no way back. Nothing had to be photographed to know they
   can exceed their boxes -- the SCHEMA proves it: the stored user identifier is up to 100 characters
   against this column's ~158px content box, and the request path up to 400 against ~168px. Waiting for a
   long-enough row to appear in live data before treating a value that is bounded to be too long is the
   deferral the containment rule forbids: a package that adds containment to a cell family owes its
   recoverability pass in the same package. The clamp costs the table's floor nothing; a band wide enough
   for a 400-character path does not exist. */
.errorlog-table .el-user {
  display: block;
  max-inline-size: 190px; /* the el-col-user band, so every grid layout clamps at the same width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .errorlog-table .el-user { text-align: end; }

.errorlog-table .el-path {
  display: block;
  max-inline-size: 200px; /* the el-col-path band, so every grid layout clamps at the same width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .errorlog-table .el-path { text-align: end; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.errorlog-table tbody td { background: var(--color-bg-surface); }
.errorlog-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.errorlog-table tbody tr:hover td { background: var(--color-table-row-hover); }
.errorlog-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* THE 30-DAY HINT STARTS WHERE THE SUMMARY STARTS (15 #1247, 2026-11-10). The window hint stands directly
   above the grid summary in the same card, and the summary's padding is the card's inset, so a hint with no
   inline padding put its words on the card edge 16px ahead of every other line in the card. Scoped to this
   page's own container so the other pages that render the same hint keep their place; the block margins
   stay the shared .section-hint family's.
   Dated 2026-11-10: two more lines take the same inset. The Error Log's older-records line (owner ruling 15 #1281)
   stands beside the window hint in the same card; and the Payments page's window hint, which sat on its card edge
   16px ahead of the grid summary below it (measured at 1440 and 390 in both languages), each scoped to its own
   container as the first one is. */
#errorLogTableContainer [data-role="grid-window-hint"],
#errorLogTableContainer [data-role="grid-older-records-hint"],
#paymentsTableContainer [data-role="grid-window-hint"] {
  padding-inline: var(--kp-space-md);
}

/* The detail drawer's two raw-text blocks (message + stack trace). A <pre> is the right element — a stack
   trace is meaningless with its line breaks collapsed — but the UA default is an unwrapped monospace block
   that would scroll the drawer sideways, so the wrap and the scroll bound are set here. Tokens only. */
.errorlog-detail-text {
  margin: 0;
  padding: var(--kp-space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-sm);
  background: var(--color-shell-soft);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: start;
}

.errorlog-detail-trace {
  max-block-size: 320px;
  overflow-y: auto;
}

/* ---- Announcements grid (the wave plan, package P3). The table keeps the shared auto layout — the six
   visible columns fit a desktop without the fixed-layout + colgroup machinery the wider grids need — so the
   only page-scoped rules are the description clamp and the sticky-edge backgrounds. ---- */

/* DATED CORRECTION 2026-09-26 -- "the six visible columns fit a desktop" above is not true of every row, and
   the layout choice it explains is unchanged. Measured at 1440 px in English: once a description reaches its
   360 px clamp, which every English body on the measured dev fixture did, the default columns sum to 1204.45 px
   inside a 1103 px scroller (a shorter body narrows that sum), so the grid scrolls sideways inside its own
   wrapper and, at rest, the Status column sits about 100 px under the frozen Actions band. That scroll is
   the shipped behaviour (the grid-overflow ruling of 2026-09-01: every checked column renders, the grid's
   wrapper owns the overflow, Actions stays frozen at the inline end); only the sentence was wrong. Arabic at
   the same width fits its 1103 px scroller. */

/* The description is UNBOUNDED free text (up to 2000 stored characters), so the ellipsis is the intended
   treatment (the .bc-email precedent) — the whole text lives one click away in the row's drawer and in the
   cell's title attribute. The clamp sits on an INNER block element because a table cell under auto layout
   widens to its content instead of honouring a max size, which is what .bc-email does for the same reason. */
.announcements-table .ann-body {
  display: block;
  max-inline-size: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.announcements-table tbody td { background: var(--color-bg-surface); }
.announcements-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.announcements-table tbody tr:hover td { background: var(--color-table-row-hover); }
.announcements-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* ---- Admin Users P4 grid (mockup admin-users.html): fixed layout + colgroup widths so the shared
   .table-custom--sticky-edges freezes the identity (first) + actions (last) columns while the middle
   scrolls (owner ruling B5, 2026-07-19). .table-scroll (overflow-x) provides the horizontal scroll. Widths
   sized so no uppercase header clips in ar or en (measured in the P4 browser pass). B1: a chooser-hidden
   <col> gets .col-hidden (site.js applyColumnPrefs) and is collapsed to width:0 by the shared sticky-edges
   rule.

   THE FLOOR IS THE DEFAULT-VISIBLE SUM, RE-DERIVED 2026-09-01 (PK-P35n, N-P35CV-2). It was 1388px, which was
   the sum of EIGHT columns -- the six the default view renders plus Phone (140px) and Last Login (152px).
   Those two became born-hidden and nobody re-derived the floor, so 292px of it went on buying width for two
   columns that are not there. A fixed-layout table takes the largest of its container, its floor and its
   declared-width sum and shares any surplus across the columns it IS rendering, so the stale floor stretched
   every column by about 27% and forced 189px of sideways scroll at a 1536px viewport over a row that fitted
   the 1199px content box outright. At rest the frozen action cell then masked whatever the surplus pushed
   past the scrollport edge -- measured on the sibling grid as a status badge 58% hidden, and here as a
   truncated Branches heading. The floor below is now the sum of exactly the six columns the default view
   renders, which is 4px inside that content box, so the default view needs no sideways scroll at 1536 and
   the frozen column covers nothing at rest. Deriving it (rather than pinning it) is the machine gate:
   GridColumnBudgetGovernanceTests reads this grid's own colgroup and born-hidden markers and re-sums them.

   394 + 112 + 202 + 110 + 184 + 193 = 1195. */
/* THE FLOOR IS THE DEFAULT-VISIBLE SUM, and since PK-P35p that sum is held AT the desktop budget: the
   measured 1199px content box at a 1536px viewport less the 2px of clearance this page's bounds keep.
   A sum BELOW the budget is not free -- a fixed-layout table shares the difference out across every column
   in proportion, which is how the role column came to sit in 65.2px of space its chips do not use and the
   Kind column in 35.8px of its own (owner report, 2026-09-01). Holding the sum at the budget puts the
   table at its own floor at 1536 and at every narrower band, so each column renders the width it declares
   and the surplus lives in one designated column instead of all six.
   396 + 112 + 202 + 110 + 184 + 193 = 1197. */
/* 2026-09-09 (15 #190f): the active status header takes the trimmed gutter its cells take -- see the
   status-header note beside the td lever -- so the six default bands and this floor are unchanged;
   only the born-hidden Created band grows for its own active header (120 -> 158). */
.adminusers-table {
  min-width: 1197px;
  table-layout: fixed;
}

/* THE IDENTITY BAND HOLDS THE ADDRESS AT ITS DECLARED WIDTH (re-derived 2026-09-01, PK-P35n).
   CORRECTS PK-P35h, whose comment here predicted a 318.41px box with "19.14px of clear headroom": the live
   round measured the lane at 323.25px with 23.98px of headroom. The outcome it claimed was right, its stated
   mechanism was not -- what actually delivered the full address was the stale floor's 27% stretch, not the
   declared band. Re-deriving that floor removes the stretch, so the band itself has to carry the budget:
   the widest live-roster address measures 299.27px in Arabic (286.64px in English, so Arabic binds), a
   column ruled to render its content in full keeps at least 12px above its widest live value,
   and the first cell costs a fixed 82.00px (a 38px .cell-icon, the 12px .admin-identity gap and 32px of cell
   padding). 299.27 + 12.00 + 82.00 = 393.27 -> 394px, a declared lane of 312.00px carrying 12.73px of
   headroom before any stretch. The 324px tier cap below is unchanged and no longer binds on this grid at
   1536 (the lane renders at 313.32px there), which is the point: the headroom is in the declared width now.

   THE ROLES BAND IS TRIMMED TO WHAT ITS OWN CAP CAN ASK FOR. Inside the <=1548.98px tier -- every band this
   page has ever been measured at -- the role chip-stack is capped at 140px in Arabic and 170px in English,
   so the cell can never need more than 170 + 32 = 202px there. The 8px this releases is what puts the
   re-derived floor inside the 1199px content box with clearance; at 1536 it costs nothing, because the stack
   renders at its cap either way. Above the tier the cap lifts and a one-line chip is wider than this column
   with or without the trim -- an already-recorded condition, not one this value creates.

   THE ACTION BAND HOLDS ITS OWN CONTROLS (N-P35CV-1). It was 160px for a control run measured at 160.50px,
   so the row menu button was cut to 18.50px of its 36px -- under the 36px touch-target floor the button rule
   itself declares -- and the scroller reported 18px of scroll range past the table's real end in every state
   at or above the floor. A cell costs its widest control run plus BOTH sides of its inline padding:
   160.50 + 32.00 = 192.50 -> 193px. The touch tier asks for the same number (its two icon buttons grow
   36 -> 40px while the cell padding drops 16 -> 12px: 168.50 + 24.00 = 192.50), so one value serves both.

   AND THE IDENTITY BAND IS THIS GRID'S FLEXIBLE COLUMN (PK-P35p, N-OWN-1). Its MINIMUM is unchanged --
   the 393.27px the address derivation above produces -- but its DECLARED width is now the desktop budget
   less the five fixed columns: 1197 - (112 + 202 + 110 + 184 + 193) = 396px. That is what stops the table
   spreading a surplus over all six, and it costs the address nothing: the declared lane grows to 314.00px,
   14.73px above the widest address instead of 12.73px. */
.adminusers-table .au-col-identity { width: 396px; }
.adminusers-table .au-col-kind { width: 112px; }
.adminusers-table .au-col-roles { width: 202px; }
.adminusers-table .au-col-phone { width: 140px; }
.adminusers-table .au-col-lastlogin { width: 152px; }
.adminusers-table .au-col-status { width: 110px; }
.adminusers-table .au-col-date { width: 158px; }
.adminusers-table .au-col-audit { width: 130px; }
.adminusers-table .au-col-branches { width: 184px; }
.adminusers-table .au-col-actions { width: 193px; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.adminusers-table tbody td { background: var(--color-bg-surface); }
.adminusers-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.adminusers-table tbody tr:hover td { background: var(--color-table-row-hover); }
.adminusers-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* Last-login cell: timestamp over a muted IP subtitle (mockup .last-login span + small, style.css:5086).
   Overrides the shared single-line .table-custom .last-login (components.css) for this grid only.

   CORRECTED 2026-08-30 (design sweep pair 2, round 1). This rule is unchanged; what changed is the element
   it lands on. The class used to sit on the CELL, and this selector names the table AND the class -- one
   class more than the shared chooser rule that hides a column -- so it outranked it. Whenever the chooser
   hid Last Login the header went
   and the cells stayed: the body then rendered one cell more than the header row, and from that column
   onward every cell sat one slot away from the heading above it. Measured on a default load at every
   desktop width in both languages, with the status badge reading under the actions heading and the row's
   buttons hanging past the last header. The class now sits on an inner block inside the cell -- the house
   shape for laying a cell's contents out, the same one the identity stack and the error-log message clamp
   use -- so the cell itself is free to be hidden by the one class that hides every other cell. */
.adminusers-table .last-login { display: flex; flex-direction: column; line-height: 1.3; }
.adminusers-table .last-login .last-login-ip { color: var(--color-text-muted); font-size: .72rem; }

/* ---- Admin Users column budget (owner rulings 2026-08-29, ledger 15 #183 -- design-sweep rulings D26,
   D28 and D29; applied to this grid 2026-08-30). ----

   THE DEFECT THESE RULES ANSWER. On the page ABOUT admin users, three of its eight columns survived at
   1440 and two at 1280 and 1024, in both languages, with zero horizontal overflow: the ladder had spent
   every candidate it had. The cause was the identity cell. Its e-mail could not be shortened -- no clip
   rule reached this grid -- so the widest address in the roster was part of the column's own minimum, and
   the column measured 381.27px in Arabic and 368.64px in English whatever the row could afford. A ladder
   can only shed a column; it cannot make one narrower. So it shed Kind, Roles, Branches, Phone and Last
   Login, and the reader was left with a roster that showed neither an admin user's kind, nor the roles
   this page exists to manage, nor the branches they work in.

   WHY THESE ARE THE SIBLING GRID'S NUMBERS RATHER THAN NEW ONES. The rulings are FAMILY rulings, and every
   input the sibling's bounds were derived from is shared with this grid: the same identity markup (a 38px
   icon, a 12px gap and 32px of cell padding, measured together as 82.00px), the same e-mail rule at the
   same size, the same widest address in the roster (`persona.shipments.singlebranch@baridy.gov.kw`,
   measured there at 299.27px in Arabic and 286.64px in English), the same role vocabulary, the same status
   badge and the same three-control action set (View, the audit stamp, the row menu). The un-capped
   identity column here measures 381.27px and 368.64px -- exactly that widest address plus the 82.00px of
   first-cell overhead -- which is the arithmetic agreeing with itself across two independent captures.

   WHAT IS DERIVED, AND WHAT IS NOT. PK-P35h supersedes the old exact-fit claim: the 324px declared lane
   budget holds the widest address with 24.73px of room in Arabic, while the measured default-state box gains
   20px from 298.41px to 318.41px and clears the 299.27px address by 19.14px.
   CORRECTED 2026-09-01 (PK-P35n): those last two figures were a PROJECTION, and the live round measured the
   box at 323.25px with 23.98px of headroom instead -- because the box was not 20px wider than before, it was
   the stale table floor's ~27% stretch of a 320px band. The outcome was right and the mechanism was not, and
   the mechanism is what the next reader would have reused. Both are now moot on this grid: the floor is
   re-derived to the default-visible sum, so the stretch is gone and the identity band declares 394px (299.27
   + 12.00 of measured headroom above the widest live value + the 82.00px first-cell overhead) outright.
   At 1440 the five ruled columns -- User, Roles, Branches, Status,
   Actions -- fit the measured 1118px box, because this grid's roles and branches cells cannot cost MORE
   than the sibling's (its roles cell renders at most three chips and a count, and its branch chips carry
   no icon), and the sibling's own five-column row measures 1084.65px in Arabic and 1079.42px in English
   there. NOT derived, and deliberately not claimed: the survivor set and the count of shortened addresses
   at 1280 and 1024, and under a view-only viewer's narrower row. Those need this grid's own roles and
   branches minimums measured in a browser, which measurement 1 did not capture, and the middle bands
   are exactly where the sibling needed three rounds of correction. They are owed to the next measured
   round; nothing here promises them. */
.adminusers-table .admin-identity-text {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.adminusers-table .admin-identity-name {
  white-space: normal;
  overflow-wrap: break-word;
}
/* The clipping block is itself left-to-right, or the ellipsis eats the START of the address under the
   Arabic default and every row reads as the same domain; and because a left-to-right box starts on the
   left, the Arabic page realigns it to its end edge so the address stays under the name it belongs to.
   The two declarations are one unit -- shipping the first without the second is what left the sibling
   grids' addresses drifting away from their own column's start edge. */
.adminusers-table .admin-identity-email {
  direction: ltr;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[dir="rtl"] .adminusers-table .admin-identity-email { text-align: end; }
.adminusers-table .au-roles-cell .chip-stack { flex-wrap: wrap; }
.adminusers-table .au-roles-cell .chip { white-space: nowrap; }

/* A ROLE NAME TOO WIDE FOR ITS CHIP IS SHORTENED, AND SAYS SO (owner ruling 2026-09-18, ledger 15 #254,
   asked with the business requirements stated silent on it). The chip used to switch to `white-space:
   normal` inside the desktop wrap tier, so a long name took a second line inside its own chip -- and a
   seeded name took a THIRD at the Arabic default, which grew every sibling cell in that row to three lines
   with it. The owner chose truncation with the whole name on hover over shortening the name and over
   allowing three lines.

   WHY THE LABEL AND NOT THE CHIP. `text-overflow` applies to a BLOCK container, and a chip is an
   inline-flex box whose bare text is an anonymous flex item -- an ellipsis declared on the chip itself
   paints nothing and the name is cut mid-word with no sign that anything is missing. That was measured on
   this same family on 2026-09-02, where the kind pill rendered exactly "Headquarter", one character short,
   reading as a plausible word: a way back nobody is told to take is not a way back. So the label sits in
   its own block inside the chip, which CAN carry the ellipsis, and the chip's own box, its padding and any
   leading icon are untouched -- the crown on the structural badges is a separate flex item and is never
   the part that clips. A flex item's automatic minimum size is its own content, so `min-inline-size: 0`
   is what lets the label shrink far enough to ever show the ellipsis it declares.

   NO DIRECTION OF ITS OWN. A role name is ordinary page text, so the label inherits the page direction and
   the ellipsis lands at the inline END in both languages. That is the opposite of the identity e-mail two
   rules above, which is a left-to-right value inside a right-to-left page and must declare its own
   direction or lose the half that identifies it.

   THE CELL, NOT ONE CLASS. Every chip in this cell wears the shape -- the role names and the structural
   badges alike -- because at the two middle bands the stack is bound by the cell rather than by its cap and
   a badge's label can reach the same edge. Scoping a rule to one class while its siblings share the shape
   is how a fix ends up true of its own example and false of the family, which is the correction the
   containment rule above already carries. The "+N" overflow control is the one exception: its text is a
   count, not a name, and it cannot outgrow the cell. */
.adminusers-table .au-roles-cell .chip-label {
  display: block;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The tier is the sibling grid's, and its ceiling is read from the same place: above it the row can pay
   for the ruled columns without any cap, so nothing is capped there and a wider window can never show
   fewer columns than a narrower one. The two bounds inside it are the sibling's measured values -- the
   lane that still holds the widest address, the stack that sits comfortably above the widest single word a
   role chip must hold so a second line always starts at a space.

   DATED CLAUSE 2026-08-30 (owner rulings D38 and D38-b; ledger 15 #183). The role stack's cap is no longer
   the sibling grid's 120px: it is this grid's own measured value, and the two languages need different
   numbers. Seven seeded role names took THREE lines at every band while the row had 24 to 93px of measured
   spare doing nothing, and the tallest row stood at 148.33px against a 68px median. Swept live across 256
   states -- two permission lenses, two languages, four bands, both sort states, eight candidate caps -- the
   survivor set was identical to that state's shipped baseline in every single row and the overflow was
   never non-zero, so the cap costs no column anywhere; what it buys is line count, and it lowers the
   tallest row to 131.06px. Arabic closes every seeded name at two lines from 140px at all four bands.
   English needs 170px, which only the bands whose roles CELL is at least that wide can host: at 1536 and at
   the unsorted middle widths the cell itself tops out at 143.95, 139.58 and 147.58px, so one seeded English
   name keeps a third line there whatever the cap says. Every affected name is test data. The Arabic value
   is the base rule because Arabic is this page's default language, and English takes the companion. The
   floor in the band below stays 120px and is never above either cap, so inside that band the stack is
   elastic between its floor and its cap rather than a fixed box -- see the correction on that block.

   DATED CORRECTION 2026-09-01 (PK-P35c, N-P35E-2): the retired fit ladder's 160.5px row-actions minimum
   is not part of these bounds. The sticky action cell uses its allocated column and may not create phantom
   scroll beyond the table's inline end.
   CORRECTED THE SAME DAY (PK-P35n, N-P35CV-1): that last sentence was a rule, not a description -- it was
   written while the allocated column was 160px and the cell's own controls measured 160.50px, so the cell
   was creating exactly the phantom scroll it forbids: 18px of it, in five separate column states, on both
   user grids, in both languages, with the row menu button showing 18.50px of its 36px. The column now
   declares 193px (the 160.50px control run plus both sides of the cell's 16px inline padding) and the
   sentence describes the code.
   AND THE ROLES CAP BELOW NO LONGER SITS INSIDE A STRETCHED CELL. The floor re-derivation of PK-P35n
   (N-P35CV-2) removes the ~27% stretch this tier's numbers were measured under, so the roles COLUMN was
   trimmed to 202px -- the 170px English cap plus the cell's 32px of padding, which is the widest this cap
   can ask for anywhere inside the tier. Both caps below are unchanged.

   DATED CORRECTION 2026-09-18 (owner ruling, ledger 15 #254). The paragraph above about the chip's SECOND
   line is history: the role chip no longer wraps at all, here or anywhere, and the `white-space: normal`
   override that produced those two lines is gone from this block. A seeded role name took a third line at
   the Arabic default, and the owner ruled truncation with the whole name on hover instead of a wider
   budget. Both CAPS are unchanged and still mean what they say -- they decide how wide the stack may grow,
   and the chip now shortens at that width instead of wrapping inside it -- so the roles column's 202px
   budget, and the arithmetic above that derives it from the English cap, are untouched. What the caps no
   longer buy is a line count, because there is only ever one line; what they still buy is the column. The
   truncation rule itself lives with the base pair above, beside the label block that carries its
   ellipsis. */
@media (max-width: 1548.98px) {
  .adminusers-table .admin-identity-text { max-inline-size: 324px; }
  .adminusers-table .au-roles-cell .chip-stack { max-inline-size: 140px; }
  html[dir="ltr"] .adminusers-table .au-roles-cell .chip-stack { max-inline-size: 170px; }
}

/* The part of the same tier where the row has slack to re-admit a secondary column, and therefore the only
   part where the stack needs a floor as well as a cap: without one the table's own slack distribution buys
   that column by squeezing the chips onto four, five and six lines instead. The two values are equal on
   purpose -- inside this band the stack is one fixed box, not an elastic one.
   CORRECTED 2026-08-30 (the owner's branch-cell rulings of that day): "the two values are equal" is no longer true on this
   grid. The cap above is now 140px in Arabic and 170px in English, so inside this band the stack is
   elastic between this floor and that cap. What the floor is FOR is unchanged and still holds: it stops
   the table spending the stack down to a chip's widest word to buy a secondary column, and a wider cap can
   only push that column's arrival further out, never bring it nearer. */
@media (min-width: 1441px) and (max-width: 1548.98px) {
  .adminusers-table .au-roles-cell .chip-stack { min-inline-size: 120px; }
}

/* Owner rulings D38 and D38-b (2026-08-30; ledger 15 #183) -- the branch chips wrap, and the stack under
   them takes a floor. The collision is the sibling grid's, in the same shape: the ladder never sheds the
   column the reader has sorted BY, D26 keeps Branches at the middle widths, and a reader sorted by Status
   therefore lost the branches of the page about admin users. A cap was measured and is INERT here -- every
   candidate from 100 to 200px left the column at the same 122.30 to 132.86px, because with the chips
   unwrapped the table squeezes it to its own min-content, which is below every one of them. The lever is
   the WRAP. With it the five ruled columns (user, roles, status, branches, actions) measure 948.77px in
   Arabic and 953.36px in English against content boxes of 958px and 966px, in BOTH sort states and under
   both the structural and the Access-only lens -- sixteen measured states, no overflow, no clipped chip,
   not one shortened address -- which is what makes the lock on the Branches header affordable at last.
   THE FLOOR, AND WHAT IT BUYS. Left to itself the wrap costs line count: the widest seeded branch name
   breaks onto four lines and the tallest row grows from 149.33px to 175.86px. 110px is the smallest
   measured value that closes that name at two lines in Arabic and three in English at both middle bands
   under both lenses, and it is the one with the shortest tallest row among the values that do (183.86px at
   1280; 149.33px Arabic and 181.13px English at 1024). The real branch names in the roster stay on one line
   in Arabic; the longest real English name takes a second. Both languages read the same number here,
   because the value that is best for Arabic is also the best English can reach at these bands.
   WHY THE TIER ENDS WHERE IT DOES. Above this width the ruled five pay for themselves with the chips on one
   line -- 368.64 + 127.22 + 123.00 + 225.28 + 192.50 = 1036.64px in English, the wider language, against a
   content box that measures the viewport less 322px at 1280, 1440 and 1536 alike, plus the 2px of clearance
   every bound on this page is held to. So the wrap covers exactly the range a locked Branches column would
   otherwise turn into permanent horizontal scroll, and it stops well below 1380.75px, the width at which
   the floored row would have the room to re-admit Kind -- which would put a column on screen at 1440 that
   1441 immediately takes away again. 1440 and 1536 are untouched by this block. */
@media (max-width: 1360.98px) {
  .adminusers-table .au-branches-cell .chip {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  .adminusers-table .au-branches-cell .chip-stack { min-inline-size: 110px; }
}

/* The toolbar search's clear control (2026-08-30, design sweep pair 2, round 1). The family shape lives on
   the in-header search wrapper (components.css .table-search-inline), whose magnifier is absolute and whose
   clear button is an ordinary flex child; this toolbar's search box is a positioned block with a 100%-width
   input, so the button is positioned the same way its magnifier already is. The two lanes are derived from
   the shipped declarations rather than chosen: the magnifier sits 14px from the inline end and is 16px
   wide, so it occupies 14 to 30px; the clear button is a 14px glyph in 4px of padding held open to the
   family's 24px minimum, so at 38px it occupies 38 to 62px and clears the magnifier by 8px; and the input's
   end padding grows from the 44px that reserves the magnifier alone to 68px, which clears the button by
   6px. The grown padding applies only while the wrapper carries has-value, so an empty box is unchanged. */
/* THE MINIMUM BOX (2026-09-02). Measured at 360px in both languages, this control painted 22x22 -- a 14px
   glyph in 4px of padding -- two pixels under what a pointer target owes its reader, with nothing larger
   wrapping it: the wrapper is the search box, and pressing that does not clear the term. Every interactive
   control declares a minimum BOX, and the box grows rather than the mark, so the glyph is centred inside
   the larger target and stays where it was. The padding and the 38px inset are untouched, so the input's
   text does not move; only the button's own far edge advances the 2px accounted for above. */
/* WIDENED to the collapsible FILTER PANEL as well (design sweep 2026-08-30, N-Q1-6), and then to the
   COMPONENT ITSELF (2026-09-03) -- which is what the sentence written here in August already said the right
   answer was: "writing the rule for the component rather than for one container is what stops the next
   filter panel re-deriving them". Two named containers is still a list of containers, and the next seating
   was not a filter panel at all: the booking drawer's subscriber lookup rendered this exact component inside
   a form section, where none of these rules could reach it -- so its clear control had no geometry, and
   nothing hid it while the box was empty. The component owns its own rules now, and the two container names
   are gone rather than joined by a third. */
.search-box .search-clear {
  position: absolute;
  inset-inline-end: 38px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  min-inline-size: 24px;
  min-block-size: 24px;
  padding: 4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  line-height: 0;
  cursor: pointer;
}

.search-box.has-value .search-clear { display: inline-flex; }

/* AND IT STAYS ON SCREEN WHILE ITS OWN READ RUNS (ruling 15 #198c, 2026-09-20). Pressing the clear empties
   the box, so the wrapper loses `has-value` and the rule above hides the control in the same tick -- which
   means the loading state the page script had just taken on that very button was painted onto a
   `display: none` element and the reader was shown nothing at all for the whole flight. The ruling asks for
   a wait the reader can SEE on the control he pressed, so the control holds its own geometry until the read
   settles: the page script adds `is-loading` before the read and removes it in the read's teardown. Same
   display value as the has-value rule, so nothing about the control's box changes between the two states;
   one class more than that rule (0,3,0 against 0,2,0), so it wins over the component's `display: none`
   whatever order they land in. The input's grown end padding deliberately does NOT follow: it exists to
   keep TEXT from sliding under the button, and the box this state belongs to is empty by definition. */
.search-box .search-clear.is-loading { display: inline-flex; }

.search-box.has-value input { padding-inline-end: 68px; }

.search-box .search-clear:hover {
  color: var(--color-text);
  background: var(--color-shell-soft);
}

.search-box .search-clear .icon { inline-size: 14px; block-size: 14px; }

/* A native search field draws a cancel control of its own, and this family now renders one too. MEASURED
   2026-09-03 at 360px on the shipments filter: the box painted the house control, the browser's own and
   the magnifier -- three glyphs in one field, two of which clear it. The two wrappers that already paired
   a search-typed input with this control hide the native one for exactly this reason; this is the third. */
.search-box input::-webkit-search-cancel-button { display: none; }

/* ---- Admin Users toolbar width budget (design sweep pair 2, rounds 1 and 2 -- 2026-08-30). ----

   THE DEFECT THESE TWO CAPS ANSWER. The toolbar is a wrapping flex row whose search box is `flex: 1 1 0`
   with a 250px minimum, so on any line the row wraps to, the search absorbs every pixel the other children
   leave. Measured: 848.84px in Arabic and 843.34px in English at 1280 and 1024 -- roughly four times the
   widest control above it -- while at 1440 the row wrapped with the Export button alone on the second line.

   THE ARITHMETIC, FROM THE MEASURED CONTROL WIDTHS. The five fixed children plus the five 12px gaps come to
   879.96px in Arabic (Add 174.80, role 305.00, kind 121.00, status 120.00, Export 99.16) and 927.47px in
   English (132.81, 353.00, 145.00, 132.00, 104.66). With the search at its family minimum the narrowest
   possible one-line bar is therefore 1129.96px and 1177.47px, against a content box of 1216px at 1536 and
   1120px at 1440 -- so at 1440 one line is unreachable while every control keeps its natural width, and the
   room has to come from the widest one. That is the role select, which is as wide as its longest role name;
   at 280px the one-line bar measures 1104.96px in Arabic and 1104.47px in English, leaving 15.04px and
   15.53px of spare inside the 1440 box. The select's own truncation of the displayed option is the native
   control's; the dropdown list still opens at full width and no name is lost from it.

   THE SECOND CAP IS THE SWELL. 265.04px is the width the search grows to on that same 1440 line, so the two
   middle bands now wrap to two honest lines -- Add, role, kind and status, then the search beside Export --
   with the search at the width it would have had one band up instead of the width of the whole row. It is
   never narrower than the 250px the shared family already declares as this control's floor.

   PAGE-SCOPED THROUGH THE CONTROLS' OWN IDS on purpose: `.filter-bar` is the shared toolbar family and no
   other page carries this page's six children, so a family-wide cap would be sized for a bar nobody
   measured. ---- */
.filter-bar #adminUsersRoleFilter { max-inline-size: 280px; }

.filter-bar #adminUsersSearchWrap { max-inline-size: 265.04px; }

/* ---- Announcements toolbar swell cap (design sweep pair 6, 2026-08-31). The shared search floor is
   250px, already wider than this toolbar's measured widest sibling (238.77px), so that floor is also the
   honest cap. Before the cap the search swelled to 584.23px in English and 673.53px in Arabic at 1440px,
   leaving the otherwise valid toolbar ending visibly short. The control's own id keeps the measured page
   decision out of the shared family. ---- */
.filter-bar #annSearchWrap { max-inline-size: 250px; }

/* ---- Roles P4 grid (mockup roles.html): fixed layout + colgroup widths so the shared
   .table-custom--sticky-edges freezes the identity (Role, first) + actions (last) columns while the middle
   scrolls (owner ruling B5, 2026-07-19; spec 2026-07-19 §4). Column order Role -> Assigned Users ->
   Permissions -> Type -> Kind -> Status -> [audit hidden] -> Actions (§4.2). Widths sized so no header clips
   in ar or en; .table-scroll (overflow-x) provides the horizontal scroll. A chooser-hidden <col> gets
   .col-hidden (site.js applyColumnPrefs) and is collapsed to width:0 by the shared sticky-edges rule. ---- */
/* THE FLOOR IS HELD AT THE DESKTOP BUDGET (PK-P35p, N-OWN-1): the measured 1199px content box less the
   2px of clearance the family's bounds keep. At 1180px the table was stretched into the box and shared the
   19px difference out in proportion, which is a small part of what the owner measured on this grid on
   2026-09-01 -- Assigned Users rendering 164.6px around 49.1px of content, Permissions 62.6px wider than
   its chips and Status 44.6px wider than its badge. Holding the sum at the budget makes every column
   render the width it declares, and ONE designated column carries the difference: the role-name band, the
   grid's primary text column and the only one whose content can spend it. Its minimum is the 300px it has
   carried since the P4 sweep; 1197 - (160 + 190 + 150 + 116 + 112 + 152) = 317px.
   The columns' own over-declaration -- a 160px band around 49.1px of content -- is a SEPARATE question
   that needs each column's measured content width, which this package's fence has no browser to take.
   317 + 160 + 190 + 150 + 116 + 112 + 152 = 1197.

   RE-DERIVED 2026-09-02 (PK-P35r) on the header runs the live round finally captured, which is the number
   that had been missing: a column holds BOTH its header and its body, so its requirement is the LARGER of
   the two, and until the headers were measured no shrink could be taken without risking a clipped heading.
   A sortable header additionally carries a 14px sort glyph and the space before it (allowed at 6px, wider
   than the render, so the derivation cannot be tighter than the truth). Per column, binding language named:

     assigned      header AR 127.31 + 32 = 159.31 -> 160 | body 49.1 + 12 + 32 = 94    -> 160, UNCHANGED
     permissions   header EN  83.94 + 32 = 115.94        | body 141.89 + 12 + 32 = 186 -> 190 becomes 186
     status        header EN  47.64 + 20 + 32 = 99.64    | badge 90.42 + 2 + 16 = 109  -> 112 becomes 109
     kind          header EN  30.16 + 20 + 32 = 82.16    | pill 96.63 + 32 = 129       -> 116 is UNDER it

   THE ASSIGNED COLUMN WAS ALREADY EXACT, and that is worth stating because the expectation was the
   opposite: its English heading is only 106.23px, but ARABIC binds at 127.31px, and Arabic is this page's
   default language. 160px is precisely its requirement -- there never was slack to release there.
   THE KIND COLUMN IS UNDER-DECLARED, not over: the English pill needs a 129px band and this grid has none
   spare that the identity column's own minimum will release. It keeps its ellipsis and its tooltip instead
   and stays on the record.
   The width released goes where this grid's surplus is ruled to live -- the flexible identity column,
   which is why it grows rather than the floor shrinking.

   PERMISSIONS RE-DERIVED AGAIN 2026-09-02, on a MEASURED body instead of a second-hand one. The 132.87px
   this band was first derived against came from an owner slack reading, not from the cell: measured live,
   the Arabic worst case is 132.88px -- that figure was right, for Arabic -- but ENGLISH is the wider
   language here at 141.89px, so the band was 9px under its own C51 requirement and carried 3.11px of
   headroom where the rule asks for 12. It takes the measured number: 141.89 + 12 + 32 = 185.89 -> 186.
   Recorded rather than quietly adjusted, because it is the second time on this branch that a figure
   derived from a slack reading proved narrower than the thing it stood for.
   324 + 160 + 186 + 150 + 116 + 109 + 152 = 1197. */
/* 2026-09-09 (15 #190f): the active status header's ink is 93.64px under the trimmed gutter its cells
   take (the status-header note beside the td lever), so the band moves 109 -> 110 and the role-name band,
   this grid's flexible column, releases the pixel: 323 + 160 + 186 + 150 + 116 + 110 + 152 = 1197. */
.roles-table {
  min-width: 1197px;
  table-layout: fixed;
}

.roles-table .role-col-identity { width: 323px; }
.roles-table .role-col-assigned { width: 160px; }
.roles-table .role-col-permissions { width: 186px; }
.roles-table .role-col-system { width: 150px; }
.roles-table .role-col-kind { width: 116px; }
.roles-table .role-col-status { width: 110px; }
.roles-table .role-col-date { width: 158px; }
.roles-table .role-col-audit { width: 130px; }
/* PK-P35n family sweep (N-P35CV-1): three icon-only row controls cost 116.00px on desktop (36 + 4 + 36 + 4
   + 36) and 128.00px at the touch tier, where each button grows to 40px. The cell owes both sides of its
   inline padding, which is 32px on desktop and 24px at that tier, so the two requirements are 148.00px and
   152.00px and the column takes the larger. At 148px the touch tier cut the last control by 4px and gave
   the scroller the same phantom range the user grids were measured with. The table floor above is unchanged
   because 148px left it 4px loose; at 152px it is exactly the seven default-visible columns' sum
   (300 + 160 + 190 + 150 + 116 + 112 + 152 = 1180). */
.roles-table .role-col-actions { width: 152px; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.roles-table tbody td { background: var(--color-bg-surface); }
.roles-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.roles-table tbody tr:hover td { background: var(--color-table-row-hover); }
.roles-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* ---- Roles P4-sweep-2 grid: the Retired tab (Views/Roles/_RetiredRolesTable.cshtml). Same header set
   (Roles.Grid.Name/Kind/System + Audit.CreatedOn/UpdatedOn) and identical badge/pill content as the main
   .roles-table, so its measured column widths carry over 1:1 -- verified with no ar/en clip in the P4-sweep-2
   live pass. This grid has NO column chooser (no data-col-default-hidden anywhere on the page), so every
   column here is always visible; the <colgroup> exists only to give the fixed-layout table predictable
   per-column widths for the shared .table-custom--sticky-edges freeze. Actions column holds 3 icon-only
   buttons (audit-info + Restore + Hard-delete), same count/size as .roles-table's actions column, hence the
   same 148px. ---- */
.retiredroles-table {
  /* The floor is the sum of the DEFAULT-VISIBLE columns, and on 2026-09-13 two of them stopped being
     default-visible: this grid joined the born-hidden audit-column contract every admin grid keeps
     (ledger 15 #137), so its two date columns start hidden and are turned on from its own chooser.
     300 + 116 + 150 + 152 = 718. A floor ABOVE the visible sum stretches every column and forces sideways
     scroll over content that fits -- which is what hides a column under the frozen action cell at rest --
     and a floor below it is simply inert; the date columns pay for their own width when the reader asks
     for them. */
  min-width: 718px;
  table-layout: fixed;
}

.retiredroles-table .rr-col-identity { width: 300px; }
.retiredroles-table .rr-col-kind { width: 116px; }
.retiredroles-table .rr-col-system { width: 150px; }
.retiredroles-table .rr-col-date { width: 158px; }
/* PK-P35n family sweep (N-P35CV-1): the same three icon-only controls as the live Roles grid, so the same
   two requirements -- 116.00 + 32.00 = 148.00px on desktop, 128.00 + 24.00 = 152.00px at the touch tier
   where each button grows to 40px and the cell padding drops to 12px a side. The column takes the larger. */
.retiredroles-table .rr-col-actions { width: 152px; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra. */
.retiredroles-table tbody td { background: var(--color-bg-surface); }
.retiredroles-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.retiredroles-table tbody tr:hover td { background: var(--color-table-row-hover); }
.retiredroles-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* ---- Read-only detail list for the View modal (P4 Item 6) — realigned 2026-07-23 to the mockup's
   OWN .modal-detail-list recipe (style.css:2773-2803; owner "values positions" screenshot check):
   fixed 130px label column, values flow FROM the column text-align START at 500 weight — not the
   space-between/end-aligned shape this component was born with. Reusable by any admin View modal. ---- */
.modal-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modal-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 12px;
  /* mockup --border-light hairline (style.css:2783) */
  border-block-end: 1px solid var(--kp-slate-100);
}

.modal-detail-list li:last-child { border-block-end: none; }

.modal-detail-list .detail-label {
  /* mockup: 13px/600 muted with a 130px min column (style.css:2791-2797) */
  color: var(--kp-slate-550);
  font-size: 13px;
  font-weight: 600;
  min-inline-size: 130px;
  flex-shrink: 0;
}

.modal-detail-list .detail-value {
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: 500;
  text-align: start;
  min-width: 0;
  word-break: break-word;
}

/* ---- A value of either language on the English page (2026-10-29; Arabic is painted in the Arabic face) ----
   The subscriber's block and address print the one text the subscriber gave, in whichever language, on both pages.
   On the English page the value takes the Latin body face, whose stack names no Arabic face, so its Arabic letters
   fell back to a system face (Arial, measured in both the Subscribers drawer and the P.O. Box request window). The
   Latin face stays first, so Latin letters and digits keep it, and the Arabic face follows for the letters the Latin
   face does not carry - the stack shape the design system already gives a word of the other language. Scoped to the
   values marked bilingual: the address rows this rule was written for, not every detail value. */
html[lang="en"] .modal-detail-list .detail-value--bilingual { font-family: 'Inter', 'Alexandria', sans-serif; }

/* Plain flag glyph in a detail row (mockup natEl spacing, users.html openViewUser — inline margin
   there; a class here per the zero-inline law). The GRID keeps its chip; the drawer row is plain. */
.modal-detail-list .nat-flag { margin-inline-end: 6px; }

/* ---- Boundary between a primary detail list and the sections beneath it (Core Rule 13, users.html:666)
   ----
   The mockup renders an hr carrying modal-divider there, beside the framework's own 16px margin utility, and
   it declares NO rule of its own for that class — so what it renders is the framework's default rule: a 1px
   top border in the inherited colour at a quarter opacity, 16px above and below. Re-expressed here in
   official tokens rather than copied, never as a package hex. The margin keeps the mockup's 16px on both
   sides through the house spacing token. Reusable by any admin modal that stacks sections under a detail
   list.

   DATED CLAUSE 2026-08-30: the WEIGHT was measured after the boundary shipped, and it corrects the first
   reading. This rule was born matching the slate-100 hairline .modal-detail-list draws between its own rows,
   on the reasoning that the boundary should read as one more of that list's lines. Measured through the
   mockup's served cascade, its list draws that same pale hairline AND still renders this divider distinctly
   darker, a mid grey, so matching the rows made the end of the list look like another row inside it. The
   nearest official token to what the mockup renders is --kp-slate-300; the geometry is unchanged. */
.modal-divider {
  margin-block: var(--kp-space-md);
  margin-inline: 0;
  border: 0;
  border-block-start: 1px solid var(--kp-slate-300);
  opacity: 1;
}

/* The form-level panel: the "{0} fields need fixing" counter on submit, and the fallback for a server
   message no field key maps to. Owner ruling 2026-08-30 (D37): its 13.6px sat 0.6px from the 13px field
   errors it counts, which is two error texts at two sizes, so it takes the same --text-small the field
   message uses. Shared by 23 admin form surfaces; the portal declares its own rule in the portal's own
   sheet and is untouched. */
.form-validation-msg {
  margin-block-start: var(--kp-space-md);
  padding: 10px 14px;
  border-radius: var(--kp-radius-md);
  background: var(--status-alert-bg);
  color: var(--status-alert-fg);
  border-inline-start: 4px solid var(--status-alert-fg);
  font-size: var(--text-small);
}

/* Required-field marker (inline-field-validation standard, 2026-07-20) — same class name + shape
   as the portal's shipped rule (Portal site.css), recolored with the ADMIN danger token. Applied
   in labels as <span class="field-required-marker" aria-hidden="true">*</span> with
   aria-required="true" on the input. */
.field-required-marker {
  margin-inline-start: 2px;
  color: var(--status-alert-fg);
  font-weight: 700;
}

/* ---- the audit icon's tooltip (owner ruling 15 #764, 2026-10-26) ----
   The audit lines show in the framework's own tooltip, appended to the document body by the shared admin script,
   so no grid cell, scroll shell or card clips them (the former pseudo-element was cut at the Actions cell's edges).
   Same tokens the pseudo-element used; the framework's own layer (1080) keeps it above the frozen cells and the
   drawers. The width is capped to the viewport less a gutter, and long lines wrap while kept line breaks stay. */
.audit-tooltip {
  --bs-tooltip-bg: var(--color-text);
  --bs-tooltip-color: var(--color-bg-surface);
  --bs-tooltip-max-width: calc(100vw - 16px);
  --bs-tooltip-opacity: 1;
  font-family: var(--font-body);
}

.audit-tooltip .tooltip-inner {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: start;
  padding: 8px 14px;
  border-radius: var(--kp-radius-md);
  font-size: var(--text-small);
  line-height: 1.6;
  box-shadow: var(--shadow-float);
}

/* `.user-avatar .icon { width: 16px; height: 16px }` was REMOVED 2026-08-03 with the glyph swap: the avatar
   no longer holds an `<svg class="icon">` at all — it paints the mockup's Font Awesome `fa-user`, sized by
   the avatar's own font-size (components.css `.user-avatar`) — and `.user-avatar` exists nowhere else in this
   app, so the rule had no remaining consumer. Do not re-add it without re-adding a sprite glyph. */

/* Create/edit-role modals: mockup content width 760px — at the shipped drawer width the matrix verb
   columns clipped into a horizontal scroll (blind design review 2026-07-19). These render as side
   drawers (.modal-drawer), so the DRAWER inline-size is what widens them. */
#roleFormModal .modal-dialog,
#roleMatrixModal .modal-dialog {
  inline-size: min(760px, 100vw);
}

@media (prefers-reduced-motion: reduce) {
  /* view-drawer vbx ticket card entrance + pulsing status dot (owner parity order 2026-07-23) */
  .vbx-card,
  .vbx-status--active .vbx-status__dot {
    animation: none;
  }

  /* Dialogs and toasts (dated 2026-10-24, the Portal rule's shape): the vendored dialog library animates its show and
     hide and has no reduced-motion rule of its own, so under reduce both end at once. The hide animation still ends,
     so the library's close completes as before. */
  body.kp-shell .swal2-container,
  body.kp-shell .swal2-popup {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

/* ---- count pill (clickable assigned-users badge on the Roles grid) ---- */
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--kp-space-xs);
  min-width: 30px;
  /* mockup .assigned-count (style.css:7245-7254): padding 4px 10px, weight 700, 13px, NO border. Ours stays a
     clickable button variant (owner feature) so the border is kept TRANSPARENT (invisible at rest, colored on
     hover) rather than removed, preserving the box size. 15 #96 F7 */
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--kp-radius-full);
  background: var(--color-bg-canvas);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.count-pill .icon { width: 14px; height: 14px; }

.count-pill:hover {
  background: var(--color-action-primary);
  border-color: var(--color-action-primary);
  color: var(--kp-white);
}

/* primary tint -- the default (>0 assigned) look (mockup .assigned-count, style.css:7002-7012); reuses the
   same soft-primary tokens as .count-badge so both title-count and row-count pills read from one palette */
.count-pill--primary {
  background: var(--status-scheduled-bg);
  border-color: transparent;
  color: var(--color-action-primary);
}

/* zero-assigned state (mockup .assigned-count.zero, style.css:7257-7260) -- neutral read; #f1f5f9 == --kp-slate-100.
   Border is transparent from the base rule (mockup zero has none) -- 15 #96 F7. */
.count-pill--zero {
  background: var(--kp-slate-100);
  color: var(--color-text-muted);
}

/* ---- small button modifier ---- */
.btn-sm { padding: 4px 12px; font-size: .78rem; }

/* ---- permission matrix (Roles) ---- */
/* Framed matrix (mockup .perm-matrix-wrap + .perm-matrix-toolbar, style.css:7030-7044): the toolbar +
   scroll live inside a bordered rounded card and the toolbar sits on a gray header strip -- was a bare
   flex row + bare scroll. 15 #96 F13d. */
.matrix-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-xl);
  overflow: hidden;
  background: var(--color-bg-surface);
}
.matrix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kp-space-sm);
  padding: 12px 16px;
  background: var(--color-bg-canvas);
  border-block-end: 1px solid var(--color-border);
}

.matrix-bulk { display: flex; gap: var(--kp-space-xs); flex-wrap: wrap; }

.perm-matrix th,
.perm-matrix td { white-space: nowrap; }

/* The matrix centres its switches under their headings, and it has to out-specify the shared grid rule
   to do it (2026-08-30). The declaration used to sit on `.perm-matrix th, .perm-matrix td` -- one class
   and one element type -- against `.table-custom thead th` / `.table-custom tbody td`, one class and TWO
   element types, which declare `text-align: start`. The shared rule simply won, so the centring was dead
   in both languages and every switch sat at the start edge of its cell, up to 20.95px from the heading
   above it. The module column is excluded because it reads as a row heading and keeps the start
   alignment every other grid's first column has. */
.table-custom.perm-matrix thead th:not(.matrix-module-col),
.table-custom.perm-matrix tbody td { text-align: center; }

/* Pin the module (first) column so it stays readable while the seven verb columns scroll horizontally on a
   small viewport (the shared .table-scroll is the scroll container). Logical inset so it mirrors correctly under RTL;
   an opaque surface hides the verb cells sliding beneath it. */
.perm-matrix .matrix-module-col {
  text-align: start;
  font-weight: 600;
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  /* THE MODULE LANE IS 180px, AND IT IS BOTH A CAP AND A FLOOR (born 2026-08-30 as a cap; the floor and
     this rewrite are 2026-09-02, narrow-screen pass).
     WHY 180px. In English the table wants 789.49px of content. On a desktop the drawer holds the scroller
     at 702px, so without a cap the whole Scheduling column sat outside the visible box. The eight verb
     columns need 511.07px at their own content widths, so 180px here puts the table at 691.07px and
     leaves 10.93px of slack, which the table's own width:100% spends on the verb columns. Arabic fitted
     already and only gains: a cap lowers the natural width, and its verb columns then share 522px.
     WHY THE FLOOR, and what the first version of this rule got wrong. `inline-size` alone is a SUGGESTION
     under the automatic table layout, which is free to take it back when the table cannot fit -- and
     `overflow-wrap: anywhere` had lowered this column's own minimum to a single character, so it had
     everything to take. Measured with the matrix open at 360px AND at 600px: the lane rendered 65.59px in
     Arabic and 62.61px in English, the longest module name took 18 lines and 24 lines, and the dialog body
     ran to 4,855px and 5,703px of scroll -- a wall of one letter per line. `min-inline-size` is what the
     design reference declares on its own module heading, and it is what makes the number real: the lane
     can no longer be squeezed, the verb columns scroll sideways inside the dialog the way every grid
     scrolls (owner ruling 2026-09-01), and the cap's desktop arithmetic above is unchanged because both
     values are the same 180px. The break is gone with it -- a module name now wraps between words like
     any other heading, which is all the cap ever needed: every seeded name's longest word fits the lane. */
  inline-size: 180px;
  min-inline-size: 180px;
  white-space: normal;
}

.perm-matrix tbody th.matrix-module-col { background: var(--color-bg-surface); }
.perm-matrix th.matrix-module-col { z-index: 2; }

/* Row hover highlight (mockup style.css section 6785 .perm-matrix tbody tr:hover); the sticky module
   column repaints its own background too so scrolled verb cells never show through underneath it. */
.perm-matrix tbody tr:hover td,
.perm-matrix tbody tr:hover th.matrix-module-col { background: var(--color-bg-canvas); }

/* Matrix cells are TOGGLE SWITCHES (blind design review 2026-07-19: the mockup's create-role matrix
   renders switches, not checkboxes). Still a native <input type=checkbox> underneath — the save flow
   keeps reading :checked/.matrix-cell; only the paint changes. Logical inset keeps the thumb
   direction-correct in RTL and LTR. */
.matrix-cell {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  /* 38×22 track + #cbd5e1 off-track (mockup .perm-toggle, style.css:7171-7216) -- was 36×20 on a lighter
     --color-border track. 16px thumb unchanged; thumb inset 3px, checked offset 19px (22-16-3). 15 #96 F13d. */
  width: 38px;
  height: 22px;
  border-radius: var(--kp-radius-full);
  background: var(--kp-slate-300);
  cursor: pointer;
  transition: background-color .15s ease;
  vertical-align: middle;
}

.matrix-cell::before {
  content: '';
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--kp-radius-full);
  background: var(--color-bg-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .2);
  transition: inset-inline-start .15s ease;
}

.matrix-cell:checked { background: var(--color-action-primary); }
.matrix-cell:checked::before { inset-inline-start: 19px; }
/* A disabled switch is a control the pointer can reach and cannot use, so it says so (the 2026-08-27
   disabled-cursor ruling; 91 of the 113 switches are disabled at rest on a locked role). */
.matrix-cell:disabled { cursor: not-allowed; opacity: .55; }
.matrix-cell:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; }

/* Matrix cells run tighter than the data-grid default (the generic 14px inline padding made the
   8-verb matrix overflow the mockup's 760px modal — measured 775/689 before this) */
.perm-matrix thead th,
.perm-matrix tbody th,
.perm-matrix tbody td {
  padding-inline: 6px;
}

/* Matrix module cell: leading per-module icon + label (mockup rows carry one) */
.matrix-module {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Per-module icon TILE (mockup .perm-matrix .module-cell .module-icon, style.css:7148-7162): a 30×30
   navy-tint rounded square holding the 16px navy glyph -- was a bare muted-gray icon, no container. 15 #96 F13d. */
.matrix-module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--kp-radius-md);
  background: var(--kp-navy-600-a08);
  flex-shrink: 0;
}

.matrix-module .icon { width: 16px; height: 16px; color: var(--color-action-primary); flex-shrink: 0; }

/* Task 11: non-applicable matrix cell (a verb the page's VerbApplicability doesn't grant, e.g. Schedule
   outside Branches) -- a muted, non-interactive dash; aria-hidden on the span keeps it silent for screen
   readers since the cell carries no control to label. */
.matrix-cell-na {
  color: var(--color-text-muted);
  user-select: none;
}

/* ---- users-in-role list (Roles drill-down) ---- */
.role-users-list {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
  max-height: 60vh;
  overflow-y: auto;
}

/* THE FOCUS RING STAYS WHOLE AT A SCROLL EDGE (2026-10-01). The admin's one ruled ring is a 1px outline drawn 3px off
   the control (owner order 2026-07-20), so it reaches 4px past the control's box, and a Tab press scrolls only the box
   into view: a control brought in at the edge of either user list, or of the dialog's own scroller, had the last 3.5 to
   4.5px of its ring cut by that edge (measured in a browser on 5 of 120 focus stops, both languages, and on a static
   page of the dialog on 192 of 3104 stops over eight widths). The scroll padding stops a Tab's landing the small spacing
   step inside each edge. It is the page's own answer for its top bar, the root's scroll padding near the top of this
   sheet (owner rulings #300 and #307); the ring itself is untouched. */
#roleUsersModal,
.role-users-list { scroll-padding-block: var(--kp-space-sm); }

/* THE SAME ANSWER FOR THE PERMISSION MATRIX DIALOG'S BODY (2026-10-21). A Tab walk through the matrix dialog parked a
   checkbox with its box flush to the bottom of the dialog's scrolling body, so its ring lost 3.4 to 4.4px there, at
   every width (measured in a browser). The body takes the block scroll padding the users dialog carries. The sideways
   half of the same walk is answered by the phone-width matrix rule further down.
   DATED CLAUSE 2026-10-21, later the same day: EVERY DRAWER BODY TAKES IT. The matrix dialog's body is a drawer body,
   and so are the scrolling bodies of the Roles create/edit drawer (which embeds the same matrix) and the company
   request drawer, which carried no scroll padding: a Tab walk parked a control flush with the bottom of each and its
   ring lost 2.2 to 4.4px there (measured in a browser at 1440 and 390px, both languages; the other drawers measured
   read whole only because their bodies did not scroll at those sizes). So the rule moved from the one body to the
   drawer family's body, with the same small spacing step, the answer of owner rulings #300 and #307 above; the ring
   itself is untouched. A control already wholly visible just above the fold takes no focus scroll, so no padding
   reaches it; the Admin site.js keyboard landing for drawer bodies answers that case. */
.modal-drawer .modal-body { scroll-padding-block: var(--kp-space-sm); }

/* ---- assigned-users manager (assigned-users-manager phase; owner design order 2026-07-17 restyle) ----
   Rows read as grid rows, not free-floating cards: a bottom hairline separator + hover tint (the same
   language as .table-custom tbody tr / .clickable-row) instead of the earlier per-row bordered box. Shared
   by both the assigned-users list and the add-user candidate list (roles.js applies both classes to each
   row in both lists). */
.role-user-item {
  padding: var(--kp-space-sm) var(--kp-space-md);
  border-block-end: 1px solid var(--color-border);
  transition: background-color .15s ease;
}

.role-user-item:hover { background: var(--status-scheduled-bg); }
.role-user-item:last-child { border-block-end: none; }

.role-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kp-space-sm);
  margin-block-end: var(--kp-space-md);
}

.role-users-toolbar-actions {
  display: inline-flex;
  gap: var(--kp-space-sm);
}

/* THE ADD USER WRAPPER IS A FLEX BOX, SO BOTH TOOLBAR BUTTONS SHARE ONE HEIGHT (2026-10-01). The span that carries Add
   user's disabled reason is a flex item of this row, so the browser made it a block, and the button stood on a text
   line 30.14px tall in Arabic and 29.14px in English; Unassign all, the row's other item, stretched to that line while
   Add user stayed 28.09px (measured in a browser at 390 and 1440px). The shared disabled-reason modifier
   (`.row-action-disabled`) already lays the wrapper out this way while the role is inactive, so the active state now
   matches it. No height is written: each button keeps its own. */
.role-users-toolbar-actions > [data-add-action] { display: inline-flex; }

.role-users-count {
  display: inline-flex;
  align-items: center;
  gap: var(--kp-space-xs);
  font-weight: 600;
}

.role-users-cap {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-block: 0 var(--kp-space-sm);
}

.role-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kp-space-md);
}

.role-user-main { min-width: 0; }

/* THE ADDRESS IS CLIPPED THE WAY THE USER GRIDS CLIP IT (2026-09-30). Both lists in this dialog build the
   grids' icon + name/e-mail stack with a button beside it, but only the shared base size and colour reached
   the e-mail here, so an address wider than its column painted past its own box: at a 390px viewport the
   English tail ran under the Remove button, and the Arabic address ran over the row's icon and out of the
   dialog. The column already yields (the text column's `min-inline-size: 0` and the line above), so only
   the clip was missing. It is the grids' rule declaration for declaration: the clipping block is itself
   left-to-right, or on the Arabic page the ellipsis removes the start of the address, the half that says
   whose it is; and because a left-to-right box starts on the left, the Arabic page realigns it to its end
   edge so the address stays under the name. The two rules are one unit (owner rulings 2026-08-29, ledger
   15 #183). Like the grids, the row carries no title with the whole address. */
.role-user-item .admin-identity-email {
  direction: ltr;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[dir="rtl"] .role-user-item .admin-identity-email { text-align: end; }

/* A word of the name too long for its column breaks inside the column rather than painting past it, as on the
   user grids' name line (2026-09-30). `break-word` breaks only a word that cannot fit a line of its own, so
   ordinary names keep breaking at their spaces. */
.role-user-item .admin-identity-name { overflow-wrap: break-word; }

/* THE META LINE IS SECONDARY TEXT (2026-10-01, the owner's finding that the dialog's text read too big). It painted at
   12.8px with bold labels, larger and heavier than the e-mail line above it (12.48px, regular) and than the admin
   mockup's secondary row text, the Branches manage drawer's person meta at 12.16px and the admin-users grid e-mail at
   12px, both regular (measured in a browser in both languages). It now takes the identity e-mail line's own size, the
   value the user grids' shared rule (`.admin-identity-email`) declares, and its labels, which the page script builds as
   `strong`, the regular weight. The same rule styles a candidate row's no-branch note. */
.role-user-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kp-space-sm) var(--kp-space-md);
  margin-block-start: var(--kp-space-xs);
  font-size: .78rem;
  color: var(--color-text-muted);
}

.role-user-meta strong { font-weight: 400; }

/* THE ASSIGNED-ON VALUE IS A STAMP, KEPT ON ONE LINE (2026-09-30). A Kuwait stamp ("2026-09-12 08:30") is one
   bounded value, and the design system keeps it whole with the stamp family (`.table-custom .stamp`). That rule is
   written for table cells, so in this dialog's meta line, outside any table, the value broke at its hyphen at a
   390px viewport, in Arabic and in English. The settings audit caption met the same gap and answered it with
   `.setting-audit-caption .stamp`; this dialog follows it. roles.js puts the class on the assigned-on value only,
   so the label and the assigned-by name still wrap. Measured on a static page of the dialog: the whole value fits
   inside the text column at 390, 575, 768 and 1440px in both languages; at 360px, the narrowest supported width,
   it was about 13px wider than an English row's column beside the Remove button, which the 390px tier below answers
   by stacking the row. */
.role-user-meta .stamp { white-space: nowrap; }

/* THE BRANCH CHIP KEEPS ITS WHOLE LABEL AND WRAPS IT INSIDE THE COLUMN (2026-09-30). The chip is the shared
   `.chip` pill, one line by default, and a flex item's automatic minimum size is its own content -- so at a
   390px viewport a branch name wider than the text column ran past it and under the row's Remove button
   (15.37px in Arabic, 48.75px in English). The user grids bound the same pill in a narrow column by letting it
   wrap at its own spaces and hyphens, never by shortening it (owner rulings 2026-08-30, ledger 15 #183), and
   this dialog follows them declaration for declaration. It is written for every width: a name that fits keeps
   its one line, and the wrap engages only where the column is narrower than the name. */
.role-user-meta .chip {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.role-users-add {
  margin-block-start: var(--kp-space-md);
  padding-block-start: var(--kp-space-md);
  border-block-start: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
}

/* THE PICKER IS A COLUMN, ITS FIELD ABOVE ITS ACTION (2026-09-30). It was a wrapping row of the select and the
   Add button. The shared row button keeps its label on one line (its own `white-space: nowrap`; 227.55px in
   Arabic) and the select floors at 180px, so in Arabic
   the row wrapped at every width the dialog has, and in English at 1440px in 12 of 25 measured rows -- and a
   wrapped row keeps the width it was shrunk to: at 1440px the Arabic picker held up to 210.78px of empty width
   beside an address clipped for want of it. As a column its box is
   its widest control at every width, so what it does not use goes to the text column. It is the shape of the
   Branches manage drawer's inline picker (`.assignment-role-picker`), whose person row names this dialog's rows
   as its precedent. The house native select (.form-select is width:100% by default, sized for a full form
   field) keeps its own floor here, and the column stretches it and the button to the wider of the two. */
.role-user-branch-picker {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
}

.role-user-branch-picker .form-select {
  width: auto;
  min-width: 180px;
}

/* BELOW 576PX A CANDIDATE STACKS ITS IDENTITY ABOVE ITS CONTROL (2026-09-30). The vendored library draws this
   dialog at the viewport less 8px a side below 576px, and there even the column above is wider than the row can
   spare: its widest control is the Add button's unbroken label, so at a 390px viewport the text column measured
   0px in every Arabic candidate row and the name stood four to seven lines deep inside it, while in English the
   picker painted over the row's icon. A headquarters role's bare Add button leaves an Arabic row no column
   either. The candidate row therefore stacks, as the Branches manage drawer's person row does whenever it
   carries its picker (`.assignment-person--expanded`), and the tier ends where the dialog stops following the
   viewport. Assigned rows keep their Remove button beside the column, which leaves the column room there, down to
   390px; below that the tier after this one stacks them too. */
@media (max-width: 575.98px) {
  .role-users-add .role-user-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* BELOW 390PX AN ASSIGNED ROW STACKS ITS IDENTITY ABOVE ITS REMOVE BUTTON (2026-09-30). The assigned-on stamp is one
   value kept on one line (the stamp rule above), and an assigned row keeps its Remove button beside the text column.
   At 360px, the narrowest width the admin supports, that column was narrower than the stamp -- by 13.16px in English
   with the Add panel closed and by 28.16px with it open, by 1.48px in Arabic with it open -- so the value ran past its
   column. Below 390px only, the row becomes a column like the Branches manage drawer's stacked person row
   (`.assignment-person--expanded`): the identity takes the row's whole width, and the Remove button stands under it
   at the inline end at its own width. From 390px up the stamp fits beside the button in every measured state, so that
   layout is left as it is. The tightest, English with the Add panel open at 390px, kept 0.33px when measured in a
   browser on 2026-10-01 at the meta line's former 12.8px size (a 113.20px stamp in a 113.53px column); the 12.48px size
   the meta line takes since then narrows the stamp by about 2.8px on a static page of the dialog. The selector
   reaches the assigned list's own rows only; the add-user candidate rows keep their tier above. */
@media (max-width: 389.98px) {
  #roleUsersList > .role-user-row {
    flex-direction: column;
    align-items: stretch;
  }

  #roleUsersList > .role-user-row > .btn-row-primary { align-self: flex-end; }
}

/* ---- dashboard حالة الشحنات status-breakdown card (owner findings batch 1 item 6, 2026-07-23 —
   mockup index.html:399-443 + style.css:6081-6153, ported with our tokens; 15 #93(c) held the CTA
   link back until a shipments admin page existed, and since 2026-11-08 the card carries it, `.status-cta`
   below). ---- */
.card-custom .card-header-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: 4px 16px;
}

.status-row {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  align-items: center;
  gap: 12px;
}

/* Dated 2026-11-08 (Core Rule 13): the mockup's phone step for this row (deployed-reference.css:6080-6083), which gives
   the bar more of a narrow card. The narrower label column wraps a long English label to two lines, as the mockup does. */
@media (max-width: 575.98px) {
  .status-row {
    grid-template-columns: 110px 1fr 52px;
    gap: 8px;
  }
}

.status-row .status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
}

.status-row .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--delivered { background: var(--kp-emerald-500); }
.status-dot--transit { background: var(--kp-amber-500); }
.status-dot--pending { background: var(--kp-navy-500); }

.status-bar {
  height: 6px;
  background: var(--color-bg-canvas);
  border-radius: 999px;
  overflow: hidden;
}

.status-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.status-bar-fill--delivered { background: var(--kp-emerald-500); }
.status-bar-fill--transit { background: var(--kp-amber-500); }
.status-bar-fill--pending { background: var(--kp-navy-500); }

.status-count {
  text-align: end;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* Dated 2026-11-08 (15 #93(c), Core Rule 13): the card's link to Shipments, the mockup's `.status-cta` in our tokens.
   Its keyboard ring is the admin's global :focus-visible rule; none is declared here, because that rule is !important. */
.status-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-start: 4px;
  padding: 10px 14px;
  background: var(--color-bg-canvas);
  border-radius: var(--kp-radius-md);
  color: var(--color-action-primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background-color .25s var(--ease-smooth-out), color .25s var(--ease-smooth-out);
}

.status-cta:hover {
  background: var(--color-action-primary);
  color: var(--kp-white);
}

/* Unbuilt mockup quick actions render VISIBLE but INERT (owner show-with-zeros ruling applied to
   action cards — a div, not a link; muted so it never reads as a dead click target). */
.quick-action--soon {
  opacity: .55;
  cursor: default;
}

/* ---- dashboard meta strip: last-updated + range tabs (mockup .dashboard-meta-row/.range-control,
   style.css:5681-5744; Task 9) ---- */
.dashboard-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kp-space-md);
  margin-block-end: var(--kp-space-lg);
}

.page-header-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--kp-space-sm);
  color: var(--color-text-muted);
  font-size: .8125rem;
  margin: 0;
}

.last-updated {
  display: inline-flex;
  align-items: center;
  gap: var(--kp-space-xs);
}

.last-updated .icon { width: 14px; height: 14px; }

.last-updated-time {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  font-weight: 600;
}

#dashboardKpiRegion > .grid-loading { inset-inline: -8px; }

/* THE CONTENT REGION'S SKELETON FOLLOWS THE WINDOW (ruling 15 #198c; 2026-11-10). This region is taller than a
   window (about 1,100px on a phone), and the shared overlay draws its five lines at the region's top: a reader
   looking at the status card further down saw a plain white sheet for the whole read. Each line now sticks under
   the top bar at its own step (the line, its end margin and the gap: 14 + 8 + 8 = 30px), so the lines stand at
   the region's top while that is in the window and stay in the window when it is not. The Home region's own rule:
   the shared overlay and every other loading region are unchanged. */
#dashboardContentRegion > .grid-loading > .skeleton {
  position: sticky;
  inset-block-start: calc(var(--kp-topbar-h) + var(--kp-space-md));
}

#dashboardContentRegion > .grid-loading > .skeleton:nth-child(2) { inset-block-start: calc(var(--kp-topbar-h) + var(--kp-space-md) + 30px); }
#dashboardContentRegion > .grid-loading > .skeleton:nth-child(3) { inset-block-start: calc(var(--kp-topbar-h) + var(--kp-space-md) + 60px); }
#dashboardContentRegion > .grid-loading > .skeleton:nth-child(4) { inset-block-start: calc(var(--kp-topbar-h) + var(--kp-space-md) + 90px); }
#dashboardContentRegion > .grid-loading > .skeleton:nth-child(5) { inset-block-start: calc(var(--kp-topbar-h) + var(--kp-space-md) + 120px); }

.range-control {
  display: inline-flex;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  padding: 4px;
  gap: 2px;
}

.range-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 14px;
  /* The reference's own corner for this class, a literal 7px, adopted 2026-09-11 under the mockup-geometry
     rule: every other scale property of the pair already matched and only the radius was a pixel out. It is
     NOT taken from the small-radius token, which is 6px and dresses the whole admin -- moving the token to
     match one class would have moved every surface that shares it. The reference styles this class, so we
     style this class, and every tab strip built on it moves together. */
  border-radius: 7px;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

/* The fill under the pointer is the official navy at 6%, the rendered reference's own strength for this class; it
   wore the scheduled wash (12%) until 2026-11-10. The selected tab below keeps the solid navy. */
.range-btn:hover {
  color: var(--color-action-primary);
  background: var(--color-range-hover-bg);
}

.range-btn.is-active {
  background: var(--color-action-primary);
  color: var(--kp-white);
}

/* The create drawer's day and slot strips are CONTROLS the form validates like any other (per-field
   standard, owner order 2026-07-20), and the shared engine marks an invalid control with .is-invalid. The
   design system paints that state on .form-control and .form-select only, so without this the strip would
   carry the state and show nothing -- the silent block the standard forbids. Same token as its siblings. */
.range-control.is-invalid {
  border-color: var(--status-alert-fg);
}

/* ---- THE QUICK DATE BUTTONS OF A LOG PAGE'S FILTER ROW (owner rulings 15 #1257, #1270; 2026-11-10) ----
   Four plain buttons beside From and To that only fill the two dates. They wear the range-button LOOK, and this
   block only seats that control in a filter row:
   - THE CAPTION LINE. The group has no label of its own, so without a caption line its control stood 27px above
     the inputs beside it. It reserves the label's line the way the action cell does: the same type metrics and
     the same 6px margin, so both fonts compute the same line box.
   - THE CONTROL LINE. The control is as tall as the inputs (42px): its buttons give up their block padding and
     fill the control's inner height instead (it stood 47.4px beside 42px inputs).
   - ONE LINE OF BUTTONS. No button wraps its words, and from 992px the group takes two tracks, as the search
     group takes more than one; the buttons' inline padding is the family's phone value (10px), which lets the
     four English labels fit two tracks at 1440. Where the buttons are still wider than the group (one track,
     below 992px) the control scrolls sideways inside itself, the family's own behaviour there; measured at 768
     and 390 in both languages, the page gained no sideways scroll.
     DATED CLAUSE 2026-11-11 (owner ruling 15 #668): "fit two tracks at 1440" was true at the width measured and no
     wider. Swept 992-1920 every 8px, Arabic fits two tracks at every sampled width, English only in some desktop
     bands (it overflowed at the sampled widths 1056-1112, 1320-1376 and 1520-1584 on both log pages, at 1712-1792 on the Audit Log and
     1912-1920 on the Error Log), and at the measured 768 and 390 neither language fits one track. Wherever the four do
     not fit, at any width, the control stays one row and scrolls in place, shows the family's overflow cue at each end
     where buttons are hidden, and reveals a button the keyboard focuses inside itself (a mouse press does not move
     its own button): the shared page script enrols it by its
     `data-strip-cue` attribute, with no tab roles. Nothing here changed shape.
   - ITS PLACE. The block stands after the family's base rules and before the tab strips' overflow tier, which
     must stay the last word on the family; each selector here outweighs the family's own, so the order changes
     nothing it computes. ---- */
.filter-group--quick-range::before {
  content: "\00a0";
  display: block;
  margin-block-end: 6px;
  font-size: .8rem;
  font-weight: 600;
}

.filter-group--quick-range .range-control {
  box-sizing: border-box;
  min-block-size: 42px;
  max-inline-size: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--kp-slate-500) transparent;
}

.filter-group--quick-range .range-btn {
  min-inline-size: max-content;
  padding-block: 0;
  padding-inline: 10px;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .filter-row .filter-group--quick-range { grid-column: span 2; }
}

/* Dashboard custom range (2026-08-22 P7 plan; 2026-08-23 P7c evidence). Rendered mockup measurements:
   39.44px controls, content-sized popover, 14px inset, 10px two-column gap, 12px radius and
   8px/14px footer buttons. */
.range-control-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-calendar {
  position: relative;
  display: inline-flex;
}

.range-calendar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 39.44px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-lg);
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
}

.range-calendar-btn:hover {
  border-color: var(--color-action-primary);
  color: var(--color-action-primary);
  background: var(--status-scheduled-bg);
}

/* Byte-matched to the preset selected rule above: custom and preset selections are one control family. */
.range-calendar-btn.is-active {
  background: var(--color-action-primary);
  color: var(--kp-white);
  padding-inline-end: 40px;
}

/* Keep the mockup-authored 16px icon. Its live 20px reading is a dead generic-rule accident, not the
   authored dashboard value (Core Rule 13 rendered-cascade adjudication, 2026-08-23). */
.range-calendar-btn .icon { width: 16px; height: 16px; }

.range-calendar-clear {
  position: absolute;
  z-index: 1;
  inset-block-start: 50%;
  inset-inline-end: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  flex: 0 0 auto;
  inline-size: 18px;
  block-size: 18px;
  padding: 0;
  border: 0;
  border-radius: var(--kp-radius-full);
  background: color-mix(in srgb, var(--kp-white) 18%, transparent);
  color: var(--kp-white);
  cursor: pointer;
}

/* Design-sweep focus-ring contrast law: this ring draws inside the brand-navy pill, where the shell's
   near-black ring reads 1.68:1; preserve the shell geometry and invert only its ink on the dark ground. */
body:not(.kp-portal) .range-calendar-clear:focus-visible {
  outline: 1px solid var(--kp-white) !important;
  outline-offset: 3px !important;
}

.range-calendar-clear::before,
.range-calendar-clear::after {
  content: '';
  position: absolute;
  inset-block-start: calc(50% - .75px);
  inset-inline-start: 4px;
  inline-size: 10px;
  block-size: 1.5px;
  border-radius: var(--kp-radius-full);
  background: currentColor;
}

.range-calendar-clear::before { transform: rotate(45deg); }
.range-calendar-clear::after { transform: rotate(-45deg); }
.range-calendar-clear[hidden] { display: none; }

/* THE LOCKED CLEAR CONTROL WEARS THE SHARED RING (ruling 15 #198c, measured 2026-09-25). This control draws its
   cross with its own ::before and ::after, and the ::before rule above weighs the same as the shared lock's ring
   rule (one class and one pseudo-element each) and comes later, so its bar geometry won: measured in both languages,
   a locked Clear painted a 10 x 4 px bar (its 1.5 px stroke padded out by the ring's two 2 px borders) carrying the
   ring's spin, where the month tab and Apply beside it painted the 16 x 16 px ring.
   While the control holds the lock, the ring's own size and centring win here -- the margins stay the shared
   icon-only lock's -- and the cross's second stroke steps aside, the way an icon-only control's icon does. */
.range-calendar-clear.btn-loading::before {
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 16px;
  block-size: 16px;
  background: transparent;
  transform: none;
}

.range-calendar-clear.btn-loading::after { visibility: hidden; }

.range-btn:disabled,
.range-calendar-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  pointer-events: auto;
}

.range-calendar-clear:disabled {
  opacity: .65;
  cursor: not-allowed;
  pointer-events: auto;
}

.range-popover {
  position: absolute;
  z-index: 50;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  min-inline-size: 280px;
  max-inline-size: calc(100vw - 32px);
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-xl);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-float);
}

.range-popover[hidden] { display: none; }

.range-popover-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-block-end: 12px;
}

.range-popover-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-inline-size: 0;
}

.range-popover-field label {
  color: var(--color-text-muted);
  font-size: .75rem;
  font-weight: 600;
}

.range-popover-field .form-control {
  inline-size: auto;
  block-size: 39.44px;
  min-block-size: 39.44px;
  padding: 8px 10px;
  border-radius: var(--kp-radius-md);
  background: var(--color-bg-canvas);
  color: var(--color-text);
  font-size: .8125rem;
  font-weight: 500;
}

.range-popover-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.range-popover-btn {
  min-block-size: 39.44px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-md);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
}

.range-popover-btn--ghost {
  background: var(--color-bg-surface);
  color: var(--color-text);
}

.range-popover-btn--primary {
  border-color: var(--color-action-primary);
  background: var(--color-action-primary);
  color: var(--kp-white);
}

/* Plans-page header row (mockup subscriptions.html composition, parity fix 2026-07-21; the two controls
   REJOINED on 2026-08-30, design sweep N-P1-12). The mockup gives the page ONE row with the box-type tabs
   at the inline start and the Add button at the inline end — measured 1110x47.44 with the strip on one
   edge and the button on the other — while ours had drifted into two stacked rows with both controls hard
   against the same edge, 20px apart. `space-between` is what puts them back at opposite ends, and the
   family `.filter-bar` under it already supplies the flex row, the 20px trailing margin and the wrap.
   The former `.toolbar-trail` rule went with the trailing box-type filter + export controls this page
   stopped rendering when export moved into each grid's own header. */
.filter-bar--plans-toolbar {
  gap: 8px;
  justify-content: space-between;
}

/* ---- quick-action cards (mockup .quick-action, style.css:1144-1232; restyled launchpad perm cards,
   Task 9) ---- */
.quick-action {
  display: block;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  /* 12px corners — mockup .quick-action --radius-md renders 12px == --kp-radius-xl (token name-value trap:
     the mockup's --radius-md is 12px, our --kp-radius-md is 8px). 15 #96 F3. */
  border-radius: var(--kp-radius-xl);
  padding: 28px 24px;
  text-align: center;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.quick-action::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform .3s ease;
}

.quick-action:hover {
  border-color: var(--color-action-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.quick-action:hover::before { transform: scaleX(1); }

.range-btn:active:not(:disabled) { transform: scale(.97); }
.range-calendar-btn:active:not(:disabled) { transform: scale(.97); }
#dashboardKpiGrid .stat-card { height: 100%; }
#dashboardKpiGrid a.stat-card:active { transform: translateY(-3px) scale(.97); }
.quick-action:active { transform: translateY(-4px) scale(.97); }
.quick-action--soon:active { transform: none; }

/* P3 ledger defect 2: the mockup's base .quick-action-icon (style.css:1241-1257) sets no background of
   its own -- every non-CTA tile (all 5 of ours; Baridy has no --cta item) renders transparent, with the
   glyph inheriting the page's --text-primary ink (mockup body{color:var(--text-primary)} + a{color:inherit},
   #0f172a -- byte-identical to our --kp-slate-900/--color-text token); only the (unused-here)
   .quick-action--cta variant paints a solid gold tile with a white glyph. Was hardcoded solid navy fill +
   forced white glyph here; fixed to match (color set explicitly rather than left to inherit, since our own
   sitewide `a{color:...}` default is navy, not ink -- inheriting here would paint the wrong shade). */
.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--icon-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--kp-space-md);
  background: transparent;
  color: var(--color-text);
  transition: transform .2s ease;
}

.quick-action-icon .icon { width: 26px; height: 26px; }

.quick-action:hover .quick-action-icon { transform: scale(1.05); }

/* P4 D6 — primary CTA variant (mockup .quick-action--cta .quick-action-icon, style.css:5982-5985): a
   stamp-gold icon tile with a white glyph on the FIRST quick-action card. The cards are individually
   <perm>-gated and the tag helper emits NO wrapper for a hidden card, so `.col:first-child` inside the
   quick-actions row targets the first VISIBLE card for whatever the viewer's permissions surface (no
   markup logic can know that at render time). The explicit .quick-action--cta modifier is kept as the
   ported class for any future non-gated row that wants to opt a specific card in. The hover scale is
   already covered by the base .quick-action:hover .quick-action-icon rule above. */
.quick-actions > .col:first-child .quick-action .quick-action-icon,
.quick-action--cta .quick-action-icon {
  background: var(--gradient-stamp);
  color: var(--kp-white);
}

.quick-action h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-block-end: var(--kp-space-xs);
  color: var(--color-text);
}

.quick-action p {
  font-size: .8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---- dashboard card shell + activity feed (mockup .card-custom/.activity-*, style.css:1050-1084,
   5756-5836; Task 9 real audit activity feed) ---- */
.card-custom {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  /* 12px corners — mockup .card-custom --radius-md renders 12px == --kp-radius-xl (name-value trap). 15 #96 F3. */
  border-radius: var(--kp-radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Column-chooser clip release for a chooser that sits in a CARD rather than in a .table-wrapper: the
   Settings page's Terms grid lives inside the tab's card, which clips its rounded corners exactly the way
   the table wrapper does, so an open chooser menu was cut off (admin hunt 2026-08-15, item 3). Same class
   and same site.js toggle as the wrapper's release (components.css); the wrapper is still matched first, so
   every grid that has one is untouched. */
.card-custom.tw-dropdown-open {
  overflow: visible;
}

.card-custom .card-header {
  padding: 18px 22px;
  border-block-end: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kp-space-sm);
}

.card-custom .card-header h5 {
  font-size: var(--text-subheading);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

/* Same target floor as the Civil ID toggle (2026-09-02, narrow-screen pass): this link measured 21.44px
   tall -- its own text line and nothing else -- which is under the 24px minimum. An inline box cannot
   carry a block minimum, so it becomes an inline-flex one and centres its own text, which is what keeps
   the words where they were. */
.card-custom .card-header-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 24px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-action-primary);
  text-decoration: none;
}

.card-custom .card-header-link:hover { text-decoration: underline; }

.card-custom .card-body { padding: 22px; }

.activity-feed { padding: 6px 0; }

.activity-item {
  display: flex;
  gap: var(--kp-space-md);
  padding: 14px 22px;
  border-block-end: 1px solid var(--color-border);
}

.activity-item:last-child { border-block-end: none; }

/* Dashboard activity chip, carrying the SAME solid-navy identity VALUES as the grid first-cell icon (mockup
   .activity-avatar, style.css:6018-6033) — was a pale-navy CIRCLE with a navy initial; now the 38px navy
   rounded square + white initial + the shared cell shadow (15 #93/#96 F4).
   What it deliberately does NOT sit under is the v3 unified FIRST-CELL-icon law (owner ruling D7, ledger
   15 #137, 2026-08-02): that law is about the leading cell of a TABLE row, and this is an activity-feed
   item. So the radius stays --icon-radius (6px) here while .cell-icon moved to --kp-radius-lg (10px) —
   size, fill and shadow still match by intent, the corner no longer does. The DesignFamilyGovernanceTests
   arm for this family pins the fill and the shadow, not the radius. The --alert coral variant below is kept. */
.activity-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--icon-radius);
  background: var(--color-action-primary);
  color: var(--kp-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  box-shadow: var(--shadow-cell-icon);
  flex-shrink: 0;
}

/* P4 D3 — alert-avatar variant (mockup .activity-avatar--alert, style.css:6035-6040): negative-outcome
   events (reject/delete/fail/revoke families) render a coral avatar with an exclamation instead of the
   actor initial. Tokens only: --kp-coral-500 == the mockup's --dispatch-coral (#ff6b4a). */
.activity-avatar--alert {
  background: var(--kp-coral-500);
  color: var(--kp-white);
}

.activity-content { min-width: 0; flex: 1; }

.activity-title {
  font-size: .875rem;
  color: var(--color-text);
  line-height: 1.55;
}

.activity-title strong { font-weight: 700; color: var(--color-text); }

/* P4 D5 — the acted-upon entity name links to its admin page (mockup .activity-title a,
   style.css:6052-6057): navy, no underline until hover, semibold. */
.activity-title a {
  color: var(--color-action-primary);
  text-decoration: none;
  font-weight: 600;
}

.activity-title a:hover { text-decoration: underline; }

.activity-meta {
  display: flex;
  align-items: center;
  gap: var(--kp-space-xs);
  margin-block-start: 4px;
  font-size: .75rem;
  color: var(--color-text-muted);
}

.activity-meta .icon { width: 13px; height: 13px; }

/* P4 D4 — source-category dot separator (mockup .activity-meta .dot, style.css:6077). */
.activity-meta .dot { opacity: .6; }

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--kp-space-sm);
  padding: 32px 22px;
  color: var(--color-text-muted);
  font-size: .8125rem;
}

.activity-empty .icon { width: 28px; height: 28px; }

/* ---- dashboard responsive (mockup style.css:6082-6094, ≤575.98px; Task 9) ---- */
@media (max-width: 575.98px) {
  .dashboard-meta-row { align-items: flex-start; }
  /* THE REFERENCE'S PHONE LOOK for this strip (full width, equal buttons, centred text, tighter padding),
     kept exactly as the design reference draws it below 576px. The strip's OVERFLOW OWNERSHIP -- the cap,
     the scroller and the flex floor that lets a button hold its whole label -- was written here on
     2026-09-02 during the narrow-screen pass and MOVED the same day, on the measurements below, to the
     desktop tier further down this file, because the defect it answers runs from 991.98px down, not from
     575.98px down. Nothing about the look below changed with that move; see the block that carries
     `overflow-x: auto` for the measurements and the placement reason. */
  .range-control {
    width: 100%;
    justify-content: stretch;
  }
  .range-btn { flex: 1; text-align: center; padding: 8px 10px; }
  .range-control-wrap { width: 100%; flex-wrap: wrap; }
  .range-calendar,
  .range-calendar-btn { width: 100%; }
  .range-popover { inset-inline: 0; inline-size: auto; min-inline-size: 0; }
}

/* ---- A STRIP INSIDE A DIALOG OWNS ITS SCROLLER AT EVERY WIDTH (2026-09-03) ----
   The tier block below hands the strip a scroller only under the desktop tier, and its comment says why:
   on a PAGE, a strip only runs out of room when the window does. Inside a dialog that reasoning does not
   hold -- the box is a fixed 760px (or narrower) no matter how wide the window is -- so a booking dialog
   at a 1280 viewport was still overflowing: the day chips broke a date across three lines ("2026-" /
   "09-" / "06") and the move modal's first chip was cut off at the content edge with no way to reach it.
   This is the shape the drawer tab strip already uses (components.css, the drawer-tabstrip block): the
   HOST scrolls, each button refuses to shrink or wrap. Written at 0-2-0 for the same reason that block
   states -- it has to beat this file's own `.range-btn { flex: 1 }` phone stretch, which would squeeze
   these chips instead of scrolling them, and a media query adds no specificity of its own.
   The page strips are untouched: they are in no dialog.
   AND A STRIP WHOSE HOST ALREADY SCROLLS IT IS HELD OUT (2026-09-04). The subscriber view drawer's tab
   strip is a `.range-control` inside a dialog, but its host owns the scrolling by a dated decision of
   2026-09-02 -- so an unqualified `.modal .range-control` nested a second scroller inside that host and
   capped a width the host sizes, reversing that decision from a rule that never mentioned it. The
   exclusion keeps ONE owner per strip; the chips descend from the same excluded control so the two
   halves can never drift apart. */
/* AND THE SCROLLER KEEPS A TAB'S LANDING A RING'S REACH INSIDE ITS INLINE EDGES (2026-10-21). A Tab asks this strip
   for the nearest scroll, which parks a chip's box flush with the strip's edge, and the ruled ring reaches 4px past
   the box; the strip's own 4px padding only helps at the very end of its scroll range. Measured in the move dialog:
   the day chips lost 3.5 to 4.4px of their ring at the inline end, both languages, at 1440, 768 and 390px. Written
   on the family, so every strip in a dialog has it -- the move dialog's day and slot strips and the booking drawer's.
   The END padding is one pixel more than the ring's reach: the browser rounds a scroller's scroll range to whole
   pixels, so with fractional chip widths the last fraction of the end padding cannot be scrolled to -- measured in
   the Arabic move dialog's slot strip at its end, 3.2px of the 4px padding showed and the last chip's ring lost
   0.8px. The start side scrolls to an exact 0 and keeps the family's 4px. */
.modal .range-control:not(.drawer-tabs) {
  max-inline-size: 100%;
  overflow-x: auto;
  padding-inline-end: calc(var(--kp-space-xs) + 1px);
  scroll-padding-inline: var(--kp-space-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--kp-slate-500) transparent;
}

.modal .range-control:not(.drawer-tabs) .range-btn {
  flex: 0 0 auto;
  min-inline-size: max-content;
  white-space: nowrap;
}

/* Empty decorative strips paint nothing. Required appointment choices are the exception below
   (2026-09-05): a strip with no chips keeps its own row, so the validation engine can judge it,
   paint its red border and place its field message beside it even before availability arrives. */
.range-control:empty {
  display: none;
}

#apptCreateDayStrip:empty,
#apptCreateSlotStrip:empty,
#apptMoveDayStrip:empty,
#apptMoveSlotStrip:empty {
  display: flex;
  min-block-size: 2.5rem;
}

/* Empty required strips take the unified field border (2026-07-18 ruling), without changing
   their geometry. The 2026-07-25 ruling keeps a normal border from outranking an invalid one:
   this separate rule never matches an invalid strip, leaving its error border in charge. */
#apptCreateDayStrip:empty:not(.is-invalid),
#apptCreateSlotStrip:empty:not(.is-invalid),
#apptMoveDayStrip:empty:not(.is-invalid),
#apptMoveSlotStrip:empty:not(.is-invalid) {
  border-color: var(--color-input-border);
}

/* A STRIP BEING READ SHOWS PLACEHOLDER CHIPS (ruling 15 #198c, 2026-09-23). The booking dialogs' day and slot
   strips are refilled by a slots read, and while that read ran the strip sat empty -- or kept the previous
   day's chips -- with nothing on screen saying an answer was on its way. The page script paints a few of these
   placeholders into the strip for the length of the read (the shared `.skeleton` supplies the shimmer) and the
   answer's repaint replaces them; flex-shrink is off so a placeholder never collapses inside a scrolling strip.
   THE PLACEHOLDER IS BUILT FROM THE CHIP'S OWN BOX (corrected 2026-09-23, measured on /Appointments in both
   languages at 1440px and 390px). The first form declared a fixed 2.25rem block size and kept the shared
   skeleton's 6px corner: a 104 x 36 placeholder beside a 37.44px chip with a 7px corner, so both strips grew
   from 46px to 47.44px the moment every answer landed. The placeholder now takes the chip's own block padding
   and type size and carries one line of that type -- a single preserved space, the character CSS takes a
   line's font metrics from, which paints nothing -- so its height is made the way the chip's is (the padding
   twice plus one line at the leading both inherit from the strip) instead of guessed. It takes the chip's own
   7px corner (a literal on `.range-btn`, whose reason is recorded there) and, like the chip, no border. The
   phone tier restyles only the chip's inline padding, so this one rule serves both tiers. The inline size sits
   inside the chip widths measured that day (125.47px to 177.78px). */
.skeleton-chip {
  display: inline-block;
  flex: 0 0 auto;
  inline-size: 8rem;
  padding-block: var(--kp-space-sm);
  font-size: var(--text-small);
  border-radius: 7px;
}

.skeleton-chip::before {
  content: ' ';
  white-space: pre;
}

/* THE BOOKING STRIPS KEEP THEIR SCROLLBAR'S ROOM WHILE THEY READ (ruling 15 #198c, 2026-09-26). The placeholder
   rule above made a held strip exactly as tall as its answer's chips, and in a visible browser the strip still
   grew by 10px the moment its answer landed. MEASURED on /Appointments (create drawer and move dialog, day and
   slot strips, Arabic and English, a visible Chromium): at 1440px the three placeholders (396px of content) fit
   inside the 702px strip, while the answer's 28 day chips (4057px to 4145px) or 12 slot chips (1962px to
   2082px) overflow it, so the dialog strips' `overflow-x: auto` drew their thin horizontal scrollbar only once
   the answer painted -- 47.44px held, 57.44px answered. A headless browser overlays its bars, so it measured
   47.44px in both states, and at 390px the placeholders overflow too, so both states carried the bar there.
   `overflow-x: scroll` holds the bar's room in both states whatever the answer's length -- measured 57.44px held
   and answered at 1440px and 390px in both languages, and 47.44px in both states where bars overlay; the room is
   the platform's own bar, so no thickness is written here. `scrollbar-gutter` cannot do this: it reserves the
   inline-edge gutter only (measured: no change to the horizontal bar). The EMPTY strip is left out: before a
   parcel or a day is chosen it stands as a 40px bordered pill the validation engine paints (the `:empty` rules
   above), and a held-open bar there shows its arrow buttons with nothing to scroll.
   AND THEIR WIDTH (dated 2026-09-26, the same ruling). Once not empty the strips took the family's
   `display: inline-flex`, so a held strip shrank to its three placeholders - a 398px pill - while the answer's
   chips grew it to its `max-inline-size: 100%` cap: 704px in the create drawer and 504px in the move dialog at
   1440px, in both languages. The held pill also sat on its inline-block label's line and the answer dropped
   below it, so everything under the strip moved down 26px to 27px when the answer landed. `display: flex` - the
   display the empty-state rule above already gives these four strips - makes every state block-level, spanning
   its column under the label: measured equal held and answered widths, heights and positions in both dialogs,
   both strips, both languages, at 1440px and 390px, with the answered strip, the empty pill and a chosen chip's
   scroll position unchanged. */
#apptCreateDayStrip:not(:empty),
#apptCreateSlotStrip:not(:empty),
#apptMoveDayStrip:not(:empty),
#apptMoveSlotStrip:not(:empty) {
  display: flex;
  overflow-x: scroll;
}

/* ---- THE STRIP'S OVERFLOW OWNERSHIP RUNS FROM THE DESKTOP TIER DOWN, not from the phone tier
   (2026-09-02). The containment above was written at 575.98px because that is where
   the design reference's own phone rule lives -- and the defect it was fixing does not stop there. MEASURED
   on the live host, both locales, fresh loads at eight widths: page overflow of 148px (Settings, en, 576),
   284px (Action Reasons, en, 576), 235px (Action Reasons, ar, 576), 96px (Action Reasons, en, 768) and
   24px (Settings, en, 700), with the strip's own `overflow-x` computing `visible` at every one of them --
   so the surplus moved the PAGE, and at 576 in English the selected tab was entirely off screen. The band
   was chosen to end where the widest strip fit: the English Action Reasons content measured 842px, and
   900px and every width above it measured ZERO overflow on all seven strips in both languages -- SEVEN
   (dated clause 2026-09-04: the eighth arrived on 2026-09-03 with the pickup appointment reasons, the
   English strip became 990px inside a 945px container at 1280, and the claim fell -- the PAGE scrolled 17px
   sideways at the widest desktop width and 41px at 992. A headroom recorded here is a measurement of the
   CONTENT on the day it was taken, not a property of the strip, so the page strips now own their overflow
   at every width in the rule below, and this tier serves the remaining family members only).
   WHAT MOVED AND WHAT DID NOT: only the OWNERSHIP -- the cap and the scroller -- plus the flex floor that
   makes a button hold its whole label instead of its longest word. The reference's phone look (full width,
   equal buttons, centred text, tighter padding) stays at 575.98px where the reference draws it, so nothing
   between 576 and 991.98 changes shape; it simply stops moving the page.
   PLACEMENT: after every base `.range-control`/`.range-btn` rule it overrides, because a media query adds
   no specificity and a tier written earlier would lose every tie. The bar is the shell's thin one,
   standard properties only -- a vendor scrollbar rule beside these would never paint.
   AND THE STRIP A HOST ALREADY SCROLLS IS HELD OUT HERE TOO (2026-09-04). The subscriber view drawer's tab
   strip is sized and scrolled by its host by the 2026-09-02 decision; this tier's cap reached it while the
   host's own rule -- more specific, but declaring no width -- kept the overflow, so at 360 the strip was
   capped at 304px with 350px of tabs and its third tab painted 47px outside its own border. One owner per
   strip, in every tier: the same exclusion the dialog rule above carries. ---- */

/* A PAGE TAB STRIP OWNS ITS OVERFLOW AT EVERY WIDTH (2026-09-04). The tier below was bounded by the widest
   strip's measured content, and content grows with data: the Action Reasons strip gained an eighth tab and
   pushed the page sideways at 1280, where no tier applied. So the strips rendered in a `.tabs-row` take the
   cap, the scroller and the whole-label floor unconditionally -- the shape the dialog strips already have --
   and the tier keeps serving the family members that are in no `.tabs-row`. Written at 0-2-0 so it beats
   the base `.range-control` rule at any width. A strip whose pills already hold their whole label on one
   line is untouched, because a cap and a scroller are inert until content exceeds the box; a strip whose
   pills had been WRAPPING to fit (Action Reasons at 1280: English three lines at 80.31px; Arabic two lines
   at 58.88px and fitting) now
   holds every label on one line and scrolls itself, the same look it already had below the tier. */
.tabs-row .range-control {
  max-inline-size: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--kp-slate-500) transparent;
}

.tabs-row .range-btn {
  min-inline-size: max-content;
}

@media (max-width: 991.98px) {
  .range-control:not(.drawer-tabs) {
    max-inline-size: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--kp-slate-500) transparent;
  }
  .range-btn { min-inline-size: max-content; }
}

/* ---- THE OVERFLOW CUE ON A SCROLLING TAB STRIP (owner ruling 15 #668, 2026-10-20) ----
   A strip wider than its box stays ONE row and scrolls in place; at each inline end where tabs are hidden it
   shows a soft fade with a small arrow that scrolls toward them (measured on Action Reasons at 1440: 1589px
   of tabs in Arabic, 1778px in English, in a 1118px box, with two or three tabs past the edge and no cue).
   The shared page script writes the two cue boxes into every tablist and decides which one shows from the
   tabs' measured positions; nothing here depends on a width tier.
   GEOMETRY: each cue is a sticky flex item, the first and the last of its strip, so it rides the strip's own
   scroll and rests on the visible edge. Its negative margin cancels its own width AND the strip's gap after
   it (`--tab-cue-gap`, measured), so showing or hiding a cue never changes the strip's size, and its inset
   takes back the scroller's inline padding (`--tab-cue-pad-*`, measured), because a sticky box stops at the
   padding edge and would otherwise leave a sliver of tab beyond the fade.
   The fade is the strip's own surface over its tabs and passes clicks through; only the arrow takes them.
   A gradient has no logical direction keyword, so its angle is the one physical value here, flipped for
   dir="rtl" the same way the shell's mirrored arrows are. */
.tab-strip-cue {
  --tab-cue-size: 2.5rem;
  --tab-cue-to-end: 90deg;
  position: sticky;
  z-index: 1;
  display: flex;
  align-items: center;
  flex: 0 0 var(--tab-cue-size);
  align-self: stretch;
  inline-size: var(--tab-cue-size);
  pointer-events: none;
}

html[dir="rtl"] .tab-strip-cue { --tab-cue-to-end: 270deg; }

.tab-strip-cue[hidden] { display: none; }

.tab-strip-cue--start {
  inset-inline-start: calc(var(--tab-cue-pad-start, 0px) * -1);
  margin-inline-end: calc((var(--tab-cue-size) + var(--tab-cue-gap, 0px)) * -1);
  justify-content: flex-start;
  background: linear-gradient(var(--tab-cue-to-end), var(--color-bg-surface) 40%, transparent);
}

.tab-strip-cue--end {
  inset-inline-end: calc(var(--tab-cue-pad-end, 0px) * -1);
  margin-inline-start: calc((var(--tab-cue-size) + var(--tab-cue-gap, 0px)) * -1);
  justify-content: flex-end;
  background: linear-gradient(var(--tab-cue-to-end), transparent, var(--color-bg-surface) 60%);
}

/* The arrow's dress is the Branch Users strip's own chevrons' (.branch-tab-scroll), one size smaller so it
   fits inside the pill strips' buttons. */
.tab-strip-cue__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-full);
  background: var(--kp-white);
  color: var(--color-action-primary);
  cursor: pointer;
  pointer-events: auto;
}

.tab-strip-cue__arrow:hover { background: var(--status-scheduled-bg); }

.tab-strip-cue__arrow .icon { inline-size: 14px; block-size: 14px; }

/* ---- mobile (≤768px) ---- */
@media (max-width: 768px) {
  .card-custom .card-header,
  .card-custom .card-body {
    padding: 16px;
  }

  .quick-action {
    padding: 20px 16px;
  }

  /* Page-level safety net (admin-crud-page mobile-responsive §10): grids/matrix already scroll inside their
     own .table-scroll containers, so the page body must never scroll sideways itself. */
  body { overflow-x: hidden; }

  /* Touch-target floor for the smallest icon-only controls (44px is comfortable; 40px is the practical
     minimum). The wide text buttons already clear this. */
  .row-actions .btn-action {
    width: 40px;
    height: 40px;
  }

  .pager-btn {
    min-width: 40px;
    height: 40px;
  }

  .branch-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  /* Tap-target for the matrix TOGGLE (36×20 pill since 2026-07-19): transparent padding widens the
     hit area to ≥44px without distorting the pill geometry (the old rule assumed the retired 18px
     checkbox and squashed the switch — bug-hunt confirmed). content-box keeps the painted pill at
     36×20; the padding is part of the control, so it stays clickable. */
  .perm-matrix .matrix-cell {
    box-sizing: content-box;
    inline-size: 36px;
    block-size: 20px;
    padding: 12px 4px;
    background-clip: content-box; /* the track must not paint the tap padding (appearance:none
                                     backgrounds fill the border box by default) */
  }

  /* thumb offsets shift by the tap padding (the ::before insets resolve against the padding box) */
  .perm-matrix .matrix-cell::before { inset-block-start: 14px; inset-inline-start: 6px; }
  .perm-matrix .matrix-cell:checked::before { inset-inline-start: 22px; }

  /* AT THIS WIDTH THE SWITCH DRAWS ITS RING INSIDE ITS TAP BOX (2026-10-21). Here the matrix can scroll sideways, and
     the shared keyboard landing for a grid's scroller (Admin site.js, the landing between the frozen bands) brings a
     focused switch in with its box flush to the scroller's inline end; the ruled ring, held 3px off the box, then lost
     4 to 4.4px on that side (measured in a browser on 11 of 65 switches in English at 390px, both languages). The tap
     padding above already leaves 4px of empty box on each inline side of the painted pill, so the same 1px ink ring
     drawn on the box's own edge -- the inward shape the grid scroller and its headers carry -- stays whole at that
     edge and still stands clear of the pill. */
  .perm-matrix .matrix-cell:focus-visible { outline-offset: -1px !important; }
}

/* ============================================================
   Branch people-management drawer (P4 drawer plan, Task 7)
   -- port of the mockup's #branchManageDrawer body (hero / tabs /
   toolbar / list / assignment-person rows / create-links),
   docs/reference/postOffice_Admin_html/css/style.css:10659-10684.
   Tokens only (mockup #0033A0/#002680/#1A4DB8 -> --kp-navy-600/
   -700/-500; #fff -> --kp-white; var(--ink)/(--ink-muted)/
   (--card-border) -> --color-text/--color-text-muted/--color-border).
   The base .modal-drawer (DesignSystem) already supplies the 560px
   width + RTL slide/anchor (Drawer-width decision) -- these rules
   are the drawer BODY only. Reuse-before-create: the person-row
   icon reuses the existing unified 38px .cell-icon shape (no new
   icon rule); the Assign/Unassign buttons reuse the existing
   .btn-row-primary / .btn-row-primary.text-danger pattern (the
   Roles assigned-users-manager precedent, owner order 2026-07-17)
   instead of a new button rule; the checkbox role picker reuses
   .multiselect/.multiselect-option; the no-results state reuses
   .empty-state; the zero-role inline guard reuses
   .form-validation-msg. The inline role picker (R3) itself has no
   mockup equivalent (the mockup has no picker at all) -- its two
   new classes below are additive, not a mockup port.
   ============================================================ */
.branch-drawer-hero {
  position: relative;
  padding: var(--kp-space-22) var(--kp-space-lg);
  color: var(--kp-white);
  background: linear-gradient(160deg, var(--kp-navy-700) 0%, var(--kp-navy-600) 58%, var(--kp-navy-500) 100%);
}

/* Bootstrap's own .btn-close-white supplies the white glyph (mockup reuses the same utility) --
   this rule only anchors it to the corner via logical insets (RTL-safe, no float utility needed). */
.branch-drawer-hero .btn-close {
  position: absolute;
  inset-block-start: var(--kp-space-md);
  inset-inline-end: var(--kp-space-lg);
}

.branch-drawer-hero h5 { margin: 0 0 6px; font-weight: 800; }
.branch-drawer-hero p { margin: 0; opacity: .8; font-size: .86rem; }

.branch-drawer-tabs {
  display: flex;
  padding: 0 var(--kp-space-lg);
  gap: 6px;
  border-block-end: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

.branch-drawer-tab {
  flex: 1;
  border: 0;
  border-block-end: 3px solid transparent;
  background: transparent;
  padding: var(--kp-space-14) var(--kp-space-sm) 11px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.branch-drawer-tab.active {
  color: var(--color-action-primary);
  border-color: var(--color-action-primary);
}

.branch-drawer-count {
  margin-inline-start: 4px;
  font-variant-numeric: tabular-nums;
}

.branch-drawer-toolbar {
  display: flex;
  gap: 10px;
  padding: var(--kp-space-md) var(--kp-space-lg);
}

.branch-drawer-toolbar .form-control,
.branch-drawer-toolbar .form-select { min-width: 0; }

/* Open Question 1 resolution: a single plain create-shortcut link (the mockup's two-link grid is
   dropped to a wrap-friendly flex row since the employee link never ships -- one child, no orphan
   empty column). rgba(0,51,160,.04) is the mockup's own literal, derived from --kp-navy-600's RGB
   at a 4% alpha wash a fixed token cannot express (components.css's existing rgb()-literal allowance). */
.branch-create-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 var(--kp-space-lg) var(--kp-space-18);
}

.branch-create-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 200px;
  padding: 10px;
  border: 1px dashed var(--kp-navy-500);
  border-radius: var(--kp-radius-lg);
  color: var(--color-action-primary);
  background: rgba(0, 51, 160, .04);
  font-weight: 700;
  text-decoration: none;
  font-size: .82rem;
}

/* flex:1 1 auto + min-height:0 (beyond the mockup's flat "overflow:auto") is required here: the base
   .modal-drawer .modal-content is a real flex column (components.css), so the scrolling child needs an
   explicit grow + a min-height reset or it will not fill the remaining height / will not scroll
   (preserve the reference's WORKING effect, not just its literal declarations). */
/* The list is this drawer's scroller (the drawer has no dialog body), so it carries the drawer family's block scroll
   padding itself (2026-10-21): a Tab's nearest scroll parked a person's Assign button flush with the list's bottom,
   and its ring -- 4px past the box -- lost 3.1 to 4.4px there at 1440, 768 and 390px, both languages. */
.branch-drawer-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scroll-padding-block: var(--kp-space-sm);
  padding: 0 var(--kp-space-lg) var(--kp-space-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-xl);
  background: var(--color-bg-surface);
}

/* Expanded state (R3 inline role picker) -- no mockup equivalent; stacks the identity row above the
   full-width picker instead of squeezing both into one row. */
.assignment-person--expanded { flex-direction: column; align-items: stretch; }

/* min-inline-size: 0 (2026-10-21): the head is a flex item of the row, and an item's automatic minimum is its content's
   unbroken width -- here the nowrap name and e-mail lines plus the actions -- so at 390px the head stood 48 to 94px
   wider than its row and pushed the Assign button past the drawer and the window. With the floor removed the head
   shrinks to the row, the main column (already min-width 0) takes what is left and the name and e-mail ellipsis
   engage; where the head already fits, nothing moves. */
.assignment-person-head { display: flex; align-items: center; gap: 12px; min-inline-size: 0; }

.assignment-person-main { flex: 1; min-width: 0; }

.assignment-person-name {
  font-weight: 750;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-person-meta {
  color: var(--color-text-muted);
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-person-actions { display: flex; gap: 6px; }

.assignment-role-picker {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-sm);
}

.assignment-role-picker-heading {
  font-weight: 700;
  font-size: .82rem;
  color: var(--color-text);
}

/* ---- drawer responsive (mockup style.css:10684, the ONLY @media rule touching these selectors --
   grepped in full, the full-ladder rule: port every declared tier, not the base rule alone) ---- */
@media (max-width: 575.98px) {
  .branch-drawer-toolbar { flex-direction: column; }
  .assignment-person { align-items: flex-start; }
  .assignment-person-actions { flex-direction: column; }
}

/* ---- Input border parity fix (lead ruling, 2026-07-18 P4 batch -- the drawer ritual's app-wide
   finding). Ports the mockup's UNIFIED FORM CONTROLS border + hover mechanism (style.css:2169/2182,
   2209-2212) onto .form-control/.form-select -- ADMIN ONLY. KwtPost.Portal loads components.css
   directly and never this file, so this does not touch portal parity (closed separately); it must
   NEVER be ported into components.css/base.css. Existing focus-ring behavior (components.css
   .form-control:focus/.form-select:focus) is unchanged -- the mockup's focus rule isn't touched either. */
.form-control,
.form-select {
  border-color: var(--color-input-border);
}

/* The reference's faint shadow under every text input and select at rest (its UNIFIED FORM CONTROLS rule,
   --shadow-xs; added 2026-11-10). ADMIN ONLY, for the same reason as the border above: the Portal never loads this
   file. The focused field still draws no glow: the Admin's one-ring rule in the shared sheet names the focus state
   with a heavier selector and sets the shadow to none there, valid or invalid (owner order 2026-07-20, 15 #157). */
.form-control,
.form-select {
  box-shadow: var(--shadow-field);
}

/* :not(.is-invalid) added 2026-07-25 -- an invalid control must never stop looking invalid. The
   mockup has no inline-validation state, so its rule (style.css:2209) never had to exclude one;
   ported as-is it outranked the red error border (4 compound selectors vs 2), and hovering a flagged
   field repainted its border neutral grey while the message underneath still read "required"
   (proven live on the closure date field). Excluding flagged controls hands them back to
   .form-control.is-invalid (components.css) instead of fighting it with !important. */
.form-control:hover:not(:disabled):not(:focus):not(.is-invalid),
.form-select:hover:not(:disabled):not(:focus):not(.is-invalid) {
  border-color: var(--color-input-border-hover);
}

/* ============================================================
   Branches page — P4 mockup-parity (spec 2026-07-19-branches-p4-parity-spec.md).
   Branches-specific rules only (single consumer today); the shared filter-bar/search-box + the
   .table-custom--sticky-edges modifier + .visually-hidden live in KwtPost.DesignSystem/components.css
   (owner amendments to that spec). Every mockup var/hex is translated to a design-system token (that spec's token rule): mockup
   --primary→--color-action-primary, --primary-deep→--kp-navy-700, --primary-light→--color-shell-soft-strong,
   --primary-lighter→--color-shell-soft, --text-primary→--color-text, --text-secondary/--text-muted +
   #526176/#64748b/#7b8798→--color-text-muted, --card-bg→--color-bg-surface, --border-color/#e5eaf0→
   --color-border, --border-light→--kp-slate-100, --body-bg→--color-bg-canvas, --danger→--status-alert-fg,
   #f3f6fa→--kp-slate-100, #fbfcfe→--color-bg-canvas, #f3f7ff→--color-shell-soft, #eef4ff→
   --color-shell-soft-strong, mockup --radius-sm(8px)→--kp-radius-md, --radius-md(12px)→--kp-radius-xl,
   'JetBrains Mono'→var(--font-mono). Sticky columns + zebra opacity: the modifier positions, these rules
   paint the opaque row backgrounds (adopter requirement in the modifier comment).
   ============================================================ */

/* ---- Table-header block (mockup branches.html:389-404, style.css:8428-8483) ---- */
.branches-table-heading { min-width: 0; }

.branches-table-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.branches-table-heading p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.branches-result-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--kp-navy-100);
  border-radius: var(--kp-radius-full);
  background: var(--color-shell-soft);
  color: var(--color-action-primary);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.branches-result-count strong {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.branches-table-legend {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto; /* mockup header order: title block (start) → legend at the END
                                (owner comparison 2026-07-19: ours floated mid-header; the kept
                                columns-chooser extra follows after it) */
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.branches-table-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.branches-table-legend .icon { width: 14px; height: 14px; color: var(--color-action-primary); }

/* Officers cell = the mockup's plain metric (number + muted icon), NOT a bordered pill
   (mockup .branch-metric, style.css:8697-8708 byte-values; owner comparison 2026-07-19).
   ICON 15px -> 16px for mockup-v3 (restyle wave U7, ledger 15 #137). Where the reference says so: the v3
   branches page draws this metric as a bare 16px muted Lucide glyph beside the number
   (postOfficeAdmin-2/branches.html:429-430), and its own .branch-metric rule (style.css:8712, 15px) no
   longer reaches that page at all -- the v3 table is a plain <table class="table-custom">
   (branches.html:397), so every .branches-table override in that sheet is dead there. The 14px/700 number
   and the tabular figures below are KEPT: ruling D4 keeps our affordances, and the reference's bare number
   carries neither. */
.branch-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 62px;
  font-variant-numeric: tabular-nums;
}

.branch-metric strong { color: var(--color-text); font-size: 14px; font-weight: 700; }
.branch-metric .icon { width: 16px; height: 16px; color: var(--color-text-muted); }

/* Scroll cue: hidden by default; the legend still swaps out below 1200px (mockup style.css:8484-8496 /
   8800-8802), but the cue itself is no longer shown by BAND. Owner ruling 2026-09-01, supersedes-in-part
   15 #137: the shared overflow measurement sets .is-scrollable exactly when checked columns exceed the
   wrapper, at any width. */
.branches-scroll-cue {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--kp-slate-100);
  background: var(--color-bg-canvas);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 500;
}

.branches-scroll-cue .icon { width: 14px; height: 14px; color: var(--color-action-primary); }

/* THE CUE'S ARROW POINTS AT THE HIDDEN COLUMNS, so it mirrors with the reading direction (2026-09-02,
   measured on the deployed admin). The sprite draws `#icon-arrow` pointing right (`M5 12h14` plus a chevron at
   x=19) and carries no mirrored variant, so in Arabic -- where the columns run off the LEFT edge -- the
   cue was telling the reader to look the wrong way. The mirror is declared HERE, on the family's own
   class, rather than by adding the shared `.icon--directional` helper at the twenty call sites: this
   arrow is directional by definition, so making it the cue's own property means a cue added to a future
   page inherits it instead of depending on that page's author remembering a class. `scaleX(-1)` is the
   same mechanism the shell's other mirrored arrows use: a horizontal flip of the glyph under html[dir="rtl"].
   (Dated 2026-10-31, 15 #904(a): the launcher card arrow this sentence once pointed at left with the launcher.) */
html[dir="rtl"] .branches-scroll-cue .icon { transform: scaleX(-1); }

@media (max-width: 1199.98px) {
  .branches-table-legend { display: none; }
}

.branches-scroll-cue.is-scrollable { display: flex; }

/* ---- Table shell: fixed layout + colgroup widths (mockup style.css:8534-8544). The
   default-visible floor is narrower than the audit-inclusive full set; .table-scroll (overflow-x) provides
   the horizontal scroll. ---- */
.branches-table {
  /* 1407 -> 1415px, 2026-09-02. Two bands below take their measured header requirements -- governorate +12px
     and sort order +1px -- and the same edit CLOSES the 5px of floor slack this table had carried since the
     P4 fixup: the floor is now exactly the default-visible column sum
     (320 + 220 + 142 + 130 + 165 + 91 + 109 + 238), which is what the family's floor rule asks of every fixed
     grid and what the recorded looseness was waiting on -- the next package to touch this grid's widths was
     to close it, and this is that package. Closing it is also what made the sort-order shortfall visible:
     while the floor was 5px loose every column rendered 1407/1402 of its declared width, and that stretch was
     the only thing covering an 0.78px header overflow. */
  min-width: 1475px;
  table-layout: fixed;
}

/* Grid head-band exception RETIRED 2026-08-02 (mockup-v3 restyle wave U1, owner ruling D6 "one light band
   everywhere", ledger 15 #137). Branches was the last page carrying the pre-2026-07-23 HEAVY band
   (#f3f6fa/#526176/700/12.5px/11×14 + a td padding-block:15px row and a mobile re-tighten that existed only
   to beat those overrides, ledger 15 #96 F1); it now inherits the shared light band from
   .table-custom thead th like every other admin grid, so the whole family — band, the two sticky
   first/last header-cell background rules, the row padding, and the mobile re-tighten — is gone rather than
   restated. The sticky-edge header cells read --color-table-head-bg (the light token) again, and the shared
   components.css mobile rule (10×12 at 767.98px) now reaches Branches unopposed. The --kp-th-band /
   --kp-th-text primitives were removed from tokens.css in the same change (this block was their only
   consumer). Row typography below is untouched by U1. */

/* Branches identity NAME paints 14px/700. It shipped at 15px from the v2 mockup's
   .branches-table .branch-name-text .fw-bold (style.css:8615-8624; blind design review finding index 28,
   2026-07-23, ledger 15 #96 F9); mockup-v3 SUPERSEDES that size (restyle wave U7, owner ruling D1 typography
   adoption, ledger 15 #137, lead adjudication 2 of 2026-08-02). Why the reference now reads 14: the v3
   branches table is a plain <table class="table-custom"> (postOfficeAdmin-2/branches.html:397), so the
   .branches-table override above never applies there -- the name is a Bootstrap .fw-bold div taking its size
   from the shared cell rule, 14px (deployed-reference.css:1381-1383). The 700 weight is still a live
   reference value (.fw-bold) and stays; only the size moves. Kept scoped to .branches-table like the
   roles-table name override (15 #96 F7), so every other grid keeps the shared .admin-identity-name baseline. */
.branches-table .admin-identity-name { font-size: 14px; font-weight: 700; }

/* C63 / PO-19 / 15 #190f: active sortable headers include the 24px clear control and 2px gap.
   Column and table budgets include it; frozen Actions widths and the focus ladder retain their rules. */
.branches-table .branch-col-identity { width: 320px; }
.branches-table .branch-col-hours { width: 220px; }
/* 130 -> 142px, 2026-09-02. Measured at 1536 in English on the live grid at a verified scrollLeft 0, so
   the frozen action column was covering nothing: the header ran 109.27px of ink (the 95.27px word plus its
   14px sort glyph) inside a 98.45px content box and painted 10.82px past its own cell onto the neighbouring
   Phone header -- the only clipped header the family-wide sweep of all fifteen grid pages found, in either
   language. English binds; Arabic asks for 71.64px of ink. The band takes the same derivation the other
   header-bound columns take, from the ink actually measured rather than from a reconstructed sum: the
   109.27px run + the 32px cell padding = 141.27 -> 142px. The glyph's own spacing is not added a second time,
   because the header is a plain table-cell holding a text node and an inline glyph with no margin, so the
   single source space between them is consumed as the text node's trailing space -- the gap between the two
   measures 0.00px. The body is not the binding side here (the widest governorate name is 67.81 + 32.00 =
   99.81px). The floor above moves +8px, not +12: this band adds 12 and the sort-order band below adds 1,
   so the declared column sum rises 13, and the same edit closes the 5px of floor slack the table carried
   (1407 + 13 - 5 = 1415). */
.branches-table .branch-col-governorate { width: 168px; }
.branches-table .branch-col-phone { width: 137px; }
/* 165px (was 120px): the header text "Assigned Officers" / "موظفو البريد المعيَّنون" clipped at the
   table's own min-width floor -- measured natural text + the th's 16px+16px inline padding needs 155px
   (en) / 164px (ar); 165px clears both with a small margin (P4 fixup, owner screenshot review 2026-07-19).
   .branches-table min-width bumped by the same +45px delta so the declared-width sum stays consistent. */
.branches-table .branch-col-officers { width: 165px; }
/* 90 -> 91px, 2026-09-02, and this band is the SIBLING the governorate fix exposed rather than caused. It
   declared 90px against a 90.78px header requirement, and the shortfall was invisible because this table's
   own floor slack was stretching every column by 1407/1402 -- the same mechanism PK-P35n recorded on the two
   user grids' identity band, one grid later. Re-deriving the floor to the exact default-visible sum removed
   the stretch, the column rendered the 90.00px it declares, and the header's 58.78px of ink stood 0.78px
   past its 58.00px content box. English binds (Arabic asks for 52.77px); the widest order value is 8.06px,
   so the body needs 40.06px. 58.78 + 32.00 = 90.78 -> 91px. */
.branches-table .branch-col-order { width: 117px; }
/* 108 -> 109px, 2026-09-01 (PK-P35q, N-P35PV-4). With the family's status-cell padding lever this
   cell's content box was 92.00px against a 90.42px badge -- it held the badge, but 0.42px short of
   the 2px of clearance this family's bounds are kept to. The pixel is paid out of this table's own
   pre-existing floor slack (the floor declares 1407px against a column sum that was 1401px), so the
   table's rendered width, its scroll range and every other column are unchanged and the recorded
   looseness shrinks from 6px to 5px. Content box is now 93.00px: 2.58px over the badge.
   109 -> 110, 2026-09-09 (15 #190f): the active header's ink is 93.64px under the same trimmed gutter
   (the status-header note beside the td lever), so the band takes one more pixel: 110 - 16 = 94.00px. */
.branches-table .branch-col-status { width: 110px; }
.branches-table .branch-col-date { width: 157px; }
.branches-table .branch-col-audit { width: 158px; }
/* PK-P35c N-P35E-2: four controls need 200.5px on desktop and 212.5px at the mobile touch tier.
   238px keeps that widest row inside the column after the tier's 12px + 12px cell padding. The table floor
   rises by the same 112px delta so its default-visible colgroup sum stays internally consistent. */
.branches-table .branch-col-actions { width: 238px; }

/* Opaque row backgrounds so the sticky first/last columns never let scrolled cells show through
   (the .table-custom--sticky-edges adopter requirement), plus the three-state zebra (mockup 8556-8570). */
.branches-table tbody td { background: var(--color-bg-surface); }
.branches-table tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.branches-table tbody tr:hover td { background: var(--color-table-row-hover); }
.branches-table tbody tr:focus-within td { background: var(--color-table-row-focus); }

/* THE DISABLED "OPEN IN MAP" LINK KEEPS ITS RESTING LOOK UNDER THE POINTER (dated 2026-11-07; Core Rule 13: the admin
   mockup's disabled map link changes nothing on hover; closes risk row
   SDSA-BRANCHES-MAPLINK-DISABLED-HOVER). The link stays the pointer's target so it can show its
   not-allowed cursor, which let the house secondary-button hover paint it as if it could be pressed. Scoped to this one
   link: the shared disabled family is not changed, because its other users keep their own behaviour. The three values
   are the secondary button's own resting ones. Dated clause, 2026-11-07 (Core Rule 13, the same mockup reading): the
   resting look holds while the pointer presses the link too, because the shared secondary-button press scales a pressed
   button to .97 and the inert link visibly shrank; transform none keeps its resting size. A live link keeps the press. */
#branchFormMapLink.is-disabled[aria-disabled="true"]:hover,
#branchFormMapLink.is-disabled[aria-disabled="true"]:active {
  background: var(--color-bg-canvas);
  border-color: var(--color-border);
  color: var(--kp-navy-700);
  transform: none;
}

/* Hours column: extra side padding + a divider from the identity column (mockup 8730-8734). */
.branches-table thead th[data-col="hours"],
.branches-table .hours-cell {
  padding-inline: 18px;
  border-inline-end: 1px solid var(--color-border);
}

/* Hours-column legibility FLOOR (owner screenshot 2026-07-26 -- Arabic showed one glyph, "Sun-Thu 8",
   where the value is "08:00-18:00"). Under natural table layout the
   <col class="branch-col-hours"> 220px above is only a
   HINT, and the browser compressed this column to 123px in Arabic (87px content after the 18+18
   padding) -- less than one readable day-plus-times pair, which in Arabic measures 165px.
   RE-DERIVED 2026-08-02 for the INLINE RUN (restyle wave U7, ledger 15 #137). This family is no longer a
   two-track grid, so the floor is no longer "day track + gap + times track". The binding constraint is now
   the WIDEST SINGLE NOWRAP SEGMENT: .hc-seg is white-space:nowrap and the " · " join between segments is
   the run's only break opportunity, so one segment is the smallest thing that must fit on a line. That
   segment is the day label + the ": " pseudo + one time range, all at the UNCHANGED 11.5px sizes:
     78px   worst-case Arabic day label (the Sunday-Thursday range at 11.5px/700, live-measured 2026-07-26)
     <=8px  the ": " pseudo on .hc-days::after -- a colon plus a space at that same 11.5px/700 advance is
            comfortably under the 8px grid gap it replaced, so the old gap term is kept as a safe UPPER
            bound rather than re-measured
     79px   one "08:00-18:00" range (.hc-times at 11.5px/600 mono, same 2026-07-26 measurement)
   = <=165px content + 18+18 inline padding = 201px. The floor VALUE is therefore unchanged, and now
   carries a couple of px of slack where it used to be exact.
   THE FAILURE MODE IT PREVENTS CHANGED WITH IT. It is no longer a track squeeze (the "auto" day track
   taking max-content before the 1fr times track saw any free space, leaving .hc-times ~0px and its own
   ellipsis eating the value -- English escaped that only because "Sun-Thu" measures 50px). Inline, a run
   too wide for its column breaks at the " · " joins onto further lines; only a SINGLE segment wider than
   the column overflows its line, and there the .hours-summary overflow/ellipsis clamp truncates it from
   the end. So the floor now buys one whole readable segment on one line -- below it, the ellipsis starts
   eating the TIMES off the tail of the first segment, which is the same unreadable outcome by a new route.
   Owner ruling 2026-09-01, supersedes-in-part 15 #137: this floor keeps a rendered checked column
   legible and any excess width scrolls inside the wrapper. The mockup never
   reaches the squeezed state and carries no equivalent rule -- an uncovered state, not a divergence
   (Core Rule 13). Residual by design: a multi-shift day joins its ranges with ", " INSIDE the one nowrap
   segment, so that segment can still outgrow the floor and ellipse -- but it truncates AFTER a readable
   first shift, and the drawer shows the full week. */
.branches-table thead th[data-col="hours"],
.branches-table .hours-cell {
  min-inline-size: 201px;
}

/* Centered numeric columns (mockup centers the metric cells). The STATUS column's centering migrated to the
   shared .status-col mechanism (top of this file, P4 last-sweep) so all four status-bearing grids center via
   ONE rule -- the status th/td now carry .status-col instead of relying on this per-page selector. */
.branches-table thead th[data-col="assignedOfficers"],
.branches-table thead th[data-col="sortOrder"],
.branches-table td.branch-center { text-align: center; }

/* Identity-cell address row (mockup .bc-address, style.css:8669-8675): a leading 12px map-pin + muted
   address text, sitting below the gov/phone meta. 15 #96 F9. */
.branches-table .branch-address { display: inline-flex; align-items: center; gap: var(--kp-space-xs); }
.branches-table .branch-address .icon { width: 12px; height: 12px; color: var(--color-text-muted); flex-shrink: 0; }

/* ---- Identity-cell email as a mailto link (Change 7, mockup style.css:8625-8650) ----
   SIZE 13px -> .76rem for mockup-v3 (restyle wave U7, ledger 15 #137): the v3 page pins
   .branches-page .bc-email at .76rem (deployed-parity-final.css:195-199).
   The NAVY colour and the mailto link below are deliberately NOT moved to the reference's grey. That grey is
   a designer defect, not intent: it comes from a stray Bootstrap .text-muted on the hand-written row markup
   (postOfficeAdmin-2/branches.html:420), which the page's own .bc-email rule (branches.html:105,
   color: var(--primary)) and every JS-inserted row (branches.html:1190, a bare <a class="bc-email">)
   contradict. Recorded as intake report section 8 item 3; ruling D4 keeps the mailto affordance.
   Lead adjudication 4 of 2026-08-02. */
.branches-table .bc-email {
  display: block;
  max-width: 220px;
  margin-top: 2px;
  direction: ltr;
  text-align: start;
  color: var(--color-action-primary);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The right-to-left half of the rule above (2026-08-29, owner rulings of that day, ledger 15 #183 -- the
   same two-part shape the Branch Users identity e-mail carries). `direction: ltr` is what makes the ellipsis
   eat the END of an address instead of its beginning; `text-align: start` then resolves against the BLOCK's
   own direction, which is now left-to-right, so under the Arabic default the address sat at the far side of
   its own shrink-to-fit box -- measured between 19.6px and 53.1px away from the start edge its own branch
   name uses, and by a different amount on every row, which made the whole column read ragged. Realigning the
   left-to-right box to its end edge on a right-to-left page puts the address back directly under its name;
   in English nothing changes, because there `start` and the cell's start edge are already the same edge. */
html[dir="rtl"] .branches-table .bc-email { text-align: end; }

.branches-table .bc-email:hover {
  color: var(--kp-navy-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.branches-table .bc-email:focus-visible,
.branch-card .bc-email:focus-visible {
  outline: 2px solid var(--color-action-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Hours summary: ONE inline run of segments (mockup-v3 restyle wave U7, ledger 15 #137) ----
   v3 writes the week as a single inline summary -- nowrap segments joined by " · ", the line free to break
   BETWEEN them -- where this family shipped as a stacked two-column grid (v2 style.css:8735-8775). Where the
   reference says so: the v3 branches table is a plain <table class="table-custom">
   (postOfficeAdmin-2/branches.html:397), so that whole .hours-summary grid family is dead there; the rules
   that actually paint are deployed-parity-final.css:205-220 (cell white-space:normal, .hc-seg
   white-space:nowrap, closed text in the danger colour) over markup that emits bare
   `<span class="hc-seg">days: times</span>` joined by " · " (branches.html:1513-1522).
   CSS-ONLY on purpose: the Razor partial keeps its .hc-days / .hc-times spans because the branch-card view
   reads them (branches.js readHoursText, which already joins segments with this same "·"), and leaving the
   partial untouched keeps every data-col attribute byte-identical for BranchesIntegrationTests.
   NOT adopted: the reference's 14px cell/segment size. The fitted-grid floor above (201px) is derived from
   these 11.5px day+time sizes -- see its own re-derivation for the inline run -- and this column is
   fit-priority 30, so raising the type widens the worst-case segment past that floor and costs the desktop
   fit ruling D2 protects. Layout moves; sizes stay. */
.branches-table .hours-cell {
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* PLACEMENT IS PART OF THE RULE (2026-09-02). A media query adds NO specificity, so these overrides and
   each grid's own base declarations resolve against each other by SOURCE ORDER. Written earlier in the
   file this block lost every tie it needed to win: Branches declares its own actions width and floor
   further down, so at 360px the band went on painting 238px and the override was dead text that both a
   source-text arm and a not-clipped browser arm read as fine. The block therefore sits AFTER the last
   declaration of every grid it overrides -- by construction rather than by luck -- and its arm resolves
   the effective cascade (declaration positions) rather than the presence of a rule. */
/* ---- THE FROZEN CONTROL BAND'S WIDTH, DERIVED FOR THE NARROW TIER (owner rulings 2026-09-02, 15 #184e:
   keep it frozen, minimize its width AND the spacing inside it; 15 #184f: below the desktop tier a band
   holding MORE THAN ONE control renders a single menu trigger instead, and the row's own actions open as a
   menu). The shared layer gives the band back its spacing -- 8px of cell padding either side instead of 16
   -- and #184f replaces the control RUN, so every number below is derived from what the cell now paints:

     derived = ceil(max(band content, head-band run + 2 x 8)) + 1

   BAND CONTENT, per #184f. A cell with two or more controls paints ONE 40px trigger and nothing else
   (`.row-menu-trigger`, components.css), so its content is 40 + 16 = 56px. A cell with ONE control keeps
   that control -- the two log grids' labelled Details button -- so its content is P + 16, where P is that
   button's rendered width: MEASURED 2026-09-02 on the live admin host at the narrow tier, both languages,
   DPR 1, root 16px, no zoom or transform, 80.50px in Arabic ("عرض") against 79.27px in English ("View").
   Arabic binds, and the value is identical on every grid that carries the button, because it is one shared
   control with one shared label; it corroborates the row-control model's own recorded 80.50px.

   THE HEAD-BAND RUN NOW BINDS ON THE FIVE MENU GRIDS, and #184e's own clause is why the derivation cannot
   stop at 56: "the Actions header run must still fit the derived width in both languages" -- a clause
   #184f supersedes nothing of, because it replaced the band's CONTROLS, not its heading. "ACTIONS" measures
   55.44px in English (48.41px Arabic) and "DETAILS" 50.61px (50.27px Arabic), the head cell carries the
   same 8px either side, and `.table-custom thead th` is `white-space: nowrap` inside a cell that clips at
   its own boundary -- so a 57px band would cut the column's own name with nothing to recover it from. Head
   + 16 is 71.44px, which decides all five: ceil(71.44) + 1 = 73. On the two log grids the button still wins
   (96.50 against 66.61), so their 98 is unchanged.

   THE LAST PIXEL IS NOT DECORATION. A fixed-layout table hands its columns FRACTIONAL used widths, so a
   cell declared at exactly its requirement rounds its content box down and clips by 1px -- measured
   2026-09-02 on five of these grids in Arabic with the ceil-only numbers in place. It is the same rounding
   clearance this page's other bounds already keep.

   AND EVERY DERIVATION THAT CONSUMED THE OLD WIDTH IS RE-RUN IN THE SAME EDIT (a measured figure that
   replaces an earlier input re-runs every derivation that consumed it, and no floor's slack is closed
   without re-measuring that grid's bands in both languages), because a fixed-layout table shares any
   difference between its floor and its declared columns across ALL of them -- which is how a column once
   came to render 214.8px against a 193px declaration. Two shapes, and each grid
   takes the one its own block already records:
     * a grid with a DESIGNATED FLEXIBLE COLUMN holds its floor at the desktop budget and hands the freed
       width to that column alone (Admin Users, Branch Users and Roles: identity = budget - fixed columns);
     * a grid whose floor IS its declared sum moves the floor by the same delta (Branches, Retired Roles and
       the two log grids), exactly as that floor's own comment says it must.
   The freeze, its inset, the z-index tiers, the edge shadow, the opaque row paint and the 36/40px touch
   floors are untouched -- only what the band holds, and the space around it, moves. ---- */
@media (max-width: 991.98px) {
  /* Branches: 4 controls -> one 40px trigger, 40 + 16 = 56; head "ACTIONS" 55.44 + 16 = 71.44 binds,
     +1 rounding = 73. Floor 1401 - (224 - 73) = 1250. */
  .branches-table { min-width: 1310px; }
  .branches-table .branch-col-actions { width: 73px; }

  /* Admin Users: 3 controls -> the same 73, decided by the same head-band run.
     Identity is this grid's flexible column, and it absorbs the whole 182 - 73 = 109: 407 + 109 = 516. */
  .adminusers-table .au-col-actions { width: 73px; }
  .adminusers-table .au-col-identity { width: 516px; }

  /* Branch Users: the same control count and the same 73.
     Identity is this grid's flexible column: 439 + (182 - 73) = 548. */
  .branchusers-table .bru-col-actions { width: 73px; }
  .branchusers-table .bru-col-identity { width: 548px; }

  /* Roles: 3 icon controls -> the same 73, decided by the same head-band run.
     Identity is this grid's flexible column: 335 + (141 - 73) = 403. */
  .roles-table .role-col-actions { width: 73px; }
  .roles-table .role-col-identity { width: 402px; }

  /* Retired Roles: the same three controls -> 73px, decided by the same head-band run as its siblings. */
  .retiredroles-table .rr-col-actions { width: 73px; }
  /* This grid has no flexible column, so its floor is its own default-visible sum carrying the frozen
     band's delta at this tier: 718 - (152 - 73) = 639px. Both numbers moved on 2026-09-13, when the two
     date columns became born-hidden (ledger 15 #137) and left the default-visible sum -- a derivation that
     consumed the old width is re-run in the same edit. */
  .retiredroles-table { min-width: 639px; }

  /* The two log grids hold ONE labelled button and nothing else, so #184f leaves them alone: a menu of one
     item is a longer road to the same button. 80.50 + 16 = 96.50, +1 rounding = 98.
     Both floors are their declared sums: 1024 - 22 = 1002, and 1384 - 22 = 1362. */
  .auditlog-table { min-width: 1002px; }
  .auditlog-table .al-col-details { width: 98px; }
  .errorlog-table { min-width: 1362px; }
  .errorlog-table .el-col-details { width: 98px; }

  /* THE ONE GRID THAT LIVES INSIDE A CARD GETS THE PAGE'S OWN LANE (2026-09-02).
     Every other admin grid sits directly on the page, so the page's 16px inline padding is the only inset
     between the viewport and its scroller: 311px of scrollport at 360. The Settings legal-sections grid is
     the exception -- it is rendered inside a `.card-custom > .card-body`, so it pays that body's inline
     padding a SECOND time and measured 279px on the deployed admin at 360 in both languages. It is also the
     grid carrying the family's widest derived frozen band (four row controls: 214.98px in English, 229.06px
     in Arabic), so the reader was left 64.02px (en) / 49.94px (ar) of actual data -- the narrowest lane in
     the product. Ruling 15 #184e governs that BAND and is correct as shipped; nothing governed the
     container, and widening the band back would undo the ruling rather than answer it.

     So the GRID ALONE goes full-bleed inside its card, by exactly the padding it was paying twice. Its five
     sibling children in that card body -- both sub-heads, the document form, the filter bar and the scroll
     cue -- keep their padding, and the card keeps its BLOCK padding and its corners: only the scroller
     reaches the card's inner edge, which is where every other grid already starts. The offset is the
     NEGATION of the card body's own inline padding rather than a number chosen to look right, so if that
     padding is ever re-tuned the two move together; the governance arm derives the same equality from the
     card rule instead of restating either figure.

     THE SCROLL CUE TRAVELS WITH THE GRID (2026-09-02, measured on the deployed admin). It is the grid's own
     legend -- it announces that grid's hidden columns and is toggled by that grid's overflow measurement --
     but it is a SIBLING element outside the wrapper, so the rule above moved the grid and left it behind:
     measured at 360 on the deployed admin, the cue drew at x=33 w=279 above a scroller at x=17 w=311, a
     16px step on each side that read as a misaligned banner. On Branches, where neither sits in a card,
     the two already agree exactly. One selector rather than a second declaration, so the pair can never
     drift apart in a future re-tune. */
  #settingsLegalScrollCue,
  #settingsLegalSections { margin-inline: -22px; }

  /* AND THE RING HAS TO SURVIVE THE CLIP. `.table-scroll` is focusable -- it joined the keyboard order so
     the grid can be scrolled without a pointer -- and the admin's one-ring decision of 2026-07-20 paints
     every focused element with a 1px outline held 3px OFF the box, with `!important`. The rule above puts
     this scroller flush against `.card-custom`'s padding box, and that card clips (`overflow: hidden`, its
     corners depend on it), so all of the ring's inline extent lands outside the card and is thrown away:
     the reader tabs to the scroller and sees no ring at all.

     Neither the clip nor the family ring is the thing to change. This ONE scroller draws its ring inside
     its own box instead, which is the only place left that the card cannot cut. `!important` because the
     family rule carries it, and scoped to this single selector for the same reason -- nothing else in this
     tier may inherit an override this blunt. Measured 2026-09-02 at 360 in both languages. */
  #settingsLegalSections .table-scroll:focus-visible { outline-offset: -1px !important; }
}

/* The card body's inline padding steps down to 16px at this tier, so the full-bleed offset steps with it.
   This block is declared AFTER the tier above on purpose: a media query adds no specificity, so two rules of
   equal weight are resolved by source order and the narrower band has to come last to win inside it.
   The cue is carried in the same selector as the grid at BOTH tiers: a step the pair takes together
   is one the pair cannot fall out of. */
@media (max-width: 768px) {
  #settingsLegalScrollCue,
  #settingsLegalSections { margin-inline: -16px; }
}

.hours-summary {
  display: block;      /* was a 5px-gap grid stacking one segment per row */
  overflow: hidden;    /* the ellipsis clamp MOVED here from .hc-times: with the segments inline it is the
                          RUN that can overflow, and under the table's fixed layout a single nowrap segment
                          wider than its column would paint past the cell edge instead of truncating. Keeps
                          the "legible or truncated, never spilled" behaviour the floor comment above ends on. */
  text-overflow: ellipsis;
}

.hours-summary .hc-seg {
  display: inline;
  white-space: nowrap; /* a segment never splits; the join below is the only break opportunity in the run */
}

/* The v3 join. A punctuation glyph, not text -- no resource key, and the same "·" the branch-card summary
   already joins its segments with (branches.js readHoursText). white-space:normal ON THE PSEUDO is what makes
   the join breakable while both neighbours are nowrap; no colour is set because the reference has no rule for
   its separator either -- it inherits the cell, and so does this one. */
.hours-summary .hc-seg:not(:last-child)::after {
  /* Written as CSS escapes (U+0020 U+00B7 U+0020) rather than a literal " · ": it renders identically and
     a glyph that is never a raw byte cannot be mojibaked by a charset mishandling of this stylesheet. */
  content: "\0020\00B7\0020";
  white-space: normal;
}

.hours-summary .hc-days {
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Day label and times were two grid tracks held apart by an 8px gap. Inline they take the reference's own
   separator instead, "days: times" (branches.html:1520). */
.hours-summary .hc-days::after {
  content: ": ";
}

.hours-summary .hc-times {
  color: var(--color-text);
  direction: ltr;
  unicode-bidi: isolate; /* REQUIRED by the move to inline, not decoration. As a grid ITEM this span was
                            blockified, so `direction` applied to it; on an inline box `direction` alone does
                            nothing (CSS 2.1 section 9.10 -- it needs unicode-bidi other than normal). Without
                            the isolate an Arabic row reorders "08:00-18:00" into "18:00-08:00": the dash is a
                            neutral between two number runs, so it resolves to the RTL paragraph direction and
                            the two runs swap. This is the CSS form of the <bdi dir="ltr"> the rest of the
                            admin wraps its numbers in. */
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}

.hours-summary .hc-seg.is-closed .hc-times {
  color: var(--status-alert-fg);
  font-family: inherit;
  font-weight: 700;
}

/* ---- View toggle (mockup style.css:8902-8915) ---- */
.view-toggle {
  display: flex;
  border: 1px solid var(--color-input-border);
  border-radius: var(--kp-radius-md);
  overflow: hidden;
  background: var(--color-bg-surface);
  flex-shrink: 0;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background-color .2s ease, color .2s ease;
}

.view-toggle-btn:hover { color: var(--color-action-primary); background: var(--kp-slate-100); }
.view-toggle-btn.is-active { background: var(--color-action-primary); color: var(--kp-white); }
.view-toggle-btn .icon { width: 16px; height: 16px; }

/* In the filter bar the toggle takes the bar's one height (2026-09-28; the one-height rule beside the bar's
   field family in the shared sheet). The group's 1px border on each side plus the square button make the bar
   height, so the button is the bar height less those two pixels, on both axes so it stays square: 40.3px
   against the 38px it drew on its own, which left the group 2.3px short of the fields beside it. */
.filter-bar .view-toggle-btn {
  inline-size: calc(var(--filter-bar-control-h) - 2 * 1px);
  block-size: calc(var(--filter-bar-control-h) - 2 * 1px);
}

/* ---- Card view (mockup style.css:8816-8899, re-measured live 2026-07-19). The stats strip ships
   with the OFFICERS stat (real data); the daily-shipments cell alone stays omitted (no data, R2).
   Header tile = the mockup's own 42px building tile (.branch-card-icon), not the 38px table
   cell-icon — the mockup design-notes §16's unified icon covers TABLE first cells only. ---- */
.branches-cards-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.branches-cards-grid.is-active { display: grid; }

.branch-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.branch-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.branch-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--kp-slate-100);
}

/* mockup card tile, live-measured: 42×42, radius 6, #e6f0fe fill (= --color-stat-icon-blue-bg),
   navy 20px building glyph */
.branch-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--kp-radius-sm);
  background: var(--color-stat-icon-blue-bg);
  color: var(--color-action-primary);
  flex-shrink: 0;
}

.branch-card-icon .icon { width: 20px; height: 20px; }

.branch-card-title { flex: 1; min-width: 0; }

.branch-card-title .bc-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-card .bc-email {
  display: block;
  margin-top: 2px;
  direction: ltr;
  text-align: start;
  color: var(--kp-slate-550); /* mockup #5b677a, live-measured (was --color-text-muted #475569) */
  font-size: 12px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The same right-to-left half as the table rule above, kept word-for-word identical so the two siblings
   cannot drift apart. No view renders a `.branch-card` today, so this half is UNEXERCISED: it is here
   because the declaration it completes is here, and a card surface built later inherits the whole rule
   rather than half of it. */
html[dir="rtl"] .branch-card .bc-email { text-align: end; }

.branch-card .bc-email:hover { color: var(--color-action-primary); text-decoration: underline; text-underline-offset: 2px; }

.branch-card-body { flex: 1; padding: 14px 18px; }
.branch-card-meta { display: flex; flex-direction: column; gap: 7px; }

/* mockup stats strip (live-measured 2026-07-19): hairline-topped centered cells, 17px/800 value
   over an 11px muted caption; cells divide on the same hairline */
.branch-card-stats {
  display: flex;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--kp-slate-100);
}

.branch-card-stat {
  flex: 1;
  text-align: center;
}

.branch-card-stat + .branch-card-stat {
  border-inline-start: 1px solid var(--kp-slate-100);
}

.branch-card-stat .bc-val {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text);
}

.branch-card-stat .bc-lbl {
  display: block;
  font-size: 11px;
  color: var(--kp-slate-550);
}

.branch-card-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.branch-card-meta-row .icon { width: 14px; height: 14px; color: var(--color-text-muted); flex-shrink: 0; margin-top: 2px; }
.branch-card-meta-row span { color: var(--color-text-muted); line-height: 1.4; }

.branch-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-top: 1px solid var(--kp-slate-100);
}

.branch-card-footer .count-pill { cursor: default; }

.btn-bc-view {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--color-shell-soft-strong);
  color: var(--color-action-primary);
  border: none;
  border-radius: var(--kp-radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.btn-bc-view:hover { background: var(--color-action-primary); color: var(--kp-white); }
.btn-bc-view .icon { width: 14px; height: 14px; }

/* Map link + the card-footer kebab share ONE square icon chrome. The kebab is cloned from the row
   (branches.js), whose base .btn-action styling is scoped to .row-actions and so does NOT apply in
   the card footer — it rendered as a bare default button until given this chrome (owner-reported
   2026-07-23; the edit pencil beside it was already re-classed to .btn-bc-map, the kebab was missed).
   The mockup's teal hover has no token; reuse the navy action hover (R7 reuse-before-create). */
.btn-bc-map,
.branch-card-footer .btn-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--kp-radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-bc-map:hover,
.branch-card-footer .btn-action:hover { background: var(--color-shell-soft); color: var(--color-action-primary); border-color: var(--color-action-primary); }
.btn-bc-map .icon,
.branch-card-footer .btn-action .icon { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .branches-cards-grid { grid-template-columns: 1fr; }
}

/* ---- The drawer's BOXES PANE (Phase B2 Task 8; spec §2.6, closure ruling 5) ----------------------
   Replaces the page-level subscriptions screen (.subscriptions-section/.subscriptions-tabs/.sub-counters,
   removed with the grids they framed 2026-07-28). Two permission-gated sections stacked inside the
   drawer body: each shows ONE expanded card for the current box (the shared .vbx-card family, so a box
   reads the same here as in the Details pane) and a collapsed <details> disclosure for prior rows.
   Rule-13 carve-out surface (no mockup counterpart): house families only, zero new colours. ---- */
/* Section-to-section gap (owner ruling 2026-08-23: the gap must actually RENDER). The old adjacent-
   sibling selectors never matched in the drawer: each section arrives wrapped in its own .boxes-pane-host
   div, and between the two hosts sit the sections' hidden config siblings (#poBoxSubscriptionsConfig /
   #vbxSubscriptionsConfig), so neither `.boxes-pane-host + .boxes-pane-host` nor
   `.boxes-pane-section + .boxes-pane-section` ever fired there. The general-sibling combinator is what
   matches the second host across those interleaved siblings; the direct-sibling rules stay for any shape
   that serves the two partials without hosts and configs between them. */
.boxes-pane-host ~ .boxes-pane-host,
.boxes-pane-section + .boxes-pane-section { margin-block-start: 20px; }

/* The drawer body is not re-anchored by the browser while a box pane re-reads (2026-09-24); shrinking content can
   still clamp its offset, and the pane's landing then moves it on purpose. Each pane clears itself before its read
   and grows back when the answer lands; with the browser's scroll anchoring on, the drawer body re-anchored on the
   pane below and followed it down. Measured at 390 wide: a cancel on the P.O. Box pane moved the body from 378 to
   1001 px in English (376 to 995 in Arabic) and showed the bottom of the VBX pane instead of the card just acted
   on. overflow-anchor:none stops the browser re-anchoring the scroll position when a pane re-renders, as the plan
   sheet's scroller already does; the pane's own landing then brings the element it focuses into the body's view.
   Scoped to this drawer, where it was measured; the shared drawer rule serves every admin drawer and is left as it
   is. */
#subscriberViewModal .modal-body { overflow-anchor: none; }

/* Title-to-content breathing room (owner ruling 2026-08-23, from his own screenshot: the title read
   jammed against the bordered disclosure below it) — 14px on the family's 10/14/20 rhythm. */
/* The 14px BELOW the title is an owner ruling of 2026-08-23, from his own screenshot: the title read
   jammed against the bordered disclosure under it. The type step itself is the family rule below (D37);
   only the spacing is this pane's own, and a taller heading over the same 14px only reinforces the ruling
   it was given for. */
.boxes-pane-section__title {
  margin: 0 0 14px;
}

.boxes-pane-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--kp-slate-500);
}

/* The expanded current card sits directly in the pane, so it carries the card gap itself. */
.boxes-pane-card { margin-block-end: 12px; }

/* The card's detail list is the shared .modal-detail-list; only its density differs here (a drawer pane
   is narrower than the Details pane's full column). */
.boxes-pane-details { margin: 0; }
.boxes-pane-details .detail-label { min-inline-size: 130px; }

/* THE REFERENCE WRAPS INSIDE ITS CARD INSTEAD OF BEING CUT (2026-09-25). The Reference is the subscription's
   36-character id, and the tracking-code family keeps its values on one line so a date or an amount never breaks
   mid-value. Measured in a browser at 390 wide, in both languages, on every card shown: the id rendered 343 px wide
   in a 302 px card value, and the card, which clips whatever overflows it, cut 25.7 px off it -- the end in English,
   the START in Arabic, where the value's inline end is the left edge. A value shown so staff can read it out or
   match it has to be shown whole, so this one value may wrap: after a hyphen where the line-breaking rules allow a
   break there, otherwise at the card's edge; never an ellipsis. It stays in its `<bdi dir="ltr">`, so its
   characters keep their left-to-right order on either line. Where it fits -- at the desk width a card value has
   room to spare -- it stays on one line, which is why the rule carries no media query. */
.boxes-pane-details .boxes-pane-reference {
  white-space: normal;
  overflow-wrap: anywhere;
}

.boxes-pane-acts,
.boxes-pane-card .row-actions { margin-block-start: 10px; }

/* Native <details>: the disclosure needs no JS, so it can never get out of step with a script that did
   not load. Its affordance is DRAWN HERE rather than inherited from the browser (2026-07-30 hunt, finding
   C14): a UA paints its own ::marker triangle only for `display: list-item`, and the `display: flex` below
   — which is what lays the label, the count badge and the chevron out on one row — replaces it. The two
   display values are mutually exclusive, so keeping flex means supplying the affordance, otherwise the row
   is an expandable control with nothing saying it expands. That matters more here than it looks: since the
   standalone box grids retired (ledger 15 rows 106 and 118) this block is the only place the Restore /
   Delete / Retry actions on prior subscriptions exist. The replacement is a border-chevron whose shape was
   copied from the topbar profile button's own `::after` — that source rule is GONE since 2026-08-03 (the
   owner ruled the account chip carries no arrow, and the v3 package agrees), so this block is now the sole
   owner of the shape. Nothing follows the topbar here any more; change it on its own merits. */
/* The disclosure carries its own block-start margin so the box never hugs whatever precedes it — the
   section title, an empty line, or the current-subscription card (owner ruling 2026-08-23, same
   screenshot; 14px keeps the family's rhythm, and the collapse with the title's own 14px gap reads as
   one consistent breath). */
.boxes-pane-previous {
  margin-block-start: 14px;
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-md);
  background: var(--kp-white);
}

.boxes-pane-previous > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--kp-navy-700);
}

/* 7px square, PHYSICAL right+bottom borders: the chevron is a STATE indicator (closed = points down,
   open = points up), never directional navigation, so it must NOT mirror with the page direction
   (design-lane ruling; plan P5, docs/plans/2026-08-25-post-wave-followups-plan.md, 2026-08-25 — the
   earlier logical-border build pointed sideways in Arabic when open). With physical borders the same
   45deg/225deg rotations read identically in both dir contexts. Placement stays LOGICAL:
   margin-inline-start:auto keeps the glyph at the trailing edge whichever way the page runs.
   currentColor inherits the summary's own navy, so it needs no token of its own. (These values were
   byte-matched to the topbar's `.user-profile-btn::after` when that rule existed; see the note above
   for why it no longer does.) */
.boxes-pane-previous > summary::after {
  content: '';
  display: block;
  inline-size: 7px;
  block-size: 7px;
  margin-inline-start: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-smooth-out);
}

/* The 180deg flip is what makes the OPEN state readable at rest, not only under a hover. */
.boxes-pane-previous[open] > summary::after { transform: translateY(2px) rotate(225deg); }

/* Under the pointer the line takes the house tint of a hovered row (owner ruling 15 #1185, 2026-11-10): until
   then only the cursor changed. The line keeps the card's rounded corners inside the card's 1px border, and when
   the history is open its lower corners are square against the list below. */
.boxes-pane-previous > summary {
  border-radius: calc(var(--kp-radius-md) - 1px);
  transition: background-color .15s ease;
}

.boxes-pane-previous > summary:hover { background: var(--color-table-row-hover); }

.boxes-pane-previous[open] > summary {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

.boxes-pane-previous[open] > summary { border-block-end: 1px solid var(--kp-slate-200); }

/* A prior row stacks in three sections (owner ruling 2026-08-23: header / details / separated actions),
   replacing the old single flex line whose box number, badges and dash-chained meta jumbled together. */
.boxes-pane-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

/* Row-to-row boundary (owner ruling 2026-08-23, from his own screenshot: one row's actions and the next
   row's header blurred together). The hierarchy the pane must read is: STRONG line = a new subscription,
   faint lines = detail within one subscription — so the row boundary takes the family's stronger tone
   (the disclosure border's own slate-200) plus a small extra gap, while the internal hairlines below
   keep slate-100. */
.boxes-pane-row + .boxes-pane-row {
  margin-block-start: 4px;
  border-block-start: 1px solid var(--kp-slate-200);
}

/* The header line keeps the box number and its status badge (+ retired marker) on ONE aligned line. */
.boxes-pane-row__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* The detail list inside a prior row is the shared .modal-detail-list at the row's own 13px size for
   BOTH label and value (--text-ui would render values 14px against 13px labels); same pane-density
   override idea as .boxes-pane-details above. */
.boxes-pane-row .detail-value { font-size: 13px; }

/* Actions sit behind a hairline separator -- the SAME slate-100 hairline that separates modal-detail-list
   lines -- so they read as their own section, spaced from the details above. A RETIRED row emits this
   wrapper with NO buttons at all, and the separator painted unconditionally was a line separating nothing
   (measured live 2026-08-23: zero buttons, full hairline) — so an empty wrapper hides itself, the house
   pattern components.css already uses for .drawer-summary__acts. The markup stays unconditional; the CSS
   carries the state. */
.boxes-pane-row > .row-actions {
  padding-block-start: 10px;
  border-block-start: 1px solid var(--kp-slate-100);
}

.boxes-pane-row > .row-actions:not(:has(button)) { display: none; }

/* THE PANE'S ACTION STRIPS WRAP BELOW THE DESKTOP TIER (2026-09-25). The strip is the shared `.row-actions`
   family, `display: inline-flex` with no wrap, which a grid cell needs. In a drawer pane it is a line of labelled
   buttons in a row one card wide, and measured in a browser at 390 wide the history row's three actions (Restore
   subscription, Unlink box, Delete: 178 + 114 + 88 px in English, 154 + 161 + 79 px in Arabic, with the family's
   4 px gaps) needed 388 / 401 px of a 304 px row; the drawer body hides sideways overflow, so Delete read "De" in
   English and was a 24 px sliver with no label in Arabic. Wrapping keeps every action whole and inside the drawer:
   at 390 English holds Restore and Unlink on the first line (178 + 4 + 114 = 296 px) and Delete on the second;
   Arabic holds Restore on the first and Unlink and Delete on the second (161 + 4 + 79 = 244 px); at 360 the row is
   274 px and the widest single action, 178 px, still has a line of its own. The current card's strip takes the same
   rule, so a card offering two long actions wraps the same way. Bound: below 992 px, the desktop tier the grid
   family's own phone rules use; from 992 px up the subscriber drawer is at least 680 px wide, which leaves a row of
   680 - 56 - 2 - 28 = 594 px, and the strips measured fit one line there. The grid family's phone menu is a
   frozen-band table mechanism and is not used on a pane row. */
@media (max-width: 991.98px) {
  .boxes-pane-row > .row-actions,
  .boxes-pane-card .row-actions { flex-wrap: wrap; }
}

.boxes-pane-linking {
  margin-block-start: 20px;
  padding: 14px;
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-md);
  background: var(--kp-slate-50);
}

/* ---- The drawer's REASONS-HISTORY pane (owner ruling 2026-08-23) ---------------------------------
   The third tab: a read-only lifecycle list, one entry per recorded action, newest first. Rule-13
   carve-out surface (no mockup counterpart): house families only — the entry's labeled lines reuse
   .modal-detail-list and every value here comes from tokens. ---- */
.reasons-history {
  display: grid;
  gap: 14px;
}

/* Spacing only; the type step is the family rule (D37). The 4px to the meta line below it is the same
   heading-to-content gap the Details pane's own section titles take from .form-label, so a bigger heading
   needed no re-derivation here either. */
.reasons-history__action {
  margin: 0;
}

/* Date + actor on one quiet line under the action name; the date keeps its LTR bdi from the partial. */
.reasons-history__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 4px;
  font-size: 12px;
  color: var(--kp-slate-500);
}

.reasons-history__entry .modal-detail-list { margin-block-start: 6px; }

.reasons-history__empty {
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--kp-slate-500);
}

/* A change request beside the live company (the company requests drawer, ledger 15 #272). The value comparison is a
   three-column table -- the value's name, what the request proposes, what the company holds now -- on the drawer's
   detail-list rhythm (12px rows, the muted 13px/600 label type, the slate hairline). A changed or a cleared row takes
   the pending badge family's background, its marker (bordered, so it stays legible on that tint) beside the value's
   name. A pair of files sits under its type and change: the proposed file above the current one, each a history
   entry captioned with its side. */
.drawer-compare {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--text-ui);
}

.drawer-compare th,
.drawer-compare td {
  padding-block: 12px;
  padding-inline: 8px;
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--kp-slate-100);
  word-break: break-word;
}

.drawer-compare th {
  color: var(--kp-slate-550);
  font-size: 13px;
  font-weight: 600;
}

.drawer-compare td {
  color: var(--color-text);
  font-weight: 500;
}

.drawer-compare tr.is-changed { background: var(--badge-warning-bg); }

.drawer-compare__absent { color: var(--kp-slate-500); }

.drawer-compare th .badge,
.drawer-compare-files > .reasons-history__action .badge { margin-inline-start: 6px; }

/* ONE COLUMN GEOMETRY FOR THE COMPARISONS OF ONE DRAWER (2026-10-12). The comparison partial opens each table on one
   column group -- the field's column, then one column per side -- and these rules give those columns their shares of
   the table, so the contact and address tables, and the tables of the people, start Proposed and Current at the same
   place. Measured before: the automatic layout sized each table's columns from its own text, and at 1440 px the
   Proposed column began 108 px apart in two tables of one tab.
   The layout stays automatic: the column budget census counts this stylesheet's fixed-layout declarations as its
   fixed-layout grids, and this table is not one of them. Under the automatic layout a share holds while its column's
   narrowest content fits inside the share. The cells break long values anywhere, and the marker may wrap between its
   words (the rule below), so the field column's narrowest content is a marker's longest word inside the badge's own
   padding, and a side column's is a single character. Computed from the shipped fonts' advance widths, not measured
   in a browser: the widest such word, the English "Changed", needs about 112 px with the cell's padding. The drawer's
   phone tier, where the drawer takes the whole viewport, gives the field column 40%, about 122 px at the 360 px
   minimum width; above it the field's 30% is at least 156 px, which also holds the longest whole marker computed,
   the Arabic "value cleared" at about 153 px, on one line. */
.drawer-compare__col-field { inline-size: 30%; }
.drawer-compare__col-side { inline-size: 35%; }

@media (max-width: 575.98px) {
  .drawer-compare__col-field { inline-size: 40%; }
  .drawer-compare__col-side { inline-size: 30%; }
}

.drawer-compare th .badge { white-space: normal; }

.drawer-compare-files {
  display: grid;
  gap: 8px;
}

/* Plans two-grid layout (owner findings batch 1 item 4): stacked per-box-type table cards; each
   header trails its own export + column chooser. */
.plans-grid-wrapper { margin-block-end: 24px; }
.plans-grid-tools { display: flex; align-items: center; gap: 10px; }

/* Plan-name cell (design sweep 2026-08-30, N-P1-1 — SUPERSEDES the fixed 220px clamp this cell shipped
   with since Phase A review I2/M1). What the clamp cost, measured on the live page at the WIDEST desktop
   band: 6 of the 9 Arabic rows and 8 of the 9 English rows were cut mid-phrase, by up to 36px (ar) and
   63px (en) — and the cut end is the distinguishing half, because the seeded titles differ only in their
   tail («… — فرد — سنة واحدة» against «… — فرد — سنتان»). Meanwhile 355.84px (ar) / 405.61px (en) of slack
   sat unused in the six money and status columns beside it, the net-price column alone holding 96.75 /
   137.36px for a value that inks 51 / 58px. A fixed cap sized for a narrow band applied to every band is
   exactly what the elastic-bounds rule forbids -- a measured cap belongs inside the middle-band media
   block alone -- and a NAME wraps rather than ellipsising; where a value IS ellipsised, its band is
   re-measured on the CURRENT data rather than inherited from an earlier capture, and the clipping block is
   itself `direction: ltr` with `text-align: end` under RTL, so the value stays at the cell's start edge.

   WHAT REPLACES IT, and why each half. The cap is gone, so at the wide bands the auto table layout gives
   the lane its natural width out of that slack. Below them the name WRAPS at word boundaries — never
   inside a word, never an ellipsis (owner ruling D28) — and the floor is what stops the layout squeezing
   the lane toward its longest single word and turning one name into a five-line stack.

   WHY 250px after PK-P15, from the family geometry rather than taste. PK-P12 reserved 200px for the
   wrapping name. Core Rule 13 moves the fixed 38px tile beside that name, and .admin-identity contributes
   the family 12px gap: 200 + 38 + 12 = 250px, excluding the cell padding that is unchanged. The same
   38px + 12px leaves the adjacent locked Duration cell, so the two locked cells' combined minimum does
   not grow. The line count and zero-overflow result are asserted where they can be measured rather than
   predicted here: the persona spec's fit arm counts lines and horizontal overflow at all three desktop
   bands in both locales. */
.plan-title-cell {
  min-inline-size: 250px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---- Subscribers management page (owner findings batch 1 item 5, mockup users.html) ---------------
   The rich المشترك cell composes the shared .admin-identity avatar/name stack with a nationality chip,
   a civil-id pill, and email/phone meta lines (.contact-cell). App-specific
   composition, so it lives here (not the DesignSystem); tokens only, logical properties only. */

/* Standalone page search box (locked decision 3b; geometry lifted from the owner-approved demo v2). It is
   NARROWER than the content column and centred — logical properties only, so it centres identically in
   Arabic and English — and goes full width once the column is under 640px. The clear × follows the shipped
   .table-search-inline pattern: hidden until the wrapper carries .has-value, so an empty box shows no
   dead control. The UA's own search-cancel button is suppressed so there are never two × glyphs. */
.page-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    block-size: 56px;
    padding-inline: var(--kp-space-md);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    box-shadow: var(--shadow-card);
    margin-block-end: var(--kp-space-md);
    max-inline-size: 640px;
    margin-inline: auto;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.page-search:focus-within {
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Inside a filter bar the page search is one of the bar's controls (2026-09-28; the one-height rule beside the
   bar's field family in the shared sheet): it takes the bar's height instead of its own 56px, and leaves its
   trailing margin to the bar, whose centred row would otherwise lift it 8px above the control beside it. The
   standalone box on every other page keeps its own geometry. */
.filter-bar .page-search {
  block-size: var(--filter-bar-control-h);
  margin-block-end: 0;
}

.page-search > .icon {
    inline-size: 20px;
    block-size: 20px;
    color: var(--color-action-primary);
    flex-shrink: 0;
}

.page-search input {
    flex: 1 1 auto;
    min-inline-size: 0;
    border: 0;
    outline: none;
    background: transparent;
    block-size: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--color-text);
}

.page-search input::placeholder { color: var(--color-text-muted); }

/* A SEARCH PLACEHOLDER TOO WIDE FOR ITS BOX ENDS IN AN ELLIPSIS, never in a hard cut -- the two families
   this app owns, declared beside their geometry. Measured on a running host 2026-09-03 at 360px: this page
   search loses 123.56px of Arabic and 83.86px of English on the payments grid, and the launchpad's own box
   loses 132.54px of English; the Arabic cut landed mid-word. A placeholder has no tooltip to recover the
   rest from. DECLARED ON THE INPUT, NOT ON `::placeholder`: the placeholder pseudo accepts only a fixed set
   of properties and drops this one (measured: its computed value stays `clip`), while a declaration on the
   input computes through to the pseudo, which inherits it. The design system's own two families carry the
   same rule beside their own geometry.
   AND IT GOVERNS THE FIELD'S OWN TEXT AS WELL AS THE PLACEHOLDER, which is intended: `text-overflow` on a
   text input applies to the inner editor, so a typed or preference-restored search term too long for the box
   also ends in an ellipsis while the field is unfocused, instead of the hard cut the browser drew before.
   Four of these fields restore a saved term, so a long value is a reachable state; nothing is hidden by it,
   because focusing scrolls the whole value back into reach and the control that empties the box sits beside
   it. Dated 2026-10-31: the launcher's search family left with the launcher (owner ruling 15 #904(a)), so
   the page search is the one family left here. */
.page-search input {
    text-overflow: ellipsis;
}

.page-search input::-webkit-search-cancel-button { display: none; }

/* The same minimum box the rest of the family declares (2026-09-02): this variant already painted 26x26
   through its own 6px padding, so the minimum changes no pixel here -- it is written so the family shares
   one floor and a later padding change cannot drop this control back under it. */
.page-search .search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    min-inline-size: 24px;
    min-block-size: 24px;
    background: transparent;
    border: none;
    padding: 6px;
    line-height: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--kp-radius-xs);
    flex-shrink: 0;
}

.page-search.has-value .search-clear { display: inline-flex; }
/* 15 #198c, 2026-09-20: the pressed control shows its loading state until the answer lands. */
.page-search .search-clear.is-loading { display: inline-flex; }

.page-search .search-clear:hover {
    color: var(--color-text);
    background: var(--color-shell-soft);
}

.page-search .search-clear .icon { inline-size: 14px; block-size: 14px; }

/* Tab-strip row (box type + audience). The margin is the owner's mid-build amendment: the strips must NOT
   sit flush on the counter cards — a visible gap in both languages, at every width. */
.tabs-row {
    display: flex;
    align-items: center;
    gap: var(--kp-space-md);
    flex-wrap: wrap;
    margin-block-end: var(--kp-space-lg);
}

/* A hint inside the tab row explains the STRIPS, so it must read under them and never beside them. The row
   wraps, so a full basis is what puts it on a line of its own at every width; the ink, the size and the
   block margins are the shared .section-hint family's and are not restated here. Owner ruling 15 #241
   (2026-09-13) put the first such line on Subscribers; the rule is written for the family so the next one
   inherits it. */
.tabs-row .section-hint {
    flex-basis: 100%;
}

/* AN EMPTY SCOPE LINE IS LIFTED OUT OF THE ROW, NOT REMOVED FROM THE PAGE (2026-09-14). The line is a live
   region, and a live region only works while it is IN the accessibility tree -- a display:none element is
   not, so a line shown by dropping a hidden class was created and filled in the same instant. It is now
   always rendered and says nothing by being EMPTY, which is a state the stylesheet can see. Out of flow
   rather than zero-height, because the row is a wrapping flex box and a full-basis item keeps a line of its
   own even at no height: left in place it would add that line's row gap and this family's block margins
   under the strips at all times. The declarations are the shared visually-hidden primitive's, applied by
   STATE rather than by a class the script would have to remember to toggle -- the text is the single source
   of truth for what the line says and whether it takes up room. */
.tabs-row .section-hint:empty {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The count badge rides INSIDE the shared .range-btn pill, so a pill that carries one needs a flex box.
   ANCESTOR SCOPE RETIRED 2026-09-03. Both rules used to be written under `.tabs-row`, to keep a shared
   family from moving under buttons that carry no badge -- but the SELECTOR that expresses that intent is
   the badge itself, not the page section the badge first appeared in. Scoped to a section, the rules
   served exactly one strip: the booking dialogs paint the same chips (a day with its free-slot count, a
   slot with its remaining count) into a plain `.range-control`, which is in no `.tabs-row`, so the badge
   arrived with no rule at all and welded itself to the date it follows -- "2026-09-0612", "2026-09-04Closed".
   That is the same shape as a value class whose only rule sits under one page's container id, and it is
   caught by the same gate.
   THE LAYOUT HALF REACHES BOTH SHAPES (corrected 2026-09-04). Narrowing it to `:has(.tab-count)` alone
   dropped the tab rows' OWN count-less pills: the settings tabs are a glyph plus a word and carry no
   badge, so they silently lost the flex box, the centring and the 8px gap the strip was built on. The
   badge rules below stay on the badge; the box the pill is laid out in is declared for the tab rows AND
   for any badge-carrying pill wherever it is painted. The dashboard range control and the plans toolbar
   are in neither set, so they stay untouched exactly as the old scoping intended. */
.tabs-row .range-btn,
.range-btn:has(.tab-count) {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-sm);
}

.range-btn .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 22px;
    padding: 1px 7px;
    border-radius: var(--kp-radius-full);
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* On the selected pill the badge sits on the solid navy fill, so it inverts to a translucent white chip
   (the demo's measured treatment) rather than staying a canvas-coloured hole in the navy. A white alpha,
   not a hex — it must tint whatever fill --color-action-primary resolves to, so a token colour would
   defeat it (same reason the topbar overlay at :2909 uses one). */
.range-btn.is-active .tab-count {
    background: rgba(255, 255, 255, .2);
    color: var(--kp-white);
}

/* A TAB BADGE SHIMMERS WITH THE READ THAT RESTATES IT (ruling 15 #198b, 2026-09-23). The Appointments status
   tabs carry a badge the grid answer repaints, so while that answer is on its way the badge takes the shared
   `.skeleton` shimmer and the `.count-value--loading` transparent ink, as every other count does. Both of
   those are one class, and the two badge rules above paint the badge's own fill and ink at two and three
   classes -- so without this rule the badge stayed a solid pill stating its old number over a reloading grid.
   Four classes, so it also wins on the selected pill. The fill is the shared shimmer's own gradient and size,
   re-declared here because the badge's `background` shorthand resets both; the badge's own corner and box are
   untouched, so it keeps exactly the width it had. */
.range-btn .tab-count.skeleton.count-value--loading {
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-canvas) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    color: transparent;
}

/* Refresh icon-button beside the last-updated stamp: borrows .btn-filter's hover language and the
   row-action button geometry, so it introduces no new colour. */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 36px;
    block-size: 36px;
    flex-shrink: 0;
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-refresh:hover {
    background: var(--color-bg-canvas);
    border-color: var(--color-action-primary);
    color: var(--color-action-primary);
}

.btn-refresh:active { transform: scale(.95); }

.btn-refresh .icon { inline-size: 16px; block-size: 16px; }

/* Mockup .user-nationality-chip (style.css:9253 — owner grid-parity order 2026-07-23): the flag +
   label pill beside the name; text-only when the code has no flag glyph. */
.subscriber-nat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--kp-navy-600-a06);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.subscriber-nat-chip .nat-flag { font-size: 12px; line-height: 1; }

/* Mockup box-number link (users.html text-primary-custom fw-bold): bold navy, and unlike the
   mockup's dead href="#" it opens the subscriber's View drawer (a real target). */
.subscriber-box-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-action-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.subscriber-box-link:hover { text-decoration: underline; }

/* One box number per LINE inside the الصناديق cell (Phase B2 Task 6): the physical number and the VBX
   number are never merged into one value, so each rides its own flex line with its type icon. flex (not
   inline-flex) is what makes two of them stack instead of running together on one line. */
.box-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Explicit size: a lucide <svg class="icon"> with no sizing falls back to the UA's 300x150 default. */
.box-line .icon {
    inline-size: 13px;
    block-size: 13px;
    flex-shrink: 0;
}

/* The whole subscribers row opens the View drawer (owner round-2 amendment, Phase B2 Task 6) — the pointer
   is the only thing that says so, and inline styles are banned, so it lives here. Class-scoped on purpose:
   rows on grids that are NOT clickable must keep the default cursor. */
.table-custom tbody tr.row-clickable { cursor: pointer; }

.subscriber-name-row {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
}

.subscriber-meta { margin-block-start: 2px; }

/* Mockup .user-civil-id pill (style.css:9270): dashed navy outline carrying the full civil ID as plain text
   (ruling 15 #809(i), 2026-10-27: the display mask and its eye toggle are retired; the pill has no button). */
.civil-id-pill {
    display: inline-flex;
    /* Subscribers sweep round 2 N-R2-3 (2026-08-28): inside a column-flex identity stack this pill
       otherwise stretches to the longest sibling. Logical start restores the inline-flex intent and
       is inert when the parent is a plain table cell. */
    align-self: start;
    align-items: center;
    gap: 6px;
    margin-block-start: 2px;
    padding: 3px 9px;
    background: transparent;
    border: 1px dashed var(--kp-navy-600-a22);
    border-radius: 6px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.civil-id-pill .icon { width: 12px; height: 12px; flex-shrink: 0; }
.civil-id-pill__text { letter-spacing: .02em; }

/* View-drawer VBX / delegation detail lists (built by subscribers.js — textContent only, XSS-safe).
   The old plain-row classes (subscriber-detail-row/-meta) died with the 2026-07-23 vbx-card/poa-card
   parity rework below. */
.subscriber-detail-list { display: flex; flex-direction: column; gap: var(--kp-space-sm); }

.subscriber-detail-empty { font-size: .85rem; color: var(--color-text-muted); }

/* Subscriber view-drawer quick actions — ported EXACTLY from the mockup .user-quick-actions family
   (style.css:9614-9672): a top dashed separator + an uppercase qa-label + GHOST/outline pill buttons
   (white fill, colored text + 1px colored border), NOT the solid btn-danger/btn-primary fills we shipped.
   Style-only; the buttons keep their ids + data-actions (15 #96 F10). */
.subscriber-quick-actions {
  display: flex;
  gap: var(--kp-space-sm);
  flex-wrap: wrap;
  margin-block-start: var(--kp-space-18);              /* mockup margin-top 18px */
  padding-block-start: var(--kp-space-md);             /* mockup padding-top 16px */
  border-block-start: 1px dashed var(--color-border);  /* mockup border-top dashed */
}
.subscriber-quick-actions .qa-label {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-block-end: var(--kp-space-xs);
}
.subscriber-quick-actions .qa-btn {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: var(--kp-radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--kp-space-sm);
  transition: all .15s ease;
}
.subscriber-quick-actions .qa-btn .icon { width: 15px; height: 15px; }
/* Block = the mockup .qa-block red ghost; Unblock (positive) = the mockup .qa-reset navy ghost.
   Red alphas are literal-with-cite (no red-alpha token exists); navy alphas reuse existing tokens. */
.subscriber-quick-actions .qa-btn.qa-block { color: var(--status-alert-fg); border-color: rgba(200, 16, 46, .25); }
.subscriber-quick-actions .qa-btn.qa-block:hover {
  background: rgba(200, 16, 46, .06);
  border-color: var(--status-alert-fg);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 16, 46, .10);
}
.subscriber-quick-actions .qa-btn.qa-unblock { color: var(--color-action-primary); border-color: var(--kp-navy-600-a22); }
.subscriber-quick-actions .qa-btn.qa-unblock:hover {
  background: var(--kp-navy-600-a06);
  border-color: var(--color-action-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 51, 160, .10);
}

/* ---- Subscriber view-drawer VBX ticket card / POA card / section title -------------------------
   Ported byte-faithfully from the admin mockup (docs/reference/postOffice_Admin_html/css/style.css:
   9441-9612; owner view-drawer parity order 2026-07-23). BOTH cards are now rendered SERVER-SIDE and the
   two client builders that painted them are gone: the VBX ticket moved to the box panes on 2026-08-30
   (owner ruling D34-b, when the Details pane's duplicate copy of it retired), and the POA card family is
   the shape the delegation enquiry reuses since 2026-09-11 (ledger 15 #194(i)) -- its card carries a door
   wrapped in another page's permission, which only the server can decide. Hex -> DesignSystem tokens; rgba() alpha
   washes stay literal (the site.css/components.css rgb()-literal allowance, see .branch-create-links)
   with the mockup line each is copied from; logical properties only. */
.vbx-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--kp-white);
    border: 1px solid var(--kp-slate-200);
    /* mockup style.css:9447 -- layered lift; the navy-tinted ambient shadow a fixed token can't express. */
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 51, 160, .07);
    isolation: isolate;
    animation: vbxCardFade .4s ease-out both;
}

/* faint postmark ring watermark in the top corner (mockup style.css:9452) */
.vbx-card::after {
    content: '';
    position: absolute;
    top: -30px;
    inset-inline-end: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    /* mockup style.css:9460 -- navy dashed ring at 10% alpha. */
    border: 2px dashed rgba(0, 51, 160, .10);
    z-index: 0;
    pointer-events: none;
}

/* gold-foil accent stripe on the inline-start edge (mockup style.css:9465) */
.vbx-card__edge {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--kp-gold-500), var(--kp-gold-300));
    z-index: 3;
}
.vbx-card--suspended .vbx-card__edge { background: linear-gradient(180deg, var(--kp-amber-500), var(--kp-amber-400)); }
.vbx-card--expired   .vbx-card__edge { background: linear-gradient(180deg, var(--kp-red-600), var(--kp-red-400)); }

.vbx-card__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    background: linear-gradient(135deg, var(--kp-navy-700) 0%, var(--kp-navy-600) 55%, var(--kp-navy-500) 100%);
}
.vbx-card__icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    /* Mockup base rule says 10px (style.css:9489) but the app-wide !important icon-unification sweep
       (style.css:8385 lists .vbx-card__icon in its :where()) forces --icon-radius (6px) -- our token
       equals that effective render, matching .branch-card-icon (house pattern, see components.css:1473). */
    border-radius: var(--icon-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kp-gold-500), var(--kp-gold-300));
    color: var(--kp-white);
    /* mockup style.css:9495 -- gold glow at 35% alpha. */
    box-shadow: 0 4px 12px rgba(203, 160, 82, .35);
}
/* RENDERED-mockup glyph size (measured live 2026-07-23): lucide replaces <i data-lucide> with an
   <svg class="lucide">, so the mockup's 19px i[data-lucide] rule is dead and its global .lucide
   20px (style.css:331) wins. Direct-child selectors survive the replacement on our side too. */
.vbx-card__icon > i,
.vbx-card__icon > svg { width: 20px; height: 20px; }
.vbx-card__id {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}
.vbx-card__id-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    /* mockup style.css:9509 -- gold-300 label ink at 95% alpha over the navy head. */
    color: rgba(223, 192, 128, .95);
}
.vbx-card__id-code {
    font-size: 15px;
    font-weight: 700;
    color: var(--kp-white);
    letter-spacing: .06em;
}
.vbx-status {
    margin-inline-start: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--kp-white);
    /* mockup style.css:9528-9529 -- frosted white chip over the navy head. */
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
}
.vbx-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kp-emerald-500);
}
.vbx-status--active .vbx-status__dot { animation: vbxPulse 2s ease-out infinite; }
.vbx-status--suspended .vbx-status__dot { background: var(--kp-amber-400); }
.vbx-status--expired   .vbx-status__dot { background: var(--kp-red-400); }
@keyframes vbxPulse {
    /* mockup style.css:9540 -- emerald pulse ring fading 55% -> 0 alpha. */
    0%   { box-shadow: 0 0 0 0 rgba(0, 154, 68, .55); }
    70%  { box-shadow: 0 0 0 6px rgba(0, 154, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 154, 68, 0); }
}

/* perforation line separating the head "label" from the stub (mockup style.css:9547) */
.vbx-card__perf {
    position: relative;
    z-index: 2;
    height: 0;
    margin: 0 7px;
    /* mockup style.css:9552 -- navy dashed tear line at 15% alpha. */
    border-top: 2px dashed rgba(0, 51, 160, .15);
}
.vbx-card__perf::before,
.vbx-card__perf::after {
    content: '';
    position: absolute;
    top: -7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--kp-slate-50);
    border: 1px solid var(--kp-slate-200);
}
.vbx-card__perf::before { inset-inline-start: -8px; }
.vbx-card__perf::after  { inset-inline-end: -8px; }

.vbx-card__body {
    position: relative;
    z-index: 1;
    padding: 12px 15px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.vbx-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.vbx-meta__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--kp-slate-600);
}
/* Same replacement trap as the head icon: the mockup's 14px/navy i[data-lucide] rule never matches
   the replaced <svg> — its RENDERED meta icons are 20px inheriting the label's slate-600 (measured
   live 2026-07-23). Match the render, not the dead source rule. */
.vbx-meta__label > i,
.vbx-meta__label > svg { width: 20px; height: 20px; }
.vbx-meta__value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--kp-slate-900);
}
.vbx-days {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .01em;
}
/* mockup style.css:9610-9612 -- status washes at 12-15% alpha over paper. */
.vbx-days--ok      { background: rgba(0, 154, 68, .12); color: var(--kp-emerald-600); }
.vbx-days--soon    { background: rgba(245, 158, 11, .15); color: var(--kp-amber-700); }
.vbx-days--expired { background: rgba(200, 16, 46, .12);  color: var(--kp-red-600); }

/* Card entrance fades in only -- the mockup's own @keyframes fadeIn (style.css:3506) is opacity,
   NO transform; kept byte-faithful (Core Rule 13 mockup supremacy) rather than a translateY rise. */
@keyframes vbxCardFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* POA (delegation) card -- mockup users.html:1004-1007 (p-2 border rounded bg-light: bold name +
   small secondary civil line). The delegate id is shown in full (ruling 15 #809(i)/(j), 2026-10-27; until then
   masked, the recorded third-party posture of 15 #194(l)). */
.poa-card {
    padding: 8px;
    border: 1px solid var(--kp-slate-200);
    /* 6px + 14px mid-gray civil line = the mockup's RENDERED Bootstrap values (measured live
       2026-07-23: radius 6px, small 14px #6c757d; nearest tokens). */
    border-radius: var(--kp-radius-sm);
    background: var(--kp-slate-50);
}
.poa-card__name { font-weight: 700; color: var(--kp-slate-900); }
.poa-card__civil { font-size: 14px; color: var(--kp-slate-500); }

/* ---- The delegation enquiry (owner ruling 15 #194(i), spec section 5.7) --------------------------
   The card SHAPE is the mockup's own poa-card above, unchanged: bordered, rounded, quiet fill, bold name,
   small secondary id line (Core Rule 13). Everything here is what the enquiry ADDS inside that shape --
   the state badges, the scope sentence, the labelled lines, the read actions and the pane they open.

   No new colour and no new radius: every value is either a token or a step the subscriber-drawer family
   already uses (the 8px/12px rhythm of .reasons-history, the 14px quiet type of .poa-card__civil). */
.delegation-list {
  display: grid;
  gap: 10px;
}

.delegation-card {
  display: grid;
  gap: 8px;
}

/* Kind, state and -- when it applies -- the spent indicator, on one wrapping line. */
.delegation-card__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* The collection-only sentence a company row carries. Quiet like the id line above it: it is a
   qualification of the badge beside it, not a heading of its own. */
.delegation-card__scope {
  margin: 0;
  font-size: 13px;
  color: var(--kp-slate-500);
}

.delegation-card__meta { margin: 0; }

/* The cards' one Columns chooser (Delegation page, 2026-10-16), at the inline end of its own line above the
   first card -- where every grid's header band puts the same control. */
.delegation-list__head {
  display: flex;
  justify-content: flex-end;
}

/* The card's audit strip: the shared grid table in a compact step, inside its own scroller, so a narrow screen
   scrolls the strip and never the page (owner ruling 2026-09-01). The hairline and radius are the card's own. */
.delegation-card__audit {
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-sm);
}

.delegation-audit-table thead th,
.delegation-audit-table td {
  padding-block: 6px;
  padding-inline: 10px;
  font-size: 13px;
}

.delegation-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Where View Details and View History put what they fetched, opened in place under the card. The rule
   above it is the same hairline the drawer's own .modal-divider draws. */
.delegation-card__pane {
  padding-block-start: 8px;
  border-block-start: 1px solid var(--kp-slate-200);
}

.delegation-history {
  display: grid;
  gap: 10px;
}

.delegation-history__action {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--kp-slate-900);
}

.delegation-history__meta {
  margin-block-start: 2px;
  font-size: 12px;
  color: var(--kp-slate-500);
}

.delegation-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--kp-slate-500);
}

/* ---- ONE section-heading step for the subscriber modal family (owner ruling 2026-08-30, D37) -------
   Drawer section title = mockup users.html:663/667 (fw-bold + var(--primary)). OUR brand-primary semantic
   token is --color-action-primary (there is no --color-primary), == --kp-navy-600 == the mockup's --primary
   #0033A0; 16px is that h6.modal-subtitle's rendered size (measured 2026-07-23) -- the shared .form-label
   0.8rem would paint it visibly smaller than the mockup.

   The two OTHER panes of the same drawer had each invented their own step (the boxes pane 14px, the reasons
   entry 13px, both in a second navy), so a reader met three headings where the design has one. Only this one
   was pinned by anything, so it is the one that survives and all three now share this rule. Each pane keeps
   its own MARGIN above -- that is where they legitimately differ, and one of those margins is an owner
   ruling of its own.

   A grouped selector rather than a new class on purpose: two of the three headings are rendered by the box
   panes' partials, which belong to another slice's views, so a class would have meant editing files this
   change has no business in. One rule, three selectors, no markup moved. */
.settings-section-title,
.subscriber-section-title,
.boxes-pane-section__title,
.reasons-history__action {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-action-primary);
}

/* ---- System Settings page (the wave plan, package P5) ------------------------------------------------
   The mockup's app-settings shell (postOfficeAdmin-2/settings.html:288-370) expressed in official tokens:
   one card per tab, a small sub-head per section, and a save row at the foot of the card. Colors come from
   the brand palette, never from the package's own (pre-rebrand) values — the v3 intake palette clause. */

/* A hidden pane is not rendered at all; the shared .hidden utility does the hiding, so no page-scoped
   display rule competes with it. */
.settings-pane + .settings-pane { margin-block-start: var(--kp-space-md); }

/* The tab strip's leading glyph (design sweep 2026-08-30). The mockup renders every settings tab as an
   icon plus its word and this page rendered the word alone -- Core Rule 13 makes a component's SHAPE
   faithful, and the glyph is part of it.
   WHERE THE 15px COMES FROM, since it is easy to mistake for a guess: the mockup's settings page declares
   no rule for .tab-ic anywhere in the five stylesheets it loads, so its own icons fall back to the generic
   .lucide rule those stylesheets DO declare -- 20px, measured 2026-08-30, not the icon library's 24px
   default -- and they never render at all there, because their own group computes display:none. Either
   way the reference page states no intention for this glyph. The one place its package DOES size this
   exact selector is its subscriptions page
   (.range-control .range-btn .tab-ic, 15px), which is the same component in the same strip, so that is
   the recorded value taken under the "where mockup pages contradict each other, the most specific usage
   wins and the choice is recorded" clause. The gap between glyph and word is the shipped tab-row family
   gap (`.tabs-row .range-btn`, restored 2026-09-04 after a narrowing left these count-less tabs with no
   layout rule at all), not a second declaration for one page. Scoped to this strip's id so the
   dashboard range control and the plans toolbar, which share .range-btn, are untouched. */
#settingsTabs .range-btn .tab-ic {
    inline-size: 15px;
    block-size: 15px;
}

/* Section sub-head — mockup .settings-subhead (style.css:6448-6480): 30px icon block at --icon-radius on
   the navy soft tint, 14px/700 title, 10px gap, 14px space below. */
.settings-subhead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 var(--kp-space-14);
}

/* A sub-head that follows content sits 24px below it, while a card's first sub-head keeps the card's own
   padding: the mockup gives every sub-head after content that space, as `mt-4` on the sub-head
   (style.css:6454, the "Active Sessions" heading) or `mb-4` on the block before it (the channel grid). This
   rule named only a preceding `.settings-grid` until 2026-09-24, when a sub-head after a form's Save row (the
   Terms tab's "Document sections", the Notifications tab's "Email templates") measured 0px at 1440, 880 and
   390 in both languages. */
.settings-subhead:not(:first-child) { margin-block-start: var(--kp-space-lg); }

.settings-subhead-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--icon-radius);
    background: var(--kp-navy-100);
    color: var(--color-action-primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.settings-subhead-icon .icon { width: 16px; height: 16px; }

.settings-subhead-text h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--kp-slate-900);
    letter-spacing: -0.01em;
}

/* Two columns on desktop, one below the md breakpoint — the mockup's row g-3 / col-md-6 on a full-width
   (non-modal) card, pinned the same way the Profile card pins it rather than using the shared .form-grid
   auto-fit, which would fit three or four columns at this width. */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--kp-space-md);
}

@media (max-width: 767.98px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* A code-ish or bilingual editor needs the full width; a plain field does not. */
.settings-grid .setting-row:has(.setting-code),
.settings-grid .setting-row:has(.setting-localized),
.settings-grid .setting-row:has(.setting-code-block) { grid-column: 1 / -1; }

/* A staff copy's switch and its audience (15 #315(l)): one line of the section's own two columns, so an audience
   can never fall beside the next event's switch. Below the two-column band the same subgrid is one column, and
   the pair stacks closer to itself than to the next copy, with a rule between copies. */
.setting-pair {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    row-gap: var(--kp-space-sm);
}

@media (max-width: 767.98px) {
    .setting-pair + .setting-pair {
        padding-block-start: var(--kp-space-md);
        border-block-start: 1px solid var(--color-border);
    }
}

.setting-row-head {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    margin-block-end: var(--kp-space-xs);
}

.setting-row-head .form-label { font-size: var(--text-small); margin: 0; }

.setting-row-desc { margin-block: 0 var(--kp-space-xs); }

/* THE SWITCH ROWS' TYPE (owner ruling 15 #377(a), applied in the App Settings page round, 2026-10-20). The
   ruling takes the SMALLER of the shipped and the mockup value for each measured size of the switch rows,
   measured against the mockup's own notification toggle rows: the help text 12.8 -> 12.5px, the label's line
   height 21.45 -> 18.2px (13px at 1.4) and the help text's 21.12 -> 17.5px (12.5px at 1.4). The 13px label,
   the 28 x 14 switch and every other size stay as shipped. Only the ON/OFF rows: the ruling measured those,
   so a number, text, date or bilingual row -- which shares this partial -- keeps the shared label and hint
   type. The row's data-type is the stored value type, so the read-only rendering of a switch row (an
   Access-only viewer's) takes the same type as the editable one. */
.setting-row[data-type="Boolean"] .setting-row-head .form-label { line-height: 1.4; }

.setting-row[data-type="Boolean"] .setting-row-desc {
  font-size: 12.5px;
  line-height: 1.4;
}

.setting-public-chip { flex-shrink: 0; }

/* Delete lives at the end of the row's own head line. Same shape as the grid's row action (components.css
   .row-actions .btn-action) — that family is scoped to a table cell, so the values are restated here rather
   than the grid selector being widened to a surface it was not written for. */
.setting-edit,
.setting-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--kp-radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
}

.setting-edit {
    margin-inline-start: auto;
}

.setting-row-head > .setting-delete { margin-inline-start: auto; }
.setting-edit + .setting-delete { margin-inline-start: 0; }

.setting-edit:hover { background: var(--kp-navy-050); color: var(--kp-navy-700); }
.setting-delete:hover { background: var(--kp-navy-050); color: var(--kp-red-600); }

.setting-audit-caption { margin-block: var(--kp-space-xs) 0; }

/* A stamp inside an audit caption stays on one line, the same way a stamp inside a grid cell does. The
   shared family rule is written for table cells, so a caption outside a table got none at all and an
   Arabic sentence was free to break a date between its own digits (the 2026-09-20 page audit, G13). */
.setting-audit-caption .stamp { white-space: nowrap; }

/* Edit keeps the stable key visible but locked. Scoped to this dialog so ordinary read-only controls keep
   their own family treatment; the muted fill and arrow cursor state that this one cannot be typed in. */
#settingFormModal #settingFormKey[readonly] {
    background: var(--kp-slate-100);
    color: var(--color-text-muted);
    cursor: default;
}

/* "Not configured", and the empty Custom tab, read as muted prose rather than as an empty control. */
.setting-not-configured {
    margin: 0;
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

/* Read-only rendering for a viewer holding Access but not Edit. */
.setting-readonly { display: flex; align-items: baseline; gap: var(--kp-space-sm); }

/* The ISO language marker beside a bilingual value: a code, not a translated word, so it reads the same on
   an Arabic page and an English one. */
.setting-lang-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--color-text-muted);
}

.setting-lang-label { margin-block-end: var(--kp-space-xs); }

.setting-localized { display: grid; gap: var(--kp-space-sm); }

.setting-datetime { display: grid; grid-template-columns: 2fr 1fr; gap: var(--kp-space-sm); }

/* JSON and markup are read character by character, so both the editor and the read-only block use the
   mono family and keep their line breaks. */
.setting-code { font-family: var(--font-mono); font-size: var(--text-small); }

.setting-code-block {
    margin: 0;
    padding: var(--kp-space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-slate-50);
    font-family: var(--font-mono);
    font-size: var(--text-small);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow: auto;
}

.setting-switch { margin: 0; }

/* 2026-09-11, the D12 sibling-label form on a settings row. The row's heading label carries the `for` of
   the switch further down the row, so pressing the words flips it -- but the label sits in a different box
   from the control, a relation no combinator inside the family wrapper can cross. The relation the markup
   DOES have is the row itself: a row holding an enabled switch promises the hand on its heading, and a row
   whose switch its section master has gated shows the same refusal there as on the control. Keyed on
   .form-check-input so a row whose control is a text, number or localized field is untouched -- pressing
   that label focuses a field, which is a different affordance. */
.setting-row:has(.form-check-input:not(:disabled)) > .setting-row-head > label.form-label {
    cursor: pointer;
}

.setting-row:has(.form-check-input:disabled) > .setting-row-head > label.form-label {
    cursor: not-allowed;
}

/* Save row — mockup col-12 mt-4 (settings.html:363): 24px above, the button flowing at the inline start. */
.settings-actions { margin-block-start: var(--kp-space-lg); }

/* The Terms tab's "last updated" stamp in the card header (onboarding wave W3b, 2026-08-09) — the same
   value the subscriber portal prints, shown here so an administrator can confirm an edit landed without
   leaving the screen. It sits where the Custom tab puts its `.count-badge`, so it borrows that slot's
   muted, secondary weight rather than competing with the card title. */
.settings-legal-stamp {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    color: var(--color-text-muted);
    /* .75rem is the literal `.count-badge` uses in this same header slot (components.css:124) — there is
       no font-size TOKEN in tokens.css to point at, so matching the sibling is the house answer. */
    font-size: .75rem;
    white-space: nowrap;
}

/* The sentence under a section's sub-head that says what the section is for. It reads as a caption, so it
   takes the shipped .form-hint look and only corrects the spacing: .form-hint is written for the gap UNDER
   an input, and here the text follows a sub-head that already carries its own space below it. */
.settings-section-hint {
    margin-block: calc(var(--kp-space-14) * -1) var(--kp-space-14);
}

/* A SUBJECT WRAPS IN ITS OWN LIST CELL (2026-11-04). A subject may hold 200 characters with no space, and an unbroken
   run's smallest width is the whole run, so one such value made its cell about 3000px wide and the list thousands of
   pixels wider than its box. `anywhere` lowers that smallest width, as `break-word` does not. The two columns stay as
   wide as their headings, measured at the widths the list had before this rule, so a shipped subject's words stay whole. */
#settingsTemplatesList td[data-col="titleAr"],
#settingsTemplatesList td[data-col="titleEn"] {
  overflow-wrap: anywhere;
}

/* The placeholder chips in the notification-template drawer. Each chip is a button that types its own
   token into whichever field the reader last had the caret in, so it is the shipped .chip control with
   .chip--toggle's press affordance; only the token's own reading needs a rule of its own. */
.template-chips { margin-block-end: var(--kp-space-sm); }

/* A placeholder is a wire string: it stays LTR and monospaced inside the Arabic layout so a reader can tell
   one token from another character by character. */
.chip--token {
    font-family: var(--font-mono);
    direction: ltr;
}

/* The live preview of what the message will say. It shows the SUBJECT and the PLAIN-TEXT part only: the
   page's content security policy allows no inline styles or documents, so the HTML part cannot be rendered
   in a frame here, and a half-styled imitation of it would be a worse claim than an honest plain reading. */
.template-preview {
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-slate-50);
    padding: var(--kp-space-sm);
}

/* THE PREVIEW SHOWS A SKELETON LINE WHILE IT IS READ (ruling 15 #198c; 2026-11-10). Before its first answer the
   preview box is 41px high. The shared loading overlay brings its own 16px padding and five 14px lines, and inside
   so short a box the lines were squeezed to about a pixel each: the held read showed a blank white box. Here the
   overlay takes the box's own 8px padding, its lines keep their height, and what does not fit is cut at the box,
   so one whole line shows in the empty box and more as the preview grows. Measured 2026-11-10 at 1440 and 390 in
   both languages with the first read held: the box kept its 41px height and showed one whole 14px line. */
#templatePreview > .grid-loading {
    padding: var(--kp-space-sm);
    overflow: hidden;
}

#templatePreview > .grid-loading > .skeleton { flex-shrink: 0; }

.template-preview-subject {
    font-weight: 700;
    margin-block-end: var(--kp-space-xs);
    word-break: break-word;
}

/* The body keeps the line breaks the administrator typed, because a message's shape is part of its meaning. */
.template-preview-body {
    margin: 0;
    font-family: inherit;
    font-size: var(--text-small);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow: auto;
}

/* The pane prints each language as its own block, so the two need the boundary the message itself draws: the
   plain-text part puts a line of dashes between them, and here the page's own hairline says the same thing
   without pretending to be text somebody typed. It sits on the LOWER block and only under a block that is
   showing, so a pane rendering one language alone never opens with a rule over nothing. */
.template-preview-body:not([hidden]) + .template-preview-body {
    margin-block-start: var(--kp-space-sm);
    padding-block-start: var(--kp-space-sm);
    border-block-start: 1px solid var(--color-border);
}

/* ---- Payments grid (PK8, 2026-08-27) --------------------------------------------------------------- */

/* The page-scoped stamp rule that lived here is RETIRED (2026-09-03): the same declaration now sits in the
   design system as `.table-custom .stamp`, which reaches this grid and every other one. It was written here
   first, and a second grid then bound the class with no rule behind it. */

/* ---- The drawer detail list on a phone (2026-09-02) ------------------------------------------------
   `.modal-detail-list` is a two-column row: a 130px label column with the value beside it. That is a
   DESKTOP shape, and fourteen views share it -- Payments, P.O. Box requests, Subscribers, Shipments,
   Announcements and the rest -- so it was wrong on all of them at once rather than on one page. Measured at
   360 in BOTH languages, and the two readings differ by ENVIRONMENT rather than by language: on the deployed
   admin the label column left the value about 140px in English and the Payments drawer's 32-character
   TrackID fragmented into six lines, while on a local host on 2026-09-02 the same row left 9.89px in Arabic
   and 9.19px in English and that TrackID fragmented into 32 -- one character per line.

   Below the phone tier the label takes its own line and the value gets the row's full width. It is written
   as a WRAP with a full-basis label rather than `flex-direction: column`, because the TrackID row carries a
   THIRD child -- the copy control -- and a column would push that control onto a line of its own instead of
   leaving it beside the value it copies. The desktop 130px reservation is released in the same rule, so the
   value is not measured against a column that no longer exists.

   This block is declared at the END of the file on purpose: a media query adds NO specificity, so it has to
   come after every base rule of the family -- including the later page-scoped ones that re-declare the
   label column on the boxes pane -- or those would win inside the tier. ---- */
@media (max-width: 575.98px) {
  .modal-detail-list li {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .modal-detail-list .detail-label {
    flex: 0 0 100%;
    min-inline-size: 0;
  }

  /* BASIS ZERO, not `auto`. A flex container assigns items to lines using their hypothetical main size --
     the basis -- and only shrinks them once a line is settled, so a value whose basis is its own content
     width pushes the TrackID row's third child, the copy control, onto a line of its own. Measured here
     2026-09-02: with `flex: 1 1 auto` the fragmenting stopped but the copy button left the value's side. */
  .modal-detail-list .detail-value { flex: 1 1 0; }

  /* A VALUE WHOSE OWN DIRECTION OPPOSES ITS ROW'S PUTS ITS INK AT THE ROW'S START (2026-09-02, deployed
     admin). `.detail-value` aligns `start`, and `start` resolves inside the ELEMENT's direction -- so
     a value marked `dir="ltr"` for its digits resolves start to the physical LEFT, which in an Arabic row
     is the far end. While the box was shrink-wrapped that was invisible; the full-width basis above is what
     made it a quarter-screen gap. MEASURED on the Payments drawer at 360, Arabic: three of ten rows put
     their ink 172.22px, 240.95px and 250.27px from their own label while the other seven sat flush.
     BOTH SIDES OF THE FAMILY, because the mechanism is symmetric and only the Arabic half was photographed:
     the same views mark their Arabic-only fields `dir="rtl"`, which in an English row resolves start to the
     right and drifts exactly the same way. `end` inside the opposing direction IS the row's start, which is
     why one keyword answers both -- and it is chosen over shrink-wrapping the value because that would put
     the copy control back on its own line, which is the defect the rule above exists to prevent. */
  [dir="rtl"] .modal-detail-list .detail-value[dir="ltr"],
  [dir="ltr"] .modal-detail-list .detail-value[dir="rtl"] { text-align: end; }
}

/* ---- A count's value while the rows it describes are being re-read (ruling 15 #198b, 2026-09-11) ---------------

   The shared `.skeleton` shimmer paints the value's own box; this one line is what makes the digits get out
   of its way. `color: transparent` keeps the text in the layout, so the box is exactly the width it already
   had and nothing beside it moves between the press and the answer -- which is why NO width, height or
   min-width is declared here. The whole point of the shimmer is to say the number is being re-read, and a
   number that jumped position while saying so would be worse than the stale one it replaces.
   ---- */
.count-value--loading {
    color: transparent;
}

/* ---- The Shipments list headers stack at the narrow tier (2026-09-27, ruling 15 #198c) --------------------
   Each of the page's two list headers holds a door between the live list and the deleted list, and a door
   pressed wears the shared lock, whose ring is painted in the control's own flow and widens it. Measured in a
   visible browser at 390 px in English: the deleted header's title and "Back to the list" shared one row at
   rest, the pressed way back grew by its ring, no longer fitted, and wrapped under the title -- 35.55 px down
   for the whole read -- and in the live header the pressed door pushed the column chooser onto a new row of
   the header's own trailing group and moved by 0.51 px. Two rows wrap here: the header itself and, inside the
   live header, that trailing group.

   So on this page both headers, and the live header's trailing group, stack at the narrow tier: title, then
   the door, then the column chooser, each on its own row at the logical inline start, with the auto inline
   margins that push the group and the chooser to the far end taken away. A control that sits alone on its
   row has no neighbour to wrap past when its ring widens it; whether anything else moves is measured in the
   browser. The shared ring and the shared lock are left as they are: the ring's width is the recorded
   follow-up PK-LOCK-RING-IN-FLOW.

   THE TIER IS A CANDIDATE DERIVED FROM THE STYLESHEET, NOT A MEASURED BOUNDARY. It is the page gutter's own
   tier (max-width 767.98px, components.css `.main-content > main`): below it the header's content width is the
   viewport less 32 px of gutter, 2 px of card border and 40 px of header padding (about 487 px at 576 px with
   a 15 px scrollbar), and at 768 px and up it is never under about 671 px (the gutter grows to 20 and then
   28 px, and the side menu takes its 264 px only from 1200 px, where it is about 823 px). The only row
   measured one control at a time is the deleted header's at 390 px in English -- title 146.19 px, the way back
   114.33 px at rest and 138.33 px pressed, 24 px apart, so 308.52 px pressed. The live header's title, badge,
   door and chooser, the Arabic labels, a count badge of more digits and the widths between the tiers were not
   measured. The boundary is therefore to be confirmed in the browser at interior widths of 576-767 and
   768-991 px in both languages and at each tier's neighbours, and moved to cover any width where a pressed
   door still wraps. Written before the header trail's tier below, which must stay the last rule in this file
   to name that row; the ID-scoped selectors here outrank it and `.col-chooser` whatever their order. ---- */
@media (max-width: 767.98px) {
  #shipmentsLiveSection > .table-header,
  #shipmentsDeletedSection > .table-header,
  #shipmentsLiveSection > .table-header > .table-header-trail {
    flex-direction: column;
    align-items: flex-start;
  }

  #shipmentsLiveSection > .table-header > .table-header-trail,
  #shipmentsLiveSection > .table-header > .table-header-trail > .col-chooser {
    margin-inline-start: 0;
  }
}

/* ---- The grid header's trailing control row on a phone (2026-09-02) --------------------------------
   `.table-header-trail` (components.css) is a nowrap row holding the in-header search box beside the
   column chooser. The search box declares a 224px floor, so the row has nowhere to give: measured at
   360px on the Lookups, Roles and Branch Users grids in BOTH languages, it needs 224 + 8 + 105.44 =
   337.44px of a 271px content lane (the header's 311px box less its own 20 + 20 inline padding), and the
   chooser button ran 45.44px past the card's edge and 14.44px past the screen. The cut was SILENT: the
   button clips with no ellipsis, carries no title of its own, and the shell hides body overflow -- so the
   page reported zero overflow and showed no scrollbar, and nothing told the reader a control was there.

   Below the desktop tier the row WRAPS instead. The alternative -- dropping the search floor so both
   controls keep one line -- was measured on the same three pages and collapses the search box to 157.56px
   in English and 164.78px in Arabic (117.56px of typing lane), which trades a cut control for an unusable
   one. Wrapping keeps the box at 224-227px and puts the chooser on the next line, where its own auto
   inline-start margin (components.css `.col-chooser`) aligns it under the box's end.

   Declared from the DESKTOP tier down rather than at the phone tier, the way a control's overflow
   ownership is: a flex row only wraps when its contents do not fit, so this rule is inert at every width
   where they do, and no band between the two ends is left carrying the old shape.

   And declared at the END of this file on purpose: a media query adds NO specificity. Today the component
   sheet declares no flex-wrap on this row at all (nowrap is the property's initial value), so nothing
   competes with this tier; the day a base rule appears, this tier still wins only because the admin sheet
   is linked after the component sheet in the layout and nothing later in this file re-declares the row.
   Both halves are pinned. ---- */
@media (max-width: 991.98px) {
  .table-header-trail { flex-wrap: wrap; }
}

/* ---- A locked control that is not a form control keeps the pointer (2026-09-17) ---------------------

   The shared in-flight lock now announces a control it cannot really disable -- the sortable grid header,
   whose `disabled` is only an inert expando -- by writing aria-disabled="true" on it, so a keyboard reader
   is told the truth and the control leaves the tab order for the length of the read. But the design-system
   family rule `[aria-disabled="true"]` declares `pointer-events: none` at (0,1,0) and sits LATER in that
   sheet than `.btn-loading`'s own `pointer-events: auto`, so the announcement alone would have taken the
   locked header out of the pointer path -- and with it the `cursor: not-allowed` the lock exists to paint,
   which would have fallen through to the row underneath and read as an ordinary arrow.

   This compound is (0,2,0) -- one class plus one attribute -- so it outranks the family rule whatever the
   source order, exactly as `.is-disabled[aria-disabled="true"]` does for the disabled map link. The
   control is inert without the family rule: it is out of the tab order, and the page handler that owns the
   press refuses one while the lock holds. The family rule itself is deliberately NOT flipped -- its other
   consumers still depend on it, each with its reason recorded beside the census that sweeps them. ---- */
.btn-loading[aria-disabled="true"] {
  pointer-events: auto;
}

/* ---- A loading host with nothing painted inside it (ruling 15 #198c; measured 2026-09-24) -----------

   The shared overlay (`.grid-loading`, components.css) is sized by its host with `inset: 0`, so a region
   the page fills only from the read in flight gave it no height: the Shipments deleted roster's first open
   measured 1118 x 0, the overlay's padding landed, its five skeleton lines collapsed to nothing, and the
   whole held read showed a title over an empty body. The admin script marks such a host `is-empty-host`
   for the length of the read (measured before the overlay lands, on the host's content box, so a region
   that already shows something is never marked and never jumps), and this rule gives a marked host the
   skeleton's own height at every width.

   The height is the overlay's own arithmetic, over the tokens its rules declare: the padding twice, five
   lines of the line height, five line end margins and four gaps between lines -- 2 x 16 + 5 x 14 + 5 x 8
   + 4 x 8 = 174px. The line height has no token of its own, so the spacing token of the same value stands
   for it; a change to the overlay, to its lines or to the number of lines the script builds, without this
   rule, fails the design-family check that reads all of them. A host's own block border comes out of the
   lines' room (a bordered options box or dialog: 2px across five lines, derived, not measured).

   Declared here rather than beside the overlay because only the admin script raises that overlay; the
   portal's loading hosts paint a pseudo-element of their own and never create it. ---- */
.grid-loading-host.is-empty-host {
  min-block-size: calc(2 * var(--kp-space-md) + 5 * var(--kp-space-14) + 5 * var(--kp-space-sm) + 4 * var(--kp-space-sm));
}

/* ---- analytics center (15 #904) ----
   The Smart Digital Analytics Center page, ported from the approved design (version 3, 15 #904 addition
   2026-10-31): its card and section geometry, the smaller key-number cards (value 20px, label 12px, icon box
   32px), each chart's height as a class, and the drawer and branch-card content. Colours are brand tokens only;
   the design's light tints are the same brand colours mixed toward white. The page script reads the chart colours
   from the same custom properties. Logical properties throughout; the content is right to left by ruling
   15 #904(e). */
.analytics-center,
.ac-drawer,
.ac-popup {
  --ac-card-border: var(--kp-slate-edge-soft);
  --ac-card-shadow: 0 1px 2px color-mix(in srgb, var(--kp-slate-900) 4%, transparent);
  --ac-navy-tint: color-mix(in srgb, var(--kp-navy-600) 7%, var(--kp-white));
  --ac-gold-tint: color-mix(in srgb, var(--kp-gold-500) 10%, var(--kp-white));
  --ac-green-tint: color-mix(in srgb, var(--kp-emerald-500) 9%, var(--kp-white));
  --ac-gold-ink: var(--kp-stamp-gold-text);
}

.analytics-center {
  display: flex;
  flex-direction: column;
  gap: var(--kp-space-lg);
  color: var(--kp-slate-900);
  font-family: var(--font-body);
}

/* The page's own line height (dated 2026-11-01). The admin's base leading of 1.65 (mockup v3 ruling 15 #137,
   adjudication 7) made every text line here taller than the approved design, which sets its lines at its own font
   file's normal leading: measured, a key-number card 158.5 px against 146, a ranking row 55.6 against 46, and the
   map card stretched to 757 px by the ranking beside it. Copying normal does not reproduce the design, because the
   house Alexandria file's normal is taller still (a 1rem line 26.4 px here against 19 px there). A 1.25 ratio,
   with 1.2 on the large figures below, brought the cards, rows, tiles and dialog boxes measured at 1440 and 390
   within 2 px of the design's. Set on this page's root and its two dialogs only. */
.analytics-center,
.ac-drawer .modal-content,
.ac-popup .modal-content { line-height: 1.25; }

.analytics-center button,
.analytics-center select,
.ac-drawer button,
.ac-popup button { font-family: inherit; }

.ac-icon {
  inline-size: 16px;
  block-size: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.ac-icon--10 { inline-size: 10px; block-size: 10px; stroke-width: 2.4; }
.ac-icon--22 { inline-size: 22px; block-size: 22px; }

/* the filter row */
.ac-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--kp-space-14);
}
.ac-toolbar__meta { display: flex; flex-direction: column; gap: var(--kp-space-xs); }
.ac-updated { display: flex; align-items: center; gap: var(--kp-space-sm); font-size: 13px; color: var(--kp-slate-600); }
.ac-updated__time { font-weight: 700; color: var(--kp-slate-900); }
.ac-scope { font-size: 14px; color: var(--kp-slate-900); }
.ac-scope__name { font-weight: 700; }
.ac-scope__period { color: var(--kp-slate-500); }
.ac-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.ac-seg-group {
  display: flex;
  flex-wrap: wrap;
  background: var(--kp-white);
  border: 1px solid var(--kp-slate-200);
  border-radius: var(--kp-radius-xl);
  padding: var(--kp-space-xs);
  gap: var(--kp-space-xs);
}
.ac-seg {
  border: 0;
  border-radius: 9px;
  padding: var(--kp-space-sm) var(--kp-space-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--kp-slate-600);
}
.ac-section__head .ac-seg { padding: 7px var(--kp-space-14); }
.ac-seg:hover { color: var(--kp-navy-600); }
.ac-seg[aria-pressed="true"] { background: var(--kp-navy-600); color: var(--kp-white); }
.ac-seg-group--soft { background: var(--kp-slate-100); border: 0; border-radius: var(--kp-radius-lg); padding: 3px; gap: 3px; }
.ac-seg-group--soft .ac-seg { border-radius: var(--kp-radius-md); padding: 6px 12px; font-size: 12px; }

.ac-field { display: flex; align-items: center; gap: var(--kp-space-sm); font-size: 13px; color: var(--kp-slate-600); margin: 0; }
.ac-select {
  border: 1px solid var(--kp-slate-200);
  background-color: var(--kp-white);
  border-radius: var(--kp-radius-lg);
  padding: var(--kp-space-sm) 12px;
  font-size: 13px;
  color: var(--kp-slate-900);
}
.ac-select--gov,
.ac-select--branch { padding-block: 9px; }
.ac-select--gov { min-inline-size: 150px; }
.ac-select--branch { min-inline-size: 170px; }
.ac-swatch { inline-size: 10px; block-size: 10px; border-radius: 3px; display: inline-block; }
.ac-swatch--a { background: var(--kp-navy-500); }
.ac-swatch--b { background: var(--kp-gold-500); }

.ac-btn {
  border: 1px solid var(--kp-slate-200);
  background: var(--kp-white);
  color: var(--kp-slate-600);
  border-radius: var(--kp-radius-lg);
  padding: 9px var(--kp-space-14);
  font-size: 13px;
  cursor: pointer;
}
.ac-btn:hover { filter: brightness(.97); }
.ac-btn--primary { border: 0; background: var(--kp-navy-600); color: var(--kp-white); font-weight: 600; }
.ac-btn[hidden] { display: none; }

/* Dated 2026-11-10: a focus rule of this page's own stood here (a 2px navy outline on the segment buttons, the
   buttons, the key-number cards and the ranking and drawer rows). The Admin-wide keyboard ring in the shared sheet
   is declared with !important and wins over it: measured that day on a focused segment button, in both languages,
   the ring drawn was that one (solid 1px, 3px out), not this rule's. The rule is removed so that no reader takes
   it for the ring the page draws. */

/* the eight key-number cards */
.ac-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--kp-space-md); }
.ac-kpi {
  --ac-edge: var(--kp-navy-600);
  --ac-tint: var(--ac-navy-tint);
  text-align: start;
  cursor: pointer;
  background: var(--kp-white);
  border: 1px solid var(--ac-card-border);
  border-inline-start: 4px solid var(--ac-edge);
  border-radius: 14px;
  padding: var(--kp-space-14) var(--kp-space-md) 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: var(--ac-card-shadow);
  color: var(--kp-slate-900);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: ac-rise .6s ease both;
}
.ac-kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 32px color-mix(in srgb, var(--kp-navy-600) 12%, transparent); }
.ac-kpi--gold { --ac-edge: var(--kp-gold-500); --ac-tint: var(--ac-gold-tint); }
.ac-kpi--green { --ac-edge: var(--kp-emerald-500); --ac-tint: var(--ac-green-tint); }
.ac-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; inline-size: 100%; }
.ac-kpi__label { font-size: 12px; color: var(--kp-slate-600); }
.ac-kpi__icon {
  inline-size: 32px;
  block-size: 32px;
  border-radius: 9px;
  background: var(--ac-tint);
  color: var(--ac-edge);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-kpi__value-row { display: flex; align-items: baseline; gap: 6px; }
.ac-kpi__value { font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--kp-slate-900); }
.ac-kpi__unit { font-size: 11px; color: var(--kp-slate-500); }
.ac-kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--kp-space-sm); inline-size: 100%; }
.ac-kpi__cmp { font-size: 10px; color: var(--kp-slate-400); }
.ac-spark { inline-size: 96px; block-size: 28px; }
.ac-spark__area { fill: var(--ac-tint); }
.ac-spark__line { fill: none; stroke: var(--ac-edge); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ac-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--kp-radius-full);
}
.ac-delta--up { background: color-mix(in srgb, var(--kp-emerald-500) 10%, transparent); color: var(--kp-emerald-500); }
.ac-delta--down { background: color-mix(in srgb, var(--kp-red-600) 8%, transparent); color: var(--kp-red-600); }
.ac-delta--flat { background: var(--kp-slate-100); color: var(--kp-slate-500); }
.ac-delta-text--up { color: var(--kp-emerald-500); }
.ac-delta-text--down { color: var(--kp-red-600); }
.ac-delta-text--flat { color: var(--kp-slate-500); }

/* sections and cards */
.ac-section { display: flex; flex-direction: column; gap: var(--kp-space-14); }
.ac-section__head,
.ac-section__titles { display: flex; flex-direction: column; gap: var(--kp-space-xs); }
.ac-section__head--split { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ac-section__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--kp-navy-700); font-family: inherit; letter-spacing: normal; }
.ac-section__sub { font-size: 13px; color: var(--kp-slate-500); }

.ac-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.ac-span-4 { grid-column: span 4; }
.ac-span-5 { grid-column: span 5; }
.ac-span-6 { grid-column: span 6; }
.ac-span-7 { grid-column: span 7; }
.ac-span-8 { grid-column: span 8; }
.ac-span-12 { grid-column: span 12; }

.ac-card {
  background: var(--kp-white);
  border: 1px solid var(--ac-card-border);
  border-radius: var(--kp-radius-2xl);
  padding: var(--kp-space-18);
  box-shadow: var(--ac-card-shadow);
  min-inline-size: 0;
}
.ac-card--map { padding: var(--kp-space-md); }
.ac-card--board { display: flex; flex-direction: column; gap: 10px; }
.ac-card--stack { display: flex; flex-direction: column; gap: 12px; }
.ac-card--table { display: flex; flex-direction: column; gap: 6px; }
.ac-card__head,
.ac-card__titles { display: flex; flex-direction: column; gap: 2px; }
.ac-card__head--row { flex-direction: row; align-items: center; justify-content: space-between; }
.ac-card__head--split { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ac-card__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--kp-slate-900); font-family: inherit; letter-spacing: normal; }
.ac-card__title--sm { font-size: 14px; }
.ac-card__sub { font-size: 12px; color: var(--kp-slate-500); }

.ac-chart { inline-size: 100%; }
.ac-chart--map { block-size: 520px; }
.ac-chart--360 { block-size: 360px; }
.ac-chart--340 { block-size: 340px; }
.ac-chart--320 { block-size: 320px; }
.ac-chart--310 { block-size: 310px; }
.ac-chart--300 { block-size: 300px; }
.ac-chart--260 { block-size: 260px; }
.ac-chart--230 { block-size: 230px; }
.ac-chart--200 { block-size: 200px; }
.ac-chart--180 { block-size: 180px; }
.ac-chart--120 { block-size: 120px; }

/* the branch ranking */
.ac-board { display: flex; flex-direction: column; gap: 2px; }
.ac-board-row {
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  border-radius: var(--kp-radius-lg);
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--kp-slate-900);
  transition: background .15s ease;
}
.ac-board-row:hover { background: var(--kp-navy-050); }
.ac-board-row.is-selected { background: var(--ac-navy-tint); }
.ac-rank {
  inline-size: 24px;
  block-size: 24px;
  border-radius: 7px;
  background: var(--kp-slate-100);
  color: var(--kp-slate-600);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-rank--top { background: var(--ac-gold-tint); color: var(--ac-gold-ink); }
.ac-board-row__main { display: flex; flex-direction: column; gap: var(--kp-space-xs); min-inline-size: 0; }
.ac-board-row__names { display: flex; gap: 6px; align-items: baseline; }
.ac-board-row__name { font-size: 13px; font-weight: 600; }
.ac-board-row__gov { font-size: 11px; color: var(--kp-slate-400); }
.ac-board-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ac-board-row__value { font-size: 13px; font-weight: 700; }
.ac-board-row__delta { font-size: 11px; font-weight: 700; }

.ac-bar { display: block; inline-size: 100%; block-size: 5px; }
.ac-bar__track { fill: var(--kp-slate-100); }
.ac-bar__fill { fill: var(--kp-navy-500); }

/* the two small tiles under the status donut */
.ac-mini-tiles { display: flex; gap: 10px; }
.ac-mini-tile {
  flex: 1 1 0;
  background: var(--kp-navy-050);
  border-radius: var(--kp-radius-xl);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ac-mini-tile__label { font-size: 12px; color: var(--kp-slate-600); }
/* A number in its own left-to-right box (a bdi with dir="ltr"): start resolves against that box's own direction
   and puts the number at the left. Its end is the start of the right-to-left tile, under the label, where the
   design places it (2026-11-01). The content and both dialogs are right to left in both interface languages
   (15 #904(e)), so end lands there in each. match-parent says the same thing but is dropped by Chromium, which
   parses only its prefixed form. The same holds for every number rule below that sits on a left-to-right box. */
.ac-mini-tile__value { font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--kp-navy-600); text-align: end; }
.ac-mini-tile--gold { background: var(--ac-gold-tint); }
.ac-mini-tile--gold .ac-mini-tile__value { color: var(--ac-gold-ink); }

/* the comparison table */
.ac-cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--kp-space-sm);
  padding: 9px 10px;
  font-size: 13px;
  border-block-end: 1px solid var(--kp-slate-100);
}
.ac-cmp-row--head { padding: var(--kp-space-sm) 10px; font-size: 12px; color: var(--kp-slate-500); }
.ac-cmp-name { font-weight: 700; }
.ac-cmp-name--a { color: var(--kp-navy-500); }
.ac-cmp-name--b { color: var(--ac-gold-ink); }
.ac-cmp-row__label { color: var(--kp-slate-600); }
.ac-cmp-row__value { font-weight: 500; text-align: end; }
.ac-cmp-row__value.is-lead { font-weight: 800; }

/* the tooltip frame: the chart library writes its position and colours, this class adds the reading direction */
.ac-tooltip { direction: rtl; text-align: start; font-family: var(--font-body); }
.ac-tooltip__title { font-weight: 700; }

/* the drill-down drawer and the branch card */
.ac-drawer .modal-dialog { inline-size: min(680px, 100vw); }
.ac-drawer .modal-content,
.ac-popup .modal-content { font-family: var(--font-body); color: var(--kp-slate-900); }
.ac-dialog-titles { display: flex; flex-direction: column; gap: 2px; }
.ac-dialog-eyebrow { font-size: 12px; color: color-mix(in srgb, var(--kp-white) 78%, var(--kp-navy-600)); }
/* The header in the selector lifts this rule over the house drawer title rule, which names the drawer's header too
   and would otherwise keep the drawer title at 16 px beside the branch card's 18 (2026-11-01). */
.ac-drawer .modal-header .modal-title,
.ac-popup .modal-header .modal-title { font-size: 18px; line-height: 1.2; }
.ac-drawer .modal-body.ac-drawer__body { padding: 20px var(--kp-space-lg); display: flex; flex-direction: column; gap: var(--kp-space-18); }
/* The body is a scrolling flex column, and a chart region has no content of its own to hold it open, so it shrank
   to 0 px under the drawer's longer content; the region keeps its class height (2026-11-01). */
.ac-drawer__body > .ac-chart { flex-shrink: 0; }

.ac-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ac-tile { border-radius: 14px; padding: var(--kp-space-14) var(--kp-space-md); display: flex; flex-direction: column; gap: var(--kp-space-xs); }
.ac-tile--navy { background: var(--kp-navy-050); }
.ac-tile--soft { background: var(--kp-slate-50); }
.ac-tile--line { border: 1px solid var(--ac-card-border); padding: 12px var(--kp-space-14); }
.ac-tile__label { font-size: 12px; color: var(--kp-slate-600); }
.ac-tile__value { font-size: 24px; font-weight: 800; line-height: 1.2; text-align: end; }
.ac-tile--navy .ac-tile__value { color: var(--kp-navy-600); }
.ac-tile__value--sm { font-size: 20px; }
.ac-tile__value-row { display: flex; align-items: baseline; gap: 6px; }
.ac-tile__note { font-size: 12px; color: var(--kp-slate-500); }
.ac-tile__delta { font-size: 12px; font-weight: 700; text-align: end; }

.ac-drawer-table { display: flex; flex-direction: column; }
.ac-drawer-row {
  border: 0;
  border-block-end: 1px solid var(--kp-slate-100);
  background: transparent;
  text-align: start;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: var(--kp-space-sm);
  padding: 10px;
  font-size: 13px;
  color: var(--kp-slate-900);
  align-items: center;
  inline-size: 100%;
  transition: background .15s ease;
}
.ac-drawer-row:hover { background: var(--kp-navy-050); }
.ac-drawer-row--head { cursor: default; padding: var(--kp-space-sm) 10px; font-size: 12px; color: var(--kp-slate-500); }
.ac-drawer-row--head:hover { background: transparent; }
.ac-drawer-row__names { display: flex; flex-direction: column; }
.ac-drawer-row__name { font-weight: 600; }
.ac-drawer-row__gov { font-size: 11px; color: var(--kp-slate-400); }
.ac-drawer-row__value { font-weight: 700; text-align: end; }
.ac-drawer-row__share { display: flex; align-items: center; gap: 6px; }
.ac-drawer-row__share .ac-bar { flex: 1 1 auto; }
.ac-drawer-row__pct { font-size: 12px; color: var(--kp-slate-600); }
.ac-drawer-row__delta { font-weight: 700; text-align: end; }

.ac-popup__dialog { max-inline-size: min(620px, calc(100vw - 2 * var(--kp-space-md))); }
.ac-popup .modal-content { border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px color-mix(in srgb, var(--kp-slate-900) 30%, transparent); }
.ac-popup .modal-header { padding: var(--kp-space-18) var(--kp-space-22); }
.ac-popup__brand { display: flex; align-items: center; gap: 12px; }
.ac-popup__pin {
  inline-size: 42px;
  block-size: 42px;
  border-radius: var(--kp-radius-xl);
  background: color-mix(in srgb, var(--kp-gold-500) 22%, transparent);
  color: var(--kp-gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-popup .modal-body.ac-popup__body { padding: var(--kp-space-18) var(--kp-space-22) var(--kp-space-22); display: flex; flex-direction: column; gap: var(--kp-space-md); }
.ac-chips { display: flex; flex-wrap: wrap; gap: var(--kp-space-sm); }
.ac-chip { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: var(--kp-radius-full); }
.ac-chip--gold { background: var(--ac-gold-tint); color: var(--ac-gold-ink); }
.ac-chip--navy { background: var(--kp-navy-050); color: var(--kp-navy-600); }
.ac-popup__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ac-popup__actions .ac-btn { padding: 10px var(--kp-space-md); }

@keyframes ac-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .ac-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-span-4, .ac-span-5, .ac-span-6, .ac-span-7, .ac-span-8 { grid-column: span 12; }
}
@media (max-width: 640px) {
  .ac-kpis,
  .ac-tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ac-kpi { animation: none; transition: none; }
  .ac-board-row,
  .ac-drawer-row { transition: none; }
}
