/* ============================================================
   Baridy Design System — components.css
   LAYER 3 — component classes (07 §2). Views bind ONLY to these.
   Every color is a var() reference — ZERO hex, logical properties only.
   ============================================================ */

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    background: var(--color-action-primary);
    color: var(--kp-white);
    /* Same box model as the siblings (.btn-secondary / .btn-danger each carry a 1px border) so shared
       dialog/drawer footers render equal heights — measured 38.30px vs 40.30px before; the transparent
       border is invisible (plan P5, docs/plans/2026-08-25-post-wave-followups-plan.md, 2026-08-25). */
    border: 1px solid transparent;
    border-radius: var(--kp-radius-md);
    padding: 9px 18px;
    font-family: inherit;
    /* Mockup button type ramp (style.css --text-ui: 0.875rem / --leading-ui: 1.45, weight 600 on
       btn-primary-custom/btn-outline-custom). These were MISSING here, so the family inherited the
       16px body size at weight 500 — every primary/secondary ran 2px larger and lighter than the
       mockup while .btn-confirm (live-measured) was already right (owner polish order 2026-08-01). */
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.btn-primary:hover {
    background: var(--kp-navy-700);
}

.btn-primary:active {
    transform: scale(.97);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    background: var(--color-bg-canvas);
    color: var(--kp-navy-700);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    padding: 9px 18px;
    font-family: inherit;
    /* Same mockup ramp as .btn-primary above (--text-ui/--leading-ui/600) — the missing size is what
       made a footer Cancel (16px, 44px tall) tower over its Save sibling (14px, 41px tall). */
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.btn-secondary:active {
    transform: scale(.97);
}

/* Design sweep round 3, 2026-08-28: the mockup's outline hover uses a pale-navy fill, re-expressed
   through --kp-navy-100. No --shadow-xs token exists, so its shadow leg is omitted instead of copied raw. */
.btn-secondary:hover {
    background: var(--kp-navy-100);
    border-color: var(--color-action-primary);
    color: var(--color-action-primary);
}

/* A DISABLED SECONDARY BUTTON SAYS SO (browser evidence, 2026-09-16). This family declared no disabled
   posture at all, so the two controls the hand-over card draws dark while its first step settles computed
   opacity 1, cursor pointer and the live navy ink -- every value identical to the enabled control beside
   them, with only the sentence above them saying they were dead. That is the silent block the
   no-silent-blocking law forbids, and every other locked family in this house already answers it the same
   way: the grid row action, the pager button, the matrix switch, the plan sheet footer, the portal
   primary. Written at the FAMILY like those, because the gap is the family's and not this one card's: the
   next page to disable a secondary button inherits the posture instead of shipping the same silence again.
   The cursor is declared here rather than left to the drawer-wide rule further down, which reaches only a
   control inside a drawer or a modal; these two stand on a page card. A control under its own loading lock
   is dimmed by this too, exactly as the row-action family has dimmed one since 2026-08-27 -- it keeps the
   ring the lock draws and is still the honest reading of a control that cannot be pressed. */
.btn-secondary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* And the hover above stands down for it -- the same correction the row-action family needed once its
   disabled control stayed hit-testable. Keeping it hit-testable is what lets the not-allowed cursor paint
   at all, and it is equally what lets the ENABLED hover rule reach it, so a dead control would take the
   pale-navy fill and the action ink under the pointer while its cursor said the opposite. This selector is
   (0,3,0) against the plain hover's (0,2,0), so the resting paint wins wherever the pointer goes; the three
   declarations are the family's own resting values above, not new colours. */
.btn-secondary:disabled:hover {
    background: var(--color-bg-canvas);
    border-color: var(--color-border);
    color: var(--kp-navy-700);
}

/* ---- Card ---- */
.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    padding: var(--kp-space-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow .25s ease;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

/* ---- Badges: full pill + hairline border + soft shadow (mockup-v3 .badge-status).
   Solid fills + borders come from the --badge-* tokens (Task 1).
   RADIUS, 2026-08-02 (restyle wave U8, ledger 15 #137): the family is a FULL PILL everywhere. It shipped
   at --kp-radius-md (8px, the v2 mockup's --radius-sm) with the admin site.css `.table-custom .badge` rule
   rounding it to a pill inside grids only (owner order 2026-07-23 "make all the pills border radius
   consistent in all the table cells"); the v3 reference paints .badge-status at 9999px, which extends that
   same owner intent to the badges OUTSIDE grids (drawers, the boxes panes, the branch card) instead of
   leaving two shapes for one family. That grid-scoped site.css rule is now redundant — it re-declares the
   value the base already carries — but it STAYS: it is harmless, and it keeps the grid pill pinned if the
   base radius is ever revisited.
   RESCALED 2026-08-02 to the v3 reference badge (deployed-reference.css:1423-1433 — 5px 14px padding,
   12px/600, NO min-height/min-width; it declares no line-height, so it inherits that reference's body
   1.65, which we pin here): mockup-v3 restyle wave U8, ledger 15 #137. The v3 shape sizes itself from its
   own text, so the former 26px min-height went with the 88px status-column min-inline-size (admin
   site.css, adjudication 3 — both superseded 15 #96 F11). Colors are untouched official semantic pairs. ---- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;                                        /* mockup style.css:1471 */
    padding: 5px 14px;                               /* v3 deployed-reference.css:1427 (was 3px 9px) */
    border: 1px solid transparent;                   /* mockup style.css:1474 */
    border-radius: var(--kp-radius-full);            /* v3 .badge-status 9999px (was --kp-radius-md 8px) */
    font-size: var(--text-caption);                  /* 0.75rem == mockup 12px (style.css:1476) */
    font-weight: 600;
    line-height: 1.65;                               /* v3 reference body line-height, inherited by its badge */
    white-space: nowrap;
    vertical-align: middle;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);    /* mockup style.css:1481 */
}

.badge--success   { background: var(--badge-success-bg); color: var(--badge-success-text); border-color: var(--badge-success-border); }
.badge--pending   { background: var(--badge-warning-bg); color: var(--badge-warning-text); border-color: var(--badge-warning-border); }
.badge--alert     { background: var(--badge-danger-bg);  color: var(--badge-danger-text);  border-color: var(--badge-danger-border); }
.badge--scheduled { background: var(--badge-info-bg);    color: var(--badge-info-text);    border-color: var(--badge-info-border); }
.badge--draft     { background: var(--badge-neutral-bg); color: var(--badge-neutral-text); border-color: var(--badge-neutral-border); }
/* --transit has no mockup operational-badge family, so it stays on the legacy violet surface-tint tokens
   and takes its shape from the base 1px transparent border. It is NOT unused: this comment claimed "no view
   consumer (defined-but-unused)" until 2026-09-03, when a census of every app's Views and Controllers folders found it
   bound on four pages -- the shipments grid's three arrival mail-statuses, the P.O. Box request status map
   and that request's own view fallback, the reference-reasons System marker, and the announcements Immediate
   marker. So it is RESERVED, not free: a status map on a NEW page chooses from the mockup families declared
   above (--success / --pending / --alert / --scheduled / --draft), which is why the pickup bookings page
   moved its Confirmed row onto --scheduled on the same day. A consumer set stated in a comment is a claim
   about this repo (AGENTS.md "Code readability"), so the line below is machine-checked against the tree and
   a new binding must be added here in the same change that writes it.
   Consumers (census 2026-09-03): ActionReasons, Announcements, PoBoxRequests, Shipments. (2026-09-12: a comment may not contain a comment terminator — a path glob here once closed this comment early and unbound the rule below.) */
.badge--transit   { background: var(--status-transit-bg); color: var(--status-transit-fg); }

/* ---- Title row-count pill (mockup style.css:4890-4898) — NEW, distinct from the existing Roles
   assigned-users .count-pill (site.css:579-598), which is a different, clickable component ---- */
.count-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
    font-size: .75rem;
    font-weight: 700;
    padding-block: 2px;
    padding-inline: 10px;
    border-radius: var(--kp-radius-full);
}

/* ---- Role-type badges (mockup .role-type-badge.system/.custom, style.css:7047-7067) ---- */
.badge--role-system,
.badge--role-custom {
    border-radius: var(--kp-radius-full);   /* full pill -- mockup .role-type-badge radius 999px (was inheriting .badge 8px); owner "enhance the pills" 2026-07-23 */
    font-weight: 700;                        /* mockup .role-type-badge weight 700 */
    padding: 4px 10px;                       /* mockup .role-type-badge padding, exact (style.css:7294) */
}
.badge--role-system { background: var(--status-role-system-bg); color: var(--status-role-system-fg); border-color: rgba(124, 58, 237, 0.18); } /* mockup .role-type-badge.system border (style.css:7303), exact */
.badge--role-custom { background: var(--status-role-custom-bg); color: var(--status-role-custom-fg); border-color: rgba(14, 165, 233, 0.18); }   /* mockup .role-type-badge.custom is CYAN (style.css:7305-7309): bg/text via --status-role-custom-* (--kp-cyan-*), border rgba(14,165,233,0.18) exact — the earlier no-new-cyan-hex navy deviation was superseded by minting --kp-cyan-* (15 #96 F7) */

/* ---- Type chip (mockup .type-chip / .type-chip-doc, style.css:4854-4880) — a compact radius-full pill with
   a leading 5px currentColor dot. Ported for the Plans discount cell, which was mis-styled as an amber
   .badge--pending (15 #96 F11). .type-chip-doc = the GOLD variant: gold-tint fill + navy-deep text (its dot
   inherits currentColor = navy-deep). ---- */
.type-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    padding: 2px 9px;
    border-radius: var(--kp-radius-full);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--color-shell-soft-strong);   /* mockup --primary-light #e6f0fe == --kp-navy-100 (base chip) */
    color: var(--color-action-primary);
    white-space: nowrap;
    align-self: flex-start;
}
.type-chip::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}
.type-chip-doc {
    background: var(--kp-gold-500-a12);           /* mockup rgba(203,160,82,.12) gold tint (style.css:4869) */
    color: var(--kp-navy-700);                    /* mockup --postal-navy-deep #002680 == --kp-navy-700 */
}

/* ---- Pill padding modifier for the status-badge family (shared status-dot glow/pulse lives in
   site.css next to the existing .status-dot base rule) ---- */
.badge--pill { padding-block: 5px; padding-inline: 14px; border-radius: var(--kp-radius-full); }

/* ---- Notes / inline callouts ---- */
.note {
    border-radius: var(--kp-radius-md);
    padding: 14px 16px;
    font-size: .9rem;
}

.note--info {
    background: var(--status-scheduled-bg);
    border-inline-start: 4px solid var(--color-action-primary);
}

.note--warn {
    background: var(--status-pending-bg);
    border-inline-start: 4px solid var(--color-accent);
}

.note--danger {
    background: var(--status-alert-bg);
    border-inline-start: 4px solid var(--status-alert-fg);
}

/* ---- Glass surfaces ---- */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-strong-bg);
    -webkit-backdrop-filter: var(--glass-strong-blur);
    backdrop-filter: var(--glass-strong-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ---- Stat card (+ enhanced variant) ---- */
.stat-card,
.stat-card-enhanced {
    --stat-accent: var(--color-action-primary);
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--kp-space-md);
    background: var(--color-bg-surface);
    border-radius: var(--kp-radius-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}
.stat-card:hover,
.stat-card-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

/* trailing accent bar on the inline-end edge (mirrors under RTL) */
.stat-card::after,
.stat-card-enhanced::after {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: var(--stat-accent);
}

.stat-card .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--icon-radius);
    background: var(--status-scheduled-bg);
    color: var(--stat-accent);
    flex-shrink: 0;
}

/* stat-icon color variants — one per card position, built from existing status tokens
   (base .stat-icon stays navy for card #1). Scoped under .stat-card to match base specificity. */
.stat-card .stat-icon--success { background: var(--status-success-bg); color: var(--status-success-fg); }
.stat-card .stat-icon--accent  { background: var(--status-pending-bg);  color: var(--status-pending-fg); }
.stat-card .stat-icon--transit { background: var(--status-transit-bg);  color: var(--status-transit-fg); }

/* stat-icon color variants keyed to the mockup's own palette names (Task 1 tokens, consumed from
   Task 7 onward as pages adopt the mockup's per-card icon coloring). Coexist with the --success/
   --accent/--transit variants above -- both sets stay live until every grid page is restyled. */
.stat-card .stat-icon--blue   { background: var(--color-stat-icon-blue-bg);   color: var(--color-stat-icon-blue-fg); }
.stat-card .stat-icon--green  { background: var(--color-stat-icon-green-bg);  color: var(--color-stat-icon-green-fg); }
.stat-card .stat-icon--orange { background: var(--color-stat-icon-orange-bg); color: var(--color-stat-icon-orange-fg); }
.stat-card .stat-icon--cyan   { background: var(--color-stat-icon-cyan-bg);   color: var(--color-stat-icon-cyan-fg); }
.stat-card .stat-icon--purple { background: var(--color-stat-icon-purple-bg); color: var(--color-stat-icon-purple-fg); }
.stat-card .stat-icon--coral  { background: var(--color-stat-icon-coral-bg);  color: var(--color-stat-icon-coral-fg); }

/* P4 D1 — soft-navy variant (mockup DASHBOARD V2 default, style.css:5885-5889). Unifies the dashboard
   KPI icons to one soft-navy tint; the accent bar wiring below keeps the trailing ::after stripe navy
   too (mockup style.css:5876-5879 unifies every dashboard stat-card stripe to postal-navy). */
.stat-card .stat-icon--navy   { background: var(--color-stat-icon-navy-bg);   color: var(--color-stat-icon-navy-fg); }

/* NO per-card accent-bar coloring (fixed 2026-07-19, live-measured): the mockup's FINAL layer
   (style.css:5876-5879, !important) unifies EVERY stat-card ::after stripe to postal navy on every
   page — measured rgb(0,51,160) on all four branches.html cards live. The earlier :has() wiring here
   matched the mockup's superseded per-card section (971-995) and painted green/gold stripes the
   mockup never ships. Color-coding stays on the ICON TILES only (the --stat-icon--X classes above);
   the bar keeps the default --stat-accent (= --color-action-primary, navy). */

/* Dated 2026-11-10 (risk row HAC-LAUNCHER-DS-LEFTOVERS): the coral attention pair's card class and its icon rule
   stood here (the dashboard's pending-requests and late-shipments cards). Those two cards left the dashboard with
   owner ruling 15 #904(b), no view or script wears the class any more, and its two rules are removed. The change
   line's exception colour below is kept. */
.stat-card .stat-info .change.exception { color: var(--kp-coral-500); font-weight: 600; }

/* ---- Clickable counter cards (owner law 2026-07-23: every counter card is clickable and
   FILTERS its grid) ---- <button class="stat-card stat-card--action">: inherits the full
   stat-card look; adds the button reset + the is-active state that shows which counter
   currently narrows the grid. Future counter rows MUST use this family. The is-active ring is
   painted as an INSET box-shadow, never a 1px border: on an auto-height flex card a top+bottom
   border adds 2px of outer height (border-box only clamps explicit heights), which stretched every
   action-card stat row to 101.6px vs the mockup's border-0 99.6px (lead measurement 2026-07-23).
   border:0 also suppresses the <button> UA default (2px outset) so a.stat-card and button.stat-card
   compute the identical height. */
.stat-card--action {
    inline-size: 100%;
    border: 0;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.stat-card--action:focus-visible { outline: 2px solid var(--color-action-primary); outline-offset: 2px; }

.stat-card--action.is-active {
    box-shadow: var(--shadow-card-hover), inset 0 0 0 1px var(--color-action-primary);
}

/* Navigable stat cards (owner counter-card law 2026-07-23): a card whose number is a subset of ANOTHER
   page's grid links there instead of filtering in place -- the Branches "Employees" card -> /BranchUsers and
   the dashboard "Active subscribers" tile -> /Subscribers?status=Active. Rendered as an <a>, so kill the UA
   link underline/color; the label/value/icon keep their own tokens. It is navigation, not a grid filter, so
   it never takes the .stat-card--action is-active ring. */
a.stat-card { text-decoration: none; color: inherit; }

/* Stat-card glyph size (mockup .stat-icon .lucide, style.css:964-969) — the sprite <svg class="icon"> is
   18px by default (site.css); stat cards want the larger 24px glyph. */
.stat-card .stat-icon .icon { inline-size: 24px; block-size: 24px; }

/* ---- Stat trend line (mockup style.css:8255-8262) ---- */
.stat-trend {
    display: flex;
    align-items: center;
    gap: var(--kp-space-xs);
    font-size: .72rem;
    margin-block-start: 4px;
    color: var(--color-text-muted);
}

.stat-trend--warn { color: var(--status-pending-fg); }

/* Trend sub-caption icon — smaller than the 18px base .icon (mockup .stat-trend i is a compact glyph). */
.stat-trend .icon { width: 14px; height: 14px; }

.stat-card .stat-info {
    flex: 1;
    min-width: 0;
}

/* label 13px/500 = mockup live-measured 2026-07-19 (owner-flagged: "counters are not the same"; the
   shipped .8rem/400 label painted visibly lighter). The 3.3em reserve is a two-line visual floor shared by
   every stat card; pages whose labels wrap further carry their own measured reserve (payments, 2026-08-28). */
.stat-card .stat-info .label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.65;
    min-block-size: 3.3em;
    color: var(--color-text-muted);
    margin-block-end: var(--kp-space-xs);
    /* A label breaks INSIDE a word rather than running out of its own box (2026-09-02, narrow-screen
       pass). Measured on the dashboard at 360px in English: "Active Subscribers" overflowed its 70px box
       by 5px, because the ordinary break opportunity is the space between the words and the longer word
       alone is wider than the lane a phone leaves it. The card's own box already holds the lane open
       (`min-width: 0` on .stat-info above); this decides what a word too long for it does, and wrapping
       keeps every letter readable where a cut would not. */
    overflow-wrap: anywhere;
}

/* Weight 800 remains per the v3 reference (U6, ledger 15 #137). Owner ruling D22 (2026-08-28)
   stepped the family SIZE from the mockup's 28px to 24px (1.5rem at the flat 16px admin root);
   the -0.01em tracking below is unchanged. */
.stat-card .stat-info .value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em; /* mockup .stat-details .value, style.css:1052 (measured -0.28px live @28px) */
}

/* The RTL kill in base.css:127 (html[dir="rtl"] :not([dir="ltr"]) { letter-spacing:0 !important; })
   zeroes the .value tracking in Arabic, and the digit-holding bdi[dir="ltr"] wrapper (house LTR-digit
   law) inherits that zero — so re-apply the mockup's -0.01em on the exempt bdi so Arabic pages match
   too; the .value rule above serves LTR/English. (mockup style.css:1052) */
.stat-card .stat-info .value bdi[dir="ltr"] { letter-spacing: -0.01em; }

/* ---- Stat-card delta line (mockup .stat-info .change, style.css:1028-1044; Task 9 dashboard KPI cards) --
   the "+N <range>" line under the value. Only the "up" (informational-positive) variant is ported: every
   Task 9 KPI is a plain count delta, never a problem indicator, so the mockup's .down/.exception coloring
   has no current consumer here. */
.stat-card .stat-info .change {
    /* block-level flex (NOT inline-flex): a full-width strip must not ride a text line box -- our Alexandria is
       a single variable font whose vertical metrics differ from the mockup's cut, so its 16px strut hangs 6.4px
       below the inline-flex box in our build (mockup: only 0.6px), inflating the KPI tile to 129.8px vs the
       mockup's 125.4px. display:flex drops the line box entirely -> font-metrics-proof. margin 4px -> 6px matches
       the mockup .stat-info .change margin-top (mockup style.css:1066-1070). Lead measurement 2026-07-23. */
    display: flex;
    align-items: center;
    gap: var(--kp-space-xs);
    margin-block-start: 6px;
    font-size: .75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.stat-card .stat-info .change.up { color: var(--status-success-fg); }

/* The delta glyph inside the 12px change strip carries an EXPLICIT tiny size: dropped into the strip it
   would otherwise inherit the 18px base .icon and visually double the line (mockup fa-xs renders ~7×9 on
   the 12px strip; ritual check 12; 15 #96 F5). */
.stat-card .stat-info .change .icon { inline-size: 9px; block-size: 9px; }

/* The EXCEPTION strip's glyph is bigger than the 9px trend arrow: 14px, per the v3 reference
   (U6, ledger 15 #137 — `postOfficeAdmin-2/css/deployed-reference.css:5673-5676`
   `.stat-info .change.exception i[data-lucide] { width:14px; height:14px }`). Colour is inherited from the
   coral .change.exception rule above — no new colour is introduced here.
   Selector shape: the reference's `i[data-lucide]` form is a KNOWN-DEAD selector on our side (and on the
   rendered mockup) because lucide.createIcons() REPLACES the <i> with an <svg> at runtime — the same
   replacement trap already documented at Admin/site.css:2973-2977 and :3074-3078. The tag-agnostic
   direct-child pair matches both the server-rendered <i> and the hydrated <svg>, and its (0,4,1)
   specificity beats the (0,4,0) of the 9px `.change .icon` rule above (the hydrated svg keeps the
   <i>'s `icon` class: lucide merges the source element's classes into the new svg). */
.stat-card .stat-info .change.exception > i,
.stat-card .stat-info .change.exception > svg { inline-size: 14px; block-size: 14px; }

/* ---- Stat-card responsive shrink (mockup style.css:3291-3436, <=991.98/767.98/575.98px) — without these,
   .stat-info's flex min-width:0 lets the trend line overflow .stat-card's overflow:hidden once the un-shrunk
   padding/icon/value footprint outgrows narrow viewports (owner-reported clip, 2026-07-18). The family now starts
   at 24px under D22; the explicit middle-band rule keeps that floor visible, while the Admin's Arabic row step
   remains 22px in site.css. D22 (2026-08-28) stepped the base tile to 44px, so the narrow step keeps the mockup's −6px ladder at 38px — a narrow step must never exceed the base. */
@media (max-width: 1399.98px) {
    .stat-card .stat-info .value { font-size: 24px; }
}

@media (max-width: 767.98px) {
    .stat-card { padding: 16px; }
    .stat-card .stat-info .value { font-size: 22px; }
    .stat-card .stat-icon { width: 38px; height: 38px; }
}

@media (max-width: 575.98px) {
    .stat-card .stat-info .value { font-size: 20px; }
}

/* ---- Filter bar ---- */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;               /* mockup live-measured 2026-07-19 (was 16px) */
    margin-block-end: 20px;  /* mockup live-measured 2026-07-19 (was 24px) */

    /* ONE HEIGHT FOR EVERY CONTROL ON THIS BAR -- derived, not chosen: the field family's own box below, one
       line of the interface type plus 10px of block padding and a 1px border on each side (see the rule that
       applies it, after the date field). */
    --filter-bar-control-h: calc(var(--text-ui) * var(--leading-ui) + 2 * 10px + 2 * 1px);
}

/* ---- Filter bar: in-field search box + native select (mockup style.css:1672-1733; owner amendment B2
   2026-07-19 — SHARED component: the mockup defines these in its GLOBAL section and the Admin Users P4
   pass reuses the same always-visible bar next). Logical-property conversions: the mockup's physical
   `right:14px` search icon and its `[dir=ltr]` select-padding/chevron flip become inset-inline-end +
   single logical padding so the field mirrors correctly in both ar (RTL) and en (LTR). Every mockup
   var/hex maps to a design-system token (R7): --radius-sm(8px)→--kp-radius-md, --input-border→
   --color-input-border, --card-bg→--color-bg-surface, --text-muted→--color-text-muted, --focus-ring→
   0 0 0 3px var(--color-focus-ring), --select-chevron is our own token. ---- */
.filter-bar .search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.filter-bar .search-box input {
    width: 100%;
    padding-block: 10px;
    padding-inline: 16px 44px;                 /* reserve the inline-end for the magnifier icon */
    border: 1px solid var(--color-input-border);
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: var(--text-ui);
    line-height: var(--leading-ui);
    background: var(--color-bg-surface);
    color: var(--color-text);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.filter-bar .search-box input:focus {
    outline: none;
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
    background: var(--color-bg-surface);
}

.filter-bar .search-box input::placeholder { color: var(--color-text-muted); }

.filter-bar .search-box .search-icon {
    position: absolute;
    inset-inline-end: 14px;                    /* mockup physical right:14px -> logical (flips in LTR) */
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.filter-bar .search-box .search-icon .icon { width: 16px; height: 16px; }

.filter-bar select {
    padding-block: 10px;
    padding-inline: 16px 36px;                 /* reserve the inline-end for the chevron */
    border: 1px solid var(--color-input-border);
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: var(--text-ui);
    line-height: var(--leading-ui);
    background-color: var(--color-bg-surface);
    color: var(--color-text);
    appearance: none;
    -webkit-appearance: none;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: left 12px center;      /* RTL default: chevron on the inline-end (left) */
    background-size: 16px 16px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

html[dir="ltr"] .filter-bar select { background-position: right 12px center; }

.filter-bar select:focus {
    outline: none;
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Date filters join the same field family as the bar's selects (owner-reported 2026-07-21: the
   E6 subscriptions bars shipped bare UA-styled date inputs next to pill selects). No chevron
   reservation — the native calendar indicator lives inside the control. */
.filter-bar input[type="date"] {
    padding-block: 10px;
    padding-inline: 16px;
    border: 1px solid var(--color-input-border);
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: var(--text-ui);
    line-height: var(--leading-ui);
    background: var(--color-bg-surface);
    color: var(--color-text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.filter-bar input[type="date"]:focus {
    outline: none;
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* ONE HEIGHT FOR EVERY CONTROL ON THIS BAR (2026-09-28; the rule the page action bar already follows: one bar
   declares ONE height). The bar is a centred wrapping flex row, and each control computed its own box from its
   own type ramp: measured at 1440 in both languages on 2026-09-26, the Announcements bar rendered its Add at
   40.3px beside its selects and search box at 42.3px, the Admin Users bar added a 41.44px Export, and the
   Branches bar 38px view toggles as well -- up to four heights on one line.
   The number is the field family's own box above: 10px of block padding and a 1px border on each side around
   one line of --text-ui on --leading-ui, 20 + 2 + 20.3 = 42.3px, the tallest box control the bar holds. The
   reference's filter bar states one control height of its own, the 42px minimum it gives its date field; the
   house type ramp draws that same line at 42.3px. It is applied as a MINIMUM, so no control is squashed and the
   shorter ones are lifted to meet it. The view toggle and the standalone page search take it too, in the admin
   sheet beside their own rules. Scoped to the bar on purpose: the same classes render in drawers, dialogs and
   the page action bar, whose own families decide their height. Not bar controls, and so not lifted: the
   include-inactive check (a checkbox and its label, which the bar centres), the plans toolbar's segmented tab
   strip (a different component, the one the action bar leaves out too) and the clear button inside a box. */
.filter-bar .search-box input,
.filter-bar select,
.filter-bar input[type="date"],
.filter-bar .btn-add,
.filter-bar .btn-export,
.filter-bar .btn-reset,
.filter-bar .btn-secondary {
    min-block-size: var(--filter-bar-control-h);
}

/* In-card filter bar (owner call 2026-07-21, E6 stacked subscriptions screen): when two listings
   stack on one page, a filter row floating on the page background reads as belonging to neither
   card — each card owns its filters instead. The bar trades its page margin for the card's own
   padding rhythm (.table-header 16px/20px) plus a separating rule. */
.filter-bar--in-card {
    padding: 16px 20px;
    margin-block-end: 0;
    border-block-end: 1px solid var(--color-border);
}

/* Labeled date-range group: unlike the bar's selects (whose first option names them), a bare native
   date input shows only the browser's format hint — the muted label says WHICH date it filters. */
/* wrap + a pinned flex sizing (2026-07-25): the validation message the engine injects after the "to"
   input is a FLEX ITEM of this group, so it used to sit BESIDE the input and shove the next control
   in the bar sideways — measured on the subscriptions bar, the export button jumped 111.3px (owner
   report, "too many places"). The message is given a line of its own below (rule underneath), which
   needs wrap; wrap and shrink are then declared UNCONDITIONALLY, because both change how wide this
   group computes, and letting either differ between the valid and flagged states resized the group
   the instant it flagged and slid the export button with it. Same sizing inputs in both states =
   same width in both states. */
.filter-date-group {
    display: flex;
    flex-wrap: wrap;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--kp-space-xs);
}

/* A full line of its own, the same shape .input-group .field-error-msg uses for the plan modal's
   unit-suffixed input. inline-size:0 + min-inline-size:100% is load-bearing, not tidying: a flex
   item's own width AND its automatic minimum both feed the group's intrinsic width, so with
   flex-basis alone the message TEXT decided how wide the group was and threw the export button
   280.8px sideways. A percentage min-size is ignored while the browser measures intrinsic width but
   honoured at layout, so the message widens nothing and still spans its line. */
.filter-date-group .field-error-msg {
    flex-basis: 100%;
    inline-size: 0;
    min-inline-size: 100%;
}

.filter-date-label {
    color: var(--color-text-muted);
    font-size: var(--text-ui);
    line-height: var(--leading-ui);
    white-space: nowrap;
}

/* ---- Data table ---- */
/* Owner ruling 2026-09-01, supersedes-in-part 15 #137: every admin grid owns its sideways overflow.
   Checked columns stay rendered at every viewport width; this wrapper scrolls instead of asking JS to
   hide a column. max-inline-size keeps the scrolling box inside its parent, while the page-level body
   overflow guard prevents a table's intrinsic width from becoming document overflow. */
.table-scroll {
    max-inline-size: 100%;
    overflow-x: auto;
    scrollbar-width: auto;
    scrollbar-color: var(--kp-slate-500) var(--kp-slate-100);
    /* THE SCROLLER IS THE CONTAINING BLOCK FOR WHAT IT HOLDS (2026-09-02, narrow-screen pass). An
       overflow container can only clip a descendant whose containing block is itself or something inside
       it; an absolutely positioned helper with nothing positioned above it resolves against the document
       instead and simply escapes. Measured on the Subscribers grid at 360px in both languages: the
       screen-reader labels inside the box-number buttons rendered at x=583 and dragged the whole page
       224px sideways, which in Arabic opened the canvas shifted with the menu button off screen. This one
       declaration answers it for every helper any grid ever puts inside a scroller. A control that must
       ESCAPE the scroller keeps doing it the way the row menu already does -- position: fixed. */
    position: relative;
    /* NO SCROLL PADDING ON THE GRID SCROLLER (2026-09-24). At phone widths a keyboard focus could park a control
       under the frozen Actions band or the frozen identity column (20 sort-clearing controls measured at 390
       and 360px in both languages on two grids, none of their nine sample points visible), because a browser's
       focus scroll counts a sticky column as visible scroller area. A scroll padding here, each side as wide as
       its measured band, was the first answer and was withdrawn the same day: a control INSIDE a band always lies
       in the padding strip, so a Tab, a scrollIntoView or the phone row menu's Escape onto one slid the grid
       toward that band's side until the range stopped it (measured in both languages: -219 to 0 on Admin Users
       at 1280, -150 to -325 on the Lookups options grid at 390, while with the padding at 0 nothing moved), and
       the browser's focus scroll still left a control that only partly overlapped the free area under a band.
       The Admin's shared script lands a keyboard focus between the bands itself, from the band widths it measures
       and writes onto this element as --kp-frozen-band-start/-end, and never moves a control inside a band; no
       rule in this sheet reads those two properties.
       BOUNDS of that landing, stated in full where it lives in the script: a control wider than the free width
       between the two bands lands by its inline-start edge; where the two bands together are as wide as the
       scroller no control between them can be shown at all -- the identity column plus the Actions band at 390
       on Branches and Branch Users, 320px and 548px beside 73px in a 356px scroller, the case ruling 15 #265
       answers by unfreezing the identity column below 768px. The portal writes neither property and runs no such
       landing. */
}

/* ---- The floating sideways scrollbar (owner request, 2026-09-01) ----------------------------------
   A grid's own horizontal scrollbar lives at the BOTTOM of the grid. On a tall table that edge is below
   the fold, so the only way to slide the columns was to scroll the whole page to the end of the grid,
   move the bar, and scroll back up to read the rows -- which is where the reader was looking the whole
   time. This is a proxy for that bar, pinned to the bottom of the window while the grid it speaks for is
   on screen and its own bar is not.
   It is a real scroll container, not a drawn control: an empty spacer inside it is sized so that its own
   scroll range equals the grid's, and the page script mirrors the two positions. That is what makes the
   thumb's size and travel match the grid's without any of it being computed as pixels.
   The element is built by the shared script and never appears in a view, so no page carries markup for
   it. It mirrors a region that is already focusable and already announced, so it is hidden from the
   accessibility tree; keyboard users keep reaching the columns through the grid's own tab stop.
   It sits above page content but BELOW the row menu (1000) and the sidebar (1040), so neither an open
   menu nor the rail is ever covered by it.
   OWNER RULING 2026-09-02: it floats over page content rather than sitting inside a card, so on top of the
   shared border it carries one upward shadow -- --shadow-dock, the only token in the layer that casts
   UPWARD. A downward-cast shadow under a bar docked to the window's bottom edge would paint into the frame
   and be seen by nobody, hence its own token rather than a reused one. */
.grid-scroll-proxy {
    position: fixed;
    inset-block-end: 0;
    inset-inline-start: var(--kp-sidebar-w);
    inset-inline-end: 0;
    z-index: 900;
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--color-bg-surface);
    border-block-start: 1px solid var(--color-border);
    box-shadow: var(--shadow-dock);
    scrollbar-width: auto;
    scrollbar-color: var(--kp-slate-500) var(--kp-slate-100);
}

.grid-scroll-proxy.is-visible { display: block; }

/* The spacer carries width and nothing else: one pixel of height keeps the container's own height at the
   scrollbar's, so the bar is the whole control rather than a strip with a bar in it. */
.grid-scroll-proxy-spacer { block-size: 1px; }

/* Column-chooser clip release: the .col-chooser dropdown sits in .table-header
   inside .table-wrapper (overflow:hidden for the rounded card corners), which clipped the open menu
   (owner-reported 2026-07-23). site.js toggles this class on the wrapper while the chooser is open — and,
   for a chooser that has no wrapper around it, on the .card-custom shell instead (that class and its own
   release rule live in the admin site.css, where the shell is defined). */
.table-wrapper.tw-dropdown-open {
    overflow: visible;
}

.table-custom {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Head band + row metrics = ONE light band on EVERY admin grid. History: corrected 2026-07-23 (lead
   cross-page census, ledger 15 #96) from the 2026-07-19 heavy band (12.5px/700 #f3f6fa/#526176) that
   matched only branches.html and mis-styled every grid for four days — it then survived as a
   .branches-table page-scoped override in the admin site.css. RESIZED and that last override RETIRED
   2026-08-02 (mockup-v3 restyle wave U1, owner ruling D6 "one light band everywhere", ledger 15 #137):
   the v3 reference header (deployed-reference.css:1365-1379) is 11.5px / 600 / uppercase / 0.04em LTR
   tracking / 11×16 padding and declares NO line-height, so it inherits that reference's body 1.65
   (deployed-reference.css:154-162, 14px/1.65) — we pin 1.65 here explicitly rather than depend on
   inheritance, because these cells sit inside the admin's own cascade. Unchanged and already at the v3
   target: the colors (token retarget, tokens.css --color-table-head-bg/-text = slate-50 / slate-600),
   td 13×16 with 14px text, and the mobile 10×12 tighten at 767.98px. */
.table-custom thead th {
    background: var(--color-table-head-bg);
    color: var(--color-table-head-text);
    font-weight: 600;
    line-height: 1.65;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0;
    text-align: start;
    padding: 11px 16px;
    border-bottom: 1px solid var(--color-table-head-border);
    white-space: nowrap;
}

/* Latin grids get the reference's LTR-only header tracking — 0.04em since 2026-08-02
   (deployed-reference.css:1371; was the v2 0.055em, ledger 15 #137). RTL keeps 0 via the base.css RTL
   letter-spacing kill: the wave's Arabic-tracking adjudication is deliberately LTR-only, because the
   house law never letter-spaces Arabic. */
[dir="ltr"] .table-custom thead th {
    letter-spacing: 0.04em;
}

.table-custom tbody td {
    padding: 13px 16px;
    font-size: var(--text-ui);
    line-height: 1.5;
    color: var(--color-text);
    text-align: start;
    border-bottom: 1px solid var(--color-table-row-border);
    vertical-align: middle;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* AN EMPTY GRID'S MESSAGE CELL IS A CELL FIRST (2026-09-03). `.empty-state` declares the muted ink, the
   centred text and the roomy xl padding that a no-results row is supposed to read with -- but it is a
   ONE-CLASS selector and the cell rule directly above it carries a class plus two elements, so the cell won
   every property they both name. Measured on a running host: the message painted rgb(15,23,42) in 13px 16px
   of padding, i.e. an ordinary data cell wearing the family's name. Only `text-align` had ever been repaired,
   in the admin sheet, one property at a time.
   So the whole family is re-declared HERE, at cell specificity, next to the rule it has to beat: ONE rule
   owns the empty cell for every admin grid and a new grid inherits it without a page override. The figure
   modifier keeps its own geometry on the line below -- it hands the cell's padding to the inner figure block
   (48/20) and must not stack a second box around it -- and the phone tier keeps the family's own compaction,
   because a responsive family is ported with EVERY tier it declares, never with its base values alone. */
.table-custom tbody td.empty-state {
    padding: var(--kp-space-xl);
    color: var(--color-text-muted);
    text-align: center;
}

.table-custom tbody td.empty-state--figure { padding: 0; }

/* audit columns (Created Date / Created By / Modified By) read quieter */
.table-custom .col-audit {
    color: var(--color-text-muted);
    font-size: .78rem;
}

/* ---- Contact cell (mockup style.css:5073-5085) — phone/email row with a leading muted icon; the
   number/address itself keeps wrapping in .tracking-code (dir=ltr) where the view needs it ---- */
.contact-cell {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    color: var(--color-text-muted);
}

/* ---- Last-login cell (mockup style.css:5086-5088) — a shared home so any future grid column reads with
   normal text weight/color instead of the muted .col-audit treatment (Task 3, admin-users composition).
   Scoped under .table-custom (like the existing .table-custom .col-audit rule) so it actually outranks
   the plain .table-custom tbody td default -- a bare .last-login selector loses that specificity fight and
   silently keeps the ambient 14px. ---- */
.table-custom .last-login {
    color: var(--color-text);
    font-size: .8125rem;
}

/* Table zebra + sticky header + brand hover tint (mockup style.css:1367-1404). NOTE: position:sticky here
   is confined to the nearest ancestor scroll container, which per the DOM is the shared .table-scroll
   (overflow-x:auto -- computes overflow-y:auto too per the CSS overflow spec) inside .table-wrapper
   (overflow:hidden). Neither container has a bounded height, so neither ever scrolls independently -- the
   page itself scrolls. Verified live (see the internal task notes): the header does NOT stick to the viewport when
   scrolling past a tall grid; it scrolls away with the rest of the table. The rule is kept (harmless,
   future-proof if a bounded-height/overflow-y:auto grid variant is ever added) but is NOT currently
   delivering sticky behavior -- flagged here rather than silently shipped as if it worked. */
.table-custom tbody tr:nth-child(even) td { background: var(--color-table-row-even); }
.table-custom tbody tr:hover td { background: var(--color-table-row-hover); }
/* 2026-08-31 family-rule prevention: negating a page selector cannot un-write the shared hover;
   inert rows neutralize that state at the family layer. */
.table-custom tbody tr.table-row--inert { cursor: default; }
.table-custom tbody tr.table-row--inert:hover td { background: var(--color-bg-surface); }
.table-custom tbody tr.table-row--inert:nth-child(even):hover td { background: var(--color-table-row-even); }
.table-custom tbody tr:focus-within td { background: var(--color-table-row-focus); }
.table-custom thead th { position: sticky; inset-block-start: 0; padding-inline: 16px; }
.table-custom tbody td { padding-inline: 16px; }

/* A CELL CONTAINS WHAT IT HOLDS (2026-09-01, owner screenshot of the Branch Users grid with the audit
   columns ticked on: branch chips painted straight across three rows' created dates, and the created-by
   name read as a cut word). The mechanism is the fixed-layout table's own: a column is sized from its
   declared band and never from its contents, so a cell whose content is wider simply overflows -- and the
   fixed-layout algorithm names `overflow` as the property that decides what happens to it. Nothing
   declared one, so the initial `visible` let one column's content land on the next column's text, where
   the neighbour's opaque zebra background then covered part of it. The visible result was a value that
   looked truncated in a column that was not short.
   The clip is a containment guarantee, not a width policy: a column too narrow for its content is still a
   column to widen, and every band this family declares is derived from the content it must hold. What this
   rule removes is the failure MODE -- a cut that appears in the wrong column and reads as the wrong
   defect. It clips at the cell's padding box, so a control's focus ring (drawn a few pixels outside a
   button that sits inside 16px of cell padding) is untouched, and a row menu that escapes the grid does so
   by leaving the flow entirely rather than by overflowing its cell. */
.table-custom tbody td { overflow: hidden; }

/* Mobile head/cell padding (mockup style.css:3362-3364 inside @media max-width:767.98px). Ported at the
   same breakpoint so the grid tightens on phones exactly as the mockup does (15 #96 F1). */
@media (max-width: 767.98px) {
    .table-custom thead th,
    .table-custom tbody td { padding: 10px 12px; }
    /* The empty cell's own rule above outranks the line above it on every tier, so the phone tier has to
       name it too or the family's compaction would stop applying to exactly one cell -- and it names the
       FIGURE cell out, because this line is later in the sheet and the same specificity as the figure
       modifier's own `padding: 0`, so without the exclusion it beat it below 768px and stacked the 20px
       box the family's comment above says the figure must not have (measured at 360px, 2026-09-04). The
       modifier stays the ONE owner of the figure cell's padding, on every tier. */
    .table-custom tbody td.empty-state:not(.empty-state--figure) { padding: 10px 12px; }
}

/* ---- Shared frozen Actions column + recorded sticky identity edge -------------------------------
   Owner ruling 2026-09-01, supersedes-in-part 15 #137: the last Actions/Details column stays frozen at
   the logical inline end while checked columns scroll beneath it. `table-custom--sticky-actions` freezes
   only that trailing control column. The recorded `table-custom--sticky-edges` adopters retain their
   identity column at inline start as well; new grids do not gain a second frozen column by accident.
   Backgrounds and every row shade live here so a page does not have to make sticky cells opaque itself.
   A chooser-hidden <col> is collapsed to zero below so fixed-layout tables leave no blank band. ---- */
.table-custom--sticky-edges thead th:first-child,
.table-custom--sticky-edges tbody td:first-child:not(.empty-state) {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    background: var(--color-bg-surface);
    border-inline-end: 1px solid var(--color-table-sticky-edge-soft);
}

.table-custom--sticky-actions thead th:last-child,
.table-custom--sticky-actions tbody td:last-child:not(.empty-state),
.table-custom--sticky-edges thead th:last-child,
.table-custom--sticky-edges tbody td:last-child:not(.empty-state) {
    position: sticky;
    inset-inline-end: 0;
    z-index: 2;
    background: var(--color-bg-surface);
    border-inline-start: 1px solid var(--color-table-sticky-edge-soft);
}

/* sticky HEADER cells keep the head band color (the surface-white masks above are for body cells;
   a white header corner over the #f3f6fa band was a visible seam — live-measured fix 2026-07-19) */
.table-custom--sticky-edges thead th:first-child,
.table-custom--sticky-actions thead th:last-child,
.table-custom--sticky-edges thead th:last-child {
    background: var(--color-table-head-bg);
}

/* header corners ride above the body sticky cells */
.table-custom--sticky-edges thead th:first-child,
.table-custom--sticky-actions thead th:last-child,
.table-custom--sticky-edges thead th:last-child { z-index: 4; }

/* Logical separators flip automatically, and they are unconditional: a frozen column is a column boundary
   whether or not anything is hidden behind it. */
.table-custom--sticky-edges thead th:first-child {
    border-inline-end-color: var(--color-table-sticky-edge);
}
.table-custom--sticky-actions thead th:last-child,
.table-custom--sticky-edges thead th:last-child {
    border-inline-start-color: var(--color-table-sticky-edge);
}

/* THE ELEVATION IS CONDITIONAL, and each side answers only for itself (2026-09-01, N-P35CV-3). A lifted
   frozen edge is an affordance: it says content continues underneath. Painted from static CSS it said so
   everywhere -- measured on a grid whose scroller had ZERO overflow, on the start edge at rest with nothing
   hidden behind it, and on the end edge at maximum scroll with nothing left to reach. The scroller carries
   `is-overflow-start` / `is-overflow-end` from the shared script's own measurement of each side's hidden
   width (site.js syncStickyEdges, the same reading the scroll cue already trusted), so a shadow paints only
   while that side really has something under it, and mid-scroll both do. With no script the separators above
   still draw the boundary; only the lift is lost, which is the safe way round.
   Shadows have no logical offsets, so the physical-flip idiom is retained per side: header edges use the
   stronger sticky-edge token, body edges the soft one. */
.table-scroll.is-overflow-start .table-custom--sticky-edges thead th:first-child {
    box-shadow: -8px 0 8px -8px var(--color-table-sticky-edge);
}
html[dir="ltr"] .table-scroll.is-overflow-start .table-custom--sticky-edges thead th:first-child {
    box-shadow: 8px 0 8px -8px var(--color-table-sticky-edge);
}
.table-scroll.is-overflow-start .table-custom--sticky-edges tbody td:first-child:not(.empty-state) {
    box-shadow: -8px 0 8px -8px var(--color-table-sticky-edge-soft);
}
html[dir="ltr"] .table-scroll.is-overflow-start .table-custom--sticky-edges tbody td:first-child:not(.empty-state) {
    box-shadow: 8px 0 8px -8px var(--color-table-sticky-edge-soft);
}

.table-scroll.is-overflow-end .table-custom--sticky-actions thead th:last-child,
.table-scroll.is-overflow-end .table-custom--sticky-edges thead th:last-child {
    box-shadow: 8px 0 8px -8px var(--color-table-sticky-edge);
}
html[dir="ltr"] .table-scroll.is-overflow-end .table-custom--sticky-actions thead th:last-child,
html[dir="ltr"] .table-scroll.is-overflow-end .table-custom--sticky-edges thead th:last-child {
    box-shadow: -8px 0 8px -8px var(--color-table-sticky-edge);
}
.table-scroll.is-overflow-end .table-custom--sticky-actions tbody td:last-child:not(.empty-state),
.table-scroll.is-overflow-end .table-custom--sticky-edges tbody td:last-child:not(.empty-state) {
    box-shadow: 8px 0 8px -8px var(--color-table-sticky-edge-soft);
}
html[dir="ltr"] .table-scroll.is-overflow-end .table-custom--sticky-actions tbody td:last-child:not(.empty-state),
html[dir="ltr"] .table-scroll.is-overflow-end .table-custom--sticky-edges tbody td:last-child:not(.empty-state) {
    box-shadow: -8px 0 8px -8px var(--color-table-sticky-edge-soft);
}

/* Sticky cells paint the same zebra, hover, inert and keyboard-focus shades as their scrolling siblings. */
.table-custom--sticky-actions tbody tr:nth-child(even) td:last-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:nth-child(even) td:first-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:nth-child(even) td:last-child:not(.empty-state) {
    background: var(--color-table-row-even);
}

.table-custom--sticky-actions tbody tr:hover td:last-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:hover td:first-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:hover td:last-child:not(.empty-state) {
    background: var(--color-table-row-hover);
}

.table-custom--sticky-actions tbody tr.table-row--inert:hover td:last-child:not(.empty-state),
.table-custom--sticky-edges tbody tr.table-row--inert:hover td:first-child:not(.empty-state),
.table-custom--sticky-edges tbody tr.table-row--inert:hover td:last-child:not(.empty-state) {
    background: var(--color-bg-surface);
}

.table-custom--sticky-actions tbody tr.table-row--inert:nth-child(even):hover td:last-child:not(.empty-state),
.table-custom--sticky-edges tbody tr.table-row--inert:nth-child(even):hover td:first-child:not(.empty-state),
.table-custom--sticky-edges tbody tr.table-row--inert:nth-child(even):hover td:last-child:not(.empty-state) {
    background: var(--color-table-row-even);
}

.table-custom--sticky-actions tbody tr:focus-within td:last-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:focus-within td:first-child:not(.empty-state),
.table-custom--sticky-edges tbody tr:focus-within td:last-child:not(.empty-state) {
    background: var(--color-table-row-focus);
}

/* an open kebab menu in the last (sticky) column floats above sibling rows */
.table-custom--sticky-actions tbody tr.row-dropdown-open td:last-child,
.table-custom--sticky-edges tbody tr.row-dropdown-open td:last-child { z-index: 1051; }

/* collapse a chooser-hidden colgroup <col>'s reserved band under table-layout:fixed. Scoped to the
   modifier so its specificity (0,2,1) outranks the per-page .branch-col-* width rule (0,2,0). */
.table-custom--sticky-actions col.col-hidden,
.table-custom--sticky-edges col.col-hidden { width: 0; }

/* THE FROZEN CONTROL BAND IS MINIMIZED BELOW THE DESKTOP TIER -- NEVER UNFROZEN (owner ruling 2026-09-02,
   15 #184e: keep it frozen, minimize its width and the spacing inside it). On a phone every pixel this
   band holds is a pixel of row identity the reader cannot see, so it gives back its SPACING: the cell's
   own inline padding halves from the family's 16px to 8px, and the controls inside sit 2px apart instead
   of 4px. What does NOT move: the targets themselves (.row-actions .btn-action keeps its 36px minimum,
   the WCAG 2.5.5 touch floor the design reference pins), the freeze, its logical inset, the z-index
   tiers, the directional edge shadow, and the opaque row-state paint -- all unchanged at every width.
   The selectors carry both frozen variants and out-specify the family's own 767.98px cell padding, so
   the order these two tiers are written in cannot decide which one paints. 2px is a literal because the
   token scale's smallest step is 4px, exactly as the sibling padding rules here are literals. */
@media (max-width: 991.98px) {
    .table-custom--sticky-actions thead th:last-child,
    .table-custom--sticky-actions tbody td:last-child:not(.empty-state),
    .table-custom--sticky-edges thead th:last-child,
    .table-custom--sticky-edges tbody td:last-child:not(.empty-state) {
        padding-inline: 8px;
    }

    .table-custom--sticky-actions tbody td:last-child:not(.empty-state) .row-actions,
    .table-custom--sticky-edges tbody td:last-child:not(.empty-state) .row-actions {
        gap: 2px;
    }
}

/* ---- Row actions (primary action + kebab overflow) ---- */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
}

.row-actions .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 36px;    /* WCAG 2.5.5 touch-target floor (mockup style.css:10428-10437); 34px width is the min-clamped up to 36px */
    min-height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--kp-radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.row-actions .btn-action:hover {
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
}

/* A row action that declares itself DESTRUCTIVE hovers in the alert wash instead of the navy one (design
   sweep 2026-08-30, N-Q1-7). The rule above paints a navy tint, so the P.O. Box reject icon lit up in the
   colour this page uses for NEUTRAL actions the moment a pointer touched it — the one moment the reader
   most needs to be told what a control does. One family rule, so every grid's destructive row action
   inherits it — and since 2026-09-02 it is the ONLY one: the Settings sections grid used to mark its
   delete control with a page-local `--danger` modifier whose hover rule was less specific than the navy
   rule above and therefore never painted at all. That grid now carries `text-danger` like every other, and
   the dead modifier is retired.
   BACKGROUND ONLY, and deliberately: the ink needs no declaration here and could not take one. Bootstrap's
   `.text-danger` sets `color: rgba(var(--bs-danger-rgb), …) !important`, and tokens.css points
   `--bs-danger-rgb` at the official 200 16 46 — so the resting red already survives the navy `color` in the
   rule above, and a `color` written here would be a declaration that never applies. */
.row-actions .btn-action.text-danger:hover {
    background: var(--status-alert-bg);
}

/* Disabled row action (browser evidence G-3, 2026-08-27): the UA gives a disabled button
   pointer-events:none, so it rendered as full-strength ink with a pointer cursor and its own title
   tooltip was unreachable — a control that says nothing when it does nothing. The visible-disabled
   posture lives here so EVERY grid's row actions get it (the no-silent-blocking law); the localized
   REASON is hosted on the .row-action-disabled wrapper span around the button, which the mouse CAN
   hover. */
.row-actions .btn-action:disabled,
.row-action-disabled .btn-row-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* And the hover rule above must stand down for it (design sweep 2026-08-30). Keeping the disabled button
   hit-testable is what lets its not-allowed cursor paint at all -- and it is also what lets the ENABLED
   hover rule reach it, so a disabled reorder arrow took the navy tint and the action ink under the
   pointer while its cursor said the opposite. `:disabled:hover` outranks the plain `:hover` above, so the
   rest paint wins wherever the pointer goes. Family-wide on purpose: every grid's row actions share these
   two rules. */
.row-actions .btn-action:disabled:hover {
    background: transparent;
    color: var(--color-text-muted);
}

.row-action-disabled {
    display: inline-flex;
    cursor: not-allowed;
}

/* A row action whose reason has to live somewhere the pointer can reach carries this wrapper in EVERY
   state, not only while the control is off (2026-09-03): the state is toggled in place with the modifier
   above, and a wrapper that came and went would change how many controls the row-menu funnel counts in
   the same cell -- a row whose only controls are wrapped would lose its menu the moment they were
   enabled. Layout only: the not-allowed cursor and the halved ink belong to the modifier. */
.row-action-wrap {
    display: inline-flex;
}

/* Inside a kebab's own menu the wrapper stands between the list item and a control that is meant to fill
   the menu's width, so it takes that width itself rather than shrinking to its content (2026-09-03).
   Measured at 1280 on the branches grid before this rule: the two wrapped items came out 97.22px and
   114.84px wide against 170.00px for every unwrapped sibling in a 180px menu, and in Arabic they also
   started 68px in from them -- the button's own `width: 100%` was resolving against the shrink-to-fit
   wrapper instead of the menu. The open phone panel names the same wrapper at a higher weight inside its
   own tier, so the flat list is unaffected. */
.dropdown-menu .row-action-wrap {
    display: block;
    inline-size: 100%;
}

/* ---- The phone row menu (owner ruling 2026-09-02, 15 #184f) --------------------------------------------
   Below the desktop tier every multi-control actions cell shows ONE trigger; the row's own .row-actions
   element becomes the menu. NOTHING IS CLONED: the buttons the server rendered -- each already wrapped in
   its own permission gate and carrying its own RowVersion token and data-action -- are the menu items, so
   every handler, gate and token stays exactly where it was. One mechanism, two renderings.
   The trigger is injected by the shared render funnel, so a grid added later carries the menu the day it
   ships rather than waiting for an attribute somebody has to remember.

   PLACEMENT: this block is declared after the whole row-actions family above, and every selector below
   out-specifies the base rule it overrides, so it cannot be beaten by a later declaration of equal weight
   (a media query adds no specificity -- a tier that loses on source order is dead text).

   Z-ORDER, measured in the served cascade rather than assumed: the frozen cell is `position: sticky` with
   a z-index, which makes it a stacking context, so the panel is painted inside it and the CELL is what has
   to rise. It rises to 1051 -- the same tier the open kebab's own row already uses -- while the panel
   itself takes 1000, the tier the docked sideways bar's comment names for a row menu (that bar is 900).
   The dialog library's container is 1060 (its vendored stylesheet, `div:where(.swal2-container)`), so a
   confirm or an error dialog always stands over an open menu. ---- */
.row-menu-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    inline-size: 40px;
    block-size: 40px;
    border: none;
    border-radius: var(--kp-radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

/* An explicit box for the glyph: an unsized <svg> takes the UA's 300x150 replaced-element box, and a size
   inherited from the base rule is a size nobody stated. */
.row-menu-trigger .icon { inline-size: 18px; block-size: 18px; }

.row-menu-trigger:hover,
.row-menu-trigger[aria-expanded="true"] {
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
}

/* THE TWO HALVES OF THE 992 PAIR MEET EXACTLY (owner ruling 15 #1179, 2026-11-10). At a window a hair under 992px
   wide (991.99, reachable by zoom) the browser answers yes to BOTH width tests below. While the wide half stood
   after the narrow one it won that tie on source order and hid the trigger the narrow half had just shown, and the
   narrow half had already hidden the inline buttons: measured on the Branches grid at a 991.99px document, 0
   triggers and 0 inline buttons, an empty Actions column. The wide half now stands FIRST, so in the tie the narrow
   half is the later rule and the row keeps its menu: the same reading as 991px, and 992px is unchanged. */
@media (min-width: 992px) {
    .row-menu-trigger { display: none; }
}

@media (max-width: 991.98px) {
    .row-menu-trigger { display: inline-flex; }

    /* The row's controls leave the cell; they come back as the panel below when the trigger opens it. */
    .has-row-menu .row-actions { display: none; }

    .has-row-menu .row-actions.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        /* THE PANEL'S PLACE IS MEASURED AT OPEN TIME, from the trigger it belongs to, and arrives as these
           two properties on the element's own style. They are DECLARED here, at their opening-corner
           defaults, for two reasons: a `var()` on a property nothing declares is the guaranteed-invalid
           value, which drops the whole declaration silently and would leave the panel wherever `fixed`
           happens to place it; and a declared default is what a reader of this rule needs in order to know
           what the runtime is overriding. */
        --row-menu-top: var(--kp-space-md);
        --row-menu-inline-end: var(--kp-space-md);
        /* THE PANEL'S REACH: how far it may grow from the edge it is anchored to before it runs off the
           logical start of the screen. MEASURED 2026-09-03 with the cap written as `100vw` less two
           gutters: a panel wide enough to reach it rested at x = -23.00 at 576px and 360px in English and
           16px past the logical start in Arabic, off screen and unreachable, while the page body itself
           never overflowed so nothing showed the reader anything was missing. Two faults in one
           declaration -- `100vw` INCLUDES a classic vertical scrollbar while the inset above resolves
           against the initial containing block, which excludes it; and the cap ignored the inset
           altogether, so a panel anchored 40px in from the edge was still allowed the whole viewport. The
           default is a percentage, which for a fixed-position element resolves against that same initial
           containing block; the runtime narrows it to the true reach once the trigger has been measured. */
        --row-menu-inline-reach: 100%;
        inset-block-start: var(--row-menu-top);
        inset-inline-end: var(--row-menu-inline-end);
        min-inline-size: 200px;
        max-inline-size: calc(var(--row-menu-inline-reach) - var(--kp-space-md));
        max-block-size: calc(100vh - 2 * var(--kp-space-md));
        overflow: auto;
        padding: var(--kp-space-xs);
        background: var(--color-bg-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--kp-radius-md);
        box-shadow: var(--shadow-float);
        z-index: 1000;
    }

    /* The frozen cell is the panel's stacking context, so it is the cell that rises -- to the same tier
       the open kebab's own row already uses. Driven by the panel's own state class rather than by a second
       class the script would have to remember to write, so the lift holds only while the panel is open. */
    .table-custom--sticky-actions tbody td:last-child:has(> .row-actions.is-open),
    .table-custom--sticky-edges tbody td:last-child:has(> .row-actions.is-open) { z-index: 1051; }

    /* Every item: a full-width row of icon + label, 44px tall (the touch floor with room for text) -- and
       ONE type family, because a menu is one component and has to read as one.
       MEASURED 2026-09-03 at 360px in both languages, before the four type declarations below existed: one
       open panel rendered its nine items in three inks (navy, slate-600, slate-900), two sizes (13px and
       14px), two icon boxes (14px and 18px) and two label starts 3px apart -- each item was still wearing
       the type scale of the button family it came from, because this rule declared geometry alone. The ink
       start follows from the icon box: the items are a flex row whose gap is declared here, so a label
       begins exactly where its icon ends. */
    .has-row-menu .row-actions.is-open .btn-action,
    .has-row-menu .row-actions.is-open .btn-row-primary,
    .has-row-menu .row-actions.is-open .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--kp-space-sm);
        inline-size: 100%;
        min-block-size: 44px;
        padding-inline: var(--kp-space-sm);
        text-align: start;
        white-space: nowrap;
        /* The item owns its own cut. A label longer than the panel used to run straight out of the item's
           box with nothing to show for it -- measured 2026-09-03 at 360px, 550px of content through a
           318px box in English and 427 through 318 in Arabic. Containment here plus the ellipsis on each
           family's own label carrier below turns an invisible loss into a visible one: this rule covers
           all three families, so both label rules below do too -- the pseudo-element for the family whose
           label is its tooltip, and the text child for the two that render a real one. */
        overflow: hidden;
        font-size: var(--text-body);
        font-weight: 400;
        color: var(--color-text);
    }

    .has-row-menu .row-actions.is-open .btn-action .icon,
    .has-row-menu .row-actions.is-open .btn-row-primary .icon,
    .has-row-menu .row-actions.is-open .dropdown-item .icon {
        inline-size: 18px;
        block-size: 18px;
    }

    /* AN ITEM UNDER THE POINTER SAYS SO, in the ink the same control uses at desktop width. MEASURED
       2026-09-03: the family rule above carries four class weights, which out-ranks the hover rules BOTH
       source families own (three weights each), so inside an open panel only the wash changed while the
       ink stayed the body colour -- a menu that said less under the pointer than the control run it
       replaces. The keyboard state is declared beside it, because arrowing down the list is the other way
       an item becomes the one the reader is on.
       THE DISABLED STATE IS EXCLUDED IN THE SELECTOR rather than left to source order. MEASURED 2026-09-03
       in this engine: a `disabled` button receives no pointer events at all, so `:hover` never reaches one
       and no rule here can light it up today -- which is exactly why the exclusion is written down instead
       of assumed. The day a control is disabled by attribute instead of by property, or the day the engine
       changes its mind, the selector already says what was meant, and it says it without depending on
       where any other rule happens to sit. */
    .has-row-menu .row-actions.is-open .btn-action:hover:not(:disabled),
    .has-row-menu .row-actions.is-open .btn-action:focus-visible:not(:disabled),
    .has-row-menu .row-actions.is-open .btn-row-primary:hover:not(:disabled),
    .has-row-menu .row-actions.is-open .btn-row-primary:focus-visible:not(:disabled),
    .has-row-menu .row-actions.is-open .dropdown-item:hover:not(:disabled),
    .has-row-menu .row-actions.is-open .dropdown-item:focus-visible:not(:disabled) {
        background: var(--status-scheduled-bg);
        color: var(--color-action-primary);
    }

    /* A destructive item hovers in the alert wash it hovers in everywhere else (the family ruling of
       2026-08-30): the rule above would otherwise paint it the neutral navy tint at the one moment the
       reader most needs to be told what the control does. Ink needs no declaration here -- the framework
       utility that paints it is marked important in the vendored stylesheet. The same disabled exclusion,
       for the same reason: one shipped item is both destructive and disabled (a protected role's delete). */
    .has-row-menu .row-actions.is-open .btn-action.text-danger:hover:not(:disabled),
    .has-row-menu .row-actions.is-open .btn-action.text-danger:focus-visible:not(:disabled),
    .has-row-menu .row-actions.is-open .dropdown-item.text-danger:hover:not(:disabled),
    .has-row-menu .row-actions.is-open .dropdown-item.text-danger:focus-visible:not(:disabled) {
        background: var(--status-alert-bg);
    }

    /* The two items that deliberately DO NOT take the family ink. A destructive one keeps the alert red on
       its own: the framework utility that paints it is marked important in the vendored stylesheet, so it
       outranks the rule above without anything being written here. A disabled one has to say so, and it
       says it the way the rest of the admin does -- the muted ink beside the halved opacity the row-action
       family already gives it. It declares the INK only: the resting background of every item here is
       already nothing, and the hover rules above exclude this state in their own selectors, so a wash
       written here would be a declaration that never applies. */
    .has-row-menu .row-actions.is-open .btn-action:disabled,
    .has-row-menu .row-actions.is-open .btn-row-primary:disabled,
    .has-row-menu .row-actions.is-open .dropdown-item:disabled {
        color: var(--color-text-muted);
    }

    /* The label is the button's own tooltip text -- no second copy of the string anywhere, so a menu item
       can never disagree with the tooltip the same control shows at desktop width. */
    .has-row-menu .row-actions.is-open .btn-action[title]::after { content: attr(title); }
    .has-row-menu .row-actions.is-open .btn-action:not([title])[aria-label]::after { content: attr(aria-label); }

    /* And a label longer than the panel ends in an ellipsis instead of simply stopping. The item declares
       `nowrap`, so the text cannot wrap; the zero minimum is what lets this pseudo-element shrink below its
       own content inside the item's flex row at all. Where the label came from the control's `title`, the
       whole of it is still the tooltip the pointer opens. */
    .has-row-menu .row-actions.is-open .btn-action::after {
        overflow: hidden;
        text-overflow: ellipsis;
        min-inline-size: 0;
    }

    /* AND THE SAME FOR THE TWO FAMILIES THAT RENDER A REAL LABEL (2026-09-03). The containment above is
       declared on all three item families; the ellipsis was declared only for the one whose label is drawn
       from its own tooltip through a pseudo-element. The other two put their label in a text child, so
       they inherited the containment with nothing to soften it -- a hard cut, which is the very loss the
       containment was added to make visible. The property cannot be declared on the item itself in either
       case: the item is a flex row, and text-overflow acts only on the box that holds the text. */
    .has-row-menu .row-actions.is-open .btn-row-primary > span,
    .has-row-menu .row-actions.is-open .dropdown-item > span {
        overflow: hidden;
        text-overflow: ellipsis;
        min-inline-size: 0;
    }

    /* An item working: the shared icon-only loading modifier centres its ring on the BUTTON, which is right
       for a 34px square row action and wrong for the row an item becomes here -- measured 2026-09-03, the
       ring landed in the middle of the item, over the label, while the icon's hidden box sat at the leading
       edge. Since pressing an item now keeps the panel open until its action lands, that ring is what the
       reader watches, so it goes where the icon it replaces was: the icon starts at the item's inline
       padding and is 18px wide, so a 16px ring centred in it starts one pixel further in. */
    .has-row-menu .row-actions.is-open .btn-loading--icon::before {
        inset-inline-start: var(--kp-space-sm);
        margin-inline-start: 1px;
    }

    /* A control keeps its reason-bearing wrapper here; as a flex item the wrapper is blockified in any
       case, and `flex` says so while leaving the button inside its own centring. Both the always-present
       wrapper and the disabled modifier are named, because a wrapper is rendered in both states and only
       one of them carries the modifier. */
    .has-row-menu .row-actions.is-open .row-action-disabled,
    .has-row-menu .row-actions.is-open .row-action-wrap { display: flex; }

    /* A row that also carries a kebab overflow: its items join the flat list, its own toggle hides. */
    .has-row-menu .row-actions.is-open .kebab-menu > .btn-action { display: none; }
    .has-row-menu .row-actions.is-open .kebab-menu .dropdown-menu {
        display: block;
        position: static;
        inset: auto;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        min-inline-size: 0;
    }
}

/* ---- Row primary action button (mockup style.css:5464-5493) — one labeled primary action, pairing with
   the existing .row-actions .btn-action kebab overflow trigger above ---- */
.btn-row-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    padding-block: 7px;
    padding-inline: 14px;
    min-block-size: 36px;
    border: 1px solid var(--kp-navy-100);   /* mockup rgb(230,240,254), blind-review live-measured */
    border-radius: var(--kp-radius-md);
    color: var(--color-action-primary);
    background: var(--kp-navy-050);         /* mockup pale-blue fill rgb(241,246,255) (was white) */
    font-size: 13px;                        /* mockup 13/600 (was 14/400) */
    font-weight: 600;
    /* Row-primary labels stay on one line so the shared control keeps its compact height. */
    white-space: nowrap;
    text-decoration: none;
}

.btn-row-primary:hover { background: var(--status-scheduled-bg); }

.btn-row-primary .icon { width: 14px; height: 14px; }

/* Positive row workflow action: the shipment status advance keeps the row-primary geometry while its
   intent uses the shared success palette. */
.btn-row-primary.is-success {
    color: var(--status-success-fg);
    border-color: var(--status-success-fg);
    background: var(--status-success-bg);
}

.btn-row-primary.is-success:hover {
    color: var(--kp-white);
    border-color: var(--status-success-fg);
    background: var(--status-success-fg);
}

/* Compact two-line table identity used by the shipment cell beside the shared 38px icon. */
.cell-primary {
    color: var(--color-text);
    font-family: inherit;
    font-size: .84375rem;
    font-weight: 600;
    /* Identity values (item numbers) stay on one line so the two-line cell keeps its compact height. */
    white-space: nowrap;
    line-height: 1.3;
    text-decoration: none;
}

button.cell-primary {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: start;
}

button.cell-primary:hover { color: var(--color-action-primary); text-decoration: underline; }

.cell-sub {
    color: var(--color-text-muted);
    font-size: .71875rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Danger-tinted variant (Roles assigned-users manager, 2026-07-17 restyle owner order): the same labeled
   row-action box, tinted for a destructive action (Remove) -- reuses the alert tokens the destructive
   row-action hover above already pairs, rather than introducing a new color pair. (Until 2026-09-02 this
   comment cited a page-local `--danger` modifier in the admin stylesheet; that modifier was retired when
   it turned out never to have painted, so the citation now names the family rule that does.) */
.btn-row-primary.text-danger {
    border-color: var(--status-alert-fg);
}

.btn-row-primary.text-danger:hover {
    background: var(--status-alert-bg);
}

/* ---- Permission fraction bar (mockup .permissions-summary .bar, style.css:7019-7045) ---- */
.permission-bar {
    display: inline-block;
    inline-size: 90px;
    block-size: 6px;
    border-radius: var(--kp-radius-full);
    background: var(--color-border);
    overflow: hidden;
}

.permission-bar > span {
    display: block;
    block-size: 100%;
    background: linear-gradient(90deg, var(--color-action-primary), var(--kp-violet-600));
    inline-size: var(--permission-bar-fill, 0%);
}

/* Fill-percentage steps (10% granularity) — the mockup sets the fill with an inline style="width:NN%"
   (a per-row, continuously-variable value); Core Rule 3 bans inline styles, so the granted/total ratio is
   rounded to the nearest step server-side (Roles/_RolesTable.cshtml) and the matching class applied instead. */
.permission-bar-fill-0   { --permission-bar-fill: 0%; }
.permission-bar-fill-10  { --permission-bar-fill: 10%; }
.permission-bar-fill-20  { --permission-bar-fill: 20%; }
.permission-bar-fill-30  { --permission-bar-fill: 30%; }
.permission-bar-fill-40  { --permission-bar-fill: 40%; }
.permission-bar-fill-50  { --permission-bar-fill: 50%; }
.permission-bar-fill-60  { --permission-bar-fill: 60%; }
.permission-bar-fill-70  { --permission-bar-fill: 70%; }
.permission-bar-fill-80  { --permission-bar-fill: 80%; }
.permission-bar-fill-90  { --permission-bar-fill: 90%; }
.permission-bar-fill-100 { --permission-bar-fill: 100%; }

/* ---- Permission-fraction row layout (mockup .permissions-summary, style.css:7019-7025) — inline-flex
   text + mini-bar, reusing the same muted-row-with-emphasis pattern as .contact-cell ---- */
.permission-fraction {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-xs);
    color: var(--color-text-muted);
    font-size: .8125rem;
}

.permission-fraction strong {
    color: var(--color-text);
    font-weight: 700;
}

/* ---- Skeleton shimmer loader ---- */
@keyframes kp-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-canvas) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    animation: kp-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--kp-radius-sm);
}

.skeleton-text {
    height: 14px;
    width: 80%;
    margin-block-end: var(--kp-space-sm);
}

@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
}

/* ---- Form controls (42px height + focus ring) ---- */
.form-label {
    display: inline-block;
    margin-block-end: var(--kp-space-xs);
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-control,
.form-select {
    width: 100%;
    height: 42px;
    padding: 9px 13px;
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--text-ui);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

/* A TEXTAREA is a multi-row field (browser evidence G-5, 2026-08-27): the shared 42px INPUT height above
   squashed a rows=2 textarea to one visible line. height:auto restores the rows attribute; the floor
   keeps two rows visible at rest — 2 x 21px line + 2 x 9px padding + 2 x 1px border = 62px. */
textarea.form-control {
    height: auto;
    min-height: 62px;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Native select: token chevron anchored to the inline-end (RTL is the base culture; LTR mirrors) */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-inline-end: 38px;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px 16px;
    cursor: pointer;
}

/* A disabled native select must not invite a click (design sweep round 2, 2026-08-28); the
   no-silent-blocking law's declared business-lock exceptions remain unchanged. */
.form-select:disabled {
    cursor: not-allowed;
}

html[dir="ltr"] .form-select {
    background-position: right 12px center;
}

/* ---- Per-field invalid state (inline-field-validation standard, 2026-07-20) ----
   ADMIN-hued by design although this RCL is shared: only the admin renders Bootstrap
   .form-control/.form-select (portal fields are .ref-field children and never match these
   selectors — their red mirror lives beside the .is-valid block below). A future portal
   Bootstrap form must re-scope before reusing .is-invalid or it silently picks up the admin red.
   Brand red (--status-alert-fg -> --kp-red-600 #c8102e) must WIN over Bootstrap's #dc3545:
   equal specificity, and this file loads after bootstrap css in the admin layout — later wins.
   Bootstrap neutralization: kill its injected warning icon + widened padding (they collide with
   the dir="ltr" numeric/email input islands inside the RTL layout); .form-select keeps ONLY the
   token chevron layer — image/position/size re-asserted at two-class specificity because
   Bootstrap's .form-select.is-invalid rule outranks the single-class base above. */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--status-alert-fg);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--status-alert-fg);
    box-shadow: var(--focus-ring-danger);
}

.form-control.is-invalid {
    background-image: none;
    padding-inline: 13px;
}

/* Bootstrap qualifies its invalid TEXTAREA padding as textarea.form-control.is-invalid
   (element + 2 classes) — one level above the plain rule — so the padding restore must match
   that qualification or the widened icon padding survives (T1 review finding, 2026-07-20). */
textarea.form-control.is-invalid {
    padding-inline: 13px;
}

/* Bootstrap's invalid-select padding/background rule is .form-select.is-invalid
   :not([multiple]):not([size]) (specificity 0,0,4,0 — bootstrap.css:2935): a plain two-class
   re-assert LOSES to it (proven in the T1 review: 66px dead gap + a 16x12 squished chevron).
   Mirror Bootstrap's exact qualifiers so the tie breaks to this later-loaded file. Multi/size
   selects keep Bootstrap's base look — they never carried the icon padding to begin with. */
.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"] {
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px 16px;
    padding-inline-end: 38px;
}

html[dir="ltr"] .form-select.is-invalid:not([multiple]):not([size]),
html[dir="ltr"] .form-select.is-invalid:not([multiple])[size="1"] {
    background-position: right 12px center;
}

/* Under-field validation message — generated by the JS engine as a <span> styled display:block
   (a <div> inside the portal's <label class="ref-field"> would be invalid HTML). Never carries a
   dir attribute: it inherits the FORM's direction, so messages under dir="ltr" input islands
   still align with the page. One class for both apps; the portal recolors it via the .ref-field
   scope beside the portal invalid mirror. */
.field-error-msg {
    display: block;
    margin-block-start: 6px;
    color: var(--status-alert-fg);
    font-size: var(--text-small);
    line-height: 1.4;
}

/* Inside a Bootstrap input-group (input + unit suffix, e.g. the plans discount %), the engine still
   inserts the message right after the input — force it onto its own full-width line instead of the
   middle of the flex row (input-group wraps by default). */
.input-group .field-error-msg {
    flex-basis: 100%;
}

/* ---- Shared branded focus ring (DESIGN.md :focus-visible) ---- */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-action:focus-visible,
.branch-tab:focus-visible,
.pager-btn:focus-visible,
.count-pill:focus-visible,
.chip--toggle:focus-visible {
    outline: 2px solid var(--color-action-primary);
    outline-offset: 2px;
}

/* ---- Shared branded focus ring, portal flavor (fix wave 2026-07-18, ledger rows
   24/134) -- same pattern as the admin block above (outline 2px solid + 2px offset) but keyed on
   --color-portal-action instead of the admin's --color-action-primary: these are deliberately separate
   tokens (tokens.css, the "ADMIN TOKENS UNTOUCHED" note sitting above --color-portal-action), so either
   side can be recolored without dragging the other with it.
   COMMENT CORRECTED 2026-08-02 (mockup-v3 restyle wave doc sweep, ledger 15 #137): this used to name the
   two tokens as "(#0033a0)" vs "(#115ee8)" and close on "reusing the admin selector list verbatim would
   have painted the portal ring the wrong blue". Both resolve to the SAME #0033a0 today --
   --color-action-primary is var(--kp-navy-600) = #0033a0 (tokens.css:96) and --color-portal-action is
   var(--kp-postal-navy-600) = #0033a0 -- so the two names no longer paint different blues, and the split
   now rests on that deliberate token separation alone, not on a color difference. Mirrors mockup
   theme-parity.css:65 (:where(button,a,input,select,textarea):focus-visible), which is why the tag
   list below names input and select at all.
   ONE CLAIM IN THIS PARAGRAPH WAS FALSE AND IS CORRECTED (fix package E, 2026-08-12). It said
   ".ref-field input/select are included even though they already carry their own gold :focus ring
   ... outline paints outside the box and layers over box-shadow/border without conflict". They are
   NOT included: `.ref-field input, .ref-field select { outline: 0 }` weighs (0,1,1) -- one class plus one
   TYPE, not the (0,2,0) this line claimed until A8 (arithmetic corrected 2026-08-12) -- and this rule
   weighs (0,1,0), so the field's own rest declaration still wins and a focused field paints NO outline --
   measured with a real keyboard-promoted focus on /Auth/Login (`outline: 0px none`, box-shadow
   `rgba(203,160,82,.133) 0 0 0 3px`).
   THAT OUTCOME IS PARITY, WHICH IS WHY ONLY THE SENTENCE CHANGES: the rendered reference's own login
   field measures the SAME PAIR on the same probe -- `outline: 0px none` with the identical gold
   `0 0 0 3px rgba(203,160,82,.133)` glow. The reference dresses a focused field with the gold ring
   and no outline, and so do we. The one place that needed fixing is the /Payments/History type
   filter, a shipped extra with no reference counterpart sitting on a SIGNED-IN page where every
   neighbour shows the 2px navy ring; its own rule is beside the field family below. */
/* REPLACED THE 25-SELECTOR ENUMERATION 2026-08-11 (parity fix wave, P1.6c). The comment above already
   named the reference's rule as this block's source -- `:where(button,a,input,select,textarea)
   :focus-visible` -- and then reproduced it as a hand-kept list, so every control shipped after each
   sweep started life without a ring of its own: the whole smart-assistant widget, the entire plan sheet,
   every Subscribe/Checkout and mailbox control, the greeting plan pill and the ticket Manage link were all
   left to whatever the page-wide default was -- which, as the paragraph further down records, was the
   global 1px slate `!important` ring rather than the browser's own. (This line said "all had only the
   browser default", which its own block contradicted twelve lines later; A2, corrected 2026-08-12.)
   The reference's own rule is ONE line covering every control it names, which is what makes a control
   shipped tomorrow correct without anyone remembering.
   ONE KNOWN EXCEPTION, and it is a consequence of the deliberate (0,1,0) weight rather than of the rule
   (A5, recorded 2026-08-12 -- this sentence used to promise it "covers everything, including whatever
   ships next"): a LATER single-class rule in this same file ties and wins on source order.
   `.svc-box-input { outline: 0 }` is exactly that, so the subscribe page's box-number input takes no
   focus-visible ring today. Recorded here rather than patched, because giving that control its ring is a
   visual decision on a shipped surface, not a comment fix.
   TWO MECHANICS, both deliberate (port the mechanism, not just the values):
     * `.kp-portal` scope, because this stylesheet is SHARED with the admin, whose focus indicator is its
       own. That class is on both portal layouts' <body> and on no admin markup.
     * BOTH halves wrapped in `:where()`, so the whole selector still weighs (0,1,0) exactly like the
       reference's. A component that wants a different ring -- the status tabs take their own status
       colour -- then wins with an ordinary class selector instead of needing !important.
   IT PAINTS SINCE 2026-08-11 (owner ruling 15 #157, "same as the mockup"). The paragraph that used to
   sit here reported this ring as INERT and explained why: the global
   `:focus-visible { outline: 1px solid var(--color-text) !important }` further down this file, whose
   width came from owner order 2026-07-20, beat any non-important rule regardless of specificity -- so
   every portal control showed a 1px slate ring, measured live that morning on a focused rail link
   (`rgb(15,23,42) solid 1px / offset 3px`). Resolving it meant re-opening a dated owner order, which only
   the owner may do, so it was flagged instead.
   The owner answered by SPLITTING the two apps rather than reversing anything: the portal takes the
   design reference's ring, the admin keeps the 2026-07-20 order, which was given against the admin's own
   mockup. The global rule is now written `body:not(.kp-portal) :focus-visible` (see its own comment), so
   this rule finally wins on the portal and the admin's ring is untouched. Verified by computed probe on
   both apps, both languages. */
/* [role] MEMBERS ADDED 2026-08-11 (parity fix wave P2.3): the list above is the reference's own, and it
   is a TAG list -- so the dashboard ticket card, which that wave made keyboard-reachable as an
   <article role="link" tabindex="0">, matched none of it and took the browser's default 1px outline
   instead. Caught by a real Tab press, not by reading the rule. The reference's card has the same shape
   and the same gap; covering it is a deliberate improvement on the reference rather than a divergence
   from it, and it keeps the promise this block already makes -- that a control shipped tomorrow gets a
   ring without anyone remembering to add it. Still inside :where(), so the whole selector still weighs
   (0,1,0) and a component's own ring still wins with an ordinary class. */
:where(body.kp-portal) :where(button, a, input, select, textarea, [role="button"], [role="link"]):focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: 2px;
}
/* The status tabs are the one portal control the reference gives a DIFFERENT ring: it takes the tab's
   own status colour at the reference's own ring alphas (parity fix wave 2026-08-11, P1.5). An ordinary
   class selector is enough to beat the zero-specificity rule above. */
.dc-status-tab:focus-visible {
    outline: 2px solid var(--kp-ship-tone-ring);
    outline-offset: 2px;
}

/* ---- Tracking code / IDs ---- */
.tracking-code {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
    white-space: nowrap;
}

/* A Kuwait stamp ("2026-09-03 08:30") and a slot range ("08:30 - 09:00") are ONE bounded value each, and a
   table cell breaks on their spaces and their hyphen: measured on the Payments grid 2026-08-27, the narrower
   Arabic column orphaned the time onto a second line. The rule was written page-scoped there, so the next
   grid copied the markup and got no rule at all -- family-wide since 2026-09-03, beside the tracking-code
   family it belongs with. */
.table-custom .stamp {
    white-space: nowrap;
}

/* ---- Duotone icons — the FILL family (Phosphor duotone, adopted with portal mockup v2 in restyle
   package P1, 2026-08-08). The base .icon rule is written for the STROKE family (fill:none;
   stroke:currentColor), which paints a duotone symbol as an empty outline, so every duotone usage
   pairs .icon with this modifier. Both paths inherit currentColor; the backing path carries its own
   opacity:.2 inside the sprite, which is what makes the two tones.
   .icon--filled is the SINGLE-tone member of the same switch, added 2026-08-12 with the vendored
   Bootstrap-Icons qr-code artwork (fix package C): identical mechanism, but the symbol carries one
   path and no .2 tint, so calling it "duotone" in the markup would be a claim the artwork does not
   support. Same declarations on purpose — the switch is about fill-vs-stroke, not about tone. ---- */
.icon--duotone,
.icon--filled {
    fill: currentColor;
    stroke: none;
}

/* ---- Directional icons — mirror under RTL (never logos/numerals) ---- */
.icon--directional {
    display: inline-block;
}

html[dir="rtl"] .icon--directional {
    transform: scaleX(-1);
}

/* ---- RTL flip helper (mirrors physical transforms under RTL; default
   assumes RTL since Arabic is the app default — see AGENTS.md Localization) ---- */
html[dir="rtl"] { --kp-rtl-flip: 1; }
html[dir="ltr"] { --kp-rtl-flip: -1; }

/* ============================================================
   Admin shell (mockup sections 5+7, ported 2026-07-12)
   ============================================================ */
.kp-shell {
    min-height: 100vh;
    background: var(--color-bg-canvas);
}

.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--kp-sidebar-w);
    display: flex;
    flex-direction: column;
    background: var(--color-bg-surface);
    border-inline-end: 1px solid var(--color-border);
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    block-size: auto;
    padding-block: 20px;
    padding-inline: 5px;
    border-block-end: 1px solid var(--color-border);
    transition: opacity .2s ease;
}
.sidebar-brand:hover { opacity: .85; }
/* THE LOGO FILLS ITS BAND SO ITS WORDS READ (owner rulings 15 #1152, #1163, #1164, #1165, 2026-11-07; #1163 supersedes
   the 72px of #1161). The band keeps 5px of side space (the padding above) and the one-piece vector logo is as large as
   that space allows: 252 x 85px inside the 253px content box. Both values depart from the admin mockup's 48px logo and
   24px side padding by the owner's word (Core Rule 13). The sizes are whole pixels so the vector's edges stay sharp,
   and the band grows from 89px to 126px (85 + 20 + 20 + its 1px rule), so the menu starts 37px lower. */
.sidebar-brand img {
    block-size: 85px;
    inline-size: 252px;
}

.sidebar-brand-name {
    /* Mockup renders the brand as the logo ONLY, centered (branches.html .sidebar-brand — no wordmark).
       Rule 13: mockup wins. The span stays in markup so the .sidebar-brand aria-label keeps its
       accessible name; it is hidden visually (P4 shell parity item 1). */
    display: none;
    font-family: var(--font-display);
    font-size: var(--text-subheading);
    font-weight: 700;
    letter-spacing: var(--tracking-display);
    color: var(--kp-navy-700);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-block: var(--kp-space-md); /* mockup .sidebar-nav padding:16px 0 (style.css:446) — P4 shell parity item 9 */
    /* The rail scrolls whenever the viewport is shorter than the nav list, and until 2026-09-02 it did so
       with the operating system's untouched default bar -- reserved width, arrow buttons, platform grey --
       on the one surface in the shell that nothing else paints by default. Standard properties only, the
       same reason the grid bars carry no vendor rules: an element declaring these ignores every
       ::-webkit-scrollbar* rule written for it, so the two ways of styling a scrollbar do not add up.
       Deliberately THIN, unlike the grid's bar: that one is the control a reader drives columns with and
       was ruled obvious; this one only reports how far a nav list runs.
       THE THUMB IS THE GRID FAMILY'S, re-ruled 2026-09-02 after the first value shipped here was measured
       on the live rail. The design reference paints scrollbars with the slate-300 primitive, and this rail
       is white: that pairing measures 1.48:1, short of the 3:1 non-text contrast floor a control owes its
       reader, while slate-500 on the same white reads 4.76:1 -- the very floor that had just moved the grid
       bar onto it. The reference losing to the contrast floor is the recorded outcome for this palette, not
       a fresh judgement: its muted-text value was rejected on the same grounds. So width follows the
       reference and colour follows the floor. The track stays transparent, unlike the grid bar's painted
       groove -- that bar is a control to be FOUND, this one lets the rail's own surface show through. */
    scrollbar-width: thin;
    scrollbar-color: var(--kp-slate-500) transparent;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-block: 2px;
    margin-inline: 12px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px; /* mockup .nav-link gap:12px (style.css:465) — P4 shell parity item 7 */
    padding: 10px var(--kp-space-md); /* block 10px = mockup live-measured 2026-07-19 (was 8px) */
    min-height: 40px; /* mockup style.css:467 --sidebar-nav-item-height = 40px (P2 Task 9 defect fix) */
    box-sizing: border-box;
    color: var(--color-text-muted);
    border-radius: var(--kp-radius-md); /* mockup --radius-sm = 8px == our --kp-radius-md (P2 Task 9 defect fix) */
    font-size: var(--text-ui);
    /* NO line-height declaration, deliberately (parity round 2, package B, 2026-08-12). This row used to
       carry `var(--leading-ui)` (1.45), which painted 20.3px against the rendered v3 mockup's 23.1px on
       every top-level row and 19.575px against its 22.275px on every group child — measured at 1440 in
       both languages. The mockup does not declare a leading on its rail rows at all: they inherit the
       body's 1.65, and so do ours now (the admin body pins that literal in Admin/site.css, adjudication 7,
       ledger 15 #137). The shared --leading-ui token is untouched — it is correct for the buttons and
       chips that read it, and the rail was the only surface where it was the wrong number.
       WHY THE DECLARATION IS REMOVED RATHER THAN SET TO 1.65: writing the literal here would be a second
       copy of a number the body already owns, and the first attempt at this fix taught the lesson —
       deleting the LABEL SPAN's own 1.45 changed nothing, because this row rule kept feeding it back. */
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

/* Sidebar nav icons — scoped, never the global .icon base. Top-level box = 22px to match the mockup's
   .nav-link i/.lucide width:22px (postOffice_Admin_html css/style.css:483). These are sprite <svg
   class="icon"> elements (not Lucide), so they paint 1:1 with their CSS box — the earlier 20px box
   measured 20px painted, which is why the box IS the painted size (the old "−2px Lucide viewBox shrink"
   note misattributed the sprite to Lucide). Owner side-by-side re-measured the mockup at 22px painted
   (2026-07-23); box 22px → 22px painted, so no over-compensation is needed. Group children override to
   18px below (also 1:1). */
.sidebar-nav .nav-link .icon {
    width: 22px;
    height: 22px;
}

.sidebar-nav .nav-link:hover {
    background: var(--kp-slate-100); /* mockup .nav-link:hover var(--border-light) #f1f5f9 (style.css:491) — P4 shell parity item 13 */
    color: var(--color-text);
    transform: translateX(calc(var(--kp-rtl-flip, 1) * -2px));
}

.sidebar-nav .nav-link.active {
    position: relative;
    color: var(--color-action-primary);
    background: rgba(0, 51, 160, .06); /* mockup style.css:497 .nav-link.active (P2 Task 9 defect fix) */
    /* 700, not 600 (parity round 2, package B, 2026-08-12): the v3 mockup steps its active row a full
       weight above the 500 siblings — measured on the rendered package at 1440, `لوحة التحكم` 14px/700,
       ink 82.02x18, against our 14px/600. The active row is the one row the eye returns to, so the step
       is what makes "you are here" read as emphatic rather than merely tinted.
       WHY THE VALUE MOVED HERE AND NO THIRD RULE WAS ADDED: `[aria-current="page"] { font-weight: 700 }`
       (further down this file) already carries the correct value and already matches this element — it
       simply LOSES the cascade to this selector, which outweighs it by TWO class-level terms, not one:
       `.sidebar-nav .nav-link.active` is (0,3,0) against the attribute selector's (0,1,0) (A9, arithmetic
       corrected 2026-08-12 — the conclusion is unchanged, only the count was wrong). Adding another rule
       would have made three declarations for one number. */
    font-weight: 700;
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-action-primary); /* solid navy pill (mockup .nav-link.active::before style.css:516) — P4 shell parity items 4+5 */
    border-start-end-radius: 3px; /* mockup 3px 0 0 3px — rounded on the content-facing (inline-end) corners; RTL-safe logical radius */
    border-end-end-radius: 3px;
    box-shadow: var(--shadow-nav-active-glow);
}

.nav-group {
    margin-block: 2px;
    margin-inline: 12px;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px; /* mockup .nav-group-toggle gap:12px (style.css:6950) — P4 shell parity item 7 */
    inline-size: 100%;
    padding: var(--kp-space-sm) var(--kp-space-md);
    background: none;
    border: none;
    border-radius: var(--kp-radius-md); /* mockup --radius-sm = 8px == our --kp-radius-md (P2 Task 9 defect fix) */
    color: var(--color-text-muted);
    font-family: inherit;
    font-size: var(--text-ui);
    /* No leading declared, same reason and same measurement as `.sidebar-nav .nav-link` above
       (parity round 2, package B, 2026-08-12): the rail inherits the admin body's 1.65, which is what
       the v3 mockup renders on every rail row. */
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.nav-group-toggle:hover {
    background: var(--kp-slate-50);
    color: var(--color-text);
}

/* Long sidebar labels WRAP instead of being truncated (U5, ledger 15 #137) — this SUPERSEDES the
   2026-07-19 "keep every label on ONE line" port (nowrap + overflow:hidden + text-overflow:ellipsis),
   which the v2 mockup's own rail used. The v3 reference lets its longest Arabic label wrap instead
   (`postOfficeAdmin-2/css/deployed-parity-final.css:243-254` — white-space:normal + line-height 1.45 on
   the label span, under the comment "keep the longest Arabic sidebar label readable at the reference font
   size"). We adopt the MECHANISM generalized rather than the reference's single-href form, so every long
   label — today's and tomorrow's — behaves the same instead of one hard-coded nav entry.
   What survives from the old port: the leading icon + chevron still hold their box (flex-shrink:0) and the
   label span still grows into the free space (flex:1 + min-width:0). What is gone: the clip. A wrapped row
   therefore grows past the 40px min-height — that is the intended trade (readable label over fixed row
   height). The shipped _Sidebar group label is a class-less <span> (no .nav-group-label class exists in the
   markup), so it is still targeted by the direct-child combinator. */
.sidebar-nav .nav-link > .icon,
.sidebar-nav .nav-group-toggle > .icon { flex-shrink: 0; }
.sidebar-nav .nav-link > span,
.sidebar-nav .nav-group-toggle > span {
    flex: 1;
    min-width: 0;
    white-space: normal;
    /* The 1.45 that used to sit here is GONE (parity round 2, package B, 2026-08-12). It arrived with the
       wrap above, copied out of the same reference rule — but the reference scopes 1.45 to the ONE href
       whose label it wants to wrap (`deployed-parity-final.css:248-254`), and gives every other label its
       default 1.65. Ours applied it to all seventeen rows, so every label sat 2.8px short of the target
       (top-level 20.3px against 23.1px, children 19.575px against 22.275px), measured on the rendered v3
       package at 1440 in both languages. Removing the declaration is the fix rather than writing 1.65:
       the body already carries 1.65 (Admin/site.css, adjudication 7, ledger 15 #137) and inheritance is
       what the reference relies on too. Row rhythm is unchanged for single-line rows — `min-height: 40px`
       on the row holds them — so what moves is the text block inside the row, and the one label that
       wraps. See the group-toggle note below for that row's measured consequence.
       DELETING IT HERE WAS NOT ENOUGH ON ITS OWN, and that is worth knowing before anyone "restores" it:
       the two ROW rules above (`.sidebar-nav .nav-link` and `.nav-group-toggle`) also declared it, so the
       span simply inherited 1.45 straight back. Measured after the first cut: still 20.3px. Both row
       declarations were removed in the same change. */
}

/* Group-toggle label at the design scale — the 13px shrink is RETIRED (parity round 2, package B,
   2026-08-12; owner report the same day, "the admin menu arabic font size not all the same font size").
   History, kept because it is the reason the shrink outlived its cause: the 2026-07-19 owner ruling was
   "the group-toggle label must never ellipsise at the 264px rail", and under the old clip mechanism
   (nowrap + text-overflow: ellipsis) the only way to honour it was to SHRINK the label, so a 12.5px
   workaround shipped and U5 (ledger 15 #137) later relaxed it to 13px. U5 also retired the clip itself
   (the `white-space: normal` rule above), and its own note concluded that "shrinking below the design
   scale no longer buys anything" — then kept a shrink anyway. That self-refuting pair is what the owner
   was looking at: three group headers at 13px interleaved with fourteen 14px rows in one vertical list.
   THE RULING STILL HOLDS AND IS PROVEN, not assumed: at 14px the label wraps to a second line — it is
   never clipped and never ellipsised, because nothing on this rail sets `text-overflow` any more.
   THE REFERENCE DOES SOMETHING WE DELIBERATELY DO NOT COPY: measured on the rendered v3 package at 1440,
   its group label is 14px/500/23.1px and `المستخدمون والصلاحيات` stays on ONE line with ink 162.95px,
   overflowing its own ~157px track rather than wrapping. Matching that would mean reversing U5's
   never-truncate wrap, a recorded decision (15 #137) and a layout change; this package is type only. The
   measured consequence is recorded rather than hidden: that one row is 57.69px tall today and grows with
   the size, against the reference's 43.09px. Every other row is unchanged, and the three labels now match
   their siblings and the mockup at 14px. */

/* The .sidebar-nav prefix lifts this to specificity (0,3,0) so the 16px chevron wins over the
   20px .sidebar-nav .nav-link .icon rule above — the toggle button carries the .nav-link class too. */
.sidebar-nav .nav-group-toggle .icon--chevron {
    margin-inline-start: auto;
    width: 16px; /* mockup .nav-group-chevron 16px (style.css:6981) — P4 shell parity item 8 */
    height: 16px;
    transition: transform .2s ease;
}

.nav-group.collapsed .icon--chevron {
    transform: rotate(-90deg);
}

.nav-group-children {
    list-style: none;
    padding-inline-start: 0; /* mockup .nav-group-children padding:0 (style.css:7002) — the child link owns the indent (item 3 / L8 mechanism) */
}

.nav-group-children:empty {
    display: none;
}

.nav-group.collapsed .nav-group-children {
    display: none;
}

/* Group children render as indented sub-items (mockup .nav-group-children* style.css:7013-7025).
   Container margin zeroed so the child link's own 50px padding lands at the mockup indent — P4
   shell parity item 3. The .icon 16px overrides the 20px sidebar-nav icon rule above (same
   specificity, later in source). */
.nav-group-children .nav-item {
    margin-inline: 0;
}

.nav-group-children .nav-link {
    padding-inline-start: 50px;
    font-size: 13.5px;
    gap: 10px;
}

.nav-group-children .nav-link .icon {
    /* mockup .nav-group-children .nav-link .lucide width 18px (style.css:7024); 15 #96 F12. Sprite <svg>
       icons paint 1:1 with their box, so an 18px box paints 18px — verified equal to the mockup on the
       owner side-by-side (2026-07-23). This 3-class selector matches the same specificity as the top-level
       .sidebar-nav .nav-link .icon rule above but comes LATER in source, so it keeps children at 18px even
       though the parent box is now 22px (no regression). */
    width: 18px;
    height: 18px;
}

.sidebar-footer {
    border-block-start: 1px solid var(--color-border);
    padding: var(--kp-space-md); /* mockup .sidebar-footer padding:16px (style.css:522) — P4 shell parity item 10 */
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    width: 100%;
    padding: var(--kp-space-sm);
    background: var(--kp-logout-bg); /* mockup .btn-logout fill rgba(200,16,46,.06) (style.css:533) — P4 shell parity item 11 */
    color: var(--status-alert-fg);
    border: 1px solid var(--kp-logout-border); /* mockup .btn-logout border rgba(200,16,46,.15) (style.css:535) — item 11 */
    border-radius: var(--kp-radius-md); /* mockup .btn-logout var(--radius-sm)=8px == our --kp-radius-md (style.css:536) — item 12 */
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.btn-logout:hover {
    background: var(--status-alert-fg);
    color: var(--kp-white);
    border-color: var(--status-alert-fg);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgb(15 23 42 / .45);
    z-index: 1035;
    display: none;
}

.topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: var(--kp-space-md);
    block-size: var(--kp-topbar-h);
    padding-inline: var(--kp-space-lg); /* mockup 24px, live-measured 2026-07-19 (was 16px) */
    background: transparent;
    border-block-end: 1px solid transparent;
    transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}

/* The design reference's own tablet tier tightens this bar's inline padding to 16px (its topbar rule
   inside the 767.98px block). Ported 2026-09-02 for the reason it exists: at 360px the title box measured
   50px against a 186px action cluster, and these 16px are the only room on the row that belongs to
   neither. The cluster is already at the reference's narrow shape and tighter than it -- 186px against
   the package's own measured 214px -- so nothing there is re-derived. */
@media (max-width: 767.98px) {
    .topbar {
        padding-inline: var(--kp-space-md);
    }
}

.topbar.scrolled {
    background: var(--glass-strong-bg);
    -webkit-backdrop-filter: var(--glass-strong-blur);
    backdrop-filter: var(--glass-strong-blur);
    border-block-end-color: var(--color-border);
}

.topbar-title {
    font-family: var(--font-display);
    font-size: var(--text-heading-sm);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-display);
    color: var(--kp-navy-700);
    margin: 0;
    flex: 1;
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* PO-20 (owner decision 2026-09-04) and ruling 15 #190g (2026-09-08), AMENDED by the owner on 2026-09-09: at the
   phone tier the page title had collapsed to two or three letters (measured 39-51px of a 313px row at 360px beside
   the toggle, the gaps and the 186px action cluster), and the first cut gave it its own row at every phone width.
   The amended rule is size first, row second: below the desk tier the title takes a smaller size (tablet 15px,
   phone 13px -- the tokens), and the bar wraps into two rows ONLY when the name still does not fit beside the
   toggle and the action cluster. The shell script measures that fit and sets `topbar--stacked` (site.js), so a
   short name keeps the one 64px row and a long one takes the full-width 36px second row (the bar keeps its
   pre-existing 1px transparent bottom border: 64 + 36 + 8 + 1 = 109px). The mockup has no such layout; it is an
   owner-approved post-mockup feature kept under Core Rule 13. Logical properties only; `order` and `flex-basis`
   read the same in both directions. */
@media (max-width: 1199.98px) {
    .topbar .topbar-title { font-size: var(--kp-topbar-title-tablet-size); }
}

@media (max-width: 575.98px) {
    .topbar .topbar-title { font-size: var(--kp-topbar-title-phone-size); }
}

.topbar.topbar--stacked {
    flex-wrap: wrap;
    block-size: auto;
    row-gap: 0;
    padding-block-end: var(--kp-space-sm);
}

/* Scoped to the admin top bar: the launchpad header shares the actions partial but has no title row and keeps
   its own height (branch-end review 2026-09-09).
   Dated 2026-11-10: the launcher page and its header left with owner ruling 15 #904(a); the admin top bar is the
   only bar that stacks, and the scoping stays as written. */
.topbar.topbar--stacked .sidebar-toggle { order: 1; }

.topbar.topbar--stacked .topbar-actions {
    order: 2;
    min-block-size: var(--kp-topbar-h);
}

.topbar.topbar--stacked .topbar-title {
    order: 3;
    flex-basis: 100%;
    min-block-size: var(--kp-topbar-title-row-h);
    line-height: var(--kp-topbar-title-row-h);
}

.topbar-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
}

/* ============================================================
   Topbar action cluster — the v3 "Match the deployed utility cluster exactly" values
   (`postOfficeAdmin-2/css/style.css:10885-10992`).

   HISTORY, so the next reader does not re-import the wrong block: the package carries TWO cluster
   stylings. The earlier "Unified topbar controls" block (style.css:10517-10655) puts every control in one
   44px bordered 12px-radius frame; the LATER block above overrides it declaration for declaration, and
   later-with-equal-specificity is what the browser paints. The 2026-07-18 port took the earlier block, so
   our toggle shipped as a 48x44 rounded square while the package renders a 36x33.8 pill — the owner's own
   screenshot showed the slim pill. Corrected 2026-08-03 on the lead's D1 ruling (Core Rule 13, the
   RENDERED mockup wins): each control now sits on auto height with its own surface, exactly as measured
   on the served package at 1440/1024/360 in both languages. Do not reinstate a shared fixed-height frame.
   Navy-alpha borders/shadows stay inline rgba() literals (the .sidebar-overlay precedent); only hex lives
   in tokens.css.
   ============================================================ */
.topbar-actions {
    gap: var(--kp-space-sm);
}

/* ONE transition list for both controls, so the grouped hover below animates the same four properties on
   each — the base `.lang-toggle` rule omits box-shadow and the base `.user-profile-btn` rule omits color.
   Nothing here sets a size: the toggle is sized by its own text (33.8px painted) and the chip by its 38px
   avatar (50px painted), which is the whole point of the D1 correction above. */
.topbar-actions .lang-toggle,
.topbar-actions .user-profile-btn {
    transition: background-color 160ms var(--ease-smooth-out),
                border-color 160ms var(--ease-smooth-out),
                color 160ms var(--ease-smooth-out),
                box-shadow 160ms var(--ease-smooth-out);
}

/* v3 language chip: the package's measured winners are 6px 14px padding / 12px / 700 / line-height 1.65 /
   tracking .5px on a full-radius 1px-bordered 12%-white pill — and the shared `.lang-toggle` rule further
   down ALREADY paints every one of those except the last two, so only the two deltas live here (the
   pre-D1 version had to restate the surface because the 44px frame was overriding it). The shared rule is
   also the SignIn page's chip (`.auth-lang .lang-toggle`), so it stays the single home of the pill shape.
   Two measured cautions: the package SOURCE says `padding: 6px 14.5px` (style.css:10912) but the deployed
   parity layer loading after it wins with 14px; and its `letter-spacing: normal` loses to the same layer's
   .5px. Both settled on the rendered cascade, not by grep.
   The tracking is effectively Latin-only: the chip is an <a> carrying dir="ltr" (_TopbarActions.cshtml), so
   base.css:127 (`html[dir="rtl"] :not([dir="ltr"])`) would otherwise zero it on an Arabic page — the house
   "never track Arabic" law is satisfied because the label there is the Latin "EN" (P6/U4 exemption). */
.topbar-actions .lang-toggle {
    line-height: 1.65;
    letter-spacing: 0.5px;
}

/* v3 account chip (`style.css:10962-10977`): a FRAMELESS 8px-cornered hit area whose height comes from the
   38px avatar (see .user-avatar below). Only the two deltas from the shared `.user-profile-btn` rule are
   here — that rule already carries `background: none` and the 8px radius (mockup --radius-sm renders 8px ==
   our --kp-radius-md; mapped by VALUE, never by name). Dropping the border to 0 makes the `border-color` in
   the hover rule below inert on this control, exactly as it is on the package: its hover reads as the tint
   plus the shadow. Measured live 2026-08-03 at 1440/1024/360, ar + en. */
.topbar-actions .user-profile-btn {
    padding: 6px 10px;
    border: 0;
}

/* ONE grouped hover rule for every INTERACTIVE cluster control, ported from the mockup's own grouped rule
   (`postOfficeAdmin-2/css/style.css:10574-10582`, still the cascade winner there — verified by reading the
   live styleSheets, not by grep). The branch badge is deliberately absent: it is a static label, not a
   control, and the mockup gives it no hover either. */
.topbar-actions .lang-toggle:hover,
.topbar-actions .notification-btn:hover,
.topbar-actions .user-profile-btn:hover,
.topbar-actions .user-profile-btn[aria-expanded="true"] {
    background: var(--color-shell-soft);
    border-color: rgba(0, 51, 160, 0.24);
    color: var(--color-action-primary);
    box-shadow: 0 4px 12px rgba(0, 51, 160, 0.10);
}

/* ============================================================
   Branch-context badge (mockup v3 `.ac-branch-badge`; markup source `js/access-control.js:199-216`, winning
   geometry `css/style.css:10890-10905`). A read-only statement of the viewer's branch scope — no click, no
   permission wrapper, no verb. PALETTE CLAUSE (Core Rule 13 / 15 #137): the package paints the stale
   pre-rebrand `#115ee8` and a legacy `rgba(30,58,95,…)` shadow tint; both resolve to the official navy here.
   ============================================================ */
.ac-branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--kp-radius-full);
    background: var(--color-action-primary);
    color: var(--kp-white);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(0, 51, 160, 0.14);
}

.ac-branch-badge .icon {
    inline-size: 16px;
    block-size: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* ============================================================
   Notification bell (mockup v3 `.notification-btn` / `.notif-dropdown`; winning geometry
   `css/style.css:10924-10954`, panel `css/style.css:702-821`). The panel is a Bootstrap dropdown here, not
   the mockup's `onclick`-driven `.show` toggle — the zero-inline-handler law (AGENTS.md "Admin Views —
   Strict Rules") — which is also why it reuses the account chip's `data-bs-display="static"` +
   `.dropdown-menu-end` anchoring instead of the mockup's centred panel.
   ============================================================ */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-actions .notification-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 33.5px;
    min-inline-size: 33.5px;
    block-size: 36px;
    /* The badge's anchor. The wrapper cannot be: it stands down on a phone and on a stacked bar, so the panel can hang
       from the topbar, and the badge then followed the panel there. */
    position: relative;
    padding: var(--kp-space-sm);
    border: 0;
    border-radius: var(--kp-radius-md);
    background: none;
    color: var(--color-text-muted);
    font-size: 20px;
    line-height: 1.65;
    cursor: pointer;
    transition: background-color 160ms var(--ease-smooth-out),
                color 160ms var(--ease-smooth-out),
                box-shadow 160ms var(--ease-smooth-out);
}

/* The bell's unread badge (`_TopbarActions.cshtml`), painted from the Badge read after the page has rendered, and
   hidden at zero, so the topbar stays quiet for a reader with nothing unread. The rule is the measured v3 spec
   (`css/style.css:10939-10954`, minus its pulse animation: a count that moves on a live signal needs no second
   signal of its own). Position is LOGICAL: the
   package pins `left: 2px` physically, which is the inline-END corner on its Arabic default (measured) and
   only reads as inline-start on its English page because a physical value cannot flip. */
.notification-badge {
    position: absolute;
    inset-block-start: 2px;
    inset-inline-end: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 18px;
    block-size: 18px;
    padding-inline: var(--kp-space-xs);
    border: 2px solid var(--kp-white);
    border-radius: var(--kp-radius-full);
    background: var(--status-alert-fg);
    color: var(--kp-white);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* The lock's ring replaces the glyph; the count is not the glyph, and stays. */
.notification-btn.btn-loading--icon > .notification-badge {
    visibility: visible;
}

/* THE 1075 BELOW IS SAFE ONLY BECAUSE `.topbar` MAKES A STACKING CONTEXT — read this before touching the
   topbar (parity fix wave P3.1, hit-tested on the running admin 2026-08-11).
   This dropdown and its sibling `.user-dropdown` are the only surfaces OF OUR OWN that the admin renders
   above the vendored SweetAlert2 container, which defaults to `z-index: 1060`
   (KwtPost.DesignSystem/wwwroot/lib/sweetalert2/sweetalert2.min.css, `div:where(.swal2-container)`).
   Bootstrap declares three higher layers of its own — popover 1070, tooltip 1080, toast 1090 — but the
   admin uses none of the three (swept 2026-08-11 over its views and page JS: zero usages), so they cannot
   bite until something adopts one. By the raw numbers a dialog fired while either panel is open would draw
   UNDERNEATH it — the exact defect the owner caught on the portal, where `.plan-modal` 1200 hid a confirm
   behind the sheet (P2.0, 2026-08-11).
   It does not happen here, and the reason is not in these declarations: the `.topbar` rule (search this
   file for `.topbar {`) is `position: sticky; z-index: 1030`, and a positioned element with a
   z-index creates a STACKING CONTEXT, so both panels are painted inside the topbar's 1030 layer and can
   never rise above it however large their own z-index is. Proven by `elementFromPoint`, not by that
   arithmetic: with the account menu open, a real confirm's centre, its confirm button's centre AND a point
   inside the open 1075 panel all returned the dialog (the last one returned the dialog's own backdrop).
   THE CONSTRAINT: dropping `z-index` from `.topbar`, or moving it off `position: sticky`/`relative`/
   `fixed`, releases BOTH panels above every dialog in the app — silently, because nothing here would
   change and no test would fail. If the topbar ever needs that, lower these two to sit under 1060 in the
   same change. (The portal solved its own version by raising the dialog layer instead; that override is
   scoped to `body.kp-portal` and deliberately does NOT reach the admin — P3.1.) */
.notif-dropdown {
    inline-size: 340px;
    max-inline-size: calc(100vw - 24px);
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl); /* mockup --radius-md 12px == our --kp-radius-xl (resolve by VALUE) */
    background: var(--color-bg-surface);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-block-start: 0 !important;
    animation: dropdownFadeIn 160ms var(--ease-smooth-out);
    text-align: start;
    z-index: 1075;
}

/* Same anchoring treatment as the account menu right below (.user-profile.dropdown .dropdown-menu): with
   `data-bs-display="static"` Bootstrap still sets its own margin/offset, so the panel's gap is declared here
   instead. 10px is the mockup's own `top: calc(100% + 10px)`. z-index matches the account menu's 1075 rather
   than the package's 1060 — the two panels share this shell and its sticky topbar. */
.notification-wrapper.dropdown .dropdown-menu.notif-dropdown {
    position: absolute;
    inset-block-start: calc(100% + 10px) !important;
    inset-inline-end: 0;
    inset-inline-start: auto;
    transform: none !important;
}

/* ON A PHONE THE PANEL IS ANCHORED TO THE TOPBAR, NOT TO THE BELL (2026-09-02, narrow-screen pass).
   Measured at 360px: the panel is 336px wide and hangs from the button's own inline end, so it rendered
   from x=94 to x=430 in Arabic and from x=-70 to x=266 in English -- 70px of it outside the screen in
   both, with no way to reach the cut edge. Standing the wrapper down makes the TOPBAR the panel's
   containing block (it is already positioned, being sticky), so one pair of logical insets spans the
   screen less a gutter either side and the vertical offset keeps reading as "below the topbar".
   RECORDED DEVIATION from the design reference, which paints the same defect (a fixed 340px panel that
   lands off-canvas): a control the reader cannot reach is not a geometry question, the same ground the
   muted-text contrast ruling stands on. */
@media (max-width: 575.98px) {
    .topbar .notification-wrapper.dropdown {
        position: static;
    }

    .notification-wrapper.dropdown .dropdown-menu.notif-dropdown {
        inset-inline: var(--kp-space-sm);
        inline-size: auto;
        max-inline-size: none;
    }

    /* PO-20 / 15 #190g (measured 2026-09-09): once the title has its own row, a menu anchored to the 62px
       avatar box opened 38px into the bar and covered the title. The account menu takes the same anchoring
       as the bell panel above -- it hangs from the topbar, so "below the bar" means below BOTH rows -- and
       its inline-end inset is the bar's own phone padding, which keeps it under the avatar in both directions.
       The inset rule carries the `.topbar` prefix on purpose (branch-end review 2026-09-10, second round; measured
       at 360/390/400 in both languages with the edge reading 0): the base rule for the same menu is declared LATER
       in this file with the same four-class specificity and a media query adds none, so without the fifth class the
       later `inset-inline-end: 0` won and the menu overshot the avatar to the screen edge. */
    .topbar .user-profile.dropdown {
        position: static;
    }

    .topbar .user-profile.dropdown .dropdown-menu.user-dropdown {
        inset-inline-end: var(--kp-space-md);
    }
}

/* THE ANCHORING FOLLOWS THE STACKED STATE ABOVE THE PHONE TIER TOO (branch-end review 2026-09-09, second
   finding; measured at 768px on the English P.O. Box requests page). The size-first rule lets the bar stack on
   a tablet as well, but the bar anchoring above lived only in the phone block, so on a stacked tablet bar the
   account menu opened at y=71 against a bar ending at y=109 and the bell panel opened at y=60 and covered the
   title row. Each tier above the phone band stands both wrappers down WHEN THE BAR IS STACKED and gives both
   panels the bar's own inline padding on that tier as their inline-end inset (24px from 768px up, 16px on the
   576-767.98 tier), so each still sits under the action cluster in both directions. The phone block keeps its
   width-based rule: there the bell panel also spans the screen. */
@media (min-width: 768px) {
    .topbar.topbar--stacked .notification-wrapper.dropdown,
    .topbar.topbar--stacked .user-profile.dropdown {
        position: static;
    }

    .topbar.topbar--stacked .notification-wrapper.dropdown .dropdown-menu.notif-dropdown,
    .topbar.topbar--stacked .user-profile.dropdown .dropdown-menu.user-dropdown {
        inset-inline-end: var(--kp-space-lg);
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .topbar.topbar--stacked .notification-wrapper.dropdown,
    .topbar.topbar--stacked .user-profile.dropdown {
        position: static;
    }

    .topbar.topbar--stacked .notification-wrapper.dropdown .dropdown-menu.notif-dropdown,
    .topbar.topbar--stacked .user-profile.dropdown .dropdown-menu.user-dropdown {
        inset-inline-end: var(--kp-space-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    .notif-dropdown { animation: none; }
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--kp-space-md);
    border-block-end: 1px solid var(--color-border);
}

.notif-dropdown-header h6 {
    margin: 0;
    /* Same reason as `.user-info h6` above (parity round 2, package B, 2026-08-12): an <h6> takes
       --font-display from base.css, so in English this header painted Plus Jakarta Sans above an Inter
       body. The v3 mockup paints Inter. Arabic is unaffected — both tokens resolve to Alexandria. */
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.notif-dropdown-body {
    max-block-size: 280px;
    overflow-y: auto;
}

/* The panel's empty state, shown when the active tab has no rows
   (owner-ratified wording 2026-08-03, `Topbar.Notifications.Empty`). The v3 package has NO empty pattern for
   this panel to copy: its own body is three hard-coded demo rows and its `.notification-empty` block belongs
   to the portal package's full-page list, not to a 340px dropdown. So the spacing is taken from this panel's
   own scale instead — the 16px inline padding its rows and header both use, and one 24px section step of
   block padding, which centres the sentence in the panel without pretending to be a 280px-tall illustration.
   Muted + centred, no icon, no action: there is nothing to act on. */
.notif-dropdown-empty {
    margin: 0;
    padding: var(--kp-space-lg) var(--kp-space-md);
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
}

@media (max-width: 767.98px) {
    /* The narrow cluster keeps the badge as a pill and drops only its label, exactly as the package renders
       it (measured at 760px: 38x28 with the label hidden) — the icon alone still states "you are scoped". */
    .ac-branch-badge span {
        display: none;
    }
}

@media (max-width: 575.98px) {
    /* Only the gap tightens. The package renders the SAME 36x33.8 pill and the same 6px 14px padding at
       360px as at 1440px (measured on the served package: min-width 0, width auto at every band), so the
       v2-era 40px min-width / 8px padding narrow override that used to live here was removed with the D1
       frame correction — it was part of the fixed-frame family, not a v3 responsive rule. */
    .topbar-actions {
        gap: var(--kp-space-xs);
    }
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--kp-radius-sm);
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-toggle:hover {
    background: var(--color-bg-canvas);
    color: var(--color-action-primary);
}

.lang-toggle {
    background: var(--color-lang-toggle-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    padding: 6px 14px;
    color: var(--color-text);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-decoration: none;
    cursor: pointer;
    /* The mockup markup is a <button>, which centers its label (both axes) via the browser's native
       button rendering regardless of author `display` -- verified live: mockup .lang-toggle computes
       display:block yet still renders centered. Our port is an <a> (a real culture-switch link, not a
       JS-only toggle -- see CultureController), and anchors get no such native centering, so it must be
       declared explicitly or the glyph sits top/start-aligned inside the fixed-size chip (bug, 2026-07-18). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    /* Anchor for the hit area below. */
    position: relative;
}

/* WCAG 2.5.5 target size WITHOUT a 44px painted box — the resolution of a real two-rule conflict, so keep
   both citations before touching it:
     * ACCESSIBILITY: the shell-control touch-target floor further down (`.sidebar-toggle,
       .user-profile-btn { min-width/height: 44px }`, P2/F2) used to include `.lang-toggle`. The target it
       guarantees is still guaranteed — by this invisible box, not by the chip's own size.
     * PARITY: the v3 package paints this control as a 33.8px-tall pill (measured on the served package,
       ar and en); owner parity order 2026-08-03 / lead ruling D1 (Core Rule 13, ledger 15 #137) is that
       the RENDERED package wins the painted box. A 44px painted chip was the visible miss the owner's own
       screenshot caught.
   How it sizes: `min(0px, calc(50% - 23px))` on each logical axis grows the box outward when the chip is
   smaller than the target and clamps to 0 when it is already bigger, so the hit area is never SMALLER than
   the control it covers. The 23px is 22px (half of the 44px target) plus 1px of border compensation: an
   absolutely positioned box is laid out against its ancestor's PADDING box, so the chip's 1px border sits
   outside the percentage and a bare 22px measures 43.98px — under the target by a rounding hair. At 23px
   the pseudo measures 46px on both axes, comfortably over. Both axes are logical, so nothing flips wrong
   in RTL, and the outward growth (≤7.1px) stays inside the cluster's 8px gap, so it cannot steal a click
   from the bell or the badge. Invisible by construction: no background, no border, no content but the
   empty string. It also carries the SignIn page's chip (`.auth-lang .lang-toggle`), which is why it lives
   on the shared rule rather than the topbar-scoped one. `::after` is free on this element — nothing else in
   this family declares one since the account chevron was removed (owner ruling 2026-08-03), and `::before`
   is verified unset here (computed `content: none`). */
.lang-toggle::after {
    content: '';
    position: absolute;
    inset-block: min(0px, calc(50% - 23px));
    inset-inline: min(0px, calc(50% - 23px));
}

.lang-toggle:hover {
    background: var(--color-bg-canvas);
    color: var(--color-action-primary);
    border-color: var(--color-action-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    padding: 6px var(--kp-space-sm);
    border-radius: var(--kp-radius-sm);
    cursor: pointer;
}

/* Hover background REMOVED from the topbar .dropdown.user-profile wrapper — owner order 2026-07-19
   ("remove hover background color from class=dropdown user-profile"). The transition rode with it;
   the inner .user-profile-btn keeps its own hover/expanded treatment unchanged. */

/* ---- User-profile button: grid layout (mockup style.css 2978-3050) ----
   NO CHEVRON — owner ruling 2026-08-03 ("there is no arrow in the mockup why did you add arrow"), and the
   package agrees at every layer that wins: `style.css:10979` and its ≤767 companion `style.css:11082` both
   set `.topbar-actions .user-profile-btn::after { display: none }`, and the later `deployed-reference.css:2873`
   kills it unscoped as well. The `::after` chevron this family used to carry came from the package's OWN
   EARLIER block (`style.css:3003`) — the same superseded-block trap the cluster history above records. Its
   grid column and the ≤575 `display:none` companion went with it, so the track set is now two columns at the
   wide bands and one when the label collapses. Do not reintroduce it. */
.user-profile-btn {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "avatar info";
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: var(--kp-radius-md);
    color: var(--color-text);
    font-family: inherit;
    text-align: start;
    transition: background-color 160ms var(--ease-smooth-out),
                border-color 160ms var(--ease-smooth-out),
                box-shadow 160ms var(--ease-smooth-out);
}

.user-profile-btn .user-avatar { grid-area: avatar; }

.user-profile-btn .user-info {
    grid-area: info;
    min-width: 0;
    text-align: start;
}

.user-profile-btn .user-info h6,
.user-profile-btn .user-info small {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* NO [dir="rtl"] grid-template-areas flips for .user-profile-btn (removed 2026-07-19, bug-hunt
   confirmed): grid tracks already reverse under direction:rtl, so the manual flip is a DOUBLE flip
   that crammed the 30px avatar into the 14px chevron track in Arabic — the same anti-pattern class
   as the .user-dropdown fix earlier the same day. */

@media (max-width: 767.98px) {
    /* The label collapses (see .user-info below), so the chip is the avatar alone from here down — one track,
       matching the one-area set the ≤575 block also declares. The 12px chevron column that used to sit beside
       the avatar here went with the chevron itself (owner ruling 2026-08-03), and so did the 7px gap that
       separated the two: a gap on a single-track grid measures nothing, and leaving it would read as spacing
       a later reader would hunt for on screen. */
    .user-profile-btn {
        grid-template-columns: auto;
        grid-template-areas: "avatar";
    }

    /* FIX (2026-07-18 verification): the "avatar chevron" areas above drop the "info" grid area, but
       .user-info (grid-area: info) was never hidden, so the browser auto-placed it onto an implicit
       row that rendered outside the button, overlapping page content. Mockup style.css:3341-3343 hides
       .user-info with this exact bare selector inside its own MD-breakpoint block; ported byte-exact
       here (colocated with the button's own collapse rather than the mockup's separate/later media
       query, since .user-info exists nowhere else in KwtPost.Admin -- verified). This query also
       covers the ≤575.98px range, so the avatar-only collapse below keeps .user-info hidden
       EXPLICITLY rather than by the previous accidental 0-width column. */
    .user-info {
        display: none;
    }
}

/* ≤575px: collapse to an avatar-only square (moved here from Task 3 per F5 — needs the grid button).
   What this block still owns is the BOX (padding + centering); the single "avatar" track it also declares is
   now the same set the ≤767 block above already gives it, kept here so this block reads on its own. It used
   to pin width/min-width to a 40px control-height variable, which at a 38px avatar plus padding would clip —
   and that variable is gone with the D1 frame correction. The package lands in the same place: its own narrow
   rules are outrun by the later `width: auto; min-width: 0` (style.css:10962-10977), and it paints a 58x50
   avatar-only chip at 760px and 360px (measured 2026-08-03). The chevron's `display:none` companion that
   used to close this block is gone with the chevron (owner ruling 2026-08-03). */
@media (max-width: 575.98px) {
    .topbar-actions .user-profile-btn {
        grid-template-columns: auto;
        grid-template-areas: "avatar";
        width: auto;
        min-width: 0;
        padding: 6px;
        justify-content: center;
    }
}

/* ---- Topbar avatar: 38x38 round navy-gradient tile (mockup v3 style.css:10983-10992) ----
   RESIZED + RE-SHAPED 2026-08-03 from the 30x30 6px-radius flat navy tile the v2 package rendered. The v3
   package settles this at the END of its cascade with `border-radius: var(--radius-full) !important`, which
   outruns the icon-unification sweep the previous comment here cited — so the 6px premise is dead and the
   rendered value is a full circle (measured live: 38x38, radius 9999px, both languages).
   The gradient is the palette clause in miniature: the package paints
   `linear-gradient(160deg,#0d4ab8,#115ee8 45%,#3a7af0)` — the stale pre-rebrand triad whose three stops map
   position-for-position onto our official one, so --gradient-brand IS that gradient in brand colours. Its
   drop shadow's legacy `rgba(30,58,95,.25)` tint is re-expressed on official navy, matching the alpha-navy
   literals the cluster's hover rule already uses. */
.user-avatar {
    inline-size: 38px;
    block-size: 38px;
    border-radius: var(--kp-radius-full);
    background: var(--gradient-brand);
    box-shadow: 0 2px 8px rgba(0, 51, 160, 0.25);
    color: var(--kp-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Sizes the Font Awesome person glyph the chip paints (the initial-letter era ended 2026-07-19; the glyph
       became FA's solid `fa-user` on 2026-08-03). 14px is the package's own value for this avatar
       (`style.css:10990`); the 13px that stood here was left over from the initial. */
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info h6 {
    margin: 0;
    /* THE FAMILY IS STATED BECAUSE THE TAG IS AN <h6> (parity round 2, package B, 2026-08-12). base.css
       paints every h1..h6 with --font-display, and this chip's name is markup-level a heading — so in
       ENGLISH the signed-in admin's own name painted Plus Jakarta Sans directly above a role line in
       Inter, two typefaces inside one 38px chip. The v3 mockup paints Inter for both, measured on the
       rendered package. Invisible in Arabic, where --font-display and --font-body are both Alexandria
       (tokens.css), which is why a census reading the Arabic rail could not have found it. */
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

.user-info small {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ---- User-profile dropdown (mockup style.css 3052-3200) ----
   The 1075 below is the second half of the pair described in full at the `.notif-dropdown` rule: it is
   above the vendored dialog layer's 1060 and is safe ONLY because `.topbar` makes a stacking context.
   Read that block before changing the topbar's position or z-index (P3.1, 2026-08-11). */
.user-dropdown {
    width: max-content;
    min-inline-size: 260px;
    max-inline-size: calc(100vw - 24px);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md); /* mockup --radius-sm 8px == our --kp-radius-md */
    box-shadow: var(--shadow-float);
    padding: 6px;
    overflow: hidden;
    margin-block-start: 0 !important;
    animation: dropdownFadeIn 160ms var(--ease-smooth-out);
    text-align: start;
    z-index: 1075;
}

.user-profile.dropdown .dropdown-menu.user-dropdown {
    position: absolute;
    inset-block-start: calc(100% + 8px) !important;
    inset-inline-end: 0;
    inset-inline-start: auto;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .user-dropdown { animation: none; }
}

@keyframes dropdownFadeIn {
    from { opacity: 0; translate: 0 -6px; }
    to { opacity: 1; translate: 0 0; }
}

.user-dropdown-header {
    padding: 12px 14px 11px;
    border-radius: var(--kp-radius-sm); /* mockup --radius-xs = 6px == our --kp-radius-sm (F1) */
    background: var(--color-shell-soft);
    text-align: start;
}

.user-dropdown-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-block-end: 2px;
}

.user-dropdown-email {
    /* 13px, not 12px (parity round 2, package B, 2026-08-12): measured on the rendered v3 package at
       1440, its email line is 13px/400/21.45px against our 12px/400/19.8px. */
    font-size: 13px;
    color: var(--kp-slate-550); /* mockup secondary-muted email #5b677a (index.html:160 .user-dropdown-email) */
}

.user-dropdown .dropdown-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-areas: "icon label";
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 9px;
    border-radius: var(--kp-radius-sm); /* mockup --radius-xs = 6px == our --kp-radius-sm (F1) */
    /* 14px/500, not 13.5px/600 (parity round 2, package B, 2026-08-12): measured on the rendered v3
       package at 1440, its dropdown rows are 14px/500/23.1px — the same step as a top-level rail row —
       against our 13.5px/600/22.275px. The two deltas partly cancel optically, which is why the row read
       as "close enough" until both were measured. */
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-align: start;
    transition: background-color 150ms ease, color 150ms ease;
}

/* NO [dir="rtl"] grid-template-areas flip here (removed 2026-07-19, owner-caught): grid columns
   already reverse under direction:rtl, so a manual "label icon" flip is a DOUBLE flip — it shoved
   the label into the 30px icon track (text overflowing across the row) and centered the icon in the
   wide track, painting it mid-word. The mockup's own dropdown carries this exact bug in Arabic mode
   (style.css 3052-3200 + its rtl overrides) — rendering bug, not design intent; not copied. */
.user-dropdown .dropdown-item > span {
    grid-area: label;
    min-width: 0;
}

/* Design sweep round 5, 2026-08-28: Bootstrap's vendored :focus grey is off-palette here; pointer
   and keyboard paint the same navy-tinted state, matching the kebab-menu precedent. */
.user-dropdown .dropdown-item:hover,
.user-dropdown .dropdown-item:focus {
    background: var(--color-shell-soft-strong);
    color: var(--color-action-primary);
}

.user-dropdown .dropdown-item .icon {
    grid-area: icon;
    width: 30px;
    height: 30px;
    border-radius: var(--icon-radius);
    background: var(--kp-slate-50);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 150ms ease, color 150ms ease;
}

.user-dropdown .dropdown-item:hover .icon,
.user-dropdown .dropdown-item:focus .icon {
    background: rgba(0, 51, 160, 0.10);
    color: var(--color-action-primary);
}

.user-dropdown .dropdown-divider {
    margin: 6px 4px;
    border-color: var(--color-border);
}

/* Rest = red TEXT only; hover ADDS the red background band (mockup style.css 3176-3188). The icon
   tile carries the red tint at rest and on hover. Danger tint reuses --status-alert-* (F6).
   FIX (2026-07-18 verification): !important on every property mirrors the mockup byte-for-byte
   (style.css:3176-3188 uses !important on all three rules, over an un-!important base .dropdown-item)
   -- it is not decoration, it is how the mockup itself beats its own higher-specificity
   .user-dropdown .dropdown-item / :hover / i rules (2-3 classes vs this 1-class selector). Confirmed
   inert without it: computed color/background stayed the muted/navy item colors at rest and hover. */
.user-dropdown-logout {
    color: var(--status-alert-fg) !important;
}

.user-dropdown-logout:hover,
.user-dropdown-logout:focus {
    color: var(--status-alert-fg) !important;
    background: var(--status-alert-bg) !important;
}

.user-dropdown-logout .icon {
    background: var(--status-alert-bg) !important;
    color: var(--status-alert-fg) !important;
}

.main-content {
    margin-inline-start: var(--kp-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content > main {
    flex: 1;
    padding: var(--kp-space-28);
    animation: fadeInUp .35s ease-out;
}

/* ---- Page-wrapper responsive padding (mockup .page-content cascade, style.css:910/3292/3311:
   28 -> 20 -> 16px). App-wide by design — the mockup shrinks every page's content gutter at these
   widths; part of the same 2026-07-18 owner-reported narrow-width parity fix. */
@media (max-width: 991.98px) {
    .main-content > main { padding: 20px; }
}

@media (max-width: 767.98px) {
    .main-content > main { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .main-content > main { animation: none; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-footer {
    padding: 20px 24px; /* mockup live-measured 2026-07-19 (was 16px) */
    text-align: center;
    color: var(--color-text-muted);
    font-size: .8125rem;
    border-block-start: 1px solid var(--color-border);
}
.main-footer small {
    color: var(--color-text-muted);
    font-size: var(--text-caption);
    opacity: .85;
}
@media (max-width: 1199.98px) {
    /* Design sweep round 3, 2026-08-28: transform alone left fourteen-plus offscreen links focusable.
       Hide them after the slide-out finishes, and restore visibility immediately when the rail opens. */
    .sidebar {
        transform: translateX(calc(var(--kp-rtl-flip, 1) * 100%));
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .sidebar.show {
        transform: translateX(0);
        visibility: visible;
        transition: transform .25s ease, visibility 0s;
    }
    .sidebar-overlay.show {
        display: block;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .main-content {
        margin-inline-start: 0;
    }
    /* The rail is a drawer at this tier, so the floating grid scrollbar reclaims its inline start exactly
       as the content beside it does -- one tier boundary, both offsets. */
    .grid-scroll-proxy {
        inset-inline-start: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
    }
}

/* ============================================================
   Auth shell (mockup login.html, auth-shell/auth-brand/auth-card block,
   css/style.css:9081-9376; composition-delta pass Task 7)
   ============================================================ */
.auth-page {
    min-block-size: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-block-size: 100vh;
}

.auth-brand {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--kp-space-md);
    padding: var(--kp-space-xl);
    background: var(--gradient-brand);
    color: var(--kp-white);
}

/* Full composition modifier — SignIn.cshtml ONLY (Task 7 review finding 4). DevAuth/Index.cshtml
   and Account/AccessDenied.cshtml render the bare .auth-brand/.auth-brand-logo classes without the
   new wrapper markup (.auth-brand-top/.auth-brand-tagline/.auth-brand-foot), so the 3-zone reflow,
   texture, and enlarged logo are scoped to this modifier rather than the base classes — those two
   pages keep the previous Phase A brand-panel look unchanged. */
.auth-brand--full {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    justify-content: space-between;
    gap: 0;
    padding-block: var(--kp-space-56);
    padding-inline: var(--kp-space-64);
}

/* Gold/navy radial wash — rgb(203 160 82) equals --kp-gold-500 at the mockup's exact .1 alpha;
   rgb(26 77 184) equals --kp-navy-500 (2026-07-18 rebrand — now a named --kp-navy-* variant,
   unlike before) — reproduced verbatim, not re-derived (same convention as the --kp-wash-* primitives). */
.auth-brand--full::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 80% 20%, rgb(203 160 82 / .1), transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 90%, rgb(26 77 184 / .35), transparent 60%);
}

/* Postal-stamp dot grid — rgba on white, mask fade (no color, luminance-only). */
.auth-brand--full::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgb(255 255 255 / .06) 1px, transparent 1px);
    background-size: var(--kp-space-22) var(--kp-space-22);
    mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
}

.auth-brand-top {
    display: flex;
    align-items: center;
    gap: var(--kp-space-14);
}

.auth-brand-logo {
    inline-size: 160px;
    block-size: auto;
}

.auth-brand--full .auth-brand-logo {
    inline-size: 320px;
}

.auth-brand-footer {
    font-size: .8125rem;
    color: rgba(255, 255, 255, .7);
}

.auth-brand-tagline {
    max-inline-size: 460px;
}

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-sm);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--kp-gold-300);
    margin-block-end: var(--kp-space-18);
}

.auth-brand-eyebrow::before {
    content: '';
    inline-size: var(--kp-space-28);
    block-size: 1px;
    background: var(--kp-gold-300);
}

.auth-brand-tagline h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-block-end: var(--kp-space-18);
}

.auth-brand-tagline p {
    font-size: 15px;
    line-height: 1.7;
    color: rgb(255 255 255 / .72);
    margin: 0;
}

.auth-brand-foot {
    display: flex;
    align-items: center;
    gap: var(--kp-space-14);
    font-size: .75rem;
    color: rgb(255 255 255 / .55);
}

.auth-brand-foot .dot {
    inline-size: 4px;
    block-size: 4px;
    border-radius: var(--kp-radius-full);
    background: rgb(255 255 255 / .4);
}

.auth-form {
    order: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: var(--kp-space-48);
    padding-inline: var(--kp-space-xl);
    background: var(--color-bg-canvas);
}

.auth-card {
    inline-size: 100%;
    max-inline-size: 400px;
}

/* Dev-only /dev/login user-picker table needs more width than the standard
   auth card (see DevAuth/Index.cshtml) -- the real SignIn/AccessDenied cards
   stay at the default 400px. */
.auth-card--wide {
    max-inline-size: 640px;
}

.auth-banner {
    border-radius: var(--kp-radius-md);
    padding: var(--kp-space-sm) var(--kp-space-md);
    background: var(--status-alert-bg);
    color: var(--status-alert-fg);
    margin-block-end: var(--kp-space-md);
}

.auth-card h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-block-end: var(--kp-space-sm);
}

.auth-card-hint {
    color: var(--color-text-muted);
    font-size: .875rem;
    margin-block-end: var(--kp-space-36);
}

.auth-submit {
    inline-size: 100%;
    margin-block-start: var(--kp-space-sm);
    padding: 13px var(--kp-space-md);
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-auth-submit-hover);
}

.auth-foot {
    margin-block-start: var(--kp-space-28);
    text-align: center;
    color: var(--color-text-muted);
    font-size: .75rem;
}

.auth-lang {
    position: absolute;
    inset-block-start: var(--kp-space-28);
    inset-inline-end: var(--kp-space-28);
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit {
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .auth-brand--full {
        padding-inline: var(--kp-space-xl);
    }
}

/* P4 L3 — stack the two-column shell at the mockup's 900px band (style.css:10054), not only below 768.
   The brand panel becomes a top band (min-height so it keeps presence) and its headline steps down. */
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-brand {
        padding-block: var(--kp-space-lg);
        padding-inline: var(--kp-space-lg);
        min-block-size: 240px;
    }
    .auth-brand-tagline h1 {
        font-size: 30px;
    }
}

/* P4 L2 — small-phone type scale (mockup style.css:10069-10082): tagline headline 26px, tagline
   paragraph 14px, auth-card heading 24px. The mockup's card heading is <h3>; ours is <h2> (SignIn/
   AccessDenied render <h2>), so the card rule targets .auth-card h2. Values are absolute px (as in the
   base rules above and in the mockup) — unaffected by the RTL root-scale, so px→px is exact. */
@media (max-width: 480px) {
    .auth-brand-tagline h1 {
        font-size: 26px;
    }
    .auth-brand-tagline p {
        font-size: 14px;
    }
    .auth-card h2 {
        font-size: 24px;
    }
}

/* ============================================================
   Modal side-drawers (mockup style.css §29 gradient headers +
   §7140 modals-as-side-drawers — port token-based, Task 5)
   Anchored to the inline-end edge (left in RTL, right in LTR)
   via logical properties, so one ruleset covers both directions.
   ============================================================ */
.modal-drawer {
    padding: 0 !important;
}

.modal-drawer .modal-dialog {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    margin: 0;
    inline-size: min(var(--kp-drawer-w), 100vw);
    max-inline-size: 100vw;
    block-size: 100vh;
    max-block-size: 100vh;
    display: flex;
    align-items: stretch;
    pointer-events: none;
    transform: translateX(calc(var(--kp-rtl-flip, 1) * -100%));
}

.modal-drawer.fade .modal-dialog {
    transition: transform .34s cubic-bezier(.22, .61, .36, 1), opacity .28s ease-out;
    opacity: 0;
    /* Re-declared here (not just on the lower-specificity .modal-drawer
       .modal-dialog rule above) to beat Bootstrap's own
       .modal.fade .modal-dialog { transform: translate(0,-50px); }
       (specificity 0-3-0 vs our 0-2-0 base rule) — without this the
       drawer's closed state loses to Bootstrap's vertical fade offset. */
    transform: translateX(calc(var(--kp-rtl-flip, 1) * -100%));
}

.modal-drawer.show .modal-dialog {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.modal-drawer--lg .modal-dialog { inline-size: min(var(--kp-drawer-w-lg), 100vw); }
.modal-drawer--sm .modal-dialog { inline-size: min(var(--kp-drawer-w-sm), 100vw); }
/* The wide detail drawer (subscriber drawer, spec 2026-07-27 §2.6). The 100vw arm is load-bearing here,
   not defensive: the token's 680px floor is wider than the 576px mobile breakpoint, so in the 576-680px
   band this min() is the only thing holding the dialog inside the viewport. */
.modal-drawer--xl .modal-dialog { inline-size: min(var(--kp-drawer-w-xl), 100vw); }

/* Bootstrap's centered-modal helper — neutralize for drawer mode (the
   class stays in markup on existing partials; this overrides it). */
.modal-drawer .modal-dialog-centered {
    align-items: stretch;
    min-block-size: 100vh;
}

.modal-drawer .modal-content {
    inline-size: 100%;
    block-size: 100vh;
    max-block-size: 100vh;
    border: none;
    border-radius: 0;
    /* Directional edge-shadow (mockup style.css:7460-7465: [dir="ltr"] -16px / [dir="rtl"] 16px x-offset,
       0 y, 32px blur, -16px spread, rgba(15,23,42,.18) — the shadow always falls toward the main content,
       away from the screen edge the drawer is anchored to). --kp-rtl-flip (already used on this block's
       .modal-dialog transform) reproduces the same sign flip: RTL=1 -> +16px, LTR=-1 -> -16px.
       Task 8 fix (was the flat, non-directional var(--shadow-float)). */
    box-shadow: calc(var(--kp-rtl-flip, 1) * 16px) 0 32px -16px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-drawer .modal-header {
    flex-shrink: 0;
    padding: 18px var(--kp-space-lg);
    border: none;
}

/* Drawer title typography (mockup .modal-custom .modal-header .modal-title, style.css:2712-2716) —
   Task 8 fix: previously unset, so the <h5 class="modal-title"> fell back to the base.css h1-h6 rule
   (var(--leading-heading)/var(--tracking-display), which vary by culture) instead of the mockup's fixed
   700 weight / 1.35 line-height / normal tracking in BOTH languages. --text-subheading (1rem = 16px)
   already equals the mockup's literal 16px. Color is inherited white from the __head--* variants below.
   Broadened to the __head--* intent classes (2026-07-30 hunt, finding C15): once the /Subscribers edit +
   block dialogs became CENTERED they left .modal-drawer behind and their titles fell back to Bootstrap's
   .h5 (1.25rem/500, plus English letter-spacing) beside a drawer title at 1rem/700. The intent head must
   carry the title typography wherever it is used — drawer or centered dialog — so the selector follows the
   head, not the shell. Same declarations, one rule: the approved demo declares the identical four values on
   its own `.modal-header .modal-title` (combined-subscribers-demo-v2.html:898-901).
   Dated 2026-11-10 (risk row ADMIN-DRAWER-TITLE-LINE-HEIGHT, the title's line): the line height is 1.5 (24px on
   the 16px title), no longer the 1.35 (21.6px) named above. The 1.35 came from the reference's style.css; the
   reference's pages also load deployed-parity-final.css, whose `.modal-custom .modal-title` rule sets 1.5, and
   the rendered page is the first truth. Size, weight and tracking are unchanged. */
.modal-drawer .modal-header .modal-title,
.modal-drawer__head--view .modal-title,
.modal-drawer__head--edit .modal-title,
.modal-drawer__head--delete .modal-title {
    font-size: var(--text-subheading);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: normal;
}

.modal-drawer .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--kp-space-28);
}

/* ---- ONE footer recipe for the whole modal family (owner ruling 2026-08-30, D37) -------------------
   A drawer footer and a centred dialog's footer do the same job -- one row of buttons under a hairline --
   and shipped at two paddings: this rule's 16px/24px against the framework's own 12px/12px, which put two
   surfaces of one family 8px apart. Measured through the mockup's SERVED cascade (the deployed parity layer
   wins there): every modal it draws carries one recipe, 16px 24px with an 8px gap and a top border, and it
   applies that to its view, edit, delete and add dialogs alike. Re-expressed here in house tokens.

   The selector follows the intent HEAD rather than the shell, for the same reason the family's title
   typography was broadened onto the head in 2026-07-30: a centred dialog carrying one of these heads is a
   member of this family, and dropping the drawer shell moved the dialog without changing anything else
   about what it is. Reaches two centred dialogs today (the subscriber edit and reason dialogs; the shipments
   form and status dialogs became drawers under ruling 15 #855(a), dated 2026-10-29) plus every drawer, which
   the rule already covered at these values. */
.modal-drawer .modal-footer,
.modal-content:has(> .modal-drawer__head--view) .modal-footer,
.modal-content:has(> .modal-drawer__head--edit) .modal-footer,
.modal-content:has(> .modal-drawer__head--delete) .modal-footer {
    flex-shrink: 0;
    padding: var(--kp-space-md) var(--kp-space-lg);
    gap: var(--kp-space-sm);
    border-block-start: 1px solid var(--color-border);
}

/* ---- The drawer family's two ruled sizes (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 each measured size of the admin edit
   drawer. Two of them are smaller in the mockup's own edit dialog:
   - THE SAVE BUTTON'S OWN GAP, between its icon and its label: 8px here, 6px on the mockup's
     .btn-modal-success (deployed-reference.css:2782). The gap BETWEEN Cancel and Save is not this one -- it is
     8px on both sides and stays on the footer recipe above.
   - THE SINGLE-LINE FIELD'S LINE HEIGHT: 21px here (14px at the inherited 1.5), 20.3px (14px at 1.45) on the
     mockup's edit dialog fields. A textarea is not in it: its mockup line is the taller one (22.4px), so it
     keeps the shipped 21px, which is the smaller.
   The selectors are the footer recipe's own -- every drawer, and every centred dialog wearing one of the
   intent heads -- so the family keeps ONE shape. Ordinary forms outside the family keep the shared field
   leading. */
.modal-drawer .modal-footer .btn-confirm,
.modal-content:has(> .modal-drawer__head--view) .modal-footer .btn-confirm,
.modal-content:has(> .modal-drawer__head--edit) .modal-footer .btn-confirm,
.modal-content:has(> .modal-drawer__head--delete) .modal-footer .btn-confirm {
    gap: 6px;
}

.modal-drawer input.form-control,
.modal-drawer .form-select,
.modal-content:has(> .modal-drawer__head--view) input.form-control,
.modal-content:has(> .modal-drawer__head--view) .form-select,
.modal-content:has(> .modal-drawer__head--edit) input.form-control,
.modal-content:has(> .modal-drawer__head--edit) .form-select,
.modal-content:has(> .modal-drawer__head--delete) input.form-control,
.modal-content:has(> .modal-drawer__head--delete) .form-select {
    line-height: 1.45;
}

/* ---- The side drawer's footer Cancel / Close and its backdrop (Core Rule 13; ruling 15 #855 parity round,
   2026-10-29) -------------------------------------------------------------------------------------------------
   The mockup's drawer draws its cancel button as .btn-modal-cancel: no fill, slate-600 words at weight 500, the
   standard border, and on hover the slate-50 fill with a slate-400 border (deployed-reference.css .btn-modal-cancel),
   where the house's .btn-secondary is the page's outlined navy button. Every side drawer's footer secondary takes
   that shape here, so the family keeps one; its box size stays the house's (15 #377(a) took the smaller). A disabled
   one keeps the family's disabled posture: the hover below is for an enabled control only.
   The mockup's backdrop is .4 (its .modal-backdrop.show) where the framework's is .5. The framework draws the backdrop
   as the page's own child, never inside the dialog, so it is told apart by whether a side drawer is open: the framework
   marks a dialog aria-modal once its backdrop has faded in, until it has finished closing. The delivered bound: for the
   first ~150ms of an opening the backdrop fades toward .5, then eases to .4 and rests there; a centred dialog opened
   over an open side drawer also takes .4, and a centred dialog opened alone keeps .5. */
.modal-drawer .modal-footer .btn-secondary {
    background: transparent;
    color: var(--kp-slate-600);
    font-weight: 500;
}

.modal-drawer .modal-footer .btn-secondary:not(:disabled):hover {
    background: var(--kp-slate-50);
    border-color: var(--kp-slate-400);
    color: var(--kp-slate-600);
}

body:has(.modal-drawer[aria-modal="true"]) .modal-backdrop {
    --bs-backdrop-opacity: .4;
}

/* Mobile: the drawer runs to 5px of each window edge. It filled the window edge to edge until 2026-10-20;
   owner ruling 15 #377(a) gives the phone drawer the mockup's 5px side margin (its edit dialog measured 10px
   narrower than the window at every phone width from 340 to 528px). The margin is on the dialog itself, so
   the drawer stays anchored to its inline-end edge and the closed state's transform still carries it out of
   view (it is fully transparent while closed). */
@media (max-width: 575.98px) {
    .modal-drawer .modal-dialog,
    .modal-drawer--lg .modal-dialog,
    .modal-drawer--sm .modal-dialog,
    .modal-drawer--xl .modal-dialog {
        inline-size: calc(100vw - 10px);
        max-inline-size: calc(100vw - 10px);
        margin-inline: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-drawer.fade .modal-dialog {
        transition: none;
    }
}

/* Header intent variants (mockup .modal-custom.modal-view/.modal-edit/.modal-delete .modal-header,
   style.css:2806-2816). All 3 ship together per the Task 5 interface contract; --delete currently has
   no consumer among the drawer partials (delete surfaces route through SweetAlert2) but is kept so a
   future delete drawer can opt in — --view and --edit ARE consumed (Branches view/schedule drawers;
   every add/edit form drawer). Task 8 fix: byte-matched the mockup's live computed gradients (verified
   via getComputedStyle on the mockup, not just the CSS text — the .modal-custom .modal-content rule
   nearby is dead due to a selector mismatch, so rendered values were confirmed directly):
   view = rgb(0,51,160)->rgb(0,38,128); edit = rgb(5,150,105)->rgb(4,120,87); delete (was a flat solid
   fill, not a gradient) = rgb(200,16,46)->rgb(185,28,28). --kp-navy-600/-700 and --kp-red-600 are exact
   existing-token matches; the two remaining stops (rgb(5,150,105), rgb(185,28,28)) have no existing
   token, so they are literal rgb() values per the house rgb()/rgba()-in-components.css allowance (no
   new hex, no new token). */
.modal-drawer__head--view {
    background: linear-gradient(135deg, var(--kp-navy-600) 0%, var(--kp-navy-700) 100%);
    color: var(--kp-white);
}

/* BOTH STOPS CARRY THE TITLE (2026-09-02, measured on the deployed admin). The head's title is 16px/700 -- normal
   text by WCAG, so it owes 4.5:1 -- and the gradient's light stop was a RAW `rgb(5, 150, 105)` literal
   (the same value as --kp-emerald-600) measuring 3.77:1 against white, with the rendered ink under the
   title's leading edge sampled at 3.86:1 on the Roles permission dialog at 1280. The dark stop passed at
   5.48:1, which is why only half the header failed and why a glance never caught it. The two sibling heads
   are clean (--view 10.60 -> 13.22, --delete 5.88 worst), so this was the family's one gap.
   THE GREEN INTENT IS UNTOUCHED -- it is verified-intentional (blind design review 2026-07-21) and no
   ruling exempts a modal header from the AA bar the project already applied when it rejected #94a3b8 for
   muted text. The gradient simply starts one step darker: emerald-700 (5.48:1) to emerald-900 (7.68:1),
   both tokened, so the tonal step a reader sees survives and the literal is gone.
   DATED 2026-11-05 (owner ruling 15 #1023): all three heads now paint the one navy gradient of --view, so the green
   and red stops described here and above are history. The classes stay for what they drive beside the colour:
   the footers, the inputs and the close buttons read them. */
.modal-drawer__head--edit {
    background: linear-gradient(135deg, var(--kp-navy-600) 0%, var(--kp-navy-700) 100%);
    color: var(--kp-white);
}

.modal-drawer__head--delete {
    background: linear-gradient(135deg, var(--kp-navy-600) 0%, var(--kp-navy-700) 100%);
    color: var(--kp-white);
}

/* Head GEOMETRY, shared by all three intents (2026-07-29): demo-parity for the CENTERED dialogs that now
   carry these heads. Since the /Subscribers edit + block dialogs became stacked centered modals they are no
   longer inside .modal-drawer, so their headers fell back to Bootstrap's own .modal-header defaults (16px
   padding + a 1px bottom border) under the coloured gradient — the approved demo paints its dialog heads
   exactly like the drawer heads: 18px/24px, no rule under the gradient. Declared on the intent classes so it
   travels with the head wherever it is used, which deliberately also reaches Roles' #roleUsersModal (a plain
   centered modal with a __head--view/--edit head) and unifies the family.
   INSIDE a drawer this is a NO-OP by design: .modal-drawer .modal-header (specificity 0-2-0, above) already
   declares the identical `padding: 18px var(--kp-space-lg)` + `border: none` and outranks these 0-1-0 rules,
   so no drawer's geometry changes. Against Bootstrap's own 0-1-0 .modal-header it wins on source order —
   the Admin layout (the only consumer of these heads) links components.css after bootstrap(.rtl).min.css. */
.modal-drawer__head--view,
.modal-drawer__head--edit,
.modal-drawer__head--delete {
    padding: 18px var(--kp-space-lg);
    border: 0;
}

.modal-drawer__head--view .btn-close,
.modal-drawer__head--edit .btn-close,
.modal-drawer__head--delete .btn-close {
    filter: brightness(0) invert(1);
    opacity: .8;
}

.modal-drawer__head--view .btn-close:hover,
.modal-drawer__head--edit .btn-close:hover,
.modal-drawer__head--delete .btn-close:hover {
    opacity: 1;
}

/* ---- Drawer PINNED REGION — persistent summary header + tab strip (approved combined-subscribers
   design reference, the dated design reviews (2026-07-27 spec §2.6)) --------------------------------------

   Anatomy, top to bottom inside .modal-content (already a column flexbox):
       .modal-header      the coloured title bar        flex-shrink: 0  (existing rule)
       .drawer-summary    who this record is + actions  flex-shrink: 0  <- pinned
       .drawer-tabstrip   the tab buttons               flex-shrink: 0  <- pinned
       .modal-body        the active .drawer-pane       flex: 1 1 auto; overflow-y: auto (existing)
   Only the body scrolls, so the reader never loses the name/status/actions while paging a long tab.

   Owner round 4, retuned round 7: the summary and the strip must read as ONE compact block with
   ~14px (+-1) between the BOTTOM of the action buttons and the TOP of the tab buttons. That gap is
   assembled from three declarations below and is measured in the browser at build time:
       .drawer-summary padding-block end   2px
     + .drawer-tabstrip padding-block start 7px
     + the tab strip's own 1px border + 4px padding (the shared .range-control pill)
     = 14px. Change any one of them and the measured gap moves.  ---- */
.drawer-summary {
    flex-shrink: 0;
    /* No bottom border here: the single solid rule that closes the pinned block is the tabstrip's
       border-block-end, so the two never stack into a double line. */
    padding-block: var(--kp-space-md) 2px;
    padding-inline: var(--kp-space-28);
    background: var(--kp-navy-050);
}

.drawer-summary__top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.drawer-summary__id {
    flex: 1;
    min-inline-size: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-summary__name {
    font-family: var(--font-display);
    font-size: var(--text-subheading);
    font-weight: 700;
    color: var(--kp-navy-700);
}

.drawer-summary__meta {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
}

/* Dashed separator above the action row (the same language as the retired .subscriber-quick-actions
   block these buttons moved out of, so the drawer keeps its familiar shape). */
.drawer-summary__acts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-block-start: 6px;
    padding-block-start: 6px;
    border-block-start: 1px dashed var(--color-border);
}

/* Empty-action-row guard — the same shape as the empty-kebab guard above: a viewer whose every action was
   <perm>-suppressed must not be left looking at a bare dashed rule under the summary. Whitespace between the
   suppressed wrappers survives in the markup, so :empty would never match; :has() is the working test (and
   is already house-approved for exactly this case — evergreen browsers, internal admin app). */
.drawer-summary__acts:not(:has(button)) { display: none; }

/* Compact ghost/outline pill — the drawer-header sibling of the page's .btn-* families. */
.drawer-act {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    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: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.drawer-act .icon {
    inline-size: 14px;
    block-size: 14px;
}

/* Tones. Navy alphas reuse existing tokens; the emerald/red alpha washes stay literal rgba() with the
   colour they wash cited, per the same allowance the .subscriber-quick-actions ghosts use. */
.drawer-act--primary { color: var(--color-action-primary); border-color: var(--kp-navy-600-a22); }
.drawer-act--primary:hover { background: var(--kp-navy-600-a06); border-color: var(--color-action-primary); }
.drawer-act--ok { color: var(--kp-emerald-700); border-color: rgba(4, 120, 87, .25); }
.drawer-act--ok:hover { background: rgba(4, 120, 87, .06); border-color: var(--kp-emerald-700); }
.drawer-act--danger { color: var(--status-alert-fg); border-color: rgba(200, 16, 46, .25); }
.drawer-act--danger:hover { background: rgba(200, 16, 46, .06); border-color: var(--status-alert-fg); }

/* The strip host. Same inline padding as .drawer-summary so the two read as one pinned block, and the
   solid rule that closes the block. overflow-x is closure ruling 9: below the width where the tabs fit
   one row the strip scrolls horizontally IN PLACE — it never wraps to a second row and never scrolls
   away with the pane. */
.drawer-tabstrip {
    flex-shrink: 0;
    padding-block: 7px 6px;
    padding-inline: var(--kp-space-28);
    background: var(--kp-navy-050);
    border-block-end: 1px solid var(--color-border);
    overflow-x: auto;
}

/* The strip itself rides the shared .range-control pill; these three declarations are what the drawer
   changes about it, and they are written at 0-2-0 specificity on purpose — site.css loads AFTER this
   file, so a 0-1-0 rule here would lose to its .range-control/.range-btn rules (including the <=576px
   `.range-btn { flex: 1 }` stretch, which would squeeze these tabs instead of scrolling them).
   display:flex, not the family's inline-flex: an inline-level strip rides a text line box whose font
   strut inflates the pinned block's height on a font swap (an inline-level strip rides a text line box, so the font strut inflates its height on a font swap). */
.drawer-tabstrip .drawer-tabs {
    display: flex;
    flex-wrap: nowrap;
    inline-size: max-content;
    /* The HOST is this strip's scroller (see .drawer-tabstrip above), so the family's own phone-tier
       scroller is stood down here rather than nested inside it (2026-09-02, narrow-screen pass). */
    overflow-x: visible;
}

.drawer-tabstrip .drawer-tabs .range-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Panes: exactly one is active; the inactive one is not rendered at all, so its content never
   contributes to the body's scroll height. */
.drawer-pane { display: none; }
.drawer-pane.is-active { display: block; }

/* ---- Centered create/edit FORM modals — head-intent law CORRECTED 2026-07-21 (owner ruling +
   full mockup census). The 2026-07-19 blind-review measurement ("NAVY header + GREEN confirm")
   was taken on the mockup's ADD modal (#addBranchModal, modal-add = navy) and over-generalized
   to all form modals. The census across the mockup package: every page carrying an edit modal
   tags it modal-edit = GREEN (11 pages, 11/11, zero exceptions); branches' dedicated modal-add
   is the package's ONE navy form-modal state. Law now:
   EDIT (and any editable open, create included, except Branches create) = --edit green; Branches
   CREATE = --view navy; read-only view = --view navy. GREEN confirm + the 16px-rounded centered
   modal content from the 2026-07-19 review remain correct and unchanged. ---- */
.modal:not(.modal-drawer) .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

/* Side-DRAWER content rounds its 16px corners toward the content only (blind review: mockup modal
   content measures 16px radius; a full-height edge-anchored drawer can't round its anchored edge
   without corner gaps — logical start-side corners flip correctly in RTL/LTR). */
.modal-drawer .modal-content {
    border-start-start-radius: 16px;
    border-end-start-radius: 16px;
    overflow: hidden;
}

.btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    background: var(--kp-emerald-700); /* mockup confirm rgb(4,120,87), live-measured */
    color: var(--kp-white);
    border: none;
    padding: 10px 22px;
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;                         /* mockup --leading-ui — without it this button ran 2px
                                                  taller than its .btn-secondary footer sibling (2026-08-01) */
    cursor: pointer;
    transition: background-color .15s ease;
}

/* The hover DARKENS, as the mockup's confirm does: the lighter emerald stop it used to take put the white words at
   3.77:1, under the 4.5:1 text needs (ruling 15 #855 parity round, 2026-10-29); emerald-900 holds them at about 7.7:1. */
.btn-confirm:hover { background: var(--kp-emerald-900); }

.btn-confirm:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ============================================================
   Grid page furniture (mockup style.css sections 9/15/18/19/4778
   + the section-8330 "users.html" page-action-bar/filter-panel
   refinement; Task 6, 2026-07-12). Consumed by Tasks 7-11.
   ============================================================ */

/* ---- Page action bar: primary cluster (Filter/Add) + trailing Export ---- */
.page-action-bar {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
    margin-block-end: var(--kp-space-md);

    /* ONE HEIGHT FOR EVERY CONTROL ON THIS BAR (2026-09-03). The bar is a centred flex row, so each
       control had been computing its own box from its own type ramp and the four never agreed: measured
       in English at 1280 they came out 41.44 / 40.30 / 36.00 / 41.44 px, three different heights sitting
       side by side on one line, which reads as a misaligned row rather than a family.
       The number is DERIVED, not chosen -- it is the tallest control's own declared box, so no control is
       squashed and none needs its type ramp changed: the filter/export pair declares 9px of block padding
       on each side, a 1px border on each side, and 0.8125rem (13px) text on the admin body leading of 1.65
       -> 18 + 2 + 21.45 = 41.45px. It is applied as a MINIMUM, so a control that already stands taller
       keeps its own box and only the shorter ones are lifted to meet it. */
    --action-bar-control-h: 41.45px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
}

.page-actions-trail {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
}

/* A single-line row of page actions has nowhere to give on a phone (2026-09-02, narrow-screen pass).
   Measured on Shipments in English at 360px: the trail ran 350.5px from x=16, so its Add button ended at
   366.5 and the whole document overflowed by 6.5px -- one button's worth, and invisible in Arabic where
   the same row is 337.48px. Below the tablet tier it wraps onto a second line, which is what the design
   reference's own filter bar does at the same width. Its parent .page-actions already wraps. */
@media (max-width: 767.98px) {
    .page-actions-trail {
        flex-wrap: wrap;
    }
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-sm);
    background: var(--gradient-brand);
    color: var(--kp-white);
    border: none;
    padding: 10px 22px;
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    /* Pin the mockup .btn-primary-custom line-height (var(--leading-ui) 1.45 -> rendered 20.3px @14px),
       so the button computes the mockup's 40px height instead of collapsing shorter (15 #96 F2). */
    line-height: var(--leading-ui);
    cursor: pointer;
    /* subtle colored shadow (mockup --shadow-colored, style.css:97) -- an exact rgba match already exists
       as --shadow-card-hover (tokens.css:165), reused here rather than adding a new token (Task 3). */
    box-shadow: var(--shadow-card-hover);
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-add:hover {
    background: var(--kp-navy-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

.btn-filter,
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-sm);
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 9px 18px;
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-filter { position: relative; }

.btn-filter.has-active-filters::after {
    content: attr(data-active-filter-count);
    position: absolute;
    inset-block-start: -7px;
    inset-inline-end: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 18px;
    block-size: 18px;
    padding-inline: 4px;
    border: 2px solid var(--kp-white);
    border-radius: var(--kp-radius-full);
    background: var(--kp-red-600);
    color: var(--kp-white);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.btn-filter:hover,
.btn-export:hover {
    background: var(--color-bg-canvas);
    border-color: var(--color-action-primary);
    color: var(--color-action-primary);
}

/* Export button = a solid white elevated button on EVERY page (owner order 2026-07-23: unify all
   pages to the white button the .page-actions-trail pages already had; Branches/AdminUsers/Plans
   were the see-through variant). The subtly-elevated surface is the mockup users.html refinement. */
.btn-export {
    background: var(--color-bg-surface);
    box-shadow: var(--shadow-card);
}

.btn-export:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

/* The shared height, applied to every control the bar can hold. Scoped to the bar on purpose: the same
   button classes render inside drawers, dialog footers and row cells, where their own families already
   decide the height and a bar-wide floor would be wrong. */
.page-action-bar .btn-filter,
.page-action-bar .btn-export,
.page-action-bar .btn-add,
.page-action-bar .btn-primary,
.page-action-bar .btn-secondary,
.page-action-bar .btn-refresh {
    min-block-size: var(--action-bar-control-h);
}

/* The refresh control is an icon square rather than a labelled button, so it takes the shared height on
   BOTH axes and stays square instead of growing into a lozenge. */
.page-action-bar .btn-refresh {
    inline-size: var(--action-bar-control-h);
    block-size: var(--action-bar-control-h);
}

/* ---- Collapsible filter panel ---- */
.filter-panel {
    display: none;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    padding: var(--kp-space-md);
    margin-block-end: var(--kp-space-md);
}

.filter-panel.show { display: block; }

/* The search field's in-input magnifier: the same seating the always-visible toolbar family uses (the
   reference filter row paints the glyph inside the input). Only the SEATING is declared here; the field's
   own styling comes from whatever form family it is dressed in. 2026-08-17.
   ANCESTOR SCOPE RETIRED 2026-09-03: these four rules were written under `.filter-panel`, so a component
   seated anywhere else -- the booking drawer's subscriber lookup was the first -- got the class and none of
   the geometry, and its magnifier fell out of the field onto the line below. The container a component
   happens to appear in is not what a component's rules should key on; the toolbar variant above keeps its
   own scope because its geometry really is the toolbar's. */
.search-box { position: relative; }
.search-box input { padding-inline-end: 44px; } /* reserve the magnifier lane */
.search-box .search-icon {
    position: absolute;
    inset-inline-end: 14px;
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
.search-box .search-icon .icon { width: 16px; height: 16px; }

/* Mockup geometry (owner-caught misalignment 2026-07-23): one shared filter row, and the
   apply/reset actions live INSIDE the row at its end (mockup users.html filter-panel) — never on
   their own line. Every .filter-group MUST carry a label (the alignment law's other half, enforced
   in views).
   The cells are TOP-aligned as of 2026-07-25 (they were bottom-aligned): every .filter-group is a
   label over a control, and the inline validation engine appends its message INSIDE the group, so
   pinning the cells to the row's bottom edge meant one invalid filter shoved EVERY other filter on
   the row down with it — measured on the audit-log panel, flagging any one of the five controls
   moved the other four down 24.2px (owner report 2026-07-25, same class as the schedule drawer's
   closure rows). Top-aligning costs nothing visually, because the label law above guarantees every
   cell has an identical caption line, and it makes a message grow ONLY its own cell, downward.
   .filter-actions keeps the old bottom pin via align-self below — it has no caption to line up.
   Correction 2026-08-28, sweep round 1 S-01: that bottom pin moved Apply 24.19px off the
   control line when a date-field blur inserted its message, so the mousedown target moved before
   click and the first Apply did nothing. The caption strut below keeps the action row stationary.
   Correction 2026-08-28, sweep round 1 S-05: under the wrapping flex layout, a last filter cell
   expanded to 868px below 204px siblings at 1440px. Equal grid tracks keep every cell the same width. */
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
    gap: var(--kp-space-md);
}

/* The grid track owns the 180px floor; zeroing the item's intrinsic minimum lets a long select
   shrink to that track instead of widening the whole panel. */
.filter-group {
    min-inline-size: 0;
}

/* A free-text search hint lists the fields it covers, and every measured one is 2-3x a single
   180px track (Shipments 426px, PoBoxRequests 388px, ErrorLog 386px at 1440 -- sweep round 3
   N-R3-4). N-S1-6 measured the inversion on 2026-08-28: five tracks made a two-track search
   365.80px wide at 1440, narrower than the 396/400px middle bands. Three wide tracks offer about
   586px while the two-track middle bands stay unchanged; below 992px the panel is one column. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .filter-row .filter-group--search {
        grid-column: span 2;
    }
}

@media (min-width: 1400px) {
    .filter-row .filter-group--search {
        grid-column: span 3;
    }
}

.filter-group .form-label { display: block; margin-block-end: 6px; }

/* The actions share the filter cells' top edge and reserve a matching caption line before wrapping
   their buttons onto the control line. The strut copies only the real label's explicit type metrics
   and 6px panel margin; both inherit the same font family and line-height from the filter row, so
   Alexandria and Inter compute the same line box without a guessed height (2026-08-28, S-01). */
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0;
    column-gap: var(--kp-space-sm);
    align-items: center;
    align-self: start;
    /* Alignment alone stays inside the auto-placed track. Place the actions in the last explicit
       track first, then align them to its logical end (2026-08-28, S-05).
       Pair-1 round 1 N-U1-2, 2026-08-29: pin the action cell to row 1 so validation growth in a
       surplus filter group on row 2 cannot move Apply between mousedown and click. */
    grid-column: -2 / -1;
    grid-row: 1;
    justify-self: end;
}

/* THE ROW PIN ABOVE IS A MULTI-COLUMN DEVICE ONLY (2026-09-04, sweep round 1).
   Pinning the action cell to row 1 keeps Apply stationary when a validation message grows inside a
   filter cell on row 2. Once the row collapses to ONE column that same pin lifts the actions ABOVE
   every filter they act on: Apply measured 84.55px above the first filter group on Appointments,
   ErrorLog and Shipments alike, with the whole stack of groups beneath it. The collapse is intrinsic
   (auto-fit over minmax(180px, 1fr)) so it carries no breakpoint of its own, and the width below is
   DERIVED rather than guessed: two 180px tracks plus the 16px gap need 376px of row, and the shared
   admin page chrome at this tier measures 81px on all three pages, so the second track survives at
   457px and dies at 456px. In one column no sibling cell is left to grow beside the actions, so
   releasing the pin costs the row-1 guarantee nothing. */
@media (max-width: 456.98px) {
    .filter-actions { grid-row: auto; }
}

.filter-actions::before {
    content: "\00a0";
    display: block;
    flex-basis: 100%;
    margin-block-end: 6px;
    font-size: .8rem;
    font-weight: 600;
}

.btn-apply {
    background: var(--color-action-primary);
    color: var(--kp-white);
    border: 1px solid transparent;
    padding: 9px 20px;
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}

.btn-apply:hover { background: var(--kp-navy-700); }

.btn-reset {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 9px 20px;
    border-radius: var(--kp-radius-md);
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.btn-reset:hover {
    background: var(--kp-navy-100);
    border-color: var(--color-action-primary);
    color: var(--color-action-primary);
}

/* THE FILTER PAIR RESTS ON ONE LINE AT EVERY DESK WIDTH (2026-09-28, owner ruling #296). The actions cell is ONE
   equal track of the row above, with a 180px floor, and with the family's 20px inline padding the Arabic pair
   rested at 201.67px with its gap: measured in a visible browser at 1440, Reset sat under Apply before any press
   on Appointments, Audit Log and Shipments, where the scrollbar takes 15px from the row, and on Shipments a
   dialog that took the scrollbar away unwrapped the pair and moved the reader 41px. The reference's own pair is a
   content-sized item that never wraps; inside the accepted equal-track row the room comes from the buttons' inline
   padding, the one lever that keeps the family's type, block padding, gap and both labels: 4 x (20px - 12px) =
   32px, so the Arabic pair rests at 169.67px with its gap (10.33px inside the 180px floor) and the English at
   131.80px. Scoped to the actions cell: the same Reset class stands alone elsewhere at the family padding. The
   Branch Users page's own rule below 1400px (the 170px floor it gives its middle bands) restates this value. */
.filter-actions .btn-apply,
.filter-actions .btn-reset {
    padding-inline: 12px;
}

/* ---- Table wrapper + header ---- */
.table-wrapper {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    /* Soft lift matching the mockup .table-card (style.css:5094 box-shadow var(--shadow-sm) == our
       --shadow-card) — the card read flat with border-only before (15 #96 F11). */
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    gap: var(--kp-space-lg);       /* mockup 24px, live-measured 2026-07-19 (was 16px) */
    padding: 16px 20px;            /* mockup live-measured 2026-07-19 (was 16px all around) */
    min-height: 78px;              /* mockup live-measured 2026-07-19 */
    border-block-end: 1px solid var(--color-border);
    flex-wrap: wrap;
}

/* Title + count-badge sit on one line (mockup .table-card-header h5, style.css:4880-4888) -- the browser's
   default h5 block margin would otherwise misalign it against .table-header's own flex row (Task 3). */
.table-header h5 {
    display: flex;
    align-items: center;
    gap: var(--kp-space-xs);
    margin: 0;
    font-size: 16px;    /* mockup .table-card-header h5 16px/700 (live-measured 2026-07-19; the
                           browser h5 default painted 20px/500 — owner-visible "bolding" miss) */
    font-weight: 700;
    color: var(--kp-navy-700);  /* mockup .table-card-header h5 = --primary-dark #002680 (6-page
                                   majority; branches.html's colorless h5 is the lone outlier —
                                   Rule-13 majority wins; owner ruling 2026-07-21: grid/section
                                   titles paint navy house-wide) */
}

/* ---- Trailing flex group (Task 3, admin-users composition) — wraps the inline search + the column
   chooser dropdown in the table header so only the GROUP carries margin-inline-start:auto, not the search
   box itself (a second trailing sibling would otherwise fight it for the auto-margin). ---- */
.table-header-trail {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    margin-inline-start: auto;
}

.table-search-inline {
    position: relative;
    display: flex;
    align-items: center;
    max-inline-size: 260px;
    min-inline-size: 224px;
    block-size: 38px;
    padding-inline-start: var(--kp-space-sm);
    padding-inline-end: 30px;  /* reserve the inline-END lane for the absolute magnifier (see .table-search-inline > .icon) */
    background: var(--color-bg-canvas);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.table-search-inline:focus-within {
    background: var(--color-bg-surface);
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Clear (×) button — mockup .search-clear (style.css:9391): hidden until the wrapper carries
   .has-value (the page JS toggles it as the user types); click clears + refocuses.

   THE MINIMUM BOX (2026-09-02). Measured at 360px in both languages, this control painted 22x22 -- its
   14px glyph in 4px of padding -- two pixels under what a pointer target owes its reader, and nothing
   larger carries the action: the wrapper is the search box itself, and pressing that does not clear the
   term. Every interactive control declares a minimum BOX, and the box grows rather than the mark, which is
   why the centring is declared beside it: the glyph stays where it was, centred inside the larger target.
   The wrapper is a flex row whose input takes the remaining space, so the 2px lands on the input's width
   and not on where its text begins. */
.table-search-inline .search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    min-inline-size: 24px;
    min-block-size: 24px;
    background: transparent;
    border: none;
    padding: 4px;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 4px;
    line-height: 0;
    flex-shrink: 0;
}

.table-search-inline.has-value .search-clear { display: inline-flex; }
/* 15 #198c, 2026-09-20: the pressed control shows its loading state until the answer lands. */
.table-search-inline .search-clear.is-loading { display: inline-flex; }

.table-search-inline .search-clear:hover { color: var(--color-text); background: var(--color-shell-soft); }

.table-search-inline .search-clear .icon { width: 14px; height: 14px; }

.table-search-inline .icon {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* Search magnifier at the inline-END (mockup majority .search-icon pattern — style.css:5151
   position:absolute + inset-inline-end, input padding-inline-end:38px). 5 of 6 admin search pages
   (admin-users/announcements/employees/lookups/roles) place it there; users.html's inline-start flex
   variant — the one our component was copied from — is the lone minority, so Core Rule 13 majority
   wins. Absolute so it clears the trailing .search-clear flex button; the wrapper's padding-inline-end
   (8px inset + 18px glyph + gap = 30px) keeps both the input text AND the clear button off the
   magnifier lane. Direct-child selector leaves the nested clear-× untouched. Logical properties keep
   RTL (visually left) and LTR (visually right) both correct. Lead measurement + ruling 2026-07-23. */
.table-search-inline > .icon {
    position: absolute;
    inset-inline-end: var(--kp-space-sm);
    inset-block-start: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.table-search-inline input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1 1 auto;
    inline-size: 100%;
    block-size: 100%;
    padding-inline: var(--kp-space-sm);
    font-family: inherit;
    font-size: .8125rem;
    color: var(--color-text);
    min-inline-size: 0;
}

.table-search-inline input::placeholder { color: var(--color-text-muted); }

/* A SEARCH PLACEHOLDER TOO WIDE FOR ITS BOX ENDS IN AN ELLIPSIS, never in a hard cut. Measured on a running
   host 2026-09-03 at 360px: fourteen of the admin's thirty-four placeholder fields are wider than the box
   that holds them -- 426px of English through a 235px box on the shipments grid, 399px of Arabic through the
   same one -- and the Arabic cut landed mid-word, leaving a fragment that is not a word. A placeholder has no
   tooltip to recover the rest from, so the ellipsis is the only thing that can say a word was removed.
   DECLARED ON THE INPUT, NOT ON `::placeholder`: measured the same day, the placeholder pseudo accepts only a
   fixed set of properties and drops this one (its computed value stays `clip`), while a declaration on the
   input computes through to the pseudo, which inherits it, and renders at the logical end in both languages.
   The two families this stylesheet owns are declared here; the admin's own two are declared beside their
   geometry in that app's stylesheet, for the same reason and with the same measurement.
   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.
   Nothing is hidden by it -- focusing scrolls the whole value back into reach, and the control that empties
   the box sits beside it -- and it is the same visible-loss rule one field across. */
.search-box input,
.table-search-inline input {
    text-overflow: ellipsis;
}

/* ---- Sortable column headers (Task 11 wires the markup + click handler) ---- */
.th-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table-custom .th-sortable:hover { background: var(--color-table-row-hover); }
/* Sort glyph sized to 14px (base .icon is 18px). The mockup grids carry NO sort icon — sorting is
   OUR kept extra (Core Rule 13), so it is KEPT but restyled to FIT the mockup's 39px header band
   (the 18px glyph inflated the band to 41px). Lead measurement + ritual check 12, 2026-07-23. */
.th-sortable .icon { width: 14px; height: 14px; opacity: .35; }
.th-sort-asc .icon, .th-sort-desc .icon { opacity: 1; }
/* THREE STATES NEED MORE THAN TWO APPEARANCES (2026-09-03). The header cycles ascending, descending, then
   cleared, and until this day all three painted the same two-way glyph: dim when unsorted, bright when
   sorted, direction unknowable. The rotation below was doing nothing at all -- the two-way glyph is four
   paths that map onto each other under a 180deg turn, so it is its OWN rotation, measured by capturing the
   same header in both states (largest difference on any channel across the whole glyph: 5 of 255, which is
   anti-aliasing). Screen-reader users were never affected; `aria-sort` has said ascending / descending /
   none throughout.
   The reference package has no shape to copy here: its grids are not sortable at all -- measured on the
   rendered package, nine headers with no sort class, no indicator element and the default cursor -- so
   sorting is a kept extra styled to fit (Core Rule 13), and this is the house form. A sorted header paints
   a single ARROW instead of the two-way glyph, and the rotation now acts on an arrow, which is not its own
   180deg turn, so descending really points the other way. Both glyphs ship in the markup and only one is
   rendered per state, because a `<use>` reference cannot be swapped from a stylesheet. */
.th-sortable .th-sort-dir { display: none; }
.th-sort-asc .th-sort-idle, .th-sort-desc .th-sort-idle { display: none; }
.th-sort-asc .th-sort-dir, .th-sort-desc .th-sort-dir { display: inline; }
.th-sort-desc .icon { transform: rotate(180deg); }

/* PO-19, 15 #190f: a labelled target beside the direction mark, within the header band. */
.th-sort-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    inline-size: 24px;
    block-size: 24px;
    margin-inline-start: 2px;
    margin-block: -5px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--kp-navy-700);
    opacity: .55;
    vertical-align: middle;
    line-height: 1;
    cursor: pointer;
}
.th-sort-clear:hover,
.th-sort-clear:focus-visible {
    opacity: 1;
    outline: 1px solid var(--color-border);
}
.th-sort-clear .icon {
    inline-size: 14px;
    block-size: 14px;
}


/* ---- Column show/hide chooser (Task 12 wires the chooser markup + localStorage persistence) ---- */
.col-hidden { display: none; }

/* ---- Visually-hidden a11y primitive (screen-reader-only text/caption). Genuinely shared, added for the
   Branches accessible table caption (spec 3.5); the standard clip pattern. ---- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.col-chooser { margin-inline-start: auto; }

.col-chooser-menu {
    min-inline-size: 200px;
    max-block-size: 320px;
    overflow-y: auto;
    padding: var(--kp-space-xs);
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text);
}

/* Design sweep round 5, 2026-08-28: the chooser was the one menu family left on vendor defaults.
   Its checkbox is the focus target, so the label row answers through :focus-within. */
.col-chooser-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    cursor: pointer;
    padding: var(--kp-space-sm);
    border-radius: var(--kp-radius-xs);
    font-size: .8125rem;
    color: var(--color-text);
    transition: background-color .15s ease, color .15s ease;
}

.col-chooser-menu .dropdown-item:hover,
.col-chooser-menu .dropdown-item:focus-within {
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
}

/* PK-P16a N-A5-7/N-E5-11: site.js gives every generated chooser checkbox the form-check-input
   class so the shared official-navy checked rule reaches it.
   The chooser's own cursor rule lived here until 2026-09-11, when it was promoted to the family --
   `body:not(.kp-portal) .form-check-input:not(:disabled)`, beside the label twin it belongs with. It
   was always the family's behaviour written for one menu: every other admin switch and checkbox showed
   the arrow. */

/* ---- Kebab row-action menu (3+ actions; mockup section 4778 .btn-overflow + .row-actions-menu)
   Markup: <div class="row-actions"><div class="dropdown kebab-menu"><button class="btn-action"
   data-bs-toggle="dropdown">kebab icon</button><ul class="dropdown-menu">...</ul></div>...</div>
   -- the trigger button reuses the existing ".row-actions .btn-action" sizing/hover (below); this
   block only skins the Bootstrap dropdown popup itself. ---- */
.table-scroll .kebab-menu .dropdown-menu {
    /* site.js gives the vendored Bootstrap 5.3.3 Popper the matching fixed strategy before creation.
       Fixed positioning escapes the scroller's paint clip without releasing its overflow or scroll offset. */
    position: fixed;
}

.kebab-menu .dropdown-menu {
    min-inline-size: 180px;
    padding: var(--kp-space-xs);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    box-shadow: var(--shadow-float);
}

.kebab-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    padding: var(--kp-space-sm);
    border-radius: var(--kp-radius-xs);
    font-size: .8125rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.kebab-menu .dropdown-item:disabled,
.kebab-menu .dropdown-item[aria-disabled="true"] {
    opacity: .5;
    color: var(--color-text-muted);
}

/* Disabled buttons do not receive pointer events, so the cursor belongs to the wrapping list item
   the pointer actually reaches (disabled-cursor ruling, 2026-08-27). */
.kebab-menu li:has(> .dropdown-item:disabled) {
    cursor: not-allowed;
}

.kebab-menu .dropdown-item:hover,
.kebab-menu .dropdown-item:focus {
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
}

.kebab-menu .dropdown-item.text-danger { color: var(--status-alert-fg); }

.kebab-menu .dropdown-item.text-danger:hover,
.kebab-menu .dropdown-item.text-danger:focus {
    background: var(--status-alert-bg);
    color: var(--status-alert-fg);
}

.kebab-menu .dropdown-divider {
    margin: var(--kp-space-xs) 0;
    border-color: var(--color-border);
}

/* Structural orphan-divider guard (review retrofit, Task 8 fix batch 1): a <perm> block never renders its
   own wrapper element (only its children survive), so when a viewer holds one verb but not its neighbor
   (e.g. Delete but not Edit) the divider's <li> can land as the menu's first or last child with nothing on
   the other side. Server-side @if guards can't see whether a sibling <perm> block actually rendered, so this
   is enforced structurally: a divider that ends up first or last in the menu is always hidden. Markup shape:
   <ul class="dropdown-menu"><li><hr class="dropdown-divider"></li>...</ul>. */
.kebab-menu .dropdown-menu > li:first-child > .dropdown-divider,
.kebab-menu .dropdown-menu > li:last-child > .dropdown-divider {
    display: none;
}

/* Empty-kebab guard (RBAC audit Minor, viewer persona pass): a row kebab whose menu rendered zero
   items (every child <perm>-suppressed for this viewer) hides entirely -- matches the nav empty-group
   rule (any-page wrapper). :has() is supported by all evergreen browsers (internal admin app). */
.kebab-menu:not(:has(.dropdown-menu li)) { display: none; }

/* ---- Pager (mockup outline-button language; promoted from site.css, reskinned) ---- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-xs);
    padding: var(--kp-space-md);
}

.pager-btn {
    min-inline-size: 34px;
    block-size: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.pager-btn:hover:not(:disabled) {
    background: var(--color-bg-canvas);
    border-color: var(--color-action-primary);
    color: var(--color-action-primary);
}

/* A disabled pager button is a control the pointer reaches and cannot use, so it says so (the
   2026-08-27 disabled-cursor ruling, carried to this family 2026-08-30). Shared: seventeen admin grid
   partials across fourteen pages render this pager, and no portal view renders one. */
.pager-btn:disabled { opacity: .5; cursor: not-allowed; }

.pager-info { padding-inline: var(--kp-space-md); color: var(--color-text-muted); font-size: .82rem; }

/* ---- Unified table first-cell icon. The v3 unified first-cell-icon law (owner ruling D7, ledger
   15 #137, 2026-08-02): 38x38, radius 10px, one official navy background, 18px white glyph, no
   per-row tints. Radius is --kp-radius-lg (10px), NOT the shared --icon-radius: the v2-era finding
   recorded here before — the old mockup's app-wide !important sweep (style.css:8296) beat its own
   design-notes §16 "10px" and rendered 6px — is superseded for THIS family by D7.
   --icon-radius itself deliberately stays 6px: D7 covers the grid first-cell icon only, and the
   token still serves the other containers (52x52 stat tile, .user-avatar, .quick-action-icon,
   .activity-avatar, .vbx-card__icon). No unit-test arm pins this family's geometry today — the P8
   parity pass measures it. ---- */
.cell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--kp-radius-lg);
    background: var(--color-action-primary);
    color: var(--kp-white);
    box-shadow: var(--shadow-cell-icon);
    flex-shrink: 0;
}

.cell-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ---- Grid + button loading states (AGENTS.md JS contract; kpAdmin.showGridLoading/hideGridLoading/
   showBtnLoading/hideBtnLoading in site.js, Task 6). Reuses the .skeleton/.skeleton-text shimmer
   primitives defined above -- this only adds the overlay host and the button spinner. ---- */
.grid-loading-host { position: relative; }

.grid-loading {
    position: absolute;
    inset: 0;
    background: var(--color-bg-surface);
    padding: var(--kp-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-sm);
    z-index: 5;
}

/* Button loading state — spinner BESIDE the label, label stays readable (owner order 2026-08-09;
   replaces the former overlay that blanked the caption with color:transparent). This is the adopted
   portal reference's own treatment: .ref-mobile-cta is a centered flex row whose FIRST child is the
   .ref-mobile-spinner ring, with the caption untouched (subscribersPortal-KuwaitMail
   css/app.bundle.css, the .ref-mobile-* block). We port the MECHANISM, not the markup — a
   ::before is a genuine in-flow child, so it lands as the leading item of a flex/grid button and as
   the leading inline box of a plain text button; nothing is layered over the caption any more.
   Ring colour is derived from currentColor rather than fixed tokens: the reference paints white at
   0.4 alpha with a solid-white head on its navy CTA, which is exactly what currentColor yields on
   our navy buttons, while a ghost/secondary/danger button automatically gets an ink-coloured ring
   of its own text colour — and no literal from the package is copied (Core Rule 3: components.css
   stays hex-free). color-mix() is the alpha mechanism because a custom property cannot
   parameterise an unknown colour's alpha (same limitation tokens.css records at its gradient stops);
   it is Baseline in every browser this ships to and is verified computed live, not assumed.
   Size stays 16px — the generic ring size across all consumers here; the reference's 17px is the
   one-off of its mobile CTA. Head stays on the inline-start edge (the reference's is on top): on a
   continuously spinning ring that is a starting-phase difference only, so it is left alone. */
.btn-loading {
    pointer-events: auto;

    /* AND IT STAYS VISIBLE ABOVE THE REGION ITS OWN PRESS REPAINTS (ruling 15 #198c, 2026-09-11). The
       ruling asks for both signals at once -- the spinner on the pressed control until the answer lands,
       AND the region's skeleton -- and they collided: a grid's loading overlay is opaque, covers the whole
       scroller including the header row, and sits one layer up, so a locked sortable header painted its
       ring underneath and nobody saw it. One rule here lifts every locked control in both apps, which is
       the reach the ruling asks for; cutting the overlay away from the header row instead would have to be
       re-derived per grid from a header height nothing guarantees. Exactly one layer above that overlay,
       so the control clears the skeleton and the sticky header corners below it and nothing else. */
    position: relative;
    z-index: 6;
}

/* The 2026-08-27 disabled-cursor rule also covers the deeper search and filter families.
   Dated 2026-09-24: the repeated-class rule below (2026-09-17) now reaches these families too, at equal or
   higher weight and with the same value, so this list names them rather than being the only rule painting it.
   Dated 2026-11-01: the launcher's search family left this list with the launcher (owner ruling 15 #904(a)). */
.search-box .search-clear.btn-loading,
.table-search-inline .search-clear.btn-loading,
.page-search .search-clear.btn-loading,
.filter-bar select.btn-loading {
    cursor: not-allowed;
}

/* AND THE POINTER SAYS SO ON EVERY LOCKED CONTROL, NOT ONLY WHERE NOTHING ELSE COMPETES (ruling 15 #198c;
   browser evidence over the payments and error-log pages, 2026-09-17). This declaration used to sit in the
   (0,1,0) rule above, where it was true as a statement and false as a paint: page rules matched the same
   controls and outranked it, so a search-clear button, Refresh, the second search-clear family and the
   shared column chooser's Reset item each spun their ring while the pointer still read `pointer` -- the
   ring saying "working" and the cursor saying "press me" at the same moment.

   COUNTED RATHER THAN HOPED, against the four measured winners:
     .page-search .search-clear         admin site.css, (0,2,0) -- beat (0,1,0) on specificity
     .btn-refresh                       admin site.css, (0,1,0) -- tied, and beat it on sheet order
     .search-box .search-clear          admin site.css, (0,2,0) -- beat (0,1,0) on specificity
     .col-chooser-menu .dropdown-item   this file,      (0,2,0) -- beat (0,1,0) on specificity
   The class repeated three times weighs (0,3,0) and outranks all four outright, so sheet order stops
   deciding anything here and not one page selector had to be edited. It also clears (0,2,2), the heaviest
   weight either admin sheet gives this property at the page layer; the only heavier rules carry
   `:not(:disabled)`, which the lock's own `disabled = true` extinguishes before they can match.

   REPEATING THE CLASS IS THE MECHANISM, not a typo: it is the one way to raise a rule's weight that leaves
   the set of elements it matches exactly as it was. That is what this state needs, because the controls
   taking the lock share neither an element name nor a disabled state -- a <button> (the four above), a
   <label> (the chooser's per-column rows, which take no lock yet and would inherit this defect the day they
   do), and a <th> (the identity header on the eighteen grids that freeze it, which no selector can reach
   through `:disabled` at all). An `!important` would also have reached them, and would have taken this
   property away from every future page that legitimately needs it.

   ONLY THE CURSOR MOVES HERE. pointer-events, position and z-index stay in the rule above at (0,1,0) on
   purpose: raising those would change which rule wins for a locked menu item and for the frozen header
   cell, and neither of those is what this correction is about. */
.btn-loading.btn-loading.btn-loading {
    cursor: not-allowed;
}

/* Ruling 15 #198c, 2026-09-21: "only the cursor moves here" misses controls that also carry
   .dropdown-item: Bootstrap's disabled rule suppresses their hit target at (0,2,0).
   A locked item keeps pointer delivery at the same weight in this later sheet; the shared
   lock still refuses another press. A disabled item without the lock keeps Bootstrap's rule. */
.dropdown-item.btn-loading {
    pointer-events: auto;
}

/* AND THE CELL RISES WITH A CONTROL LOCKED INSIDE IT (ruling 15 #198c, 2026-09-11, the same day as the
   lift above and measured after it). A lift only escapes an overlay from INSIDE the overlay's own
   stacking context. A grid header cell is `position: sticky`, which creates a stacking context
   unconditionally, so the clear-sort button nested in it was compared only against its siblings within
   that cell: it computed z-index 6 with a running spinner, and the whole cell was still painted at the
   header's own level, under the opaque loading overlay. Measured in both languages: the paint stack read
   overlay > button > header, and nothing of the pressed control was on screen for the whole in-flight
   window -- which is the state the ruling forbids.

   The cell is therefore lifted whenever it CONTAINS a locked control, which is the same answer the row
   menu's own block above already records for the frozen cell that holds it.

   SPECIFICITY, counted rather than hoped: the frozen corner rules further up declare `z-index: 4` on
   `thead th:first-child` / `th:last-child` at (0,2,2), and EIGHTEEN grids freeze their identity column -
   which is the sortable one, and the one whose header carries a clear-sort control. Both selectors below
   weigh (0,2,2) as well (one class in the table name, one in the argument or the lock, two elements), so
   they tie with the corner rules and win on SOURCE ORDER alone. That is why this block is declared after
   them and must stay there; the governance arm that covers this rule asserts the order for that reason.

   The first selector is the header's OWN press: a `th` that takes the shared lock directly is also a
   corner on those eighteen grids, where the bare `.btn-loading` rule above weighs only (0,1,0) and would
   leave the pressed header at 4, under the overlay. The second is the nested control this was measured
   on. Order within the list is otherwise immaterial, and it keeps the `.btn-loading` text off the line
   that opens the declaration block. */
.table-custom thead th.btn-loading,
.table-custom thead th:has(.btn-loading) {
    z-index: 6;
}

/* AND THE FROZEN BODY CELLS RISE THE SAME WAY (ruling 15 #198c; dated 2026-09-29). The block above answers the
   header row, and a body cell frozen at either edge is the same trap: it is `position: sticky` at layer 2, so it
   is a stacking context of its own, and a control locked inside it is compared only with its siblings in the
   cell while the whole cell is painted under the loading overlay's 5. That is the case whenever a row action's
   save is answered and the grid reload raises the overlay while the control is still locked, and on Shipments
   whenever the identity cell's detail button is locked while the grid is reloading.

   WHICH CELLS. The frozen Actions cell on both table variants, and the frozen identity cell on the variant that
   freezes it. A census of the nineteen admin views whose table carries `--sticky-edges` (2026-09-29) found one
   identity cell holding a control the shared lock takes, the Shipments grid's detail button; the Branches
   identity cell holds a mail link, which starts no request, and the other seventeen hold no control.

   SPECIFICITY, counted: each selector below weighs (0,3,2) -- the variant class, the structural pseudo-class and
   the one class inside `:has()`, over `tbody` and `td`. That TIES the frozen rules further up that put these
   cells at 2 (`td:first-child:not(.empty-state)` and `td:last-child:not(.empty-state)`, also (0,3,2)), so this
   block wins on SOURCE ORDER and must stay after them. It LOSES to every 1051 lift on the Actions cell by
   WEIGHT, not by order: the open kebab's `tr.row-dropdown-open td:last-child` weighs (0,3,3), and the hovered
   audit tooltip's and the open phone row menu's `:has()` selectors weigh (0,4,2), so a cell holding an open
   menu and a locked control at once stays at 1051. The governance arm over this sheet asserts the weights and
   the order.

   THE SIDE EFFECT, as a bound. A lifted body cell paints above the header cells (the frozen corners at 4)
   wherever the two overlap, and they overlap only if the header row sticks in the block axis over a scrolling
   body. The header sticks to the top of its nearest scroll container, the grid scroller (its `overflow-x: auto`
   makes the other axis `auto` as well); no rule in this sheet or the admin site sheet caps that scroller's block
   size (census 2026-09-29, pinned by the same arm), so its content never overflows vertically, the header never
   leaves its own row, and a locked row cannot pass under it during the lock. A grid that capped its scroller's
   height would reopen that overlap for the length of a lock, and the arm refuses such a rule. */
.table-custom--sticky-actions tbody td:last-child:has(.btn-loading),
.table-custom--sticky-edges tbody td:last-child:has(.btn-loading),
.table-custom--sticky-edges tbody td:first-child:has(.btn-loading) {
    z-index: 6;
}

/* Layout fallback, deliberately at ZERO specificity via :where(). Each property lands only where the
   button's own family is silent about it, so nothing already designed is overridden:
   family declares display + gap (.btn-primary, .ref-primary, .drawer-act …) → both kept;
   declares display only (.dc-ticket-action-cta) → keeps its display, gains a gap for the ring;
   declares neither (.btn-apply, .btn-reset, .ref-login-retry are plain UA inline-block text
   buttons) → becomes the reference's centered flex row. A margin on the ring instead would have
   doubled up with every family gap.

   AND IT REACHES NO FORM CONTROL (the 2026-09-12 page audits, ruling 15 #198c). Since that round a toolbar `select`,
   a column-chooser `checkbox` and the include-inactive `checkbox` take the same lock. The flex row buys them nothing,
   while an author rule at zero specificity still beats the browser's own sheet and would restyle a widget the browser
   draws itself; their disabled state is the check family's own paint (`.form-check-input:disabled` below). CORRECTED
   2026-10-01: a chooser box is a `form-check-input`, drawn by the framework with `appearance: none`, so it DOES make
   the ::before the ring rule below paints (Chromium, Admin Users, 1440, both languages: a 16 x 16 ring spinning over
   the disabled box while its save is out, none at rest; the other two were not measured). The exclusion sits INSIDE
   :where() (specificity unchanged); the same reasoning is why `th.btn-loading` re-declares `display: table-cell`. */
:where(.btn-loading:not(input):not(select):not(textarea)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
}

.btn-loading::before {
    content: '';
    flex-shrink: 0;      /* a tight flex button must never squeeze the ring into an ellipse */
    align-self: center;  /* inert outside flex; centers the ring on families that leave align-items at stretch */
    width: 16px;
    height: 16px;
    border: 2px solid color-mix(in srgb, currentColor 40%, transparent);
    border-inline-start-color: currentColor;
    border-radius: var(--kp-radius-full);
    animation: kp-btn-spin .8s linear infinite;  /* the reference refSpin timing (was .6s) */
}

/* Icon-only buttons (admin grid actions, portal ticket actions) have no caption for the ring to sit
   beside, so it REPLACES the icon: visibility keeps the icon's box, so a 34px action button cannot
   resize mid-request. showBtnLoading adds this modifier when the button renders no visible text —
   both apps' helpers apply and remove exactly the same two classes. */
.btn-loading--icon {
    position: relative;
}

.btn-loading--icon > * {
    visibility: hidden;
}

.btn-loading--icon::before {
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: 50%;
    margin-inline-start: -8px;
    margin-block-start: -8px;
}

/* THE PRESSED FILTER BUTTON KEEPS ITS REST BOX (ruling 15 #198c; measured 2026-09-24 on the Shipments filter
   panel at 1440 x 900, and the same day on the /Appointments and /AuditLog filter panels at 1440 and 1024 in
   Arabic, where the grid below each panel also moved down about 40.9px for the whole held read).
   The shared lock paints its ring in flow beside the label, which grew a pressed Apply or
   Reset by the ring and its gap (16px + 8px). The actions cell is ONE grid track, and the Arabic pair rests at
   201.67px inside the 204.4px track it gets there, so while the read was held the pair needed 225.67px and Reset
   dropped under Apply: the layout moved under the reader's press. The track floor is fixed (`minmax(180px, 1fr)`),
   so a cell forbidden to wrap would not widen its track; it would spill into the gap and over the neighbouring
   control. The room is taken inside the pressed button instead: its inline padding falls from 20px to one spacing
   step on each side, and 8 + 16 (ring) + 8 (the lock's gap) + 8 = 40 = 20 + 20, so the pressed box is the rest
   box to the pixel, in both languages and at every width. The label moves 12px toward the inline end inside a
   button that does not move.
   Nothing at rest changes. Two stated bounds: where the Arabic pair already wraps at rest (a track narrower than
   201.67px), the pressed state wraps exactly as the rest state does; and a page that re-pads the pair with its
   own id-scoped rule keeps that padding under the lock and grows by the ring again (Branch Users does: its own
   rule re-pads the pair to 12px below 1400px, so its pressed button is 24px wider than its rest box there).
   Dated 2026-09-24, later the same day: that page, Branch Users, now carries its own pressed rule in the same
   width tier (padding-inline: 0, since 12 - (16 + 8) / 2 = 0), so no page grows by the ring today; the check
   beside this rule computes any page's growth from the sheets and refuses one that is not written down.
   Declared here with the lock family it adjusts, after the lock's own rule.
   Dated 2026-09-28 (owner ruling #296): the pair now RESTS at 12px of inline padding in the actions cell (the
   rule beside the Reset family), so it no longer wraps at rest and the first bound above no longer arises; the
   trade follows the rest down to a zero pressed padding, 0 + 16 + 8 + 0 = 12 + 12, the value Branch Users'
   own pressed rule already carried in its tier. The ring then sits against the button's inline-start edge and
   the label against its inline-end edge while the read is held. This rule weighs the same as the rest rule and
   wins by coming after it. */
.filter-actions .btn-loading {
    padding-inline: 0;
}

/* A PRESSED BAR BUTTON KEEPS ITS REST BOX (2026-09-28; ruling 15 #198c, and the filter pair's trade just
   above applied to this bar, and declared like it with the lock family it adjusts, after the lock's own rule:
   the design-family checks read the lock's layer and hit target from the first rule that ends in the bare lock
   class, so no rule of that shape may come before it). The shared lock paints its ring in flow beside the label, 16px plus the button's
   8px gap, so a pressed button grew by 24px, and in this wrapping row a bar with less than 24px to spare pushes
   its last control onto a second line while the read is held. The Admin Users Add locks while the create
   dialog's option lists load, and a transient move of the page below by about 53px was recorded there in both
   languages, back within 700ms; that is the size of a 41.44px Export on its own line plus the bar's 12px row
   gap. The room comes out of the pressed button's own inline padding, 12px on each side, so the pressed box is
   the rest box:
     Add     22 + 22 = 10 + 16 + 8 + 10
     Export  18 + 18 =  6 + 16 + 8 +  6
     Reset   20 + 20 =  8 + 16 + 8 +  8
   The label moves 12px toward the inline end inside a button that does not move. The column chooser's toggle
   takes no rule here: it opens a menu and starts no request, so it never takes the lock. */
.filter-bar .btn-add.btn-loading { padding-inline: 10px; }
.filter-bar .btn-export.btn-loading { padding-inline: 6px; }
.filter-bar .btn-reset.btn-loading { padding-inline: var(--kp-space-sm); }

/* A SORTABLE HEADER wears the same in-flight lock as every other control that starts a request (owner
   ruling 15 #198c, 2026-09-11) -- but it is a TABLE CELL, and the layout fallback above is written at zero
   specificity for plain text buttons that declare no display of their own. An author rule at zero
   specificity still beats the browser's own sheet, so without these two lines the lock blockified the
   header out of its row for the length of the read. The cell says what it is, and the ring -- an empty
   ::before that would be an inline box outside a flex row, where width and height are ignored -- says so
   too. */

th.btn-loading { display: table-cell; }

th.btn-loading::before {
    display: inline-block;
    vertical-align: middle;
    margin-inline-end: var(--kp-space-sm);
}

@keyframes kp-btn-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    /* One arm covers both placements — the icon-only modifier reuses the same ::before. */
    .btn-loading::before { animation: none; }
}

/* ============================================================
   Branch coordinates form block (Branches-page-completion Task 4)
   — full-width coords panel + hint + disabled map-link state.
   Tokens only, logical properties, no hex. form-check/-input/-label
   are Bootstrap framework classes (loaded by _Layout.cshtml), not here.
   ============================================================ */
.form-grid-full { grid-column: 1 / -1; }

.coords-block {
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    padding: var(--kp-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-md);
}

.coords-block-head {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    font-weight: 600;
    color: var(--color-text);
}

.coords-block-head .icon { width: 16px; height: 16px; color: var(--color-text-muted); }

.coords-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-sm);
}

.coords-hint,
.form-hint {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-block: var(--kp-space-xs) 0;
}

.is-disabled {
    opacity: .5;
    pointer-events: auto;
    cursor: not-allowed;
}

/* ============================================================
   Branch view-drawer composition (Branches-page-completion Task 5)
   — read-only identity / status / contact body blocks, logical
   properties. The header gradient (.modal-drawer__head--view) is
   defined above; these are the drawer BODY sections.

   Type + row rhythm re-based on the mockup-v3 enhanced branch drawer
   (restyle wave U3, ruling 15 #137, 2026-08-02). Reference values:
   docs/reference/postOfficeAdmin-2/branches.html:118-145, with the
   package's final parity layer (css/deployed-parity-final.css:150-175)
   winning wherever it overrides that page — name 1.12rem/700/1.25,
   email .8rem, section title 13px/700 over a 10px gap, info rows
   14px/500 with 9px gaps and first-line-aligned icons. Line-height
   1.65 is inherited from the Admin body rule (wave P2,
   KwtPost.Admin/wwwroot/css/site.css) — nothing between <body> and
   these blocks re-declares it, so the reference's explicit 1.65 lands
   here without a declaration of its own.

   NOT ported, deliberately: the reference bleeds its identity band and
   every section to the panel edge (22px insets of their own, on top of
   `#viewBranchModal .modal-body { padding: 0 }`). Our drawer body keeps
   the shared 28px panel padding that U3 already targets
   (.modal-drawer .modal-body), so those insets — and the white-on-
   gradient identity treatment that depends on them — would double-pad
   here. Reference muted #94a3b8 is rejected per ruling D8: muted text
   stays on the AA-contrast --color-text-muted.
   ============================================================ */
.bd-identity {
    display: flex;
    align-items: center;
    gap: var(--kp-space-md);
    margin-block-end: var(--kp-space-md);
}

.bd-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--kp-radius-lg);
    background: var(--status-scheduled-bg);
    color: var(--color-action-primary);
    flex-shrink: 0;
}

.bd-avatar .icon { width: 24px; height: 24px; }

.bd-identity-text { display: flex; flex-direction: column; gap: var(--kp-space-xs); }

/* Unset until U3, so the branch name fell through to Bootstrap's h4 (1.5rem/500 at desktop, .5rem bottom
   margin) plus the base.css heading tracking. What this pin cures is that FRAMEWORK FALLTHROUGH — the same
   one the drawer title itself was fixed for at :2168 — NOT a size gap with that title: 1.12rem still renders
   17.92px, deliberately larger than the 16px panel title, because the reference pins 1.12rem/700/1.25 in
   both languages (branches.html:124) and the identity name outranks the panel's own title there. Its #fff
   belongs to the gradient identity band that is not ported (see the block comment). */
.bd-identity-text h4 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: normal;
}

.bd-email { font-size: .8rem; color: var(--color-text-muted); }

.bd-status-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-sm);
    margin-block-end: var(--kp-space-lg);
}

.bd-section {
    border-block-start: 1px solid var(--color-border);
    padding-block-start: var(--kp-space-md);
    margin-block-start: var(--kp-space-md);
}

.bd-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    /* --text-small IS the reference's 13px label size to the byte (0.8125rem). */
    font-size: var(--text-small);
    font-weight: 700;
    color: var(--color-text);
    margin-block-end: 10px;
}

/* The reference marks the section head with its own primary, not a muted glyph
   (branches.html:142). Its #115ee8 maps to the official navy through the wave's palette
   clause (D1) — --color-action-primary IS --kp-navy-600. */
.bd-section-title .icon { width: 16px; height: 16px; color: var(--color-action-primary); }

.bd-info { display: flex; flex-direction: column; gap: 9px; }

.bd-info-row {
    display: flex;
    /* Icons sit on the value's FIRST line, not centred against it — a wrapped address is the
       normal case here, and it is the same alignment the sibling .modal-detail-list uses. */
    align-items: flex-start;
    gap: 9px;
    color: var(--color-text);
    /* --text-ui IS the reference's 14px value size (0.875rem), same token the sibling
       .modal-detail-list .detail-value reads. */
    font-size: var(--text-ui);
    font-weight: 500;
}

.bd-info-row .icon {
    width: 16px;
    height: 16px;
    /* Optical nudge onto the first text line at 14px/1.65 (reference: margin-top 2px). */
    margin-block-start: 2px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* ============================================================
   Read-only branch schedule view (Branches-page-completion Task 8)
   — vertical lists under bd-section-title headings. Tokens only.
   ============================================================ */
.sched-view { display: flex; flex-direction: column; gap: var(--kp-space-md); }

.sched-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-xs);
}

.sched-list li {
    color: var(--color-text);
    font-size: .9rem;
    padding-block: var(--kp-space-xs);
    border-block-end: 1px solid var(--color-border);
}

.sched-list li:last-child { border-block-end: 0; }

/* ============================================================
   A11y baseline — shell (mockup style.css lines 10380-10510). Component/badge selectors from the
   mockup's lists are deferred to P3; only shell selectors that exist in our markup are included.
   ============================================================ */

/* Arabic script stays optically calm across dense shell labels (mockup 10380-10392). NOTE:
   .sidebar-brand-name stays in this selector list but is now display:none (P4 shell parity item 1 —
   the mockup shows the logo only, no wordmark; Rule 13). The entry is inert while hidden and kept
   only so the rule still applies should the wordmark ever be un-hidden; the .sidebar-brand link's
   aria-label carries the accessible name regardless. */
[dir="rtl"] :where(
    h1, h2, h3, h4, h5, h6,
    .topbar-title,
    .sidebar-brand-name,
    .sidebar-nav .nav-link,
    .nav-group-toggle,
    button
) {
    letter-spacing: 0;
}

/* WCAG 2.5.5 touch targets on SHELL controls only (mockup 10420-10438). Grid-row action buttons
   (.row-actions .btn-action, currently ~34px across 6 admin pages) are DELIBERATELY not resized in
   P2 — an unscoped `.btn-action { min-height: 36px }` would force-grow all 14 grid usages. 36px
   min-target sizing for grid action buttons is P3 COMPONENT parity, where the Task-9-style
   computed-style ritual will cover the grids. (F2)

   `.lang-toggle` LEFT THIS LIST 2026-08-03 and is NOT an accessibility regression — read its own rule
   before changing either side. It meets the same 44px target through an invisible expanded hit area
   (`.lang-toggle::after`) instead of a 44px painted box, because the two rules were in genuine conflict:
   this floor inflated the chip to 44px tall while the v3 package paints a 33.8px pill, and the owner's
   parity order 2026-08-03 (Core Rule 13, ledger 15 #137) is that the rendered package wins the PAINTED
   box. Adding `.lang-toggle` back here re-breaks that parity and buys nothing — the target is already
   ≥44px. The floor stays for the other two controls, including `.user-profile-btn`, where it is inert
   today (the chip paints 50px) but still the declared contract. */
.sidebar-toggle,
.user-profile-btn {
    min-width: 44px;
    min-height: 44px;
}

/* A solid, offset focus indicator satisfies WCAG 2.4.7/2.4.11 on light UI (mockup 10441).
   Width 1px per owner order 2026-07-20 (was 3px).

   SCOPED AWAY FROM THE PORTAL 2026-08-11 (owner ruling 15 #157, "same as the mockup"). This rule was
   written for the ADMIN against the admin mockup, and its `!important` meant it also outranked the
   portal's own branded ring -- so the reference-shaped 2px navy ring the portal ported in this wave's
   P1 package existed in the stylesheet and never painted a pixel: a focused portal control drew this
   1px slate outline instead. The owner's ruling splits the two apps: the portal takes the design
   reference's ring, the admin keeps the 2026-07-20 order, which is its own mockup's.
   The 2026-07-20 width order is NOT reversed or weakened -- it is scoped to the app it was given for.
   `body:not(.kp-portal)` is the split: .kp-portal is on both portal layouts' <body> and on no admin
   markup, so the admin's rendered ring is byte-identical to what it was (probed both apps before and
   after: 1px slate on the admin, 2px official navy on the portal).
   The forced-colors arm further down is deliberately NOT scoped: a high-contrast user needs the system
   highlight on both apps. */
body:not(.kp-portal) :focus-visible {
    outline: 1px solid var(--color-text) !important;
    outline-offset: 3px !important;
}

/* A GRID'S OWN FOCUSABLE PARTS DRAW THE SAME RING INSIDE THEIR BOX (2026-10-20, Action Reasons page round).
   The ring above is held 3px OFF the box, and two grid parts sit where that is outside what anything paints:
   - the grid scroller (`.table-scroll`, focusable so the grid can be scrolled without a pointer) fills its
     card, `.table-wrapper`, which clips (`overflow: hidden`, its rounded corners depend on it), so the
     ring's sides and its bottom were thrown away and only its top line showed;
   - a sortable header sits at the top of that scroller, which clips on both axes as any sideways scroller
     does, so every header's ring lost its top edge, and the first header its inline-start side too.
   Neither clip is the thing to change. These two draw the ONE ring -- the same 1px ink line -- inside their
   own box instead: the scroller on its own edge (the shape the Terms sections scroller already carried at
   phone width, Admin site.css), the header 3px inside its edge, the same breathing room the ring keeps
   elsewhere. Specificity outranks the rule above, which carries `!important` as these do. */
body:not(.kp-portal) .table-scroll:focus-visible {
    outline-offset: -1px !important;
}

body:not(.kp-portal) .table-scroll .th-sortable:focus-visible {
    outline-offset: -4px !important;
}

/* A composite search is one control: its container's :focus-within ring remains the visible focus
   indicator, so the nested input does not paint a second rectangular ring inside that rounded container. */
body:not(.kp-portal) .page-search input:focus-visible,
body:not(.kp-portal) .table-search-inline input:focus-visible {
    outline: none !important;
}

/* Bootstrap's .nav-link:focus-visible paints a blue halo beneath the admin's ruled 1px ink ring.
   Owner order 2026-07-20 and 15 #157 keep one palette-clean admin ring, scoped away from the portal. */
body:not(.kp-portal) .nav-link:focus-visible {
    box-shadow: none;
}

/* The same halo one control over — every dialog's close button. Bootstrap declares it on plain :focus
   (`.btn-close:focus { box-shadow: var(--bs-btn-close-focus-shadow) }`, that variable being
   `0 0 0 0.25rem rgba(13, 110, 253, 0.25)`), so a MOUSE press painted the off-palette halo on its own —
   :focus-visible does not match a button focused without a key, so the ruled ink ring was not there to
   sit over it — and a keyboard press painted it beneath the ring. Owner order 2026-07-20 and 15 #157
   keep one admin ring. :focus, not :focus-visible, because the vendored rule this answers is on :focus.
   The outline is deliberately untouched: Bootstrap's own `outline: 0` on the same rule already loses to
   the admin ring's `!important`, which is what the measurement showed painting. Wins over the vendored
   sheet twice over — higher specificity (0-3-1 against 0-2-0) and, were they equal, the admin layout
   links components.css after bootstrap(.rtl).min.css. Scoped away from the portal like its sibling
   above: no portal view renders a .btn-close today, and if one ever does it takes the portal's own ring
   rather than an admin ruling. Design sweep D31 round 3 N-S33-2 (2026-08-30). */
body:not(.kp-portal) .btn-close:focus {
    box-shadow: none;
}

/* The same halo, one control further on -- every admin switch and checkbox. Bootstrap declares it on
   `.form-check-input:focus`, i.e. on plain :focus like the close button above, so a MOUSE press painted
   the off-palette blue halo on its own and a keyboard press painted it beneath the ruled ink ring. Owner
   order 2026-07-20 and 15 #157 keep one admin ring. Measured on the Settings row toggles, the
   add-a-setting drawer's two switches and the Branches create drawer, 2026-08-30. Scoped away from the
   portal like its siblings above: the portal keeps its own ring vocabulary. */
body:not(.kp-portal) .form-check-input:focus {
    box-shadow: none;
}

/* The two paints the halo left behind on a control that reads off: Bootstrap's focus blue on the border and, on a
   switch, on the thumb, measured on the App Settings staff switches (Core Rule 13 palette clause, 2026-11-04). A refused
   checkbox keeps its refusal border. */
body:not(.kp-portal) .form-check-input:not(.is-invalid):focus {
    border-color: var(--color-action-primary);
}

body:not(.kp-portal) .form-switch .form-check-input:not(.is-invalid):focus:not(:checked) {
    --bs-form-switch-bg: var(--switch-thumb-focus);
}

/* And the FILL the same control paints once it is checked (design sweep 2026-08-30, N-P1-10). The rule
   above removed Bootstrap's blue focus HALO and left its checked background and border at the framework's
   own `#0D6EFD`, so every admin checkbox and switch went blue the moment it was ticked, on pages whose
   entire chrome is the official navy -- measured on the Subscription Plans create form and on the Settings
   switches alike. The palette clause (Core Rule 13) says an adopted value is re-expressed in official
   tokens, so this reads --color-action-primary rather than any literal. Family-wide by design: one rule,
   every admin boolean; scoped away from the portal like its three focus-ring siblings above. */
body:not(.kp-portal) .form-check-input:checked {
    background-color: var(--color-action-primary);
    border-color: var(--color-action-primary);
}

/* 2026-08-31, D12 enabled twin: an admin form-check label that activates an enabled checkbox or switch
   carries the pointer promised by that action. Disabled controls keep their non-action affordance. */
body:not(.kp-portal) label.form-check:has(.form-check-input:not(:disabled)) {
    cursor: pointer;
}

/* 2026-09-11: the CONTROL itself, which the label twin above had been promising for since 2026-08-31.
   Every admin checkbox and switch computed `cursor: default` -- measured on the thirty-four
   Notifications-tab switches, the account menu's switch and the Roles permission matrix -- so the hand
   appeared over the label and vanished the moment the pointer reached the thing it activates. One rule
   at the family level rather than per page: the column chooser had carried exactly this declaration for
   its own menu, which is how a family behaviour ends up looking like a local fix.
   The disabled twin is the mirror of the D16 ruling (a disabled control never shows the hand) and has to
   be written here, because `:not(:disabled)` only withholds the pointer -- it does not say what a
   refused control should show. Scoped away from the portal like every sibling in this block: no portal
   view renders this class today, and if one ever does it takes the portal's own affordance vocabulary. */
body:not(.kp-portal) .form-check-input:not(:disabled) {
    cursor: pointer;
}

body:not(.kp-portal) .form-check-input:disabled {
    cursor: not-allowed;
}

/* 2026-09-11, the SIBLING-LABEL form of the same twin. The 2026-08-31 rule reads `label.form-check`, which
   is the WRAPPING shape only: a label bound to its control by `for=` and sitting BESIDE it -- the account
   menu's e-mail switch is written that way -- kept the arrow over the words while the control beside them
   had just been given the hand. Written as the relation the markup actually has, a following sibling inside
   the family's own wrapper, so any admin surface that binds a label this way inherits both halves. */
body:not(.kp-portal) .form-check-input:not(:disabled) ~ .form-check-label {
    cursor: pointer;
}

body:not(.kp-portal) .form-check-input:disabled ~ .form-check-label {
    cursor: not-allowed;
}

/* And the WRAPPER around a disabled control, because a disabled input takes no pointer events at all: the
   element the pointer actually reaches is the .form-check box, whose own cursor said nothing. The refusal
   has to be readable where the pointer LANDS (the 2026-08-27 disabled-cursor ruling; the disabled kebab
   item and the disabled map link are the same mechanism, each fixed on its own hit target). */
body:not(.kp-portal) .form-check:has(.form-check-input:disabled) {
    cursor: not-allowed;
}

/* 2026-09-11, the THIRD shape in this family: the BARE WRAPPING label. The two rules above reach a label
   that carries the family class and a label bound by `for=`; a plain `<label><input type="checkbox"> text
   </label>` carries neither, so its control and its words both said `default` while the control was live
   -- measured 2026-09-11 on the shipments dual-box radios, the shipments notify checkbox and every option
   the role and branch pickers build at runtime. Written on the relation the markup has (the label wraps its
   own control) rather than on a class, because the runtime-built options carry no class this family knows
   and adding one to them would change their geometry.
   SPECIFICITY, checked rather than assumed: these weigh more than `.form-toggle` (0,1,0) and
   `.form-toggle:has(:disabled)` (0,2,0), so they WIN on a toggle as well -- and they declare the same value
   that toggle already resolved to in each state, which is why nothing visible moves there. The enabled rule
   excludes a disabled control so the two states can never both match one label.
   BOUND: `:has()` asks whether the label holds ANY matching control, so a label wrapping two controls in
   different states would take the enabled reading -- the same choice `.form-toggle:has(:disabled)` already
   makes. Every label in this family wraps exactly one. */
body:not(.kp-portal) label:has(> input[type="checkbox"]:not(.form-check-input):not(:disabled)),
body:not(.kp-portal) label:has(> input[type="radio"]:not(.form-check-input):not(:disabled)) {
    cursor: pointer;
}

body:not(.kp-portal) label:has(> input[type="checkbox"]:disabled),
body:not(.kp-portal) label:has(> input[type="radio"]:disabled) {
    cursor: not-allowed;
}

/* And the control inside such a label, for the reason `.form-toggle input` already states: the label holds
   both states, so a control that takes its cursor from the label it lives in can never disagree with it. */
body:not(.kp-portal) label > input[type="checkbox"]:not(.form-check-input),
body:not(.kp-portal) label > input[type="radio"]:not(.form-check-input) {
    cursor: inherit;
}

/* Shipments design sweep round 3 N-S3-4 (2026-08-28): the family's 3px navy focus glow, and its
   red invalid-state twin, stacked beneath the Admin's ruled 1px ink outline. Owner order 2026-07-20
   and 15 #157 keep one Admin ring: the border tint stays navy or red, while the glow is removed.
   This selector intentionally outranks .is-invalid:focus; the portal keeps the family glow. */
body:not(.kp-portal) .form-control:focus,
body:not(.kp-portal) .form-select:focus {
    box-shadow: none;
}
/* Pair-2 follow-up, 2026-08-29: D21 keeps one Admin ring; every toolbar input/select
   retains its border tint and ink outline but drops the family's second glow. */
body:not(.kp-portal) .filter-bar .search-box input:focus,
body:not(.kp-portal) .filter-bar select:focus,
body:not(.kp-portal) .filter-bar input:focus { box-shadow: none; }

[aria-current="page"] { font-weight: 700; }

[aria-disabled="true"] {
    cursor: not-allowed;
    pointer-events: none;
}

/* Design sweep round 4, 2026-08-29. A disabled control must stay the element the pointer REACHES, or the
   not-allowed cursor it declares for itself can never paint and the hit target silently becomes whatever
   wraps it. .is-disabled above says pointer-events:auto for exactly that reason, but the family rule
   directly above has the SAME specificity (0,1,0) and sits LATER in this sheet, so on the one element
   carrying both -- the branch form's disabled "open in map" link -- it won and restored
   pointer-events:none; the pointer reached the .coords-actions wrapper and read its cursor instead. This
   compound is (0,2,0), one class plus one attribute, so it outranks the family rule whatever the source
   order, and the link is inert the way it always was: no href, tabindex="-1" and a click guard in the page
   script. The family rule is deliberately NOT flipped -- three consumers still depend on its
   pointer-events:none (the launchpad's unbuilt cards, whose hover lift would start painting on something
   that is not a click target; the disabled row actions, whose localized reason lives on the wrapper the
   pointer must reach; and the portal account-type card, whose inert-under-the-mouse state is recorded from
   a live measurement). Their pending list, each with the reason it keeps the old behaviour, is in
   DesignFamilyGovernanceTests, which also resolves this cascade rather than reading one rule out of it.
   Dated 2026-11-10: the launcher page left with owner ruling 15 #904(a); the first of the three is now the Home
   page's one unbuilt quick-action card, the same kind of card, so the three consumers and the family rule stand. */
.is-disabled[aria-disabled="true"] {
    pointer-events: auto;
}

/* Design sweep round 4, 2026-08-29. A read-only drawer greys every control it renders and hides its Save,
   so the pointer reaches 26 fields that cannot be typed in. They said nothing: a real disabled control
   keeps the UA default cursor, which is the ordinary arrow. Same mechanism-based rule as the disabled row
   action and the disabled kebab item above -- a control the pointer can reach but not use says so. Scoped
   to a drawer whose head carries the view mode, so an edit drawer is untouched; the portal renders no
   .modal-drawer at all (verified across its views and scripts, 2026-08-29), so this family cannot reach it.

   WIDENED 2026-08-30 (design sweep pair 2, round 1). The view-mode scope was right for the read-only case
   it was written for and wrong as a family rule, and the measured case is an EDIT drawer: ticking the
   branch-kind flag on an admin user force-unchecks and force-disables both structural toggles, mirroring
   the database's own constraint that those flags are for head-office users only. That lock IS the
   interaction -- it is the form telling the reader why the choice just went away -- and under the pointer
   it said nothing at all. So the rule is written as the mechanism it always was: a disabled control the
   pointer can reach inside any drawer or modal says so.

   WHAT THE WIDENING NOW REACHES, censused rather than assumed. Every disabled control in an admin drawer
   is one of four kinds, and all four are meant to say not-allowed: a field greyed because the viewer may
   only look; a field locked by a business rule (this structural pair, the branch and role code fields on
   edit, the subscriber's identity fields that come from the national record); a held-but-inactive grant
   rendered ticked and inert so the reader can see a membership that survives a deactivated role; and a
   button locked while its own request is in flight, which already declares this same cursor for itself so
   nothing about it changes. The second selector carries the rule to the one admin modal that is not a
   drawer -- the audit-log details dialog, which today renders no disabled control at all -- and no portal
   view renders either class, so this family still cannot reach that app. */
.modal-drawer :disabled,
.modal-content :disabled {
    cursor: not-allowed;
}

/* AND THE SAME ANSWER EVERYWHERE ELSE IN THE ADMIN (2026-09-13) -- the rule above, generalised from the two
   surfaces it was measured on to the whole application, which is what its own census was already arguing.

   WHAT WAS MEASURED, on one live pass over the Branches and Branch Users pages with the application's own
   correct behaviour as the control group: ten controls locked during their own request computed
   `not-allowed`, and SEVEN families computed `pointer` while they were disabled -- the two grid filter
   selects, three search-clear families, the branch tab, and the row menu's items (its reorder arrows are
   disabled at rest, its schedule and manage-users items during their own request). The cursor is the
   fastest answer a reader has to "can I press this?", and those seven answered yes while the answer was no.

   WHY: the in-flight lock's own `.btn-loading` rule weighs one class, and every family that answered wrongly
   declares `cursor: pointer` at the same weight but later in the cascade (this sheet loads before the
   admin's own), or at a heavier one. Neither rule is wrong on its own page; the tie is invisible in the
   source and decides the paint. A per-family arm would have fixed exactly the families someone remembered,
   and a census of both sheets found twenty-two rules in that class, not seven -- so the answer is the
   mechanism: one layer, heavy enough that a one- or two-class component rule cannot outrank it, and light
   enough that a family with a real reason to differ still can by naming its own disabled state.

   ENABLED buttons are untouched: the admin loads Bootstrap's reboot layer, which already grants them the
   hand, and this layer speaks only about the disabled half. The portal is untouched by construction -- it is
   measured against its own reference and carries its own base layer -- and the negation is what keeps this
   out of it while still reaching BOTH admin layouts, whose body classes differ. */
body:not(.kp-portal) button:disabled,
body:not(.kp-portal) select:disabled,
body:not(.kp-portal) input:disabled,
body:not(.kp-portal) textarea:disabled,
body:not(.kp-portal) [aria-disabled="true"],
body:not(.kp-portal) .btn-loading {
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    :focus-visible { outline-color: Highlight !important; }
}

/* ============================================================
   SweetAlert2 dialog theme (P3) — colours from tokens only, never JS literals (house law). The mockup's
   swal is themed in JS via hex (confirmButtonColor/cancelButtonColor); we apply the SAME colour
   CONVENTIONS via token classes instead: navy confirm, red destructive confirm, green success icon, red
   error icon. Scoped to our .kp-swal marker (minted on EVERY focus-taking dialog popup — the admin
   dialog funnel merges it into each config it fires — plus the Admin toast title; scope sentence
   corrected 2026-08-25).
   ============================================================ */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-xs);
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-md);
    background: var(--status-alert-fg);   /* = --kp-red-600 */
    color: var(--kp-white);
    /* Same mockup type ramp as the siblings (.btn-primary / .btn-secondary above: font-size .875rem /
       weight 600 / line-height 1.45) — the missing size/line-height made this button inherit the 16px
       body size and paint ~43px tall beside its 40px Cancel sibling in shared dialog footers (plan P5,
       docs/plans/2026-08-25-post-wave-followups-plan.md, 2026-08-25). Fixed once at the family level. */
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
}
.btn-danger:hover { background: var(--kp-red-600); filter: brightness(0.94); }

/* Icon tints (SweetAlert2 draws its own icons; recolour via tokens). */
.kp-swal.swal2-popup { border-radius: var(--kp-radius-lg); }
/* The vendored toast-title rule has the same 0,3,0 specificity and loads later. The extra popup
   class makes this toast-only override outrank it, while wrapping keeps long references in the toast. */
.swal2-popup.swal2-toast .kp-swal.swal2-title {
    color: var(--color-text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* Admin toasts mark their title rather than the popup. Scope from the toast containing that marker so
   the portal's unmarked text-only toast remains unchanged (payments review, 2026-08-28). */
.swal2-popup.swal2-toast:has(.kp-swal.swal2-title) .swal2-icon.swal2-success {
    border-color: var(--kp-emerald-500);
    color: var(--kp-emerald-500);
}
.swal2-popup.swal2-toast:has(.kp-swal.swal2-title) .swal2-success .swal2-success-ring {
    border-color: var(--kp-emerald-500);
}
.swal2-popup.swal2-toast:has(.kp-swal.swal2-title) .swal2-success [class^='swal2-success-line'] {
    background-color: var(--kp-emerald-500);
}
.swal2-popup.swal2-toast:has(.kp-swal.swal2-title) .swal2-icon.swal2-error {
    border-color: var(--kp-red-600);
    color: var(--kp-red-600);
}
.swal2-popup.swal2-toast:has(.kp-swal.swal2-title) .swal2-error [class^='swal2-x-mark-line'] {
    background-color: var(--kp-red-600);
}

/* Dialog chrome trim to app scale (owner ruling R6/D4, 2026-08-25; plan P5,
   docs/plans/2026-08-25-post-wave-followups-plan.md). Library-default chrome measured out of scale beside
   the app's own modals. Vendored defaults (sweetalert2.min.css 11.14.5): title = h2:where(.swal2-title)
   at font-size:1.875em on the popup's 1rem base = 30px; icon = div:where(.swal2-icon) content-box
   5em x 5em + 2 x .25em border = 88px painted.
   TITLE: pinned to the app modal-title tuple measured from the shipped drawer-title rule
   (.modal-drawer .modal-header .modal-title): var(--text-subheading) (= 1rem / 16px), weight 700,
   line-height 1.35, letter-spacing normal. The letter-spacing is part of that tuple: the title element is
   an <h2> and would otherwise inherit base.css's culture-varying --tracking-display heading tracking.
   ICON: scaled by the same factor the title trims by — 16px / 30px default = 0.5333; 88px x 0.5333 =
   ~47px painted. One font-size on the icon container (0.534rem = 8.544px) scales every em-derived part of
   the glyph uniformly (the 5em box, .25em ring border, success-line coordinates, icon-content, margins) —
   width/height overrides alone would distort marks drawn in em coordinates.
   POPUP PADDING / BUTTON ROW unchanged: the icon's own em margins shrink with it (2.5em auto .6em),
   so the trimmed stack sits balanced without touching popup padding or the actions row.
   Scoped to NON-toast popups via :not(.swal2-toast); the toast-title override above keeps working
   unchanged. */
.kp-swal.swal2-popup:not(.swal2-toast) .swal2-title {
    color: var(--color-text);
    font-size: var(--text-subheading);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: normal;
}
.kp-swal.swal2-popup:not(.swal2-toast) .swal2-icon {
    font-size: 0.534rem;
}

/* BODY COPY (P5d, 2026-08-25): vendored default is font-size:1.125em on the popup's 1rem base = 18px —
   larger than the trimmed title above and than the app modal family's 14px body, inverting the hierarchy.
   Size pinned to var(--text-body) (0.875rem = 14px). Leading binds the app body's VERIFIED value: the
   admin body rule (KwtPost.Admin site.css) carries a literal 1.65, deliberately superseding
   var(--leading-body)'s culture-switched 1.5/1.6 (adjudication 7, ledger 15 #137, 2026-08-02), and
   .modal-drawer .modal-body declares no leading of its own — so dialog copy tracks the same 1.65 in
   BOTH languages (plan docs/plans/2026-08-25-post-wave-followups-plan.md §Package P5d). */
.kp-swal.swal2-popup:not(.swal2-toast) .swal2-html-container {
    font-size: var(--text-body);
    line-height: 1.65;
}

/* FORM CONTENT inside a dialog (browser evidence G-4, 2026-08-27): the vendored html container CENTRES
   its text, which floated a dialog form's label ~186px (EN) / 177px (AR) off its field's start edge —
   measured on the payments resolve dialog, whose shape the PoBoxRequests approve/reject/resolve dialogs
   share, so the fix is the family's one class. House forms sit the label flush at the field's start
   edge with the filter-panel's 6px gap (the measured house baseline); the wrapper opts in. */
.kp-swal .kp-swal-form {
    text-align: start;
}

.kp-swal .kp-swal-form .form-label {
    display: block;
    margin-block-end: 6px;
}

/* Branch drawer stats (2026-08-22 P7 plan; 2026-08-23 P7c evidence): rendered mockup .bd-stats
   geometry maps its 10px grid gap, 12px/14px card padding, 12px radius and compact label/value type
   onto official surface/border/text tokens. */
.bd-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-block: 16px 4px;
}

.bd-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    /* No house token resolves to the mockup's exact single layer; shadows are not palette literals. */
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.bd-stat-val {
    color: var(--color-text);
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.bd-stat-lbl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-muted);
    font-size: .74rem;
    font-weight: 600;
}

/* Keep the mockup-authored 13px label icon. Its live 20px reading is a dead generic-rule accident,
   not the component value (Core Rule 13 rendered-cascade adjudication, 2026-08-23). */
.bd-stat-lbl .icon { width: 13px; height: 13px; }
.kp-swal .swal2-success .swal2-success-ring,
.kp-swal .swal2-success [class^='swal2-success-line'] { color: var(--kp-emerald-500); border-color: var(--kp-emerald-500); }
.kp-swal .swal2-icon.swal2-success { border-color: var(--kp-emerald-500); color: var(--kp-emerald-500); }
.kp-swal .swal2-icon.swal2-error { border-color: var(--status-alert-fg); color: var(--status-alert-fg); }
.kp-swal .swal2-icon.swal2-warning { border-color: var(--status-pending-fg); color: var(--status-pending-fg); }
/* ============================================================
   PORTAL SHELL — subscriber-portal chrome (mockup rp-* parity)
   OPENER REPAIRED 2026-08-25: this banner had shipped with its
   leading /* missing, so conforming parsers swallowed the banner
   text AND dropped the .rp-shell rule that follows it.

   TARGET (since 2026-08-08): portal mockup v2,
   docs/reference/subscribersPortal-KuwaitMail — intake report
   docs/plans/2026-08-08-portal-mockup-v2-intake-review.md, rulings
   15 #148, AGENTS.md Core Rule 13 portal clause. The v1 package
   (postOffice_PublicUser_html) is diff history only; the dynamic
   theme-parity.css injection this comment used to trace is GONE —
   v2 compiles ONE bundle per page (css/app.bundle.css) with
   css/sidebar-navigation.css appended LAST and authoritative, so
   the cascade is read in that file, not reasoned about.

   Every number below was re-measured by the session lead on the
   RENDERED v2 pages at 1440 and 390, in Arabic AND English, and is
   recorded in the P1 spec table of docs/plans/2026-08-08-portal-
   restyle-waves.md. Where the package's own pages disagree, the
   MAJORITY treatment wins (Core Rule 13): the geometry here is the
   body[data-app-page] family that every signed-in v2 page except
   index.html carries, not index.html's narrower dashboard2 twin —
   our shell is ONE shared partial set, so it takes the shared shape.

   Colors: D1 palette clause — a raw package hex is never copied.
   The stale #0a47bd active marker, #1345aa mobile-active, #c95960
   sign-out family, #2da664 online dot and #ff6b4a bell badge all
   resolve to OFFICIAL navy / red / green tokens in tokens.css.

   House conversions kept: logical properties only; colors via
   tokens; mockup border grays consolidated to --color-border.

   Bands: base = desktop full 272px rail / 721-1279px compact 80px
   icon rail / <=720px no rail + the floating glass bottom-nav pill
   (+<=360px tightening). The rp-header is deliberately FLAT (no
   glass/sticky) — that is the live mockup; the glass element is the
   mobile bottom nav. Dated 2026-11-05 (15 #1037): the Portal's site.css now fixes the header above 720px.
   Dated clause 2026-10-16 (15 #429(b)): the compact 80px icon rail
   is now 721-1023px, with an opener that shows the labelled rail as
   an overlay (15 #429(c)); from 1024px the labelled 272px rail shows.
   ============================================================ */

.rp-shell { min-height: 100vh; }

/* ---- signed-in body: type + the ambient wash (parity fix wave 2026-08-11, P1.3a/b + P1.4) ----

   FONT SIZE. The reference pins every signed-in page's body to a flat 16px
   (`body[data-app-page] { font-size: 16px }`), which cancels its own Arabic 106.25% root inflation for
   everything that INHERITS. Ours inherited the inflated 17px in Arabic, so the two `font-size: inherit`
   consumers on these pages (the Subscribe/Checkout primary button and the ticket date's <b>) painted a
   pixel large. The root rule itself stays exactly as it is -- the reference declares the same one; only
   the body-level cancel was missing.

   LINE HEIGHT. The reference keys the ambient ratio to the PAGE, not the language: 1.5 on every
   signed-in page, raised to 1.625 on the dashboard, identical in Arabic and English (measured on the
   rendered reference 2026-08-11 -- ar dashboard 26px/16px, ar mailbox 24px/16px, en dashboard 26px/16px).
   Ours keyed it to the LANGUAGE instead (1.5 en / 1.625 ar via the --leading-body token), which was too
   tight on the English dashboard and too loose on every Arabic page that is not the dashboard. The
   `rp-shell--dashboard` class the layout stamps is our equivalent of the reference's own
   `body[data-static-page="dashboard2"]` hook. Signed-OUT pages are untouched: they keep the token pin in
   the portal's site.css, and this wave measured only the signed-in shell.

   THE AMBIENT WASH — OWNER RULED, 15 #156 (2026-08-11): a signed-in page background must NOT be flat
   white. The owner gave that word against a screenshot of our own deployed dashboard, and it supersedes
   BOTH flat-paper records: the July v1 measurement this block used to rest on, and the restyle P1 spec
   row that repeated it (docs/plans/2026-08-08-portal-restyle-waves.md, the `main.rp-wrap` row, now
   carrying a dated #156 pointer).
   This block used to read `body.rp-shell::before, ::after { content: none }` on that July measurement of
   portal mockup v1. Re-measured 2026-08-11 on the RENDERED v2 reference (truth order, 15 #148 D2), that
   reading does not hold either -- so the ruling and the render agree and no tie had to be broken:
   `body[data-app-page]` is `position: relative; isolation: isolate` with two fixed blurred circles at
   negative z, and they are VISIBLE -- the same screenshot with and without them differs by up to 133/255
   per channel, and the top-left corner pixel reads a blue wash (170,194,236) with them against flat paper
   (248,250,252) without. That wash is also what makes our own glass cards read as glass: `.dc-ticket`
   carries `backdrop-filter: blur(22px)`, which had nothing to act on while the kill was in place.
   `isolation: isolate` is the mechanism, not decoration: it makes the body a stacking context so the
   negative-z pseudo-elements paint ABOVE the body's own paper instead of behind it.
   THE GEOMETRY IS THE REFERENCE'S, NOT base.css's: 55vw capped at 720px (ours was 60vw uncapped),
   blur 120px (100), opacity .55 (.45), a real circle, and NO drift animation -- the reference's blobs do
   not move, so the base layer's 18s/22s loops are switched off here rather than inherited.
   THE INSETS ARE PHYSICAL ON PURPOSE -- a recorded deviation from the house logical-properties rule
   (Core Rule 13, mockup supremacy, on a measured rendered fact): the reference anchors the blue circle
   to the physical top-left and the gold one to the physical bottom-right in BOTH directions, and that
   choice is visible, because the rail covers whichever corner sits at the inline start. Logical insets
   would swap which colour the reader sees in Arabic. `inset: auto` first, because base.css sets the
   logical insets on the same pseudo-elements and logical/physical insets cascade onto one used value --
   without the reset, Arabic would carry both a left and a right offset on a fixed-width box.
   Auth pages are untouched: they never carry .rp-shell, so they keep base.css's own drifting wash. */
body.rp-shell {
    position: relative;
    isolation: isolate;
    font-size: 16px;
    line-height: 1.5;
}
body.rp-shell--dashboard { line-height: 1.625; }

body.rp-shell::before,
body.rp-shell::after {
    content: "";
    position: fixed;
    z-index: -1;
    inset: auto;
    inline-size: min(55vw, 720px);
    block-size: min(55vw, 720px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: .55;
    pointer-events: none;
    animation: none;
}
body.rp-shell::before { top: -18vw; left: -18vw; background: var(--gradient-wash-a); }
body.rp-shell::after { right: -18vw; bottom: -18vw; background: var(--gradient-wash-b); }
/* The reference widens both circles to 95vw on phones (app.bundle.css ≤720 tier). */
@media (max-width: 720px) {
    body.rp-shell::before,
    body.rp-shell::after { inline-size: 95vw; block-size: 95vw; }
}

/* ---- side rail ---- */
.rp-aside {
    position: fixed;
    z-index: 20;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--kp-portal-rail-w);
    display: flex;
    flex-direction: column;
    padding: 25.5px 8.5px 12px;
    background: var(--portal-rail-bg);
    /* THE GROUND UNDER THE GRADIENT (fix package E, 2026-08-12). --portal-rail-bg is a gradient that
       fades white to rgba(255,255,255,.647) over its last 16%, and the `background` shorthand above
       resets background-color to transparent -- so that final ~44px of a 272px rail composited over
       the PAGE WASH and the rail's inner edge dissolved into it instead of ending hard. The rendered
       reference declares the same gradient over `background-color: rgb(255,255,255)`; measured on both
       sides at every width >=750 in both languages, ours read `rgba(0,0,0,0)` and its read
       `rgb(255,255,255)`. Declared as a longhand AFTER the shorthand on purpose: the shorthand is what
       zeroes it, so the order is the fix. */
    background-color: var(--kp-white);
    border-inline-end: 1px solid var(--color-border);
    overflow: hidden;
    /* The rail keeps Arabic glyphs at their natural size: v2's sidebar-navigation.css turns
       font-size-adjust OFF here (it is .48 on the body), so the 14px row labels paint at the same ink
       height as the mockup's. Without this the ar rail renders visibly larger than the target at an
       identical computed font-size.
       (Dated clause 2026-10-16: our labelled rail now shows from 1024px, 15 #429(b); this rule carries
       no media scope, so the measured `none` below holds for the whole labelled band and for the opener's
       overlay alike. The 1280 below is the reference's own tier.)
       IT IS NOT RE-ENABLED ABOVE 1280, AND THAT IS A MEASURED RULING, NOT AN OMISSION (parity round 2,
       package B, 2026-08-12). The reference's >=1280 tier declares `font: inherit` on the label span
       (app.bundle.css:26125-26133) -- a CSS-wide keyword, so it takes whatever the parent <a> computes
       rather than turning anything back on. What the parent computes is page-dependent there, so the
       reference contradicts ITSELF between pages, and Core Rule 13's tie-breaker (majority/most-specific
       wins, choice recorded) decides it. The sweep, Arabic at 1440 over thirteen rendered reference
       pages: `index.html` alone computes 0.48 on its nav labels (ink `الرئيسية` 53.72x15); mailbox,
       payment-history, shipments, branches, archives, profile, general-settings, manage-subscription,
       notifications, history, schedule and power-of-attorney ALL compute `none` -- ink 53.77x18, which is
       byte-identical to ours. Twelve of thirteen. The dashboard's 0.48 is a specificity accident, not an
       intent: its page layer `html[dir="rtl"] body[data-static-page="dashboard2"] :where(..., a, ...)`
       (app.bundle.css:15931) weighs (0,2,2) and so outranks sidebar-navigation.css's own
       `:is(.rp-aside .rp-nav a, ...)` (0,2,1) -- and sidebar-navigation.css is the layer intake ruling
       15 #148 D2 names authoritative for this rail, compiled LAST, declaring `none` on the rail, the row
       AND the label and never re-enabling it. So `none` is the rail's target and ours already matched it.
       THE SIGN-OUT IS THE ONE EXCEPTION and it is deliberate: `.rp-logout` is a <button>, so the
       reference's `html[dir="rtl"] body[data-app-page] button` arm (0,2,2) reaches it on ALL THIRTEEN
       pages -- 0.48, ink `تسجيل الخروج` 80.17x14 everywhere, against our 88.7x16 before this round. The
       portal's site.css now carries the same element arm, which outranks this rule for that one button
       and leaves every label untouched. That asymmetry is the reference's, measured, not ours. (Dated clause 2026-10-19, the same majority rule applied to the CURRENT row's dress: of the portal mockup's rendered pages, seventeen show a current rail row, measured at 1440 in both languages; sixteen share the dress `.rp-nav a.active` carries below - a 3px bar, 9px block insets, 1px inline inset - and one, the power-of-attorney page, differs: a 3px bar at 10px block insets and 0px inline inset, with its own gradient and a glow whose colour, rgb(17,94,232), is outside the official palette. The majority dress is kept for every page, the Delegation page included (Core Rule 13).) */
    font-size-adjust: none;
}
/* RTL: v2 mirrors the WHOLE rail and counter-flips its content (app.bundle.css:1292/1299), which is
   what makes the edge gradient and the bottom artwork face the other way while text still reads
   normally -- and it is why the authored gradients above stay 90deg in both directions. Ported as
   the package's own mechanism rather than a 270deg gradient twin, because the lead's spec measures
   .rp-logout's computed transform as scaleX(-1) in ar / none in en, which only this pair produces.
   The counter-flip names .rp-nav and .rp-logout rather than the package's `> *`: our sign-out sits
   inside its antiforgery POST form (untouchable mechanics), so `> *` would land the flip on the
   FORM and leave the measured element at `none`. Pseudo-elements are not matched by either
   selector, so .rp-aside::after keeps the parent's mirror -- which is exactly the intent. */
[dir="rtl"] .rp-aside { transform: scaleX(-1); }
[dir="rtl"] .rp-aside > .rp-nav,
[dir="rtl"] .rp-aside .rp-logout { transform: scaleX(-1); }
/* The rail's opener (15 #429(c), 2026-10-16) takes the same counter-flip as the sign-out, and for the same
   reason composes the house press ONTO it: this rule outweighs the press base layer, so without the second
   line an Arabic press would show no scale at all. Centred in the rail, the mirror maps it onto itself. */
[dir="rtl"] .rp-aside .rp-rail-toggle { transform: scaleX(-1); }
[dir="rtl"] .rp-aside .rp-rail-toggle:active { transform: scaleX(-1) scale(.98); }
.rp-aside::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block-end: -8px;
    inset-inline: 0;
    height: 390px;
    background: url('../img/sidenavBg.png') bottom / 100% auto no-repeat;
    /* v2's last layer lowers the artwork from .5 to .4 (sidebar-navigation.css:271). */
    opacity: .4;
    pointer-events: none;
}

/* ---- rail nav ---- */
/* Flex column + flex:1 (not the old 2-D grid): the rows are fixed-basis flex items in v2 and the nav
   takes the column's free space. The sign-out's bottom pin itself is declared on its wrapping form
   (`.rp-aside > form { margin-block-start: auto }`, the sign-out block below), not here. */
.rp-nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 2.125px;
    overflow-y: auto;
}
.rp-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8.5px;
    min-height: 55.25px;
    flex: 0 0 55.25px;
    padding: 2.125px 8.5px;
    color: var(--kp-portal-nav-ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 22.75px;
    letter-spacing: normal;
    border-radius: var(--kp-radius-lg);
    transition: background .18s, color .18s;
}
/* v2 hover keeps the slate ink and only washes the row -- the package ALSO authors a
   `.rp-nav a:hover{color:var(--blue)}` rule in an earlier layer, but sidebar-navigation.css
   overrides it, so the rendered winner is #0f172a. Never port the losing navy-ink rule. */
.rp-nav a:hover { background: var(--kp-portal-nav-hover-bg); color: var(--kp-portal-nav-active-ink); }
.rp-nav a.active { background: var(--portal-nav-active-bg); color: var(--kp-portal-nav-active-ink); }
/* Only the ACTIVE row's label goes heavy (600 -> 800); the row box itself stays 600 in both states. */
.rp-nav a.active > span { font-weight: 800; }
.rp-nav a.active::before {
    content: "";
    position: absolute;
    inset-block: 9px;
    inset-inline-start: 1px;
    width: 3px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-nav-active-bar);
}
.rp-nav a > span { letter-spacing: normal; white-space: nowrap; }
.rp-nav img {
    width: 31px;
    height: 31px;
    margin-inline: 10px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-portal-nav-icon));
}

/* ---- ACCOUNT section divider ---- */
.rp-account {
    display: flex;
    align-items: center;
    min-height: 33.25px;
    flex: 0 0 33.25px;
    gap: 8.5px;
    margin: 0;
    padding: 12.75px 8.5px 4.25px;
    color: var(--kp-portal-section-label);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
}
/* Tracking + uppercasing are LATIN-ONLY. .18em of 10px is the measured 1.8px; Arabic never carries
   letter-spacing (house law) and v2 agrees -- it drops both the tracking and the transform in rtl. */
html[dir="ltr"] .rp-account { letter-spacing: .18em; text-transform: uppercase; }
html[dir="rtl"] .rp-account { letter-spacing: normal; text-transform: none; }
.rp-account::after { content: ""; height: 1px; flex: 1; background: var(--color-border); }

/* ---- sign-out ---- */
/* The sign-out is bottom-pinned via margin-block-start:auto, which only acts on a DIRECT flex child of
   the .rp-aside column -- the button is wrapped in its POST form (close-out fix I1), so the FORM carries
   the pin. The same margin on the button would sit in the form's block layout and resolve to 0, so it is
   not declared there (review close-out, 2026-08-08: the inert copy was removed). */
.rp-aside > form { margin-block-start: auto; }
.rp-logout {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--kp-portal-logout-border);
    border-radius: var(--kp-radius-md);
    background: var(--kp-portal-logout-bg);
    color: var(--kp-portal-logout-ink);
    font-size: 13px;
    font-weight: 700;
    /* A <button> ignores the ambient leading (UA line-height:normal beats inheritance), so the
       measured 20px is pinned here or the 40px box never resolves the same way. */
    line-height: 20px;
    letter-spacing: normal;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.rp-logout:hover {
    border-color: var(--kp-portal-logout-ink);
    background: var(--kp-portal-logout-ink);
    color: var(--kp-white);
}
/* The LTR half of this press is RETIRED here and comes from the portal's press base layer instead
   (site.css, fix package E 2026-08-12) -- it declared exactly `scale(.98)` + `.14s`, which is what
   that layer gives every button. The sentence this comment used to carry ("P1 scopes it to the one
   shell control, leaving the wider adoption to the page packages") described the decision that left
   eleven controls with no press at all, so the scoping is what changed, not the value.
   RTL composes the press ONTO the counter-flip, and that half STAYS: in v2 the press rule simply
   outranks the flip, so an Arabic sign-out visibly un-mirrors for the length of the click -- a flash,
   not a decision (measured again 2026-08-12: the reference holds matrix(0.98,0,0,0.98,0,0), losing
   its own scaleX(-1)). Composing keeps the measured press value and the measured mirror true at the
   same time; at (0,4,0) it still outranks the base layer's (0,1,1). */
[dir="rtl"] .rp-aside .rp-logout:active { transform: scaleX(-1) scale(.98); }
.rp-logout .icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* ---- content column + topbar ---- */
/* v2 moves the horizontal gutter OFF the content column and ONTO the header/wrap themselves, so both
   can centre inside a 1632px cap while the column only carries the rail offset (none without a rail: .rp-shell--no-rail, file end). */
.rp-content {
    min-height: 100vh;
    margin-inline-start: var(--kp-portal-rail-w);
    padding: 0 0 42px;
}
.rp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    height: var(--kp-portal-topbar-h);
    max-width: var(--kp-portal-content-max-w);
    margin-inline: auto;
    padding-inline: 34px;
}
.rp-header-brand { display: flex; align-items: center; gap: 14px; }
/* THE HOME LINK'S RING IS DRAWN INSIDE ITS BOX (2026-10-18). On a phone the link sits 2.5px under the window's top
   (measured at 390x844, both languages, at rest), and the shared ring - 2px wide, 2px out - reached 4px above it, so
   the window cut its top 1.5px; the content column that scrolls since 15 #595 cuts at the same edge. Inside the box the
   ring is whole at every width and nothing else in the header moves. */
.rp-header-brand > a:focus-visible { outline-offset: -2px; }
/* Fix-wave (row 113, 2026-07-18 re-judgment): mockup's conditional back chrome (react-parity.css:145 --
   theme-parity.css confirmed silent on this selector) shown on mailbox/manage-subscription/
   payment-history/notifications. Direction handling mirrors OUR OWN .user-back convention (register
   header, below) rather than the mockup's literal rotate(180deg) -- both produce the identical final
   effect (icon points toward reading-start in both languages; port the EFFECT, not the
   literal mechanism) since our base icon-arrow glyph points right (opposite of the mockup's own
   bi-arrow-left base glyph, which is why IT needs a 180deg flip and we don't). */
/* fix-wave 3 (2026-07-18 live-parity ledger item 6, L1381-1387): color/border-color -> dedicated
   tokens (tokens.css), padding + font-size set explicitly -- icon-only for us today, but set anyway
   so any text/glyph fallback matches the mockup's measured box (the 16px icon itself is unchanged). */
/* THE REST STATE IS RE-MEASURED AND RE-DRESSED (parity round 2, fix package E items E9/E9a,
   2026-08-12). P1.6a ported the reference's HOVER onto this control and recorded that "our REST
   background is already opaque white, so the white-fill half of the reference's hover is a no-op for
   us" -- true as written, and it buried the finding: the rest state differed in SIX properties, so a
   hover ported onto it could not land where the reference's lands. Both sides measured on the
   rendered mailbox and payment-history pages at 1440, 1100 and 390, ar and en, all identical:
       box      38.25 x 38.25   (ours 36 x 36)
       padding  0               (ours 1px 6px, i.e. a 22px inner column against its 36.25px)
       radius   12.75px         (ours 8px)
       fill     rgba(255,255,255,.6) glass   (ours opaque white -- the no-op above)
       border   1px rgba(255,255,255,.7)     (ours a solid #e0e5ed hairline)
       shadow   0 1px 3px rgb(0 0 0/.04) + 0 4px 12px rgb(0 0 0/.06)   (ours ONE 0 4px 11px layer)
       ink      rgb(15,23,42)   (ours #314056 -- item E9a, and the token's own comment had already
                                 recorded rgb(15,23,42) as the reference's desktop value)
   Every one is now the reference's. The transition list already matched exactly and is untouched.
   COLOUR NOTE (palette clause, 15 #148 D1): none of these are the package's stale brand literals --
   they are white-alpha glass and neutral black shadow alphas, so the reference's own values ARE the
   official expression. The ink moves onto the shipped --kp-slate-900 primitive rather than a new hex.
   The alpha values are written inline here for the same reason .rp-mobile-header-back's are (its rule
   below): tokens.css cannot express white-at-60% without minting an 8-digit hex, and the sibling
   control set the house precedent for this family. */
.rp-header-back {
    display: grid;
    place-items: center;
    width: 38.25px;
    height: 38.25px;
    /* A flex item in the header row: without this the phone tier squeezed it to 36.94px where the reference
       keeps 38.25 (portal group 1 round 1, 2026-09-09). */
    flex-shrink: 0;
    padding: 0;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: 12.75px;
    background: rgb(255 255 255 / .6);
    color: var(--kp-rp-header-back-ink);
    /* D7 (2026-07-19 fix wave): mockup back-button box metrics measured 17px/25.5 (ar) and 16px/24 (en);
       ours was a hardcoded 16px with line-height:normal (drift only in ar font-size + line-height both
       langs). 1rem resolves to the RTL-inflated 17px in ar / 16px in en, and 1.5 line-height gives the
       25.5/24 pair -- matching the mockup in both cultures via its own mechanism rather than a per-lang
       hardcode. Icon-only control today, so this is fidelity-table parity (the 16px glyph is unchanged). */
    font-size: 1rem;
    line-height: 1.5;
    /* TWO layers, not one (E9): the reference stacks a tight 1px contact shadow under a soft 12px
       ambient one, which is what keeps a glass button legible over a light wash. A single 4px/11px
       layer reads as a flat card instead. */
    box-shadow: 0 1px 3px rgb(0 0 0 / .04), 0 4px 12px rgb(0 0 0 / .06);
    /* The reference's own three-property list, measured 2026-08-11 (parity fix wave P1.6a). It used to
       come from the dashboard-polish transition list further down at .15s, which is later in the file at
       equal specificity -- the fourth time that list quietly repainted a measured timing (port the
       mechanism, not the literal), so the button left it and declares the measured value here beside its
       rest state. */
    transition: background-color .2s, box-shadow .2s, transform .2s;
}
.rp-header-back .icon {
    /* 19.125px = the reference's own 19.13 rendered box, measured on mailbox.html at 1440 AND at 390
       (its .rp-back-icon is the same size in both headers and both languages) -- and 9 x 2.125, the
       step this family's other values are built on. Was 16px; fix package C, 2026-08-12. */
    width: 19.125px;
    height: 19.125px;
    /* The arrow slides toward the reading start on hover (P1.6a). It runs on the `translate` PROPERTY,
       not inside `transform`, on purpose: the LTR mirror below is a `transform`, and a hover rule that
       re-declared `transform` would replace that mirror and turn the arrow around mid-hover. The
       individual `translate` property composes with `transform` instead of overwriting it, so one
       2.125px value serves both the mirrored and the unmirrored arrow. */
    transition: translate .2s;
}
[dir="ltr"] .rp-header-back .icon { transform: scaleX(-1); }

/* ---- phone-width back control (parity fix wave P2.4, 2026-08-11) ----
   The reference ships TWO back controls, and we shipped one. This is the second: its header() emits
   `<button class="rp-mobile-header-back" data-mobile-back>` on every signed-in page except the
   dashboard, and its bundle hides it above 720px (app.bundle.css:21610) then, at 720 and below,
   floats it at the header's inline-start as a 40x40 glass button (app.bundle.css:22804). Ours had no
   phone back affordance at all, so /Payments/Receipt, /Payments/Failed and the error page offered no
   way back at any width.
   Born hidden here and revealed only in the 720 arm, exactly as the reference does it -- so on a
   desktop this element contributes nothing at all, and the header a desktop visitor sees is byte-for
   byte the one that shipped.
   The glyph reuses the same sprite arrow and the same LTR mirror as its desktop sibling, for the
   reason that sibling's comment already gives (our base arrow points right, so LTR is the side that
   needs the flip; the reference flips the other way because its own base glyph points left). */
.rp-mobile-header-back { display: none; }
[dir="ltr"] .rp-mobile-header-back .icon { transform: scaleX(-1); }
.rp-logo { width: 151.25px; height: 51px; object-fit: contain; }
.rp-h-actions {
    display: flex;
    align-items: center;
    gap: 6.375px;
    font-size: 12.75px;
    /* v2 computes 700 here; ours declared 800 (fidelity fix, P1 spec "Font delivery" note). */
    font-weight: 700;
    line-height: 1.625;
}
/* The three topbar controls share ONE pill treatment in v2. The child combinator matches OUR element
   mix -- the language switch and the user chip are real <a> links here (server-rendered culture URL /
   profile route) where the package uses onclick <button>s; the package's own `> button` selectors
   would silently skip both, so both tag names are named. */
/* The last two selectors are the parity fix wave's honest-posture members (P2.2c/d, 2026-08-11): the
   user chip is now a non-interactive <span> and the bell is a disabled <button> inside its own hover
   surface, so neither is a direct <a>/<button> child any more. They keep the cluster's BOX -- geometry
   is unchanged, which is the whole point -- and they are deliberately absent from the hover and press
   rules just below, because a control that cannot be used must not answer the pointer like one that
   can. */
.rp-h-actions > a,
.rp-h-actions > button,
.rp-h-actions > span.rp-user,
.rp-h-actions > .rp-soon > button {
    display: flex;
    align-items: center;
    gap: 8.5px;
    min-height: 38.25px;
    padding: 0 12.75px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--color-text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color .2s var(--ease-standard),
        color .2s var(--ease-standard),
        transform .14s var(--ease-smooth-out);
}
/* One shared hover wash (a white veil over the #f8fafc body) -- v2's per-bell #eef3fb/#17243a rule is
   an earlier layer that loses to this one; never port the loser. */
.rp-h-actions > a:hover,
.rp-h-actions > button:hover { background: var(--kp-portal-topbar-hover-bg); }
.rp-h-actions > a:active,
.rp-h-actions > button:active { transform: scale(.96); }
/* The box rule above hands out `cursor: pointer`, which is right for the three live controls and wrong
   for a wrapped disabled one -- caught by this wave's own cursor probe (P2.10), which read `pointer` on
   the disabled bell while its wrapper correctly read `not-allowed`. Corrected immediately after the box
   rule so the two are read together — and ONE STEP ABOVE it, not "at the same specificity" as this line
   said until A10 (arithmetic corrected 2026-08-12): the box rule's `.rp-h-actions > .rp-soon > button` is
   (0,2,1) and adding `:disabled` here makes (0,3,1). The rule would win on source order alone; it does not
   need to, which is worth knowing before anyone reorders this block. */
.rp-h-actions > .rp-soon > button:disabled { cursor: not-allowed; }
/* v2 delivers the bell and globe as standalone <img> files with the muted slate BAKED IN, so their
   tone is independent of the control's text colour (the language word next to the globe is the darker
   --color-text). Ours are sprite <use> icons taking currentColor, so the muted tone is set here on the
   icon rather than on the control -- same painted result, and hover recolouring stays free. */
.rp-h-actions .icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--kp-portal-nav-ink);
}
.rp-h-actions .notification-bell {
    justify-content: center;
    width: auto;
    min-width: 41.5px;
    height: 38.25px;
}
/* The language switch is the one control that always shows the OTHER language's word, so its stack
   carries both families -- see --font-portal-bilingual in tokens.css. */
.lang-label {
    color: var(--color-text);
    font-family: var(--font-portal-bilingual);
    font-size: 12.5px;
    /* OFF here for the same reason v2 turns it off: this label is Latin whenever the page is Arabic,
       and the body's Arabic .48 x-height adjustment would shrink the Latin word by about a tenth. */
    font-size-adjust: none;
    font-weight: 700;
    line-height: 20.3125px;
}

/* ============================================================
   COMING-SOON POSTURE — the portal's honest dress for a control whose destination is not built yet
   (parity fix wave P2.2, 2026-08-11; owner report 2026-08-10, "clicking on profile is not opening the
   profile page").

   THE PROBLEM IT SOLVES. The reference renders these controls live because its pages all exist. Ours
   shipped them as `href="#"` stubs that lit up under the pointer, took a focus ring, took a tab stop,
   and then did nothing -- which reads as broken rather than unbuilt. A styled link pointing at "#" is
   the worst of the three available choices (build it / hide it / mark it), and the project already
   ruled the third for the mailbox archive control and the ticket share/QR buttons.

   THE MECHANISM, and why the tooltip needed fixing first. A `disabled` control swallows pointer
   events, so its own `title` never appears -- our own layout comment admitted as much ("the title is a
   bonus, not the whole explanation"), and for an ICON-ONLY control that left the user with a dimmed
   glyph and no reason at all (audit D6-09). `.rp-soon` is the fix, once, for all of them: a plain span
   wrapping the disabled control, carrying the title itself. The span is not disabled, so it receives
   the hover and the browser shows the reason -- while the control inside keeps the real `disabled`
   attribute, which is what actually guarantees it cannot be activated and, just as importantly, keeps
   it OUT OF THE TAB ORDER.

   THE WRAPPER IS THE POINTER HALF ONLY, and saying otherwise is what the independent review corrected here
   (F16, 2026-08-12). A `title` needs a hover, which a touch device never produces, and a title on a
   role-less span is part of no control's accessible name or description -- so on the subscriber
   portal's PRIMARY device, and to every screen reader, all fifteen of these controls still shipped a
   dimmed glyph with no reason. Each one now also carries the same shipped string as `.visually-hidden`
   TEXT beside the control (the shared a11y primitive further up this file), which is read in a screen
   reader's browse mode and needs neither a role nor ARIA support on a disabled element. The remaining
   gap is the SIGHTED TOUCH user, for whom only a visible affordance would answer; that is an open
   proposal in the wave ledger, deliberately not invented here.

   TAB ORDER is half the fix. Before this, a keyboard user tabbed through nine dead stops in the rail
   and the topbar before reaching the first control that works. An `<a>` without an `href` is not
   focusable and a `button[disabled]` is not focusable, so every converted item now steps aside.

   WHAT DOES NOT CHANGE: the icon, the label TEXT, the geometry and the position of every converted item
   are byte-identical to what shipped -- only the interactivity and the dimming differ, so the rail still
   reads as the reference's rail. Flipping one of these items live is part of shipping its page.
   (This sentence said "the label" flatly until F4, 2026-08-12, measured otherwise: the label's WORDS
   were unchanged, its TYPE was not -- the rows painted 16px/400 against the links' 14px/600 until the
   restated rule below gained the four declarations it had been missing.)
   ============================================================ */
.rp-soon { display: inline-flex; cursor: not-allowed; }
/* The dimmed dress for a wrapped control that has none of its own -- today that is the notification
   bell. It matches the shipped archive button's .55 (Views/Mailbox/Index.cshtml). It sits EARLY in this
   file on purpose: a family that already declares its own disabled opacity (.dc-ticket-action's .5, the
   assistant controls' .55) has an equal-specificity rule further down and keeps its own value, so
   wrapping a control never silently restyles it. The cursor lives on the wrapper because a disabled
   control cannot show one. */
.rp-soon > [disabled] { opacity: .55; }
/* A nav row that leads nowhere yet: same box, same icon, same label text, dimmed and inert. `<span>`
   instead of `<a href="#">` is what removes the tab stop and the navigation; the shared .rp-nav a rules
   do not reach a span, so the box is restated here rather than widening every one of them.
   RESTATING IS THE WHOLE COST OF THE SPAN, and the first cut under-restated it (independent-review fix round
   F4, 2026-08-12): the geometry and the colour were carried over, the TYPE and the RADIUS were not, and
   no ancestor re-pins them -- so the six converted rows painted at the body's inherited 16px/400 with a
   line-height that changed per page (26px on the dashboard, 24px everywhere else, because it came from
   body.rp-shell's own leading rather than from a row rule), and the active Profile tint had square
   corners. Measured before the fix on the live rail: the two LINKS 14px/600/22.75px/10px, the six SPANS
   16px/400/26px/0px. The four declarations below are copied from `.rp-nav a` above so the two shapes
   cannot drift again; that rule is the source, and anything added there belongs here too. */
/* Dated clause 2026-10-17 (owner ruling 15 #548): the five NAV rows - three in the rail, two in the phone bar - are
   no longer inert spans. Each is a <button> that answers a press with the coming-soon sentence (site.js, "the
   coming-soon rows"), so the dimming and the not-allowed cursor are gone: the row reads like the live rows beside it
   and takes the cursor, the press and the focus ring every portal button takes; its reason is the toast a press
   shows and the description its markup names. The box is still restated from `.rp-nav a` (and from the phone bar's
   `.rp-mobile-nav a`), now on the button, after a reset of the dress a button brings of its own - margin, border,
   background, its own font family and leading, and its centred text. The wrapped disabled controls above (`.rp-soon`)
   are a different thing and keep their posture. (Dated clause 2026-10-19: since the Delegation entry became a link for an individual account, the rail of an individual account carries two of these buttons; a company account, or a session whose account kind is not known, keeps all three; the phone bar is unchanged.) */
.rp-nav > button.rp-soon-row,
.rp-mobile-nav > button.rp-soon-row {
    margin: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: inherit;
}
.rp-nav > button.rp-soon-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8.5px;
    min-height: 55.25px;
    flex: 0 0 55.25px;
    padding: 2.125px 8.5px;
    color: var(--kp-portal-nav-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 22.75px;
    letter-spacing: normal;
    border-radius: var(--kp-radius-lg);
    transition: background .18s, color .18s;
    /* The rail paints Arabic at its natural size (`.rp-aside`, font-size-adjust: none, inherited by every row). A
       button does not inherit it: the portal's Arabic button arm (site.css, .48) reaches it first, so without this
       line the three labels would paint smaller than the links between them. (Dated clause 2026-10-19: two labels on an individual account's rail, where the Delegation entry is a link; three on a company account's rail or when the account kind is not known.) */
    font-size-adjust: none;
}
.rp-nav > button.rp-soon-row:hover { background: var(--kp-portal-nav-hover-bg); color: var(--kp-portal-nav-active-ink); }
.rp-nav > button.rp-soon-row > span { letter-spacing: normal; white-space: nowrap; }
.rp-mobile-nav > button.rp-soon-row {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 54px;
    padding: 0;
    color: var(--kp-portal-mobile-ink);
    font-size: 9px;
    font-weight: 700;
}
/* The current-position dress a row can carry, kept for the day one of these rows names the page the reader is
   on. Since 2026-10-17 it is the links' own dress, without the step of dimming the inert span carried. These are
   SEPARATE rules rather than a widening of the shipped `.rp-nav a.active` ones: dropping those to a tag-less `.active`
   would put them at (0,2,0), which the (0,2,1) `.rp-nav a:hover` rule above would then outrank on a hovered active
   LINK. Scoped to the button, at (0,3,1), they cannot reach a link at all. */
.rp-nav > button.rp-soon-row.active {
    background: var(--portal-nav-active-bg);
    color: var(--kp-portal-nav-active-ink);
}
.rp-nav > button.rp-soon-row.active > span { font-weight: 800; }
.rp-nav > button.rp-soon-row.active::before {
    content: "";
    position: absolute;
    inset-block: 9px;
    inset-inline-start: 1px;
    width: 3px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-nav-active-bar);
}
/* The rail rows' keyboard ring is drawn INSIDE the row (2026-10-17). The list (.rp-nav) is a scroll container whose
   rows are exactly as wide as it, so the shared ring's outer 4px (2px outline, 2px offset) fell outside the list's
   scrollport and both inline edges were clipped - measured at 900 and 1440 in both languages, links and the
   coming-soon buttons alike. Same outline and colour as the shared ring, only the offset turned inward. */
.rp-nav > a:focus-visible,
.rp-nav > button.rp-soon-row:focus-visible { outline-offset: -2px; }

/* ---- user chip ---- */
/* Scoped under .rp-h-actions so this beats the generic ".rp-h-actions > a" rule above
   (0,2,0 vs 0,1,1) — otherwise its gap and padding lose to the shared pill's. */
.rp-h-actions .rp-user {
    height: 38.25px;
    margin-inline-start: 4.25px;
    padding-inline: 4.25px 10.625px;
    gap: 10.625px;
}
/* The chip was a <span> from P2.2c until the profile page shipped: the reference's chip navigates to
   profile.html, ours had nowhere to go, and a pill carrying the user's own NAME that answers a click
   with nothing was the single loudest instance of the owner's report. It was never dimmed, and that
   was deliberate -- the chip is an identity display first, so dimming the signed-in user's own name
   would have read as an account problem rather than as an unbuilt page.
   CORRECTED 2026-08-13 (portal profile + settings package): the profile page HAS shipped, so the chip
   is an `<a>` to /Profile and the `cursor: default` rule that used to sit here -- keyed on
   `span.rp-user`, matching nothing since the tag swap -- is deleted rather than left as a dead rule
   under a sentence that had stopped being true. The chip now takes the pointer cursor and the hover
   treatment every other control in this cluster gets, from the shared `.rp-h-actions > a` rules, which
   is the right answer for a control that really does go somewhere. Its BOX is unchanged: that came
   from `.rp-h-actions .rp-user` below, which names no element and so survived the swap untouched. */
.rp-user-name {
    max-width: 240px; /* Dated 2026-11-01 (client item 1.2): was 140px; 180px from 721px to 1024px, the rule after this one. */
    overflow: hidden;
    color: var(--color-text);
    /* The reference forces Alexandria on the signed-in user's name in BOTH languages -- measured on the
       rendered reference 2026-08-11, ar AND en (`.rp-shell .rp-user-name` computes
       "Alexandria, sans-serif" on the English dashboard too). Alexandria carries Latin glyphs, so a Latin
       name paints correctly in it. The sibling .lang-label beside it already carries its own bilingual
       stack, which is why the name was the odd one out inside one control group.
       THE FAMILY WAS NOT "THE SINGLE UNMATCHED DECLARATION" -- that sentence shipped here on 2026-08-11
       (P1.3c) and failed its own test; corrected 2026-08-12, parity round 2 package B. The reference's
       rule is `.rp-shell .rp-user-name, .page .utility-actions .profile-name` at app.bundle.css:1074-1084
       and it carries `font-size-adjust: .48` alongside the family. That second declaration was not
       ported, so in ENGLISH -- where the body carries no adjust at all, the page being ltr -- our name
       painted unadjusted Alexandria: measured 128.38x15 against the reference's 115.95x14 at 1440, 1100
       and 900, a ratio of 1.107, the same 10.7% this round's root cause produces everywhere else. In
       Arabic ours already read 0.48 by inheritance (the chip is a <span> since P2.2c, not a <button>,
       so the UA font shorthand never reset it), which is why the miss was invisible on the language the
       census was reading. Declared unconditionally below, exactly as the reference declares it. */
    font-family: 'Alexandria', sans-serif;
    /* Unconditioned by direction on purpose -- the reference's rule is not direction-scoped either. */
    font-size-adjust: .48;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 20.3125px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 1024px) { .rp-user-name { max-width: 180px; } }
.rp-user-icon {
    display: grid;
    place-items: center;
    width: 29.75px;
    height: 29.75px;
    flex: 0 0 29.75px;
    border-radius: var(--kp-radius-md);
    background: var(--portal-user-avatar-bg);
    color: var(--kp-white);
    box-shadow: var(--shadow-portal-user-chip);
}
/* Scoped under .rp-h-actions (0,3,0) so it beats that block's own ".rp-h-actions .icon" (0,2,0) on
   SPECIFICITY rather than on source order: the chip glyph stays 17px while its siblings stay 16px, and
   the sibling rule's muted slate never lands on the glyph that has to read WHITE against the navy tile. */
.rp-h-actions .rp-user-icon .icon { width: 17px; height: 17px; color: var(--kp-white); }
.rp-online { position: relative; }
/* PHYSICAL insets, deliberately, against the house logical-properties rule (parity fix wave P2.1j,
   2026-08-11). The reference pins this dot to the avatar tile's physical bottom-RIGHT in BOTH
   languages -- measured on the rendered reference in ar and en, `right: -2.125px; bottom: -2.125px`
   with the dot 23.38px from the tile's left edge in each (app.bundle.css:1063). Ours used
   inset-inline-end, which walked the dot to the bottom-LEFT in Arabic.
   Same carve-out shape as this wave's ambient-blob layer: a presence dot is decoration on a square
   tile, not reading-order content, so the mirrored position is a divergence rather than a
   localization. Recorded here so a future parity sweep does not re-file it as a logical-property
   violation. */
.rp-online::after {
    content: "";
    position: absolute;
    bottom: -2.125px;
    right: -2.125px;
    width: 8.5px;
    height: 8.5px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-online-dot);
    /* v2 rings the dot with a box-shadow rather than a border, which is why the measured dot box IS
       8.5px rather than 8.5px plus two border widths. */
    box-shadow: var(--shadow-portal-online-ring);
}

/* ---- main wrap + page title ---- */
.rp-wrap {
    width: 100%;
    max-width: var(--kp-portal-content-max-w);
    margin-inline: auto;
    padding-inline: 34px;
}
/* THE TOP PADDING IS THE DASHBOARD'S ALONE. The reference pads its wrap only under its dashboard body hook
   (body[data-static-page="dashboard2"] .rp-wrap: 25.5px, 17px on phones); every other page opens with its
   own first element's margin -- the shared page title's 25.5/13px collapses through an unpadded wrap and
   lands the title 25.5px under the header on both sides, the mailbox heading's 14px the same way. Declared
   on the shell's dashboard class, our equivalent of that hook, after the shipped value had sat on every
   page and put each title 25.5px (phones 17px) lower than the reference -- measured on shipments and the
   mailbox (portal group 1 round 1, 2026-09-09; corrected 2026-09-09 after a second review: this comment first
   named the pickup schedule too, but that page had matched the reference's 25.5px under the old padding and
   lost it with this change -- it and the four panel pages now declare their own opening, see
   h1.pk-schedule-title and .svc-panel). The two pages that had compensated for it (payment history,
   notifications) now declare the reference's own values instead. */
.rp-shell--dashboard .rp-wrap { padding-block-start: 25.5px; }
.rp-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    margin: 25.5px 0;
    font-size: 28px;
    line-height: 34px;
    font-weight: 800;
    letter-spacing: -0.7px;
}
[dir="rtl"] .rp-title { letter-spacing: normal; }
.rp-title::before {
    content: "";
    height: 31px;
    width: 3px;
    border-radius: 2px;
    background: var(--portal-title-accent);
}

/* ---- mobile bottom nav (shown <=720px only) ---- */
.rp-mobile-nav { display: none; }

/* ---- compact icon rail: 721-1279px, and it is TWO-TIERED ----
   BAND UNCHANGED, deliberately. Intake ruling D6 phrases the compact rail as "80px at 1024-1279"
   because v2's last layer re-asserts it with !important over exactly that range -- but the range is
   only the TOP of a compact band the earlier layers already establish from 721px up
   (app.bundle.css:22770 and :24562 both set the 80px rail at 721-1279). Narrowing ours to 1024 would
   put a 272px rail on an 800px viewport, which v2 never renders.

   THE 80px RAIL IS ONE BAND BUT TWO SHAPES -- measured on the rendered v2 at BOTH 900px and 1100px
   (2026-08-08, every declared tier ported, not the base rule alone; the first pass built only the upper shape). Above 1024 the
   sidebar-navigation.css !important rules take over and the rail adopts the tight 55.25px rhythm of
   the expanded rail; between 721 and 1023 those rules do not match at all, so the earlier layers'
   own compact shape shows through -- a shorter 46px row on an 8px rhythm, the full-size 31px icon,
   and a sign-out that keeps the rail's width instead of shrinking to a 40px square. This block
   carries the 1024-1279 shape; the block right after carries the 721-1023 one.

   Since 2026-10-12 the labelled 272px rail starts at 1024px (15 #429(b), a dated departure from the
   reference's 1280); the content column is 192px narrower between 1024 and 1279, and the Shipments
   strip's arrows cover a tab row that then overflows. Dated clause 2026-10-16: so the band of this
   block is now 721-1023px, the same band as the block after it - the two are NOT merged (the smallest
   change; the source-order contract between them still reads as written). The 1024-1279 shape this
   block carried no longer renders. Every rail rule in both blocks is scoped to the CLOSED rail
   (`.rp-aside:not(.is-open)`), so the opener's overlay (15 #429(c)) takes the base labelled rules, its
   272px width included; `.rp-content` stays unscoped, because an overlay moves nothing.
   Dated clause 2026-10-16, later: the lower edge of the three compact-rail blocks (this one, the one after
   it, and the opener's band further down) is 720.02px, no longer 721px, and the opener script's band query
   says the same. Browser zoom gives fractional layout widths, and at 720.5px neither the phone tier
   (max-width: 720px) nor a 721px edge matched, so the desktop shell with its 272px rail showed between the
   phone layout at 720 and the icon rail at 721. Every whole width keeps its tier; a width just above 720
   takes the 721 shape (720.00-720.02px stays outside both, the residual of the house's .98 edges). */
@media (min-width: 720.02px) and (max-width: 1023px) {
    .rp-aside:not(.is-open) { width: var(--kp-portal-rail-w-compact); padding: 25.5px 14px 12px; }
    /* LABELS ONLY -- never a whole row (independent-review fix round F3, 2026-08-12). This was the bare
       descendant selector `.rp-aside .rp-nav span`, written when every nav row was an `<a>` and the only
       spans inside the nav were labels. P2.2a then converted the six unbuilt rows to
       `<span class="rp-soon-row">`, which that selector matched WHOLE: across this entire 721-1279 band
       six of the eight entries vanished, icons included, leaving a rail with two rows. Measured live at
       900 before the fix: 2 of 8 rows visible, every converted row `display: none` with a 0x0 box. The
       rendered reference renders all eight as icons at both 900 and 1100 (51x46 / 51x55.25 boxes, 31 /
       30px icons). The `> span` child combinator is what keeps a row from matching itself.
       `:not(.visually-hidden)` keeps the screen-reader-only reason text out of it (F16, same round):
       `display: none` removes an element from the accessibility tree as well as from the page, so
       without this exclusion the coming-soon reason would be announced at every width EXCEPT this band. */
    /* Visually hidden, never display:none (15 #429(a), 2026-10-12): display:none took each row's NAME out of the
       accessibility tree too, so in this band the links and Sign out had no name at all. The section label is
       not a control and stays out. Scoped to the closed rail: the opener's overlay shows the labels. */
    .rp-aside:not(.is-open) .rp-nav a > span:not(.visually-hidden),
    .rp-aside:not(.is-open) .rp-nav .rp-soon-row > span:not(.visually-hidden),
    .rp-aside:not(.is-open) .rp-logout span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .rp-aside:not(.is-open) .rp-account { display: none; }
    .rp-aside:not(.is-open) .rp-nav a { justify-content: center; gap: 0; padding: 2.125px 0; }
    /* The converted rows take the same compact box as the links they sit between. This selector weighs
       (0,2,1) -- `.rp-nav` + `span` + `.rp-soon-row` -- against the base `.rp-nav a` rule's (0,1,1), so it
       wins on weight and not merely on source order.
       THE OLD PARENTHETICAL HERE WAS WRONG TWICE (corrected 2026-08-12). It said a bare
       `.rp-nav span.rp-soon-row` would weigh (0,1,2) and "would lose to it and paint nothing": a descendant
       combinator carries NO specificity, so that form weighs exactly the same (0,2,1) and, declared later,
       would win rather than lose. The child combinator is kept for what it actually buys -- it matches only
       a DIRECT row of the rail, so a future nested span cannot inherit the compact box by accident -- not
       for a weight it does not add. (Dated clause 2026-10-16: with the closed-rail scope every compact rule
       here weighs two classes more, (0,4,1) for this one and (0,3,1) for the link rule above; the base
       rules they override weigh less still, so the reasoning above holds.) */
    /* Dated clause 2026-10-17 (15 #548): the converted rows are buttons now, so the selector names the button - a tag
       for a tag, the weight unchanged. */
    .rp-aside:not(.is-open) .rp-nav > button.rp-soon-row { justify-content: center; gap: 0; padding: 2.125px 0; }
    .rp-aside:not(.is-open) .rp-nav img { width: 30px; height: 30px; margin: 0; }
    .rp-aside:not(.is-open) .rp-logout { justify-content: center; width: 40px; padding: 0; }
    .rp-content { margin-inline-start: var(--kp-portal-rail-w-compact); }
}

/* ---- compact icon rail, LOWER tier: 721-1023px ----
   The 900px-measured deltas from the block above (see its two-tier note). Declared AFTER it and at
   equal specificity, so inside 721-1023 these win by source order and everything not restated here
   -- the 80px width, the hidden labels, the centred rows, the content offset -- still comes from it.
   Longhands rather than shorthands on purpose: only the block-start of the rail's padding and only
   the basis of the row's flex actually move, so restating the whole shorthand would be a silent
   second edit to values this tier never changes.
   Dated clause 2026-10-16 (15 #429): every rule here takes the block above's closed-rail scope
   (`.rp-aside:not(.is-open)`), so the equal weight and the source-order win stated above still hold, and
   the opener's overlay keeps the labelled rail's own 55.25px rhythm. */
@media (min-width: 720.02px) and (max-width: 1023px) {
    .rp-aside:not(.is-open) { padding-block-start: 25px; }
    .rp-aside:not(.is-open) .rp-nav { gap: 8px; }
    .rp-aside:not(.is-open) .rp-nav a { min-height: 46px; flex-basis: 46px; padding: 6px 0; }
    /* The converted rows take this tier's shorter row too (F3, 2026-08-12) -- without it they would keep
       the 55.25px basis while the links beside them shrink to 46px, so the rail would read as two
       different rhythms in one column. The rendered reference measures every row 51x46 at 900. */
    .rp-aside:not(.is-open) .rp-nav > button.rp-soon-row { min-height: 46px; flex-basis: 46px; padding: 6px 0; }
    /* The icon-only rows' corners (2026-10-17): at 900 the rendered reference measured 8px on a link and on the three
       coming-soon rows of the closed rail, where the labelled rail's 10px had carried over; the overlay keeps 10px. */
    .rp-aside:not(.is-open) .rp-nav > a,
    .rp-aside:not(.is-open) .rp-nav > button.rp-soon-row { border-radius: var(--kp-radius-md); }
    .rp-aside:not(.is-open) .rp-nav img { width: 31px; height: 31px; margin: 0; }
    /* Back to the rail's full width (~51px inside the 80px rail's padding + border) and 42px tall:
       with the label hidden the button's content is just the 16px icon, so 16 + 12/12 padding + the
       2px border is what makes 42 -- which is why the base rule's fixed 40px height is lifted here. */
    .rp-aside:not(.is-open) .rp-logout { width: 100%; min-height: 42px; height: 42px; padding: 12px 0; }
}

/* ---- the rail's opener, its overlay and the name bubble (15 #429(a)(c), 2026-10-16) ----
   Where the rail is icon-only (721-1023px) a button at its top opens it to the labelled 272px rail as an
   OVERLAY over the page, with a scrim (the admin's collapsed-sidebar overlay shape). The content column keeps
   its 80px offset, so nothing under the overlay moves. Hovering or focusing a row of the CLOSED rail shows a
   small bubble with that row's own name beside the icon, toward the page (the script fills it and places it
   on the block axis; the inline position is the compact rail's width, written logically, so both directions
   land beside the rail). Outside 721-1023px none of the three shows, and the script closes the overlay when
   the band is left.
   STACKING: the scrim 1100, the open rail 1110 and the bubble 1120 sit above the page's other layers - the
   portal topbar (.rp-header) declares no z-index at all, and the highest layer below them is the 1075 of the
   shared menus (every literal z-index in this file, base.css, tokens.css and the portal's site.css, read
   2026-10-16) - and strictly below the plan sheet (1200), the phone bottom navigation (1300) and the dialog
   layer (2000), so a dialog fired while the rail is open still draws on top of it. Dated 2026-11-05 (15 #1037): the Portal's site.css gives the fixed topbar 21, and 31 while the bell's list is open.
   The scrim and the bubble are rendered OUTSIDE the rail: the Arabic mirror (scaleX(-1) on .rp-aside) makes
   the rail the containing block of its fixed children, which would clip them. The open rail adds no width
   of its own: the closed-rail scope of the compact blocks above stops matching, so the base 272px applies. */
.rp-rail-toggle,
.rp-rail-scrim,
.rp-rail-tip { display: none; }
.rp-rail-toggle {
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    align-self: center;
    width: 44px;
    height: 44px;
    margin-block-end: 8px;
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-lg);
    background: transparent;
    color: var(--kp-portal-nav-ink);
    transition: background-color .18s, color .18s;
}
.rp-rail-toggle:hover { background: var(--kp-portal-nav-hover-bg); color: var(--kp-portal-nav-active-ink); }
.rp-rail-toggle .icon { width: 22px; height: 22px; }
.rp-aside.is-open {
    z-index: 1110;
    box-shadow: var(--shadow-portal-modal);
}
.rp-rail-scrim {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: var(--portal-dialog-backdrop);
}
.rp-rail-tip {
    position: fixed;
    z-index: 1120;
    /* THE BUBBLE'S PLACE ON THE BLOCK AXIS is the middle of the row it names, measured by the page script each
       time it shows the bubble and written on the element's own style. It is DECLARED here, at the top of the
       viewport, because a var() on a property nothing declares drops the whole declaration silently; the
       bubble stays hidden until the script has placed it, so this default applies only while it is hidden. */
    --rp-tip-top: 0px;
    inset-block-start: var(--rp-tip-top);
    inset-inline-start: calc(var(--kp-portal-rail-w-compact) + 8px);
    transform: translateY(-50%);
    padding: 6px 10px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-slate-900);
    color: var(--kp-white);
    box-shadow: var(--shadow-portal-toast);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
    pointer-events: none;
}
/* Shown only in the icon-only band; a `hidden` scrim or bubble stays hidden there too. */
@media (min-width: 720.02px) and (max-width: 1023px) {
    .rp-rail-toggle { display: flex; }
    .rp-rail-scrim:not([hidden]),
    .rp-rail-tip:not([hidden]) { display: block; }
}

/* ---- mobile: <=720px ---- */
@media (max-width: 720px) {
    .rp-aside { display: none; }
    .rp-shell { overflow-x: clip; }
    .rp-content { margin-inline-start: 0; padding-block: 0 112px; padding-inline: var(--kp-portal-phone-gutter); }
    /* The gutter moves back to the content column at this band, so header and wrap sit flush. */
    .rp-header { gap: 8px; min-width: 0; padding-inline: 0; }
    .rp-header-brand { min-width: 0; flex: 1 1 auto; }
    /* HEIGHT ONLY at this tier (fix package E, 2026-08-12): the reference's phone header keeps this
       button 38.25px WIDE and shortens it to 32px, measured at 390 in both languages. Ours squared it
       to 32x32, which is the one place the two controls' boxes disagreed after E9 re-dressed the rest
       state -- so the width override is dropped and the base 38.25px carries through. */
    .rp-header-back { height: 32px; }
    /* The phone back control, revealed at the reference's own tier and wearing its measured dress
       (rendered reference at 390: 40x40, radius 9, glass fill at .68 over a 9px blur, a .72-white
       hairline and a soft slate shadow). IN-FLOW here where the reference floats it absolutely: its
       phone header is a fully absolute layout and ours is a flex row, so a first flex item lands the
       button in the same place (measured 2px from the reference's brand offset) without re-plumbing a
       shipped layout. The view's own comment carries the reasoning. */
    .rp-mobile-header-back {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 1px solid rgb(255 255 255 / .72);
        border-radius: 9px;
        background: rgb(255 255 255 / .68);
        color: var(--kp-rp-mobile-back-ink);
        box-shadow: 0 5px 13px rgb(15 23 42 / .09);
        backdrop-filter: blur(9px);
    }
    /* Same 19.125px as the desktop sibling: the reference's phone header paints its .rp-back-icon at
       the identical 19.13, measured at 390 inside its own 40x40 glass button (fix package C,
       2026-08-12; was 16px). */
    .rp-mobile-header-back .icon { width: 19.125px; height: 19.125px; }
    .rp-logo { width: 154px; height: 56px; max-width: 100%; }
    .rp-h-actions { gap: 12px; }
    /* THE BELL IS DELIBERATELY NOT NAMED HERE, and the reason is measured (fix round item 7 / FE-2,
       2026-08-12). It is orphaned from this rule by its wrapper, but naming it is NOT the inert
       restatement it looks like: `min-width: 0` at (0,2,1) would outrank
       `.rp-h-actions .notification-bell`'s own 41.5px floor at (0,2,0), and combined with the <=360
       padding rule further down the bell would paint 28px wide against the 41.5px it holds today -- a
       visible narrowing on phones. Naming it in only ONE of the two rules computes identically to today,
       which is the same as changing nothing. So this is a parity decision to take deliberately, not a
       selector to quietly widen: recorded here, and in the round's report, rather than guessed at. What
       the bell loses by not being named is `gap: 7px` on a control with exactly one child, which draws
       nothing.
       WHICH WRAPPER ORPHANS IT CHANGED ON 2026-08-14, and the outcome did not. Until then it was the
       `.rp-soon` span of the coming-soon posture; the bell went LIVE that day, so it now sits inside
       `.notification-menu`, the positioning context its dropdown is anchored to -- still not a direct
       child of this cluster, so these rules still do not reach it, and the portal's own stylesheet
       restates its box. That is the right outcome rather than a lucky one: the rendered design reference
       measures its bell at 41.5x38.25 at 390, identical to its desktop box. (The sentence here used to
       add "on a control the design reference has no counterpart for (its bell is live)" -- true of ours
       only while ours was disabled, and false from that date.) */
    .rp-h-actions > a,
    .rp-h-actions > button { width: auto; min-width: 0; gap: 7px; }
    /* v2 drops the user chip on mobile and KEEPS the language word visible -- profile is reached from
       the bottom nav's destinations instead, and the language switch is the one control a subscriber
       needs to read rather than recognise.
       THE CHILD COMBINATOR IS LOAD-BEARING (fix package E, 2026-08-12) and this rule was DEAD without
       it. It was written when the chip was an <a>, so `.rp-h-actions .rp-user` at (0,2,0) beat the
       box rule that dressed it. P2.2c then converted the chip to a non-interactive <span> and named it
       in that box rule as `.rp-h-actions > span.rp-user` -- (0,2,1) -- which from that day outranked
       this hide and put the chip back on every phone. Measured at 390 before the fix: the chip
       rendered `display: flex` at 127.77x38.25, the action cluster claimed 292.64px of a 356px header
       (the reference's claims 138.13), and the ministry lockup was squeezed to 55.36px in Arabic and
       20.2px in English against the reference's 154. Same class of defect as the rail's F3 and F4:
       a coming-soon TAG SWAP silently outranking a selector written for the old shape.
       Restated at (0,2,1) so it matches the box rule it has to beat, plus the <a> form for the same
       reason the box rule keeps both. Dated 2026-11-05 (15 #1019): the Portal's site.css shows the a.rp-user icon on phones. */
    .rp-h-actions > span.rp-user,
    .rp-h-actions > a.rp-user { display: none; }
    .rp-h-actions .lang-label { display: inline; font-size: 13px; }
    .rp-wrap { padding-inline: 0; }
    .rp-shell--dashboard .rp-wrap { padding-block-start: 17px; }
    .rp-title { font-size: 25.5px; line-height: 34px; margin: 13px 0 18px; }
    /* The reference DROPS the gold accent bar from the shared page title on phones and keeps it only on
       the mailbox's own heading (parity fix wave 2026-08-11, P1.3d): measured on the rendered reference
       payment-history page at 390 -- `body[data-app-page] .rp-title::before` computes `display: none`
       there, while the mailbox heading's own bar still computes 26px. The mailbox family's ≤720 block
       re-declares `display: block` for exactly that reason; the height stays 26px on both sides. */
    .rp-title::before { display: none; height: 26px; }
    /* 15 #191c: the full-width glass bar meets the viewport edge, with safe-area space inside it
       and rounded top corners. The existing overlay ordering remains:
       IT FLOATS OVER THE PLAN SHEET, and at z-index 80 ours sank underneath it (fix package E,
       2026-08-12). Proven by HIT-TESTING both sides at 390 with the sheet opened by a real click:
       `document.elementFromPoint` at the nav's own centre returned `IMG` inside the nav on the
       reference and `FOOTER` -- the sheet -- on ours. So the nav was not merely behind the scrim; it
       was unreachable while the sheet was open.
       1300, NOT THE REFERENCE'S OWN 2000, and that is the port rather than a deviation (port the
       mechanism, not the literal). 2000 is the number OUR dialog layer already
       occupies (site.css, `body.kp-portal div:where(.swal2-container)`), and the portal's
       dialog-stacking law -- PortalDialogStackingGovernanceTests, born from the owner's 2026-08-11
       report of a renewal confirm opening invisibly behind this very sheet -- requires the dialog to
       be STRICTLY above every app overlay. Copying 2000 here would put the bottom nav level with the
       dialog and re-create that defect one layer down. What the reference EXPRESSES is a relationship:
       the nav floats over the plan sheet. 1300 says exactly that on our scale -- above .plan-modal's
       1200, below the dialog's 2000 -- and the governance test staying green is the proof. */
    .rp-mobile-nav {
        position: fixed;
        z-index: 1300;
        inset-block-end: 0;
        inset-inline: 0;
        display: flex;
        justify-content: space-around;
        height: calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 10px 9px 9px;
        padding-block-end: calc(9px + env(safe-area-inset-bottom));
        border-block-start: 1px solid var(--portal-mobile-nav-border);
        border-radius: 28px 28px 0 0;
        background: var(--portal-mobile-nav-bg);
        box-shadow: var(--shadow-portal-mobile-nav);
        backdrop-filter: var(--portal-mobile-nav-blur);
    }
    .rp-mobile-nav a {
        display: grid;
        place-items: center;
        gap: 3px;
        min-width: 54px;
        color: var(--kp-portal-mobile-ink);
        text-decoration: none;
        font-size: 9px;
        font-weight: 700;
    }
    .rp-mobile-nav a.active { color: var(--kp-portal-mobile-active); }
    /* The bar's coming-soon buttons (2026-10-17, owner ruling 15 #548) take the same current-position dress as its
       links, as the rail's buttons do, for the day one of them names the page the reader is on: a button never
       matches the link rule above. */
    .rp-mobile-nav button.rp-soon-row.active { color: var(--kp-portal-mobile-active); }
    .rp-mobile-nav img { width: 27px; height: 27px; object-fit: contain; }
}

/* ---- very narrow: <=360px ----
   Below the 390px QA band, so the P1 spec table does not measure it. Kept (a shipped extra v2 has no
   equivalent for once its app-page rules override the package's own narrow block) but restyled to fit
   the new auto-width pill family: the old fixed 40x40 boxes would clamp the language control and clip
   its word. Both values are v2's own narrow-band vocabulary. */
@media (max-width: 360px) {
    .rp-h-actions { gap: 4.25px; }
    /* The wrapped bell is not named here either -- the <=720 block above carries the whole account of why
       the pair is a decision rather than a restatement (fix round item 7 / FE-2, 2026-08-12). */
    .rp-h-actions > a,
    .rp-h-actions > button { padding-inline: 6px; }
}

/* ============================================================
   AUTH / LOGIN -- reference-exact public login card (B1-a2 Task 3)
   Source: postOffice_PublicUser_html css/reference-exact.css (.ref-login/.ref-login-card/.ref-form/
   .ref-field/.ref-primary/.ref-form-note/.ref-civil-count/.ref-id-help/.ref-lang bases) OVERRIDDEN by
   css/theme-parity.css (JS-appended last in the mockup -- wins on equal specificity; values verified
   in-file, banked in the login mockup reference). House conversions: logical properties
   only, brand colors via tokens (--color-portal-action/-hover, --shadow-portal-cta/-raised are exact
   matches). CORRECTED (Task 5 computed-style parity): the pending disc/spinner's translucent
   border+background USED to draw the literal rgb(17 94 232 / *) wash (a decorative blue distinct from any
   brand token, kept as a literal rgb() value matching the one-off wash/overlay precedent below) -- the
   review close-out (2026-08-08) re-expressed that wash in the official navy triplet at the reference's
   own alphas under the D1 palette clause (see the .ref-login-verification-disc block below). The
   SOLID accent (disc `color`, spinner `border-top-color`) is a SEPARATE
   mockup custom property --blue:#0033a0 (theme-parity.css:3), which IS --color-portal-action. The
   original Task 3 pass conflated the wash with the solid accent; verified by computed-style diff against
   the live mockup and fixed in place. COMMENT CORRECTED 2026-08-02 (mockup-v3 restyle wave doc sweep,
   ledger 15 #137): this sentence used to end "NOT --kp-navy-600 (#115ee8, a different blue)", which stopped
   being true at the brand-palette adoption -- --kp-navy-600 is #0033a0 today (tokens.css:96), the SAME
   value as --kp-postal-navy-600 behind --color-portal-action, so the two tokens no longer name different
   blues. The genuinely different blue was the rgb(17 94 232) wash above, whose correctly-named home is
   --kp-portal-blue-500 (the orphaned-kept primitive in tokens.css) -- and the admin/portal token split
   still stands for the reason given there, not because the colors differ. One-off wash/overlay
   values otherwise reproduced verbatim as rgb()/rgba() (never hex, matching the .auth-brand--full
   precedent above). Omitted per spec F1: .ref-mobile-auth/.ref-auth-tabs/.ref-biometric-* (no
   biometric tab -- Hawiyati Civil ID only).
   ============================================================ */
/* THE 16px PIN is the signed-out twin of `body.rp-shell`'s (parity round 2, package B, 2026-08-12).
   The Arabic root is inflated to 106.25% (17px) for optical balance, and the reference inflates it too --
   but it then pins the BODY back to a flat 16px on every page it draws, signed-in and signed-out alike
   (`body[data-app-page] { font-size: 16px }`, app.bundle.css:21485-21492, and every reference pre-login
   page carries that attribute). P1.3a ported the pin for the signed-in shell only, so the signed-out half
   kept inheriting the inflated root: measured 2026-08-12 at 1440/1280/1279/1100/900 in Arabic, our body
   read 17px/25.5px against the reference's 16px/24px on splash, welcome, account-type, terms and login,
   and 390 already agreed (the <=800px tier reverses the inflation on both sides). Most components pin
   their own px, so what the inflation actually reached was text that INHERITS -- the login page's primary
   CTA (ours 17px/25.5px, ink 126.69x19; reference 16px/24px, ink 119.27x18) and the Terms back control
   (ours 17px/25.5px; reference 16px/24px, ink 35.14x18). English is untouched: its root is already 16px,
   so this pin is a no-op there, measured before and after. */
.ref-public { position: relative; min-height: 100vh; font-size: 16px; }

/* Fix-wave R3: the mockup's body line-height ratio (Bootstrap default 1.5) is tighter than the shared
   --leading-body token in ARABIC and equal to it in English -- that token is culture-switched, 1.5 latin /
   1.6 under html[lang="ar"] (tokens.css) -- so pinning 1.5 here is a no-op for English and an Arabic-only
   tightening. Scope it to the PORTAL public/auth surface (.ref-public, this body's own class) and the
   signed-in mailbox shell root (.rp-shell, _Layout.cshtml's body class) ONLY -- never the shared token,
   which the admin reads too. Note for anyone reasoning about the admin from here: the admin body no longer
   reads that token at all. KwtPost.Admin/wwwroot/css/site.css pins a literal 1.65 on its own body rule
   (adjudication 7, ledger 15 #137, 2026-08-02), deliberately replacing the Arabic 1.6 optical leading with
   the v3 reference's single ratio for both languages. */
.ref-public,
.rp-shell {
    line-height: 1.5;
}

/* Fix-wave R4: the mockup's own theme-parity.css carries a higher-specificity reset (0,1,1) that beats
   .ref-primary's declared font-size/weight (0,1,0) in the mockup's OWN cascade, so the mockup's LIVE
   button text actually renders at the inherited body size/weight, not its source 14px/800 (verified via
   document.styleSheets rule inspection -- fidelity-inventory.md Finding #1.2). Copied verbatim so ours
   matches what the owner's eye actually sees on the mockup, not its source file. */
.ref-public button,
.ref-public input,
.ref-public textarea,
.ref-public select {
    font-size: inherit;
    font-weight: inherit;
    font: inherit;
}

/* THE PRE-LOGIN PRESS BLOCK THAT USED TO SIT HERE IS RETIRED, not deleted behaviour (parity round 2,
   fix package E, 2026-08-12). It ported v2's one shared press response
   (`body[data-app-page] button:active { transform: scale(.98); transition-duration: .14s }`,
   app.bundle.css:21643) but scoped it to `.ref-public`, because this half of the product was the only
   half being restyled at the time. Every reference page carries `data-app-page` -- signed-in AND
   pre-login -- so scoping it to the auth surface left the signed-in half with an ENUMERATION, and
   eleven controls that no enumerated rule reached pressed not at all.
   The whole rule now lives once, at the portal's own scope, in KwtPost.Portal/wwwroot/css/site.css
   ("PRESS BASE LAYER"), which reaches both halves exactly as v2's single rule does. The four ANCHOR
   members this block listed -- .ref-lang, .onboarding-language, .onboarding-continue,
   .onboarding-skip, all <button> on the reference and <a> here (the L9 tag swap; the tour has to work
   with scripts blocked) -- moved there with it, and .ref-header-logo joined them, so nothing on the
   pre-login surface loses a press.
   (Dated 2026-11-10, ruling 15 #1265: the welcome tour is deleted, so its three members -- .onboarding-language,
   .onboarding-continue, .onboarding-skip -- left that list.) */

/* Portal mockup v2 re-measure (restyle package P2, 2026-08-08): the wash geometry (two radials at
   7%/10% and 94%/88%, a 113deg three-stop sweep, no grid-pattern layer despite the class name) already
   matched the v2 winning rule byte-for-byte, so only two things change here. (1) The five colour stops
   move to tokens: the two tints were the package's own pre-brand values written as literals, and D1
   re-expresses them in official navy/gold — see the --kp-portal-auth-* block in tokens.css for the
   mapping and why the alphas are spelled out there. (2) pointer-events:none joins from v2's own rule
   (app.bundle.css:24482) so the two declarations match. It changes nothing today -- this layer sits at
   z-index 0 while every interactive element on the page is above it (main z-index 1, pill z-index 2) --
   and is carried as a guard for anything later added to the auth surface without its own stacking. */
.ref-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 7% 10%, var(--kp-portal-auth-wash-blue), transparent 32%),
        radial-gradient(circle at 94% 88%, var(--kp-portal-auth-wash-gold), transparent 30%),
        linear-gradient(113deg, var(--kp-portal-auth-paper-1) 0%, var(--kp-portal-auth-paper-2) 48%, var(--kp-portal-auth-paper-3) 100%);
}

/* Fix-wave R1: the shared base .icon rule (18px) is a sane generic default, but the mockup's own
   equivalents render smaller -- measured live: the mockup's .ref-lang uses a 14px icon-font glyph
   (Bootstrap Icons, .bi-globe2, computed font-size/width 14px), and its closest analog for the
   Register locked-identity-hint icon (a small inline caption icon, same UI role as user-info.css's
   .user-field-label .user-icon) also measures 14px there. Scoped overrides only where the mockup's
   rendered size differs from the 18px base.
   COMMENT CORRECTED 2026-08-08 (restyle package P2): the 14px box still measures 14px on portal mockup
   v2, but the DELIVERY sentence above went stale -- v2 dropped the Bootstrap icon font and draws the pill
   globe as a 14x14 Phosphor duotone image (reference-exact.js langButton -> assets/icon-globe-duotone-
   gold.svg; `.ref-public .ref-lang .ref-lang-icon { width:14px; height:14px; flex:0 0 14px }`,
   app.bundle.css:25203). The size row is unchanged; the asset row is closed too -- the P2 fix round landed
   the swap in the same commit, so the pill now draws the sprite's #icon-globe-duotone symbol
   (_AuthLayout.cshtml, the .ref-lang <use>). */
.ref-lang svg.icon,
.ref-field span svg.icon {
    width: 14px;
    height: 14px;
}
/* Owner-caught 2026-07-18 (pill composition): the mockup's pill is globe + language word + a small
   code chip (reference-exact.js langButton: icon('globe2') + <span> + <small>EN|AR</small>), with
   theme-parity.css:.ref-lang i{color:var(--gold)} making the globe GOLD and the code letters in
   JetBrains Mono 10px at .65 slate. Ours lacked the gold globe + the <small> code. */
.ref-lang svg.icon { color: var(--color-portal-accent); } /* mockup --gold = stamp-gold #cba052, NOT the admin gold */
/* P2 (2026-08-08): v2 splits the pill's weight in two -- the pill element keeps 800 (its base layer,
   app.bundle.css:24482, is never overridden) while the LABEL span is pinned to 700
   (`.ref-public .ref-lang span`, app.bundle.css:25211). Ours painted the whole pill at 800, so the label
   read a step heavier than the target. Scoped to `.ref-lang span` exactly as v2 scopes it, which leaves
   the <small> code chip inheriting 800 from the pill -- also exactly as v2 leaves it (its own small rule
   sets colour/family/size/tracking and no weight).
   Family: same reason .lang-label carries the bilingual stack in the shell (P1) -- this control always
   renders the OTHER language's word, so an English page paints Arabic here and would otherwise fall back
   to a system Arabic face. v2 solves it the same way on its own account-page pill (per-language family +
   font-size-adjust:none, app.bundle.css:24919-24920); one bilingual stack covers both directions for us.
   DATED 2026-10-24 (owner ruling 15 #743, the pill matches the sign-in reference): the last sentence above no
   longer holds on the Arabic page, and the stack with its x-height opt-out moved to the English rule below.
   Measured on the rendered sign-in reference (login.html, 1440 and 390, both languages): its Arabic page draws
   the word "English" in Alexandria at 12px with the page's own .48 x-height adjustment, 41.53px wide in a
   111.61px pill; ours drew it in Inter with the adjustment off, 43.05px in a 113.13px pill. So on the Arabic
   page the label declares no face and no adjustment of its own and takes the page's, as the reference's does. */
.ref-lang span {
    font-weight: 700;
}
/* The English page's label is the Arabic word. The sign-in reference draws it in a SYSTEM face - its stack names
   no Arabic face, so the browser falls back (Arial on Windows), 21.875px wide in a 93.48px pill - where our
   Alexandria at the same 12px measured 27.55px in a 99.16px pill. Arabic stays in Alexandria (no system Arabic
   face), and the owner reads the difference as a size (ruling 15 #743), so the word takes the size at which
   Alexandria measures the reference's width: 9.53px, measured 21.875px against the reference's 21.875px in the
   same browser. The line box stays the 18px the pill's 12px caption makes at the page's 1.5 leading, so the
   smaller word does not shorten the 36px pill. The stack keeps Alexandria reachable after the Latin faces, and
   the x-height opt-out stays off as it was (the English body sets none). The account-type and terms references
   draw this label their own way; their route rules keep it. */
html[lang="en"] .ref-lang span {
    font-family: var(--font-portal-bilingual);
    font-size-adjust: none;
    font-size: 9.53px;
    line-height: 18px;
}
.ref-lang small {
    color: rgb(71 85 105 / .65);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .18em;
}

/* Portal mockup v2 re-measure (restyle package P1, 2026-08-08): the auth pill sits 5px higher and
   carries the smaller 4px corner in v2's late layer (app.bundle.css:25187 -- `top:16px; border-radius:4px`,
   the winning `.ref-public .ref-lang` rule). Everything else here already matched.
   P2 (2026-08-08) settles the height row P1 left open: v2's winning rule declares `min-height: 0` and the
   pill RENDERS 36px -- caption line box 18px (12px text at the .ref-public 1.5 ratio) + 16px padding +
   2px border. Our 39px floor was 3px taller than the target for no reason of ours, so the declaration is
   dropped rather than re-pinned; the content box now sets the height exactly as it does in v2. */
.ref-lang {
    position: absolute;
    z-index: 2;
    inset-block-start: 16px;
    inset-inline-end: 40px;
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-sm);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xs);
    background: rgb(255 255 255 / .8);
    backdrop-filter: blur(10px);
    color: var(--color-text);
    font-size: 12px;
    /* D5 (2026-07-19 fix wave): the mockup's language chip is a <button> (UA-default text-align:center);
       ours is an <a> (culture link), which inherits text-align:start -- the L9 tag-swap-loses-centering
       class. Measured: ours start vs mockup center. Restore the button's native centering explicitly.
       (The globe glyph is already present in the markup as an icon-globe sprite <use> -- the ledger's
       "no globe" was the headless sprite-paint artifact, not a missing element; verified in the DOM.) */
    text-align: center;
    /* fix-wave 3 (2026-07-18 live-parity ledger item 3, L191/334/477): mockup-measured 800, not 700.
       STILL TRUE on portal mockup v2 (P2, 2026-08-08) -- but only for the pill ELEMENT. v2 pins the label
       span itself to 700; that split now lives on .ref-lang span above, so this 800 is what the <small>
       code chip inherits, not what the word renders at. */
    font-weight: 800;
    text-decoration: none;
    /* fix wave 2026-07-18 (ledger row 49): mockup's equivalent pill
       (.user-language button, user-info.css:88-106) reused verbatim for our shared Login+Register
       .ref-lang component -- it declares a hover/transition ours never picked up. */
    transition: border-color .2s ease, transform .2s ease;
}
/* No lift: the reference's login and account pills change only their border on hover, and a lift written here
   outranked the press base's scale on every route that shares the pill (portal group 3, 2026-09-09). The register
   route's pill lifts by its own rule below, as its reference does. */
.ref-lang:hover { border-color: var(--portal-lang-hover-border); }

.ref-login {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 70px 20px 34px;
}

.ref-login > div { width: min(618px, 100%); }

/* B1-b Task 2 (register screen) -- a SEPARATE page-shell class from .ref-login (same centering geometry),
   because .ref-login .ref-field input below is a Civil-ID-input-specific override (76px/31px/tracking) that
   would wrongly apply to Register's email/phone/select fields if they shared the .ref-login wrapper.
   Additive only -- .ref-login itself is untouched (the register mockup reference, "CSS").
   WIDTH (wave 4, T3b -- owner ruling 2026-07-18 night): 680px, was a deliberate 618px trim (matching
   .ref-login's own width, for visual consistency between the two auth-flow cards) that the owner
   explicitly reversed tonight -- .ref-login itself is untouched, this widens ONLY the register
   column (and its header/route-title/hero counterparts above, .user-header-shell/.user-route-
   title-inner, kept in lockstep). */
/* REBUILT (onboarding wave W6, 2026-08-09) into the reference's own container, replacing the login-
   borrowed centred column. `.ref-register` IS the reference's `.user-container`: a viewport-capped
   column whose cap and inline padding step together through five tiers, with the page's own 56px tail
   below it (the reference puts that on its page wrapper; our page wrapper is the body).

   THE CAP IS IN REM, NOT PIXELS, and that is load-bearing. The Arabic page runs a 17px root and the
   English page a 16px one, so the SAME rule paints a 1434px-wide container in Arabic and a 1408px one
   in English at a 1434px viewport -- which is exactly what the reference measures (1141.66px and
   1120px form columns respectively). A pixel cap would have pinned both languages to one number and
   missed the target in one of them.

   WHAT THIS REPLACES: `min(1085px, 100%)`, itself measured on mockup v1 at a 1366px viewport. The
   owner flagged the geometry; the plan named it; the re-measure moved it. The header column's own
   `min(680px)` -- the documented-intentional split this file has carried since 2026-07-19 -- is
   RESOLVED by the same change: the reference groups header, route title and container under ONE rule,
   so all three now share this ladder and the split is gone. */
.ref-register {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 32rem;
    margin-inline: auto;
    padding: 36px 16px 56px;
}
@media (min-width: 640px) { .ref-register { max-width: 42rem; padding-inline: 24px; } }
@media (min-width: 1024px) { .ref-register { max-width: 80rem; padding-inline: 32px; } }
@media (min-width: 1280px) { .ref-register { max-width: 88rem; } }
@media (min-width: 1536px) { .ref-register { max-width: 96rem; } }

/* The card column sits INSIDE the container at five-sixths of it on the wide tier, which is where the
   measured 1141.66 / 1120 come from; the step row, hero and meter above it stay full container width
   (the reference's own split -- `.user-form { width: 83.333333%; margin-inline: auto }`). */
.ref-reg-form { display: grid; width: 100%; gap: 20px; }
@media (min-width: 1024px) { .ref-reg-form { width: 83.333333%; margin-inline: auto; } }

/* ------------------------------------------------------------
   REGISTER AMBIENT BLOBS (restyle package P6, 2026-08-08 -- the owner-ordered PARTIAL adoption of the
   reference register page's look: these blobs, its taller input, its submit. No stepper, no `user-*`
   family rebuild; the cards, corner glows and titles are untouched, and this is the register page ONLY.)
   Source: the reference's `.user-ambient` pair (app.bundle.css:21090-21114) -- two fixed 720px discs
   under a 120px blur at opposite PHYSICAL corners, each drifting on its own long alternating loop.

   Why these are real elements and not pseudo-elements on .ref-register: the reference ships them as two
   <span>s ahead of the header (js/user-info.js:248) so they land at z-index 0 in the PAGE's stacking
   context -- above the .ref-grid-bg wash (also z 0, earlier in the DOM) and below every lifted layer:
   .user-header and .ref-register (z 1) and the .ref-lang pill (z 2). A pseudo-element could not sit
   there. .ref-register declares `z-index: 1`, which opens its own stacking context, so ANY descendant --
   whatever z-index it claims -- paints as part of that z-1 unit, i.e. on top of the header that precedes
   it, hazing the logo behind a 120px blur. Living in Register.cshtml is also what scopes them: Login and
   the signed-in shell share this stylesheet and, for Login, this very layout.

   Colours are D1 re-expressions at the reference's own alphas -- the package's raw stops are never
   copied (portal palette clause, 15 #148). BLUE: #3a7af0 -> --kp-postal-navy-400 (#1a4db8) at .85;
   #0033a0 is already official (--kp-postal-navy-600) at .55; the #7850ff violet has no official
   counterpart, so it resolves to --kp-postal-navy-700 (#002680) at .25 -- a hue move the 120px blur
   dissolves at that alpha. GOLD: #cba052 is already official (--kp-stamp-gold-500) at .65; #ff6b4a ->
   #c8102e (--kp-red-700, the recorded P1 D1 row for that coral) at .5; #f0c04a -> #dfc080
   (--kp-stamp-gold-300) at .25. Every alpha is spelled literally for this file's standing reason: a
   custom property cannot supply only the rgb part of an rgb(... / a).

   Corners follow the SAME recorded exception as the login and card blooms above -- the reference pins
   them physically (`top/left` on the blue, `right/bottom` on the gold) with no direction override in the
   served bundle, so each [dir="rtl"] arm swaps the inline side back and the painted corner is equal in
   both languages.
   ------------------------------------------------------------ */
.ref-reg-ambient {
    position: fixed;
    z-index: 0;
    width: min(55vw, 720px);
    height: min(55vw, 720px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: .55;
    pointer-events: none;
    /* The reference's own hint (same rule): these two discs animate for the whole life of the page, and
       promoting them keeps the browser from re-rasterising a 120px blur over a 720px box every frame. */
    will-change: transform;
}
.ref-reg-ambient--blue {
    inset-block-start: -18vw;
    inset-inline-start: -18vw;
    background: radial-gradient(circle at 30% 30%,
        rgb(26 77 184 / .85) 0%,
        rgb(0 51 160 / .55) 40%,
        rgb(0 38 128 / .25) 75%,
        transparent 100%);
    animation: ref-reg-blue-drift 18s ease-in-out infinite alternate;
}
[dir="rtl"] .ref-reg-ambient--blue {
    inset-inline-start: auto;
    inset-inline-end: -18vw; /* inline-end under RTL IS the physical left -- the reference's own corner */
}
.ref-reg-ambient--gold {
    inset-block-end: -18vw;
    inset-inline-end: -18vw;
    background: radial-gradient(circle at 70% 70%,
        rgb(203 160 82 / .65) 0%,
        rgb(200 16 46 / .5) 40%,
        rgb(223 192 128 / .25) 75%,
        transparent 100%);
    animation: ref-reg-gold-drift 22s ease-in-out infinite alternate;
}
[dir="rtl"] .ref-reg-ambient--gold {
    inset-inline-end: auto;
    inset-inline-start: -18vw; /* inline-start under RTL IS the physical right */
}
/* Keyframe names carry the register family's own `ref-reg-` prefix (the precedent this file already set
   with @keyframes ref-reg-dot-pulse) rather than the package's global `user-*` names -- keyframe names
   are a single flat namespace shared with the admin, and `.user-*` is a name that exists there. */
@keyframes ref-reg-blue-drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(4%, 6%, 0) scale(1.08); }
    100% { transform: translate3d(-3%, 3%, 0) scale(.96); }
}
@keyframes ref-reg-gold-drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-5%, -4%, 0) scale(1.1); }
    100% { transform: translate3d(3%, 2%, 0) scale(.94); }
}
/* The reference's own narrow tier for these discs (app.bundle.css:21462) -- ported at ITS breakpoint,
   767px, not the 800px band the rest of this auth family shrinks at: the disc switches from a capped
   55vw to an uncapped 90vw (351px at 390) and softens, so the wash stays a corner glow instead of
   swallowing a phone-width page. The -18vw offsets deliberately do NOT move -- the reference leaves them
   alone here too, which is what keeps roughly the same slice of each disc on screen at every width. */
@media (max-width: 767px) {
    .ref-reg-ambient {
        width: 90vw;
        height: 90vw;
        filter: blur(80px);
        opacity: .42;
    }
}

.ref-brand { margin-block-end: 40px; text-align: center; }
.ref-brand img { display: block; height: 112px; margin-block: 0 20px; margin-inline: auto; }
/* The logo link around that block image (2026-10-21): an inline link around a block child has no box of its own -- two
   empty fragments and one the whole brand row wide (618px at 1440, measured) -- so the house focus ring painted nothing
   and a click beside the logo went home. A fit-content block centred like the image has one box equal to the image's
   (the image's 20px bottom margin collapses through it), so the ring draws round the logo and only the logo is the link.
   The brand block's composition (logo size, centring, the gap to the card) measured equal at 1440, 1024, 768 and 390. */
.ref-brand > a { display: block; width: fit-content; margin-inline: auto; }
/* Fix-wave 3 (2026-07-18 live-parity ledger item 2, L178/L1595): headings inside .ref-public/
   .rp-shell fall back to base.css's h1-h6 rule (line-height: var(--leading-heading), 1.25 en /
   1.35 ar) since neither this rule nor .ref-public/.rp-shell's own line-height:1.5 (both too loose)
   targets the element directly. Mockup's live .ref-brand h1 measures exactly 1.2 -- verified via
   isolated-browser getComputedStyle, not derived from screenshot px diffs. Scoped to the two
   headings that had no line-height of their own (.ref-brand h1, .user-route-title h1 below);
   .user-hero h1 and .dc-greeting h1 keep their own already-closer values, unaffected by this rule
   since their own selectors are equal-specificity and declared LATER in this file.
   Dated 2026-11-01 (client item 1.3): .dc-greeting h1 has no rule any more (screen-reader-only); .user-hero h1 remains. */
.ref-public h1, .ref-public h2, .ref-public h3,
.rp-shell h1, .rp-shell h2, .rp-shell h3 {
    line-height: 1.2;
}
/* Equal specificity and later source order keep the measured title line-height (2026-09-06). */
h1.rp-title { line-height: 34px; }
.ref-brand h1 { color: var(--color-portal-action); font-size: 36px; font-weight: 800; letter-spacing: -.035em; }
/* FIX 3 (owner design-review, 2026-07-19): the login brand subtitle inherited .ref-public's 1.5
   line-height; the mockup login subtitle measures 1.6. Set it directly (this is the login-only
   .ref-brand block; register uses .user-hero, unaffected). */
.ref-brand p { max-width: 520px; margin: 10px auto 0; font-size: 16px; line-height: 1.6; color: var(--kp-slate-500); }

.ref-login-card {
    position: relative;
    width: 100%;
    padding: 36px;
    border: 1px solid rgb(255 255 255 / .627);
    border-radius: var(--kp-radius-xl);
    background: rgb(255 255 255 / .9);
    box-shadow: 0 20px 55px -28px rgb(15 23 42 / .32);
    overflow: hidden;
}
/* P2 (2026-08-08): the card's corner bloom -- a blurred gold disc bleeding in from one top corner and
   clipped by the card's own overflow:hidden. It is authored in v2's base layer (app.bundle.css:24483,
   `.ref-login-card::before`) and NOTHING later cancels it, so it renders on the served login page; ours
   had no counterpart at all. The colour is already official (#cba052 = --color-portal-accent) at the
   package's own 14.1% alpha, written as a literal rgb() because a custom property cannot supply only the
   rgb part of an rgba() -- the same one-off-overlay precedent the card's own three translucent values
   above use.
   RECORDED EXCEPTION to the logical-properties default (lead ruling, P2 fix round 2026-08-08): the
   RENDERED reference page pins this disc to the PHYSICAL top-right in BOTH directions -- it is authored
   with `right:-70px` and no direction override anywhere in the served bundle, so Arabic shows it on the
   right exactly like English. Same rendered-truth class as P1's unflipped rail edge gradient. The base
   rule below stays logical (inline-end = right under LTR) and the [dir="rtl"] arm swaps the side back,
   so the painted corner matches the reference in both languages without writing a physical property.
   Layering note: this pseudo-element is positioned, so it paints above the card's in-flow content -- but
   BELOW .ref-form, which is position:relative and comes later in tree order. That is the reference's own
   structure and its own paint order, not a divergence. */
.ref-login-card::before {
    content: "";
    position: absolute;
    inset-block-start: -70px;
    inset-inline-end: -70px;
    width: 160px;
    height: 160px;
    /* 50% not --kp-radius-full: the token is 999px, which a computed-style diff reports verbatim while
       v2 reports 50% -- same painted circle, different measured string. Matches .ref-reg-verified i below. */
    border-radius: 50%;
    background: rgb(203 160 82 / .141);
    filter: blur(25px);
}
[dir="rtl"] .ref-login-card::before {
    inset-inline-end: auto;
    inset-inline-start: -70px; /* inline-start under RTL IS the physical right -- see the ruling above */
}

.ref-form { position: relative; display: grid; gap: 20px; }
/* #loginFormState wraps the form's rows for the state swap (form/pending/verified) -- a plain block
   wrapper orphans the rows from .ref-form's grid: the 20px row gap vanishes and .ref-id-help's -8px
   pull lands INSIDE the input (owner-caught AR clip at ~786px, 2026-07-18; EN merely grazes). The
   mockup swaps innerHTML directly inside .ref-form, so it never has this wrapper. Mirror the parent
   grid on the wrapper; :not(.hidden) keeps the ID's specificity from defeating the .hidden state
   toggle (hidden must still win when the pending/verified states show). */
#loginFormState:not(.hidden) { display: grid; gap: 20px; }

.ref-field { display: grid; gap: 7px; text-align: start; }
.ref-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
}
/* Fix-wave (row 40, 2026-07-18 re-judgment): live per-field validation chip, ported from the mockup's
   updateLiveState() (user-info.js:261-296) + .user-field-ok (user-info.css:254-255; theme-parity.css
   confirmed silent on both selectors). The mockup shows ONLY a positive valid-state decoration (green
   ring + "OK" chip) -- no distinct invalid/error ring exists anywhere in its source (verified: no
   .is-invalid/error rule in user-info.css) -- so this ports the valid state faithfully and does not
   invent an error ring the mockup itself doesn't have. */
.ref-field-ok {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    color: var(--kp-emerald-600);
    font-size: 10px;
    font-weight: 700;
}
.ref-field-ok .icon { width: 12px; height: 12px; color: var(--kp-emerald-600); }
.ref-field input.is-valid,
.ref-field select.is-valid {
    border-color: rgba(110, 231, 183, .7);
}
.ref-field input.is-valid:focus,
.ref-field select.is-valid:focus {
    border-color: rgba(52, 211, 153, .8);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}
/* Inline-field-validation standard (2026-07-20): the negative mirror of the .is-valid state above.
   The mockup has no invalid ring anywhere (see the fix-wave note above), so this is the sanctioned
   net-new state — portal danger family (--kp-portal-danger-500, rgb 200 16 46) at the same alpha
   steps as the green mirror; ring token in tokens.css.
   DERIVED VALUES: these two alphas re-spell that token's rgb triplet because a custom property cannot
   supply only the rgb part of an rgba(). They moved from rgb(201,84,91) to the official rgb(200,16,46)
   in the same change that re-pointed the token (portal mockup v2 intake ruling D6, 2026-08-08, 15 #148)
   -- leaving them behind would have painted an official-red message beside a pre-rebrand-red border. */
.ref-field input.is-invalid,
.ref-field select.is-invalid {
    border-color: rgba(200, 16, 46, .7);
}
.ref-field input.is-invalid:focus,
.ref-field select.is-invalid:focus {
    border-color: rgba(200, 16, 46, .8);
    box-shadow: var(--focus-ring-portal-danger);
}
.ref-field .field-error-msg {
    color: var(--status-portal-alert-fg);
}
/* B1-b Task 2: selector extended to also match .ref-field select (the mockup has no select at all --
   PreferredLanguage is a new field, the register mockup reference "CSS") -- same box styling,
   no duplicated declaration block.
   (Corrected 2026-10-14: the rendered reference does draw a select -- its expanded P.O. Box section builds a
   branch select in js/user-info.js (about line 201) and styles it in css/app.bundle.css: `.user-field-input`
   (about line 21293) and `.user-branch-select { appearance: auto; ... }` (about line 21299). The preferred
   language select is still the reference's missing one. The select-only rules below keep that native look.) */
.ref-field input,
.ref-field select {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--kp-white);
    padding: 13px 14px;
    color: var(--color-text);
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}
/* THE SELECTS STATE THEIR HEIGHT, because Safari overwrites the min-height above (owner report 2026-10-13, ruling
   15 #464). Safari on a Mac, an iPhone or an iPad draws a <select> whose border and background a page has restyled as
   its own menu-list button, and in doing so it replaces the page's min-height with a floor of its own -- 18px on a
   Mac; on an iPhone or iPad 20/11 of the text size (20px for the 11px text Safari gives a select there), or 15px
   once a height is stated -- and drops the block padding. A stated height is left as written. So the 52px this
   family's fields take from min-height alone reached the inputs and not the select: the dashboard's link-my-box
   dialog showed its branch select about 18px tall beside 52px inputs. The select therefore states the same 52px
   the min-height gives its sibling inputs; the min-height itself is unchanged.
   (Corrected 2026-10-14: "drops the block padding" is not what was measured. In the WebKit build that runs on
   Windows (WebKit 26.5), in Arabic and English at 390 and 1280 px, the select's computed block padding stayed 13px
   -- 12px on the registration card -- and the engine CUT the select's text inside it, below. That build carries
   neither Apple theme named at the end of this note, so it is WebKit-engine evidence, not a measurement on a Mac, an
   iPhone or an iPad; the block padding is now set to zero below rather than left for an engine to drop.)
   Where this reaches: the link-my-box dialog's branch select and the payment history filter. The registration
   card's two selects match too, but `.ref-register .ref-field select` below outranks this rule and keeps its own
   stated size, so they do not change. The engine lines that do this: WebKit's RenderThemeMac and RenderThemeIOS,
   adjustMenuListButtonStyle.
   (2026-10-14: the same holds for the zero block padding below -- the registration field rule's `padding: 12px 16px`
   outranks this rule -- so `.ref-register .ref-field select` carries its own zero.)
   THE SELECTS CARRY NO BLOCK PADDING (owner report 2026-10-14). Measured in that WebKit build and in Chromium 149,
   in Arabic and English at 390 and 1280 px: while the select keeps its native menu-list look, WebKit computes its
   line-height as normal and cuts its displayed text along a line about 5.5px above the content box's bottom
   whenever this family's block padding is on. The link-my-box branch select was cut in every reading; the payment
   history filter sat on the same line, its default "All" carrying no descender to lose. Measured on the
   registration page's language select with its stated box kept: at zero block padding the text was whole, the box
   unchanged and still equal to the inputs beside it, and Chromium drew the text where it did before (its offset
   from centre unchanged in each cell). This rule gives the dialog's select and the history filter the same zero
   inside the same 52px. The native look stays -- appearance is not set, so the engine still draws the arrow -- and
   the inline padding is unchanged. Taking the native look away also removed the cut, but drops the arrow, so it is
   not the remedy. PortalSelectStatedHeightGovernanceTests holds the zero, the stated size and the native look for
   the four field-family selects. */
.ref-field select {
    /* The min-height above, mirrored; PortalSelectStatedHeightGovernanceTests holds this at or above it. */
    block-size: 52px;
    padding-block: 0;
}
/* The ONE field that is not on an auth page: /Payments/History's type filter (fix package E,
   2026-08-12). The rest rule above sets `outline: 0` at (0,2,0), which beats the shared portal ring
   at (0,1,0) -- correct on the auth pages, where the rendered reference measures the same
   outline-less gold-glow dress, and wrong here, where this select is a shipped EXTRA the reference
   has no counterpart for and every neighbouring control on the page shows the 2px navy ring. Measured
   before this rule with a real keyboard-promoted focus: `outline: 0px none` on the select while the
   header back button beside it read `2px solid rgb(0,51,160)`.
   Scoped to the signed-in shell (.rp-shell is on _Layout's <body> and not on _AuthLayout's) so the
   auth pages keep their measured parity, and at (0,3,1) it clears the rest rule's (0,2,0). */
.rp-shell .ref-field select:focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: 2px;
}
.ref-field input:focus,
.ref-field select:focus {
    border-color: var(--color-portal-accent);
    /* P2 (2026-08-08): .133, not .13 -- v2 writes the ring as #cba05222 (app.bundle.css:24483), and 0x22
       is 34/255 = .1333. The rounded .13 we shipped is invisible to the eye and visible to a computed-style
       diff, which is the instrument this package is judged by. Colour itself was already official gold. */
    box-shadow: 0 0 0 3px rgb(203 160 82 / .133);
}
.ref-login .ref-field input {
    min-height: 76px;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: .04em;
}
/* The input carries dir="ltr" directly (digits stay LTR inside the RTL page per the AGENTS.md
   numeric-field rule), which exempts it from base.css's html[dir="rtl"] :not([dir="ltr"]) zero-out
   rule (that rule only matches elements WITHOUT their own dir="ltr"). The mockup's civilId input
   carries no dir attribute at all, so under AR it IS zeroed (computed letter-spacing verified
   "normal" -- reference-exact.js:18 input() helper). Restore that parity explicitly for AR only;
   EN keeps the .04em tracking above (Task 5 computed-style parity fix). */
html[dir="rtl"] .ref-login .ref-field input {
    letter-spacing: 0;
    /* Owner order 2026-07-19 (AR alignment): the mockup's dir-less civilId input inherits RTL and
       right-aligns; our dir="ltr" (digits law) left-anchored it. `end` resolves against the INPUT's
       own ltr direction = right, AR-scoped only -- EN keeps the default start/left. */
    text-align: end;
}

/* ============================================================
   REGISTER FIELD FAMILY (wave 4, T3a -- owner ruling 2026-07-18 night). Register's fields (email/
   phone/preferredLanguage above) share the `.ref-field`/`.ref-form` MARKUP with Login (task 2:
   original "reuse verbatim" rule, still true structurally -- no view changes here), but
   the mockup itself renders Register's fields through a DIFFERENT, page-specific CSS family --
   register-user-info.html's `.user-field-stack`/`.user-field-wrap`/`.user-field-label`/
   `.user-field-input`/`.user-field-ok` (user-info.css:248-261) -- NOT the login card's own field
   rules Login correctly uses. This exact mismatch ("register reuses the login-card family") is a
   known one-sided-probe trap; this block closes it by
   overriding the shared rules' VALUES, scoped to `.ref-register` only, so Login's own (already-
   correct, source-matching) field rendering is untouched. Every value below is copied verbatim
   from user-info.css:248-261 (not the login source) -- live-verified against register-user-
   info.html at 8098 (getComputedStyle, both is-valid and base states). Token cross-check: --user-
   line (#e2e8f0) = our existing --color-border (--kp-slate-200); --user-muted (#475569) = our
   existing --color-text-muted (--kp-slate-600); --user-gold (#cba052) = --kp-stamp-gold-500
   (already used by --color-portal-accent); --user-gold-soft (#dfc080) = the ALREADY-VENDORED
   --kp-stamp-gold-300 (no new token needed) -- these four are exact matches, confirmed before
   writing a single override, so only the properties that genuinely differ are touched. Translucent
   whites (background/box-shadow) stay literal rgb()/rgba(), matching this file's own established
   precedent for one-off alpha overlays (e.g. .ref-login-card above) rather than growing the token
   list for values with no other consumer.
   ============================================================ */
/* FIX 2 (owner design-review, 2026-07-19): the register form now holds the mockup's titled cards
   (identity + contact) + submit, so its gap matches the mockup's .user-form (20px). The 16px inner
   gap moved to .ref-reg-field-stack below (the mockup's .user-field-stack), which wraps the fields
   INSIDE the contact card. */
.ref-register .ref-form { gap: 20px; }
.ref-register .ref-field { gap: 8px; } /* .user-field-label margin-bottom:8px, was the shared 7px grid-gap */
/* The label row's case and tracking never reach the inline error the validation engine inserts as a direct span
   (portal group 3, 2026-09-09); :where() keeps this rule's weight. */
.ref-register .ref-field > span:where(:not(.field-error-msg)) {
    font-size: 11px;
    /* P2 fix round (2026-08-08): 12px, not the shared 10px -- the reference's register label row runs a
       wider gap than its login one (`.user-field-label { gap: 12px }`, app.bundle.css:21287, against the
       login family's own 10px). Login keeps 10px; only this register-scoped override moves. */
    gap: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
} /* .user-field-label: was 12px, no tracking, no case transform (Arabic text is unaffected by uppercase) */
/* FIX 2 (2026-07-19): scope the gold field-name icon to the LABEL group's first span only (the
   mockup .user-field-label .user-icon), NOT the whole label -- otherwise this rule's specificity
   (0,3,2) also swallowed the green "OK" chip's check-circle. The chip icon is kept emerald+12px by
   .ref-reg-card .ref-field-ok .icon (added below). Size (14px) still comes from .ref-field span
   svg.icon above. */
.ref-reg-card .ref-field > span > span:first-child svg.icon {
    color: var(--kp-stamp-gold-500);
}
.ref-reg-card .ref-field-ok .icon {
    /* 14 x 12: the reference's chip mark keeps the label row's 14px flex basis under its own 12px height, and the
       rendered page is the target (portal group 3, 2026-09-09). */
    width: 14px;
    height: 12px;
    color: var(--kp-emerald-600);
} /* mockup .user-field-ok .user-icon: emerald, 12px (beats the broad 14px .ref-field span svg.icon rule) */
/* P2 (2026-08-08): the valid-state chip is a CHILD of the label span above, so it was inheriting that
   label's .18em tracking and uppercase transform -- the English chip rendered "O K" spread apart, which
   the mockup never does. The reference family resets both on the chip itself
   (`.user-field-ok { letter-spacing: 0; text-transform: none }`, app.bundle.css:21291); mirrored here at
   the same scope. Arabic never showed the defect: uppercase is a no-op on "تم" and base.css already
   zeroes tracking under dir=rtl -- this is an English-only correction. */
.ref-reg-card .ref-field-ok {
    letter-spacing: 0;
    text-transform: none;
}
/* THE FIELDS TAKE THE ROOT SCALE, which under Arabic is 17px (2026-09-11). Measured on the rendered
   reference at 1440 in Arabic: its register number reads 17px/27.625px in a 53.63px box, while ours read
   16px/26px in a 52px box -- one point small, with the padding (12+12), the border (1+1) and the 1.625
   ratio identical on both sides, so the font size was the whole of the difference. Portal intake ruling
   D11 (15 #148) sets the Arabic root scale at 17px and grants these fields no exception; the sibling rule
   `.ref-public { font-size: 16px }` pins the BODY back to a flat 16px for the pre-login half, which is
   right for the pages it was measured on and is what these fields were inheriting.
   `1rem` rather than a literal is the rule itself rather than one of its answers: the root is 106.25%
   under dir=rtl and 100% at <=800px and in Latin, so this one declaration gives 17px on the Arabic desktop
   tier and 16px on the Arabic phone tier and in English -- each of which is what the reference renders --
   with no tier of its own to drift.
   The leading is DECLARED rather than left to inherit through `.ref-public`'s `font: inherit` shorthand,
   because the derived height depends on it: it is the page body's own token (1.625 Arabic / 1.5 Latin,
   already declared on `body[data-public-route="register"]` below), so nothing moves in English or at the
   phone tier, and the Arabic desktop box lands at 27.625 + 24 + 2 = 53.63px.
   REACH, stated plainly: the six controls inside `label.ref-field` on the register form -- email, number,
   language, address, postal code and branch. The box-number control is a composite whose visible digits are
   painted by `.ref-reg-pobox-display` at a pinned 20px over a transparent capture input, so it carries no
   inherited size and is untouched.
   REACH CORRECTED 2026-09-13, and the correction is the point rather than a footnote: the arithmetic above
   is reached by the four TEXT INPUTS only. The `font-size` half of this rule does land on the two selects
   (17px in Arabic, 16px in English, measured), but the `line-height` half does not -- a select takes the
   user agent's own leading and computes `normal` whatever an author declares, so a height DERIVED from
   leading is unreachable on that control and it settles on the `min-height` floor instead: measured 48px
   and 49.88px against the inputs' 53.63px at Arabic desktop, and the two selects unequal to each other,
   which is what says no declared height was governing them. The rule directly below therefore STATES the
   box for the selects, out of these same declarations, so all six render one box. */
.ref-register .ref-field input,
.ref-register .ref-field select {
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 6px;
    background: rgb(255 255 255 / .8);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .5);
    font-size: 1rem;
    line-height: var(--leading-body);
} /* .user-field-input: was 52px/13px 14px/--kp-radius-md(8px)/solid white/no shadow */
/* THE SELECTS' BOX IS STATED, BECAUSE A SELECT CANNOT DERIVE ONE (2026-09-13). The reason is written out
   in the block above; this is the size, and it is written as the SAME ARITHMETIC the inputs resolve to
   rather than as one of its four answers: the root scale through `1rem`, times the page's own body
   leading, plus the block padding declared above (12px + 12px) and the shared field border (1px + 1px),
   under the global border-box sizing. Nothing here can drift from the siblings, because every term is
   read from the declaration that governs them -- move the padding and this moves with it.
   (2026-10-14: that block padding is now the INPUTS' alone. The select itself carries none -- `padding-block:
   0` below, for the WebKit cut recorded at the shared select rule -- and this sum still adds the inputs'
   12px + 12px, so the select's box stays the inputs' box while its text sits in the whole of it.)
   DEPENDENCY CORRECTED 2026-09-13, because that last half claims more than CSS does. Only the TOKEN
   halves follow at runtime: `1rem` resolves against the same root the family scales with and
   `--leading-body` is the same custom property the inputs read, so those two track the family by
   themselves. The padding and border terms are LITERALS, written out here a second time -- the cascade
   carries nothing between them and the declarations above, so changing the family padding to 13px
   would leave this sum at the old number and the six boxes would part. What holds them equal is
   verification, not the cascade: the design-family governance arm reads the block padding out of the
   register field rule and the border out of the shared field rule and requires this size to be exactly
   those terms, so a padding change that leaves this line behind FAILS its gate rather than following
   silently. Both declarations move in the same edit, and the gate is what says so.
   What it renders, cell by cell: 17 x 1.625 + 26 = 53.63px on the Arabic desktop tier (root 106.25%),
   16 x 1.625 + 26 = 52px on the Arabic phone tier (the root returns to 100% at <=800px), and
   16 x 1.5 + 26 = 50px in English at both -- the four heights the text inputs beside them measure. The
   `min-height: 48px` above stays and never binds now, since all four clear it.
   Neither select has a counterpart in the rendered reference -- it draws no select at all, as the note
   on the shared field rule says -- so this is not mockup parity but Core Rule 13's keep-shipped-extras
   clause: a surface the reference lacks is kept and styled with the design system to FIT its siblings.
   (Corrected 2026-10-14: the rendered reference DOES draw a branch select, and the note on the shared
   field rule is mistaken in the same way. The reference's js/user-info.js (about line 201) builds
   `<select id="user-branch" class="user-field-input user-branch-select">`, and its css/app.bundle.css
   styles it: `.user-field-input` with min-height 48px and padding 12px 16px (about line 21293), and
   `.user-branch-select` with appearance: auto (about line 21299). The language select still has no
   counterpart. The box above is the one the inputs beside it take, and the zero block padding below
   keeps the native look the reference asks for; Chromium draws the text where it did before.) */
.ref-register .ref-field select {
    block-size: calc(1rem * var(--leading-body) + 12px + 12px + 1px + 1px);
    padding-block: 0;
}
.ref-register .ref-field input:focus,
.ref-register .ref-field select:focus {
    border-color: var(--kp-stamp-gold-300);
    background: var(--kp-white);
    box-shadow: 0 0 0 2px rgb(203 160 82 / .2);
} /* .user-field-input:focus: was the darker --color-portal-accent gold + 3px/.13 ring, not this page's own softer gold + 2px/.2 */
.ref-register .ref-field input.is-valid:focus,
.ref-register .ref-field select.is-valid:focus {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, .16);
} /* .user-field-input.is-valid:focus: 2px ring, was the shared rule's 3px (border-color already matched) */
/* A FLAGGED FIELD STAYS FLAGGED WHILE IT IS FOCUSED (2026-09-10). The page's own focus dress two rules up
   is `.ref-register .ref-field input:focus` (0,3,1) and the shared invalid-focus rule is
   `.ref-field input.is-invalid:focus` (0,3,1) — equal weight, and this page's rule comes later, so the
   gold repainted the red the engine had just set. Measured on the register form: the submit gate focuses
   the FIRST invalid field, so that one field wore gold while every other refused field below it wore red;
   the reader is told "look here" and then shown the colour that means "you are typing here". The personal
   data screen carries the same rule for the same reason, in its own words.
   The fix is the state's OWN rule at (0,4,1) rather than a re-order, so a later addition to the page dress
   cannot silently take the red back; it keeps this page's 2px ring idiom (the shared rule's is 3px) and
   re-spells the danger token's rgb triplet at this page's alpha, exactly as its green twin above does and
   for the same reason — a custom property cannot supply only the rgb part of an rgba(). */
.ref-register .ref-field input.is-invalid:focus,
.ref-register .ref-field select.is-invalid:focus {
    border-color: rgba(200, 16, 46, .8);
    box-shadow: 0 0 0 2px rgba(200, 16, 46, .2);
}
/* TOMBSTONE 2026-08-09 (onboarding wave W6): `.ref-reg-card--identity .ref-field input[readonly]` lived
   here. P6 painted a verified-green border on the ONE locked input this card used to hold -- the
   prefilled Hawiyati name -- because the reference "has no locked INPUT to copy (its identity card is a
   read-only <small>/<strong> grid)". The W6 rebuild ships that grid, so the card holds no input at all
   and the rule matches nothing. The verified meaning did not disappear with it: the panel carries the
   reference's own "verified" pill, and every value in it is rendered as a fact rather than as a field
   somebody forgot to fill. */

/* ============================================================
   FIX 2 (owner design-review, 2026-07-19): the register fields regroup into the mockup's titled,
   icon-headed cards -- Card A "Verified Identity" (our locked name) + Card B "Reach you" (email /
   phone / preferred-language). Ports register-user-info.html's .user-card / .user-card-heading /
   .user-heading-icon / .user-verified-pill / .user-field-stack (user-info.css:217-259) into a
   register-scoped .ref-reg-* family (own names, so nothing collides with admin/portal .user-* usage).
   Values live-measured on the running mockup @ 8098 (getComputedStyle). Translucent white/blue/green
   washes stay literal rgb()/rgba() per this file's one-off-overlay precedent; solid brand/emerald
   colors resolve to tokens (--color-portal-action = #0033a0 = --user-primary; --kp-emerald-600/700 =
   the heading-icon-green / pill greens; --kp-white). Excluded per spec: the PO-Box card + the chatbot.
   ============================================================ */
.ref-reg-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: var(--kp-radius-sm); /* mockup 6px */
    background: rgb(255 255 255 / .78);
    box-shadow: 0 18px 50px -16px rgb(15 23 42 / .22), inset 0 1px 0 rgb(255 255 255 / .9);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
}
/* Full responsive set (every @media tier the component declares is ported, not the base rule alone): the mockup .user-card padding steps 24 -> 28 (>=640) -> 20 (<=420);
   porting only the 24px base left desktop 4px short and small phones 4px over -- both @media rules ported. */
@media (min-width: 640px) { .ref-reg-card { padding: 28px; } }
@media (max-width: 420px) { .ref-reg-card { padding: 20px; } }
/* P2 fix round (2026-08-08): each register card carries ONE corner bloom -- a 144px disc under
   blur(48px), clipped by the card's own overflow:hidden. The reference ships them as real <span>
   elements (`.user-card-bloom` + a per-card modifier, app.bundle.css:21256-21259); ours are pseudo-
   elements, which needs no markup hook and paints identically.
   Colours follow the SOURCE per card, not one shared tint: the identity card blooms EMERALD
   (rgba(16,185,129,.1) -- the same package emerald this register family already writes as a literal on
   .ref-reg-heading-icon--green and the pulse keyframes) and the contact card blooms NAVY
   (rgba(0,51,160,.15) -- #0033a0, already the official brand navy). The package's third disc belongs to
   its PO-Box card, which our build excludes, so it is not ported. Alphas stay literal for the usual
   reason: a custom property cannot supply only the rgb part of an rgba().
   Corners follow the SAME recorded exception as the login bloom above -- the reference pins these
   physically (`top/right` on identity, `bottom/left` on contact) with no direction override in the
   served bundle, so each [dir="rtl"] arm swaps the inline side back to keep the painted corner equal in
   both languages. */
.ref-reg-card::before {
    content: "";
    position: absolute;
    inset-block-end: -64px;
    inset-inline-start: -48px;
    width: 144px;
    height: 144px;
    border-radius: 50%;
    background: rgb(0 51 160 / .15);
    filter: blur(48px);
    pointer-events: none;
}
[dir="rtl"] .ref-reg-card::before {
    inset-inline-start: auto;
    inset-inline-end: -48px; /* inline-end under RTL IS the physical left -- the reference's own corner */
}
.ref-reg-card--identity::before {
    inset-block-start: -64px;
    inset-block-end: auto;
    inset-inline-start: auto;
    inset-inline-end: -48px;
    background: rgb(16 185 129 / .1);
}
[dir="rtl"] .ref-reg-card--identity::before {
    inset-inline-end: auto;
    inset-inline-start: -48px; /* inline-start under RTL IS the physical right */
}
/* The PO-Box card's own disc (onboarding wave W6, 2026-08-09 -- the reference's third `.user-card-bloom`
   modifier, which earlier packages could not port because this card did not exist yet): the same navy as
   the contact card's but LIGHTER (.1 against .15) and in the opposite block corner, so the three cards
   read as a set without repeating one glow. Physical corner + RTL swap follow the pair above. */
.ref-reg-card--pobox::before {
    inset-block-start: -64px;
    inset-block-end: auto;
    background: rgb(0 51 160 / .1);
}
/* The reference lifts its card body over the bloom with a wrapper (`.user-card-content { position:
   relative; z-index: 1 }`, app.bundle.css:21255). Without that wrapper an absolutely-positioned pseudo-
   element paints ABOVE in-flow content, so the disc would sit on top of the heading. Lifting the card's
   own children is the same result with no markup -- and it is stated explicitly rather than leaning on
   the card's backdrop-filter stacking context, which a future change could remove without noticing. */
.ref-reg-card > * { position: relative; z-index: 1; }
.ref-reg-card-head { display: flex; align-items: center; gap: 12px; margin-block-end: 20px; }
.ref-reg-card-head > span:last-child:not(.ref-reg-verified) { flex: 1; min-width: 0; }
/* Card A puts the verified pill on the trailing edge -> the heading spreads and top-aligns. */
.ref-reg-card--identity .ref-reg-card-head { align-items: flex-start; justify-content: space-between; }
.ref-reg-card--identity .ref-reg-card-head > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ref-reg-card-head h2 {
    overflow: hidden;
    margin: 0;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[dir="rtl"] .ref-reg-card-head h2 { letter-spacing: 0; }
.ref-reg-card-head p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.25; }
.ref-reg-heading-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid rgb(0 51 160 / .25);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-white);
    box-shadow: 0 8px 22px -12px rgb(0 51 160 / .45);
}
.ref-reg-heading-icon .icon { width: 17px; height: 17px; }
.ref-reg-heading-icon--blue { color: var(--color-portal-action); }
.ref-reg-heading-icon--green {
    border-color: rgb(16 185 129 / .2);
    box-shadow: 0 8px 22px -12px rgb(16 185 129 / .3);
    color: var(--kp-emerald-600);
}
.ref-reg-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 12px;
    border: 1px solid rgb(110 231 183 / .5);
    border-radius: 999px;
    color: var(--kp-emerald-700);
    background: rgb(209 250 229 / .7);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
/* The reference narrows the pill's inline padding on phones (portal group 3, 2026-09-09). */
@media (max-width: 420px) { .ref-reg-verified { padding-inline: 9px; } }
.ref-reg-verified i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kp-emerald-500);
    animation: ref-reg-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes ref-reg-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgb(16 185 129 / .2); }
    50% { opacity: .65; box-shadow: 0 0 0 5px rgb(16 185 129 / 0); }
}
/* The mockup's .user-field-stack -- inner field gap inside the contact card (16px). */
.ref-reg-field-stack { display: grid; gap: 16px; }
/* Field-label icon + text group (mockup .user-field-label > span:first-child): inline-flex, 6px gap.
   Scopes only to the register cards so Login's civil-id label is untouched. The icon color/size come
   from the existing .ref-register .ref-field span svg.icon (gold, 14px) + .ref-field span svg.icon
   rules above. */
.ref-reg-card .ref-field > span > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }

/* ============================================================
   REGISTER -- the identity panel, the field hints and the existing-PO-Box card
   (onboarding wave W6, 2026-08-09). Ports register-user-info.html's `.user-identity-grid`,
   `.user-field-hint` and the whole `.user-pobox-*` family into this page's own `.ref-reg-*` namespace,
   the convention this register family has used since 2026-07-19 ("own names, so nothing collides with
   admin/portal .user-* usage" -- and `.user-card`/`.user-field-input` are exactly the kind of generic
   names that would).
   Colour handling is this file's standing rule: solid brand values resolve to tokens, and the
   package's translucent washes stay literal rgb()/rgba() because a custom property cannot supply only
   the rgb part of an alpha colour. Every reference colour is re-expressed in the OFFICIAL palette at
   the reference's own alphas (portal palette clause, 15 #148).
   ============================================================ */

/* ---- The read-only identity panel ---- */
/* One column, and TWO from the reference's 768px tier -- the same tier that brings in the avatar disc.
   The date-of-birth / gender pair splits again inside its own cell at every width, which is what puts
   two short values on one row under a full-width one. */
.ref-reg-identity-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .ref-reg-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ref-reg-identity-grid > div { min-width: 0; }
.ref-reg-identity-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ref-reg-identity-grid small {
    display: block;
    margin-block-end: 6px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
/* A recorded FACT on display, not an input: same box geometry as an editable field, but a flat ink
   wash instead of the white surface, so it reads as something shown rather than something to fill in. */
.ref-reg-identity-grid strong {
    display: block;
    overflow: hidden;
    padding: 12px 16px;
    border: 1px solid rgb(226 232 240 / .6);
    border-radius: var(--kp-radius-sm);
    color: rgb(15 23 42 / .8);
    background: rgb(15 23 42 / .02);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Machine-ish values (Civil ID, the birthdate) in the mono face with tabular figures, so digits line
   up column-wise. `direction: ltr` is carried by the element's own dir="ltr" attribute in the markup
   (the bdi law), not by this rule. */
.ref-reg-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
}
/* Scoped through the split grid, as the reference scopes its own (its identity split's dob rule): the identity
   grid's element-qualified rule above is (0,1,1), and a lone class rule lost to it, so the birthdate rendered at the
   grid's 14px (portal group 3, 2026-09-09). */
.ref-reg-identity-split .ref-reg-dob { font-size: 13px; letter-spacing: 0; }

/* ---- Field hints (the line under an input) ---- */
/* A <span>, not the reference's <p>: our fields live INSIDE `<label class="ref-field">`, and a label
   takes phrasing content only -- flow content there is invalid HTML that the browser silently reparses.
   The same call `.ref-field .field-error-msg` records for the engine's own message element. `display:
   block` is what makes it read as the reference's paragraph line. */
.ref-reg-field-hint {
    display: block;
    /* The field grid's 8px gap already separates the hint from its input; the reference separates them by 6px (a
       hint margin under an unpadded input), so the hint gives the 2px difference back (portal group 3, 2026-09-09). */
    margin: -2px 0 0;
    color: rgb(71 85 105 / .75);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
}
/* THE SAME VALUES AGAIN, at a selector that can win. A hint that sits inside `<label class="ref-field">`
   is a direct <span> child of that label, and `.ref-register .ref-field > span` (0,3,0) is the LABEL ROW's
   rule -- uppercase, .18em tracking, 700 weight. It outranks the single class above, so the English hints
   rendered as bold spread-out capitals instead of the reference's quiet sentence (measured live:
   textTransform uppercase, letterSpacing 1.98px, fontWeight 700, before this rule existed). Matching its
   specificity and coming later in the file is what settles it. Arabic never showed the defect -- uppercase
   is a no-op there and base.css already zeroes RTL tracking -- exactly like the `.ref-field-ok` case this
   file records at :4619. The hint under the box-number field is NOT inside a label and takes the base rule. */
.ref-register .ref-field > .ref-reg-field-hint {
    display: block;
    color: rgb(71 85 105 / .75);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* ---- The existing-PO-Box card ---- */
.ref-reg-pobox-info {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: -4px 0 16px;
    color: rgb(71 85 105 / .85);
    font-size: 12px;
    line-height: 1.4;
}
.ref-reg-pobox-info .icon { width: 14px; height: 14px; flex: 0 0 14px; margin-block-start: 1px; color: rgb(0 51 160 / .7); }

.ref-reg-pobox-choices { display: flex; gap: 12px; margin-block-end: 16px; }
/* Two selectable tiles built on REAL radios: the input is visually hidden (never `display: none`, which
   would take it out of the tab order and off the accessibility tree) and the label carries the dress. */
.ref-reg-pobox-choice {
    /* Positioned so the visually-hidden radio inside it resolves against THIS tile rather than escaping
       to the card -- an absolutely-positioned child looks for the nearest positioned ancestor, and the
       card is one. It is clipped to a pixel either way, but a control that lives somewhere other than
       the thing it belongs to is how focus rings and hit-testing end up in the wrong place. */
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    color: var(--color-text-muted);
    background: rgb(255 255 255 / .82);
    text-align: start;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.ref-reg-pobox-choice:hover { border-color: var(--kp-navy-600-a30); }
.ref-reg-pobox-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.ref-reg-pobox-choice:has(input:checked) {
    border-color: rgb(0 51 160 / .5);
    color: var(--color-text);
    background: rgb(0 51 160 / .05);
}
/* Keyboard focus has to be visible on the LABEL, because the input it belongs to is visually hidden. */
.ref-reg-pobox-choice:has(input:focus-visible) { outline: 2px solid var(--color-portal-action); outline-offset: 2px; }
.ref-reg-pobox-choice > i {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    padding: 3px;
    place-items: center;
    border: 1px solid rgb(15 23 42 / .3);
    border-radius: var(--kp-radius-full);
    background: var(--kp-white);
}
.ref-reg-pobox-choice:has(input:checked) > i { border-color: var(--color-portal-action); }
.ref-reg-pobox-choice > i > b { display: block; width: 100%; height: 100%; border-radius: var(--kp-radius-full); background: transparent; }
.ref-reg-pobox-choice:has(input:checked) > i > b { background: var(--color-portal-action); }
.ref-reg-pobox-choice > span { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
@media (max-width: 420px) {
    .ref-reg-pobox-choice { gap: 8px; padding-inline: 11px; }
    .ref-reg-pobox-choice > span { font-size: 12px; }
}

/* The arm that opens under "yes". Its entry animation is the reference's own. */
.ref-reg-pobox-expanded { display: grid; gap: 16px; animation: ref-reg-pobox-enter .3s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ref-reg-pobox-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.ref-reg-pobox-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .ref-reg-pobox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* THE TWO FIELDS KEEP ONE CONTROL HEIGHT (2026-10-18). Side by side, the two fields share one row, so the shorter field
   is stretched to the taller one's height, and its own grid handed the extra to its auto rows: the postal-code input grew
   (measured 55.5px in English at 799-900px, beside the branch select's stated 50px) while the select, whose height is
   stated, could not. Packed to the top, each field keeps its controls at their own size and the spare room falls below
   its hint. English only: the Arabic page keeps its measured geometry unchanged (the closing review's ruling), so its
   own stretch (measured at 799-1280px) is left as it was; on phones, one field to a row, nothing moves.
   Dated clause 2026-10-20 (ledger 15 #623): the rule now holds in BOTH languages,
   Arabic and English. The Arabic page stretched the same way whenever one field of the row showed its message (measured:
   the postal-code input 62.27px beside the 52px branch select at 700-800px, 63.89px beside 53.63px at 1024-1440px, and
   16.27px instead of 6px under the select when the postal field showed its message), while the rendered reference's
   field wrapper is a block and never stretches. */
.ref-reg-pobox-grid > .ref-field { align-content: start; }

/* The sign-up's address row (ruling 15 #855(i), dated 2026-10-29): governorate, area and block, one field to a row
   below 1024px and three across from it. Not from 640px, the existing-box grid's breakpoint: a third of the card
   measured 178px at 799-801px wide in English, where the placeholder "Select governorate" ran under the select's
   arrow and was cut; at 1024px a third measures 236.7px and the placeholder is whole. Packed to the top for the
   reason the rule above records: a field showing its message must not stretch the controls beside it. */
.ref-reg-address-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .ref-reg-address-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ref-reg-address-grid > .ref-field { align-content: start; }

.ref-reg-pobox-number { display: grid; width: 100%; gap: 8px; }
.ref-reg-pobox-label {
    display: flex;
    align-items: center;
    width: 100%;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
}
/* Display and input are ONE control: the input lies over the stamped characters at inset 0 and paints
   last, so a click anywhere in the box lands on the field. `overflow: hidden` is what keeps a long
   value from spilling past the rounded corner. */
.ref-reg-pobox-shell {
    position: relative;
    display: block;
    width: 100%;
    min-height: 52px;
    /* The clipping lives on the DISPLAY below, not here. It has to: the validation engine anchors a
       field's message immediately after its INPUT, and this field's input is the transparent overlay
       INSIDE this box -- so with `overflow: hidden` here the message either grew the bordered box around
       itself (measured: the shell stretched 52 -> 78px with the red sentence sitting inside the input's
       own border) or, with a fixed height, vanished entirely. Clipping the display keeps a long value
       from spilling past the rounded corner, which is the only thing that ever needed clipping. */
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    color: var(--color-text);
    background: rgb(255 255 255 / .8);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .5);
    text-align: start;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ref-reg-pobox-shell:focus-within { border-color: var(--kp-stamp-gold-300); box-shadow: 0 0 0 2px rgb(203 160 82 / .2); }
/* Dated 2026-11-11: forced colours (high contrast) drop the shell's box-shadow above and force its border to one
   colour, and the overlay input inside takes no outline of its own (its rule below), so without this the focused
   field looked like the unfocused one. In that mode the shell itself carries the system ring; the overlay keeps
   `outline: 0`, so normal colours still draw the one gold ring. */
@media (forced-colors: active) {
    .ref-reg-pobox-shell:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
/* The red state has to reach the SHELL, because the input inside it is invisible -- without this a
   rejected box number would paint a border nobody can see. The values are the SAME pair every other
   portal field flags with (`.ref-field input.is-invalid` above), so the whole form reads one red. */
.ref-reg-pobox-shell:has(input.is-invalid) {
    border-color: rgb(200 16 46 / .7);
    box-shadow: var(--focus-ring-portal-danger);
}
.ref-reg-pobox-display {
    display: flex;
    align-items: center;
    min-height: 52px;
    overflow: hidden;
    padding: 12px 16px;
    color: var(--color-portal-action);
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .15em;
    line-height: 1;
}
/* The run is LTR in both languages (the digits law), so under RTL it packs to the inline edge the
   reader starts from -- the reference's own treatment of this box. */
[dir="rtl"] .ref-reg-pobox-display { justify-content: flex-end; }
.ref-reg-pobox-placeholder { position: relative; display: inline-flex; color: rgb(71 85 105 / .3); }
.ref-reg-pobox-placeholder i,
.ref-reg-pobox-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-inline-start: 2px;
    border-radius: var(--kp-radius-full);
    background: var(--color-portal-accent);
    vertical-align: middle;
    animation: ref-reg-caret 1s steps(2, start) infinite;
}
.ref-reg-pobox-placeholder i { position: absolute; inset-block: 0; inset-inline-start: 0; margin: 0; }
.ref-reg-pobox-digits { display: inline-flex; }
.ref-reg-stamp-char { display: inline-block; transform-origin: 50% 60%; animation: ref-reg-stamp-in 480ms cubic-bezier(.16, 1, .3, 1) both; }
.ref-reg-pobox-shell input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    /* Dated 2026-11-10: the shell draws this control's focus ring (its :focus-within rule above), so the overlay takes
       no outline of its own, as the field family's inputs beside it take none; before, the keyboard painted two rings. */
    outline: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    cursor: text;
}
/* …and the message itself is lifted out to sit BENEATH the box, where every other field on this page
   puts its message, rather than inside the border it belongs to. While it shows it takes the hint's
   place: `visibility: hidden` rather than `display: none` so the row keeps its height and nothing under
   it jumps when the message appears. */
.ref-reg-pobox-shell .field-error-msg {
    position: absolute;
    inset-inline: 0;
    inset-block-start: calc(100% + 6px);
}
.ref-reg-pobox-number:has(input.is-invalid) > .ref-reg-field-hint { visibility: hidden; }

@keyframes ref-reg-caret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@keyframes ref-reg-stamp-in {
    0% { opacity: 0; transform: translateY(-6px) scale(1.35) rotate(-4deg); filter: blur(1.5px); }
    60% { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: blur(0); }
}

/* ---- The submit's sweep + its disabled dress ---- */
/* The sweep was a recorded omission from P6 (it needs the <i> element and its z-index scaffolding);
   the W6 rebuild brings both. */
/* The reference tracks the submit's label .025em in English (the base rule zeroes Arabic); the missing-field
   counter and the enabled label share it (portal group 3, 2026-09-09). */
.ref-reg-submit { position: relative; overflow: hidden; letter-spacing: .025em; }
.ref-reg-submit > :not(.ref-reg-submit-sweep) { position: relative; z-index: 1; }
.ref-reg-submit-sweep {
    position: absolute;
    inset: 0;
    width: 52%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .15), transparent);
    transform: translateX(-210%);
    transition: transform .7s ease;
}
.ref-reg-submit:hover:not(:disabled) > .ref-reg-submit-sweep { transform: translateX(310%); }
[dir="ltr"] .ref-reg-submit:hover:not(:disabled) .register-submit-arrow { transform: translateX(2px); }
[dir="rtl"] .ref-reg-submit:hover:not(:disabled) .register-submit-arrow { transform: scaleX(-1) translateX(2px); }
.ref-reg-submit:active:not(:disabled) { transform: scale(.97); }
/* The reference's own disabled dress -- deeper fade than the shared .ref-primary .5 and no lift ring,
   so the gated button reads as inert rather than merely dimmed.
   CORRECTED 2026-10-14 (ruling 15 #380, Core Rule 13): as first written this rule never painted. Both arms
   weighed (0,2,0), and two LATER rules of the same weight won the tie on source order -- `.ref-primary:disabled`
   (.5) and `.ref-register .ref-primary` (the register ring), both below -- so the gated button was served at .5
   with its ring. The incomplete state (`is-disabled`, set by the submit gate only while fields are missing) now
   carries the page scope, (0,3,0), which outweighs both wherever they sit and leaves `.ref-primary:disabled` as it
   is for every other button. Weight rather than a move: a rule moved below its rivals wins only until the next
   rule of the same weight lands after it.
   The `:disabled` arm keeps its old weight on purpose (ruled 2026-10-14): alone it is the in-flight lock, which keeps
   the shared in-flight dress -- .5, the ring, the arrow and the lock's own ring. */
.ref-register .ref-reg-submit.is-disabled,
.ref-reg-submit:disabled { opacity: .35; box-shadow: none; cursor: not-allowed; }
/* No forward arrow until the form can be sent (2026-10-14, ruling 15 #380, Core Rule 13): the reference's script
   removes the icon while the form is incomplete and puts it back once it is complete. Our gate marks that state
   with `is-disabled`, so the stylesheet takes the arrow out of the row there -- `display: none`, so the icon
   and its flex gap leave the row and the label re-centres, as when the reference removes the icon.
   `is-disabled` and never `:disabled`: the arrow follows completeness, and the in-flight lock keeps it. */
.ref-reg-submit.is-disabled .register-submit-arrow { display: none; }

.ref-civil-count { color: var(--kp-slate-400); font-size: 10px; }
.ref-id-help { margin: -8px 0 0; color: var(--kp-slate-500); text-align: center; font-size: 11px; }

/* "Remember me" (dated 2026-10-20, owner rulings 15 #606, #662). The portal mockup's login row, static-app.css:4689-4695
   (.check-row): a flex row, 8px gap, 13px text, 16px above and below; the colour is the card's own helper grey, and the box
   is the browser's own checkbox tinted with the card's action colour (palette clause, Core Rule 13).
   CORRECTED 2026-10-21 (Core Rule 13): the mockup row sits in a block form, ours is an item of #loginFormState's 20px-gap
   grid, where an item's margins add to the gap and never collapse into it -- the 16px margins painted 36px above and below.
   -4px nets the gap to the mockup's painted 16px on each side (measured from the help line's box to the row's and from the
   row's to the sign-in button's, 1440 to 390, both languages); the same kind of pull as .ref-id-help's -8px. Every other
   row keeps its own box and gaps; only the two spaces around this row shrink, 20px each. */
.ref-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-block: -4px;
    color: var(--kp-slate-500);
    font-size: 13px;
    cursor: pointer;
}
.ref-remember input { margin: 0; accent-color: var(--color-portal-action); cursor: inherit; }
.ref-remember:has(input:disabled) { cursor: not-allowed; }

.ref-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    /* Fix-wave R4: the mockup's <button> keeps the browser's UA-default 1px/6px padding (its own
       reset never touches padding); ours is force-zeroed by base.css's universal reset. Restored
       here to match the mockup's LIVE computed box -- has no visible height effect (min-height
       wins) but keeps the two sides byte-for-byte comparable in the fidelity match table. */
    padding: 1px 6px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--color-portal-action);
    box-shadow: var(--shadow-portal-cta);
    color: var(--kp-white);
    /* intentionally dead: the .ref-public font reset (R4) wins -- kept as the mockup's source declaration */
    font-size: 14px;
    font-weight: 800;
    transition: transform 180ms cubic-bezier(.16, 1, .3, 1), background-color 180ms ease, box-shadow 180ms ease;
}
.ref-primary:hover:not(:disabled) { background: var(--color-portal-action-hover); }
/* `.ref-primary:active { transform: scale(.98) }` USED TO SIT HERE and is retired into the portal's
   press base layer (site.css), which declares exactly that value (lead-review sweep of fix package E,
   2026-08-12). Both usages are `<button>` elements -- the login CTA and the register submit -- so the
   base rule reaches them by tag; grepped across src/ before removing, there is no `a.ref-primary`.
   Measured on the login CTA with a real held pointer BEFORE the retirement: `matrix(0.98,...)` with a
   held duration of `.14s` -- the `.14s` already came from the base layer while this rule supplied only
   a transform the base also supplies, which is what made it redundant. Re-measured AFTER: identical.
   The register submit is unaffected either way: `.ref-reg-submit:active:not(:disabled)` (0,3,0) wins
   there with its own `.97`, which is the value the reference declares for that control. */
.ref-primary:disabled { opacity: .5; cursor: not-allowed; }
/* The "raised" CTA treatment for Login's submit (64px / raised shadow). */
.ref-login .ref-primary {
    min-height: 64px;
    box-shadow: var(--shadow-portal-cta-raised);
}
/* FIX 1 (owner design-review, 2026-07-19): the register CTA now uses the mockup register submit's OWN
   metrics -- live-measured on the running mockup .user-submit: min-height 56px, radius 6px, font-size
   14px, font-weight 700 (was borrowed from Login's 64px). font-size/weight are declared HERE at
   .ref-register .ref-primary specificity (0,2,0) so they beat the .ref-public button { font: inherit }
   reset (0,1,1) -- otherwise they'd be inherited away like the base .ref-primary's are.
   Lead follow-up (same day, exact-as-mockup bar): the fill + shadow now also mirror the LIVE mockup
   .user-submit -- 135deg navy gradient (postal-navy-600 -> -700) + the 4px-ring drop shadow
   (--shadow-portal-cta-register). Live probe notes: the source file's letter-spacing .025em computes
   to normal in the live render (NOT ported), and hover produces ZERO computed change (the base
   .ref-primary hover flat-fill is therefore overridden back to the gradient below).
   COMMENT CORRECTED 2026-08-08 (restyle package P6): that last clause described mockup v1 and is no
   longer the target. v2's register submit DOES change on hover -- `filter: brightness(1.1)` -- so the
   gradient override below is still needed for its original reason (it stops the base flat-fill) but it
   is no longer the whole hover story; the brightness lift sits beside it. */
.ref-register .ref-primary {
    min-height: 56px;
    /* P2 fix round (2026-08-08): the reference's register submit declares `padding: 16px 24px`
       (app.bundle.css:21344) where the base .ref-primary carries the login button's restored UA default
       (1px 6px). The painted box is identical either way -- min-height 56 and a centred flex row both
       win over this padding -- but the fidelity instrument reads computed values, so it matches now. */
    padding: 16px 24px;
    border-radius: var(--kp-radius-sm);
    background: linear-gradient(135deg, var(--kp-postal-navy-600), var(--kp-postal-navy-700));
    box-shadow: var(--shadow-portal-cta-register);
    font-size: 14px;
    font-weight: 700;
    /* Restyle package P6 (2026-08-08): the reference submit's OWN transition list
       (app.bundle.css:21344), replacing the base .ref-primary's background/box-shadow pair -- neither of
       which this button can animate anyway, since its fill is a gradient (not an animatable
       background-color) and its shadow never changes. What it buys is the two things that DO move here:
       the hover brightness below, and the press, whose .14s is the same duration P2 pairs with the
       shared auth-surface press. `opacity` rides along for the disabled state.
       COMMENT CORRECTED 2026-10-14 (ruling 15 #380): "its shadow never changes" no longer holds -- the
       gated (incomplete) state drops the ring (the gate dress, above). The ring stays out of this list on
       purpose: the reference's own list leaves it out too, so in both the ring switches at once while the
       fade runs its .2s. */
    transition: filter .2s, transform .14s cubic-bezier(.22, 1, .36, 1), opacity .2s;
}
.ref-register .ref-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--kp-postal-navy-600), var(--kp-postal-navy-700));
    /* P6 (2026-08-08): the register CTA's hover is a BRIGHTNESS lift, not a fill swap -- the same
       mechanism .svc-primary already uses for the subscription CTA, and for the same reason: a 135deg
       two-stop gradient cannot cross-fade to another colour, so the reference brightens the whole fill
       instead. The background line above it stays load-bearing: without it the base .ref-primary:hover
       flat-fills this button back to a solid navy on hover.
       This REPLACES the fix-wave-3 finding (2026-07-18) that the v1 mockup's register submit produced
       zero computed change on hover -- the v2 package this wave measures declares
       `filter: brightness(1.1)` on `.user-submit:hover:not(:disabled)` (app.bundle.css:21348). */
    filter: brightness(1.1);
}

/* Fix-wave 3 (2026-07-18 live-parity ledger item 8c): the row-51 hover micro-interaction below was
   REMOVED -- it was ported from the mockup's user-info.css SOURCE rule for .user-submit, but a live
   isolated-browser hover test against the actual running mockup register-user-info.html (button,
   its <i> sweep overlay, and its svg arrow) showed ZERO computed-style change on hover for any of
   background/color/box-shadow/transform, before vs after -- the mockup's live render never
   activates this effect (some other loaded stylesheet must neutralize the source rule; not
   re-investigated further per the standing rule that live render outranks source files). Only the
   now-unused <i> sweep support (position/overflow container, span z-index layering, the <i>
   element's own static+hover rules) is gone; the trailing arrow icon itself stays -- the mockup DOES
   render a static forward arrow on this button, just without any hover animation -- so its static
   sizing/RTL-mirror rule survives below with its now-moot hover-only transition dropped. The <i>
   markup element itself was removed from Register.cshtml (it had no purpose once its sweep-on-hover
   CSS was gone).
   COMMENT CORRECTED 2026-08-08 (restyle package P6): read the paragraph above as history of mockup v1.
   On v2 the sweep DOES run -- `.user-submit > i` slides on hover (app.bundle.css:21347/21349), along
   with a 2px nudge of the arrow icon. Neither is ported: P6's owner-scoped adoption is the button's
   BOX, its brightness hover and its transition, and re-adding the sweep would need the <i> element and
   its z-index scaffolding back in the markup. The arrow's static sizing/mirror rule below is unchanged
   and still correct. Deliberate omission, recorded here so the next reader does not read the v1
   finding as a current measurement of the target.
   COMMENT CORRECTED 2026-10-14 (ruling 15 #380): "the mockup DOES render a static forward arrow on this button"
   holds only once the form can be sent -- the v2 reference shows no arrow while the form is incomplete, and the
   gate dress above now hides ours in that state. The sizing and the mirror below apply whenever it shows. */
.register-submit-arrow {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
}
[dir="rtl"] .register-submit-arrow { transform: scaleX(-1); }

.ref-form-note {
    margin: 0;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--color-border);
    text-align: center;
    color: var(--kp-slate-500);
    font-size: 12px;
    line-height: 1.5;
}
.ref-form-note button {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--color-portal-action);
    font-weight: 800;
    cursor: not-allowed;
}
/* The company request's way back without its emailed link (ruling 15 #351(f)), on its own line under the
   create-account control and in the same ink. */
.ref-form-note-link {
    display: block;
    color: var(--color-portal-action);
    font-weight: 800;
    text-decoration: none;
}
/* The drop to its own line only when something comes before the link in the note (dated 2026-10-21, Core Rule 13): the
   restore step's note holds the sign-in link alone, and with the drop its line started 25px under the divider where the
   sign-in card's note starts its first line 17px under it (both measured 1440 to 390, both languages). */
.ref-form-note > * + .ref-form-note-link { margin-block-start: 8px; }
.ref-form-note-link:hover { text-decoration: underline; }

/* ---- pending / verified state swap (mockup .ref-login-verification.{pending,verified}) ---- */
.ref-login-verification {
    display: grid;
    justify-items: center;
    gap: 24px;
    padding: 24px 0;
    text-align: center;
    animation: ref-login-state-in 240ms cubic-bezier(.16, 1, .3, 1) both;
}
.ref-login-verification-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
}
/* Restyle P2 D1 mapping (2026-08-08): the disc, both pings and the spinner below drew the v2 package's
   PRE-REBRAND blue (17 94 232 = #115ee8), which the palette clause forbids copying. The official navy
   triplet (0 51 160 = #0033A0) carries the reference's own alphas (.1/.05/.3/.2/.2) unchanged. */
.ref-login-verification-disc {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid rgb(0 51 160 / .1);
    border-radius: var(--kp-radius-2xl);
    background: rgb(0 51 160 / .05);
    color: var(--color-portal-action);
}
.ref-login-ping {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid rgb(0 51 160 / .3);
    border-radius: var(--kp-radius-full);
    animation: ref-login-ping 1.35s cubic-bezier(0, 0, .2, 1) infinite;
}
.ref-login-ping.ping-two { width: 96px; height: 96px; border-color: rgb(0 51 160 / .2); animation-delay: .4s; }
.ref-login-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgb(0 51 160 / .2);
    border-top-color: var(--color-portal-action);
    border-radius: var(--kp-radius-full);
    animation: ref-login-spin .8s linear infinite;
}
.ref-login-verification-copy { display: grid; gap: 8px; }
.ref-login-verification-copy h2 { margin: 0; color: var(--color-text); font-size: 17px; font-weight: 800; }
.ref-login-verification-copy p {
    max-width: 34ch;
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 12.5px;
    line-height: 1.55;
}
.ref-login-elapsed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    background: rgb(15 23 42 / .05);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
}
.ref-login-elapsed bdi { font: inherit; font-variant-numeric: tabular-nums; }
.ref-login-retry {
    margin-block-start: 8px;
    padding: 1px 6px;
    border: 0;
    background: transparent;
    color: var(--color-portal-action);
    /* intentionally dead: the .ref-public font reset (R4) wins -- kept as the mockup's source declaration */
    font-size: 12px;
    font-weight: 800;
    transition: color 180ms ease;
    cursor: pointer;
}
.ref-login-retry:hover { color: var(--color-portal-accent); }

.ref-login-verification.verified { gap: 16px; }
.ref-login-verification.verified .ref-login-verification-disc {
    border-color: var(--kp-emerald-500);
    border-radius: var(--kp-radius-full);
    background: rgb(16 185 129 / .1);
    color: var(--kp-emerald-600);
}
.ref-login-verification.verified .ref-login-verification-disc .icon { width: 36px; height: 36px; }
.ref-login-verification.verified h2 { color: var(--kp-emerald-600); }

@keyframes ref-login-spin { to { transform: rotate(360deg); } }
@keyframes ref-login-ping { 75%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes ref-login-state-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* .ref-reg-ambient joined this list in P6 (2026-08-08): two 18s/22s infinite loops are exactly the
   "large slow drift" a reduced-motion request asks to be spared, and stopping the animation leaves both
   discs painted at their 0% frame -- the page keeps its wash and loses only the movement. The reference
   reaches the same end with a blanket page-wide rule (app.bundle.css:21478); naming the elements matches
   this block's own convention. Listing the BASE class covers both drift keyframes at once. */
/* The W6 rebuild's own loops join the same list (2026-08-09): the meter-bar and avatar tone cycles, the
   avatar's rotating conic, the verified dot's pulse, the box-number caret and its per-character stamp.
   Every one of them stops at a painted frame, so the page keeps its full appearance and loses only the
   movement -- the stamped characters in particular must still be READABLE with animation off, which is
   why the entry animation is switched off rather than the elements hidden. The reference reaches the
   same end with one blanket page-wide rule (its own reduced-motion arm); naming the elements matches
   this block's convention. */
@media (prefers-reduced-motion: reduce) {
    .ref-login-ping,
    .ref-login-spinner,
    .ref-login-verification,
    .ref-reg-ambient,
    .user-avatar-ring,
    .user-avatar-ring::before,
    .ref-reg-verified i,
    .ref-reg-pobox-expanded,
    .ref-reg-pobox-placeholder i,
    .ref-reg-pobox-caret,
    .ref-reg-stamp-char {
        animation: none;
    }
}

/* ---- ≤800px shrink (v1 theme-parity.css 488-506; re-measured against portal mockup v2 in restyle
   package P1, 2026-08-08 -- v2's own ≤800 block, app.bundle.css:25305, moves the pill to 16/20 and
   is the rule that WINS there, so the v1-era 15/18 pair is retired) ---- */
@media (max-width: 800px) {
    .ref-lang { inset-block-start: 16px; inset-inline-end: 20px; }
    .ref-login { padding: 76px 18px 30px; }
    /* TOMBSTONE 2026-08-09 (onboarding wave W6): `.ref-register { padding: 76px 18px 30px }` lived here.
       It was the P2 fix for a register column that had no narrow band while its login sibling shrank --
       true while the two shared a shell. They no longer do: `.ref-register` is now the reference's own
       container, with its OWN tier ladder (16 -> 24 -> 32px inline padding) declared beside its cap, and
       the header column follows the same ladder. A 18px override here would fight that ladder at every
       width below 800, so it is removed rather than adjusted. */
    .ref-login > div { width: min(520px, 100%); }
    .ref-brand { margin-block-end: 24px; }
    .ref-brand img { height: 78px; margin-block-end: 15px; }
    .ref-brand h1 { font-size: 28px; }
    .ref-brand p { font-size: 14px; }
    .ref-login-card { padding: 22px 18px; }
}

/* ============================================================
   REGISTER ROUTE -- the page's own canvas, line grid and language pill
   (onboarding wave W6, 2026-08-09). Same three divergences the verify route records, for the same
   reasons and through the same hook: this reference page paints a FLAT canvas under a masked line grid
   rather than the login card's radial paper wash, its own two ambient discs (already shipped as
   `.ref-reg-ambient`), and a pill of its own shape. Nothing is forked -- the shared `.ref-grid-bg`
   element and `.ref-lang` pill are RE-POINTED for this route only, exactly as the account-type and
   verify routes re-point them, so no other page moves.
   ============================================================ */
body[data-public-route="register"] {
    min-height: 100svh;
    background: var(--color-bg-canvas);
    /* The reference's Arabic page carries the 1.625 body leading on its root (its Latin one 1.5); the shared
       public-page rule flattens every auth page to 1.5, which Arabic's small labels, captions and pill
       measured short by. The culture-switched token holds both values (portal group 3, 2026-09-09). */
    line-height: var(--leading-body);
}
/* Measured, not assumed: this page's BODY font-size is the ROOT's on both languages -- 17px under
   Arabic, 16px under English -- unlike the verify route, whose reference body is pinned to 16px on
   both. Nothing is declared here for that reason; the note exists so the next reader does not copy
   verify's `font-size: 16px` across by analogy and shrink every label on this page by a point.
   CORRECTED 2026-09-11: that is what the REFERENCE renders, and declaring nothing did not deliver it.
   `.ref-public { font-size: 16px }` -- the pre-login body pin ported in 2026-08-12 from measurements of
   splash, welcome, account-type, terms and login, a list this page was not on -- weighs (0,1,0) against
   this rule's (0,1,1), so with no declaration here the pin simply won and our body renders 16px in Arabic.
   A round-3 measurement of the rendered reference caught it on the number field (ours 16px/26px against
   the reference's 17px/27.625px) and the FIELDS are fixed at their own rule above, which takes `1rem`
   explicitly. Whether the rest of this page's inheriting text -- labels, captions, the CTA -- should move
   with them is a question for a fresh measurement of the reference, not for an inference from this one
   field, and it is recorded here as open rather than answered. */
body[data-public-route="register"] .ref-grid-bg {
    position: fixed;
    z-index: 0;
    opacity: .45;
    /* The package paints this grid in its pre-rebrand blue; re-expressed on the OFFICIAL navy at the
       reference's own .04 alpha (portal palette clause, 15 #148). */
    background-image:
        linear-gradient(rgb(0 51 160 / .04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(0 51 160 / .04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
}
/* FOUR ambient layers run on the reference; only TWO paint. Its page wrapper is an opaque box that
   covers the shared body blobs entirely, so what the reference SHOWS is its own two discs on a flat
   canvas. Our states sit directly on the body with no such cover, so reproducing what is shown means
   switching the body pair off for this route -- the same suppression the verify route and the signed-in
   shell already use, and the same reason. base.css is untouched. */
[data-public-route="register"]::before,
[data-public-route="register"]::after { content: none; }

/* The shared culture pill, re-dressed for this route. The z-150 is load-bearing beyond appearance: the
   sticky header sits at z-50 on this page, so a pill left at the shared z-2 would slide underneath it. */
body[data-public-route="register"] .ref-lang {
    position: fixed;
    z-index: 150;
    inset-block-start: 16px;
    inset-inline-end: 16px;
    min-height: 36px;
    border-radius: var(--kp-radius-sm);
    box-shadow: 0 4px 12px rgb(15 23 42 / .03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: border-color .2s ease, transform .2s ease;
}
@media (min-width: 640px) {
    body[data-public-route="register"] .ref-lang { inset-block-start: 20px; inset-inline-end: 24px; }
}
/* This page's pill DOES lift on hover (the verify page's does not -- measured separately on each). */
body[data-public-route="register"] .ref-lang:hover {
    border-color: rgb(203 160 82 / .7);
    transform: translateY(-1px);
}
body[data-public-route="register"] .ref-lang small { color: rgb(71 85 105 / .6); font-weight: 700; }

/* ============================================================
   REGISTER HEADER -- multi-step header + hero + completion bar (fix-wave R7)
   Source: postOffice_PublicUser_html js/user-info.js headerMarkup()/pageMarkup() + css/user-info.css
   (.user-header/.user-back/.user-route-title/.user-step/.user-hero/.user-completion families).
   Register FIELD trims stay (the register mockup reference -- no identity grid, no PO-Box
   section, no chatbot FAB); only the earlier single-card HEADER trim is revoked here. ADAPTATION:
   our single trimmed card is far narrower than the mockup's rich multi-card form, so this header/
   step/hero/progress column still doesn't copy the mockup's 5-tier max-width scale (32rem-96rem,
   tuned for that richer layout) -- a deliberate simplification on that one axis, not a 1:1
   breakpoint copy; the ≥1024px gold-accent reveal IS kept verbatim since it is the one breakpoint
   the fix-wave's 1440px checks actually exercise. House conversions: logical properties only;
   colors via tokens where an equivalent exists.
   WIDTH (wave 4, T3b -- owner ruling 2026-07-18 night REVERSES the former 618px trim): this
   column's own single-width simplification (still not the mockup's full 5-tier scale) is 680px; the
   618px value it replaced was a verified-intentional carve-out the owner explicitly asked reversed
   that night, not a mismeasurement.
   COMMENT CORRECTED 2026-08-08 (restyle package P2 fix round): the sentence above used to close on
   "matching .ref-register's own updated width below". That was true for one day. FIX 1 of the
   2026-07-19 owner design review widened the FORM column to min(1085px,100%) while explicitly leaving
   this header column alone ("keep them, they already match"), so the two have not matched since -- the
   header/route-title render in a centred 680px box over 1085px-wide cards. That split is the
   DOCUMENTED-INTENTIONAL state, kept deliberately; the geometry ruling on whether the header should
   follow the form column is DEFERRED to a measured lead decision, and nothing here changes it. What did
   change in this package is the narrow band only -- see the ≤800 block at the end of this section.
   DISCLOSED OMISSION (lead ruling): the mockup's .user-step-bars i:last-child tone-cycling
   background-position animation (@keyframes user-bar-tone, user-info.css:197) is not ported --
   invisible in a static screenshot; the completion-rail (.user-completion-rail i) has no such
   animation in the mockup source to begin with.
   ============================================================
   (Dated 2026-11-10, owner ruling 15 #1265: the .user-step family and its tone-cycling bar named in this note left this sheet, unused; the note is kept as history.) */
/* THE OMISSION IS CLOSED (onboarding wave W6, 2026-08-09). This header used to be a relative block with
   a disclosed omission: the reference's sticky chrome is one HALF of a JS-gated set -- its background,
   blur and hairline live on ::before/::after behind an `is-scrolled` class a scroll listener toggles --
   and porting sticky alone would have floated transparent chrome over the form. The set now lands
   TOGETHER, listener included (auth.js watches scrollY past the reference's own 8px threshold).
   The old note's second worry is gone too: it warned that a z-50 header would intercept clicks on the
   language pill at z-2. On this route the pill is lifted to z-150 -- the reference's own value for it --
   so the header passes underneath. */
.user-header {
    position: sticky;
    z-index: 50;
    inset-block-start: 0;
    height: 88px;
    transition: box-shadow .3s ease;
}
@media (min-width: 640px) { .user-header { height: 96px; } } /* 15 #1208: was 56/64px; grown with the 80px logo (and its old 4/8px space above and below) so the logo is not cut off at the top. */
.user-header::before,
.user-header::after {
    content: "";
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.user-header::before {
    inset: 0;
    background: rgb(248 250 252 / .95);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}
.user-header::after {
    inset-block-end: 0;
    inset-inline: 0;
    height: 1px;
    background: rgb(226 232 240 / .7);
}
.user-header.is-scrolled::before,
.user-header.is-scrolled::after { opacity: 1; }
/* The header column, the route title and the form container share ONE cap-and-padding ladder in the
   reference (`.user-header-shell, .user-route-title, .user-container` are a single selector list there),
   which is what keeps the logo, the page name and the cards on one edge at every width. Ours now does
   too -- see the ladder on .ref-register, whose values these mirror. This REPLACES the `min(680px)` +
   flat 32px pair, and with it the header-vs-form split this file recorded as documented-intentional
   between 2026-07-19 and today. */
.user-header-shell,
.user-route-title-inner {
    width: 100%;
    max-width: 32rem;
    margin-inline: auto;
    padding-inline: 16px;
}
@media (min-width: 640px) {
    .user-header-shell,
    .user-route-title-inner { max-width: 42rem; padding-inline: 24px; }
}
@media (min-width: 1024px) {
    .user-header-shell,
    .user-route-title-inner { max-width: 80rem; padding-inline: 32px; }
}
@media (min-width: 1280px) {
    .user-header-shell,
    .user-route-title-inner { max-width: 88rem; }
}
@media (min-width: 1536px) {
    .user-header-shell,
    .user-route-title-inner { max-width: 96rem; }
}
/* The shell fills the sticky header's own height and sits above its veil. */
.user-header-shell { position: relative; z-index: 1; height: 100%; }
/* TOMBSTONE 2026-08-08 (restyle package P2 fix round, lead ruling): `[dir="rtl"] .user-header-shell
   { font-size: 1.0625rem; line-height: 1.625 }` was REMOVED here. It chased a v1 register measurement
   that the v2 target retired, and it double-applied the Arabic root scale -- site.css already inflates
   the root to 17px under dir=rtl, so 1.0625rem resolved to 18.06px and never took part in P1's ≤800
   reversal. It also painted nothing: this shell renders no text of its own (a logo image and an icon
   button), and .user-logo sets its own font-size. Dead value, dead rule. */
.user-header-main { display: flex; height: 100%; align-items: center; justify-content: space-between; }
.user-header-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-inline-start: -8px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: var(--kp-radius-md);
    color: var(--color-text);
    background: rgb(255 255 255 / .6);
    box-shadow: 0 4px 14px -7px rgb(15 23 42 / .18);
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.user-back:hover { background: var(--kp-white); box-shadow: 0 10px 20px -11px rgb(15 23 42 / .28); transform: translateY(-2px); }
.user-back .icon { width: 18px; height: 18px; transition: transform .2s ease; }
/* The sprite arrow points RIGHT. "Back" points BACKWARD, so it mirrors under LTR -- the same two-sense
   mechanism the verify step's pair uses. The hover nudge (2026-08-09, W6) travels in the SAME direction
   the arrow points, which is why each direction gets its own rule rather than one shared translate: the
   LTR arm has to compose its nudge with the mirror, or the nudge would be flipped with the artwork. */
[dir="ltr"] .user-back .icon { transform: scaleX(-1); }
[dir="ltr"] .user-back:hover .icon { transform: scaleX(-1) translateX(2px); }
[dir="rtl"] .user-back:hover .icon { transform: translateX(2px); }
/* fix-wave 3 (2026-07-18 live-parity ledger item 7, L1576/L2182-2183): the mockup's counterpart
   is not a link -- ours is an <a> (Register.cshtml:36), which leaks the global `a { color: ... }`
   brand-blue rule (base.css) onto its (empty, image-only) text box. color:inherit paints it black
   like the mockup; font-size set to the mockup's measured 18.0625px value (18px, no visible
   fractional-px rendering difference). */
.user-logo { display: flex; align-items: center; color: inherit; font-size: 18px; }
.user-logo img { display: block; height: 80px; object-fit: contain; } /* 15 #1208: 80px (was 48), the owner's chosen step so the logo's own words read clearly; still under the sign-in page's 112px. */

.user-route-title { position: relative; z-index: 1; padding-block-start: 20px; }
@media (min-width: 640px) { .user-route-title { padding-block-start: 24px; } }
/* The cap + inline padding come from the shared ladder above; only the row's own layout is here. */
.user-route-title-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.user-route-title-inner > i {
    display: none;
    width: 3px;
    height: 28px;
    flex-shrink: 0;
    border-radius: var(--kp-radius-full);
    /* Fix-wave fidelity fix: mockup (user-info.css:184) is navy->gold
       (linear-gradient(180deg, var(--user-primary), var(--user-gold))), not gold->gold; the tokens
       below are the established #0033a0/#cba052 equivalents (see .user-step-bars i:last-child).
       (Dated 2026-11-10, owner ruling 15 #1265: the .user-step-bars rule named in this note left this sheet, unused; the note is kept as history.) */
    background: linear-gradient(180deg, var(--color-portal-action), var(--color-portal-accent));
}
.user-route-title h1 { margin: 0; color: var(--color-text); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }

/* The hero holds the heading block and, from the reference's own 768px tier, the initials disc beside
   it -- below that tier the disc is not rendered at all (`display: none` there, not a shrink). */
.user-hero { display: grid; gap: 24px; align-items: end; margin-block-end: 36px; }
@media (min-width: 768px) { .user-hero { grid-template-columns: minmax(0, 1fr) auto; } }

.user-avatar-wrap { position: relative; display: none; width: 80px; height: 80px; flex: 0 0 80px; padding: 2px; }
@media (min-width: 768px) { .user-avatar-wrap { display: block; } }
.user-avatar-ring {
    position: relative;
    z-index: 1;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: var(--kp-radius-full);
    color: var(--kp-white);
    background: linear-gradient(135deg, var(--kp-postal-navy-600), var(--kp-postal-navy-700));
    background-size: 200% 200%;
    box-shadow: 0 12px 32px -8px rgb(0 51 160 / .45);
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.04em;
    animation: ref-reg-icon-tone 6s ease-in-out infinite;
}
/* The rotating conic sits BEHIND the disc (z-index -1 inside the ring's own stacking context) and is a
   pseudo-element for the same reason every other decorative sweep in this file is: no markup hook. */
.user-avatar-ring::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        rgb(203 160 82 / .7) 90deg,
        transparent 180deg,
        rgb(0 51 160 / .5) 270deg,
        transparent 360deg);
    animation: ref-reg-avatar-rotate 6s linear infinite;
}
/* The gold status bead. The reference pins it PHYSICALLY (right/bottom) with no direction override in
   the served bundle, so the [dir="rtl"] arm swaps the inline side back and the painted corner is equal
   in both languages -- the same recorded exception the register blooms and the login bloom carry. */
.user-avatar-wrap > i {
    position: absolute;
    z-index: 2;
    inset-block-end: 0;
    inset-inline-end: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--kp-white);
    border-radius: var(--kp-radius-full);
    background: var(--color-portal-accent);
    box-shadow: 0 0 10px rgb(203 160 82 / .55);
}
[dir="rtl"] .user-avatar-wrap > i { inset-inline-end: auto; inset-inline-start: 0; }
@keyframes ref-reg-icon-tone {
    0%, 100% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes ref-reg-avatar-rotate {
    to { transform: rotate(360deg); }
}
/* Fix-wave 3 (2026-07-18 live-parity ledger item 2, L1606): line-height corrected 1.1 -> 1.04,
   the mockup's live-measured .user-hero h1 ratio (isolated-browser getComputedStyle, register-
   user-info.html at 1366px: fontSize 44px / computed lineHeight 45.76px = 1.04).
   COLUMN CAP ADOPTED 2026-09-13 (Core Rule 13 portal clause, ledger 15 #148): max-width 680px, read from
   the SERVED reference bundle -- docs/reference/subscribersPortal-KuwaitMail css/app.bundle.css:21237,
   [data-static-route="user-info"] .user-hero h1 -- which states the cap ONCE in its base rule and
   overrides only font-size in its 640 and 1024 tiers (:21421, :21437), so the cap holds at every width and
   this one does too. A whole-column pairing of this page at Arabic desktop measured our BOX at 1272px
   against the reference's 680px (+592) and 1240px in English, with every other element of the column --
   route title, the three section headings, the field family, the submit control, the outer wrapper,
   alignment and wrapping -- at zero delta; this declaration was the whole of it. The sibling .user-hero p
   below already carries the reference's own max-width: 52ch the same way.
   Pinned by DesignFamilyGovernanceTests. */
.user-hero h1 { max-width: 680px; margin: 0 0 10px; color: var(--color-portal-action); font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.04; }
/* Owner-caught 2026-07-18 (font census): the original port took only user-info.css's BASE type sizes;
   the mockup steps the register titles up through viewport tiers (user-info.css @media 640/1024) --
   at desktop the hero reads 44px and the route title 28px, not the 32/24 base. Same tiers, verbatim.
   (Dated 2026-11-10, ruling 15 #1265: the sentence about the step numeral left with the unused step row.) */
@media (min-width: 640px) {
    .user-route-title h1 { font-size: 28px; }
    .user-hero h1 { font-size: 40px; }
}
@media (min-width: 1024px) {
    .user-hero h1 { font-size: 44px; }
}
.user-hero p { margin: 0; max-width: 52ch; color: var(--color-text-muted); font-size: 15px; line-height: 1.7; }

.user-completion { margin-block-end: 28px; }
.user-completion-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 8px; }
.user-completion-copy p { margin: 0; color: rgb(71 85 105 / .7); font-size: 10.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.user-completion-copy b { color: var(--color-portal-action); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.user-completion-rail { display: block; height: 6px; overflow: hidden; border-radius: var(--kp-radius-full); background: rgb(15 23 42 / .08); }
/* THREE stops, not two (re-measured 2026-08-09, W6): the reference's fill runs navy -> the lighter navy
   -> gold, and its width eases over .5s. The two-stop .3s pair this carried was the 2026-07-18 port of
   the step-bar gradient, which is a different rule. */
.user-completion-rail i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-portal-action), var(--kp-postal-navy-400), var(--color-portal-accent));
    transition: width .5s ease;
}

/* TOMBSTONE 2026-08-09 (onboarding wave W6): a `@media (max-width: 800px)` pair pinned both header rows
   to 18px here. It existed to close the edge mismatch between a 32px header column and a form column
   that dropped to 18px at that band -- a mismatch created by the two columns having DIFFERENT rules.
   They now share one ladder (16 / 24 / 32px, stepping with the cap), so both edges agree at every width
   by construction and an 800px override would only reintroduce a third value. */

@media (min-width: 1024px) {
    .user-route-title-inner > i { display: block; }
}

/* ============================================================
   MAILBOX -- empty state (B1-a2 Task 4; re-judged rows 135/136, 2026-07-18 owner overrule)
   Source RE-POINTED 2026-08-08 (restyle package P4): portal mockup v2's .notification-empty base rule,
   docs/reference/subscribersPortal-KuwaitMail css/app.bundle.css:11700 (the v1 citation this line used
   to carry -- postOffice_PublicUser_html react-parity.css:170 -- names a folder Phase E deletes at the
   end of this wave). v2 re-measured against v1 at P4: the base rule is unchanged
   (grid/center, pad 52/22, border 1px #dfe6ef, radius 14, bg #fdfefe, badge 50x50 radius 13, h2 16px
   margin 14/0/0, p 12px margin 6/0/0), so the geometry ported here still holds. The mockup encodes no dedicated
   empty-mailbox composition (per the internal task notes), so this container models the FULL .notification-empty
   geometry: grid/center/padding/border/radius/background AND the 50x50 icon badge + title + hint --
   the token-consolidation this block previously used (bg/border/radius rounded to existing shared
   tokens) is REVOKED per the owner's 2026-07-18 "content too big / doesn't match" overrule; genuinely-
   new mockup-exact hex (#fdfefe/#dfe6ef/#edf3ff) now get dedicated portal-scoped Layer-1 primitives
   (tokens.css, this same fix wave) instead of reusing --color-bg-surface/--color-border (which stay
   #fff/#e2e8f0 for Admin -- Core Rule 1). The icon glyph color reuses the SHARED --kp-navy-600 rather
   than a portal-scoped primitive -- with the caveat below.
   COMMENT CORRECTED 2026-08-02 (mockup-v3 restyle wave doc sweep, ledger 15 #137): this sentence used to
   read "The icon glyph color IS the existing --kp-navy-600 (#115ee8, byte-exact)". It was true when
   written -- the alpha sibling --kp-navy-600-a05 CARRIED that pre-rebrand rgb(17 94 232) triplet under the
   same name until restyle P3 (2026-08-08) re-expressed it in the official navy -- and the brand-palette
   adoption silently falsified it.
   --kp-navy-600 is #0033a0 today (its Layer-1 declaration in tokens.css), while the mockup source this
   block ports paints the glyph #115ee8 (react-parity.css:170, `.notification-empty>span { ... color:#115ee8 }`), so
   .mb-empty-icon's glyph paints the BRAND NAVY and is no longer a byte match to the mockup. The token
   that IS byte-exact to that mockup value is --kp-portal-blue-500 (#115ee8), which did
   not exist when this block was written. The two neighbouring surface values are still byte-exact
   (#fdfefe / #dfe6ef, via the portal-scoped primitives above).
   OPEN QUESTION CLOSED 2026-08-08 (restyle package P4) -- the glyph FOLLOWS the rebrand, as shipped, and
   the badge TINT now follows it too. Two things settled it. First the law: the portal palette clause
   (intake ruling D1, accepted 15 #148) makes the official brand palette govern colour outright, so a
   pre-rebrand package literal is never the target. Second the reference's own hand: v2's later layer
   paints this very tile `background: rgba(0,51,160,.05); color: var(--color-primary)`
   (app.bundle.css:17978), i.e. official navy glyph on an official navy tint -- the pairing we now ship.
   --kp-portal-icon-tint-blue therefore moved off the flat #edf3ff to that alpha (see its note in
   tokens.css); no re-point to the portal blue is owed, and the question is not re-opened without a new
   owner ruling.
   The 14px radius has no existing --kp-radius-* equivalent so it is written literally,
   matching this file's own precedent for single-use numeric values. NO CTA button (Phase E --
   the internal task notes; the mockup's own button is notifications-specific and out of scope here). Icon is
   our sprite's --icon-mailbox, not the mockup's bell-slash glyph -- a deliberate content-correct swap
   (this is a MAILBOX empty state, not a notifications one; the mockup itself picks its icon per
   context the same way).
   ============================================================ */
.mb-empty {
    display: grid;
    justify-items: center;
    padding: 52px var(--kp-space-22);
    border: 1px solid var(--kp-portal-border-soft);
    border-radius: 14px;
    background: var(--kp-portal-surface-soft);
    text-align: center;
}
.mb-empty-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: var(--kp-portal-icon-tint-blue);
    color: var(--kp-navy-600);
}
.mb-empty-icon .icon { width: 21px; height: 21px; }
/* fix-wave 3 (2026-07-18 live-parity ledger item 9, top-10 #7): font-weight 800 -> 500, matching
   the mockup's closest empty-state heading equivalent (.notification-empty h2 -- cross-page
   comparison, ours has no notifications page; see the ledger's own caveat, item 9). */
.mb-empty h2 { margin: 14px 0 0; color: var(--color-text); font-size: 16px; font-weight: 500; }
.mb-empty p { max-width: 34ch; margin: 6px 0 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.5; }

/* ============================================================
   DASHBOARD LANDING — B1 walking-skeleton, dashboard-as-Home
   (the dashboard task notes, owner order 2026-07-18: F2 reversed —
   dashboard replaces /Mailbox as the post-login landing page).

   DESIGN TARGET SUPERSEDED 2026-08-08 (restyle package P3): the
   authority for every value below is now portal mockup v2,
   docs/reference/subscribersPortal-KuwaitMail, page index.html
   (data-static-page="dashboard2") — its css/dashboard.css layer
   first, then the earlier css/static-app.css base it patches, both
   read out of the served css/app.bundle.css so the winner is the
   rendered one. The v1 citations kept below are HISTORY: they say
   where a value came from before P3, not where it comes from now.
   Colours follow the D1 palette clause — the package still paints a
   pre-rebrand blue/gold in places, and every one of those resolves
   to an official token here, never to the package's own literal.
   Two sections of the reference dashboard are NOT built: the live
   branch map (ruling D12, parked) and the quick-actions / saved-
   addresses panels, which have no data source or strings yet. Dated 2026-11-05 (15 #1019): Quick Actions is built, its rules in the Portal's site.css.

   v1 source (history): postOffice_PublicUser_html css/react-parity.css
   "Dashboard 2 parity" (lines 18-25) + "Dashboard2 mailbox tickets"
   (lines 27-30) blocks, verified directly against the mockup file
   for the dashboard — IN-SCOPE SECTIONS ONLY per the recorded design
   ruling: welcome header + plan strip, VBX/P.O.Box ticket cards,
   shipments tabs/list/View All, appointments column, announcements
   panel. OUT of scope (no CSS ported): Quick Actions, Nearest
   Branch, Saved Addresses, the floating gear button, every detail
   modal (shipment/appointment/announcement/plan), the mockup's
   .dc-shipment/.dc-timeline* row markup (B1's mail list is always
   empty — MailPage.TotalCount==0 — so no shipment row ever renders;
   porting that CSS now would be dead weight, revisit at Phase F).
   CORRECTED 2026-10-16: the announcement detail dialog is built now
   (15 #441) - the .an-* family after the announcements panel below.
   House conversions: logical properties only; hex consolidated to
   exact tokens.css primitives where one exists, or a new
   --kp-dc-* Layer-1 primitive (tokens.css, this same phase) for
   prominent/recurring colors; low-visibility one-off badge/shadow
   alphas stay literal rgb()/rgba() (established precedent, e.g.
   .ref-login-elapsed above) rather than growing the token list for
   single-use values (Core Rule 13 visual-equivalence carve-out).
   Tickets are NON-INTERACTIVE in B1 (no click-through to /Mailbox,
   no hover/focus affordance) — the recorded empty-ticket ruling asks
   for static geometry only; Phase F adds the real deep link once
   box-level API fields exist.
   ============================================================
   (Dated 2026-11-10, owner ruling 15 #1265: the .dc-shipment family named in this note left this sheet, unused; the note is kept as history.) */

/* ---- welcome header + plan strip (§1.1) ---- */
/* fix wave P5: .dc-greeting / .dc-plan / .dc-hero-grid / .dc-grid / .dc-title-row / .dc-status-tab
   (incl. .active) / .dc-ship-panel sizing below is corrected against theme-parity.css's live-winning
   "Dashboard sizing mirrors the Tailwind breakpoints" override block (theme-parity.css:128-148) --
   react-parity.css's own numbers (34px h1, 1.72fr/.55fr grid, 14px 17px tab padding, etc.) never
   actually render on the live mockup once theme-parity.css loads (see the PORTAL SHELL header
   comment above for the mechanism). */
/* Restyle package P3 (2026-08-08) re-measures this whole family against portal mockup v2's own
   dashboard (`css/dashboard.css`, the `body[data-static-page="dashboard2"]` layer, which out-specifies
   the generic `.dc-*` rules the v1 port was built from). Values are the package's own px literals, so
   they paint identically at the 16px English root and the 17px Arabic one -- do NOT "convert" them to
   rem. Tracking is written for Latin only: base.css's `html[dir="rtl"] :not([dir="ltr"])` kill zeroes
   every one of them in Arabic, which is the house law, so no dir-scoped twin is needed here. */
/* Dated 2026-11-01 (client item 1.3): the row holds the plan control alone, at its inline end, with no minimum height. */
.dc-greeting { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin: 0 0 25.5px; }
.dc-plan {
    display: flex;
    align-items: center;
    gap: 10.625px;
    min-height: 36px;
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L770/928): the lead reversed the prior
       "reuse --color-border, imperceptible delta" substitution call -- now the dedicated
       --kp-dc-plan-border token (tokens.css), which P3 re-pointed at the shared slate step. */
    border: 1px solid var(--kp-dc-plan-border);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    padding-block: 6.375px;
    padding-inline: 10.625px 12.75px;
    color: var(--kp-dc-plan-ink);
    font-size: 10px;
    font-weight: 400;
    line-height: 16.25px;
    /* D8 (2026-07-19 fix wave): mockup's plan strip is a <button> (UA-default text-align:center); ours is
       a <div> and inherited text-align:start (measured ours start vs mockup center). Same L9 tag-swap
       class as .ref-lang. Content-only alignment fix -- the strip's real content is the panels phase. */
    text-align: center;
    /* theme-parity.css: box-shadow: none (live-winning override) */
    transition: border-color .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1);
}
html[dir="ltr"] .dc-plan { padding-inline: 12.75px 10.625px; }
/* Child combinator, not a descendant: the arrow disc carries an .icon of its own, and a descendant
   selector here would hand it the crown's size and gold at every width. */
.dc-plan > .icon { width: 14.875px; height: 14.875px; flex: 0 0 14.875px; color: var(--kp-gold-500); }
.dc-plan b { color: var(--color-text); font-size: 13px; font-weight: 600; line-height: 21.125px; letter-spacing: 0; text-transform: none; }
/* The hairline between the "your plan" caption and the plan name, and the trailing arrow disc. Both are
   decorative (aria-hidden in the view) -- they carry no text, so they add no string to translate. */
.dc-plan-divider { width: 1px; height: 12.75px; flex: 0 0 1px; background: var(--kp-dc-plan-border); }
.dc-plan-arrow {
    display: grid;
    place-items: center;
    width: 21.25px;
    height: 21.25px;
    flex: 0 0 21.25px;
    border-radius: var(--kp-radius-full);
    background: rgb(15 23 42 / .04);
    color: var(--color-text-muted);
    transition: background-color .2s cubic-bezier(.4, 0, .2, 1), color .2s cubic-bezier(.4, 0, .2, 1);
}
.dc-plan-arrow .icon { width: 12.75px; height: 12.75px; flex: 0 0 12.75px; }
/* v2 recolours the arrow artwork with a brightness/invert filter because its mark is a flat PNG-ish SVG
   with a baked fill; ours is a sprite symbol drawing currentColor, so the same result is one colour swap
   (carry the EFFECT, not the mechanism, when ours can express it directly). */
.dc-plan:hover { border-color: rgb(15 23 42 / .2); }
.dc-plan:hover .dc-plan-arrow { background: var(--kp-postal-navy-600); color: var(--kp-white); }
@media (max-width: 720px) {
    /* Dated 2026-11-01 (client item 1.3): no minimum height and no eyebrow or name rules; the row is the plan control. */
    .dc-greeting { align-items: flex-start; margin: 11px 0 24px; }
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L900): mockup keeps 12px at this width too
       (same as the desktop base rule) -- the 11px shrink here was an unmeasured guess, removed. */
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L928): mockup-measured 6px 10px, not 7px --
       same as the desktop base rule, so the shrink here was likewise an unmeasured guess. */
    .dc-plan { margin-block-start: 3px; padding-block: 6.375px; padding-inline: 10.625px; }
    html[dir="ltr"] .dc-plan { padding-inline: 10.625px; }
    /* The caption goes at phone width (shipped narrow-width adaptation, kept) and the divider goes with
       it -- it separates the caption from the plan name, so on its own it is a stray hairline. */
    .dc-plan span:not(.dc-plan-arrow) { display: none; }
    .dc-plan b {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        max-width: 150px;
        line-height: 1.25;
        text-align: start;
    }
    .dc-plan > .icon { width: 15px; height: 15px; flex-basis: 15px; }
}

/* ---- VBX / P.O. Box mailbox ticket cards (§1.2) ---- */
.dc-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-bottom: 25.5px; }
.dc-ticket {
    position: relative;
    min-width: 0;
    --dc-ticket-height: 224.625px;
    height: var(--dc-ticket-height);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--kp-radius-xl);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
}
/* z-index:1 + position:relative so the whole ticket body (spine + content + text) paints ABOVE the
   watermark artwork (.dc-ticket-art, z-index:0) -- ported mechanism from react-parity.css
   .dc-ticket-layout{position:relative;z-index:1} (L8: carry the cascade mechanism, not just values). */
.dc-ticket-layout { position: relative; z-index: 1; display: flex; height: 100%; }
/* D1 (2026-07-19 fix wave): P.O.Box/VBX ticket background artwork watermark. Live-measured against the
   running mockup dashboard.html (isolated-browser getComputedStyle, the parity probe reports):
   the SECOND react-parity.css .dc-ticket-art block wins in the mockup cascade (centered watermark, NOT
   the older bottom-anchored masked variant -- our components.css comment at .dc-ticket-content already
   documented this two-block precedence). Measured desktop: top:50%, inset-inline-end:16px, height:55%,
   width:auto, opacity:.3, object-fit:contain, translateY(-50%) + scaleX(-1) in RTL. Raster PNG (not a
   sprite) so it paints in headless. Decorative: empty alt + aria-hidden in the view; pointer-events:none
   so it never intercepts a footer-button click. */
.dc-ticket-art {
    position: absolute;
    z-index: 0;
    top: 50%;
    inset-inline-end: 17px;
    width: auto;
    height: 55%;
    object-fit: contain;
    object-position: center;
    opacity: .3;
    transform: translateY(-50%);
    pointer-events: none;
}
/* Restyle P3 (2026-08-08): v2's own RTL rule for this element restates `transform: translateY(-50%)`,
   which CANCELS the horizontal mirror the base layer applies -- the reference deliberately shows the
   watermark the same way round in both languages, so the flip we shipped comes out. */
/* P3 fix round (2026-08-08): the watermark's opacity is PER VARIANT, at every width -- the P.O.Box art
   sits back at .3 (the base value above) and the VBX art paints at FULL strength. Measured on the
   rendered reference at 1440 and at 390. */
.dc-ticket-vbx .dc-ticket-art { opacity: 1; }
.dc-ticket-spine {
    display: flex;
    flex: 0 0 68px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding-block: 17px;
}
/* The spine gradient is THREE stops, not two (P3 spec correction, measured 2026-08-08). v2 authors it
   from its own --color-primary-deep/--color-primary/--color-primary-soft, whose values are exactly the
   official navy ramp -- so the token gradient carries the same three, evenly spaced. */
.dc-ticket-pobox .dc-ticket-spine { background: var(--gradient-portal-ticket-spine); color: var(--kp-white); }
.dc-ticket-vbx .dc-ticket-spine { background: var(--gradient-stamp); color: var(--kp-postal-navy-600); }
/* owner-confirmed fix (fidelity-dashboard.md P5): the mockup's spine carries a glyph above the
   vertical label (mask-image mailbox.svg/vbx.svg, currentColor). Ours uses the sprite <use> pattern
   instead of a CSS mask (house convention) -- icon-mailbox/icon-vbx in sprite.svg are already
   vendored with matching path data. These are FILL glyphs (not the sprite's usual stroke family),
   so fill/stroke are overridden here rather than left to the shared .icon base rule (base.css) --
   component-css loads after base.css, so this class wins the cascade tie for fill/stroke/width/
   height on elements carrying both classes.
   SIZE CORRECTED 2026-08-11 (parity fix wave P2.1i): this rule shipped 21px on a citation to
   react-parity.css, the v1 package's async-injection layer that portal mockup v2 replaced. v2's
   bundle carries the 21px as an EARLY layer and overrides it later at 28px, which is what the page
   actually paints -- measured on the rendered reference at 1440 (28), 1024 (24) and 390 (22), with
   the tier arms at app.bundle.css :8651, :8953 (max-width 1100) and :8999 (max-width 720). The two
   narrow values live in this family's own 1100 and 720 arms below. */
.dc-ticket-spine-icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
/* The spine glyph does NOT take the spine's own text colour in v2: the P.O.Box mark is painted in the
   light gold and the VBX mark in the deep navy, each reading against the opposite background. */
.dc-ticket-pobox .dc-ticket-spine-icon { color: var(--kp-stamp-gold-300); }
.dc-ticket-vbx .dc-ticket-spine-icon { color: var(--kp-postal-navy-700); }
/* .75rem is v2's own unit here -- one of the few places the package authors in rem, so it paints 12px in
   English and 12.75px in Arabic exactly as the reference does. The tracking is zeroed at source. */
.dc-ticket-spine b { font-size: .75rem; font-weight: 900; line-height: 16px; letter-spacing: 0; white-space: nowrap; writing-mode: vertical-rl; }
.dc-ticket-spine > i { width: 6px; height: 6px; border-radius: var(--kp-radius-full); background: var(--kp-gold-500); }
.dc-ticket-vbx .dc-ticket-spine > i { background: var(--kp-navy-700); }
.dc-ticket-perforation {
    flex: 0 0 12.75px;
    background: var(--kp-portal-surface-soft);
    mask: radial-gradient(circle 3px at 50% 0, transparent 98%, black) repeat-y 50% 0 / 10px 10px;
    -webkit-mask: radial-gradient(circle 3px at 50% 0, transparent 98%, black) repeat-y 50% 0 / 10px 10px;
}
/* Task 4 (2026-07-18 portal-box-data-and-linking plan): the populated-ticket structure below
   replaces the earlier "abs-positioned status pill over a single padded pane" shape. Live-cascade
   probe (scripts/parity/probe-cascade.js) found react-parity.css defines .dc-ticket-content/-main/
   -status/-mails TWICE -- the file's SECOND block wins by source order and is a real redesign, not
   just a value tweak: .dc-ticket-content itself now carries the 20px inset directly (the mockup's
   own second block still routes it through a now-inert .dc-ticket-main padding:0 pass-through div;
   our markup drops that empty wrapper -- no visual difference, one less class), the status pill
   flowed inline inside a wrapping .dc-ticket-meta row and an absolutely-positioned .dc-ticket-mails
   badge sat top-end. The stale first-block extraction in the dashboard mockup reference §1.2 CSS quote
   is superseded -- do not re-port from it.
   (This paragraph is v1 history, but its LAST sentence used to claim that Restyle P3, 2026-08-08,
   "swapped those two roles again to match portal mockup v2". Fix package D, 2026-08-12, measured the
   v2 render and found the opposite: v2 composes the ticket exactly as the sentence above describes --
   inline status pill, absolutely-positioned count badge -- so Task 4 already had it right and P3's
   swap moved AWAY from the target. The claim is corrected here rather than deleted, so the next
   reader can see which round introduced the defect. Current arrangement: the chip comment below.) */
.dc-ticket-content { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; overflow: hidden; padding: 21.25px; }

/* THE TWO CHIPS WERE IN EACH OTHER'S PLACES (fix package D, 2026-08-12 -- owner complaint item 3,
   "in second screenshot, its not the same as the mockup"). Restyle P3 (2026-08-08) read the swap the
   wrong way round: it floated the STATUS pill to the corner and left the mail-count chip in flow.
   Two independent censuses then measured the rendered reference and agreed on the opposite -- the
   GOLD COUNT floats over the corner, the GREEN STATUS sits inline in the dates row -- and this round
   re-measured it a third time before touching anything. The paragraph P3 left here has been deleted
   rather than corrected, because its conclusion was the defect.
   WHY IT MATTERED BEYOND THE TWO CHIPS: an in-flow count chip is 24.63px of box plus 8.5px of margin,
   so it pushed .dc-ticket-meta from the reference's y=196.5 down to y=229.63 -- the whole dates row,
   the number and the location line sat 33.13px lower than the target on every ticket at every width.
   Measured on the rendered reference at 1440/1240/900/390 in both languages: top 12px / inset-inline-end
   12px / z-index 5, box 42.41x26.25 (ar), padding 4px 8px, gap 4px, and a 4px gold halo. The ONLY
   responsive step is the <=720 arm below (12/12 -> 11/10); everything else holds at every width. */
.dc-ticket-mails {
    position: absolute;
    z-index: 5;
    top: 12px;
    inset-inline-end: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid rgb(203 160 82 / .25);
    border-radius: var(--kp-radius-full);
    background: var(--kp-gold-500-a12);
    /* The halo the corner badge needs to read as a floating chip over the artwork. The reference's own
       literal is rgba(203,160,82,.08) -- here that IS the official brand gold #CBA052, so the value is
       carried as measured; written in the same rgb()/alpha shape as the border on the line above rather
       than minting a one-consumer token. */
    box-shadow: 0 0 0 4px rgb(203 160 82 / .08);
    color: var(--kp-stamp-gold-500);
    font-size: 9px;
    font-weight: 700;
    line-height: 14.625px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* issued/expires dates row (static flow) -- and since fix package D the status pill is its FIRST
   in-flow child, exactly as the reference composes it. Consequence worth stating so it is not
   re-filed as a regression: with a fourth item on the line, this row now wraps to two lines at 900
   and 390 in both languages. The reference wraps there too (measured 47.25px tall on both sides at
   both widths); it is parity, not overflow.
   INLINE-END RESERVATION (owner ruling 2026-08-26, measured ticket-vs-badge collision): the corner
   mail-count badge is absolutely positioned, so this row's line-breaking cannot see it -- the two
   boxes share a 15.38px vertical band at every width >720 and the row's last item slid UNDER the
   badge whenever its text reached the corner (10 of 20 measured cells). The reference holds its
   dates clear with a 68px inline-end reservation on a copy wrapper our markup does not have, so the
   equivalent reservation lands HERE on the row itself; the badge's own offsets resolve against
   .dc-ticket-content's padding box, which this row's padding cannot move. 68px is not enough for OUR
    ratified wording, and the first 90px cut sat EXACT (0.9px air): the badge paints a 4px halo
    OUTSIDE its border that the arithmetic ignored. Terms: 12px offset + 77.1px widest ratified form
    («لا توجد رسائل», the count-zero string) + 4px halo + 8px visual gap = 101.1px, so 102px ships;
    the <=720 arm runs the same terms (10 + 77.1 + 4 + 8 = 99.1, so 100px) -- see its comment below.
    CORRECTED 2026-08-26 eye pass, two untruths in those terms: (1) the 77.1px figure was measured in
    the ENGLISH letter-spacing context; in the Arabic page context the same string renders 71.42px
    (letter-spacing computes normal there), so widths must be quoted per context or bounded. (2) The
    8px gap is a design TERM, not a measurement -- the arithmetic ignored this row's own inline-end
    inset from the badge anchor (.dc-ticket-content's padding: 21.25px here / 12px at <=720), so the
    real clearance measures ~30px / ~21px beyond the halo. Values unchanged; both tiers over-deliver. */
.dc-ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8.5px; min-height: 27.625px; margin: 0 0 8.5px; padding-inline-end: 102px; }
.dc-ticket-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 20.5px;
    padding: 2px 8px;
    border-radius: var(--kp-radius-full);
    /* D1 palette clause: v2 paints this chip in the generic emerald ramp (#10b981 family). The official
       success green is the intent, so the ROLE is carried on official brand values -- the ink on the
       shared status pair, the fill on the portal's own shipment-green tint, which is the official
       #009A44 at exactly the reference's measured .10 alpha. The shared --status-success-bg it used to
       read is .12 and is consumed by eight other components, so the alpha is corrected HERE rather than
       on the token (fix package D, 2026-08-12).
       Three things left with the same round, all measured absent from the reference at every width and
       both languages: a 1px border, a blur(5px) backdrop, and 1px of extra vertical padding. Together
       with the deleted dot they were the pill's whole +13px x +3.75px size gap. */
    background: var(--portal-ship-green-tint);
    color: var(--status-success-fg);
    font-size: 10px;
    font-weight: 700;
    line-height: 16.25px;
}
.dc-ticket-date { display: inline-flex; align-items: center; gap: 4px; color: var(--color-text-muted); font-size: 10px; font-weight: 400; line-height: 16.25px; white-space: nowrap; }
.dc-ticket-date b { color: inherit; font-size: inherit; font-weight: 500; }
/* Parity fix wave P2.1a (2026-08-11): the reference puts a mark on each date -- a GREEN calendar on the
   issued line and a GOLD clock on the expiry line, both 12x12 with a 4px gap
   (rendered reference: `.dc-ticket-date { display:flex; gap:4px }` + `.dc-ticket-date-icon
   { width:12px; height:12px; flex-basis:12px }`, app.bundle.css:9108). Ours shipped both lines as bare
   text, so four marks were missing across the two tickets.
   ARTWORK: the calendar asset (assets/icon-calendar-green.svg) is BYTE-IDENTICAL in path data to the
   shipped sprite symbol icon-calendar-duotone, so nothing was vendored for it. For the clock the
   reference draws Phosphor's REGULAR clock under a hand-added tint circle; the sprite already carries
   Phosphor's DUOTONE clock (icon-clock-duotone) -- the same glyph and family, differing only in the
   tint ring's radius -- so that shipped mark is substituted rather than adding a near-twin to the
   sprite (the same recorded-substitution practice as wave W9, 2026-08-10).
   COLOUR: the reference's own files paint #059669 and #d97706, both from the stale pre-rebrand family
   the palette clause forbids copying (15 #148 D1), so the ROLES are carried on official brand values --
   the official green and the official gold this system already uses for "issued/valid" and "time". */
.dc-ticket-date .icon { width: 12px; height: 12px; flex: 0 0 12px; }
.dc-ticket-date.is-issued .icon { color: var(--kp-green-700); }
.dc-ticket-date.is-expires .icon { color: var(--kp-stamp-gold-500); }
.dc-ticket-dot { color: var(--color-text-muted); opacity: .4; font-size: 16px; line-height: 16.25px; }

/* box/VBX number -- ONE string, not one tile per character (fix package D, 2026-08-12). The B1 port
   rendered a <span> per character with a 6px gap and a smaller gold dash; the rendered reference draws
   the whole number as a single text node in a plain block (.dc-ticket-id), so ours measured 215.91px
   against its 184.28px at 1440 and the dash read as a different mark from the digits either side of it.
   The per-character .dc-ticket-digit / .is-dash rules went with the loop that fed them; their type moved
   here, which is now the element that carries the text. Family/size/weight/line-height/tracking and the
   tabular figures are unchanged and already matched the reference (JetBrains Mono 44/900/44, ink
   --color-text = the reference's own rgb(15,23,42)).
   The <bdi dir="ltr"> wrapper stays -- a box number is a numeric string and must read LTR inside the
   RTL page (AGENTS.md numeric-display rule); align-self keeps the box hugging its ink instead of
   stretching across the flex column.
   NOT ADOPTED, and deliberately so: the reference holds 44px at EVERY width, which at 900 pushes its
   own number 13px past the content column where .dc-ticket-content{overflow:hidden} clips it. Our
   44/36/27 ladder in the two arms below is kept because it renders the number whole. Recorded as a
   measured, unclosed divergence rather than silently matched. (Dated clause 2026-10-16: from 1024 to
   1306px, beside the labelled 272px rail, the size is fluid too -- the two blocks after the 1100 arm.) */
.dc-ticket-digits {
    display: block;
    align-self: flex-start;
    height: 44px;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 44px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 44px;
    letter-spacing: 0;
    white-space: nowrap;
}

/* location line (branch name for P.O. Box; "Digital" caption for VBX).
   D9 (owner ruling 2026-07-19: the ticket location FORMAT follows the subscriber mockup): pin glyph +
   non-bold branch name + " · <country>" suffix, e.g. "فرع السالمية · الكويت" / "Salmiya Branch · Kuwait".
   The branch NAME stays data-driven (Branch NameAr/NameEn); only the pin + separator + country suffix are
   added. Measured mockup .dc-ticket-location: font-size:10px/weight:500 (already ours), gap:6px, pin i
   color #64748b (=--kp-slate-500) at 12px, separator span margin-inline:4px + muted-at-.4 (mirrors
   .dc-ticket-dot). VBX location ("Digital"/"رقمي") carries no icon/span child, so these rules are inert
   there. */
.dc-ticket-location { display: flex; align-items: center; gap: 6px; margin-top: 8.5px; color: var(--color-text-muted); font-size: 10px; font-weight: 500; line-height: 17.875px; }
.dc-ticket-location b { color: var(--color-text-muted); font-size: 11px; font-weight: 500; }
.dc-ticket-location .icon { width: 12px; height: 12px; color: var(--kp-slate-500); }
.dc-ticket-location span { margin-inline: 4px; color: var(--color-text-muted); opacity: .4; }
.dc-ticket-vbx .dc-ticket-location { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
/* Parity fix wave P2.1d (2026-08-11): the VBX ticket's "Digital" line shipped as bare text while the
   P.O.Box line beside it drew a pin, so the two tickets were visibly inconsistent with each other. The
   reference gives BOTH lines a glyph (`bi bi-geo-alt-fill` on the physical box, `bi bi-stars` on the
   VBX). The VBX one is a Bootstrap-Icons FONT glyph; the shipped icon-sparkle-duotone is the mark this
   product already uses for the same premium/digital idea (the mailbox hero chip), so it is substituted
   and the substitution recorded.
   THE REASON THIS LINE USED TO GIVE WAS FALSE (fix round item 13 / L3, 2026-08-12). It said a font glyph
   has "no path data to compare or vendor". A woff2 carries outlines and they extract: package C on this
   same branch extracted the Bootstrap Icons qr-code glyph from the package's own
   assets/vendor/fonts/bootstrap-icons.woff2 and re-gridded it to 0.01% of the painted mark. The true and
   much weaker statement is that the package's ASSET FOLDER ships no .svg for the drawn mark -- and for
   this one it does: icon-sparkle-duotone-gold.svg is path-identical to the symbol substituted here, which
   makes the decision better founded than the retired sentence claimed. Full account:
   KwtPost.DesignSystem/SYSTEM_DOCUMENTATION.md, the sprite entry.
   COLOUR: the reference paints that glyph rgb(212,160,23) = #d4a017, one of the two stale values the
   portal palette clause names by name (15 #148 D1), so only the ROLE travels and it lands on the
   official gold. Its sibling pin measures rgb(100,116,139), the --kp-slate-500 this family already
   ships -- unchanged. Both marks measure 12px with the parent's 6px gap on the rendered reference,
   which is what the rules above already give them. */
.dc-ticket-vbx .dc-ticket-location .icon { color: var(--kp-stamp-gold-500); }

/* footer actions: Copy (functional) + Share/QR (disabled, "coming soon") + Manage link (2026-10-17, owner ruling: Share and QR are hidden until the feature is built) */
.dc-ticket-footer { z-index: 3; display: flex; align-items: center; gap: 6.375px; margin-top: auto; }
/* The SPACER is the empty <span> that pushes Manage to the far end -- and only it (independent-review fix
   round F2, 2026-08-12). This rule was written as `> span` when the footer's only span child WAS that
   spacer; P2.2 then wrapped the disabled Share and QR buttons in `.rp-soon` spans, so three children
   claimed `flex: 1` and split the free space three ways -- the icon cluster came apart, measured 168.73px
   wide against the rendered reference's 114.75px, with 60.35px of dead air between Share and QR where the
   footer's own 6.375px gap belongs. `:empty` names the spacer by the one property that distinguishes it
   (it carries no content by design), so a future wrapper around any footer control cannot inherit the
   push. The reference's own footer is three bare 34px buttons + one `flex: 1 1 0%` empty span + the
   Manage pill, measured live on index.html at 1440.
   THE FRAGILITY IS WORTH NAMING (A14, recorded 2026-08-12): `:empty` does not match an element containing
   WHITESPACE, so `<span></span>` matches and `<span>\n</span>` does not. A formatter that expands the
   self-closed spacer, or a Razor edit that puts the tag on two lines, silently un-matches this rule and
   the footer comes apart again exactly as it did before F2 -- with no build error and no failing test,
   because nothing asserts the spacer's rendered flex. The view keeps the tag closed on one line for that
   reason, and this note is the record a reformatter should meet. */
.dc-ticket-footer > span:empty { flex: 1; }
.dc-ticket-action {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: var(--kp-radius-full);
    background: var(--kp-navy-600-a05);
    color: var(--kp-postal-navy-600);
}
.dc-ticket-action .icon { width: 14px; height: 14px; }
/* P3 fix round (2026-08-08): the VBX circle's rest wash measures .10 and its hover .18 on the rendered
   reference -- not the .13 the shared --portal-ship-gold-tint carries. Spelled here as literal alphas
   (this block's standing practice for single-use washes) rather than re-valuing the shared token, whose
   whole --portal-ship-* family is built on one alpha step. Hover twin lives with the other hovers. */
.dc-ticket-vbx .dc-ticket-action { background: rgb(203 160 82 / .1); color: var(--kp-stamp-gold-500); }
.dc-ticket-action:disabled { opacity: .5; cursor: not-allowed; }
/* The copy button confirms ON ITSELF for 1.5s (parity fix wave 2026-08-11, P1.6b): the reference turns
   the glyph green (`.dc-ticket-action.is-copied`) the moment the number reaches the clipboard, which is
   the clearest "my click worked" on this page -- a toast at the other end of the screen is easy to miss.
   The class is toggled by home.js off the shared copy handler's kp:copied event; the toast still fires,
   as the reference also raises its own. Green is the OFFICIAL #009a44 rather than the package's #059669
   (portal palette clause, 15 #148 D1). */
.dc-ticket-action.is-copied { color: var(--kp-green-700); }
.dc-ticket-vbx .dc-ticket-action.is-copied { color: var(--kp-green-700); }
.dc-ticket-manage {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 29.75px;
    padding-block: 6.375px;
    padding-inline: 12.75px 14.875px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-postal-navy-600);
    color: var(--kp-portal-surface-soft);
    font-size: 12.75px;
    font-weight: 700;
    line-height: 17px;
    letter-spacing: 0;
    text-decoration: none;
}
html[dir="ltr"] .dc-ticket-manage { padding-inline: 14.875px 12.75px; }
.dc-ticket-vbx .dc-ticket-manage { background: var(--kp-stamp-gold-500); color: var(--kp-postal-navy-600); }
/* Parity fix wave P2.1b (2026-08-11): the reference's Manage pill carries a trailing arrow the port
   never had -- 12x12 at the family's own 5px gap, WHITE on the navy P.O.Box pill and NAVY on the gold
   VBX pill (rendered reference: `.dc-ticket-manage { justify-content:center; gap:5px }` +
   `.dc-ticket-manage-arrow { width:12px; height:12px; flex-basis:12px }`, app.bundle.css:9114-9123;
   the two assets are icon-arrow-white.svg and icon-arrow-primary.svg). Its own `gap: 5` was already
   here with nothing to gap against.
   ARTWORK: both of those assets are BYTE-IDENTICAL in path data to the shipped icon-arrow-duotone, so
   nothing was vendored -- and because ours is a sprite symbol drawing currentColor, the per-variant
   colour is inherited from the pill instead of needing two assets.
   DIRECTION: the reference flips every dashboard arrow with
   `html[dir=rtl] .dc-ph-arrow { transform: rotate(180deg) }` (app.bundle.css:9125). The shared
   .icon--directional helper flips with `scaleX(-1)` instead, which paints an IDENTICAL result for
   this artwork -- the Phosphor arrow is symmetric about its own horizontal axis, so the rotation's
   extra vertical flip changes nothing -- so the shipped helper is used at the call site rather than
   adding a second flip rule that would have to be kept in step with it. */
.dc-ticket-manage .icon { width: 12px; height: 12px; flex: 0 0 12px; }

/* AGENTS.md Core Rule 13 / 15 #148 D7: empty states retain their tier's minimum ticket height,
   growing with content so rejection details and the final action remain inside the clipped card. */
.dc-ticket.dc-ticket-empty { display: flex; height: auto; min-height: var(--dc-ticket-height); }
.dc-ticket-empty .dc-ticket-layout { height: auto; flex: 1; }
.dc-ticket-empty { border-style: dashed; border-color: var(--color-border); background: var(--color-bg-canvas); box-shadow: none; backdrop-filter: none; }
.dc-ticket-empty .dc-ticket-spine { opacity: .55; }
/* 15 #148 D7: the content-sized column keeps all state copy and its last action together. */
.dc-ticket-empty .dc-ticket-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.dc-ticket-empty .dc-ticket-content > * { flex-shrink: 0; max-inline-size: 100%; }
.dc-ticket-rejection { margin: 0; padding: 0; color: var(--color-text-muted); font-size: 14px; text-align: center; overflow-wrap: anywhere; }

/* Task 5 (2026-07-18 portal-box-data-and-linking plan): the pending/rejected link-request states
   inside the empty P.O. Box ticket -- no mockup precedent (COMPOSED, same keep-shipped-extras rule as
   the plain empty-ticket state above), styled from the already-shipped semantic status-tone tokens
   (same tones as the shipment-row .dc-status-pill above -- one tone vocabulary for the whole page)
   and the ticket footer's existing navy CTA look (.dc-ticket-manage).
   (Dated 2026-11-10, owner ruling 15 #1265: the .dc-status-pill family named in this note left this sheet, unused; the note is kept as history.) */
.dc-link-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--kp-radius-full); font-size: 12px; font-weight: 700; text-align: center; }
.dc-link-chip-pending { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.dc-link-chip-rejected { background: var(--status-alert-bg); color: var(--status-alert-fg); }
.dc-ticket-action-cta {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: var(--kp-radius-full);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}
.dc-ticket-action-cta:hover { background: var(--kp-navy-700); }

/* ---- link-my-box dialog form (Task 5) -- .ref-field is the EXISTING register-form field family
   (components.css §"AUTH-LOGIN"/"REGISTER HEADER" -- reuse before create); only the submit button
   and its spacing inside the Swal html slot are new. */
#linkBoxForm { display: grid; gap: 16px; padding: 8px 0 0; }
/* A branch name longer than the closed select ends with an ellipsis (owner ruling 15 #1182, 2026-11-10); it was cut
   mid-word. The whole name shows on hover: home.js keeps the select's title equal to the chosen option's text. */
#linkBoxForm select { text-overflow: ellipsis; }
.dc-dialog-submit { width: 100%; justify-content: center; min-height: 45px; }
/* The postal code's hint wears the registration card's hint (owner ruling 2026-10-12, ledger 15 #451).
   It is a direct <span> child of `<label class="ref-field">`, so the shared label-row rule
   `.ref-field > span` (0,1,1) -- flex, 12px, 700, muted ink -- outranks the hint's own single-class rule
   (0,1,0) and would paint the hint as a second label. This re-states the four values the label row takes
   away, scoped through the dialog's form so no other form's label rows or hints change; the hint's other
   values (margin, leading, tracking, case) still come from its own rule, which nothing here contests. */
#linkBoxForm .ref-field > .ref-reg-field-hint {
    display: block;
    color: rgb(71 85 105 / .75);
    font-size: 11px;
    font-weight: 400;
}

@media (max-width: 1100px) {
    .dc-hero-grid { gap: 13px; }
    .dc-ticket { --dc-ticket-height: 224px; }
    .dc-ticket-spine { flex-basis: 50px; }
    /* Parity fix wave P2.1i (2026-08-11): the reference steps the spine glyph 28 -> 24 -> 22 across
       its own three tiers; measured on the rendered reference at 1024. */
    .dc-ticket-spine-icon { width: 24px; height: 24px; }
    /* `.dc-ticket-content { padding: 16px }` USED TO SIT HERE and is deleted (fix package E item E10,
       2026-08-12 -- exposed by package D's measurement, which correctly left it as outside its fence).
       The reference steps this padding exactly ONCE, at <=720 to `14px 12px`, and holds its base
       21.25px right through this whole tier: measured on the rendered reference at 1240, 1100, 900 and
       750 in both languages, 21.25px at every one, against our 16px. Removing the override is the fix;
       the <=720 step below is the reference's own and stays. */
    /* The corner-offset override that used to sit here (on .dc-ticket-status) is GONE, not moved:
       the corner badge is the count pill now (fix package D, 2026-08-12), and the rendered reference
       keeps it at the base 12px/12px right through this tier -- measured at 1240 and 900. Its only
       step is in the <=720 arm below. The status pill is in flow here and has no offsets at all. */
    /* Digit size at this tier is FLUID (design-review capture, 2026-08-24): the fixed 36px clipped
       long box numbers at the ticket's inline end on compact viewports while fitting at desktop.
       A box number never wraps or ellipsizes, so the type follows the space instead. Derivation,
       from values this shell and family already declare: content wrap = viewport - 80px compact
       rail - 2x34px wrap padding - ~17px scrollbar allowance; ticket = (wrap - 13px hero-grid gap)
       / 2; inline chrome inside it = 50px spine + 12.75px perforation + 2x21.25px content padding;
       JetBrains Mono advances one glyph per 0.600em (the recorded reference measurement
       184.28px / 44px / 7 glyphs); seeded longest token bound = 13 glyphs. Solving
       font-size = available-inline / (0.600 x 13) gives 100vw / 15.6 - 24.9px, clamped between a
       21px floor (the band's 721px edge) and this tier's own 36px ceiling -- widths where 36px
       already fit are pixel-identical to before. height/line-height keep the tier's font-size+4
       relationship, and the base 44/44/44 shape above stays untouched. The <=720 snap-strip tier
       below keeps its own 27px step: its single min(88%, 360px) card leaves room for the bound.
       Dated clause 2026-10-16: this derivation now holds only from 721 to 1023px, the band where the
       80px compact rail still shows. From 1024px the labelled 272px rail shows (15 #429(b)), and the
       two blocks right after this tier carry that band's own derivation. */
    .dc-ticket-digits {
        --dc-ticket-digit-size: clamp(21px, calc(100vw / 15.6 - 24.9px), 36px);
        height: calc(var(--dc-ticket-digit-size) + 4px);
        font-size: var(--dc-ticket-digit-size);
        line-height: calc(var(--dc-ticket-digit-size) + 4px);
    }
    /* D1 responsive: mockup shrinks + fades the watermark at this tier (measured height:48%, opacity:.24). */
    .dc-ticket-art { height: 48%; opacity: .24; }
}
/* THE TICKET NUMBER BESIDE THE LABELLED RAIL, 1024-1306px (dated 2026-10-16). Since 15 #429(b) the 272px
   rail shows from 1024px, so the content column is 192px narrower than the 1100 arm's derivation assumes,
   and above 1100px nothing scaled the base 44px at all: a 13-glyph number ran past its ticket, where
   .dc-ticket-content{overflow:hidden} clipped it. The size here is derived the same way as in the 1100 arm,
   from values this shell and family already declare: content wrap = viewport - 272px rail - 2x34px wrap
   padding - ~17px scrollbar allowance; ticket = (wrap - hero-grid gap) / 2; inline chrome inside it =
   spine + 12.75px perforation + 2x21.25px content padding; JetBrains Mono advances one glyph per 0.600em;
   seeded longest token bound = 13 glyphs. So font-size = available-inline / (0.600 x 13), per tier:
   - 1101-1306px, the base tier (17px gap, 68px spine, so 123.25px of chrome): available = 100vw / 2 -
     310.25px, font-size = 100vw / 15.6 - 39.78px, clamped between 30px (the 1101px edge gives 30.8px)
     and the base 44px. The band's upper edge is where that expression reaches 44px: (44 + 39.78) x 15.6 =
     1306.97px, so the band ends at 1306px (43.9px) and from 1307px the base 44px fits the bound by the
     same derivation. The labelled rail was 272px wide there before 2026-10-16 as well, so the 44px base
     had clipped the English bound from 1280px all along (measured 2026-10-16: 9.95px past at 1280px,
     0.05px inside at 1300px); this band closes that too.
   - 1024-1100px, the 1100 arm's tier (13px gap, 50px spine, so 105.25px of chrome): available = 100vw /
     2 - 290.25px, font-size = 100vw / 15.6 - 37.22px, clamped between 28px (the 1024px edge gives
     28.4px) and the arm's 36px, which this band does not reach (33.3px at 1100px).
   Both constants are rounded UP from 310.25 / 7.8 and 290.25 / 7.8, so the size stays at or under the
   derivation. Each band keeps its own tier's height/line-height relationship: equal to the size in the
   base tier, size + 4px in the 1100 arm. The second block overrides the first where both match, the way
   the 1100 arm overrides the base, so a fractional width between 1100 and 1101 takes the first block. The
   ~17px allowance is the 1100 arm's own; the portal's page scrollbar paints 6px (site.css), and the 5.5px
   per ticket that leaves covers the ticket's 2px of border, which the formula does not count. From 1307px
   the base 44px is unchanged; from 721 to 1023px the 1100 arm's own size is unchanged. No wrap, ellipsis
   or hiding is used: the type follows the space. */
@media (min-width: 1024px) and (max-width: 1306px) {
    .dc-ticket-digits {
        --dc-ticket-digit-size: clamp(30px, calc(100vw / 15.6 - 39.78px), 44px);
        height: var(--dc-ticket-digit-size);
        font-size: var(--dc-ticket-digit-size);
        line-height: var(--dc-ticket-digit-size);
    }
}
@media (min-width: 1024px) and (max-width: 1100px) {
    .dc-ticket-digits {
        --dc-ticket-digit-size: clamp(28px, calc(100vw / 15.6 - 37.22px), 36px);
        height: calc(var(--dc-ticket-digit-size) + 4px);
        font-size: var(--dc-ticket-digit-size);
        line-height: calc(var(--dc-ticket-digit-size) + 4px);
    }
}
@media (max-width: 720px) {
    .dc-hero-grid {
        display: flex;
        grid-template-columns: none;
        gap: 12px;
        overflow-x: auto;
        margin-inline: -14px;
        margin-bottom: 21px;
        padding: 0 14px 7px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    /* P3 fix round (2026-08-08): v2's own snap-strip card is `flex: 0 0 min(88%, 360px)` at 232px --
       the cap is what holds the card at 308px on a 390 viewport instead of letting 88% run away on a
       wide phone. Both values are the reference's, measured 308x232. */
    .dc-ticket { --dc-ticket-height: 232px; flex: 0 0 min(88%, 360px); scroll-snap-align: center; }
    .dc-ticket-spine { flex-basis: 50px; }
    /* Parity fix wave P2.1i (2026-08-11): the last step of the reference's spine-glyph ladder;
       measured on the rendered reference at 720 and again at 390 (both 22). */
    .dc-ticket-spine-icon { width: 22px; height: 22px; }
    .dc-ticket-perforation { flex-basis: 9px; }
    .dc-ticket-content { padding: 14px 12px; }
    /* D2 (2026-07-19 fix wave) reserved ~52px on the meta's inline-end so the dates could not slide under
       the absolutely-positioned mail-count chip. Restyle P3 (2026-08-08) retired the reservation, and its
       reason -- "the chip that now floats in that corner is the STATUS pill" -- died with P3's own swap in
       fix package D (2026-08-12): the count chip is the floating one again, exactly as D2 found it.
       The reservation did not come back AT THIS TIER in the first 2026-08-26 pass, because the corner
       badge sits at top 11px on a band of its own, a whole row above this one, and the reference
       reserves nothing here either -- its dates run the full width and wrap.
       CORRECTED 2026-08-26, second pass (measured ticket-vs-badge collision, both tiers): the paragraph
       above was true of the REFERENCE but its reasoning silently governed OUR family -- OUR ratified
       badge wording is wider than the reference's own strings, so the row's line-breaking cannot clear
       the floating chip even here (measured expires-under-badge overlaps at 720 and 600 in BOTH
       languages and at 390 in English). At the BASE tier the reference DOES reserve inline-end space
       (68px on its copy wrapper); its <=720 value is a literal 0 only because ITS strings are short
       there -- the separation intent outranks the literal 0, so EACH tier reserves what its own widest
       ratified string needs. The base tier ships 90px above; this tier's own number follows.
       THE `gap: 6px` THAT USED TO SIT HERE IS DELETED TOO (fix package E item E10, 2026-08-12): the
       reference never steps this gap at all -- 8.5px at 1440, 1279, 1240, 1100, 900, 750 AND 390, both
       languages -- so the narrow override was tightening a row the reference leaves alone. The base
       8.5px now carries through, which is also the value the dates need to stay legible once they wrap
       onto two lines at this width.
       THIS TIER'S OWN RESERVATION (measured 2026-08-26): the badge keeps its 9px type at this tier --
       only its offsets step down (12/12 -> 11/10, rule below) -- and like the base tier's first cut
       the number once ignored the 4px halo the badge paints OUTSIDE its border. Same stated terms:
       10px offset + 77.1px rendered widest ratified form («لا توجد رسائل» -- an ENGLISH
       letter-spacing-context width; in the Arabic page context the same string renders 71.42px,
       letter-spacing computes normal there) + 4px halo + design-term gap stated at 8px = 99.1px
       needed, and 100px ships (rounded up -- the same rounding as the base tier's 101.1 -> 102,
       measured here rather than copied); MEASURED floor here is ~21px beyond the halo (this row's own
       12px inline-end inset from the badge anchor), not the stated 8px term. CORRECTED 2026-08-26 eye
       pass: this paragraph's closing absolute -- the digit-free Arabic zero form binding at any count
       -- was measured FALSE: English "9999 mails" renders 76.63px against the zero form's 71.42px,
       so English binds lower only up to three-digit counts (64.1px -> 86.1px with the same terms).
       Measured truth: every ratified form and any realistic count clears with >= 21px of air beyond
       the halo (eye pass 2026-08-26, 36 cells + negative controls). */
    .dc-ticket-meta { padding-inline-end: 100px; }
    /* The reference's ONE responsive step for the corner badge: 12/12 -> 11/10 (measured on the
       rendered reference at 390 in both languages, fix package D 2026-08-12). It replaces the
       .dc-ticket-status offsets that used to be here, which floated the wrong pill. */
    .dc-ticket-mails { top: 11px; inset-inline-end: 10px; }
    /* D1 responsive shrank the watermark here (inset-inline-end:8px, opacity:.2) on v1 measurements.
       DELETED in the P3 fix round (2026-08-08): v2 measures the BASE values at 390 -- inset 17px and the
       per-variant opacity above -- so the narrow override was carrying stale numbers. */
    .dc-ticket-dot { display: none; }
    .dc-ticket-digits { height: 36px; font-size: 27px; line-height: 36px; }
    .dc-ticket-footer { gap: 5px; }
    .dc-ticket-action { width: 38px; height: 38px; flex-basis: 38px; }
    .dc-ticket-manage { padding-block: 6px; padding-inline: 11px; font-size: 10px; line-height: 16px; }
    html[dir="ltr"] .dc-ticket-manage { padding-inline: 11px; }
}

/* ---- shipments tabs + list + View All (§1.3) ----
   Restyle P3 (2026-08-08): v2 lays the dashboard body out on a FOUR-column grid -- the shipments column
   spans three and the side column one -- which is what produces the measured 814px panel beside a
   254.375px aside at the flagship width. The v1 `3fr / minmax(280px, 1fr)` split produced neither. v2
   writes the four-column form under `html[dir=rtl]` only and leaves LTR on a `1fr / 370px` split, and
   ours uses the single four-column form in both directions.

   THE REASON THIS BLOCK USED TO GIVE WAS FALSE, and the real one is a RULING (parity round 2, fix
   package E item E4, 2026-08-12). It said the single form was safe "because the reference's own EN
   render measures to the same geometry mirrored". It does not: the rendered reference at 1440 measures
   `254.375px x4` in Arabic (shipments panel 814.125, side column 254.375) and `698.5px 370px` in
   English -- a side column 115px wider. Two different layouts, not one mirrored.

   SO CORE RULE 13's TIE-BREAKER APPLIES (majority/most-specific wins, choice recorded), and the
   contradiction is wider than the census that found it could see. Measured on the rendered reference at
   1440 / 1279 / 1240 / 1101 / 1100 / 900 / 750, both languages:
     * ARABIC  holds four columns at EVERY one of those widths -- it never collapses.
     * ENGLISH is two columns at 1440 and ONE column from 1279 down (1125px at 1279, 1086 at 1240,
       946 at 1100, 746 at 900). Census D reported English as collapsing at 1100 because it sampled
       1440/1100/900 and never opened a width inside 1101-1439 -- the middle-band hole again (portal
       lesson 10). The real English boundary is 1279: exactly ours.

   ITS OWN CSSOM SAYS WHY, and that is what decides it. Three rules govern this element there:
       (base)                     body[data-static-page="dashboard2"] .dc-grid
                                     { grid-template-columns: minmax(0,1fr) 370px }       (0,2,1)
       (base)  html[dir="rtl"]    body[data-static-page="dashboard2"] .dc-grid
                                     { grid-template-columns: repeat(4, minmax(0,1fr)) }  (0,3,2)
       @media (721-1279px)        body[data-static-page="dashboard2"] .dc-grid
                                     { grid-template-columns: 1fr }                       (0,2,1)
   A media query adds NO specificity, so inside 721-1279 the base RTL rule (0,3,2) outranks the
   responsive collapse (0,2,1) and Arabic never sees it. There is no `html[dir=rtl]` twin inside any
   media block anywhere in the bundle. The Arabic survival is therefore a SPECIFICITY ACCIDENT -- the
   same shape as the reference's own `grid-column: span 3` bug recorded on the collapse rule below, and
   the same shape package B found on this package's font-size-adjust -- while the collapse is the only
   rule the reference AUTHORS inside a responsive tier for this element. Most-specific INTENT wins, so
   the 1279 collapse stays for both languages.
   At >=1280 the four-column form stays for both languages too: of the two AUTHORED base rules it is the
   more specific (0,3,2 against 0,2,1), it is the one the reference's default-language render paints,
   Arabic is this product's default language, and one layout must not drift between languages.
   NET: no rule changes here -- what changes is that the choice is now measured and recorded rather than
   resting on a claim the measurement contradicts. */
.dc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25.5px; }
/* 2026-09-08, Core Rule 13: let the shipments item shrink to its track so English tabs scroll inside the strip. */
.dc-grid > div:first-child { grid-column: span 3; min-inline-size: 0; padding-block-end: 25.5px; }
.dc-grid > div:last-child { grid-column: span 1; display: flex; flex-direction: column; gap: 25.5px; }
.dc-title-row { display: flex; align-items: center; justify-content: space-between; min-height: 29.75px; margin: 0 0 12.75px; }
.dc-title-row h2 { display: flex; align-items: center; gap: 8.5px; margin: 0; font-size: 19.125px; font-weight: 700; line-height: 29.75px; letter-spacing: -.025em; }
.dc-title-row h2 .icon { width: 21.25px; height: 21.25px; flex: 0 0 21.25px; }
/* v2 tints the heading marks per section: primary on the shipments column, gold on both side sections
   (its own `.dc-title-heading > i.is-gold` rule). The modifiers are scoped to this row rather than made
   global utilities -- the system has no `.is-*` colour family and this port should not start one. */
.dc-title-row h2 .icon.is-primary { color: var(--kp-postal-navy-600); }
.dc-title-row h2 .icon.is-gold { color: var(--kp-stamp-gold-500); }
/* The side column runs a SMALLER heading than the main column -- 18px against 19.125px. Both are
   deliberate in v2 (two separate rules, measured 2026-08-08); they are not a rounding artefact. */
.dc-grid > div:last-child .dc-title-row h2 { font-size: 18px; line-height: 28px; gap: 8px; }
.dc-grid > div:last-child .dc-title-row { min-height: 28px; }
.dc-grid > div:last-child .dc-title-row h2 .icon { width: 20px; height: 20px; flex-basis: 20px; }
.dc-status-tabs { display: flex; gap: 8.5px; margin-bottom: 10.625px; overflow: auto; }
/* Core Rule 13 (2026-09-08): touch/wheel scrolling shows no native bar at any width, extending the reference hide rule after the owner caught the rail-narrowed desktop strip. */
.dc-status-tabs, .dc-direction-tabs { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
/* ROOM FOR THE WHOLE FOCUS RING (2026-10-18). A strip that scrolls sideways clips whatever its tabs paint outside it, and
   with no padding the 2px ring at a 2px offset lost its top and bottom on every tab and the outer side of each end
   tab, at every width. 4px of padding all round, given back by an equal negative margin, holds the whole ring inside
   the strip while every tab keeps its place, and 4px of scroll padding keeps it whole when the keyboard brings a tab at
   either end into view (the browser otherwise stops the tab flush with the strip's edge). Below 576px the strips already carry the phone gutter as inline padding
   (the phone tier below), so there only the block sides change. The dashboard's two strips only: the shipments
   board's row lays out its own arrows and ring room. The sideways scroll, the hidden bar and the fades are unchanged. (Dated 2026-11-08: the Mailbox's tab row has no strip wrapper and takes the same room through its own selector below, with every tab and the list under it in the same place; no strip of Home changes.) */
.dc-strip--status > .dc-status-tabs,
.dc-strip--direction > .dc-direction-tabs, .mb-mail > .dc-direction-tabs { padding: 4px; margin-block-start: -4px; margin-inline: -4px; scroll-padding-inline: 4px; }
.dc-strip--status > .dc-status-tabs { margin-block-end: calc(10.625px - 4px); }
.dc-strip--direction > .dc-direction-tabs, .mb-mail > .dc-direction-tabs { margin-block-end: calc(12.75px - 4px); }
@media (max-width: 575.98px) {
    .dc-strip--status > .dc-status-tabs,
    .dc-strip--direction > .dc-direction-tabs, .mb-mail > .dc-direction-tabs { padding-inline: var(--kp-portal-phone-gutter); margin-inline: 0; }
}
.dc-status-tab {
    display: flex;
    align-items: center;
    gap: 8.5px;
    min-width: max-content;
    min-height: 48.75px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-dc-tab-bg);
    color: var(--kp-dc-tab-ink);
    padding-block: 8.5px;
    padding-inline: 8.5px 12.75px;
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
    cursor: pointer;
}
html[dir="ltr"] .dc-status-tab { padding-inline: 12.75px 8.5px; }
.dc-status-tab img { width: 23px; height: 23px; object-fit: contain; }
/* fix-wave 3 (2026-07-18 live-parity ledger item 4, L802/807): box-shadow tuned to the mockup's measured
   value. P3 re-measured the active fill as plain white (v2 `#fff`), replacing the near-white
   --kp-portal-surface-soft the v1 layer painted. The active tab's INK left this rule on 2026-08-11 for
   the tone system below -- it is no longer one fixed navy for all four tabs -- which is why
   --kp-dc-tab-active-ink was retired from tokens.css in the same change. */
/* ---- shipment status TONE SYSTEM (parity fix wave 2026-08-11, P1.5) ----
   Picking a status tab used to change almost nothing: one fixed navy dress for all four tabs, a grey
   count badge, and a panel whose already-declared border/background transition nothing ever triggered.
   The reference gives each status its own colour and carries it through THREE places at once -- the
   active tab's ink, its count badge (ink + tint fill), and the whole results panel below (top border +
   3% wash) -- so a click is unmistakable. Measured on the rendered reference 2026-08-11:
   `.dc-status-tab { --shipment-tab-color: var(--color-primary) }` with `--shipment-tab-tint:
   rgba(0,51,160,.10)` / `--shipment-tab-ring: rgba(0,51,160,.38)`, then pickup gold .13/.42, transit
   #7c3aed .10/.38, delivered `var(--color-success)` .10/.36; the panel swaps on
   `[data-shipment-tone]` with a 3% tint of the same colour.
   ZERO NEW TOKENS: the --portal-ship-{navy,gold,violet,green} trio family in tokens.css was created for
   exactly these values (its own comment names them) with the reference's alphas verbatim, and never got
   wired to the tabs. The reference's --color-primary / --color-accent-gold / --color-success resolve to
   #0033a0 / #cba052 / #009a44 -- the OFFICIAL palette -- so no D1 re-expression is needed here; the
   transit violet has no official counterpart and keeps the portal's own shipped --kp-violet-600, the
   same colour the status-transit chips already speak.
   HOUSE CONVERSION: the reference selects the tone with a per-status CLASS (.dc-status-pickup); ours
   reads the `data-status` attribute the markup and home.js ALREADY carry, so the tab's tone and the
   tab's filter can never name different things. Visually identical -- Core Rule 13's
   visual-equivalence carve-out. */
.dc-status-tab {
    --kp-ship-tone: var(--portal-ship-navy);
    --kp-ship-tone-tint: var(--portal-ship-navy-tint);
    --kp-ship-tone-ring: var(--portal-ship-navy-ring);
}
.dc-status-tab[data-status="pickup"] {
    --kp-ship-tone: var(--portal-ship-gold);
    --kp-ship-tone-tint: var(--portal-ship-gold-tint);
    --kp-ship-tone-ring: var(--portal-ship-gold-ring);
}
.dc-status-tab[data-status="transit"] {
    --kp-ship-tone: var(--portal-ship-violet);
    --kp-ship-tone-tint: var(--portal-ship-violet-tint);
    --kp-ship-tone-ring: var(--portal-ship-violet-ring);
}
.dc-status-tab[data-status="delivered"] {
    --kp-ship-tone: var(--portal-ship-green);
    --kp-ship-tone-tint: var(--portal-ship-green-tint);
    --kp-ship-tone-ring: var(--portal-ship-green-ring);
}
.dc-status-tab.active { background: var(--kp-white); border-color: var(--color-border); color: var(--kp-ship-tone); box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .25); }
.dc-status-tab span {
    display: grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-dc-tab-badge-bg);
    color: var(--kp-dc-tab-badge-ink);
    font-size: 11px;
}
/* Only the ACTIVE tab's count badge takes the tone; a resting badge keeps the shared grey pair above,
   exactly as the reference does. */
.dc-status-tab.active span { background: var(--kp-ship-tone-tint); color: var(--kp-ship-tone); }
/* The panel mirrors whichever tone the picked tab carries. Its own transition (declared with the P3
   restyle timings further down this file) finally has something to animate: before this change the
   attribute was never written and the panel never moved. The three .03 washes are the same official
   colours as the tones above at the reference's own panel alpha -- functional rgb() with an alpha is
   this file's established form for a one-consumer tint (see the .18 gold ticket-action wash below). Home's copied shipment row keeps its tracking code whole through panel-scoped rules at this file's end (2026-11-01, PUIVR-1). */
.dc-ship-panel {
    --kp-dc-panel-tone: var(--kp-dc-panel-border);
    --kp-dc-panel-tone-tint: var(--kp-dc-panel-bg);
    border: var(--kp-dc-panel-border-width) solid var(--color-border);
    border-block-start: 2px solid var(--kp-dc-panel-tone);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-dc-panel-tone-tint);
    padding: var(--kp-dc-panel-padding);
    box-shadow: 0 12px 25px rgb(23 41 68 / .043);
}
.dc-ship-panel[data-shipment-tone="pickup"] {
    --kp-dc-panel-tone: var(--portal-ship-gold);
    --kp-dc-panel-tone-tint: rgb(203 160 82 / .03);
}
.dc-ship-panel[data-shipment-tone="transit"] {
    --kp-dc-panel-tone: var(--portal-ship-violet);
    --kp-dc-panel-tone-tint: rgb(124 58 237 / .03);
}
.dc-ship-panel[data-shipment-tone="delivered"] {
    --kp-dc-panel-tone: var(--portal-ship-green);
    --kp-dc-panel-tone-tint: rgb(0 154 68 / .03);
}
.dc-direction-tabs { display: flex; gap: 8.5px; margin-bottom: 12.75px; }
.dc-direction {
    display: inline-flex;
    align-items: center;
    gap: 6.375px;
    min-height: 31.75px;
    border: 1px solid var(--kp-dc-direction-border);
    border-radius: 20px;
    background: var(--color-bg-surface);
    color: var(--kp-dc-direction-ink);
    padding-block: 4.25px;
    padding-inline: 10.625px 6.375px;
    font-size: 12.75px;
    font-weight: 600;
    cursor: pointer;
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L815/820): root cause of the 33px-vs-36px
       height gap was NOT padding (already measured matching) -- Chromium's UA stylesheet gives
       <button> elements line-height:normal by default, so this button never inherited the ambient
       1.5 that .rp-shell sets. P3 pins v2's own measured 17px instead of the ratio. */
    line-height: 17px;
}
/* fix-wave 3 (2026-07-18 live-parity ledger item 4, L815): border-radius 20px, mockup-measured. P3
   moved it onto the base rule -- v2 gives the resting pill the same 20px, not a full round. */
.dc-direction.active { background: var(--kp-dc-direction-active-bg); color: var(--kp-white); border-color: var(--kp-dc-direction-active-bg); }
/* Home's pills are buttons; the Mailbox's are links, because that list is drawn by the server (owner ruling 15 #1229). */
a.dc-direction { text-decoration: none; }
/* The count chip was white-on-white while the pill rested (invisible until the pill went active). v2
   gives the resting chip an ink wash and keeps the white one for the active pill only. */
.dc-direction span {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    min-height: 23px;
    padding: 2px 6px;
    border-radius: var(--kp-radius-lg);
    background: rgb(15 23 42 / .055);
}
.dc-direction.active span { background: rgb(255 255 255 / .14); }
/* Owner complaint item 1, 2026-08-12 (fix package C): the reference draws an inline duotone arrow on
   the inbound and outbound chips and DELIBERATELY none on "all" (its dashDirectionIcon('all')
   resolves to an empty string), so the mark is placed per chip in the view rather than by a rule here.
   Measured on the rendered reference at 1440: 17x17, fill currentColor, and `transform: none` in BOTH
   languages -- it does NOT mirror for RTL, which is why these two marks must never take the shared
   .icon--directional helper. Colour needs no rule either: currentColor already resolves to the chip's
   own grey when it rests and to white when it is the active chip, which is exactly what the reference
   paints (rgb(101,112,131) / rgb(255,255,255), both verified by really clicking the chip). */
.dc-direction .icon { width: 17px; height: 17px; }
.dc-empty { margin: 0; padding: 24px 0; color: var(--color-text-muted); font-size: 14px; text-align: center; }
/* Parity fix wave P2.1c / P2.5 (2026-08-11): the control shipped as centred BLOCK text with no mark.
   The reference is a flex ROW carrying a muted trailing arrow -- measured on the rendered reference:
   `display:flex; align-items:center; justify-content:center; gap:7px; text-align:center`
   (app.bundle.css:9088, the `.dc-view-all-shipments` rule) with the arrow at 13x13 (the family's own
   `.dc-ph-icon` size, app.bundle.css:9080) and inked rgb(102,115,137), which is the control's own
   resting text colour -- so the mark simply inherits currentColor here and needs no colour rule.
   The arrow flips under RTL through the shared .icon--directional helper, exactly as the Manage pill's
   does (see that rule for why scaleX and the reference's rotate are equivalent for this artwork). */
.dc-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 44.5px;
    border: 0;
    border-radius: var(--kp-radius-lg);
    background: var(--color-bg-surface);
    color: var(--kp-dc-view-all-ink);
    margin-block-start: 12.75px;
    padding: 12.75px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}
.dc-view-all .icon { width: 13px; height: 13px; flex: 0 0 13px; }

/* v2 collapses the body to one column at 1279, not 1100 -- the same tier boundary package P1 adopted for
   the compact rail (dated clause 2026-10-16, 15 #429(b): the compact rail itself now ends at 1023px; this
   collapse keeps the reference's own 1279). The span-3/span-1 placements MUST be reset with it: `grid-column: span 3` inside a
   one-column grid conjures two implicit columns instead of collapsing (v2 leaves that bug standing
   because its own spans are dir-scoped; ours are not, so the reset is explicit).
   Dated 2026-10-16 (15 #441): the one track is minmax(0, 1fr) - the base rule's own minimum - not a plain 1fr.
   A plain 1fr keeps its column's min-content width as its floor, so an announcement row (one line, cut with an
   ellipsis) widened the side column to its whole text and the page scrolled sideways: measured about 9,400 px
   wide at 721-1279 in both languages before this change, the viewport width after it. */
@media (max-width: 1279px) {
    .dc-grid { grid-template-columns: minmax(0, 1fr); }
    .dc-grid > div:first-child,
    .dc-grid > div:last-child { grid-column: auto; }
}
@media (max-width: 1023px) {
    .dc-grid > div:last-child .dc-title-row h2 { font-size: 16px; line-height: 24px; }
}
@media (max-width: 720px) {
    .dc-status-tabs, .dc-direction-tabs { overflow-x: auto; scrollbar-width: none; }
    .dc-direction { min-width: max-content; }
    .dc-grid { display: flex; flex-direction: column; gap: 25.5px; }
    .dc-grid > div { min-width: 0; width: 100%; }
    .dc-grid > div:last-child { display: flex; flex-direction: column; gap: 25.5px; }
    .dc-title-row { margin-bottom: 12px; }
    /* Dated 2026-11-07 (Core Rule 13, the rendered page first): only the side column's two headings step down here.
       Measured on the rendered reference dashboard at innerWidth 360 and 390, Arabic and English: Shipments and Quick
       Actions keep 19.125px on 29.75px, Appointments and Announcements paint 16px on 24px. The reference's own bundle
       declares 16px for every heading in this band, but a later rule wins on its rendered page. */
    .dc-grid > div:last-child .dc-title-row h2 { font-size: 16px; line-height: 24px; }
    .dc-title-row h2 .icon,
    .dc-grid > div:last-child .dc-title-row h2 .icon { width: 20px; height: 20px; flex-basis: 20px; }
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L955/961): mockup keeps the desktop
       padding/font-size at this width too (8px 12px / 12px) -- both were unmeasured shrinks. */
    .dc-status-tab { min-height: 42px; padding-block: 8px; padding-inline: 11px; font-size: 11px; }
    html[dir="ltr"] .dc-status-tab { padding-inline: 11px; }
    .dc-status-tab img { width: 23px; height: 23px; }
    .dc-status-tab span { min-width: 23px; height: 23px; font-size: 11px; }
    .dc-view-all { min-height: 44px; }
}

/* 15 #190d/e: change the phone controls' resting layout, with full-bleed scroll hints.
   The fixed shell furniture keeps its placement. Fades never intercept a control's hit target. */
.dc-strip { position: relative; min-inline-size: 0; }
.dc-strip::before,
.dc-strip::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset-block: 0;
    inline-size: var(--kp-dc-strip-fade-width);
    pointer-events: none;
    opacity: 0;
}
.dc-strip::before {
    inset-inline-start: 0;
    background: linear-gradient(90deg, var(--color-bg-surface), transparent);
}
.dc-strip::after {
    inset-inline-end: 0;
    background: linear-gradient(270deg, var(--color-bg-surface), transparent);
}
html[dir="rtl"] .dc-strip::before { background: linear-gradient(270deg, var(--color-bg-surface), transparent); }
html[dir="rtl"] .dc-strip::after { background: linear-gradient(90deg, var(--color-bg-surface), transparent); }
.dc-strip.is-overflow-start::before { opacity: 1; }
.dc-strip.is-overflow-end::after { opacity: 1; }
@media (max-width: 575.98px) {
    /* 15 #148 and dated ruling 2026-09-09: keep the reference source order and painted panel.
       15 #190e: undo both the shell gutter and the panel inset without widening the body.
       15 #190d: the direction row ends one inset before the assistant's fixed column. */
    .dc-strip { margin-inline: calc(-1 * var(--kp-portal-phone-gutter)); }
    .dc-strip--direction {
        --dc-strip-bleed: calc(var(--kp-portal-phone-gutter) + var(--kp-dc-panel-padding) + var(--kp-dc-panel-border-width));
        margin-inline: calc(-1 * var(--dc-strip-bleed));
        margin-inline-end: calc(var(--kp-dc-phone-assistant-corridor) - var(--dc-strip-bleed));
    }
    /* 15 #191(a) (2026-09-18) narrows 15 #190d to the FIRST-SCREEN controls -- the tab strips among them --
       which may not start under the assistant's fixed column at rest, so the status strip reserves the same
       corridor its direction sibling above does. Its bleed is the shell gutter alone, because it sits
       OUTSIDE the painted panel. It needed no corridor until the signed-in account indicator (15 #233)
       began taking about 65.6px above it at 360 (measured 2026-09-17) and pushed the strip's own band down
       into that column. */
    .dc-strip--status { margin-inline-end: calc(var(--kp-dc-phone-assistant-corridor) - var(--kp-portal-phone-gutter)); }
    .dc-status-tabs,
    .dc-direction-tabs { padding-inline: var(--kp-portal-phone-gutter); }
}

/* ---- appointments column (§1.5) + announcements panel (§1.7) — B1 renders only each section's
   empty state (no appointments/announcements API surface exists yet, §7.2). The mockup's own card
   look comes from a generic bootstrap "rp-card" utility class this system does not have — reproduced
   directly on .dc-appointments/.dc-announcements instead so they are self-sufficient containers.
   CORRECTED 2026-10-16: both sections read real data now - the bookings since 2026-09-05 (their rows live in
   the Portal's site.css) and the announcements feed since 2026-10-16 (15 #436; its rows follow below). ---- */
/* Restyle P3 (2026-08-08): the side column is a flex stack with its own 25.5px gap now (see .dc-grid),
   so the per-section bottom margin that used to space them is zero -- keeping both would double-space
   them. The two card shells move onto v2's GLASS treatment, the same family the hero tickets already
   use one step heavier; the reference paints them through a generic app-shell card rule we have no
   equivalent for, so the values live on these two classes directly (unchanged call from the B1 port). */
.dc-side-section { margin-bottom: 0; }
.dc-appointments,
.dc-announcements {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--kp-radius-2xl);
    background: var(--kp-portal-card-glass-bg);
    box-shadow: var(--kp-portal-card-glass-shadow);
    backdrop-filter: blur(10px);
}
/* The panel keeps `position: relative` even though nothing is absolutely placed inside it any more:
   the reference's own panel declares it, and it is what a future announcement row's badge would need.
   Its `.dc-assistant` artwork was RETIRED on 2026-08-10 (owner ruling — the gif must not be the
   announcements panel's background; it floats at the corner now as the launcher of the assistant widget,
   see "SMART ASSISTANT" at the end of this file). The rule is deleted rather than commented out so
   nothing here reads as a live design decision.
   CORRECTED 2026-10-16: the panel now holds the announcement rows below (15 #441), none of them absolutely
   placed; the assistant artwork stays out of it (15 #150). */
.dc-announcements { position: relative; }
@media (max-width: 720px) {
    .dc-side-section { width: 100%; margin: 0; }
    /* fix-wave 3 (2026-07-18 live-parity ledger item 4, L993/1004): mockup keeps the desktop
       --kp-radius-2xl (16px) at this width too -- the --kp-radius-lg (10px) shrink here was
       unmeasured; removed rather than swapped, so the base rule's radius just carries through. */
}

/* ---- the announcement rows (15 #441) -- measured 2026-10-16 on the rendered portal mockup v2
   (ar and en at 1440, 1024, 768, 541, 540 and 390). One button per announcement: the megaphone tile, ONE
   line holding the body and its date word, and the directional arrow. Departures from the reference,
   each ruled: the body never wraps (15 #441 -- the reference wraps to two lines on wide screens and to
   five or six lines in Arabic at 1024 and 768, spilling over its neighbours), and the date and arrow
   never shrink, so both stay readable beside the longest body (the reference lets its date shrink and
   wrap above 720). Dropped on purpose: the reference's `position: relative; z-index: 2` on the row,
   which only lifted it above the assistant artwork this panel no longer holds (15 #150). The ink is
   the button's own default black, kept as the reference paints it.
   Dated 2026-11-02 (owner ruling 15 #957): the row is no longer one line. The body runs across the column beside the
   icon for up to TWO lines before it is cut, and a line under it holds the date with the open arrow at its far end;
   the icon is unchanged and phones take the same layout. The row heights below become floors, so a two-line body
   grows its row and its panel. ---- */
.dc-announcement {
    display: flex;
    align-items: center;
    gap: 14.875px;
    width: 100%;
    /* Dated 2026-11-02 (15 #957): a floor, no longer a fixed height (was height: 64.75px); a one-line body keeps the
       row at exactly this height. */
    min-height: 64.75px;
    padding: 12.75px 17px;
    border: 0;
    border-bottom: 1px solid var(--kp-dc-announcement-border);
    background: var(--color-bg-surface);
    color: var(--kp-dc-announcement-ink);
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color .2s var(--ease-standard);
}
.dc-announcement:hover { background-color: var(--kp-navy-600-a05); }
/* Drawn inside the row: the panel clips its overflow, so an outside ring would be cut at the edges. */
.dc-announcement:focus-visible { outline: 2px solid var(--color-portal-focus-ring); outline-offset: -2px; }
/* The tile is the official navy at 6% (Core Rule 13 palette clause): the reference's own tile is the
   package tint #eef0fa, which no official colour reproduces exactly; this is its nearest navy alpha. */
.dc-announcement-icon {
    display: grid;
    place-items: center;
    width: 38.25px;
    height: 38.25px;
    flex: 0 0 38.25px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-navy-600-a06);
    color: var(--kp-navy-600);
}
.dc-announcement-icon .icon { width: 17px; height: 17px; }
/* Dated 2026-11-02 (15 #957): the text above the date line, one column filling the row beside the icon (was a
   flex line holding the body and its date side by side, spread apart). */
.dc-announcement-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    flex: 1 1 0%;
    gap: 2px;
    min-width: 0;
}
/* Dated 2026-11-02 (15 #957): up to two lines, then cut (was one line, nowrap with an ellipsis). A word longer than
   the column breaks rather than pushing the row wider. */
.dc-announcement-text {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 400;
    line-height: 17.875px;
}
/* The date line (15 #957, 2026-11-02): the date at its start and the open arrow at its far end. */
.dc-announcement-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12.75px;
    min-width: 0;
}
.dc-announcement-date {
    flex: 0 0 auto;
    color: var(--kp-dc-announcement-date);
    font-size: 9px;
    line-height: 14.625px;
    white-space: nowrap;
}
.dc-announcement-arrow {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--kp-dc-announcement-arrow);
    transition: transform .2s var(--ease-standard);
}
/* The hover nudge moves the arrow two pixels toward the reading direction. In Arabic the arrow is
   already mirrored by .icon--directional, so the nudge keeps the mirror and moves the other way. */
[dir="ltr"] .dc-announcement:hover .dc-announcement-arrow { transform: translateX(2px); }
[dir="rtl"] .dc-announcement:hover .dc-announcement-arrow { transform: scaleX(-1) translateX(2px); }
/* Above 720 the reference fixes the panel at 195.25px and clips the last row's dividing rule; three rows of 64.75px
   inside this panel's 1px frame came to 196.25px, so that rule showed just above the bottom border (measured
   2026-10-16 on the rendered reference and on this page, ar and en). The last row drops the rule and the one pixel
   it took instead of fixing the panel's height: three rows then fill exactly 195.25px with every box where the
   reference paints it, and the empty and failed messages keep their own height.
   Dated 2026-10-16, later: moved out of a (min-width: 721px) query to the base level, the 720 rung overriding it;
   under zoom a 720.5px layout width matched neither query and the last row took back its 64.75px and its rule. */
/* Dated 2026-11-02 (15 #957): the last row's 63.75px is a floor too (was height: 63.75px), so a two-line last row
   grows and still draws no divider. */
.dc-announcement:last-of-type { min-height: 63.75px; border-bottom: 0; }
/* The reference's one row rung: from 720 down the row grows with its content above a 64px floor, and
   the last row loses its dividing rule. The last row restates its height because the base rule above names it. */
/* Dated 2026-11-02 (15 #957): the base rules above hold floors now, not heights, so the rung restates only the 64px
   floor of every row, the last included (was height: auto beside each). */
@media (max-width: 720px) {
    .dc-announcement { min-height: 64px; }
    .dc-announcement:last-of-type { min-height: 64px; border-bottom: 0; }
}

/* ---- the panel message (the empty and the failed state; drawn from the design canvas -- the
   reference has neither state). It takes the row's own geometry so the panel keeps its rhythm: the
   same padding and gap and a bubble the size of the row tile. The failed state paints its bubble in
   the brand alert colour. ---- */
.an-msg {
    display: flex;
    align-items: center;
    gap: 14.875px;
    min-height: 64px;
    padding: 12.75px 17px;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 17.875px;
}
.an-msg-bubble {
    display: grid;
    place-items: center;
    width: 38.25px;
    height: 38.25px;
    flex: 0 0 38.25px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-navy-600-a06);
    color: var(--kp-navy-600);
}
.an-msg-bubble .icon { width: 17px; height: 17px; }
.an-msg.is-failed .an-msg-bubble { background: var(--status-portal-alert-bg); color: var(--kp-red-600); }

/* ---- the announcement details dialog (15 #441, #444) -- measured 2026-10-16 on the rendered portal
   mockup v2 in the same twelve views. The host is written self-sufficient here, the same call the plan
   chooser's .plan-modal made: the reference's overlay wrapper is a generic utility this system lacks.
   Departures from the reference, each ruled:
   - z-index 1400, not the reference's 100: on phones the dialog is a bottom sheet, and it must sit
     above the bottom navigation (1300) and the plan sheet (1200) while staying strictly below the
     dialog layer (2000) that the portal's dialog-stacking law keeps on top of every overlay. The
     reference's own bottom navigation covers its sheet's "Got it" -- that defect is not ported.
   - The card is held to the viewport and its body scrolls (15 #444, spec item 5): the reference card
     grows without bound and clips.
   - The close button keeps the reference's 36px face but answers a 44x44 press through an extended hit
     area, so the header keeps the reference's height.
   - The title is 17px, 15px from 540 down, and the body text takes 3px inline padding there (the
     dated clause of spec item 5, 15 #444); the reference paints 19px everywhere.
   - The megaphone is the official gold and its tile the official gold at 12% (Core Rule 13 palette
     clause): the reference paints the pre-rebrand gold #d4a017.
   The kicker's tracking needs no Arabic rule: base.css already zeroes letter-spacing under RTL. ---- */
body.an-locked { overflow: hidden; }

.an-modal {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.an-modal.show { display: flex; }
.an-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: var(--portal-dialog-backdrop);
    backdrop-filter: blur(5px);
    animation: an-fade .18s ease-out;
}
.an-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(548px, 100%);
    max-height: 100%;
    overflow: hidden;
    border: var(--glass-card-border);
    border-radius: var(--kp-radius-xl);
    background: var(--kp-portal-modal-surface);
    color: var(--kp-slate-900);
    box-shadow: var(--shadow-portal-modal);
    animation: an-enter .22s var(--ease-smooth-out);
}
.an-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 69px;
    padding: 18px 21px;
    border-bottom: 1px solid var(--kp-an-rule);
}
.an-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--kp-an-kicker-ink);
}
.an-kicker .icon { width: 19px; height: 19px; color: var(--kp-stamp-gold-500); }
.an-kicker span { font-size: 11px; font-weight: 800; line-height: 17.875px; letter-spacing: .16em; }
.an-close {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-an-close-ink);
    cursor: pointer;
}
/* The 44x44 press area: four pixels beyond the face on every side, inside the header's padding. */
.an-close::before { content: ""; position: absolute; inset: -4px; }
.an-close:hover { background: var(--kp-an-close-hover-bg); color: var(--color-text-muted); }
.an-close:focus-visible { outline: 2px solid var(--color-portal-focus-ring); }
.an-close .icon { width: 14px; height: 14px; }
.an-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 21px 21px 17px;
}
.an-title-row { display: flex; align-items: center; gap: 15px; }
.an-title-row > div { min-width: 0; }
.an-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 11px;
    background: var(--kp-gold-500-a12);
    color: var(--kp-stamp-gold-500);
}
.an-icon .icon { width: 21px; height: 21px; }
.an-title-row small {
    display: block;
    margin-bottom: 4px;
    color: var(--kp-an-date-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 17.875px;
}
.an-title-row h2 {
    margin: 0;
    color: var(--kp-an-title-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
/* The typed line breaks are kept by the stylesheet, never by markup: the text arrives as encoded text. */
.an-text {
    margin: 17px 0 0;
    color: var(--kp-an-text-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.an-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-inline: 21px;
    padding: 13px 0 20px;
    border-top: 1px solid var(--kp-an-rule);
}
.an-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 9px 14px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--color-portal-action);
    color: var(--kp-portal-modal-surface);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.625;
    cursor: pointer;
    transition: transform .18s var(--ease-smooth-out), background-color .18s ease;
}
.an-ok:hover { background: var(--color-portal-action-hover); }
.an-ok:active { transform: scale(.98); }
.an-ok:focus-visible { outline: 2px solid var(--color-portal-focus-ring); outline-offset: 2px; }
.an-ok .icon { width: 13px; height: 13px; }

/* From 540 down the dialog is a bottom sheet: full width, top corners rounded, the reference's tighter
   paddings, and the footer clear of the device's home indicator. */
@media (max-width: 540px) {
    .an-modal { align-items: flex-end; padding: 0; }
    .an-card { width: 100%; border-radius: var(--kp-radius-xl) var(--kp-radius-xl) 0 0; }
    .an-header { padding: 16px 18px; }
    .an-body { padding: 19px 18px 15px; }
    .an-title-row h2 { font-size: 15px; }
    .an-text { padding-inline: 3px; }
    .an-footer { margin-inline: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* ---- the View All list (2026-10-17, 15 #437, #440). The reference has no list popup, so the list is the
   details dialog's own shell - the card, its header, its scrolling body, the scrim and the bottom sheet from 540
   down, all from the rules above - holding the panel's own rows. Its own values come from the measured reference
   controls and the recorded canvas numbers:
   - View All under the panel is the reference's announcements control (.dc-view-all-updates, measured
     2026-10-16 at 1440 to 390, ar and en): it grows with its label where the shipments control is fixed at
     44.5px, with 12px padding, .5rem above it, the 13px/800 label on a 21.125px line and a 14px arrow.
   - The header carries the panel heading's megaphone and the details title's own type, so the two popups read
     as one family.
   - Show more and Try again are that same control at the 44px the canvas records.
   - From 540 down the list has no footer, so its rows region ends the sheet and keeps the footer's clearance of
     the device's home indicator.
   - The skeleton rows are the row's own box with the house shimmer, its two lines at 80% and 55%.
   The list card and the details container are siblings switched with the hidden attribute; both declare a
   display of their own, so each restates hidden. The details container lends no box of its own: the details
   card inside it sits in the dialog host exactly as the dashboard's details do. ---- */
.dc-view-all--updates {
    height: auto;
    margin-block-start: .5rem;
    padding: 12px;
    line-height: 1.625;
}
.dc-view-all--updates .icon { width: 14px; height: 14px; flex-basis: 14px; }
.an-card--list[hidden] { display: none; }
.an-list-details { display: contents; }
.an-list-details[hidden] { display: none; }
.an-list-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.an-list-heading .icon { width: 19px; height: 19px; flex: 0 0 19px; color: var(--kp-stamp-gold-500); }
.an-list-heading h2 {
    margin: 0;
    color: var(--kp-an-title-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
.an-more-wrap { margin-block-start: .5rem; }
.an-more,
.an-retry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 44px;
    padding: 12px;
    border: 0;
    border-radius: var(--kp-radius-lg);
    background: var(--color-bg-surface);
    color: var(--kp-dc-view-all-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.625;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.an-more:focus-visible,
.an-retry:focus-visible { outline: 2px solid var(--color-portal-focus-ring); outline-offset: 2px; }
@media (hover: hover) {
    .an-more:not(:disabled):hover,
    .an-retry:not(:disabled):hover { background: var(--kp-portal-nav-hover-bg); }
}
/* Try again stands on its own line under the failed sentence; the bubble and the sentence keep the message's row. */
.an-msg--retry { flex-wrap: wrap; row-gap: .5rem; }
.an-msg--retry .an-msg-text { flex: 1 1 0%; min-width: 0; }
.an-msg--retry .an-retry { flex: 1 0 100%; }
.an-skeleton { display: grid; }
.an-skeleton-row {
    display: flex;
    align-items: center;
    gap: 14.875px;
    height: 64.75px;
    padding: 12.75px 17px;
    border-bottom: 1px solid var(--kp-dc-announcement-border);
}
.an-skeleton-tile {
    width: 38.25px;
    height: 38.25px;
    flex: 0 0 38.25px;
    border-radius: var(--kp-radius-md);
}
.an-skeleton-lines { display: grid; flex: 1 1 0%; gap: var(--kp-space-sm); min-width: 0; }
.an-skeleton-lines .skeleton-text { margin-block-end: 0; }
.an-skeleton-lines .skeleton-text + .skeleton-text { width: 55%; }
@media (max-width: 720px) {
    .an-skeleton-row { height: auto; min-height: 64px; }
}
@media (max-width: 540px) {
    .an-list-heading h2 { font-size: 15px; }
    .an-list-rows { padding-block-end: max(18px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .an-more,
    .an-retry { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    .an-scrim,
    .an-card { animation: none; }
    .dc-announcement,
    .dc-announcement-arrow,
    .an-ok { transition: none; }
}

@keyframes an-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes an-enter {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: none; }
}

/* ==== Portal design-polish pass (owner order 2026-07-19: "compare ... fix and enhance ... make it
   similar or a little better" -- lead-authored). ADDITIVE interaction feedback only: hover, press,
   and short transitions on elements whose rest-state geometry/colors/typography stay byte-identical
   to the measured mockup values above -- no parity measurement in this file changes. The mockup's
   dashboard is largely static (few hovers); these touches are the owner-approved "little better",
   NOT divergences -- future parity sweeps must treat them as deviation-with-ruling and this comment
   is the dated ruling record. Motion respects prefers-reduced-motion; lifts apply only on
   hover-capable pointers (never on the touch scroll-snap carousel). No new tokens, no hex. */
.dc-ticket-action-cta,
.dc-view-all {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease,
        box-shadow .18s ease, transform .15s ease, opacity .15s ease, filter .15s ease;
}
/* Restyle P3 (2026-08-08) -- the FOURTH round of the same port-the-mechanism-not-the-literal class this list has caused:
   .dc-ticket, .dc-ticket-action, .dc-status-tab, .dc-direction and .dc-shipment all LEFT it, because
   this block sits later in the file at equal specificity and was silently repainting every one of them
   at .15s ease. Each now declares the transition v2 actually measures, next to its own rest state:
   ticket .3s, tab/pill/row .2s, action .2s fill + .14s press.
   .rp-header-back LEFT IT TOO, in the parity fix wave of 2026-08-11 (P1.6a) and for the same mechanism:
   the reference DOES declare a transition for that control (`background-color .2s, box-shadow .2s,
   transform .2s`, plus `transform .2s` on the arrow), so once its hover became a real lift this list was
   again painting a measured value at the wrong clock. It now carries that transition beside its own rest
   state in the PORTAL SHELL block. Only the CTA and the View-All are left here -- both are ours, with no
   measured reference transition of their own (v2's .dc-view-all declares `transition: all`, which its
   own later layer kills).
   (Dated 2026-11-10, owner ruling 15 #1265: the .dc-shipment family named in this note left this sheet, unused; the note is kept as history.) */
.dc-ticket { transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s cubic-bezier(.4, 0, .2, 1); }
.dc-ticket-action { transition: background-color .2s cubic-bezier(.4, 0, .2, 1), transform .14s cubic-bezier(.16, 1, .3, 1); }
.dc-status-tab {
    transition: color .2s cubic-bezier(.4, 0, .2, 1), background-color .2s cubic-bezier(.4, 0, .2, 1),
        border-color .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1),
        transform .2s cubic-bezier(.16, 1, .3, 1);
}
.dc-direction {
    transition: color .2s cubic-bezier(.4, 0, .2, 1), background-color .2s cubic-bezier(.4, 0, .2, 1),
        border-color .2s cubic-bezier(.4, 0, .2, 1);
}
.dc-ship-panel {
    transition: border-color .2s cubic-bezier(.16, 1, .3, 1), background-color .2s cubic-bezier(.16, 1, .3, 1);
}
/* .rp-nav a and .rp-logout LEFT this list in restyle package P1 (2026-08-08). They sat here only for
   the generic .15s feedback, and this block is LATER in the file at the same specificity -- so it was
   quietly beating the shell family's own transition and painting both controls at .15s ease instead of
   the mockup's measured .18s rows / .2s sign-out (verify which rule actually wins,
   do not stop at declaring the value). They now carry their measured transitions in the PORTAL SHELL
   block and keep their reduced-motion arm below.
   .ref-primary and .ref-lang LEFT the same way in package P2 (2026-08-08), for the same mechanism and
   the same reason. The CTA declares v2's measured
   `transform .18s cubic-bezier(.16,1,.3,1), background-color .18s, box-shadow .18s`
   (app.bundle.css:24596) in the AUTH block, and the pill declares the .2s border/transform pair its
   owner-approved gold hover was ported with -- both were dead, overridden from here at .15s, so the
   button's hover fill and press easing and the pill's hover lift all ran on the wrong clock. Removing
   them from this list is what makes the declared values the rendered values; both keep their
   reduced-motion arm below. Side effect worth naming: the CTA's opacity swap between enabled and
   disabled (the 12-digit gate) is no longer animated, because v2's own transition list does not carry
   opacity -- the target snaps, so we snap.
   .user-back LEFT in the same fix round (P2, 2026-08-08) -- third instance of the same L8 class. It
   declares `background .2s ease, box-shadow .2s ease, transform .2s ease` on its own rule in the
   REGISTER HEADER section, which this block was silently replacing with the generic .15s; the register
   back button's hover lift now runs on the timing it was ported with. Its reduced-motion arm below is
   unchanged. */
/* Restyle P3 (2026-08-08) replaced four of these hovers with v2's own measured winners; the ticket lift
   and the View-All wash STAY as the 2026-07-19 owner-approved polish, because the reference simply has
   no hover on either (a shipped extra is styled to fit, never deleted for parity). */
@media (hover: hover) {
    /* The lift is the 2026-07-19 owner-approved polish; the DEEPENING is the reference's own and was
       missing (fix package D, 2026-08-12). Ours moved the card and left the shadow at its rest value,
       so it rose without casting -- measured identical rest and hover shadows on our side while the
       reference swaps its first layer on hover: rgba(15,23,42,.18) 0 12px 40px -12px -> .25 0 18px 38px
       -16px, keeping the white inset hairline. The rest value is --glass-shadow's two layers, so the
       hover restates both: a one-layer hover would drop the hairline the whole glass family relies on. */
    .dc-ticket:hover { transform: translateY(-2px); }
    /* :not(.dc-ticket-empty) is LOAD-BEARING, not tidiness. The empty ticket is deliberately dressed
       flat -- dashed border, canvas fill, `box-shadow: none`, no backdrop (the rule above at the
       .dc-ticket-empty line). That declaration is a bare class (0,1,0); a hover shadow written on
       `.dc-ticket:hover` is (0,2,0) and would beat it, so the flat variant would start casting a deep
       shadow under the pointer -- a change to a variant this package was never asked to touch, and one
       the reference cannot arbitrate because it ships no empty ticket at all (ours is a keep-shipped
       extra, owner ruling 2026-07-18). The LIFT stays on every ticket, exactly as before. */
    .dc-ticket:not(.dc-ticket-empty):hover {
        box-shadow: 0 18px 38px -16px rgb(15 23 42 / .25), inset 0 1px 0 rgb(255 255 255 / .85);
    }
    .dc-ticket-action:not(:disabled):hover { background: var(--portal-ship-navy-tint); }
    /* The VBX ticket runs the gold twin of the same wash. Both alphas are the reference's own measured
       pair (.10 rest -> .18 hover, P3 fix round 2026-08-08), not a doubling of ours. */
    .dc-ticket-vbx .dc-ticket-action:not(:disabled):hover { background: rgb(203 160 82 / .18); }
    .dc-status-tab:not(.active):hover { background: rgb(15 23 42 / .05); color: var(--kp-slate-900); transform: translateY(-1px); }
    /* v2's resting direction pill is WHITE (not the navy strip the v1 layer assumed), so its hover moves
       the border and the ink and leaves the fill alone. */
    /* :not(:disabled) is the reference's own guard, restored 2026-08-11 (P1.6d) together with the
       disabled dress below: without both, the first zero-count arm that disables a pill would still
       light it up under the pointer with nothing saying it is locked. */
    .dc-direction:not(.active):not(:disabled):hover { border-color: rgb(15 23 42 / .2); color: var(--kp-slate-900); }
    .dc-view-all:hover { background: var(--kp-portal-nav-hover-bg); }
    /* The back button's hover, ported from the rendered reference 2026-08-11 (P1.6a): it fills WHITE,
       lifts 2.125px and takes a navy glow, where ours painted the same flat #f4f7ff wash as a nav row.
       The glow is the official navy at the reference's own .12 alpha.
       THE WHITE FILL IS NO LONGER A NO-OP (fix package E, 2026-08-12). P1.6a recorded it as one because
       our rest background was opaque white and left the rest-state difference "out of this wave's
       scope" -- so the ported hover had nothing to change and could not land where the reference's
       lands. E9 re-measured all six differing rest properties and adopted them (see the .rp-header-back
       rule's own comment); the rest is now the reference's `rgba(255,255,255,.6)` glass, so this line
       does exactly what it does there -- the button solidifies as the pointer arrives.
       The arrow's own transition lives with its rest state in the PORTAL SHELL block; the slide itself is
       the pair right below, inside this gate.
       ORDER MATTERS AGAINST THE PRESS BASE LAYER: this rule weighs (0,2,0) and site.css's press layer
       weighs (0,1,1), so a hovered button holds the LIFT while pressed rather than swapping to the
       scale -- which is what the rendered reference does too (measured 2026-08-12: its hovered back
       button holds matrix(1,0,0,1,0,-2.125) with the press duration applied). */
    .rp-header-back:hover {
        background: var(--kp-white);
        box-shadow: 0 4px 16px rgb(0 51 160 / .12);
        transform: translateY(-2.125px);
    }
    /* Toward the reading start in each direction -- the reference writes the same pair (its own
       `.rp-header-back:hover .rp-back-icon { transform: translateX(-2.125px) }` plus a `[dir=rtl]` twin
       at +2.125px). A physical axis is the honest port: there is no logical `translate`, which is why
       the reference states it as a direction pair too. Inside this gate with the lift it belongs to, so
       a coarse-pointer browser gets neither half rather than an arrow moving on a still button. */
    .rp-header-back:hover .icon { translate: -2.125px; }
    [dir="rtl"] .rp-header-back:hover .icon { translate: 2.125px; }
}
/* The reference's disabled pill (P1.6d). Nothing disables a direction pill today -- Views/Home/Index
   renders all three enabled -- so this is the posture waiting for the first arm that does, and it is
   why the hover above now excludes :disabled.
   Dated 2026-11-14 (ruling 15 #198c): the first arm that disables a pill turned out to be the in-flight
   lock, not a can't-press state -- the Shipments board's pressed direction button takes `.btn-loading`
   and `disabled` for its own read, and this dress faded it to 45% while the pressed status tab beside it,
   under the same lock, keeps its full paint. A pill under the lock is working, not refused, so the lock
   is excluded here and keeps its own ring and cursor; a genuinely disabled pill keeps this dress. */
.dc-direction:disabled:not(.btn-loading) { cursor: not-allowed; opacity: .45; }
/* Both keep their own value: the reference gives these two a DEEPER press than its base .98
   (`body[data-static-page="dashboard2"] .dc-ticket-action:active, ... .dc-ticket-manage:active
   { transform: scale(.95) }`, read from its live CSSOM 2026-08-12 and confirmed by holding the
   pointer down -- both hold matrix(0.95)). At (0,3,0)/(0,2,0) they outrank the portal's press base
   layer, which is the mechanism that lets the base rule be general. What the base layer ADDS here is
   the .14s press timing the reference pairs with every press; .dc-ticket-manage measured 0s before
   it, because it is an <a> for us and declares no rest transition of its own. */
.dc-ticket-action:not(:disabled):active,
.dc-ticket-manage:active { transform: scale(.95); }
/* No reference counterpart -- this CTA is ours. Kept at its own .97 rather than folded into the base. */
.dc-ticket-action-cta:active { transform: scale(.97); }
/* THE THREE-SELECTOR .985 PRESS THAT USED TO SIT HERE IS RETIRED (fix package E, 2026-08-12). It was
   the signed-in half of the enumeration the press base layer replaces, and its VALUE was wrong as
   well as its shape: the rendered reference holds matrix(0.98) on .dc-status-tab, .dc-direction and
   .dc-view-all alike -- .98, not .985 -- with a .14s press duration where ours ran .2s (tabs and
   chips) and .15s (view-all). All three now take the base layer's .98/.14s, and .dc-view-all is in
   its tag-swap arm because ours is an <a> where the reference's is a <button>. */
/* THE PORTAL'S REDUCED-MOTION CONTRACT, corrected 2026-08-11 (owner report "mousing over the smart
   assistant is not making it bigger"; parity audit D3-01/ICON-01). An arm stops the MOVEMENT and never
   deletes the state the movement was travelling towards. This block used to do the second thing: it
   listed every hover and press here again with `transform: none`, so a viewer whose OS animations are
   off (the Windows "adjust for best performance" default) got a dashboard, an auth surface and a
   launcher that did not react to the pointer AT ALL -- not a calmer page, a dead one.
   The reference does it the first way -- but NOT by "shortening durations only", which is what this
   paragraph claimed until 2026-08-12 and is false. MEASURED over the served bundle that day, by
   brace-matching every `@media (prefers-reduced-motion: reduce)` block and attributing each to its
   source through the bundle's own banners: 28 package-authored blocks holding 35 rules, and they PARTITION
   (10 + 12 + 8 + 5 = 35) into zeroing a duration (10), declaring `transition: none` (12, two of those
   alongside `animation: none`), declaring `animation: none` alone (8), and pinning or removing an end
   state outright (5 -- the splash wordmark held at `opacity: 1`, the radar pulse `display: none`).
   The line NONE of them crosses is the one that matters here: across all 35 -- and across the 33
   vendored Bootstrap rules beside them -- ZERO carry a `:hover` or `:active` selector and ZERO declare
   `transform`, `translate`, `scale` or `rotate`. Duration-versus-property was never the dividing line;
   the END STATE is, and that is the line our four arms crossed. The launcher's own arm is one of the ten
   duration-zeros (app.bundle.css:25909-25913 zeroes that one button's transition-duration and nothing
   else), so it still jumps to scale(1.3); it just arrives instantly.
   So: kill the timing, keep the end state. The three sibling arms (.svc-*, .payment-history-actions,
   .rp-assistant-*) were corrected in the same change, and
   ReducedMotionEndStateGovernanceTests pins the rule for every future arm in the FOUR app-serving
   stylesheets, counted 2026-08-12: base.css, this file, and each app's own site.css. (It read "this
   file plus BOTH apps' site.css" until that date. The admin's joined 2026-08-11 in parity fix wave
   P3.7; base.css joined in the branch-end fix round as item D4/N6, where its absence was a live hole
   rather than a wording slip -- base.css carries a real reduced-motion arm the sweep could not see.)
   The RTL sign-out counter-flip that used to be restated here is gone with the same
   correction: with the press transform no longer zeroed, the base rule's own
   `[dir="rtl"] .rp-aside .rp-logout:active { transform: scaleX(-1) scale(.98) }` is what paints, which
   keeps BOTH the mirror and the press the old restatement was dropping.
   THIS ARM IS NO LONGER THE PORTAL'S WHOLE COVER, and reading it as though it were is what let B7 ship
   (2026-08-12). It is an ENUMERATION — 21 selector parts — and the portal's press base layer reaches
   every non-disabled <button> plus twelve more selectors, so twenty controls named by nothing here
   animated their press under reduced motion. The portal-wide cover is now ONE universal duration-zero
   in `KwtPost.Portal/wwwroot/css/site.css`, beside the press layer it protects; that block carries the
   measurement and the reference citations. This list STAYS, and not merely for its records: it zeroes
   transition-PROPERTY, which the universal rule deliberately does not touch.
   One correction to the paragraph above while its subject is open: the reference's global arm is not
   the single `body[data-app-page] *` rule cited there. The package ALSO ships three genuinely unscoped
   `*, *::before, *::after` duration-zeros (app.bundle.css:18959-18961, :25325-25332, :25812), which is
   why an enumeration was never the shape to port. The cited rule is real; it was not the whole story. */
@media (prefers-reduced-motion: reduce) {
    .dc-ticket, .dc-ticket-action, .dc-ticket-action-cta, .dc-status-tab, .dc-direction,
    .dc-view-all, .rp-nav a, .rp-logout, .rp-header-back,
    /* The coming-soon rail rows carry the links' row transition since they became buttons (2026-10-17, 15 #548). */
    .rp-nav > button.rp-soon-row,
    /* The back arrow's own slide runs on the `translate` property, so its timing is named separately
       from the button's (parity fix wave 2026-08-11, P1.6a). */
    .rp-header-back .icon, .ref-primary,
    .ref-lang, .user-back,
    /* P3 (2026-08-08): the plan pill, its arrow disc and the shipments panel gained measured
       transitions in the restyle, so they join the contract in the same change. */
    .dc-plan, .dc-plan-arrow, .dc-ship-panel,
    /* P1 (2026-08-08): the topbar control pill gained a colour+transform transition, so it joins the
       reduced-motion contract in the same change that introduced it.
       THE TWO SWAPPED MEMBERS JOIN IT NOW (fix round item 7 / FE-2, 2026-08-12). The pill's box rule
       hands its transition to four selectors, and this arm named only the two that are direct <a>/<button>
       children -- so the coming-soon bell (a <button> inside .rp-soon) and the user chip (a <span>) carried
       a live transition declaration that no reduced-motion arm could reach: the same tag-swap orphaning
       fixed at the phone hide rule above, one contract further on. MEASURED, and stated as the bound it is:
       nothing changes on screen today, because neither of those two has a hover or a press rule to
       transition TO -- the box rule's hover/press siblings deliberately skip them, and the portal's base
       press layer excludes disabled controls. What this closes is the day one of them goes live. */
    .rp-h-actions > a, .rp-h-actions > button,
    .rp-h-actions > .rp-soon > button, .rp-h-actions > span.rp-user { transition: none; }
}

/* ============================================================
   Branch schedule editor + public-holidays (branch-scheduling Task 10)
   — ported from the mockup's embedded <style> block in
   docs/reference/postOffice_Admin_html/branches.html (lines 16-81, the
   authoritative rendered-page source per the package authority order).
   Every mockup :root variable is re-expressed in OUR token by VALUE, not
   by same-name token (L8): mockup --radius-md=12px -> --kp-radius-xl (NOT
   our --kp-radius-md=8px), mockup --radius-xs=6px -> --kp-radius-sm (the
   documented radius-name trap). Mockup #fff/#cbd5e1 map to --kp-white/
   --kp-slate-300; --danger-light(#fee2e2) has no exact token, so the house
   light-danger fill --status-alert-bg stands in (visual-equivalent, Core
   Rule 13 house-law). The source block carries NO @media tiers and NO
   !important (L10/L8 satisfied by absence, verified not assumed). Logical
   properties throughout; the toggle knob's translateX is physical and
   needs the explicit [dir=rtl] flip the mockup ships (a transform does not
   follow inset-inline-start). New input cells (Slots/Period/Capacity) and
   the holiday add-row inputs reuse .form-control (house law); this block is
   the surrounding structure only.
   ============================================================ */

/* --- one shift card (block) --- */
.sched-block {
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);        /* mockup --radius-md = 12px (L8 value-map, not our radius-md) */
    padding: 14px;
    background: var(--kp-white);
}
.sched-head { display: flex; align-items: center; gap: 8px; margin-block-end: 4px; }
.sched-head .icon { width: 18px; height: 18px; color: var(--kp-navy-600); }
.sched-head .sched-title { font-weight: 700; color: var(--kp-slate-900); font-size: .95rem; }
.sched-hint { font-size: .78rem; color: var(--kp-slate-550); margin-block-end: 10px; }

/* --- one day row --- */
/* Owner order 2026-07-24: day rows are <tr> in .sched-edit-table now, so row separation is the table's td
   bottom borders -- the div-era dashed border-top + padding on .sched-day are retired. The .sched-day class
   stays as the JS field-anchor hook. .sched-day-head remains: it still styles the shift CARD header. */
.sched-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sched-day-name { font-weight: 600; color: var(--kp-slate-900); font-size: .9rem; min-width: 70px; }
.sched-day-name .sched-weekend-tag {
    display: inline-block;
    margin-inline-start: 6px;
    font-size: .68rem;
    font-weight: 600;
    color: var(--kp-gold-500);
    background: var(--kp-gold-500-a12);
    border-radius: var(--kp-radius-full);
    padding: 1px 7px;
}

/* --- open/closed toggle (hidden checkbox + faux track/knob) --- */
.sched-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; user-select: none; }
.sched-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sched-switch .track {
    width: 38px;
    height: 22px;
    border-radius: var(--kp-radius-full);      /* mockup 999px */
    background: var(--kp-slate-300);           /* mockup #cbd5e1 off-track */
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.sched-switch .track::after {
    content: '';
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;                    /* logical — the knob rests at the start edge */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--kp-white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);   /* rgba allowed in components.css; not a token color */
    transition: transform .2s;
}
.sched-switch input:checked + .track { background: var(--kp-emerald-700); }
/* Knob slide is a physical transform, so it does NOT follow inset-inline-start — carry the mockup's
   explicit RTL flip. LTR (base) slides +16px; under a dir=rtl ancestor it slides -16px. */
.sched-switch input:checked + .track::after { transform: translateX(16px); }
[dir="rtl"] .sched-switch input:checked + .track::after { transform: translateX(-16px); }
.sched-switch .state-lbl { font-size: .78rem; font-weight: 600; }
.sched-switch input:checked ~ .state-lbl { color: var(--kp-emerald-700); }
.sched-switch input:not(:checked) ~ .state-lbl { color: var(--kp-slate-550); }

/* --- day rows under a shift (owner order 2026-07-24 — one table, no per-cell labels) --- */
/* (the .sched-closed-note that lived here was removed 2026-08-01 — a closed row's spanned cell is now
   deliberately empty; the off-tag + switch state label already carry the closed state) */
/* One table per shift: a caption header row then 7 day rows, styled like the mockup's read-only
   .sched-view-table (branches.html: border-collapse, 7-8px td padding, 1px bottom borders, .72rem
   slate-550/600 captions — same look as the retired .haf label). .sched-edit-wrap is an overflow-x safety
   valve: the seven columns fit the drawer at desktop, so it only scrolls on a very narrow window (measured
   2026-10-21 in both languages: it scrolls at 390px, not at 768 or 1440px). There its inline scroll padding
   keeps a keyboard landing's ring whole. A forward Tab brings a field's box in flush with the wrapper's
   edge and the ring reaches 4px past the box: without the padding 3.6 to 4.4px of ring were lost at the
   inline end. A backward Tab enters a time field on its own picker part, which the browser scrolls in
   alone: in Arabic the field's box then reaches about 15px past that part, so the padding is 24px rather
   than the family's 8px; in English the part sits at the field's inline end and the rest of the field
   stood up to 79.6px past the wrapper's start edge, which no padding covers -- there the Admin drawer
   landing listener (the Admin site.js) brings the field in whole. */
.sched-edit-wrap { overflow-x: auto; scroll-padding-inline: var(--kp-space-lg); margin-block-start: 8px; }
.sched-edit-table { width: 100%; border-collapse: collapse; }
.sched-edit-table th,
.sched-edit-table td {
    padding: 7px 8px;
    border-block-end: 1px solid var(--color-border);
    text-align: start;
    vertical-align: top;                       /* inputs align at the top; an error msg grows the row down */
}
.sched-edit-table thead th {
    font-size: .8rem;                          /* the house form-label size (owner polish 2026-08-01 —
                                                  the old .72rem was smaller than every other form's
                                                  12.8px labels, widening the label-vs-input gap) */
    font-weight: 600;
    color: var(--kp-slate-550);
    /* NO white-space:nowrap: long AR captions (الطاقة الاستيعابية) must wrap to two lines so they keep the
       spec column widths instead of forcing the table past the drawer (lead live-measure 2026-07-24). */
}
.sched-edit-table tbody tr:last-child td { border-block-end: none; }
/* Column widths keep the seven columns inside the drawer at desktop (day 130, time 90, slots/capacity 70,
   period 96, copy 40). Applied on the always-present header cells; the tbody columns follow. */
.sched-edit-table thead th:nth-child(1) { width: 110px; }        /* day (AR day-cell content needs 102px) */
.sched-edit-table thead th:nth-child(2),
.sched-edit-table thead th:nth-child(3) { width: 90px; }         /* from / to */
.sched-edit-table thead th:nth-child(4),
.sched-edit-table thead th:nth-child(6) { width: 70px; }         /* slots / capacity */
.sched-edit-table thead th:nth-child(5) { width: 96px; }         /* period */
.sched-edit-table thead th:nth-child(7) { width: 40px; }         /* copy */
/* First cell: day name stacked over the open/closed switch. */
.sched-edit-table .sched-day-cell .sched-day-name { display: block; margin-block-end: 6px; }
.sched-edit-table .sched-copy-cell { text-align: center; }
/* Closed day: one cell spanning the input columns; center its "Closed" note against the taller day cell. */
.sched-edit-table .sched-closed-cell { vertical-align: middle; }
/* Numeric/period controls reuse .form-control; the time input needs its own visual (carried over from the
   retired .sched-shift input[type=time]). */
.sched-edit-table .sched-cell input,
.sched-edit-table .sched-cell select { width: 100%; }
.sched-edit-table input[type="time"] {
    width: 100%;
    min-width: 90px;                           /* B1 floor: a 5-cell row otherwise collapsed time to ~18px */
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);        /* mockup --radius-xs = 6px (L8 value-map) */
    padding: 6px 8px;
    font-size: .85rem;
    color: var(--kp-slate-900);
    background: var(--kp-navy-050);             /* mockup --primary-lighter */
}
/* Owner polish order 2026-08-01: the resting red fill read as a "rejected" STATUS badge (the mockup
   uses circle-X/red fills only as status markers), not a clickable control — and the button had no
   hover at all. Now a neutral icon-button at rest, a matched pair with .sched-copy-btn (32px box,
   radius-md like every house button), and the danger look appears on HOVER only. */
.sched-shift-del {
    border: 1px solid var(--color-border);
    background: var(--kp-white);
    color: var(--kp-slate-600);
    width: 32px;
    height: 32px;
    border-radius: var(--kp-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;                            /* <button> ignores ambient line-height (portal lesson 8) */
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sched-shift-del:hover { border-color: var(--kp-red-600); color: var(--kp-red-600); background: var(--status-alert-bg); }
.sched-shift-del:disabled { opacity: .35; cursor: not-allowed; }
.sched-shift-del .icon { width: 16px; height: 16px; }
/* Owner polish order 2026-08-01: was a home-made hybrid (tinted fill + dashed border, 26px/12.8px —
   the smallest control on the screen, no hover). Now the house small-button shape (the .btn-sm
   metrics its "Public Holidays" neighbour wears) with the navy action tint kept. */
.sched-add-shift {
    align-self: flex-start;
    border: 1px solid var(--kp-navy-100);
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.45;
    border-radius: var(--kp-radius-md);
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.sched-add-shift:hover { border-color: var(--kp-navy-500); background: var(--kp-navy-100); }
.sched-add-shift .icon { width: 14px; height: 14px; }

/* --- editor toolbar (holds the public-holidays action in our layout; mockup --sched-toolbar) --- */
.sched-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 10px; }

/* --- per-row "copy to working days" button (mockup branches.html; ported with the Task-11 copy-day-row
   handler). B1: icon-only, sized like the sibling .sched-shift-del (32x32 since the 2026-08-01
   polish; the label moved to title +
   aria-label) so five labeled cells + this button fit one row. Mockup vars mapped by VALUE (L8):
   --card-border #e2e8f0 -> --color-border, --text-secondary #475569 -> --kp-slate-600,
   --radius-xs 6px -> --kp-radius-sm, --primary-soft #1a4db8 -> --kp-navy-500, --primary #0033a0
   -> --kp-navy-600. Icon is the <svg class="icon"> sprite (house pattern), not the mockup's <i>. */
.sched-copy-btn {
    border: 1px solid var(--color-border);
    background: var(--kp-white);
    color: var(--kp-slate-600);
    width: 32px;                               /* matched pair with .sched-shift-del (polish 2026-08-01) */
    height: 32px;
    border-radius: var(--kp-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;                            /* <button> — explicit (portal lesson 8) */
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sched-copy-btn .icon { width: 16px; height: 16px; }
.sched-copy-btn:hover { border-color: var(--kp-navy-500); color: var(--kp-navy-600); background: var(--kp-navy-050); }

/* --- public-holidays list + add row (rendered inside _PublicHolidaysModal) --- */
.holidays-list { display: flex; flex-direction: column; gap: 6px; margin-block: 8px 12px; }
.holiday-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-navy-050);
}
.holiday-item .hol-date { font-family: var(--font-mono); font-size: .78rem; color: var(--kp-navy-600); font-weight: 700; white-space: nowrap; }
.holiday-item .hol-name { flex: 1; font-size: .85rem; color: var(--kp-slate-900); min-width: 0; }
.holiday-item .hol-del { border: none; background: transparent; color: var(--kp-red-600); cursor: pointer; padding: 2px; line-height: 1; flex-shrink: 0; }
.holiday-item .hol-del .icon { width: 16px; height: 16px; }
.holidays-empty { font-size: .8rem; color: var(--kp-slate-550); padding: 8px 0; }
/* TOP-aligned, not bottom-aligned (the mockup's own value, branches.html:73). A cell here stacks a
   caption over a control, and the inline validation engine appends its message INSIDE that cell, so
   bottom-aligning tied every sibling to a row edge that MOVES the moment one field paints an error:
   measured on a closure row the instant the date field flagged, the two reason controls fell 27.2px
   and the delete button 33.2px below the date control (= the message's 18.2px line + its 6px
   margin + the 3px cell gap), leaving the row on two staggered lines with the button on neither
   (owner report 2026-07-25). Top-aligning pins every control to ONE line -- each cell is exactly one
   caption line + the cell gap tall above its control -- so a message can only grow the row DOWNWARD
   and nothing beside it can move. */
.holiday-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.holiday-add-row .haf { display: flex; flex-direction: column; gap: 3px; }
/* line-height is declared, not inherited, because the delete-button offset below is calculated from
   it -- an inherited body value could drift and silently move the button off the control line. 1.6
   is the admin body line-height this caption already resolved to, so the caption itself is unchanged. */
.holiday-add-row .haf label { font-size: .8rem; line-height: 1.6; color: var(--kp-slate-550); font-weight: 600; } /* house label size (polish 2026-08-01) */
.holiday-add-row .haf-date { flex: 0 0 140px; }
.holiday-add-row .haf-name { flex: 1 1 160px; }
/* The closure row's delete button is the one item with no caption above it, so it clears the caption
   line and the cell gap itself, then centres its 32px box against the 42px .form-control it sits
   beside. Every term is a real value from this file: the caption above (.8rem since the 2026-08-01
   polish), the .haf gap above, the .form-control height (line 859) and the button's own size
   (.sched-shift-del, 32px since the same polish). */
.holiday-add-row > .sched-shift-del { margin-block-start: calc(.8rem * 1.6 + 3px + (42px - 32px) / 2); }
.holiday-add-btn {
    border: none;
    background: var(--kp-navy-600);
    color: var(--kp-white);
    font-size: .82rem;
    font-weight: 600;
    border-radius: var(--kp-radius-sm);
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;                            /* <button> — explicit (portal lesson 8) */
    cursor: pointer;
}
.holiday-add-btn .icon { width: 15px; height: 15px; }

/* ============================================================
   Live-grid realtime family — the deferred-insertion pill and the two row states
   (Phase B2 Task 10, 2026-07-28; grid-integrity rule SIX, owner rounds 13-14)
   ============================================================
   Rule six in one sentence: a live grid never moves under the admin's hands. Everything that would
   insert, remove or reorder rows waits behind .grid-pill until he asks for it; the only thing that
   paints by itself is an in-place row update, which moves nothing.

   .grid-pill        the quiet merge invitation above a live grid (never a toast, never focus-stealing)
   .row-glow         a row that just repainted from a live update — a short navy wash, then gone
   .row-stale        a row whose record no longer answers (RowPartial 404): grayed IN PLACE and inert
                     until the next merge removes it, because yanking a row out reflows the list under
                     the reader — the exact "where was I?" rule six exists to prevent
   .row-highlight    the record the admin was last reading, tinted after a merge re-sorted the list
                     so he can find his place again                                                  */
.grid-pill-slot { display: flex; justify-content: center; }

.grid-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block: 10px;
    padding: 7px 16px;
    border: none;
    border-radius: var(--kp-radius-full);
    background: var(--color-action-primary);
    color: var(--kp-white);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;                            /* <button> — explicit (portal lesson 8) */
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.grid-pill:hover { background: var(--kp-navy-700); }
.grid-pill .icon { width: 15px; height: 15px; }

/* Both row states paint on the CELLS, not the <tr>: .table-custom--sticky-edges gives the frozen first
   and last cells their own opaque background, so a background set on the row alone would be covered at
   exactly the two edges. The selectors also carry .table-custom so they outrank the zebra/hover pair
   (same specificity, later in the file) instead of losing to it on every even row. */
.table-custom tbody tr.row-glow td { animation: kp-row-glow 1.8s ease-out; }

@keyframes kp-row-glow {
    from { background-color: var(--color-table-row-focus); }
    to { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .table-custom tbody tr.row-glow td {
        animation: none;
        background-color: var(--color-table-row-focus);
    }
}

.table-custom tbody tr.row-stale td {
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
}

.table-custom tbody tr.row-stale button,
.table-custom tbody tr.row-stale a {
    pointer-events: none;
    opacity: .55;
}

/* Three classes on purpose: the row still carries .row-clickable, whose cursor rule lives in the admin
   site.css (a later stylesheet), so an equal-specificity rule here would lose and a dead row would keep
   advertising itself as clickable. */
.table-custom tbody tr.row-clickable.row-stale { cursor: default; }

.table-custom tbody tr.row-highlight td { background: var(--color-table-row-focus); }

/* ============================================================
   View banner — "you are looking at a different population" (Phase B3 Task 6, 2026-07-30)
   ============================================================
   The demo's H14 block, re-expressed on shipped tokens: a quiet neutral strip that names the population
   currently on screen and carries the one control that leaves it. Neutral on purpose — it reports a state
   the admin chose, so it must not read as a warning (.note--warn) or as an error.

   Born on the Subscribers page's deleted view; the class is deliberately generic because the next page
   that swaps a population owes its reader the same sentence in the same place.

   Logical properties throughout (RTL is the default direction here), and the trailing control is pushed to
   the far edge with margin-inline-start:auto so it lands under the reader's exit hand in both directions. */
.view-banner {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
    padding: 11px 15px;
    margin-block-end: var(--kp-space-md);
    border: 1px solid var(--badge-neutral-border);
    border-radius: var(--kp-radius-lg);
    background: var(--badge-neutral-bg);
    color: var(--badge-neutral-text);
    font-size: var(--text-small);
    font-weight: 600;
}

.view-banner .icon {
    inline-size: 15px;
    block-size: 15px;
}

.view-banner button { margin-inline-start: auto; }

/* ============================================================
   SUBSCRIPTION PURCHASE — service cards, checkout summary, receipt card
   (subscription purchase slice, Phase 2 package P1, 2026-08-01)

   DESIGN TARGET RE-POINTED 2026-08-08 (restyle package P4). This family
   was ported from portal mockup v1 (postOffice_PublicUser_html
   css/register-services.css); the adopted target is now portal mockup v2
   (docs/reference/subscribersPortal-KuwaitMail, AGENTS.md Core Rule 13
   portal clause, 15 #148). Re-pointed rather than merely re-worded
   because the v1 folder is deleted at the end of this wave (Phase E) and
   a comment must not outlive the file it names.

   WHAT THE TWO PACKAGES SHIP, diffed at P4 dispatch. The standalone
   css/register-services.css is CONTENT-IDENTICAL between v1 and v2 —
   169 lines each, zero diff once line endings are normalised (v1 is CRLF
   and v2 LF, which is the whole 169-byte size difference; parity lesson
   6's normalise-before-declaring-difference rule, applied in reverse).
   What DID change is the delivery: v2 serves ONE bundle, and its builder
   strips this stylesheet's route-local :root and rewrites every --svc-*
   reference to the package's canonical --color-* set. Diffing the
   bundle's copy (app.bundle.css "source: css/register-services.css",
   the only layer in the served cascade touching a .svc-* selector)
   against the standalone shows that rewrite and nothing else.

   GEOMETRY/TYPOGRAPHY therefore needed nothing at P4 — the port was
   already exact. COLOUR did, in two ways. First, nine of the family's
   own literals — three gradients and five alpha washes plus one flat
   colour — carry PRE-REBRAND values that the D1 palette clause forbids
   copying; they are re-expressed on official brand values at the
   reference's own alphas and gradient shapes (the three gradients in
   tokens.css, the two icon glows / two CTA rings / the success pair
   inline below, each with its own dated note). Second, ONE of the ten
   rewritten token names changed VALUE in the bundle: nine map straight
   across (--svc-primary #0033a0 = --color-primary = --kp-postal-navy-600,
   --svc-gold #cba052 = --kp-stamp-gold-500, --svc-ink #0f172a =
   --kp-slate-900, --svc-muted #475569 = --kp-slate-600, --svc-line
   #e2e8f0 = --kp-slate-200, and so on), while --svc-success #059669
   became --color-success #009a44 — see the receipt-badge note below.
   The two glass fills stay as measured (neutral whites, not brand hues).

   SCOPE — the COMPONENTS only. The mockup page is a standalone
   registration-wizard screen and carries its own chrome (.svc-page,
   .svc-aurora, .svc-header/.svc-brand/.svc-back, .svc-route-row,
   .svc-language, .svc-floating, .svc-container). Our subscribe and
   checkout pages live INSIDE the shipped portal shell (.rp-shell /
   .rp-content / .rp-wrap / .rp-title), so porting that chrome would
   be dead CSS fighting the shell. Its @media (min-width:1024px) tier
   touches ONLY .svc-route-row/.svc-route-title, i.e. nothing in
   scope, and is therefore absent by construction rather than by
   omission — the <=640px tier below carries every in-scope selector
   the mockup shrinks there (port every declared tier, not the base rule alone).

   House conversions: logical properties only (the mockup's own
   [dir=rtl] twins disappear into them); colors via tokens; the
   mockup's `html[dir=rtl] *{letter-spacing:0!important}` is not
   re-declared because base.css:127 already ships that kill; the
   mockup's font stacks become --font-display/--font-body, which is
   the same culture-switch mechanism its own [dir=rtl] font-family
   rules implement by hand.
   ============================================================ */

/* ---- the panel column + step indicator ----
   .svc-stepper history: ported in P1, removed in P2 (its pips were hard-coded to the mockup's own
   "step 2" paint, so it showed the same state on all three pages), RESTORED HONESTLY on the owner's
   order 2026-08-02: same mockup pip values, but keyed by a per-step STATE the page sets, so the wide
   gradient pip actually moves through choose -> checkout -> receipt. The base pip is the mockup's
   PASSED style, .active its wide gradient, .upcoming its faint short pip -- the checkout page's
   done/active/upcoming trio therefore byte-matches the mockup's own painted step-2 state
   (register-services.css). */
/* The panel opens its page: the shell's wrap padding is the dashboard's alone since 2026-09-09, and the four
   pages built on this panel (choose, checkout, receipt, declined) put nothing above it, so the shipped opening --
   25.5px, 17px on phones -- is declared here (portal group 1 follow-up, 2026-09-09; a shipped surface the reference
   does not cover, 15 #148 D7). Dated clause 2026-10-12 (15 #433): the choose page's panel also carries
   `.svc-panel--full`, below, and spans the content width; the other three keep this 642px column.
   Dated 2026-11-08 (15 #1222): all four carry the modifier now, so this 642px column has no page left on it. */
.svc-panel { width: min(642px, 100%); margin-inline: auto; margin-block-start: 25.5px; }
@media (max-width: 720px) {
    .svc-panel { margin-block-start: 17px; }
}
/* The Subscriptions choose page's panel takes the full content width of the other signed-in pages
   (15 #433, a dated departure from the mockup's centred 642px under Core Rule 13). Checkout, Receipt
   and Failed keep the 642px panel above: the ruling named the Subscriptions page only.
   Dated 2026-11-08 (15 #1222): Checkout, Receipt and Failed take it too. */
.svc-panel--full { width: 100%; }
.svc-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    margin-block-end: 29px;
}
.svc-stepper i {
    display: block;
    width: 20px;
    height: 6px;
    border-radius: var(--kp-radius-full);
    background: rgba(0, 51, 160, .3);
}
.svc-stepper i.active {
    width: 32px;
    background: linear-gradient(90deg, var(--kp-postal-navy-600), var(--kp-stamp-gold-500));
}
.svc-stepper i.upcoming { width: 16px; background: rgba(15, 23, 42, .1); }

/* ---- intro heading ---- */
.svc-intro { margin-block-end: 36px; text-align: center; }
.svc-intro h1 {
    margin: 0 0 9px;
    color: var(--color-portal-action);
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.04em;
}
.svc-intro p { margin: 0; color: var(--color-text-muted); font-size: 16px; }

/* ---- the two service cards ---- */
.svc-options { display: grid; gap: 12px; margin-block-end: 25px; }
.svc-option-wrap { display: grid; }
.svc-option {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--kp-space-md);
    width: 100%;
    min-height: 104px;
    padding: 20px 22px;
    border: 1px solid rgb(255 255 255 / .72);
    border-radius: 14px;
    background: var(--kp-svc-option-bg);
    backdrop-filter: blur(22px) saturate(125%);
    color: var(--color-text);
    /* The reference's card is a <button> that inherits the root's 16px / 1.5 through its reboot; a <button> here
       keeps the UA's 13.33px and `normal` line height, which laid the name, price and term lines 4-6px shorter
       inside the same 104px card (portal group 2 round 1, 2026-09-09; the CTA below pins its line box for the
       same reason). */
    font-size: inherit;
    line-height: inherit;
    text-align: start;
    transition: transform .2s var(--ease-smooth-out), border-color .2s, box-shadow .2s, background .2s;
}
/* FL-03 (fix round 2026-08-24): the hover lift is an INTERACTIVE affordance, so it is scoped to the
   button cards only -- the physical link entry on the choose page reuses .svc-option as a plain
   presentational <div> and must not scale or restyle on hover. The scoping sits inside :where() so the
   rule keeps the reference's own weight (one class, one pseudo-class): the selected card's navy edge and
   open bottom seam below, and the portal's press base (site.css), both outrank it, as they do in the
   reference, where `button:active` beats `.svc-option:hover` and `.selected` follows it. Written as
   `button.svc-option:hover:not(:disabled)` it outranked both, so a pressed card grew to 1.01 instead of
   pressing to .98 and a hovered selected card painted the seam it removes (portal group 2, third
   measurement pass, 2026-09-09). */
.svc-option:where(button:hover:not(:disabled)) { border-color: rgba(15, 23, 42, .3); transform: scale(1.01); }
/* A box type the server says cannot be bought right now is a BUSINESS lock, not a validation failure --
   the card is locked and its reason is printed underneath, so the state is never silent (P2, 2026-08-01).
   Same treatment .svc-primary:disabled already uses, so the two locked affordances read alike. */
.svc-option:disabled { opacity: .62; cursor: not-allowed; }
/* The selected card fuses with the details panel below it: the shared edge is transparent and only the
   OUTER corners stay round. Both shorthands are symmetric (top pair / bottom pair), so they carry no
   left/right meaning and need no logical form. */
.svc-option.selected {
    border-color: rgba(0, 51, 160, .42);
    border-block-end-color: transparent;
    border-radius: 24px 24px 0 0;
    background: var(--kp-svc-option-selected-bg);
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, .35);
}
.svc-option-icon {
    display: grid;
    place-items: center;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: var(--kp-radius-xl);
    color: var(--kp-white);
    font-size: 23px;
    opacity: .88;
    transition: transform .2s, box-shadow .2s;
}
.svc-option-icon.virtual { background: var(--gradient-svc-icon-virtual); }
.svc-option-icon.physical { background: var(--gradient-svc-icon-physical); }
.svc-option.selected .svc-option-icon { opacity: 1; transform: scale(1.05); }
/* Restyle P4 (2026-08-08), D1 palette clause: the selected card's icon GLOW is the reference's own
   pre-rebrand pair -- rgba(212,160,23,.55) is the stale gold #d4a017 and rgba(17,94,232,.55) the stale
   blue #115ee8. Same 20px blur, same .55 alpha, official hues (#cba052 / #0033a0), matching the
   treatment restyle P3 gave the dashboard's #115ee8 washes. */
.svc-option.selected .svc-option-icon.virtual { box-shadow: 0 0 20px rgba(203, 160, 82, .55); }
.svc-option.selected .svc-option-icon.physical { box-shadow: 0 0 20px rgba(0, 51, 160, .55); }
.svc-option-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.svc-price { flex: 0 0 auto; text-align: end; }
/* tabular-nums keeps the three KWD decimals from shifting the card width as the term changes. */
.svc-price b { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-price small { display: block; margin-block-start: 2px; color: var(--color-text-muted); font-size: 11px; }
.svc-check {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(15, 23, 42, .38);
    border-radius: 50%;
    background: rgb(255 255 255 / .92);
    color: transparent;
    font-size: 12px;
    transition: .2s;
}
.svc-option.selected .svc-check {
    border-color: var(--color-portal-action);
    background: var(--color-portal-action);
    color: var(--kp-white);
}

/* ---- the expanded card: term picker + the existing-box question ---- */
.svc-option-details {
    margin-block-start: -1px;
    padding: var(--kp-space-md) 20px 20px;
    border: 1px solid rgba(0, 51, 160, .4);
    border-block-start: 0;
    border-radius: 0 0 24px 24px;
    background: rgb(255 255 255 / .82);
    backdrop-filter: blur(28px) saturate(150%);
    box-shadow: 0 18px 50px -16px rgba(15, 23, 42, .22);
    transform-origin: top center;
    animation: svc-reveal .22s var(--ease-smooth-out);
}
.svc-detail-group + .svc-detail-group { margin-block-start: var(--kp-space-md); }
.svc-label {
    display: block;
    margin-block-end: var(--kp-space-sm);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.svc-duration {
    display: inline-flex;
    gap: 2px;
    padding: var(--kp-space-xs);
    border: 1px solid rgba(15, 23, 42, .15);
    border-radius: var(--kp-radius-2xl);
    background: rgb(255 255 255 / .7);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .05);
}
.svc-duration button {
    padding: 6px 14px;
    border: 0;
    border-radius: var(--kp-radius-xl);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
    /* A <button> keeps the UA line height (`normal`: 28px chips in English, 26px in Arabic) where the reference's
       rebooted button reads the body's 1.5 (19.5px, a 31.5px chip) in both languages (portal group 2 second measurement pass,
       2026-09-09; the same class as the option card above). */
    line-height: 1.5;
}
.svc-duration button.active {
    background: var(--gradient-svc-duration-active);
    color: var(--kp-white);
    box-shadow: 0 3px 10px rgba(0, 51, 160, .22);
}
/* FL-04 (fix round 2026-08-24): the retired existing-box question's rules (.svc-existing + the
   .svc-radio family) are deleted -- the D16 entry made the question the physical entry itself, a plain
   link with no yes/no group, and its markup and handlers left with that change. The branch <select>
   below keeps .svc-box-input, which is still live markup. */
.svc-box-input {
    width: 100%;
    min-height: 50px;
    margin-block-start: 12px;
    padding: 12px var(--kp-space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    background: rgb(255 255 255 / .9);
    color: var(--color-text);
    outline: 0;
}
.svc-box-input:focus {
    border-color: var(--kp-stamp-gold-300);
    box-shadow: 0 0 0 3px rgba(203, 160, 82, .16);
}
.svc-help { margin: var(--kp-space-sm) 0 0; color: rgba(71, 85, 105, .85); font-size: 11px; line-height: 1.45; }

/* ---- the validation engine's error state inside this family (P2, 2026-08-01) ----
   The mockup has no invalid state anywhere, and this family's controls are neither .ref-field nor
   .form-control, so the shipped portal invalid rings do not reach them. Same danger family and the same
   alpha steps as .ref-field input.is-invalid, so all portal forms flag identically.

   The two GROUP rules exist because a required "field" here is a button group, and the engine paints the
   group's first button: colouring only that one button would say the wrong thing, so the whole group
   takes the ring. And the message the engine inserts as a sibling would otherwise ride the duration
   pill's own flex row and shove its buttons sideways -- the same full-width-line fix
   .input-group .field-error-msg and .filter-date-group .field-error-msg already make. */
/* Same derived-triplet note as .ref-field input.is-invalid above: rgb(201,84,91) -> the official
   rgb(200,16,46) alongside the --kp-portal-danger-500 re-point (D6, 2026-08-08). */
.svc-box-input.is-invalid { border-color: rgba(200, 16, 46, .7); }
.svc-box-input.is-invalid:focus {
    border-color: rgba(200, 16, 46, .8);
    box-shadow: var(--focus-ring-portal-danger);
}
/* FL-03 (fix round 2026-08-24): the group's invalid ring paints the interactive cards only -- the
   non-interactive physical link entry keeps its resting border even when a sibling button group is
   flagged. */
.svc-options:has(.svc-option.is-invalid) button.svc-option { border-color: rgba(200, 16, 46, .7); }
.svc-duration:has(button.is-invalid) { border-color: rgba(200, 16, 46, .7); }
.svc-duration { flex-wrap: wrap; }
/* `order` keeps the message after the last term: the engine inserts it after the group's first button, which split the
   bar (zero-findings round 1, 2026-11-06). */
.svc-duration .field-error-msg { flex-basis: 100%; order: 1; }

/* ---- the page CTA (Continue / Pay) ---- */
.svc-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    width: 100%;
    min-height: 60px;
    padding: 14px var(--kp-space-lg);
    border: 0;
    border-radius: 11px;
    background: var(--gradient-svc-cta);
    color: var(--kp-white);
    /* The mockup's own CTA carries no font-size either -- it inherits the root through Bootstrap's
       reboot (`button { font-size: inherit }`), which this system does not load on the portal. Without
       this line the UA default wins on a <button> and the primary CTA painted 13.33px against the
       mockup's 17px, while the same class on an <a> painted 17px (measured 2026-08-01, package P3,
       scripts/parity/probe-subscription.js). Inherit is the mockup's mechanism, so it follows the root
       in both languages instead of pinning one language's number. */
    font-size: inherit;
    font-weight: 700;
    /* A <button> ignores the ambient line-height (the UA default is `normal`, which beats inheritance), so
       this CTA's 60px box only holds if the line box is pinned here (portal mockup-parity lesson 8). The pinned
       value is the root's 1.5 the reference's button inherits, read as 24px against the UI leading's 23.2px
       (portal group 2 round 1, 2026-09-09). */
    line-height: 1.5;
    /* Restyle P4 (2026-08-08), D1: the CTA's outer RING is the reference's stale blue (#115ee8) at .07 --
       carried onto the official navy at the same alpha, exactly as the drop shadow beside it already is
       (rgba(0,51,160,.42) needed no change). The :disabled twin below gets the same treatment at .05. */
    box-shadow: 0 0 0 4px rgba(0, 51, 160, .07), 0 12px 28px -12px rgba(0, 51, 160, .42);
    transition: filter .2s, transform .18s;
}
.svc-primary:hover:not(:disabled) { filter: brightness(1.1); }
.svc-primary:active:not(:disabled) { transform: scale(.985); }
.svc-primary:disabled {
    opacity: .62;
    cursor: not-allowed;
    box-shadow: 0 0 0 4px rgba(0, 51, 160, .05), 0 10px 24px -14px rgba(0, 51, 160, .32);
}
/* The reference's Continue label carries its arrow glyph inside the label span at 16px, after a space; the sprite's
   outline is the same glyph, mirrored for Arabic the way the reference swaps to its left arrow (portal group 2 follow-up,
   2026-09-09). */
.svc-primary .svc-cta-arrow { width: 16px; height: 16px; vertical-align: -.125em; }
[dir="rtl"] .svc-primary .svc-cta-arrow { transform: scaleX(-1); }
.svc-primary .amount { opacity: .8; font-variant-numeric: tabular-nums; }

/* The choose page's branch card, validation panel and Continue, 20px apart like board 5's stack of the served-areas
   design (zero-findings round 1, 2026-11-06). A flex gap, so a hidden item leaves none; the panel's own top margin is out. */
.svc-stack { display: flex; flex-direction: column; gap: 20px; }
.svc-stack .form-validation-msg { margin-block: 0; }

/* ---- checkout: order summary + payment method ---- */
.svc-card {
    padding: 20px;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: var(--kp-radius-4xl);
    background: rgb(255 255 255 / .8);
    backdrop-filter: blur(28px) saturate(150%);
    box-shadow: 0 18px 50px -16px rgba(15, 23, 42, .22);
}
.svc-eyebrow {
    margin: 0 0 12px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.svc-summary-list { display: grid; gap: 12px; }
.svc-summary-row,
.svc-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
/* Untracked on the reference; the design system's heading tracking would squeeze the English title -.14px
   (portal group 2 round 1, 2026-09-09). */
.svc-summary-row h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: normal; }
.svc-summary-row p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 12px; }
/* A value with no spaces wraps instead of cutting the page (zero-findings round 1, 2026-11-06): the branch name column allows 200. */
.svc-summary-row > div { overflow-wrap: anywhere; }
.svc-summary-row strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The choose page's matched branch, read-only text (15 #1011). */
.svc-branch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-block-size: 50px;
    padding: 12px var(--kp-space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-sm);
    background: var(--color-bg-canvas);
}
.svc-branch > div { min-inline-size: 0; overflow-wrap: anywhere; }
.svc-branch .icon { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 3px; color: var(--color-action-primary); }
/* Fixed px like .svc-summary-row: a rem size reads 14.875px and 13.8125px on the Arabic desk's 17px root. */
.svc-branch b { display: block; font-size: 14px; font-weight: 700; }
.svc-branch__address { display: block; color: var(--color-text-muted); font-size: 13px; }
.svc-rule { height: 1px; margin: var(--kp-space-md) 0; background: var(--color-border); }
.svc-total span { font-size: 14px; font-weight: 500; }
.svc-total strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-payment-label {
    /* Dated 2026-11-10: 20px above, the reference's gap between the order summary card and this label (its card
       carries a 20px bottom margin); this label is drawn on the checkout only, so no other card moves. */
    margin: 20px 0 var(--kp-space-sm);
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.svc-methods { display: grid; gap: var(--kp-space-sm); margin-block-end: 20px; }
.svc-method {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    padding: 14px var(--kp-space-md);
    border: 1px solid rgb(255 255 255 / .55);
    border-radius: var(--kp-radius-2xl);
    background: rgb(255 255 255 / .66);
    color: var(--color-text);
    text-align: start;
    transition: .2s;
}
/* Only a REAL control gets the hover (parity fix wave 2026-08-11, P1.6e). The reference's own row is a
   <button> in a two-method list, where growing under the pointer advertises a genuine choice. Ours is
   deliberately a non-interactive <div>: Checkout has exactly one payment method, and Checkout.cshtml's
   own comment records why a single-method picker is not a button. The hover rule rode in with the family
   anyway, so the row grew under the pointer and then refused every click -- the exact false affordance
   that view comment set out to avoid. Scoping it to button/a keeps the effect for the day a second
   method ships and removes it today, with no second rule to remember. */
.svc-method:is(button, a):hover { transform: scale(1.01); }
.svc-method.active {
    border-color: rgba(0, 51, 160, .3);
    background: rgb(255 255 255 / .84);
    box-shadow: 0 0 0 2px rgba(0, 51, 160, .2);
}
.svc-method > .icon { color: var(--color-text-muted); width: 20px; height: 20px; }
.svc-method-copy { flex: 1; }
.svc-method-copy b { display: block; font-size: 14px; }
.svc-method-copy small { display: block; margin-block-start: 2px; color: var(--color-text-muted); font-size: 12px; }
.svc-method-check {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(15, 23, 42, .4);
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
}
.svc-method.active .svc-method-check {
    border-color: var(--color-portal-action);
    background: var(--color-portal-action);
    color: var(--kp-white);
}
.svc-back-link {
    display: block;
    width: 100%;
    margin-block-start: var(--kp-space-sm);
    padding: 10px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 14px;
    /* A <button> ignores the ambient line-height (the UA default is `normal`, which beats inheritance): the receipt's
       Refresh and Download members read 37px / 35px tall against the family's 41px until this line (portal group 2
       follow-up, 2026-09-09; the reference's own control is a button at 14px / 21px). */
    line-height: 1.5;
    /* The reference's control is a <button>, whose label the browser centres; this navigation link is an <a>, whose
       label sat at the start edge (portal group 2 round 1, 2026-09-09). The reference's Arabic page renders the
       same button start-aligned, so the centring is the English rendering only. */
    text-align: center;
}
html[dir="rtl"] .svc-back-link { text-align: start; }
/* The Download member carries an 18px glyph inline; on the baseline it lifts the 21px line box the rule above declares
   (the control measured 43px / 44px against the family's 41px), so the glyph aligns to the top of the text instead, where
   its 18px fit inside the box in both scripts (the middle alignment still read 41.17px in English)
   (portal group 2 follow-up, 2026-09-09). */
.svc-back-link .icon { vertical-align: text-top; }
.svc-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgb(255 255 255 / .45);
    border-block-start-color: var(--kp-white);
    border-radius: 50%;
    animation: svc-spin .75s linear infinite;
}

/* The blocked card's self-check line (pending-payment self-heal wave, 2026-08-07). The mockup has no
   checking state for this card, so it is built from the design system: .svc-help's own muted type plus
   the .svc-spinner ring above. Two things HAD to be restated rather than inherited -- .svc-spinner is
   painted for the navy Pay button, so its white ring is invisible on the card's paper, and 17px next to
   11px text is out of scale. Everything else (border width, radius, animation) still comes from the
   base rule, which is why this block must stay directly after it: both selectors weigh the same, so
   source order is what decides. */
.svc-pending-check { display: flex; align-items: center; gap: var(--kp-space-xs); }
.svc-spinner-muted {
    flex: none;
    width: 12px;
    height: 12px;
    border-color: var(--color-border);
    border-block-start-color: var(--color-text-muted);
}

/* ---- receipt card (the "payment received" state) ---- */
.svc-success { padding: var(--kp-space-lg); text-align: center; }
/* Restyle P4 (2026-08-08): the badge's glyph colour is the ONE value the two packages actually SERVE
   differently, and it is worth spelling out because the stylesheet source looks unchanged. Both packages
   write this rule as `background: rgba(5,150,105,.1); color: var(--svc-success)` with a route-local
   `:root { --svc-success: #059669 }` in the same file -- so v1, which served that file directly, painted
   the emerald, which is why the shipped port reads --kp-emerald-600. v2 serves a BUILT bundle whose
   builder strips the route-local :root and rewrites the reference to the package's canonical
   `--color-success`, declared `#009a44` -- the official brand green. Nine of the ten tokens that rewrite
   touches keep their value; this is the one that moves. So the served v2 reference already paints this
   glyph official: a measured value change, not only a D1 mapping. The 10% tint beside it is the same
   stale emerald spelled in rgb, carried onto the official green at the same alpha. */
.svc-success-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--kp-space-md);
    border-radius: var(--kp-radius-2xl);
    background: rgba(0, 154, 68, .1);
    color: var(--kp-emerald-500);
    font-size: 27px;
}
/* Untracked on the reference (the design system's heading tracking read -.18px here in English; portal group 2
   round 1, 2026-09-09). */
.svc-success h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: normal; }
/* The receipt's copy lives inside its poll-state wrappers (pending / paid / unpaid / activation failed), which the
   reference's direct-child rule cannot see: the paid copy rendered at the root's 16px / 24px with no top margin
   until the wrappers took `svc-success-state` (portal group 2 round 1, 2026-09-09). */
.svc-success > p,
.svc-success-state > p {
    max-width: 470px;
    margin: var(--kp-space-sm) auto 0;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.55;
}
.svc-success-details {
    margin-block-start: 20px;
    padding: 12px var(--kp-space-md);
    border: 1px solid rgba(226, 232, 240, .7);
    border-radius: var(--kp-radius-2xl);
    background: rgb(255 255 255 / .7);
    text-align: start;
}
.svc-success-details .svc-eyebrow { margin-block-end: var(--kp-space-sm); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.svc-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    color: var(--color-text-muted);
    font-size: 12px;
}
/* A flex value cell will not shrink below an unbreakable token, and the offline gateway's 39-character ids pushed
   the row 15-45px past a phone viewport, dragging the fixed bar with the document (portal group 2 round 1,
   2026-09-09); the cell may shrink and the token may break anywhere. */
.svc-detail-row b { min-width: 0; overflow-wrap: anywhere; color: var(--color-text); font-weight: 600; text-align: end; }
.svc-success .svc-primary { margin-block-start: var(--kp-space-md); min-height: 52px; }

/* ---- sprite-icon sizing ----
   The mockup draws these glyphs with a Bootstrap icon FONT, so its own rules size them with font-size. Our
   icons are <svg class="icon"> sprite uses, and an unsized inline SVG falls back to the UA's 300x150 default
   (portal mockup-parity lesson 7) -- so every icon slot in this family gets an explicit box matching the
   mockup's rendered glyph size. The font-size declarations above are kept for the same slots because a text
   glyph (e.g. a bare check character) is a legitimate fill for them too. */
/* fill/stroke added in the parity fix wave (P2.1k, 2026-08-11), the same correction and the same reason
   as the ticket spine's: icon-mailbox and icon-vbx are FILL artwork (their paths carry their own fill),
   but the shared .icon base rule is written for the stroke family and was welding a 2px outline around
   the fill, so these two marks painted visibly heavier than the reference's. Only the size was scoped
   here before, which is why the stroke survived. Since the third measurement pass (2026-09-09) the
   two tiles draw the reference's own outlines (icon-bi-phone, icon-bi-mailbox2), filled symbols the
   same rule serves. */
.svc-option-icon .icon { width: 23px; height: 23px; fill: currentColor; stroke: none; }
/* The reference sizes the two ticks differently -- 12px on the card, 11px on the method row (portal group 2 follow-up,
   2026-09-09). */
.svc-check .icon { width: 12px; height: 12px; }
.svc-method-check .icon { width: 11px; height: 11px; }
.svc-success-icon .icon { width: 27px; height: 27px; }
/* The receipt card's badge is shared by its three states (confirming / paid / not paid), so the green
   "paid" tint has to come OFF when the payment did not happen -- otherwise a declined or unknown payment
   is announced by a green tick (whole-branch review I1, 2026-08-01; the sibling Failed page's own comment
   already refused this card for that reason). The neutral pair below is that page's .mb-empty-icon pair,
   so the two "payment did not happen" screens read alike. payments.js toggles the modifier. */
.svc-success-icon.neutral { background: var(--kp-portal-icon-tint-blue); color: var(--kp-navy-600); }

/* ---- the onboarding hand-off strip (portal onboarding wave W6b, 2026-08-09) ----
   A DESIGNED ADDITION with NO mockup source, and this note is the record of why. The reference's
   register-services.html was measured for this package at 1440 and 390 in both languages: its choose
   state renders .svc-stepper -> .svc-intro -> .svc-options -> .svc-primary and nothing else -- no
   welcome, completion or hand-off strip exists anywhere on that page, in any of its three states
   (choose / payment / success), and its whole visible text census is the eight strings this page
   already ships. So there was nothing to port, and every value below is BORROWED FROM THIS FAMILY'S
   OWN rules rather than invented, which is what keeps the strip reading as part of the page it sits on:
     * the glass shell (border, fill, blur, shadow) = .svc-card, above;
     * the row padding + gap + 14px copy = .svc-method, the family's own icon-copy-check row;
     * the badge tint + ink = .svc-success-icon (official green at the reference's own 10% alpha);
     * the muted 14px escape = .svc-back-link, the family's own secondary control;
     * the entrance = the family's own svc-reveal keyframe, so it arrives like .svc-option-details does.
   Radius is the 16px .svc-method/.svc-success-details value rather than .svc-card's 24px: this is a
   row, not a card, and it sits directly above the 642px column's step pips. Dated clause
   2026-10-12 (15 #433): that column is now the choose page's full-width panel, so the strip spans
   the page's content width.
   The owner sees it in the W6b print-screen comparison and rules there, as the other designed states
   in this wave did. */
.svc-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block-end: 20px;
    padding: 14px var(--kp-space-md);
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: var(--kp-radius-2xl);
    background: rgb(255 255 255 / .8);
    backdrop-filter: blur(28px) saturate(150%);
    box-shadow: 0 18px 50px -16px rgba(15, 23, 42, .22);
    animation: svc-reveal .22s var(--ease-smooth-out);
}
.svc-welcome-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: var(--kp-radius-2xl);
    background: rgba(0, 154, 68, .1);
    color: var(--kp-emerald-500);
}
.svc-welcome-icon .icon { width: 22px; height: 22px; }
/* min-width:0 removes the flex item's automatic minimum, which is its MIN-CONTENT width (the longest
   word). Without it the sentence could not wrap below that floor, so a long word -- a future string, or
   a translation -- would widen the row past the column instead of breaking. Both shipped sentences are
   short enough not to need it today; it is here so neither one has to be re-checked when it changes. */
.svc-welcome b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.svc-welcome-later {
    flex: 0 0 auto;
    padding: var(--kp-space-sm) 12px;
    border-radius: var(--kp-radius-md);
    color: var(--color-text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}
.svc-welcome-later:hover {
    background: rgba(0, 51, 160, .05);
    color: var(--color-text);
}

@keyframes svc-reveal {
    from { opacity: 0; transform: translateY(-8px) scaleY(.96); }
    to { opacity: 1; transform: translateY(0) scaleY(1); }
}
@keyframes svc-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .svc-intro { margin-block-end: 25px; }
    .svc-intro h1 { font-size: 24px; }
    .svc-intro p { font-size: 14px; }
    .svc-option { gap: 12px; padding: var(--kp-space-md); border-radius: 20px; }
    .svc-option.selected { border-radius: 20px 20px 0 0; }
    .svc-option-icon { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; font-size: 21px; }
    /* The tile's mark follows the tier's 21px the way the reference's icon font does (portal group 2,
       third measurement pass, 2026-09-09). */
    .svc-option-icon .icon { width: 21px; height: 21px; }
    .svc-option-name { font-size: 14px; }
    .svc-price b { font-size: 12px; }
    .svc-option-details { padding: var(--kp-space-md); border-radius: 0 0 20px 20px; }
    .svc-duration { display: flex; width: 100%; }
    .svc-duration button { flex: 1; padding-inline: var(--kp-space-sm); }
    .svc-card { border-radius: 20px; padding: 18px; }
    /* The strip's own narrow tier (W6b): the same shrink the family applies to .svc-option here, so the
       badge + sentence + escape still fit one row at 390 instead of pushing the escape onto its own line
       (measured at 390 in both languages before this tier was written). */
    .svc-welcome { gap: 12px; padding: 12px; }
    .svc-welcome-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 14px; }
    .svc-welcome-icon .icon { width: 19px; height: 19px; }
    .svc-welcome b { font-size: 13px; }
    .svc-welcome-later { padding: 6px var(--kp-space-sm); font-size: 13px; }
}

/* Timing only -- see the portal's reduced-motion contract at the dashboard-polish block above
   (corrected 2026-08-11). The four `transform: none` rows this arm used to carry are gone: the two
   hovers and the press are end states the reference keeps, and `.svc-option.selected .svc-option-icon`
   was never motion at all -- it is how a SELECTED service tile says it is selected, so switching it off
   under a motion preference removed information. */
@media (prefers-reduced-motion: reduce) {
    .svc-option,
    .svc-option-icon,
    .svc-method,
    .svc-primary,
    .svc-welcome-later,
    .svc-check { transition: none; }
    .svc-option-details,
    .svc-welcome { animation: none; }
    .svc-spinner { animation-duration: 2s; }
}

/* ============================================================
   DASHBOARD PLAN MODAL — current plan, renewal, other plans
   (subscription purchase slice, Phase 2 package P1, 2026-08-01)
   Source: postOffice_PublicUser_html css/react-parity.css, the
   "Dashboard plan chooser modal" block, read directly this package.

   OUT OF SCOPE BY LAW, deliberately absent: the mockup's cancel
   affordance — .plan-cancel-confirm (and its .danger button) plus
   the second .plan-current-actions button. Subscriber-initiated
   cancellation is an ADMIN action per BRD subscription-spec v0.3
   lines 165-172, owner-confirmed 2026-08-01 ("Follow the BRD"), so
   the actions grid holds the Renew button alone and is a single
   column at every width. (Dated 2026-11-08, 15 #1223(b): that button is gone too; the grid holds only a refusal.) This is a Core-Rule-13 BRD override, not a
   parity miss — do not "restore" it.

   The mockup's overlay wrapper is a generic bootstrap-ish .rp-modal
   utility this system does not have (only .rp-content/.rp-wrap/
   .rp-title ship), so .plan-modal is written self-sufficient here —
   the same call the dashboard block made for .dc-appointments. It is
   hidden by default and shown by adding .show, mirroring the
   mockup's own class toggle.

   House conversions: logical properties (the mockup's [dir=rtl]
   text-align twins disappear into text-align:start/end); colors via
   tokens; the RTL letter-spacing kill already ships in base.css:127.
   Full @media ladder ported: 720px, 390px and reduced-motion, the
   three tiers the mockup declares (every @media tier the component declares is ported, not the base rule alone).
   Dated clause 2026-10-13: a tier is ported as the reference RENDERS it. Its bundle draws this sheet in three layers
   (a first phone layer, a later unconditional plan-chooser layer, a second 720px block after it), and a value the
   later layers override is not the phone value -- see the 720px block below.
   Dated clause 2026-10-14: the reference also declares a min-width 1024px rule, and below it the unconditional layer
   draws the bottom sheet, so the bottom-sheet geometry runs to 1023px -- see the 721-1023 band block below.
   ============================================================ */

/* The scroll lock the modal sets on <body> while it is open. */
body.plan-locked { overflow: hidden; }

/* THE SHEET STATES ITS OWN LINE HEIGHT (2026-10-14). The reference draws this sheet on its dashboard, whose body sets
   line-height 1.625 (app.bundle.css :15925): measured on the rendered sheet from 390 to 1440 in both directions, 26px
   at 16px, and 1.625 times the font size on each of its elements that sets no line height of its own. Ours took the host
   page's ratio instead, 1.625 on the dashboard (body.rp-shell--dashboard) but 1.5 on the Manage page (body.rp-shell),
   so the same partial drew 2.5-3.75px shorter blocks there. Unitless, so each descendant scales it by its own font
   size, as on the reference. */
.plan-modal {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--kp-space-lg);
    line-height: 1.625;
}
.plan-modal.show { display: flex; }
/* The sheet's own scrim (2026-10-13): the rendered reference paints its plan scrim at alpha .42 at every width, where
   the shared dialog backdrop the Portal's message dialogs keep is .44, so the sheet reads its own token. */
.plan-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--kp-plan-scrim);
    backdrop-filter: blur(5px);
}
/* Restyle P3 (2026-08-08) re-measures the sheet against portal mockup v2's own later plan-chooser layer
   ("Dashboard 2 plan chooser parity"), which supersedes the earlier block this family was ported from:
   672 wide instead of 620, a 16px radius, no border, plain white, and a lighter, wider drop shadow.
   NOT adopted from that layer: it makes the whole SHEET the scroll container (display:block) so the
   footer scrolls away with the content. Ours keeps the flex column with a scrolling body and a footer
   pinned in view -- shipped behaviour, and the renewal CTA lives in that footer. */
.plan-sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(672px, calc(100vw - 48px));
    max-height: 80vh;
    overflow: hidden;
    border: 0;
    border-radius: var(--kp-radius-2xl);
    background: var(--kp-white);
    color: var(--kp-plan-ink);
    box-shadow: 0 24px 64px rgba(15, 23, 42, .24);
    animation: plan-in .2s var(--ease-smooth-out);
}
/* A re-render must not replay the entrance animation -- the sheet would flash on every option toggle. */
.plan-modal.plan-refreshing .plan-sheet { animation: none; }
.plan-handle { display: none; }

.plan-sheet > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px 4px;
}
.plan-sheet > header h2 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -.035em; }
.plan-sheet > header p { margin: 5px 0 0; color: var(--kp-plan-muted); font-size: 14px; line-height: 1.45; }
.plan-sheet > header > button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: var(--kp-radius-lg);
    background: transparent;
    color: var(--kp-plan-muted);
}
.plan-sheet > header > button:hover { background: var(--kp-plan-hover-bg); color: var(--kp-plan-ink); }
/* The close affordance was a TEXT glyph until the parity fix wave (P2.1e, 2026-08-11). The rule that
   used to sit here fought the UA default font-size to paint that character at the v1 layer's 25px; it
   is retired with the character itself. The reference draws a real 20x20 mark inside this same 36x36
   hit area (measured on the rendered plan sheet: img 20px, button 36px, padding 8px -- which is exactly
   the box already declared above), so the mark simply fills the padding box. */
.plan-sheet > header > button .icon { width: 20px; height: 20px; }
/* overflow-anchor:none stops the browser re-anchoring the scroll position when the sheet re-renders. */
.plan-scroll { min-height: 0; overflow-y: auto; overflow-anchor: none; }

/* ---- the current plan card ---- */
.plan-current {
    margin: 16px 24px 0;
    padding: 20px;
    border: 1px solid var(--kp-plan-current-border);
    border-radius: var(--kp-radius-2xl);
    background: var(--kp-plan-current-bg);
}
/* THE BOX THE CARD IS ABOUT (owner ruling 15 #450, 2026-10-12): its type, its number and its status on one line
   above the plan, the number kept left-to-right inside an Arabic line by the markup's own bdi. */
.plan-current-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--kp-space-xs) var(--kp-space-sm);
    margin-block-end: 14px;
    color: var(--kp-plan-ink);
    font-size: 13px;
    line-height: 1.4;
}
.plan-current-box b { font-weight: 800; }
.plan-current-box bdi { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-current-box span { color: var(--kp-plan-muted); font-size: 12px; font-weight: 700; }
.plan-current-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.plan-current-top > div:first-child { display: grid; grid-template-columns: 36px 1fr; gap: 0 12px; align-items: center; }
.plan-crown {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--kp-radius-xl);
    background: var(--kp-plan-crown-bg);
    color: var(--kp-plan-on-navy);
    font-size: 15px;
}
.plan-current-top p {
    margin: 0;
    color: var(--kp-plan-eyebrow);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
/* The card's title and the option card's title below set their own tracking (2026-10-13): without it the base heading
   rule's English -.01em reached them, while the reference's only generic heading rule sets the family alone, so its
   titles render at normal tracking. Arabic already reads 0 through the right-to-left reset. */
.plan-current-top h3 { margin: 3px 0 0; font-size: 15px; font-weight: 800; letter-spacing: normal; }
.plan-renewal { display: flex; align-items: flex-start; gap: 8px; margin-block-end: 14px; color: var(--kp-plan-renewal-ink); }
.plan-renewal > .icon { margin-block-start: 1px; width: 16px; height: 16px; }
.plan-renewal span {
    display: grid;
    color: var(--kp-plan-renewal-label);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-align: start;
    text-transform: uppercase;
}
.plan-renewal b {
    margin-block-start: 3px;
    color: var(--kp-plan-renewal-value);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0; }
.plan-price strong { font-size: 28px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--kp-plan-renewal-ink); font-size: 12px; }
.plan-other > h4 {
    margin: 0;
    color: var(--kp-plan-section-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
/* A CARD WITH NO PAID PLAN HAS NO PRICE ROW (2026-10-14), so its title sat flush on this heading (0px, where the paid
   card has the price row between them). The heading then takes the price row's own block-end margin (.plan-price
   above, 16px), the card's block spacing: the rendered reference measures 16px from the top block to the price row and
   16px from the price row to this heading at each measured width, 390 to 1440, in both directions. A state the
   reference does not draw, kept and styled to fit (Core Rule 13). (0,2,1), so it outranks the (0,1,1) rule above in
   either source order. */
.plan-current > .plan-current-top + h4 { margin-block-start: 16px; }
.plan-option-copy li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--kp-plan-feature-ink);
    font-size: 10px;
    line-height: 1.4;
}
.plan-feature-check {
    display: inline-grid;
    place-items: center;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-block-start: 1px;
    color: var(--kp-plan-feature-check);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
/* One column, not the mockup's two: the second cell was the cancel button (see this block's header). */
.plan-current-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-block-start: 18px; }

/* ---- the other-plans list ---- */
.plan-other { margin-block-start: 20px; padding: 20px 24px 24px; border-block-start: 1px solid var(--kp-plan-rule); }
.plan-other > p { margin: 5px 0 14px; color: var(--kp-plan-note); font-size: 11px; }
.plan-option {
    overflow: hidden;
    margin-block-start: 12px;
    border: 1px solid var(--kp-plan-option-border);
    border-radius: 24px;
    background: var(--kp-portal-surface-soft);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
}
.plan-option.selected {
    border-color: var(--kp-plan-option-selected-border);
    box-shadow: 0 0 0 2px rgb(0 51 160 / .12), 0 10px 28px rgba(15, 23, 42, .06);
}
/* THE BOX THE FOOTER PAYS FOR wears a mark of its own (2026-10-12): the ring above means "the term you are on",
   this outline means "the box the footer pays for", and one card can wear both. An outline, so the mark moves
   nothing on the card or beside it. */
.plan-option.is-renew-target { outline: 2px solid var(--kp-postal-navy-600); outline-offset: 2px; }
.plan-option-main {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 20px;
    border: 0;
    background: transparent;
    color: var(--kp-plan-ink);
    text-align: start;
}
.plan-option-icon {
    display: grid;
    place-items: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: var(--kp-radius-2xl);
    color: var(--kp-portal-surface-soft);
    font-size: 19px;
}
.plan-option-icon.gold { background: var(--gradient-stamp); box-shadow: 0 9px 22px rgba(203, 160, 82, .28); }
/* Shadow triplet swept to the official navy in the parity fix wave (P2.9b, 2026-08-11) -- rgba(17,78,189)
   was the stale blue family the portal palette clause forbids, carried in functional rgb() form where the
   grep for raw hex could not see it. The reference's own alpha (.26) and geometry are unchanged. */
.plan-option-icon.blue { background: var(--gradient-plan-icon-blue); box-shadow: 0 9px 22px rgba(0, 51, 160, .26); }
/* The <img> + brightness/invert filter this rule used to size is GONE (parity fix wave P2.1f,
   2026-08-11): the tiles drew the ticket-SPINE mask artwork -- single hard-black paths that only a
   filter could recolour -- instead of the reference's two duotone marks. Both tiles now draw real
   duotone sprite symbols, so there is no filter left to declare and the sizing moved to the .icon block
   further down with the family's other re-measured marks.
   COLOUR, measured not assumed: the audit read the reference's physical-tile ASSET
   (icon-mailbox-duotone-primary.svg, filled #0033a0) and concluded the reference paints a navy mark
   there. The rendered cascade says otherwise -- the reference applies `filter: brightness(0) invert(1)`
   to BOTH tile images, the same filter our port used, so both marks paint WHITE and the asset's own
   fill never reaches the screen. Our marks inherit the near-white this tile already sets on itself,
   which is that same result by a means that needs no filter. Both keep their duotone: the backing path
   carries opacity .2 either way. */
.plan-option-copy { min-width: 0; flex: 1; }
.plan-option-copy h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: normal; }
/* The per-option bullets are DOTS, not ticks: the glyph is hidden and an ::after dot drawn in its place,
   gold on the virtual option and blue on the physical one. Keyed off the card's own TYPE class (the same
   .gold/.blue the option icon wears), not the mockup's positional :nth-of-type(2) rule: the mockup's list
   is a fixed pair, ours is ordered by the subscriber's own subscriptions, so a subscriber whose only card
   was Physical got a blue icon with gold dots (whole-branch review M3, 2026-08-01). */
.plan-option-copy li .plan-feature-check { font-size: 0; }
.plan-option-copy li .plan-feature-check::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    margin-block-start: 5px;
    border-radius: 50%;
    background: var(--kp-plan-bullet-gold);
}
/* D1 palette clause: v2 paints the physical option's dot and its selected tick in the pre-rebrand blue
   (#115ee8). The official primary is the intent, so both draw the brand navy -- the shared
   --kp-portal-blue-500 token keeps its own value for the surfaces package P4 owns. */
.plan-option.blue .plan-option-copy li .plan-feature-check::after { background: var(--kp-postal-navy-600); }
.plan-option-price { display: grid; flex: 0 0 auto; text-align: end; }
.plan-option-price b { font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-option-price small { margin-block-start: 3px; color: var(--kp-plan-note); font-size: 10px; }
.plan-check {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--kp-plan-check-border);
    border-radius: 50%;
    background: var(--kp-portal-surface-soft);
    color: var(--kp-portal-surface-soft);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.plan-option.selected .plan-check { border-color: var(--kp-postal-navy-600); background: var(--kp-postal-navy-600); }

.plan-duration { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 20px; }
/* The caption's colour, size, weight, case and tracking never reach the field message the validation engine inserts
   into this row as a direct span (2026-10-14: it painted as this grey uppercase caption); :where() keeps the rule's
   weight, the house shape of the register form's caption row. */
.plan-duration > span:where(:not(.field-error-msg)) {
    color: var(--kp-plan-duration-label);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.plan-duration > div {
    display: flex;
    padding: 3px;
    border: 1px solid var(--kp-plan-duration-border);
    border-radius: var(--kp-radius-lg);
    background: var(--color-bg-canvas);
}
.plan-duration button {
    min-height: 28px;
    padding: 0 13px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-plan-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.plan-duration button.active {
    background: var(--kp-plan-duration-active-bg);
    color: var(--kp-plan-on-navy);
    /* Triplet swept to the official navy in the parity fix wave (P2.9b, 2026-08-11): rgba(14,69,174) was
       the stale blue family the portal palette clause forbids, hiding from the raw-hex grep in functional
       rgb() form. The reference's own alpha and geometry are unchanged. */
    box-shadow: 0 3px 8px rgba(0, 51, 160, .22);
}
.plan-duration button:disabled { cursor: not-allowed; opacity: .52; }
/* NO SILENT BLOCKING (2026-10-12): a footer pressed with no duration picked turns this box's durations red. The
   group is the field, as on the portal's own choice groups (.kp-choice-group.is-invalid), so the state is an
   outline that moves no duration by a pixel, and the shared field message takes its own line under the choices
   (the row wraps for it since the same day). */
.plan-duration > div.is-invalid { outline: 1px solid var(--status-alert-fg); outline-offset: 3px; }
.plan-duration > .field-error-msg { flex-basis: 100%; margin-block-start: 0; }
/* A refusal of THIS box's renewal, written on its own card in the API's own words (2026-10-12). */
.plan-refusal {
    margin: 0;
    padding: 0 20px 18px;
    color: var(--status-alert-fg);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}
/* The renewal confirmation's four lines (owner ruling 15 #454), each its own paragraph inside the dialog. */
.plan-confirm-lines { display: grid; gap: var(--kp-space-xs); }
.plan-confirm-lines p { margin: 0; }

.plan-sheet > footer { padding: var(--kp-space-lg); border-block-start: 1px solid var(--color-border); background: var(--kp-plan-footer-bg); }
.plan-sheet > footer button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-sm);
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: var(--kp-radius-xl);
    background: var(--kp-plan-footer-btn-bg);
    color: var(--kp-plan-on-navy);
    font-size: 13px;
    font-weight: 800;
    line-height: var(--leading-ui);
    /* Same P2.9b sweep: rgba(13,69,179) was the very triplet the owner's screenshot caught on the
       deployed footer CTA (it is also the fill this button used to take, corrected in tokens.css).
       For the record: the reference draws NO shadow on this button at all -- the glow is ours, kept
       because it is shipped dress rather than a copied value, and only its colour is corrected here. */
    box-shadow: 0 8px 18px rgba(0, 51, 160, .24);
}
.plan-sheet > footer button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; }
/* Since 2026-10-12 the span is the WHOLE label, the box, the duration and the total (owner ruling 15 #454), so it
   keeps the button's full ink; the dimmed amount it used to be is part of that sentence now. */
.plan-sheet > footer button span { font-variant-numeric: tabular-nums; }

/* Sprite-icon sizing — same reason as the svc-* family above (portal mockup-parity lesson 7).
   RE-MEASURED against the rendered reference plan sheet in the parity fix wave (P2.1e/f/g/h,
   2026-08-11), now that every one of these marks is real artwork rather than a typed character: crown
   16 inside its 36px tile, option tile 24 inside its 56px tile, selected tick 12 inside its 20px disc,
   feature tick 14, renewal glyph 16, footer arrow 16. The two values this block already carried (23 and
   11) were sized for the character era and are corrected to the reference's own. */
.plan-crown .icon { width: 16px; height: 16px; }
.plan-check .icon { width: 12px; height: 12px; }
.plan-renewal .icon { width: 16px; height: 16px; flex: 0 0 16px; }
.plan-feature-check .icon { width: 14px; height: 14px; }
.plan-option-icon .icon { width: 24px; height: 24px; }
.plan-sheet > footer button .icon { width: 16px; height: 16px; flex: 0 0 16px; }

@keyframes plan-in {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes plan-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* THE 721-1023 BAND IS STILL A BOTTOM SHEET (2026-10-14). The rendered reference draws this sheet as a full-width bottom
   sheet at every width below its min-width 1024px rule (app.bundle.css :12897-:12912, the unconditional plan-chooser
   layer) and the centred 672px dialog only from 1024px (:13211-:13221); ours turned into the dialog from 721px.
   Measured on the rendered reference at 721, 768, 900 and 1023 in both directions: bottom-aligned with no modal
   padding, full width, the 88dvh cap, top corners 24px and bottom corners square; from 1024 the base dialog above.
   Only that geometry moves here. The band keeps the base rules' type, padding, footer and entrance, as the reference's
   band does (its entrance is the base one from 721), and the 720px block below still carries the phone values. The
   80px rail stays under the sheet, as on the reference (z-index 20 under the modal's 1200). Pinned by
   PlanSheetReferenceCascadeGovernanceTests. */
@media (min-width: 721px) and (max-width: 1023px) {
    .plan-modal { align-items: flex-end; padding: 0; }
    .plan-sheet { width: 100%; max-height: 88dvh; border-radius: 24px 24px 0 0; }
}

@media (max-width: 720px) {
    /* Below 720px the dialog becomes a bottom sheet: full width and safe-area padding. (Until 2026-10-13 this line also
       named a grab handle; the rendered reference shows none, see the next comment.) Dated clause 2026-10-14: the
       bottom sheet's geometry already starts at 1023px (the band block above); this block restates it with the phone
       values. */
    .plan-modal { align-items: flex-end; padding: 0; }
    .plan-sheet {
        width: 100%;
        max-height: 88dvh;
        border-width: 0;
        border-radius: 24px 24px 0 0;
        animation: plan-up .24s var(--ease-smooth-out);
    }
    /* THE REFERENCE'S LATER LAYERS WIN (2026-10-13). This block was ported from the reference's first phone layer, and
       four of its rules were values the reference's later layers override, so they are gone and the base rules above
       carry the rendered values: the grab handle (hidden by the unconditional layer, so the base display:none stands),
       the current card's top-row gap (20px), the duration buttons' inline padding (13px) and the footer button's
       46px (56px). The 390px block below lost four rules the same way. Pinned by
       PlanSheetReferenceCascadeGovernanceTests. */
    .plan-sheet > header { padding: 18px 18px 4px; }
    .plan-sheet > header h2 { font-size: 22px; }
    .plan-current { margin: 14px var(--kp-space-md) 0; padding: var(--kp-space-md); }
    .plan-other { padding: 18px var(--kp-space-md) 22px; }
    .plan-option-main { padding: 15px; }
    .plan-option-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
    .plan-duration { padding: 0 15px 15px; }
    .plan-refusal { padding-inline: 15px; }
    /* THE BOTTOM PADDING CLEARS THE FLOATING BOTTOM NAV (fix package E, 2026-08-12), and this is the
       one place ours must diverge from the reference BECAUSE of a divergence we already carry.
       E6 raised `.rp-mobile-nav` above the plan sheet, which is what the rendered reference does --
       measured by hit-testing its own sheet at 390, where the nav paints over the sheet's content.
       The reference can afford that because its sheet has NO pinned footer; it scrolls its actions with
       the body (verified-intentional-per-ledger P2.9d). OURS pins one, so raising the nav put the
       floating pill (72px tall, sitting max(34px, safe-area) off the bottom) exactly on top of the
       renew CTA: hit-tested at 390x844 immediately after the z-index change, `elementFromPoint` at the
       CTA's centre returned `NAV.rp-mobile-nav` -- the primary action of the sheet, unreachable on a
       phone. Caught here rather than in review because a z-order change is only real when it is
       hit-tested, which is also why the item was specified that way.
       THE VALUE IS THREE TERMS, not the two this line used to name (A12, corrected 2026-08-12 -- it said
       "106px = the nav's own 72px height plus its 34px inset, so the CTA ends exactly where the pill
       begins"). The declared padding is 72px + max(34px, safe-area) + one --kp-space-md, so the CTA ends
       one spacing step ABOVE the pill rather than flush against it -- which is the right answer for a
       control a thumb has to hit, and is why the term is there; the arithmetic sentence simply did not
       count it. The safe-area term is carried through the same max() the nav uses, so a notched phone
       moves both together. */
    .plan-sheet > footer {
        padding: var(--kp-space-md) var(--kp-space-md)
                 calc(72px + max(34px, env(safe-area-inset-bottom)) + var(--kp-space-md));
    }
}

/* At 390px and below the reference's later layers keep the option tile at 44px, the option row at gap 14px and
   padding 15px, the option price at 12px and the included items at 11px; the four first-layer rules that set 38px,
   9px / 11px, 10px and 9px here are removed (2026-10-13). */
@media (max-width: 390px) {
    .plan-current-top { display: grid; }
    .plan-renewal { margin-block-start: var(--kp-space-sm); }
    .plan-renewal span { text-align: start; }
    .plan-duration { align-items: flex-start; flex-direction: column; }
    .plan-duration > div { align-self: stretch; }
    .plan-duration button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .plan-sheet { animation: none; }
    .plan-duration button,
    .plan-sheet button { transition: none; }
}

/* ============================================================
   PAYMENT HISTORY — the receipts card and its rows
   (subscription purchase slice, Phase 2 package P1, 2026-08-01)

   DESIGN TARGET SUPERSEDED 2026-08-08 (restyle package P5): the
   authority for every value below is now portal mockup v2,
   docs/reference/subscribersPortal-KuwaitMail, page
   payment-history.html. Its rules live in css/static-app.css and are
   inlined UNCHANGED into the served css/app.bundle.css (verified by
   diffing the two blocks: the builder's only edit is rewriting the
   count chip's literal #0033a0 to var(--color-primary), the same
   official navy), and NOTHING later in the bundle touches a
   .payment-history-* selector — so the source block IS the rendered
   winner here, no cascade guessing. The older
   postOffice_PublicUser_html/css/react-parity.css this family was
   first ported from is diff history only.

   WHAT MOVED: geometry, and only geometry. v2 re-cut the whole page
   on a 1.0625 uplift of the values v1 served (8→8.5, 12→12.75,
   16→17, 20→21.25, 24→25.5, 4→4.25, 6→6.375, 10→10.625, 14→14.875,
   32→34, 72→76.5) and it authors them as PIXELS, not rem — so the
   page paints the same box in Arabic (root 17px) and English (root
   16px), which is what the lead's EN/AR spec tables measured. Where
   a token's value is one of those uplifted numbers it is still used
   (--shadow-card IS the reference's exact double shadow, and the
   navy tint IS rgba(0,51,160,.1)); where the token would now paint
   the OLD number (--kp-radius-md 8px vs 8.5px, --kp-space-md 16px vs
   17px) the measured pixel is written instead. No colour moved: this
   is the one reference page that already paints official brand navy,
   and its neutral ramp resolves exactly onto the shipped
   --kp-gray-* primitives (#f3f4f6/#f9fafb/#e5e7eb/#d1d5db/#9ca3af/
   #6b7280/#374151/#1f2937), so the D1 palette clause has nothing to
   re-express here.

   The :has(.payment-history-card) shell overrides retune the SHIPPED
   .rp-wrap / .rp-title for this one page, which is why they are
   page-scoped rather than shell edits. v2 moves the 25.5px gap above
   the title OFF the wrap and ONTO the title's own margin, so the wrap
   override zeroes what the shell adds; without that the page would
   carry the gap twice. The desktop .rp-content override is GONE — v2
   sets padding-inline:0 there, which is already the shell's own value,
   and the 32px this used to add is what kept the card at 1036px
   instead of the reference's measured 1100px.
   Full @media ladder ported: 720px, 390px and reduced-motion
   (every @media tier the component declares is ported, not the base rule alone).
   ============================================================ */

/* The wrap's top padding is the dashboard's alone since 2026-09-09 (.rp-shell--dashboard .rp-wrap), so this
   page no longer zeroes it here; the title margins are the reference's own values. */
.rp-shell:has(.payment-history-card) .rp-title { margin-block: 25.5px 34px; min-height: 34px; font-size: 28px; line-height: 34px; }

.payment-history-card {
    margin-block-end: 17px;
    padding: 25.5px;
    border: 1px solid rgba(243, 244, 246, .8);
    border-radius: 8.5px;
    background: rgb(255 255 255 / .8);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(21.25px);
}
.payment-history-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12.75px;
    margin-block-end: 21.25px;
}
.payment-history-card > header > div { display: flex; align-items: center; gap: 8.5px; }
.payment-history-card > header > div > .icon { color: var(--color-portal-action); width: 21.25px; height: 21.25px; }
.payment-history-card h2 { margin: 0; color: var(--kp-gray-800); font-size: 21.25px; line-height: 29.75px; font-weight: 700; }
/* The "N receipts" count chip. */
.payment-history-card > header > span {
    padding: 4.25px 10.625px;
    border-radius: 8.5px;
    background: var(--portal-ship-navy-tint);
    color: var(--color-portal-action);
    font-size: 12.75px;
    line-height: 17px;
    font-weight: 600;
}
.payment-history-list { display: grid; gap: 12.75px; }
.payment-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12.75px;
    min-height: 76.5px;
    padding: 17px;
    border: 1px solid var(--kp-gray-100);
    border-radius: 8.5px;
    background: rgba(249, 250, 251, .6);
}
.payment-history-main { display: flex; align-items: flex-start; gap: 12.75px; }
.payment-history-card-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 6.375px;
    background: var(--portal-ship-navy-tint);
    color: var(--color-portal-action);
}
.payment-history-main p { margin: 0; color: var(--kp-gray-800); font-size: 14.875px; line-height: 21.25px; font-weight: 600; }
.payment-history-meta { display: flex; align-items: center; color: var(--kp-gray-500); font-size: 12.75px; line-height: 17px; }
.payment-history-meta span { display: inline-flex; align-items: center; gap: 4.25px; }
.payment-history-meta span .icon { width: 12.75px; height: 12.75px; }
/* The dot separator between the date and the method. */
.payment-history-meta > i { padding: 0 8.5px; color: var(--kp-gray-300); font-style: normal; }
.payment-history-actions { display: flex; align-items: center; gap: 8.5px; }
/* The receipt reference. The two sizing declarations are a defensive fix, not a style choice (restyle
   package P5 fix round, 2026-08-08; the defect is PRE-EXISTING — these layout widths predate the P5
   re-measure and the reference package hides the problem behind short demo data, RCPT-1042).
   THE DEFECT: a flex child's min-width defaults to auto, so this span's intrinsic width is its longest
   unbreakable run. A real gateway reference is one long Latin token (the dev seed renders 39 characters),
   which inflated the column-direction row to 409px at the 390 band and scrolled the whole page sideways
   — a break of the standing no-horizontal-scroll law.
   THE FIX: overflow-wrap:anywhere is the declaration that actually cures it, because it is the only one
   of the two that lowers the span's MIN-CONTENT size; min-width:0 is the general guard against the flex
   auto-minimum and is kept beside it so the pair reads as one intent. The reference WRAPS rather than
   truncating: an official receipt identifier must stay readable in full, so it must never be ellipsized,
   and the span's own dir="ltr" (the view) keeps the broken lines reading left-to-right inside Arabic.
   Neither declaration changes any rendering that fits — short references paint exactly as before. */
.payment-history-actions > span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--kp-gray-400);
    font-size: 12.75px;
    line-height: 17px;
}
.payment-history-actions > button {
    display: inline-flex;
    align-items: center;
    gap: 6.375px;
    padding: 6.375px 12.75px;
    border: 1px solid var(--kp-gray-200);
    border-radius: 8.5px;
    background: var(--color-bg-surface);
    color: var(--kp-gray-700);
    font-size: 12.75px;
    line-height: 17px;
    font-weight: 600;
    transition: background-color .18s;
}
.payment-history-actions > button:hover { background: var(--kp-gray-100); }
/* THE PRESS RULE THAT USED TO SIT HERE IS RETIRED into the portal's press base layer (site.css, fix
   package E 2026-08-12); it declared exactly the base layer's `scale(.98)` + `.14s`. Its comment also
   carried a claim that is no longer true and was the reason the enumeration kept growing: "our portal
   pages carry no data-app-page attribute to hang the blanket form on". They do not -- but they all
   carry `body.kp-portal`, which is the hook the cursor base layer had already been using since
   2026-08-11, so a blanket form was available the whole time.
   THE FOCUS RING IS RETIRED TOO, and that one was a real defect: this rule painted
   `3px solid rgba(0,51,160,.18)` on the four Receipt buttons, where every other portal control --
   and the reference's own back button, measured 2026-08-12 -- takes the shipped
   `2px solid rgb(0,51,160)` at offset 2. Removing the override lets the shared portal ring at
   :1097 paint, which is the standard those neighbours already show. */
/* Sprite-icon sizing — same reason as the svc-* family above (portal mockup-parity lesson 7). The three
   sizes are the reference's own <img> boxes for the same three marks (17 / 12.75 / 14.875). */
.payment-history-card-icon .icon { width: 17px; height: 17px; }
.payment-history-actions > button .icon { width: 14.875px; height: 14.875px; }

@media (max-width: 720px) {
    /* The shell's own ≤720 rule already supplies the 17px inline gutter v2 re-declares here; only the
       page's shorter bottom clearance (98 vs the shell's 112) actually differs. */
    .rp-shell:has(.payment-history-card) .rp-content { padding-block-end: 98px; }
    .rp-shell:has(.payment-history-card) .rp-title { margin-block: 13px 21.25px; font-size: 25.5px; line-height: 34px; }
    .payment-history-card { padding: 21.25px; }
    .payment-history-card h2 { font-size: 19.125px; line-height: 29.75px; }
    .payment-history-row { align-items: stretch; flex-direction: column; min-height: 0; gap: 12.75px; }
    .payment-history-actions { justify-content: flex-start; }
    /* Aligns the receipt id under the row's copy once the icon column no longer leads it: the 34px tile
       plus the row's own 12.75px gap. */
    .payment-history-actions > span { margin-inline-start: 46.75px; }
}

@media (max-width: 390px) {
    .payment-history-card { padding: 21.25px; }
    .payment-history-card > header > span { padding-inline: 10.625px; font-size: 12.75px; }
    .payment-history-card h2 { font-size: 19.125px; }
    .payment-history-row { padding: 17px; }
    .payment-history-actions { justify-content: flex-start; }
    .payment-history-actions > span { margin-inline-start: 0; }
}

/* Timing only -- see the portal's reduced-motion contract at the dashboard-polish block above
   (corrected 2026-08-11). The press scale stays; only its clock stops. */
@media (prefers-reduced-motion: reduce) {
    .payment-history-actions > button { transition: none; }
}

/* ONBOARDING STEP CHROME, RETIRED (owner ruling 15 #1265, 2026-11-10). Two "step N of 3" families stood here
   from the onboarding wave of 2026-08-09: `.ref-progress` (the labelled row of the account-type page and the
   register wizard, unused since ruling 15 #907 of 2026-11-01) and `.onboarding-progress` (the welcome tour's
   unlabelled numerals). The welcome tour is deleted and the unused rules went with it, so no step-chrome rule
   remains in this sheet. */

/* The journey's page containers sit ABOVE the ambient wash. Not decoration — without it the page is
   INVISIBLE: `.ref-grid-bg` is absolutely positioned with z-index 0, and a positioned element beats a
   static in-flow sibling in the same stacking context no matter what the DOM order is, so a plain
   <main> is painted over by the wash. Caught by looking at a screenshot during W1 verification, after
   getBoundingClientRect and elementFromPoint had both said the heading was visible — neither of them
   can see paint order. The value is the reference's own: `.ref-register` and
   `.ref-account-page .ref-register-account` both carry `position:relative;z-index:1` in the served
   bundle, and our shipped `.ref-login` (:4243) already does the same. The splash is absent from this
   list because it suppresses the wash entirely and W2 gives it the reference's own `isolation:isolate`
   stage instead.
   THE WELCOME TOUR LEFT THIS LIST AT W3 (2026-08-09), for the splash's own reason: its view now
   suppresses the shared wash too, because the reference paints this page its own paper edge to edge,
   and a rule that says "without it the page is INVISIBLE" must not sit over a page where no wash is
   painted at all. The welcome family below states the page's own `position:relative`, and its grid
   carries the z-index that keeps the content above the line-grid layer.
   (Dated 2026-11-10, ruling 15 #1265: the welcome tour and its family are deleted from this sheet.)
   THE VERIFY PAGE LEFT THIS LIST AT W5 (removed 2026-08-10, independent review finding FE-2). W1 gave it a
   `<main class="ref-verify">` stub; W5 replaced that stub with the reference's own two-state
   composition, and both states carry their own `position:relative;z-index:2` (`.verify-entry-state`
   :10758, `.verify-step-state` :11093). The selector had been dead ever since — a name no view uses,
   sitting inside a rule whose comment calls every entry load-bearing. */
.ref-register-account,
.ref-terms {
    position: relative;
    z-index: 1;
}

/* ============================================================
   SPLASH — the journey's opening screen (onboarding wave W2, 2026-08-09;
   docs/plans/2026-08-09-portal-onboarding-parity.md, W2 + its spec digest in the Spec appendix).
   A 232px stage — halo, rotating conic ring, floating tile with a light sweep, and the ministry
   logo fading from outline to filled — over a masked line grid, with the two wordmarks, a pulsing
   divider and a sweeping loader bar above the ministry footer. It leaves for the login page by
   itself after 4.6s (onboarding.js).

   SOURCE + CASCADE. Every value is read from the SERVED bundle
   (docs/reference/subscribersPortal-KuwaitMail/css/app.bundle.css:24489) and re-measured on the
   RENDERED page at http://localhost:8097/splash.html in all four states (ar/en x 1440/390), per the
   portal truth order (D2). Three things only the rendered page could tell us:
     * The family has NO @media tier at all. Its two type sizes are clamp()-driven
       (clamp(1.85rem,6.2vw,2.6rem) and clamp(1.5rem,4vw,2rem)) and every other measure is a fixed
       px, so the whole 390 tier falls out of the root-scale ladder we already ship (site.css:21-35,
       byte-equal to the package's own). Measured: h1 44.2px ar-1440 / 41.6 en-1440 / 29.6 at 390
       both; h2 34 / 32 / 24 / 24. Nothing here is a hand-written narrow band.
     * The Arabic page swaps the LATIN wordmark's family. The reference's own
       `[dir="rtl"] h1,h2,h3,h4 { Alexandria }` rule (specificity 0,1,1) outranks its
       `.ref-splash-wordmark-en` (0,1,0), so the h2 renders Alexandria on the Arabic page and
       Plus Jakarta Sans on the English one. Our base.css reaches Alexandria through a token
       (`html[lang="ar"]{--font-display}`) that a `font:` shorthand overrides, so the swap is
       written out explicitly below or the Arabic h2 would render in the Latin face.
     * The package's body blobs (blob-float-a/b, 18s/22s) DO run on this page — they are in the W0
       animation census — but they are never SEEN: `.ref-splash-screen` paints an opaque canvas
       background across the whole viewport above them (they sit at z-index -1). We inherit the same
       arrangement for free: our own blob layer is base.css:36-60 on the same body, and the screen
       below covers it identically. Nothing about the shared blob layer is touched here, so no other
       route moves — the 2026-07-18 shared-shell lesson. What W1 suppressed for this page is the
       separate `.ref-grid-bg` auth wash, which the reference splash genuinely does not have.

   SCOPE + SPECIFICITY. Every rule is prefixed with the route hook the layout already renders on
   <body> (`data-public-route="splash"`, _AuthLayout.cshtml), the same way the welcome tour's family
   above is scoped. It is doing two jobs: it keeps the family off every other route by construction,
   and it lifts each rule to (0,2,0) so it beats `.ref-public h1, .ref-public h2` (0,1,1, :4389) —
   which would otherwise force its 1.2 line-height onto both wordmarks and silently lose the
   reference's 1.35/1.25 pair.

   D1 PALETTE (portal palette clause, 15 #148 — a package hex is never copied). Every row, so the
   numeric diff can be checked value by value:
     * `#115ee8` (stale pre-rebrand blue) -> OFFICIAL navy #0033a0, as `var(--color-portal-action)`
       where it is opaque and as `rgb(0 51 160 / a)` where it carries alpha: grid lines .05,
       vignette floor tint .05, conic stop .28, divider rule .22, loader track .1, logo
       drop-shadow .18, wordmark gradient stops 1 and 4.
     * `#3a7af0` -> `--kp-postal-navy-400` #1a4db8 (wordmark gradient stop 2) — the same mapping the
       register ambient discs recorded at :4298.
     * `#d4a017` (pre-rebrand gold) -> OFFICIAL stamp gold #cba052, as `var(--color-portal-accent)`
       opaque (divider dot, loader sweep stops, wordmark gradient stop 3) and as
       `rgb(203 160 82 / a)` with alpha (conic stop .45, dot glow .6, loader glow .5).
     * `#f0c04a` (the lighter pre-rebrand gold) -> `--kp-stamp-gold-300` #dfc080 at the halo's own
       .32 / .08 — again the register-ambient mapping.
     * `#475569b3` is our own --kp-slate-600 at .7 (footer caption); `#ffffffb3` / `#ffffff00` are
       plain white at .7 / 0 (the tile's light sweep and the vignette's centre bloom) and `#0007` /
       `#000` are the neutral alphas of the two MASKS — none of the four is a brand colour, so each
       stays at the reference's own value in rgb() form (never hex, per the house rule).
     * `var(--color-canvas)` -> `var(--color-bg-canvas)`: same #f8fafc, our name.
   Alphas are spelled literally rather than tokenised for this file's standing reason (:4303): a
   custom property cannot supply only the rgb part of an rgb(... / a).

   MOTION. Eleven keyframe sets, all ported at the reference's own durations, delays, easings and
   fill modes; names carry the family prefix rather than the package's camelCase `ref*`, the same
   call `ref-reg-blue-drift` recorded at :4352 (keyframe names are one flat namespace shared with
   the admin). The four `refWmEnter` consumers — wordmark wrap .9s@1.4s, loader .7s@1.8s, footer
   caption .7s@2.1s — share ONE keyframe here (`ref-splash-rise`) exactly as they do there. The
   reduced-motion arm is the package's own (app.bundle.css, same block): every animation off, and
   the three opacity-0 entrances plus the logo crossfade forced to their END state, so a visitor who
   asks for less motion still sees the finished screen rather than a blank one. The auto-advance is
   deliberately NOT part of it — motion is reduced, the journey is not (onboarding.js has no
   reduced-motion branch, by design).
   ============================================================ */

/* The screen is the family's containing block and its own stacking context. `position:relative`
   and `min-height:100svh` come from the reference's `.ref-public`, which sits on the same DIV there;
   ours lives on <body>, so the screen states them itself and the absolutely-positioned grid,
   vignette and footer keep the containing block the reference gives them. */
[data-public-route="splash"] .ref-splash-screen {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100svh;
    background: var(--color-bg-canvas);
}

[data-public-route="splash"] .ref-splash-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgb(0 51 160 / .05) 1px, transparent 1px),
        linear-gradient(90deg, rgb(0 51 160 / .05) 1px, transparent 1px);
    background-size: 48px 48px;
    /* Fades the grid out towards the edges. Both spellings are the reference's own — the unprefixed
       property is what Chrome computes, the -webkit- one is what older WebKit needs. */
    mask-image: radial-gradient(circle at center, rgb(0 0 0 / .467), transparent 70%);
    -webkit-mask-image: radial-gradient(circle at center, rgb(0 0 0 / .467), transparent 70%);
}

[data-public-route="splash"] .ref-splash-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 50% 42%, rgb(255 255 255 / .7) 0%, transparent 55%),
        radial-gradient(circle at 50% 100%, rgb(0 51 160 / .05) 0%, transparent 60%);
}

[data-public-route="splash"] .ref-splash-stage-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 32px;
}

[data-public-route="splash"] .ref-splash-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 232px;
    height: 232px;
    margin-block-end: 40px;
}

[data-public-route="splash"] .ref-splash-halo {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgb(223 192 128 / .32) 0%,
        rgb(223 192 128 / .08) 35%,
        transparent 70%);
    filter: blur(18px);
    animation: ref-splash-halo 5s ease-in-out infinite;
}

/* The ring is a full conic sweep with a radial mask punching out everything but a 64-79% band, so
   only an arc of the gradient is ever painted; rotating the element is what makes the arc travel. */
[data-public-route="splash"] .ref-splash-conic {
    position: absolute;
    width: 208px;
    height: 208px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        rgb(0 51 160 / .28) 40deg,
        transparent 110deg,
        transparent 230deg,
        rgb(203 160 82 / .45) 290deg,
        transparent 360deg);
    mask: radial-gradient(circle, transparent 64%, rgb(0 0 0) 65%, rgb(0 0 0) 78%, transparent 79%);
    -webkit-mask: radial-gradient(circle, transparent 64%, rgb(0 0 0) 65%, rgb(0 0 0) 78%, transparent 79%);
    animation: ref-splash-conic 10s linear infinite;
}

/* overflow:hidden is what clips the light sweep to the tile — without it the sweep crosses the whole
   stage. The two logos are absolutely positioned inside and land centred on this grid's static
   position, which is how the reference centres them too (no insets on either image). */
[data-public-route="splash"] .ref-splash-tile {
    position: relative;
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    overflow: hidden;
    animation:
        ref-splash-tile-enter 1s cubic-bezier(.16, 1, .3, 1) both,
        ref-splash-tile-float 6s ease-in-out 1s infinite;
}

/* `left` is PHYSICAL on purpose and is the one place this family departs from the logical-property
   house rule. The sweep's keyframes animate `left` itself, and the reference declares no direction
   override anywhere in the served bundle — so its light travels physically left-to-right on the
   Arabic page exactly as on the English one. `inset-inline-start` would mirror it under RTL and put
   our Arabic sweep on the opposite diagonal from the target. Same recorded-exception shape as the
   register ambient's physically-pinned corners at :4306. */
[data-public-route="splash"] .ref-splash-shine {
    position: absolute;
    z-index: 4;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(100deg,
        transparent 0%,
        rgb(255 255 255 / 0) 35%,
        rgb(255 255 255 / .7) 50%,
        rgb(255 255 255 / 0) 65%,
        transparent 100%);
    transform: skewX(-20deg);
    animation: ref-splash-shine 3.6s ease-in-out 1.4s infinite;
}

[data-public-route="splash"] .ref-splash-logo-outline,
[data-public-route="splash"] .ref-splash-logo-filled {
    position: absolute;
    width: 108px;
    height: 108px;
    filter: drop-shadow(0 6px 14px rgb(0 51 160 / .18));
}
/* The crossfade is TWO one-shot animations that start together at 1.6s and both hold their end
   state (`forwards`): the outline fades out over 1.6s while the filled mark fades in and settles
   from .96 scale over 1.5s. Both fill modes are load-bearing — drop either and the pair snaps back
   to outline-visible the moment the animation ends. */
[data-public-route="splash"] .ref-splash-logo-outline {
    z-index: 2;
    opacity: 1;
    animation: ref-splash-logo-out 1.6s cubic-bezier(.4, 0, .2, 1) 1.6s forwards;
}
[data-public-route="splash"] .ref-splash-logo-filled {
    z-index: 3;
    opacity: 0;
    animation: ref-splash-logo-in 1.5s cubic-bezier(.4, 0, .2, 1) 1.6s forwards;
}

[data-public-route="splash"] .ref-splash-wordmark-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    opacity: 0;
    animation: ref-splash-rise .9s cubic-bezier(.16, 1, .3, 1) 1.4s forwards;
}

/* GRADIENT TEXT. The chain is all four declarations together: the gradient is painted as the
   element's background, clipped to the glyph shapes, and then the text itself is made transparent
   so the clipped paint shows through. `color` and `-webkit-text-fill-color` are both set because
   the fill colour wins where it is supported and `color` is the fallback everywhere else; drop
   either and the wordmark paints as flat ink over its own gradient. background-size 220% is what
   gives the shimmer room to travel. */
[data-public-route="splash"] .ref-splash-wordmark {
    margin: 0;
    padding: .15em .05em .25em;
    background-image: linear-gradient(100deg,
        var(--color-portal-action) 0%,
        var(--kp-postal-navy-400) 35%,
        var(--color-portal-accent) 75%,
        var(--color-portal-action) 100%);
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font: 700 clamp(1.85rem, 6.2vw, 2.6rem)/1.35 Alexandria, Arial, sans-serif;
    letter-spacing: -.02em;
    animation: ref-splash-shimmer 7s ease-in-out infinite;
}
[data-public-route="splash"] .ref-splash-wordmark-en {
    font: 700 clamp(1.5rem, 4vw, 2rem)/1.25 "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: .01em;
}
/* See the Arabic-page swap in this block's header: the reference paints the Latin wordmark in
   Alexandria on its Arabic page. Written against the two attributes <body> already carries so the
   rule stays inside this family's scope, matching `.ref-account-page[dir="rtl"]` at :7657. The
   tracking either wordmark declares is zeroed on the Arabic page by base.css:127 for both sides
   alike — the reference's Arabic page measures `normal` on both too, so nothing is needed here. */
[data-public-route="splash"][dir="rtl"] .ref-splash-wordmark-en {
    font-family: Alexandria, sans-serif;
}

[data-public-route="splash"] .ref-splash-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 84px;
}
/* 90deg is the reference's own physical direction and is kept: the gradient is symmetric about its
   centre, so the rule reads identically in both writing directions. */
[data-public-route="splash"] .ref-splash-divider i {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(0 51 160 / .22), transparent);
}
[data-public-route="splash"] .ref-splash-divider b {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-portal-accent);
    box-shadow: 0 0 8px rgb(203 160 82 / .6);
    animation: ref-splash-dot 2s ease-in-out infinite;
}

[data-public-route="splash"] .ref-splash-footer {
    position: absolute;
    z-index: 3;
    inset-inline: 0;
    inset-block-end: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    /* The reference's own value is a flat 28px. The max() is OURS (W2, recorded at W3): on a phone
       whose browser draws a home indicator over the bottom of the viewport, a flat 28px puts the
       ministry caption under it. Rendering-identical wherever the inset is 0 — which is every
       desktop browser and every measurement in the W2 fidelity pass — so it costs no fidelity and
       buys the phone case. Same call the plan sheet's footer makes at :7358. */
    padding-block: 0 max(env(safe-area-inset-bottom), 28px);
    padding-inline: 32px;
}

/* The loader bar is a REAL link to the login page (see Splash.cshtml) so a visitor whose scripts
   never run is not stranded; this wrapper is what gives that link a usable target without moving a
   painted pixel. It has no size and no paint of its own: the ::after overlay extends the anchor's
   hit region to 25px tall (WCAG 2.5.8 asks for 24) while the bar keeps the reference's exact 132x3
   geometry and the footer's flex layout stays as measured. The overlay cannot live on the bar
   itself — that element clips to its own 3px box (overflow:hidden, for the sweep). */
[data-public-route="splash"] .ref-splash-advance {
    position: relative;
    display: block;
}
[data-public-route="splash"] .ref-splash-advance::after {
    content: "";
    position: absolute;
    inset: -11px 0;
}

[data-public-route="splash"] .ref-splash-loader {
    position: relative;
    width: 132px;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(0 51 160 / .1);
    opacity: 0;
    animation: ref-splash-rise .7s ease-out 1.8s forwards;
}
/* translateX is physical for the same reason the sweep's `left` is: the reference runs this bar
   left-to-right in both languages and overrides nothing for RTL. */
[data-public-route="splash"] .ref-splash-loader span {
    position: absolute;
    inset: 0;
    width: 38%;
    border-radius: inherit;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-portal-accent) 30%,
        var(--color-portal-action) 50%,
        var(--color-portal-accent) 70%,
        transparent 100%);
    box-shadow: 0 0 8px rgb(203 160 82 / .5);
    animation: ref-splash-sweep 1.8s cubic-bezier(.65, 0, .35, 1) infinite;
}

[data-public-route="splash"] .ref-splash-footer p {
    margin: 0;
    color: rgb(71 85 105 / .7);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .24em;
    opacity: 0;
    animation: ref-splash-rise .7s ease-out 2.1s forwards;
}

@keyframes ref-splash-halo {
    0%, 100% { transform: scale(1); opacity: .85; }
    50% { transform: scale(1.12); opacity: 1; }
}
@keyframes ref-splash-conic {
    to { transform: rotate(360deg); }
}
@keyframes ref-splash-tile-enter {
    0% { opacity: 0; transform: scale(.6) rotateX(-22deg) translateY(20px); }
    60% { opacity: 1; transform: scale(1.06) rotateX(3deg) translateY(-3px); }
    100% { opacity: 1; transform: scale(1) rotateX(0) translateY(0); }
}
@keyframes ref-splash-tile-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes ref-splash-shine {
    0% { left: -120%; }
    55%, 100% { left: 150%; }
}
@keyframes ref-splash-logo-out {
    to { opacity: 0; }
}
@keyframes ref-splash-logo-in {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes ref-splash-rise {
    0% { opacity: 0; transform: translateY(16px); filter: blur(6px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes ref-splash-shimmer {
    0%, 100% { background-position: 0 0; }
    50% { background-position: 100% 0; }
}
@keyframes ref-splash-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: .55; }
}
@keyframes ref-splash-sweep {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(320%); }
}

/* The package's own arm, ported whole. `*` + !important is how the reference states it and is what
   makes it cover every animation in the family including ones added later; the four rules under it
   put the entrances and the logo crossfade at their FINISHED state, which is the only reason the
   screen is not left blank once its opacity-0 entrances stop running. They need no !important --
   each is the same specificity as the base rule it overrides and is declared after it. */
@media (prefers-reduced-motion: reduce) {
    [data-public-route="splash"] .ref-splash-screen * { animation: none !important; }
    [data-public-route="splash"] .ref-splash-wordmark-wrap,
    [data-public-route="splash"] .ref-splash-footer p,
    [data-public-route="splash"] .ref-splash-loader { opacity: 1; }
    [data-public-route="splash"] .ref-splash-logo-outline { opacity: 0; }
    [data-public-route="splash"] .ref-splash-logo-filled { opacity: 1; }
}

/* ============================================================
   TERMS PAGE + THE SHARED WIZARD HEADER — portal onboarding wave W3b (2026-08-09)
   Reference: docs/reference/subscribersPortal-KuwaitMail/terms.html, measured on the RENDERED page
   (localhost:8097/terms.html?lang=ar|en, 1440 and 390) against the served one-bundle cascade — never
   grepped from a source file (portal truth order D2).

   WHERE THE HEADER LIVES, AND WHY HERE. The reference pairs `ref-public` with `ref-account-page` on one
   element, and the whole account FAMILY (terms, account type, verify, register) shares that scope's
   wizard header. Terms is simply the first page of that family to ship, so the header block below is
   written under `.ref-account-page` — the reference's own selector — DECLARED ONCE. W4 sets the same
   body class and extends this block for the rest of the account theme; it must not re-declare a second
   header. Everything below the header divider is terms-only and scoped to `.ref-terms`.

   MEASURED SOURCE VALUES -> OFFICIAL TOKENS (portal palette clause, intake D1). The package's raw hexes
   are never copied; each is re-expressed in the official brand value it already equals or in the shipped
   neutral token of the same step:
     h1 ink        rgb(0,51,160)      -> var(--color-portal-action)    (#0033A0, already official)
     numeral ink   rgb(203,160,82)    -> var(--color-portal-accent)    (#CBA052, already official)
     muted ink     rgb(100,116,139)   -> var(--kp-slate-500)           (#64748b, the shipped token)
     body ink      rgb(15,23,42)      -> var(--kp-slate-900)           (#0f172a, the shipped token)
   NOTE the token NAMES: the reference bundle spells these `--color-primary` / `--color-accent-gold`,
   which do not exist in our tokens.css — a rule copied with those names resolves to nothing and the ink
   silently falls back to the inherited slate. Ours are the portal's own semantic pair, the same two the
   welcome-tour family binds (dated 2026-11-10, ruling 15 #1265: the rule named here is removed). Caught by measuring the rendered page, not by review (2026-08-09).
     separator     rgb(237,241,246)   -> written as an rgb() triple, not a hex literal (no hex outside
                                        tokens.css); it is the neutral hairline this family alone uses.
   RECORDED DIVERGENCES from the reference, all deliberate:
     1. The back marks come from our sprite (`#icon-arrow-duotone`) flipped per direction, where the
        reference swaps pre-coloured FILES and a Bootstrap-Icons glyph (`bi-arrow-right`/`bi-arrow-left`)
        — the same mechanism change W3 recorded, with an identical rendered direction. We ship no
        Bootstrap Icons font at all, so the glyph could not be reproduced as drawn.
     2. The in-article back keeps the reference's RENDERED type, not its authored type. Its own rule asks
        for 12px/800, but `.ref-public button { font: inherit }` outranks it in the served cascade and the
        control actually paints at the inherited 16px/400 — measured, and the rendered page is the truth
        (Core Rule 13 truth order). The gap between the two is the package's own defect, not ours to import.
     3. Focus rings: the reference declares none on this page. Ours join the shared focus-visible group
        at :1065, like every other portal control.
     4. The "last updated" line is DATA, not the reference's hardcoded "مايو 2026" sentence — the owner's
        W3b ruling. No styling difference; the value comes from the row's own audit column.
   ============================================================ */

/* ---- The account family's wizard header (SHARED — W4 extends, never re-declares) ---------------- */
.ref-account-page .ref-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    /* The reference's base header rule carries a 20px gap (app.bundle.css:24485) that its account-page rule keeps, on
       both pages that draw this header (terms and account type). Ours had none (2026-10-08); the header holds one
       item today, so the gap moves nothing it paints. */
    gap: 20px;
    width: min(88rem, 100%);
    min-height: 96px; /* 15 #1208: 96px (was 4rem) so the 80px logo shows whole with 8px above and below. */
    margin: 0 auto;
    padding: 0 2rem;
    border: 0;
    background: transparent;
}
.ref-account-page .ref-header-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.ref-account-page .ref-header-back {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-inline-start: -.5rem;
    padding: 0;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: .5rem;
    color: var(--kp-slate-900);
    background: rgb(255 255 255 / .6);
    box-shadow: 0 4px 16px -4px rgb(15 23 42 / .08);
    font-size: 18px;
    transition: transform .2s cubic-bezier(.16, 1, .3, 1), background-color .2s, box-shadow .2s;
}
.ref-account-page .ref-header-back .icon { width: 18px; height: 18px; }
/* The sprite arrow points RIGHT. "Back" points BACKWARD, so it mirrors under LTR — the same two-sense
   mechanism the welcome tour's arrow pair uses at :8678 (dated 2026-11-10, ruling 15 #1265: the rule named here is removed). */
.ref-account-page[dir="ltr"] .ref-header-back .icon { transform: scaleX(-1); }
.ref-account-page .ref-header-logo {
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    /* Ours is an <a>, so it would otherwise inherit the global brand-blue link colour from base.css
       onto its (image-only) box — the same call `.user-logo` records at :5145. */
    color: inherit;
}
.ref-account-page .ref-header-logo img { display: block; height: 80px; object-fit: contain; } /* 15 #1208: 80px (was 3rem), the size the owner chose so the logo's own words read clearly. */

/* The route-title bar: the gradient tick and the page name. `float: inline-start` rather than flex is
   the reference's own composition here, and the ::after clears it. */
.ref-account-page .ref-header-route {
    position: relative;
    z-index: 10;
    display: block;
    width: min(88rem, 100%);
    height: auto;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
}
.ref-account-page .ref-header-route::after { content: ""; display: block; clear: both; }
.ref-account-page .ref-header-route > i,
.ref-account-page .ref-header-route > h1 { display: block; float: inline-start; }
.ref-account-page .ref-header-route > i {
    width: 3px;
    height: 1.75rem;
    margin-inline-end: .625rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-portal-action), var(--color-portal-accent));
}
.ref-account-page .ref-header-route h1 {
    max-width: calc(100% - 1rem);
    margin: 0;
    overflow: hidden;
    color: var(--kp-slate-900);
    font: 700 28px/1.214 Alexandria, "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* The reference's own per-direction split: Arabic keeps Alexandria with the metric adjust, English
   leads with the Latin display family and its tighter tracking. */
.ref-account-page[dir="rtl"] .ref-header-route h1 { font-size-adjust: .48; }
.ref-account-page[dir="ltr"] .ref-header-route h1 {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    line-height: 32px;
    letter-spacing: -.02em;
}

@media (max-width: 800px) {
    .ref-account-page .ref-header { min-height: 88px; padding: 0 1rem; } /* 15 #1208: was 3.5rem, grown with the 80px logo */
    .ref-account-page .ref-header-route { padding: 1.25rem 1rem 0; }
    .ref-account-page .ref-header-route > i { display: none; }
    .ref-account-page .ref-header-route h1 { font-size: 24px; }
}

/* ---- The terms document ------------------------------------------------------------------------ */
/* `.ref-terms` already carries position/z-index from the W1 stacking block at :7655 — the wash is a
   painted sibling, so an un-layered <main> is painted over by it. */
.ref-terms {
    max-width: 880px;
    margin: 0 auto;
    padding: 52px 25px;
}

/* The in-article back. Type is INHERITED on purpose — see recorded divergence 2 in this block's
   header: the reference's own 12px/800 rule loses to `font: inherit` in its served cascade, and the
   rendered page is the target. Ours states the inheritance rather than relying on a reset elsewhere. */
.ref-terms > .ref-back {
    /* An inline box, as the reference's: its glyph and label sit on one line with the markup's own space
       between them, not a flex gap (portal group 3, 2026-09-09). */
    display: inline-block;
    padding: 1px 6px;
    border: 0;
    color: var(--kp-slate-500);
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.ref-terms > .ref-back .icon { width: 16px; height: 16px; vertical-align: middle; }
/* Backward-pointing, so it mirrors under LTR — the same sense as the header's circle above. */
[dir="ltr"] .ref-terms > .ref-back .icon { transform: scaleX(-1); }

.ref-terms article {
    margin-top: 23px;
    padding: 34px;
    border: 1px solid var(--kp-white);
    border-radius: 20px;
    background: rgb(255 255 255 / .84);
    box-shadow: 0 18px 45px rgb(15 23 42 / .05);
}
.ref-terms article > h1 {
    margin: 0;
    color: var(--color-portal-action);
    font: 800 35px/1.2 "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: normal;
}
/* Arabic leads with Alexandria, matching every other Arabic display run in the portal. */
.ref-public[dir="rtl"] .ref-terms article > h1 { font-family: Alexandria, Arial, sans-serif; }

.ref-terms article > p {
    margin: 12px 0 27px;
    color: var(--kp-slate-500);
    font-size: 13px;
}

.ref-terms section {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 16px;
    padding: 19px 0;
    border-top: 1px solid rgb(237 241 246);
}
.ref-terms section:first-of-type { border-top: 0; }
.ref-terms section > span {
    color: var(--color-portal-accent);
    font: 800 18px var(--font-mono);
}
.ref-terms section h2 {
    margin: 0 0 7px;
    color: var(--kp-slate-900);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: normal;
}
.ref-terms section p {
    margin: 0;
    color: var(--kp-slate-500);
    font-size: 13px;
    line-height: 1.72;
}

@media (max-width: 800px) {
    .ref-terms { padding: 27px 17px; }
    .ref-terms article { padding: 24px 20px; }
    .ref-terms article > h1 { font-size: 28px; }
}

/* The family's only motion is the header back button's hover transition; the package's own reduced-motion
   arm is the global one that stops exactly it (every ported family lands with its arm — W1 standing rule). */
@media (prefers-reduced-motion: reduce) {
    .ref-account-page .ref-header-back { transition: none; }
}

/* ============================================================
   ACCOUNT TYPE PAGE — portal onboarding wave W4 (2026-08-09)
   Reference: docs/reference/subscribersPortal-KuwaitMail/register-account-type.html, measured on the
   RENDERED page (localhost:8097/register-account-type.html?lang=ar|en at 1440 and 390) against the
   served one-bundle cascade — never grepped from a source file (portal truth order D2). This block
   EXTENDS the `.ref-account-page` scope the terms family opened above; the wizard header, the route
   title and the labelled step chrome are already declared there and at :7661 and are NOT repeated.

   WHICH GENERATION IS THE DESIGN. The served bundle carries TWO `ref-account-*` families and only the
   later one paints:
     * app.bundle.css:24485 — from `css/reference-exact.css`, an OLDER generation: 405px cards, a
       `::after { content: attr(data-number) }` ghost numeral, `#b68020` kickers, a translateY(-3px)
       hover, a 30px round arrow.
     * app.bundle.css:24854-25179 — from `css/theme.css`, which loads LATER and wins. It replaces every
       one of those: 375.5px (Arabic) / 356.44px (English) cards, REAL `.ref-account-number` spans, a
       scale(1.012) hover, a 1.75rem round arrow — and it deletes the old ghost outright with
       `.ref-account-card::after { content: none }` (:25086).
   Proof taken from the rendered page rather than from reading: the card's computed `min-height`
   measures 375.5px on the Arabic page and 356.44px on the English one — never 405px — and the card's
   `::after` content computes to `none`. Everything below is ported from the WINNING block only.

   MEASURED SOURCE VALUES -> OFFICIAL TOKENS (portal palette clause, intake D1). A package hex is never
   copied; each row states what changes so the numeric diff can be checked value by value:
     rgb(0,51,160)      `--color-primary`      -> var(--color-portal-action)      (already official)
     rgb(0,38,128)      `--color-primary-deep` -> var(--color-portal-action-hover) (already official —
                                                 the same pair the welcome tour's tile uses at :8888 (dated 2026-11-10, ruling 15 #1265: the rule named here is removed))
     rgb(203,160,82)    `--color-accent-gold`  -> var(--color-portal-accent)      (already official)
     rgb(248,250,252)   `--color-canvas`       -> var(--color-bg-canvas)          (already official)
     rgb(15,23,42)      `--color-text`         -> var(--kp-slate-900), and its alphas as rgb(15 23 42 / a)
     rgb(100,116,139)   muted ink              -> var(--kp-slate-500)
     #dfb760 (the package's own `--color-accent-gold-soft`, the corporate tile gradient's second stop)
                                               -> OFFICIAL light gold var(--kp-stamp-gold-300) #dfc080.
     #c49b4f (corporate kicker + tag ink)      -> OFFICIAL stamp gold var(--color-portal-accent) #cba052.
       A 7/5/3 move in RGB — the nearest official value, and the card carrying it is the DISABLED one,
       so the contrast question the muted-ink rejection turns on does not arise here.
     rgba(96,134,224,.16) (the SELECTED card's corner tint) -> OFFICIAL rgb(26 77 184 / .16)
       (--kp-postal-navy-400). This is a STALE pre-rebrand blue and the substitution CHANGES the
       rendered colour on purpose: the tint reads slightly deeper. Same mapping the splash family
       recorded for #3a7af0 at :7810.
     rgba(17,94,232,.04) (the page's line grid) -> OFFICIAL rgb(0 51 160 / .04), the same stale-blue
       row the splash grid recorded at .05 and the welcome grid at .043 (dated 2026-11-10, ruling 15 #1265: the rule named here is removed).

   RECORDED DIVERGENCES from the reference, all deliberate:
     1. THE CARDS ARE TWO ANCHORS, not two buttons. Each card is a real `<a href>` so the journey moves
        with scripts blocked (the forward-controls rule the onboarding pages have kept since 2026-08-09): the
        individual card to the verification step, and -- since 2026-10-07, ledger 15 #272 -- the
        corporate card to the company registration wizard. The tag swap costs the UA-driven match in
        `.ref-public button:active` (:6053) for the anchors — the card's own press arm below covers it,
        and measures the same scale the reference paints.
     2. THE DISABLED CARD STATE NO LONGER SHIPS. Until 2026-10-07 the corporate card was a disabled,
        still button (.6 opacity, a default cursor, every hover/press arm scoped `:not([disabled])`).
        Since ledger 15 #272 it is live and reacts like the reference's own card; the `[disabled]`
        scopes stay and match no shipped card. Everything else is faithful — the art, the ghost 02,
        the gold tile, the checks and the CTA row all render.
     3. `.ref-account-page .gold:hover .ref-round-arrow` (:25142, gold fill) is NOT ported: it is
        outranked in the reference's own cascade by `:hover:not(.selected)` (:25140) and never paints.
        Measured on the reference's hovered gold card: background rgb(0,51,160) — navy, not gold.
     4. The shell rules (flex column + 100svh) are scoped to this ROUTE rather than to
        `.ref-account-page`, which the shipped terms page also carries. The reference puts them on the
        class; ours would then move a page that is already built and verified, for no gain here.
     5. Ambient: the shared wash layer (base.css:36-60) is NOT edited — this route overrides its size,
        blur, opacity and corners for itself, which is exactly what the reference does. Every other
        portal page keeps the mirrored corners it ships with today (the 2026-07-18 shared-shell lesson).
     6. The card ART and the tile NOTCH keep the reference's PHYSICAL corner in both directions,
        written as a per-direction logical pair (never a `left`/`right` declaration — the house rule).
        Mirroring them would have put the art rings on top of the ghost numeral on the Arabic page,
        which the reference's own layout keeps on opposite corners; the numeral itself has the RTL arm
        the art rule lacks, so this reproduces what the reference paints rather than what it declares.
     7. The `html.account-type-route[dir="rtl"] { font-size:106.25% }` root-scale class is not ported —
        site.css already ships that exact pair and its <=800 reset (intake D11/P1, verified byte-equal).
     8. Focus rings: the reference declares `outline: 3px solid rgba(0,51,160,.35)` on the card and
        nothing anywhere else on the page. That declaration is carried below but is INERT — the house
        ring at :3518 is `!important` by the owner's order of 2026-07-20 and governs every focused
        control in both portals. Measured tab order on the built page: language pill -> back -> logo ->
        individual card, each painting the house 1px ring, the disabled corporate card skipped (measured
        before 2026-10-07; a link since ledger 15 #272, it now follows the individual card, not re-measured).
        (Corrected 2026-10-09: the ring a focused control paints here is 2px, not 1px -- the 1px `!important` ring
        this item names was scoped away from the portal by ruling 15 #157 on 2026-08-11, `body:not(.kp-portal)
        :focus-visible` further down this file, whose own note records the probe: 1px slate on the admin, 2px
        official navy on the portal.)

   MOTION. The page's only page-specific animation is `account-breathe` on the selected card's tag
   (2.8s, measured; the two body blobs belong to the shared layer, which base.css already stops). This
   family DOES carry its own reduced-motion arm in the source (app.bundle.css:25175) and it is ported
   below — with one selector added, because the package's arm does not actually stop the tag it names.
   The reasoning and the measurement are on the arm itself; read it before editing either side.
   ============================================================ */

/* ---- The route's ambient: canvas, line grid, blobs --------------------------------------------- */
/* The reference page paints a FLAT canvas under a masked line grid — not the radial paper wash the
   login card sits on. Both live on the same `.ref-grid-bg` element there: its account-scoped rule
   (app.bundle.css:24878) overrides only `background-image`, so the auth wash's gradients are replaced
   while its box stays. Ours does the same, at the reference's own selector, so no other page moves. */
.ref-account-page .ref-grid-bg {
    position: fixed;
    background-image:
        linear-gradient(rgb(0 51 160 / .04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(0 51 160 / .04) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .45;
    mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
}

/* THE LANGUAGE PILL HAS TO OUTRANK THE HEADER, or it cannot be used at all. The account family's header
   is sticky at z-index 50 and spans the full width of the page's top 68px — the exact box the shared
   pill sits in. Measured on the built page before this rule existed: document.elementFromPoint at the
   pill's own centre returned the HEADER, the pill never matched :hover under a real mouse, and its
   click therefore could not land — the visitor had no way to switch language on this page. The
   reference solves it in the same block everything else here comes from, by lifting the pill to
   z-index 150 (app.bundle.css:24888); only the stacking is taken, so the shipped pill keeps its own
   geometry and styling. Scoped to `.ref-account-page`, so it repairs the terms page — which mounts the
   same header over the same pill — and moves nothing else. (Corrected 2026-10-09: the account-type and
   Terms routes now take that block's geometry and styling too, in the two-route rules below; this rule
   still carries the stacking alone.) */
.ref-public.ref-account-page .ref-lang { z-index: 150; }

/* THE ACCOUNT-TYPE PAGE'S OWN PILL (2026-10-08). The reference draws its account pages' pill from a block of their own
   (app.bundle.css:24888-24921): weight 700, 6px corners, a rem box (.5rem .75rem, gap .5rem) and, in Arabic, a 19.5px
   line. The sign-in page's pill keeps the shared values above (weight 800, 4px corners), so the two references differ
   and the shared rule stays as the sign-in page measures it; this page takes its values on its own route, the way
   the register and verify routes take theirs. Measured before: weight 800 against 700 and corners 4px against 6px
   in both languages, and in Arabic an 18px line and a 36px pill against 19.5px and 38.5px above 800px.
   BOTH ACCOUNT PAGES TAKE THE WHOLE BLOCK (corrected 2026-10-09). The reference mounts its Terms page under the same
   account class as its account-type page (reference-exact.js :85 and :160), so one block draws both pills, and the
   block carries more than the values above: the pill is fixed to the viewport at a rem inset (1.25rem from the top and
   1.5rem from the inline end; 1rem and 1rem at 800px and below, app.bundle.css:25151-25152), so it does not scroll away
   with the page; its backdrop blurs 4px and its hover border takes the gold at .5; its code chip is weight 500 on a
   10px line, and the chip's `font` shorthand resets the Arabic body's .48 size adjustment (site.css), which ours
   inherited and which drew the chip 1.53px narrower; and the label on the English page, the Arabic word, is set in
   Alexandria first at that .48, where ours reached Alexandria through the Inter-first stack at full size, about 2.7px
   wider. Measured 2026-10-09 before this change: inset 40px against 25.5px and top 16px against 21.25px (Arabic, 900px
   and wider), the chip at 700 on a 19.5px line against 500 on 10px, and on the Terms page every shared value (800,
   4px, an 18px line, 8/12px). Each route takes the block by its own name; the sign-in page's pill keeps the shared
   rule.
   THE BLOCK'S MOTION TOO (2026-10-10). The block animates the border colour alone, at .2s (app.bundle.css:24910), and
   at its weight that transition outranks the reference's press rule, so a press there scales the pill to .98 at once
   and animates only the border. Ours kept the shared pill's border-and-transform pair at .2s at rest, and the portal's
   press layer (site.css, PRESS BASE LAYER) timed both at .14s when pressed (measured 2026-10-09, both pages, both
   languages, eight widths). The route now declares the block's transition. The press layer is kept: its scale still
   applies, and its own text says a component's override wins at an ordinary class weight, which this is; under
   reduced motion the portal's universal duration-zero still covers the pill. */
[data-public-route="account-type"] .ref-lang,
[data-public-route="terms"] .ref-lang {
    position: fixed;
    inset-block-start: 1.25rem;
    inset-inline-end: 1.5rem;
    gap: .5rem;
    padding: .5rem .75rem;
    border-radius: var(--kp-radius-sm);
    backdrop-filter: blur(4px);
    font-weight: 700;
    line-height: 18px;
    transition: border-color .2s ease;
}
[data-public-route="account-type"][dir="rtl"] .ref-lang,
[data-public-route="terms"][dir="rtl"] .ref-lang { line-height: 19.5px; }
[data-public-route="account-type"] .ref-lang:hover,
[data-public-route="terms"] .ref-lang:hover { border-color: rgb(203 160 82 / .5); }
/* The label is always the other language's word (_AuthLayout.cshtml), so on the English page it is the Arabic one. */
/* DATED 2026-10-24 (owner ruling 15 #743): the shared label now follows the sign-in reference, which draws both words
   differently from these two references. Measured on the rendered account-type and terms references (1440, both
   languages): the Arabic page's "English" in Inter with the adjustment off, 43.05px, and the English page's Arabic
   word at the pill's own 12px with the .48 adjustment, 24.88px - the values these routes drew before the shared
   change. So the routes keep them: the face and opt-out on the Arabic page, the size and line on the English one. */
[data-public-route="account-type"][dir="rtl"] .ref-lang span,
[data-public-route="terms"][dir="rtl"] .ref-lang span { font-family: var(--font-portal-bilingual); font-size-adjust: none; }
[data-public-route="account-type"][dir="ltr"] .ref-lang span,
[data-public-route="terms"][dir="ltr"] .ref-lang span { font-family: Alexandria, sans-serif; font-size-adjust: .48; font-size: inherit; line-height: inherit; }
[data-public-route="account-type"] .ref-lang small,
[data-public-route="terms"] .ref-lang small { color: rgb(71 85 105 / .6); font-weight: 500; line-height: 1; font-size-adjust: none; }
@media (max-width: 800px) {
    [data-public-route="account-type"] .ref-lang,
    [data-public-route="terms"] .ref-lang { inset-block-start: 1rem; inset-inline-end: 1rem; }
}

/* The shared wash blobs are BIGGER, softer and stronger on this route than the portal's default pair
   (base.css: 60vw / blur(100px) / .45). Sizes and filters only — see divergence 5 for the anchoring. */
[data-public-route="account-type"] { background: var(--color-bg-canvas); }
[data-public-route="account-type"]::before,
[data-public-route="account-type"]::after {
    inline-size: 55vw;
    block-size: 55vw;
    max-inline-size: 720px;
    max-block-size: 720px;
    filter: blur(120px);
    opacity: .55;
}
/* And they stay in the reference's CORNERS in both languages — blue top-left, warm bottom-right. The
   shared layer anchors them logically, so they swap sides on the Arabic page; the reference re-states
   physical `top/left` and `bottom/right` here and does not. Side-by-side captures at 1440 showed the
   difference plainly, so the corners are pinned per direction rather than mirrored (never a `left`/
   `right` declaration — the house rule; under RTL the inline axis is reversed, which is what makes
   inline-END the physical left). Scoped to this route: no other portal page's wash moves. */
[data-public-route="account-type"][dir="rtl"]::before { inset-inline-start: auto; inset-inline-end: -18vw; }
[data-public-route="account-type"][dir="rtl"]::after { inset-inline-end: auto; inset-inline-start: -18vw; }

/* ---- Shell + container ------------------------------------------------------------------------- */
/* The column that lets the footer band sit at the bottom of a short page: the shell is at least a
   viewport tall and the container is the one growing item. Measured on the reference at 1440x900 —
   container 772.52px tall against 747.11px of content, footer band at y=819.84. */
[data-public-route="account-type"] {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    /* `clip`, NOT the shared `overflow-x: hidden` from base.css:28 — and the difference is visible, not
       pedantic. CSS resolves the other axis of a non-visible overflow to `auto`, so `hidden` turns
       <body> into its own scroll container: this page is 909px tall in a 900px viewport, so it scrolled
       inside a 15px classic scrollbar and the content area measured 1425px against the reference's
       1434px. `clip` clips without creating that scroll container, which is exactly why the reference
       spells it out on this route (app.bundle.css:24856). Measured both ways at 1440x900. */
    overflow-x: clip;
}
.ref-account-page .ref-register-account {
    display: flex;
    flex: 1;
    flex-direction: column;
    /* The reference's own FROZEN pixel widths, one per language — deliberately not a rem or ch
       expression: 839.4375 is not 819.90625 scaled by the 17/16 root ratio (that would be 871.15), so
       the two are independent measured values the package's parity layer wrote out. */
    width: 819.90625px;
    max-width: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: 2.25rem 2rem;
}
.ref-account-page[dir="rtl"] .ref-register-account { width: 839.4375px; }

/* ---- Heading block ----------------------------------------------------------------------------- */
/* 36rem wide and pushed to the reading edge: `margin-inline-end: auto` is the reference's own
   `[dir="rtl"] { margin-right: 0; margin-left: auto }` written logically — in English the block simply
   starts at the container's edge, which is what its unset margin already does. */
.ref-account-page .ref-account-heading {
    width: 36rem;
    max-width: 100%;
    margin: 0 0 2.5rem;
}
.ref-account-page[dir="rtl"] .ref-account-heading { margin-inline-end: auto; }

.ref-account-page .ref-account-heading h1 {
    width: 100%;
    max-width: none;
    margin: 0 0 .75rem;
    color: var(--color-portal-action);
    font: 700 48px/1.04 Inter, "Plus Jakarta Sans", Alexandria, sans-serif;
    letter-spacing: -.025em;
}
/* Arabic leads with Alexandria and drops the Latin tracking; the metric adjust has to be restated
   because the `font:` shorthand above resets it (the same trap the splash wordmarks record at :7786). */
.ref-account-page[dir="rtl"] .ref-account-heading h1 {
    font-family: Alexandria, sans-serif;
    font-size-adjust: .48;
    letter-spacing: 0;
}
.ref-account-page .ref-account-heading p {
    max-width: 52ch;
    margin: 0;
    color: var(--kp-slate-500);
    font-size: 15.5px;
    line-height: 1.7;
}

/* ---- The two cards ----------------------------------------------------------------------------- */
.ref-account-page .ref-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}
.ref-account-page .ref-account-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 356.4375px;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid rgb(255 255 255 / .55);
    border-radius: 28px;
    color: var(--kp-slate-900);
    background: rgb(255 255 255 / .62);
    box-shadow: 0 12px 40px -12px rgb(15 23 42 / .18), inset 0 1px 0 rgb(255 255 255 / .85);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    text-align: start;
    /* Stated rather than inherited: one card is an <a>, the other a <button>, and `.ref-public button`
       re-states the `font` shorthand — without which the <button> card would take the UA's own 13.33px
       font and paint at a different optical size from its <a> sibling.
       THE SECOND LINE IS BELT-AND-BRACES, NOT THE FIX, and the sentence that used to sit here said
       otherwise ("which also clears the Arabic metric adjust"); corrected 2026-08-12, parity round 2
       package B, on a measurement. `font: inherit` is a CSS-WIDE KEYWORD, so it sets every one of the
       shorthand's sub-properties to `inherit` — including the reset-only `font-size-adjust`. Probed on
       our own running portal that day through CSSOM: a <button> given `font: inherit` computes
       font-size-adjust 0.48 (the same as a plain <span>), while a <button> given the four longhands
       family/size/weight/line-height: inherit computes `none`. So `.ref-public button { font: inherit }`
       already carries the adjust through, and this line changes nothing today. It is kept because it
       states the intent for a future rule that re-declares `font` with real values instead of the
       keyword — that form WOULD clear it. */
    font: inherit;
    font-size-adjust: inherit;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s, border-color .3s;
}
.ref-account-page[dir="rtl"] .ref-account-card { min-height: 375.5px; }

.ref-account-page .ref-account-card.selected {
    z-index: 1;
    border-color: rgb(255 255 255 / .7);
    background: radial-gradient(circle at 0 100%, rgb(26 77 184 / .16), transparent 42%), rgb(255 255 255 / .78);
    box-shadow:
        0 18px 50px -16px rgb(15 23 42 / .22),
        inset 0 1px 0 rgb(255 255 255 / .9),
        0 0 0 2px rgb(203 160 82 / .12);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    transform: scale(1.01);
}
.ref-account-page .ref-account-card.gold {
    background: radial-gradient(circle at 0 100%, rgb(203 160 82 / .1), transparent 42%), rgb(255 255 255 / .62);
}

/* The hover lift. `:not(.selected)` reproduces the reference's own cascade — its `.selected` rule is
   declared after `:hover` at equal specificity and wins, so the pre-selected card measures NO change
   at card level under the pointer. `:not([disabled])` is divergence 2's suppression. On this page both
   exclusions bite: the only enabled card is the selected one, so nothing here lifts today. */
.ref-account-page .ref-account-card:hover:not([disabled]):not(.selected) {
    transform: scale(1.012);
    box-shadow: 0 18px 42px -22px rgb(15 23 42 / .22), inset 0 1px 0 rgb(255 255 255 / .85);
}
.ref-account-page .ref-account-card:active:not([disabled]) { transform: scale(.97); }
/* INTENTIONALLY DEAD, kept as the reference's own declaration (the same call this file makes at :4825
   and :5008): the house focus ring at :3518 is `1px solid var(--color-text) !important` by the owner's
   order of 2026-07-20, so it outranks this and every other focus outline in both portals. Measured on
   the built page — the card's ring paints 1px slate at 3px offset, not this navy. Do NOT "fix" it by
   adding !important here; that would overturn a dated owner ruling. */
.ref-account-page .ref-account-card:focus-visible {
    outline: 3px solid rgb(0 51 160 / .35);
    outline-offset: 3px;
}
/* Divergence 2's designed state. Opacity ONLY — no colour, geometry or content change — so the card
   still reads as the same design, waiting. The pointer behaviour is not declared here because the house
   already owns it: `[aria-disabled="true"]` at :3525 sets `pointer-events: none` (with `cursor:
   not-allowed`), and the view sets that attribute. That is also the real reason the card is inert under
   the mouse — measured, with the pointer held over its centre: the card never matches :hover, and
   document.elementFromPoint there returns the GRID. The `:not([disabled])` scoping on the arms above is
   the second, independent guard, so removing either one alone still leaves the card still. */
.ref-account-page .ref-account-card[disabled] { opacity: .6; }

/* The corner rings. See divergence 6 for why the physical corner is held in both directions. */
.ref-account-page .ref-account-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.ref-account-page .ref-account-art::before,
.ref-account-page .ref-account-art::after {
    content: "";
    position: absolute;
    inset-block-start: auto;
    border-radius: 50%;
}
.ref-account-page .ref-account-art::before {
    inset-block-start: -8rem;
    width: 16.25rem;
    height: 16.25rem;
    border: 1px solid rgb(0 51 160 / .2);
}
.ref-account-page .ref-account-art::after {
    inset-block-start: -5rem;
    width: 11.25rem;
    height: 11.25rem;
    border: 1px solid rgb(0 51 160 / .1);
}
.ref-account-page[dir="ltr"] .ref-account-art::before { inset-inline-end: -6rem; }
.ref-account-page[dir="rtl"] .ref-account-art::before { inset-inline-start: -6rem; }
.ref-account-page[dir="ltr"] .ref-account-art::after { inset-inline-end: -3.5rem; }
.ref-account-page[dir="rtl"] .ref-account-art::after { inset-inline-start: -3.5rem; }
.ref-account-page .gold .ref-account-art::before { border-color: rgb(203 160 82 / .25); }
.ref-account-page .gold .ref-account-art::after { border-color: rgb(203 160 82 / .15); }

/* The ghost numeral is a REAL span in the winning generation (the losing one drew it from
   `attr(data-number)` in a ::after that the winner kills). Anchored to the trailing edge logically —
   the reference spells the same result out as a `right`/`left` pair. */
.ref-account-page .ref-account-number {
    position: absolute;
    z-index: 1;
    inset-block-start: .75rem;
    inset-inline-end: 1.25rem;
    color: rgb(15 23 42 / .05);
    font: 700 104px/1 "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: 0;
    pointer-events: none;
}
.ref-account-page .selected .ref-account-number { color: rgb(203 160 82 / .2); }

/* ---- Card head: the tile, the kicker, the name ------------------------------------------------- */
.ref-account-page .ref-account-icon {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    color: var(--kp-white);
    background: linear-gradient(145deg, var(--color-portal-action), var(--color-portal-action-hover));
    box-shadow: 0 10px 25px rgb(0 51 160 / .27);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.ref-account-page .gold .ref-account-icon {
    background: linear-gradient(145deg, var(--color-portal-accent), var(--kp-stamp-gold-300));
    box-shadow: 0 10px 25px rgb(203 160 82 / .26);
}
.ref-account-page .selected .ref-account-icon { transform: scale(1.05); }
.ref-account-page .ref-account-card:hover:not([disabled]) .ref-account-icon { transform: scale(1.05); }
.ref-account-page .ref-account-icon .icon { width: 1.5rem; height: 1.5rem; }
/* The small white notch on the tile's corner — physical corner held per divergence 6. */
.ref-account-page .ref-account-icon > i {
    position: absolute;
    inset-block-end: -.25rem;
    width: .75rem;
    height: .75rem;
    border: 1px solid rgb(203 160 82 / .4);
    border-radius: 50%;
    background: var(--kp-white);
}
.ref-account-page[dir="ltr"] .ref-account-icon > i { inset-inline-end: -.25rem; }
.ref-account-page[dir="rtl"] .ref-account-icon > i { inset-inline-start: -.25rem; }

.ref-account-page .ref-account-card h2 {
    position: relative;
    z-index: 2;
    margin: 0 0 .625rem;
    color: var(--kp-slate-900);
    font: 700 28px/1.1 "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: -.02em;
}
.ref-account-page[dir="rtl"] .ref-account-card h2 {
    font-family: Alexandria, sans-serif;
    font-size-adjust: .48;
    letter-spacing: 0;
}
.ref-account-page .ref-account-card > p {
    position: relative;
    z-index: 2;
    max-width: 36ch;
    margin: 0 0 .75rem;
    color: var(--kp-slate-500);
    font-size: 14px;
    line-height: 1.55;
}

/* ---- The three checks -------------------------------------------------------------------------- */
/* Dots, not ticks: the losing generation drew `li::before` bullets, and the winner hides those
   (:25125) in favour of a real `<i>` the card's own state can recolour. */
.ref-account-page .ref-check-list {
    position: relative;
    z-index: 2;
    display: grid;
    gap: .375rem;
    margin: 0 0 1rem;
    padding: 0;
    color: var(--kp-slate-500);
    font-size: 13px;
    list-style: none;
}
.ref-account-page .ref-check-list li {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
}
.ref-account-page .ref-check-list li > i {
    flex: 0 0 .375rem;
    width: .375rem;
    height: .375rem;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--color-portal-action);
}
.ref-account-page .gold .ref-check-list li > i { background: var(--color-portal-accent); }

/* ---- Card footer: the tag chip and the CTA row -------------------------------------------------- */
.ref-account-page .ref-account-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    margin-top: auto;
    padding-top: .5rem;
    color: var(--kp-slate-900);
}

.ref-account-page .ref-account-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 12.5px;
    font-weight: 700;
    /* Dated 2026-11-01 (rulings 15 #907/#910): the tag chip that used to sit at the footer's start is
       gone, and `space-between` with a single child would pull the CTA to the start. The auto margin keeps
       it at the footer's inline END, where it stood beside the tag. The footer's own `margin-top: auto`
       above still pins it to the card's bottom, so the two cards' CTAs share one line. */
    margin-inline-start: auto;
}
/* Both children — the label AND the round arrow — sit at .8 and lift together under the pointer. This
   rule (0,2,1) also outranks the round arrow's own `transition` (0,2,0) in the reference's cascade, so
   the arrow's colour swap below lands instantly while only its opacity eases. Measured, and reproduced
   by writing the same two selectors rather than by relying on order. */
.ref-account-page .ref-account-cta > span {
    opacity: .8;
    transition: opacity .2s;
}
.ref-account-page .ref-account-card:hover:not([disabled]) .ref-account-cta > span { opacity: 1; }

.ref-account-page .ref-round-arrow {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    border: 1px solid rgb(15 23 42 / .12);
    border-radius: 50%;
    color: var(--kp-slate-500);
    background: var(--kp-white);
    font-size: 13px;
    transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.ref-account-page .ref-choice-icon { display: block; width: .875rem; height: .875rem; }
/* The arrow points FORWARD, so it mirrors under RTL — the same one-symbol-plus-flip mechanism the
   header's back circle uses at :9153, where the reference swaps two pre-coloured FILES
   (icon-arrow-right-duotone-ink.svg / icon-arrow-left-duotone-ink.svg, whose own artwork is that same
   glyph with a mirroring transform). The chosen card's mark is a CHECK, which reads identically in both
   directions and is deliberately left alone — hence the `:not(.selected)`. */
.ref-account-page[dir="rtl"] .ref-account-card:not(.selected) .ref-choice-icon { transform: scaleX(-1); }
/* The selected card's disc is a filled navy pill with a soft ring — and its mark is the CHECK, not an
   arrow: the reference serves icon-check-circle-duotone-white.svg here and the arrow only on the card
   you have NOT chosen. */
.ref-account-page .selected .ref-round-arrow {
    border-color: var(--color-portal-action);
    color: var(--kp-white);
    background: linear-gradient(145deg, var(--color-portal-action), var(--color-portal-action-hover));
    box-shadow: 0 0 0 5px rgb(0 51 160 / .12);
    transform: scale(1.1);
}
.ref-account-page .ref-account-card:hover:not([disabled]):not(.selected) .ref-round-arrow {
    border-color: var(--color-portal-action);
    color: var(--kp-white);
    background: var(--color-portal-action);
}

/* ---- Consent line under the cards (dated 2026-11-01, ruling 15 #907) --------------------------- */
/* The journey no longer passes the welcome tour, so its consent line moved here. The declarations are
   the tour's own `[data-public-route="welcome"] .onboarding-terms` and its link rule, copied rather than
   shared so neither page's later restyle silently moves the other; the desktop step below is the tour's
   own min-width 1024 override.
   (Dated 2026-11-10, owner ruling 15 #1265: the welcome tour's own .onboarding-terms rules named in this note left this sheet, unused; the note is kept as history.) */
.ref-account-page .ref-account-terms {
    margin: 12px 0 0;
    color: rgb(135 147 164);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}
.ref-account-page .ref-account-terms a {
    color: rgb(81 96 117);
    font-weight: 800;
    text-decoration: underline;
}
@media (min-width: 1024px) {
    .ref-account-page .ref-account-terms {
        margin-block-start: 24px;
        text-align: start;
    }
}

/* ---- The phone tier ---------------------------------------------------------------------------- */
/* The eyebrow, the subtitle AND the footer band all leave the page below 800 — measured as rect 0 on
   the reference at 390 in both languages, not inferred from the rule. */
@media (max-width: 800px) {
    [data-public-route="account-type"]::before,
    [data-public-route="account-type"]::after {
        inline-size: 90vw;
        block-size: 90vw;
        filter: blur(80px);
        opacity: .45;
    }
    .ref-account-page .ref-register-account,
    .ref-account-page[dir="rtl"] .ref-register-account {
        width: 100%;
        padding: .75rem 1rem 2rem;
    }
    .ref-account-page .ref-account-heading { width: 100%; margin-bottom: 1rem; }
    .ref-account-page .ref-account-heading > p { display: none; }
    .ref-account-page .ref-account-heading h1 { margin-bottom: .5rem; font-size: 22px; line-height: 1.1; }
    .ref-account-page .ref-account-grid { grid-template-columns: 1fr; gap: .75rem; }
    .ref-account-page .ref-account-card,
    .ref-account-page[dir="rtl"] .ref-account-card {
        min-height: 0;
        padding: 1rem;
        border-radius: 24px;
    }
    .ref-account-page .ref-account-icon { width: 2.5rem; height: 2.5rem; margin-bottom: .5rem; }
    .ref-account-page .ref-account-icon .icon { width: 1.5rem; height: 1.5rem; }
    .ref-account-page .ref-account-card h2 { margin-bottom: .375rem; font-size: 20px; }
    .ref-account-page .ref-account-card > p { margin-bottom: .75rem; font-size: 13px; }
    .ref-account-page .ref-check-list { margin-bottom: 1rem; }
}

/* The package's own arm (app.bundle.css:25175), plus the ONE selector it is missing. Its
   `.ref-account-page .ref-account-tag` (0,2,0) is outranked by the rule that starts the breathing,
   `.ref-account-page .selected .ref-account-tag` (0,3,0) — so the package's arm never stops the tag.
   The reference still ends up still, but through a different mechanism: a global
   `*,*::before,*::after { animation-duration:.001ms !important }` at app.bundle.css:25325. Measured on
   both sides under an emulated reduce preference: the reference's tag reports animation-duration
   1e-05s (the global rule) while ours kept running the full 2.8s until the `.selected` selector below
   was added. We deliberately do NOT import that global sweep — it would reach every page of both
   portals — so the arm is written at the specificity that wins on its own.
   (Dated 2026-11-10, ruling 15 #1265: the tag is unused since ruling 15 #907 and its rules are removed, so the
   two tag selectors left this arm; the card and the icon keep it.) */
@media (prefers-reduced-motion: reduce) {
    .ref-account-page .ref-account-card,
    .ref-account-page .ref-account-icon {
        animation: none;
        transition: none;
    }
}

/* ============================================================
   VERIFY IDENTITY PAGE — portal onboarding wave W5 (2026-08-09)
   Reference: docs/reference/subscribersPortal-KuwaitMail/register-verify-id.html, measured on the
   RENDERED page (localhost:8097/register-verify-id.html?lang=ar|en at 1440 and 390) against the served
   one-bundle cascade — never grepped from a source file (portal truth order D2). The page is a stub that
   js/verify-id.js builds, so BOTH of its states had to be DRIVEN to be measured; the step-B card had
   never been element-censused before this package.

   THIS PAGE HAS ITS OWN CHROME. It is NOT the wizard header the terms and account-type pages share
   (`.ref-account-page .ref-header`, :9116). Measured differences, not stylistic ones: the entry header is
   `position: relative` at z-5 over a 64px row with a r12 back button on a white .62 fill, while the
   account family's is `sticky` at z-50 with a r8 back on white .6; and the step-B state brings a THIRD
   header — sticky, 56px (64 at >=1024), width-capped and centred, with a scroll-revealed veil behind it.
   Anything written under `.ref-account-page` would therefore be wrong here, which is why this family is
   scoped to its own route and declares its chrome from scratch.

   "MOBILE" MEANS THE KUWAIT MOBILE ID APP (هويتي), NOT A VIEWPORT. The reference names the second state's
   family `verify-mobile-*` because it is the step where the subscriber approves on the هويتي app; every
   one of those rules applies at EVERY width. The names are kept as the reference wrote them so each rule
   can be traced back to its source line.

   WHICH GENERATION IS THE DESIGN (the third cascade trap of this wave). The served bundle carries an
   OLDER `.ref-mobile-id-*` generation in `css/reference-exact.css` (app.bundle.css:24481+), which loads
   LATER than the `css/verify-id.css` layer (:19491-21045) and would win if it matched. It matches
   NOTHING: driven to the pending state and counted on the rendered page, the DOM carries 21 elements
   with `verify-mobile-*` classes and ZERO with `ref-mobile-*`. The old family is dead markup-side, so
   this port reads the verify-id.css layer only.

   MEASURED SOURCE VALUES -> OFFICIAL TOKENS (portal palette clause, intake D1). A package hex is never
   copied; each row states what changes so the numeric diff can be checked value by value:
     rgb(0,51,160)   `--color-primary`         -> var(--color-portal-action)       (already official)
     rgb(0,38,128)   `--color-primary-deep`    -> var(--color-portal-action-hover) (already official)
     rgb(203,160,82) `--color-accent-gold`     -> var(--color-portal-accent)       (already official)
     rgb(223,192,128)`--color-accent-gold-soft`-> var(--kp-stamp-gold-300)         (already official)
     rgb(248,250,252)`--color-canvas`          -> var(--color-bg-canvas)           (already official)
     rgb(226,232,240)`--color-border`          -> var(--kp-slate-200)              (already official)
     rgb(15,23,42)   `--color-text`            -> var(--kp-slate-900), alphas as rgb(15 23 42 / a)
     rgb(71,85,105)  `--color-text-muted`      -> var(--kp-slate-600), alphas as rgb(71 85 105 / a)
     rgb(200,16,46)  `--color-danger`          -> var(--kp-portal-danger-500)      (already official)
     THE AMBIENT PAIR is the SAME four stale stops the register blooms already ruled at :4317 (P6, D1) —
     #3a7af0 -> --kp-postal-navy-400 at .85, #7850ff -> --kp-postal-navy-700 at .25, #ff6b4a ->
     --kp-red-700 at .5, #f0c04a -> --kp-stamp-gold-300 at .25 — reused verbatim rather than re-decided,
     because the two pages' gradients are byte-identical in the bundle.
     rgba(17,94,232,.04) (the line grid) + rgba(17,94,232,.25) (the hero's drop shadow) -> OFFICIAL navy
       at the same alphas, the same stale-blue row the splash grid recorded at :7810.
     rgba(5,93,172,.1) and .55 (the card's top ribbon + the action's shadow) -> OFFICIAL navy at the same
       alphas: a stale mid-blue whose job is "the button's own colour", and the button itself is navy.
     #059669 (the 12/12 counter) and #10b981 / #a7f3d0 / #ecfdf5 / rgba(52,211,153,.15) (the verified
       dress) -> the OFFICIAL brand green var(--kp-green-700) #009a44, its .35 and .15 alphas for the
       border and the halo, and the shipped pale fill var(--kp-tile-green) #d1fae5. Same stale-emerald
       ruling the dashboard status chip recorded at :5558 and the receipt badge at :6894.
     rgba(212,175,55,.18) (the counter's breathing ring, a classic #d4af37 gold) -> OFFICIAL stamp gold
       var(--color-portal-accent) at the same .18.

   RECORDED DIVERGENCES from the reference, all deliberate:
     1. THE LANGUAGE PILL IS THE SHARED ONE, RE-DRESSED. The reference draws its own `.verify-language`
        button; ours keeps the layout's single culture LINK (`.ref-lang`) and overrides the values that
        differ — fixed rather than absolute, the 20/24 offsets, the 6px corner, the 0 4px 12px shadow,
        the 8px blur, and the hover (white .8 -> .96 with a gold .5 border and NO lift). Measured with a
        real mouse on the rendered reference: the box lives on the INNER button and the wrapper is a bare
        positioning box, which is what our single element already is. One culture control per page keeps
        the switch a server redirect on every screen.
     2. THE ENTRY STATE USES min-height, NOT the reference's `height: 100svh; overflow: hidden`. Below
        1024 the reference pins the entry column to exactly one viewport and CLIPS anything taller — and
        ours can be taller, because our Civil-ID field can carry an inline error message the reference's
        never has. Ours grows and the page scrolls instead of putting the CTA out of reach. At both
        measured bands (1440x900, 390x844) the composition fits, so every rect is identical either way.
     3. NO ASSISTANT. The reference's floating assistant FAB and chat panel (`verify-assistant-*`,
        `verify-chat-*`, ~40 rules) are excluded by the standing D9 ruling and are not ported.
     4. OUR FAILURE ARMS HAVE NO REFERENCE. The mockup's demo always succeeds after 1.8s: it has no
        rejected, expired or rate-limited state at all. Ours return to the entry form carrying the
        shipped `Auth.Login.*` sentence in the page's own panel box — the same surface and the same
        strings the login card uses, so nothing was invented for them.
     5. Focus rings: the reference declares `outline: 2px solid rgba(0,51,160,.55)` on this page's
        controls. Ours join the shared focus-visible group at :1065, which is `!important` by the owner's
        order of 2026-07-20 and governs every focused control in both portals.
     6. The back mark comes from our sprite (`#icon-arrow-duotone`) flipped per direction, where the
        reference swaps a per-language inline path — the same mechanism change W3/W3b/W4 recorded, with
        an identical rendered direction.
     7. Type families and the RTL tracking reset are the SHIPPED tokens, not per-page declarations: the
        reference re-declares "Plus Jakarta Sans -> Alexandria" and `letter-spacing: 0` per rule, while
        our `--font-display` already switches on `html[lang="ar"]` (tokens.css:894) and base.css:127
        already zeroes tracking on every Arabic run without its own dir="ltr". Same rendered result from
        one place instead of thirty.

   MOTION. Nine page animations, ported at the reference's own timings: verify-blob-a 18s / verify-blob-b
   22s (the ambient pair) · verify-idle-float 3.6s (the hero) · verify-breathe-glow 2.8s (the 12/12
   counter) · verify-caret-blink 1s steps(2,start) · verify-stamp-in 480ms (one digit as it lands) ·
   verify-radar-ping 1s, verify-status-ping 1.4s and verify-spin .8s (the step-B stage, strip and
   loaders). The body's own blob pair (base.css:36-60) runs UNDER them, exactly as the reference's does —
   FOUR ambient layers on this page, which the W0 animation census recorded and this port keeps. The
   family carries the reference's OWN reduced-motion arm (app.bundle.css:21030) at the bottom.
   ============================================================ */

/* ---- The route: canvas, line grid, ambient pair ------------------------------------------------ */
/* The reference paints a FLAT canvas under a masked line grid, not the radial paper wash the login card
   sits on. Both live on the same `.ref-grid-bg` element there, so ours re-points the shipped element the
   same way the account route does at :9388 — no extra node, and no other page moves. The values are
   byte-equal to that route's (both reference pages draw the same 56px grid at .04, opacity .45);
   declared again rather than shared so either family can be re-measured without moving the other. */
body[data-public-route="verify"] {
    min-height: 100svh;
    background: var(--color-bg-canvas);
    /* The reference page carries the Arabic body leading (1.625) and the Latin one (1.5) on its own
       root; `.ref-public` pins every auth page to a flat 1.5, which is 1.5 on English (right) and 1.5
       on Arabic (wrong, and measurable: the counter chip renders 15.75px against the reference's
       17.06, and the whole field column ends up 1.4px short). The shipped token already holds both
       values -- html[lang="ar"] moves --leading-body to 1.625 -- so the route just stops flattening it. */
    line-height: var(--leading-body);
    /* And the reference's BODY is 16px even on the Arabic page, where the ROOT is 17px (the root scale
       exists for rem units, which is why both sides agree on it). Ours inherits the root, and the one
       place that shows is the strut of the line box holding the card kicker's inline `small`: it made
       the Kuwait Mobile ID card 0.63px taller than the one being matched. Declared here rather than in
       site.css because it is this route's fact, not the portal's. */
    font-size: 16px;
}
body[data-public-route="verify"] .ref-grid-bg {
    position: fixed;
    z-index: 1;
    opacity: .45;
    background-image:
        linear-gradient(rgb(0 51 160 / .04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(0 51 160 / .04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .5), transparent 80%);
}

/* FOUR AMBIENT LAYERS RUN HERE; ONLY TWO PAINT. The W0 census recorded four running animations on this
   page — the shared body::before/::after pair (base.css:36-60) and the page's own two discs below — and
   the honest reconciliation is that the body pair is INVISIBLE on the reference. Its page wrapper
   (`.verify-page`) is a relatively-positioned, `isolation: isolate` box that fills the viewport and
   paints an OPAQUE canvas (#f8fafc), so the two negative-z-index body blobs behind it never reach the
   screen. Measured, not reasoned: hiding only the two `.verify-ambient` spans on the rendered reference
   leaves a completely FLAT canvas (capture `onb-w5-probe-ref-no-ambient.png`, 2026-08-09).
   Our states sit directly on the body with no such covering element, so reproducing what the reference
   SHOWS means switching the body pair off for this route — the same suppression the signed-in shell
   already uses, and the same reason (a page that paints its own field). base.css is untouched. */
[data-public-route="verify"]::before,
[data-public-route="verify"]::after { content: none; }

/* Two fixed 720px discs under a 120px blur at opposite PHYSICAL corners, each drifting on its own long
   alternating loop. REAL elements, not pseudo-elements, for the reason the register pair records at
   :4306: they must land at z-0 in the PAGE's stacking context — above the grid wash and below every
   lifted layer — which a pseudo-element on a positioned ancestor cannot do. */
.verify-ambient {
    position: fixed;
    z-index: 0;
    width: min(55vw, 720px);
    height: min(55vw, 720px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: .55;
    pointer-events: none;
    /* The reference's own hint (same rule): these discs animate for the whole life of the page, and
       promoting them keeps the browser from re-rasterising a 120px blur over a 720px box every frame. */
    will-change: transform;
}
.verify-ambient--blue {
    inset-block-start: -18vw;
    inset-inline-start: -18vw;
    background: radial-gradient(circle at 30% 30%,
        rgb(26 77 184 / .85) 0%,
        rgb(0 51 160 / .55) 40%,
        rgb(0 38 128 / .25) 75%,
        transparent 100%);
    animation: verify-blob-a 18s ease-in-out infinite alternate;
}
/* Corners follow the SAME recorded exception as the register and login blooms: the reference pins them
   physically (top/left on the blue, right/bottom on the gold) with no direction override in the served
   bundle, so each [dir="rtl"] arm swaps the inline side back and the painted corner is equal in both
   languages. */
[dir="rtl"] .verify-ambient--blue {
    inset-inline-start: auto;
    inset-inline-end: -18vw;
}
.verify-ambient--gold {
    inset-block-end: -18vw;
    inset-inline-end: -18vw;
    background: radial-gradient(circle at 70% 70%,
        rgb(203 160 82 / .65) 0%,
        rgb(200 16 46 / .5) 40%,
        rgb(223 192 128 / .25) 75%,
        transparent 100%);
    animation: verify-blob-b 22s ease-in-out infinite alternate;
}
[dir="rtl"] .verify-ambient--gold {
    inset-inline-end: auto;
    inset-inline-start: -18vw;
}

/* The reference's own narrow tier for the discs (its @media max-width:767) — 90vw uncapped, a softer
   blur and a lower opacity, so the wash stays a corner glow instead of swallowing a phone-width page.
   The -18vw offsets deliberately do NOT move; the reference leaves them alone here too. */
@media (max-width: 767px) {
    .verify-ambient {
        width: 90vw;
        height: 90vw;
        filter: blur(80px);
        opacity: .45;
    }
}

/* ---- The shared culture pill, re-dressed for this route (divergence 1) ------------------------- */
body[data-public-route="verify"] .ref-lang {
    position: fixed;
    z-index: 150;
    inset-block-start: 20px;
    inset-inline-end: 24px;
    min-height: 36px;
    border-radius: var(--kp-radius-xs);
    box-shadow: 0 4px 12px rgb(15 23 42 / .03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color .2s ease, background-color .2s ease;
    /* The reference pins the pill's own leading to 1 so its 36px floor is what sets the height. Ours
       needs the same declaration BECAUSE this route restores the Arabic 1.625 body leading above: a
       12px caption at 1.625 makes a 19.5px line box and pushes the pill to 37.5px, 1.5px past the
       target. Every other portal page inherits 1.5, lands on 18px, and already measures 36. */
    line-height: 1.5; /* DATED 2026-10-24: now the shared pill's own leading and corner (the sign-in pill's 18px line box and 4px; this page's reference draws no pill of its own); still declared, for the reason above, and still 36px: the flex row's 18px caption box + 16px padding + 2px border. */
}
/* Measured with a real mouse on the rendered reference: background .8 -> .96 and the border to gold at
   .5, with NO lift. The shared pill's hover no longer lifts, so nothing is cancelled here: a `transform:
   none` on the hover outranked the press base and held the pressed pill at scale 1 (portal group 3,
   2026-09-09). */
body[data-public-route="verify"] .ref-lang:hover {
    border-color: rgb(203 160 82 / .5);
    background: rgb(255 255 255 / .96);
}
body[data-public-route="verify"] .ref-lang small { color: rgb(71 85 105 / .6); font-weight: 700; }
@media (max-width: 639px) {
    body[data-public-route="verify"] .ref-lang { inset-block-start: 16px; inset-inline-end: 16px; }
}

/* ---- State A: the Civil-ID entry column -------------------------------------------------------- */
.verify-entry-state {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 100svh;     /* divergence 2 — the reference pins a fixed height here and clips */
    flex-direction: column;
}
.verify-entry-header,
.verify-entry-route-title {
    position: relative;
    z-index: 5;
    width: min(96rem, 100%);
    margin-inline: auto;
}
.verify-entry-header-inner {
    display: flex;
    min-height: 96px; /* 15 #1208: 96px (was 64) so the 80px logo shows whole with 8px above and below. */
    align-items: center;
    padding-inline: 16px;
}
.verify-entry-header-inner > div {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Measured with a real mouse on the reference: this control does NOT react to hover — no lift, no fill
   change, no shadow change. Its step-B twin further down DOES, which is why the two are separate rules
   rather than one shared control. */
.verify-entry-back {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: 12px;
    color: var(--kp-slate-900);
    background: rgb(255 255 255 / .62);
    box-shadow: 0 3px 12px rgb(15 23 42 / .07);
}
.verify-entry-back .icon { width: 18px; height: 18px; }
/* The sprite arrow points RIGHT. "Back" points BACKWARD, so it mirrors under LTR — the same two-sense
   mechanism the welcome tour's pair uses at :8678 (dated 2026-11-10, ruling 15 #1265: the rule named here is removed) and the account header's back at :9153. BOTH of this
   page's back controls take it, which is why the card's is listed here beside the entry one rather than
   down in its own block: they are one behaviour, and splitting them is how one gets forgotten (this rule
   was missing on the first cut and the English page pointed the arrow forward — caught in the 390
   side-by-side, not by reading). */
[data-public-route="verify"][dir="ltr"] .verify-entry-back .icon,
[data-public-route="verify"][dir="ltr"] .verify-mobile-back .icon { transform: scaleX(-1); }
.verify-entry-logo {
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    /* Ours is an <a>, so it would otherwise inherit the global brand-blue link colour from base.css onto
       its (image-only) box — the same call `.ref-account-page .ref-header-logo` records at :9155. */
    color: inherit;
}
.verify-entry-logo img { display: block; width: auto; height: 80px; object-fit: contain; } /* 15 #1208: 80px (was 48), the size the owner chose so the logo's own words read clearly. */

.verify-entry-route-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 0;
}
/* The gradient tick is decorative and appears only on the wide tier — the reference hides it below 1024
   rather than shrinking it. */
.verify-entry-route-title i {
    display: none;
    width: 3px;
    height: 28px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-portal-action), var(--color-portal-accent));
}
.verify-entry-route-title h1 {
    margin: 0;
    color: var(--kp-slate-900);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.verify-entry-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: calc(100svh - 152px);
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
}
.verify-entry-inner { width: 100%; max-width: 440px; }

.verify-entry-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-block-end: 20px;
    text-align: center;
}
.verify-entry-hero img {
    width: 80px;
    height: 80px;
    margin-block-end: 12px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgb(0 51 160 / .25));
    animation: verify-idle-float 3.6s ease-in-out infinite;
}
.verify-entry-hero h1 {
    margin: 0 0 8px;
    color: var(--color-portal-action);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.verify-entry-hero p {
    max-width: 36ch;
    margin: 0;
    color: var(--kp-slate-600);
    font-size: 13.5px;
    line-height: 1.6;
}

.verify-entry-form {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: 8px;
    background: rgb(255 255 255 / .78);
    box-shadow: 0 18px 50px -16px rgb(15 23 42 / .22), inset 0 1px 0 rgb(255 255 255 / .9);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
}
/* Two blooms bleeding in from opposite corners of the card, clipped by its own overflow. Physical
   corners, per the same recorded exception the ambient pair carries. */
.verify-entry-bloom {
    position: absolute;
    width: 176px;
    height: 176px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(48px);
}
.verify-entry-bloom--gold { inset-block-start: -80px; inset-inline-end: -80px; background: rgb(203 160 82 / .15); }
.verify-entry-bloom--blue { inset-block-end: -96px; inset-inline-start: -48px; background: rgb(0 51 160 / .1); }
[dir="rtl"] .verify-entry-bloom--gold { inset-inline-end: auto; inset-inline-start: -80px; }
[dir="rtl"] .verify-entry-bloom--blue { inset-inline-start: auto; inset-inline-end: -48px; }

.verify-entry-fields {
    position: relative;
    display: grid;
    gap: 20px;
}
.verify-entry-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.verify-entry-label-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--kp-slate-600);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.verify-entry-label-row label .icon { width: 14px; height: 14px; color: var(--color-portal-accent); }

/* The n/12 counter. Muted until the twelfth digit lands, then the official brand green with a slow
   breathing ring — measured live in all three states (empty, partial, complete) AFTER the .2s colour
   transition settles, because reading it synchronously returns the value it is transitioning FROM. */
.verify-paci-count {
    padding: 2px 6px;
    border-radius: 3px;
    color: rgb(71 85 105 / .55);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: color .2s ease;
}
.verify-paci-count.is-complete {
    color: var(--kp-green-700);
    animation: verify-breathe-glow 2.8s ease-in-out infinite;
}

/* The stamp display: a real <input> lies transparent over a rendered run of digit spans, so each digit
   can land with its own small animation while the field stays a plain text input for the keyboard, the
   IME and assistive tech. */
.verify-paci-shell {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: start;
}
.verify-paci-display {
    display: flex;
    min-height: 56px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 6px;
    color: var(--color-portal-action);
    background: rgb(255 255 255 / .8);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: border-color .2s ease, box-shadow .2s ease;
}
[dir="rtl"] .verify-paci-display { justify-content: flex-end; }
.verify-paci-shell:focus-within .verify-paci-display {
    border-color: var(--kp-stamp-gold-300);
    box-shadow: 0 0 0 2px rgb(203 160 82 / .25), inset 0 1px 0 rgb(255 255 255 / .5);
}
/* The rejected dress. The invalid class lands on the INPUT (the shared field engine's own contract) and
   the input is the invisible overlay, so the paint has to reach back out to the display — which :has()
   is the only selector that can do here, the display being a PREVIOUS sibling. Same mechanism the
   drawer summary uses at :2613. */
.verify-paci-shell:has(input.is-invalid) .verify-paci-display {
    border-color: var(--kp-portal-danger-500);
    box-shadow: 0 0 0 2px rgb(200 16 46 / .18), inset 0 1px 0 rgb(255 255 255 / .5);
}
.verify-paci-display,
.verify-paci-display * {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    line-height: 1.2;
}
.verify-paci-digits { display: inline-flex; }
.verify-stamp-digit { display: inline-block; transform-origin: 50% 60%; }
.verify-stamp-digit.is-entering { animation: verify-stamp-in 480ms cubic-bezier(.16, 1, .3, 1) both; }
.verify-paci-caret,
.verify-paci-placeholder i {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-inline-start: 2px;
    border-radius: 999px;
    background: var(--color-portal-accent);
    vertical-align: middle;
    animation: verify-caret-blink 1s steps(2, start) infinite;
}
.verify-paci-placeholder {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: rgb(71 85 105 / .4);
}
.verify-paci-placeholder i {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    height: auto;
    margin: 0;
}
.verify-paci-shell input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    cursor: text;
}
/* The shared field engine inserts its message directly after the INPUT, which lives inside the shell —
   so it is given the full width there rather than sitting on the display's own line. */
.verify-paci-shell .field-error-msg { display: block; width: 100%; }

.verify-paci-help {
    margin: 0;
    color: var(--kp-slate-600);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.625;
}

/* SCOPED TO THE ROUTE ON PURPOSE, like the register submit at :4841: `.ref-public button { font:
   inherit }` (:4128) is (0,1,1) and would inherit this button's 14px/700 away, painting it at the body's
   own size. The route hook lifts the whole rule to (0,2,0), which is the shipped fix for exactly this. */
body[data-public-route="verify"] .verify-continue {
    position: relative;
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    padding: 16px 24px;
    border: 0;
    border-radius: 6px;
    color: var(--kp-white);
    background: linear-gradient(135deg, var(--color-portal-action), var(--color-portal-action-hover));
    box-shadow: 0 0 0 4px rgb(0 51 160 / .12), 0 12px 32px -8px rgb(0 51 160 / .45);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: filter .2s ease, transform 140ms cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
.verify-continue > span,
.verify-continue > .icon { position: relative; z-index: 1; }
.verify-continue .icon { width: 14px; height: 14px; }
/* The sweep: a 58%-wide band of white at .15 that crosses the button on hover over .7s. */
.verify-continue > i {
    position: absolute;
    inset: 0;
    width: 58%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .15), transparent);
    transform: translateX(-180%) skewX(-20deg);
    transition: transform .7s ease;
}
.verify-continue:hover:not(:disabled) { filter: brightness(1.1); }
.verify-continue:hover:not(:disabled) > i { transform: translateX(280%) skewX(-20deg); }
.verify-continue:active:not(:disabled) { transform: scale(.97); }
.verify-continue:disabled { cursor: not-allowed; opacity: .3; }

/* ---- State B: the Kuwait Mobile ID card -------------------------------------------------------- */
.verify-step-state {
    position: relative;
    z-index: 2;
    min-height: 100svh;
    overflow: hidden;
}
.verify-mobile-header {
    position: sticky;
    z-index: 50;
    top: 0;
    height: 88px; /* 15 #1208: 88px (was 56; 96px from 1024, was 64) so the 80px logo is not cut off. */
}
/* The veil is its own layer rather than a background on the header, so it can FADE: the header stays
   transparent over the page's wash until content starts sliding under it. */
.verify-mobile-header > span {
    position: absolute;
    inset: 0;
    border-block-end: 1px solid rgb(226 232 240 / .7);
    background: rgb(248 250 252 / .95);
    opacity: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity .3s ease;
}
.verify-mobile-header.is-scrolled > span { opacity: 1; }
.verify-mobile-header-inner,
.verify-mobile-title-inner,
.verify-mobile-container {
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    padding-inline: 16px;
}
.verify-mobile-header-inner { position: relative; height: 100%; }
.verify-mobile-header-inner > div {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 12px;
}
.verify-mobile-back {
    display: grid;
    width: 36px;
    height: 36px;
    margin-inline-start: -8px;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / .7);
    border-radius: 10px;
    color: var(--kp-slate-900);
    background: rgb(255 255 255 / .6);
    box-shadow: 0 1px 3px rgb(0 0 0 / .04), 0 4px 12px rgb(0 0 0 / .06);
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.verify-mobile-back .icon { width: 18px; height: 18px; }
.verify-mobile-back:hover {
    background: var(--kp-white);
    box-shadow: 0 4px 16px rgb(0 51 160 / .12);
    transform: translateY(-2px);
}
.verify-mobile-logo {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}
.verify-mobile-logo img { display: block; width: auto; height: 80px; object-fit: contain; } /* 15 #1208: 80px (was 48), the size the owner chose so the logo's own words read clearly. */

.verify-mobile-title { position: relative; z-index: 2; }
.verify-mobile-title-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block-start: 20px;
}
.verify-mobile-title-inner > span { display: none; }
.verify-mobile-title h1 {
    margin: 0;
    color: var(--kp-slate-900);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.verify-mobile-container {
    position: relative;
    z-index: 2;
    padding-block: 32px;
}
.verify-mobile-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--kp-slate-200);
    border-radius: 12px;
    background: var(--kp-white);
    box-shadow: 0 1px 2px rgb(15 32 64 / .05), 0 18px 40px -12px rgb(15 32 64 / .15);
}
/* The decorative top ribbon (completeness-audit amendment): a navy glow fading out over the card's first
   128px, behind everything in it. */
.verify-mobile-ribbon {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 128px;
    pointer-events: none;
    background: radial-gradient(60% 100% at 50% 0%, rgb(0 51 160 / .1), rgb(0 51 160 / 0) 70%);
}
.verify-mobile-card-content { position: relative; padding: 24px; }

.verify-mobile-hero { margin-block-end: 24px; text-align: center; }
.verify-mobile-stage {
    position: relative;
    display: inline-grid;
    width: 128px;
    height: 128px;
    margin-block-end: 16px;
    place-items: center;
}
.verify-mobile-halo {
    position: absolute;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: rgb(0 51 160 / .1);
    filter: blur(24px);
    transition: background-color .5s ease;
}
.verify-mobile-halo.is-pending { background: rgb(0 51 160 / .15); }
.verify-mobile-halo.is-verified { background: rgb(0 154 68 / .15); }
.verify-mobile-radar {
    position: absolute;
    z-index: 1;
    border: 1px solid rgb(0 51 160 / .3);
    border-radius: 50%;
    animation: verify-radar-ping 1s cubic-bezier(0, 0, .2, 1) infinite;
}
.verify-mobile-radar--one { width: 96px; height: 96px; }
.verify-mobile-radar--two {
    width: 112px;
    height: 112px;
    border-color: rgb(0 51 160 / .2);
    animation-delay: .4s;
}
.verify-mobile-disc {
    position: relative;
    z-index: 2;
    display: grid;
    width: 80px;
    height: 80px;
    place-items: center;
    border: 1px solid rgb(0 51 160 / .15);
    border-radius: 10px;
    color: var(--color-portal-action);
    background: rgb(0 51 160 / .05);
    transition: background-color .3s ease, border-color .3s ease;
}
.verify-mobile-disc.is-verified {
    border-color: rgb(0 154 68 / .35);
    color: var(--kp-green-700);
    background: var(--kp-tile-green);
}
.verify-mobile-disc img { width: 48px; height: 48px; object-fit: contain; }
.verify-mobile-disc > .icon { width: 40px; height: 40px; }
.verify-mobile-loader,
.verify-mobile-action .verify-mobile-button-loader { animation: verify-spin .8s linear infinite; }
/* The unread-notification dot on the idle disc, with its own ping behind it. */
.verify-mobile-notification {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -5px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--kp-white);
    border-radius: 50%;
    background: var(--kp-portal-danger-500);
}
/* The dot keeps the reference's PHYSICAL corner in both directions — the same recorded exception the
   ambient pair and the card blooms carry. Mirroring it would put the "you have a request" mark on the
   opposite side of the card art from the one the reference draws (measured: x750 there, x676 here
   before this arm). */
[dir="rtl"] .verify-mobile-notification { inset-inline-end: auto; inset-inline-start: -5px; }
.verify-mobile-notification::before {
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    background: rgb(200 16 46 / .6);
    content: "";
    animation: verify-radar-ping 1s cubic-bezier(0, 0, .2, 1) infinite;
}

.verify-mobile-hero h2 {
    margin: 0 0 6px;
    color: var(--kp-slate-900);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.verify-mobile-hero p {
    max-width: 24rem;
    margin: 0 auto;
    color: var(--kp-slate-600);
    font-size: 14px;
    line-height: 1.625;
}
.verify-mobile-hero small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-start: 12px;
    color: rgb(71 85 105 / .8);
    font-size: 11px;
    line-height: 1.35;
}
.verify-mobile-hero small .icon { width: 12px; height: 12px; }

.verify-mobile-steps {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.verify-mobile-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    background: rgb(248 250 252 / .4);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.verify-mobile-step > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 1px solid var(--kp-slate-200);
    border-radius: 50%;
    color: var(--kp-slate-600);
    background: var(--kp-white);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.verify-mobile-step > span .icon { width: 14px; height: 14px; }
.verify-mobile-step b {
    display: block;
    color: var(--kp-slate-900);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}
.verify-mobile-step small {
    display: block;
    margin-block-start: 2px;
    color: rgb(71 85 105 / .8);
    font-size: 11px;
    line-height: 1.35;
}
.verify-mobile-step.is-active { border-color: rgb(0 51 160 / .3); background: rgb(0 51 160 / .05); }
.verify-mobile-step.is-active > span {
    border-color: var(--color-portal-action);
    color: var(--kp-white);
    background: var(--color-portal-action);
}
.verify-mobile-step.is-done { border-color: rgb(0 154 68 / .35); background: rgb(209 250 229 / .75); }
.verify-mobile-step.is-done > span {
    border-color: var(--kp-green-700);
    color: var(--kp-white);
    background: var(--kp-green-700);
}

.verify-mobile-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 20px;
    padding: 10px 14px;
    border: 1px solid rgb(0 51 160 / .15);
    border-radius: 8px;
    color: var(--kp-slate-900);
    background: rgb(0 51 160 / .06);
    font-size: 12px;
}
.verify-mobile-status > span { display: flex; align-items: center; gap: 8px; }
.verify-mobile-status i {
    position: relative;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--color-portal-action);
}
.verify-mobile-status i::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--color-portal-action);
    content: "";
    animation: verify-status-ping 1.4s cubic-bezier(0, 0, .2, 1) infinite;
}
.verify-mobile-status b {
    color: var(--kp-slate-600);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Route-scoped for the same reason `.verify-continue` is: the shared `font: inherit` reset outranks a
   bare class and would strip this button's 14px/600. */
body[data-public-route="verify"] .verify-mobile-action {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 0;
    border-radius: 8px;
    color: var(--kp-white);
    background: var(--color-portal-action);
    box-shadow: 0 6px 20px -6px rgb(0 51 160 / .55);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    transition: transform .15s ease, background-color .2s ease, opacity .2s ease;
}
.verify-mobile-action:hover:not(:disabled) { background: var(--color-portal-action-hover); }
.verify-mobile-action:active:not(:disabled) { transform: scale(.99); }
.verify-mobile-action.is-pending { cursor: wait; background: rgb(0 51 160 / .8); }
.verify-mobile-action.is-verified { cursor: default; background: var(--kp-green-700); box-shadow: none; }
/* Disabled while the run is in the air and after it succeeds — but it is also the page's only status
   line at that moment, so it keeps full contrast instead of the usual dimmed disabled look. */
.verify-mobile-action:disabled { opacity: 1; }
.verify-mobile-action .icon { width: 20px; height: 20px; }

.verify-mobile-secondary {
    display: flex;
    min-height: 16px;
    align-items: center;
    justify-content: flex-end;
    margin-block-start: 16px;
    color: rgb(71 85 105 / .8);
    font-size: 11px;
}
.verify-mobile-secondary button {
    padding: 0;
    border: 0;
    color: var(--kp-slate-600);
    background: transparent;
    font-size: 11px;
    transition: color .2s ease;
}
.verify-mobile-secondary button:hover { color: var(--kp-slate-900); }

/* ---- The responsive ladder, at the reference's own breakpoints --------------------------------- */
@media (min-width: 640px) {
    .verify-entry-header-inner,
    .verify-entry-route-title { padding-inline: 24px; }
    .verify-entry-hero img { width: 112px; height: 112px; }
    .verify-entry-hero h1 { font-size: 30px; }
    .verify-paci-display,
    .verify-paci-display * { font-size: 22px; }
    .verify-paci-help { font-size: 16px; }
    .verify-mobile-header-inner,
    .verify-mobile-title-inner,
    .verify-mobile-container { max-width: 672px; padding-inline: 24px; }
    .verify-mobile-title h1 { font-size: 28px; }
    .verify-mobile-card-content { padding: 32px; }
}

@media (min-width: 1024px) {
    .verify-entry-content {
        min-height: calc(100vh - 160px);
        padding-block: 24px;
    }
    .verify-entry-header-inner,
    .verify-entry-route-title { padding-inline: 32px; }
    .verify-entry-route-title { padding-block-start: 24px; }
    .verify-entry-route-title i { display: block; }
    .verify-entry-route-title h1 { font-size: 28px; }
    .verify-entry-hero { margin-block-end: 32px; }
    .verify-entry-hero img { width: 128px; height: 128px; margin-block-end: 16px; }
    .verify-entry-form { padding: 28px; }
    .verify-step-state { min-height: 100vh; }
    .verify-mobile-header { height: 96px; }
    .verify-mobile-header-inner,
    .verify-mobile-title-inner,
    .verify-mobile-container { max-width: 1536px; padding-inline: 32px; }
    .verify-mobile-title-inner { padding-block-start: 24px; }
    .verify-mobile-title-inner > span {
        display: block;
        width: 3px;
        height: 28px;
        border-radius: 999px;
        background: linear-gradient(to bottom, var(--color-portal-action), var(--color-portal-accent));
    }
    .verify-mobile-container { padding-block-start: 32px; }
    .verify-mobile-card { width: 50%; margin-inline: auto; }
}

@media (max-width: 380px) {
    .verify-entry-form { padding: 20px; }
    .verify-entry-fields { gap: 16px; }
    .verify-paci-display,
    .verify-paci-display * { font-size: 18px; }
    .verify-mobile-card-content { padding: 20px; }
}

/* The reference's OWN reduced-motion arm (verify-id.css, app.bundle.css:21030), ported as written: every
   animation and transition on the route collapses to a hair over zero, and the radar rings — whose whole
   content IS movement — are removed outright. Scoped to this route's two state roots plus the fixed
   ambient pair, because ours live on the page rather than inside one wrapper element. */
@media (prefers-reduced-motion: reduce) {
    .verify-entry-state *,
    .verify-entry-state *::before,
    .verify-entry-state *::after,
    .verify-step-state *,
    .verify-step-state *::before,
    .verify-step-state *::after,
    .verify-ambient {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .verify-mobile-radar { display: none; }
}

@keyframes verify-blob-a {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(4%, 6%, 0) scale(1.08); }
    100% { transform: translate3d(-3%, 3%, 0) scale(.96); }
}
@keyframes verify-blob-b {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-5%, -4%, 0) scale(1.1); }
    100% { transform: translate3d(3%, -2%, 0) scale(.94); }
}
@keyframes verify-idle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes verify-stamp-in {
    0% { opacity: 0; transform: translateY(-6px) scale(1.35) rotate(-4deg); filter: blur(1.5px); }
    60% { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: blur(0); }
}
@keyframes verify-caret-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@keyframes verify-breathe-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgb(203 160 82 / 0); }
    50% { box-shadow: 0 0 0 4px rgb(203 160 82 / .18); }
}
@keyframes verify-radar-ping {
    75%, 100% { opacity: 0; transform: scale(2); }
}
@keyframes verify-spin {
    to { transform: rotate(360deg); }
}
@keyframes verify-status-ping {
    50% { box-shadow: 0 0 0 7px rgb(0 51 160 / 0); }
    100% { box-shadow: 0 0 0 4px rgb(0 51 160 / .13); }
}

/* ============================================================
   C1 CARRY-OVER — the account family's back-button hover (W3b gap, closed by W5, 2026-08-09)
   The shipped `.ref-account-page .ref-header-back` at :9136 declares a hover TRANSITION and no hover
   RULE, so the control had a dead transition and no response under the pointer on BOTH pages that mount
   it (terms and account type). Verified missing on the rendered pages during the W4 fidelity pass; these
   are the reference's own values, taken from its served bundle.
   ============================================================ */
.ref-account-page .ref-header-back:hover {
    transform: translateY(-2px);
    background: rgb(255 255 255 / .95);
    box-shadow: 0 8px 22px -10px rgb(15 23 42 / .2);
}

/* ============================================================
   MAILBOX PAGE — portal onboarding wave W9 (2026-08-10)
   Reference: docs/reference/subscribersPortal-KuwaitMail/mailbox.html, measured on the RENDERED page
   (localhost:8097/mailbox.html?lang=ar|en at 1440 and 390) against the served one-bundle cascade —
   never grepped from a source file (portal truth order D2). The page is a stub that js/static-app.js
   builds, so the DOM had to be rendered to be censused.

   THE SHELL IS OURS, NOT THE REFERENCE'S. The reference's own mailbox layer opens with three
   `.rp-shell:has(.mb-layout)` overrides that narrow the rail to 256px and cap the content at 1408px.
   They are DEAD: `css/sidebar-navigation.css` compiles LAST and wins, and the rail measured on the
   rendered page is 272px — the very value intake ruling D6 adopted for us. Porting the overrides would
   have re-introduced the 256px rail the ruling replaced, from a layer that does not even paint. The
   1408px content cap is left behind with them; ours is --kp-portal-content-max-w, and at both measured
   bands neither cap binds. Measured at 1440 on the reference: rail 272, content 1162, wrap padding 34,
   `.mb-layout` 1094 wide, columns `420px 643px` — which is what `420px minmax(0,1fr)` resolves to in a
   1094 container, so our own wrap (same 34px padding, same 272px rail) lands on the same numbers.

   MEASURED SOURCE VALUES -> OFFICIAL TOKENS (portal palette clause, intake D1). A package hex is never
   copied; each row states what changes so the numeric diff can be checked value by value:
     THE NEUTRAL BORDER FAMILY — #edf0f5 (panel, heading button), #eff1f5 (address inner), #eef1f4
       (payment row), #eff1f4 (summary row), #e6e9ee (archive), #e1e5eb (year switch, plan row),
       #dfe4ec ("more"), #edf0f4 (mail row) — all consolidate to var(--kp-slate-200) #e2e8f0. Eight
       near-identical greys, the same consolidation this file already recorded for the shell's own
       border set (#e9edf4/#e8ebf0/#e6eaf0/#e8ebf1).
     THE STRONGER EDGES — #d9e0eb (mail-row hover), #d9dfe9 (create dash), #ccd3dd (plan check ring) ->
       var(--kp-slate-300) #cbd5e1, the same shade the dashboard card's hover border already keeps.
     THE MUTED INK RAMP — #6f7888/#7c8798/#747e8e/#6c7686/#788291 -> var(--kp-slate-500) #64748b;
       #5d6878/#495466/#485469 -> var(--kp-slate-600) #475569; #a3abb8/#9aa3b0/#bdc3cc/#8d95a2 ->
       var(--kp-slate-400) #94a3b8; #171d28/#283244 -> var(--kp-slate-900) #0f172a.
     THE ACTION BLUES — #173f92 (heading button), #1748ad (year active, plan ink, create ink), #1846a6
       (mail count chip), #1241a0 (address number) -> var(--color-portal-action), the OFFICIAL navy.
       Five stale mid-blues whose job is "this is the action colour", and the action colour is navy.
     THE HERO GRADIENT — #0e2e82 / #123ca6 / #193cb0 at 0/48/100% -> the official navy ramp
       var(--kp-navy-700) / var(--kp-navy-600) / var(--kp-navy-500) at the same three stops.
     THE PALE-BLUE-ON-NAVY INKS — #f8fbff, #c6d4f9, #aebfe9, #b9c8eb, #bdc9e7, #f6f8ff, #7187c3 are a
       hue the official palette does not carry, and tinting with a non-official blue would copy a
       package literal. Each becomes WHITE at the alpha that reproduces its luminance over the official
       navy behind it (.97 / .8 / .72 / .74 / .75 / .96 / .45) — the same "express it from what the
       palette has" call the splash grid and the verify hero already recorded for their stale blues.
     THE STATUS DOT — #26a87a and its #26a87a1d halo -> var(--kp-green-700) #009a44 and rgb(0 154 68 /
       .114): the same stale-emerald ruling the dashboard status chip and the verify counter recorded.
     THE CHIP GOLD — #e2b858 -> var(--kp-stamp-gold-300) #dfc080, the official light gold; the plan
       tile's #f4cb68 -> #d4a017 gradient -> var(--kp-stamp-gold-300) -> var(--kp-stamp-gold-500).
     THE PLAN TILE BLUE — #2760cf -> #0e3d9f -> var(--kp-navy-500) -> var(--kp-navy-700).
     THE TINTS — #edf3ff (create tile, summary primary) and #eaf0ff (address header tile) ->
       var(--kp-portal-icon-tint-blue) rgb(0 51 160 / .05), the token the P4 empty-state re-point
       already moved onto that alpha; #edf2ff (mail count chip) -> var(--kp-navy-600-a06).
     THE PAPER — #fafbfc (payment, summary, archive) -> var(--kp-slate-50) #f8fafc; the address inner
       gradient #fafbfd -> #f6f8fb -> var(--kp-slate-50) -> var(--kp-portal-auth-paper-1) #f6f8ff;
       #ffffffdc (panel glass) -> rgb(255 255 255 / .863); #ffffffd9 (create) -> rgb(255 255 255 / .85).
     THE SHADOWS — #273a680c (panel), #26355c13 (heading button), #26355c0a (create), #223b6c0d (row
       hover) are four alphas of one near-black slate -> rgb(15 23 42 / .047 | .075 | .04 | .05);
       #123da52d (hero) and #123da522 (copy) and #1748ad34 (year active) -> official navy at .176 /
       .133 / .204; #001c6f38 (hero icon tile) -> rgb(0 38 128 / .22), official navy-700.
     THE HEADING — this page keeps its own 30px/36px type, 25px/30px through 720px, and a 4px
       accent bar through a page-scoped rule. The bar uses --portal-title-accent; the flex heading
       row owns the surrounding margins.
     THE STATUS AND ICON TONES — the reference draws exactly TWO row dresses (a green "ready" and a
       purple "in transit") because its demo data has two statuses. Our list carries four buckets, so
       the chips take the reference's GEOMETRY with the portal's own shipped status-tone vocabulary
       (--status-success/pending/transit/alert), which is the one status palette the dashboard, the
       link chips and the receipts already read. Inventing two more tints to fill the gap would have
       given the portal a second status vocabulary that only this page speaks.

   RECORDED DIVERGENCES from the reference, all deliberate and all in the package report:
     1. NO CART TOGGLE ON THE PLANS STRIP. The reference's rows toggle a `.selected` state
        (toggleMailboxPlan) — a cart selection this product has no counterpart for, since choosing and
        paying happen on /Subscriptions. Our rows are real links into that flow, and a box type the
        server says cannot be bought is rendered as a non-link row carrying the server's own reason. The
        `.selected` dress therefore only paints the blocked row's check, where it means "this one is
        already yours", and no row is ever toggled by a click.
     2. NO PRICE ARITHMETIC ON THE TERM SWITCH. The reference multiplies one base price by the year
        count. A term here is its own SubscriptionPlan row with its own amount and its own discount, so
        every term's rows are server-rendered and the switch only changes which of them is visible.
     3. THE ROW IS AN <article>, NOT A <button>. The reference's row opens a mail-item sheet; this
        product has no mail-item surface. The measured hover is kept as the list's own polish, and the
        UA button defaults the tag change gives up (centering, `line-height: normal`) are re-declared
        below rather than inherited.
     4. RETIRED 2026-08-11 (parity fix wave, P1.6b) — THE COPY BUTTON NOW MORPHS. This row used to
        record that it did not: the reference's `.mb-copy.copied` fill was left unported because a state
        class with no code to toggle it is dead CSS. The code exists now — site.js announces a successful
        clipboard write with a kp:copied event and mailbox.js holds the class for the reference's own
        1.8s — so the fill is ported (in OFFICIAL green, D1) and this is no longer a divergence. What
        stays ours: the button's LABEL does not swap to "Copied!", because that word exists in neither
        resource file and the toast this click already raises says it in both languages.
     5. THE ARCHIVE CONTROL IS DISABLED. Its destination (the archives page) does not exist here yet,
        so it ships in the reference's place with the coming-soon posture this plan already ruled for
        share and QR.
        (Corrected 2026-11-07, owner rulings 15 #1079, #1084: a live link to Shipments now.)
     6. TWO SUMMARY ROWS, NOT FOUR. "Total received this month" and "last pickup" need an arrival or a
        pickup timestamp and the mail payload carries neither.
        (Corrected 2026-11-07, owner rulings 15 #1080, #1083, #1100: all four rows now.)
     7. NO PER-ROW RECEIPT BUTTON in the payments panel: a download endpoint on this page's own
        controller is outside this package, and a page's script may never call another page's endpoint.
        The panel's "more" link goes to the shipped history, where the download lives.
        (Corrected 2026-11-07, spec section 5: the row has its Receipt button, through the History file address.)
     8. THE TWO CREATE CONTROLS ARE UNIFIED ONTO ONE WORDING. The reference contradicts ITSELF here: its
        heading control renders «إنشاء صندوق جديد» while its big dashed `.mb-create` renders
        «إنشاء صندوق بريدي جديد» — two Arabic strings for one action, under a single English
        "Create New Mailbox" on both. Both of ours read the FULLER text (one key, `Mailbox.CreateNew`):
        one concept gets one wording, a page that disagrees with itself is resolved by the
        most-specific usage (Core Rule 13), and the fuller text is the one that agrees with the
        صندوق البريد family the rest of this page speaks.
        (Corrected 2026-11-08, owner ruling 15 #1223(c)(d): both create controls and the plans strip have left this page.)
   ============================================================ */
/* Dated 2026-11-07 (Core Rule 13, the rendered page first), beside the shell note above: the reference's 1408px content
   cap DOES paint, at wide windows. Its rail override is the dead part; its `.rp-shell:has(.mb-layout) .rp-wrap`
   max-width wins on the rendered page. Measured on the rendered mailbox.html, Arabic and English, innerWidth read: at
   1440 the cap does not bind and both sides match; at 1920 the wrap is 1408 wide, centred beside the 272px rail, so the
   heading is 1340 wide (x 154 Arabic, 426 English) and the summary sits at x 1074 / 426; at 2560 the same 1340 at x
   474 / 746. So this page takes the cap, scoped to the Mailbox layout as the reference scopes it; the rail and every
   other page keep --kp-portal-content-max-w.
   Dated 2026-11-08 (owner ruling 15 #1222): the Mailbox takes the full content width, so this cap is gone. */
.mb-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 28px;
}
/* 2026-09-06: This page keeps its reference heading: 30/36/800 (-1.4px English tracking, normal Arabic), a 4x31 accent bar, and 25/30 with a 4x26 bar through 720px; the page-scoped element-qualified override outranks the shared .rp-title family, and the flex row owns the surrounding margins. */
.mb-heading h1.rp-title {
    min-height: 36px;
    margin: 0;
    font-size: 30px;
    line-height: 36px;
    font-weight: 800;
    letter-spacing: -1.4px;
}
[dir="rtl"] .mb-heading h1.rp-title { letter-spacing: normal; }
.mb-heading h1.rp-title::before {
    content: "";
    height: 31px;
    width: 4px;
    border-radius: 2px;
    background: var(--portal-title-accent);
}

.mb-layout {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 31px;
    align-items: start;
}
.mb-left {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 16px;
}
.mb-right {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.mb-panel {
    padding: 20px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 10px;
    background: rgb(255 255 255 / .863);
    box-shadow: 0 6px 18px rgb(15 23 42 / .047);
    backdrop-filter: blur(18px);
}
.mb-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}
.mb-panel h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--kp-slate-900);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: normal;
}
.mb-panel h2 .icon { width: 17px; height: 17px; color: var(--color-portal-action); }

/* ---- the box hero ---- */
.mb-hero {
    position: relative;
    overflow: hidden;
    padding: 25px;
    border: 1px solid rgb(255 255 255 / .094);
    border-radius: 10px;
    background: linear-gradient(137deg, var(--kp-navy-700) 0%, var(--kp-navy-600) 48%, var(--kp-navy-500) 100%);
    color: rgb(255 255 255 / .97);
    box-shadow: 0 13px 29px rgb(0 51 160 / .176);
}
.mb-orb {
    position: absolute;
    border-radius: 50%;
    background: rgb(255 255 255 / .043);
}
/* THE ORBS DO NOT MIRROR — measured, not assumed. The reference places them with physical `right`/
   `left`, and driven in Arabic on the rendered page they stay put: the big one still overflows the
   PHYSICAL right edge by 67px and the small one the PHYSICAL left by 62px. Written as logical
   properties with an explicit RTL re-pin (never a bare left/right — house law), the same shape the
   verify page's ambient blooms use for the same reason. */
.mb-orb-one { top: -76px; inset-inline-end: -68px; width: 190px; height: 190px; }
.mb-orb-two { bottom: -70px; inset-inline-start: -63px; width: 145px; height: 145px; }
[dir="rtl"] .mb-orb-one { inset-inline-end: auto; inset-inline-start: -68px; }
[dir="rtl"] .mb-orb-two { inset-inline-start: auto; inset-inline-end: -63px; }
.mb-hero-top,
.mb-hero-dates,
.mb-registration,
.mb-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mb-hero-top small {
    display: block;
    margin-bottom: 7px;
    color: rgb(255 255 255 / .8);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .17em;
}
.mb-hero-top strong {
    display: block;
    font-size: 31px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.03em;
}
.mb-hero-top > span {
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border: 1px solid rgb(255 255 255 / .184);
    border-radius: 9px;
    background: rgb(255 255 255 / .078);
    box-shadow: 0 7px 18px rgb(0 38 128 / .22);
}
.mb-hero-top > span .icon { width: 21px; height: 21px; }
.mb-hero-rule {
    position: relative;
    z-index: 1;
    height: 1px;
    margin: 25px -25px 17px;
    background: rgb(255 255 255 / .086);
}
.mb-hero-dates small {
    display: block;
    margin-bottom: 4px;
    color: rgb(255 255 255 / .72);
    font-size: 10px;
}
/* End-aligned in English, START-aligned in Arabic — the reference's own `[dir=rtl]` override, confirmed
   on the rendered page (both date blocks compute `start` there, so the expiry sits under its label
   rather than pushed to the far edge). */
.mb-hero-dates > div:last-child { text-align: end; }
[dir="rtl"] .mb-hero-dates > div:last-child { text-align: start; }
.mb-hero-dates b {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}
.mb-hero-dates b i {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kp-green-700);
    box-shadow: 0 0 0 4px rgb(0 154 68 / .114);
}
.mb-registration {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 14px;
}
.mb-registration > span,
.mb-hero-actions > span,
.mb-hero-actions .mb-hero-renew {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid rgb(255 255 255 / .141);
    border-radius: 7px;
    background: rgb(255 255 255 / .075);
    color: rgb(255 255 255 / .96);
    font-size: 11px;
    font-weight: 700;
    /* The UA's `normal` for this 11px face, restated: the reference's chips are a <span> and a <button>
       and both take it, while our <a> would inherit the page leading. Measured — it is the difference
       between a 30.5px chip row and a 29px one, twice over, and so between a 307.5px hero and a 304.5px one. */
    line-height: 16.5px;
    text-decoration: none;
}
/* Dated 2026-11-08 (client request 2.4): the Renew chip is a <button> now, so it needs what a link gave it for free:
   the hand, and the page's face rather than the UA's own button font. */
.mb-hero-actions .mb-hero-renew { cursor: pointer; font-family: inherit; }
.mb-registration small { color: rgb(255 255 255 / .74); font-size: 10px; }
/* The renew chip joined this pair in the parity fix wave (P2.1n, 2026-08-11) when it gained the cycle
   arrow the reference draws on it: the three chips sit in one row and must carry one mark size. */
.mb-registration .icon,
.mb-hero-actions > span .icon,
.mb-hero-actions .mb-hero-renew .icon {
    width: 11px;
    height: 11px;
}
/* ...but only TWO of the three take the gold. Fix package C, 2026-08-12: P2.1n ported the renew
   chip's ARTWORK and inked it gold with its neighbours, which the reference does not do. Measured on
   the rendered reference at 1440: its registration calendar and its plan star both compute
   rgb(226,184,88), while the renew button's cycle arrow computes rgb(246,248,255) -- it simply
   inherits its own chip's near-white text ink instead of taking a gold rule. Ours now does the same
   by being left out of the colour arm below; over this navy hero our chip ink rgb(255 255 255 / .96)
   composites to about rgb(245,247,251), within four units of the reference's value on every channel.
   The gold that stays is the OFFICIAL --kp-stamp-gold-300, never the package's stale #e2b858
   (palette clause). */
.mb-registration .icon,
.mb-hero-actions > span .icon {
    color: var(--kp-stamp-gold-300);
}
.mb-renewal {
    position: relative;
    z-index: 1;
    margin: 15px 0 16px;
    color: rgb(255 255 255 / .75);
    font-size: 10px;
}
.mb-renewal i {
    padding: 0 7px;
    color: rgb(255 255 255 / .45);
    font-style: normal;
}
.mb-hero-actions { justify-content: flex-start; gap: 8px; }

/* ---- the postal address ---- */
.mb-address header > i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--kp-portal-icon-tint-blue);
    color: var(--color-portal-action);
}
.mb-address header > i .icon { width: 16px; height: 16px; }
.mb-address > div {
    display: grid;
    gap: 2px;
    padding: 17px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    background: linear-gradient(145deg, var(--kp-slate-50), var(--kp-portal-auth-paper-1));
    font-size: 13px;
}
.mb-address > div b { margin-bottom: 3px; color: var(--color-portal-action); }
.mb-address > div strong { color: var(--kp-slate-900); }
.mb-address > div span { color: var(--kp-slate-500); }
/* A long address line wraps and is never cut (owner ruling 15 #1224). */
.mb-address > div span { min-width: 0; overflow-wrap: anywhere; }
.mb-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--kp-navy-600), var(--kp-navy-500));
    color: rgb(255 255 255);
    font-size: 13px;
    font-weight: 800;
    line-height: 19.5px;
    box-shadow: 0 7px 16px rgb(0 51 160 / .133);
    cursor: pointer;
}
.mb-copy .icon { width: 13px; height: 13px; }
/* The address copy button confirms ON ITSELF for 1.8s (parity fix wave 2026-08-11, P1.6b) -- the
   reference's `.mb-copy.copied` green fill, ported. It was recorded as deliberately NOT ported (this
   family's divergence 4) on the grounds that a state class with no code to toggle it is dead CSS; the
   code that toggles it now exists in mailbox.js, driven by the shared copy handler's kp:copied event, so
   the reason has expired and the record is retired with it. The button's label does NOT swap to
   "Copied!" the way the reference's does: that word exists nowhere in our resources, and the toast this
   click already raises carries the sentence in both languages -- inventing a second one for a 1.8s
   button label is exactly what the terminology law forbids. Green is the OFFICIAL #009a44, not the
   package's #258966 (portal palette clause, 15 #148 D1). */
.mb-copy.copied { background: var(--kp-green-700); }

/* ---- recent payments ---- */
.mb-payments header a {
    padding: 5px 9px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 7px;
    background: rgb(255 255 255);
    color: var(--kp-slate-600);
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-decoration: none;
    white-space: nowrap;
}
.mb-payment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    background: var(--kp-slate-50);
}
.mb-payment + .mb-payment { margin-top: 9px; }
.mb-payment > span { display: grid; flex: none; min-width: 0; }
.mb-payment b { font-size: 12px; }
.mb-payment small { color: var(--kp-slate-500); font-size: 9px; }
.mb-payment em {
    min-width: 0;
    margin-inline-start: auto;
    color: var(--kp-slate-400);
    font-size: 9px;
    font-style: normal;
    overflow-wrap: anywhere;
}
/* The reference's Receipt button, from the served bundle. It keeps its size beside a long reference: the reference
   is what wraps, so the amount beside it stays on one line. */
.mb-payment button {
    display: flex;
    flex: none;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 6px;
    background: rgb(255 255 255);
    color: var(--kp-slate-600);
    font-size: 9px;
    font-weight: 700;
    line-height: 13.5px;
}
.mb-payment button .icon { width: 9px; height: 9px; }

/* ---- the box summary ---- */
.mb-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    background: var(--kp-slate-50);
}
.mb-summary > div + div { margin-top: 8px; }
.mb-summary span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--kp-slate-600);
    font-size: 11px;
}
.mb-summary-icon {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
}
.mb-summary-icon .icon { width: 15px; height: 15px; }
.mb-summary b { font-size: 15px; }
.mb-summary-icon-pickup { background: var(--status-success-bg); color: var(--status-success-fg); }
.mb-summary-value-pickup { color: var(--status-success-fg); }
.mb-summary-icon-customs { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.mb-summary-value-customs { color: var(--status-pending-fg); }
.mb-summary-icon-primary { background: var(--kp-portal-icon-tint-blue); color: var(--color-portal-action); }
.mb-summary-value-primary { color: var(--color-portal-action); }

/* ---- the mail list ---- */
.mb-mail { padding: 24px; }
.mb-mail > header { margin-bottom: 20px; }
.mb-mail-count {
    padding: 5px 10px;
    border-radius: 7px;
    background: var(--kp-navy-600-a06);
    color: var(--color-portal-action);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
/* The kept "showing first N of M" line, sized to the meta ink it sits above. */
.mb-mail-showing {
    margin: 0 0 11px;
    color: var(--kp-slate-500);
    font-size: 11px;
}
.mb-mail-list { display: grid; gap: 11px; }
.mb-mail-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 9px;
    background: rgb(255 255 255);
    color: inherit;
    text-align: start;
    transition: border-color .18s, box-shadow .18s;
}
/* THE HOVER BORDER IS THE REFERENCE'S, FROM TWO TOKENS (dated 2026-11-10). The rendered reference paints
   rgb(217, 224, 235) under the pointer; slate-300 alone read 14, 11 and 10 levels darker and slate-200 alone is
   the resting border. No primitive holds the reference's value, so it is mixed from the two it lies between:
   60% slate-200 with 40% slate-300 computes to rgb(217, 224, 234), one level from the reference on one channel. */
.mb-mail-row:hover {
    border-color: color-mix(in srgb, var(--kp-slate-200) 60%, var(--kp-slate-300));
    box-shadow: 0 5px 13px rgb(15 23 42 / .05);
}
.mb-mail-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.mb-mail-main > span:last-child { display: grid; min-width: 0; }
.mb-mail-main b { font-size: 13px; }
.mb-mail-main small {
    overflow: hidden;
    color: var(--kp-slate-500);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mb-mail-icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.mb-mail-icon .icon { width: 16px; height: 16px; }
.mb-mail-icon-pickup { background: var(--status-success-bg); color: var(--status-success-fg); }
.mb-mail-icon-delivered { background: var(--status-success-bg); color: var(--status-success-fg); }
.mb-mail-icon-transit { background: var(--status-transit-bg); color: var(--status-transit-fg); }
.mb-mail-icon-active { background: var(--status-pending-bg); color: var(--status-pending-fg); }
/* Returned and Cancelled take the tone the unmapped `other` chip already wears (dated 2026-11-01, the screens round, F3):
   /Mailbox lists them, and the Shipments board draws these two as plain text, so it offers no tone to match. */
.mb-mail-icon-other,
.mb-mail-icon-returned,
.mb-mail-icon-cancelled { background: var(--status-alert-bg); color: var(--status-alert-fg); }
.mb-status {
    align-self: start;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    line-height: 15px;
    white-space: nowrap;
}
.mb-status-pickup,
.mb-status-delivered { background: var(--status-success-bg); color: var(--status-success-fg); }
.mb-status-transit { background: var(--status-transit-bg); color: var(--status-transit-fg); }
.mb-status-active { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.mb-status-other,
.mb-status-returned,
.mb-status-cancelled { background: var(--status-alert-bg); color: var(--status-alert-fg); }
.mb-mail-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 17px;
    color: var(--kp-slate-400);
    font-size: 9px;
}
.mb-mail-meta span { display: flex; align-items: center; gap: 5px; }
.mb-mail-meta .icon { width: 9px; height: 9px; }
.mb-mail-meta em { color: var(--kp-slate-400); font-style: normal; }
/* The kept per-row copy control (the affordance hunt #24 gave this list), sized INTO the 13.5px meta
   line rather than over it: a 20px control made every row 96.5px against the reference's 90, and the
   keep-shipped-extras law asks for the extra to be styled so it fits, not for the row to grow around
   it. The number itself stays selectable beside it, so nothing is lost if the small target is missed. */
.mb-mail-copy {
    display: grid;
    place-items: center;
    width: 18px;
    height: 13.5px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--kp-slate-400);
    cursor: pointer;
}
.mb-mail-copy .icon { width: 11px; height: 11px; }
.mb-mail-copy:hover { background: var(--kp-slate-50); color: var(--kp-slate-600); }
/* A link since 2026-11-07 (owner rulings 15 #1079, #1084), so it states what the button it replaced got from the
   browser: the block box, the border box its full width depends on, no underline and a steady colour under the
   pointer. The reference's Arabic sets a button's words at the start and its English centres them. */
.mb-archive {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    background: var(--kp-slate-50);
    color: var(--kp-slate-600);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    text-decoration: none;
}
.mb-archive:hover { color: var(--kp-slate-600); }
html[dir="rtl"] .mb-archive { text-align: start; }
/* The disabled posture this plan ruled for a control whose destination does not exist yet — the same
   dimming the dashboard's share/QR buttons carry, and no pointer response at all. (2026-10-17, owner ruling: Share and QR are hidden until the feature is built)
   (Corrected 2026-11-07, owner ruling 15 #1079: the control is a live link, so the disabled rule that stood here is gone.) */


/* The Mailbox's three tabs (owner ruling 15 #1229) wrap inside the panel rather than push past it at 360px. */
.mb-mail .dc-direction-tabs { flex-wrap: wrap; }

/* ---- the responsive ladder, all four of the reference's tiers ---- */
@media (max-width: 1100px) {
    .mb-layout { grid-template-columns: 380px minmax(0, 1fr); gap: 22px; }
    .mb-left { top: 12px; }
    .mb-panel,
    .mb-mail { padding: 18px; }
    .mb-hero { padding: 22px; }
    .mb-hero-rule { margin-inline: -22px; }
    .mb-mail-row { padding: 14px; }
}
@media (max-width: 840px) {
    .mb-layout { grid-template-columns: 1fr; }
    .mb-left { position: static; }
    .mb-summary { display: none; }
    .mb-heading { margin-bottom: 20px; }
}
@media (max-width: 720px) {
    .mb-heading h1.rp-title { min-height: 30px; font-size: 25px; line-height: 30px; }
    /* The mailbox is the ONE page whose accent bar survives on phones -- the reference keeps its own
       heading bar at 26px there while hiding the shared `.rp-title::before` (parity fix wave 2026-08-11,
       P1.3d). `display: block` restates what the shared ≤720 rule now switches off. */
    .mb-heading h1.rp-title::before { display: block; height: 26px; }
    .mb-layout { gap: 13px; }
    .mb-hero { padding: 20px; }
    .mb-hero-rule { margin-inline: -20px; }
    .mb-panel,
    .mb-mail { padding: 16px; }
    .mb-payments { display: none; }
    .mb-mail-row { grid-template-columns: minmax(0, 1fr); }
    .mb-status { position: absolute; top: 13px; inset-inline-end: 13px; }
    .mb-mail-main { padding-inline-end: 110px; }
    .mb-mail-meta { gap: 10px; }
}
@media (max-width: 430px) {
    .mb-registration { align-items: flex-start; flex-direction: column; }
    .mb-hero-top strong { font-size: 28px; }
    .mb-hero-dates b { font-size: 11px; }
    .mb-renewal { line-height: 1.6; }
    .mb-mail-main { padding-inline-end: 0; }
    .mb-status { position: static; justify-self: start; }
    .mb-mail-meta { flex-wrap: wrap; }
}

/* This family's own reduced-motion arm (the standing rule since W2: every ported family ships with
   one). The page has no animation — only the four transitions above — so the arm stops exactly those. */
@media (prefers-reduced-motion: reduce) {
    .mb-mail-row,
    .mb-mail-copy { transition: none; }
}

/* ============================================================
   SMART ASSISTANT — the floating launcher + its panel, and the welcome tour's decorative variant
   (Dated 2026-11-10, owner ruling 15 #1265: the welcome tour is deleted, and its decorative variant's rules
   with it; every welcome-tour passage of this header is kept as history and describes nothing shipped.)
   (owner ruling 2026-08-10: "dont add smart assistant gif in الإعلانات background section, it should be
   fixed on bottom left in arabic and on right in english", page scope "Everywhere like the mockup", then
   the same morning: build the widget as the reference draws it, not the gif alone). The gif LEFT the
   dashboard's announcements panel, where it had shipped since B1 as "towers art" (the retired
   `.dc-assistant`, :6469 region).

   TWO ELEMENTS, TWO POSTURES — this split is the ruling, not an inconsistency:
     * SIGNED-IN (`_Layout.cshtml`) — a REAL control: a launcher <button> that opens a panel. Every page on
       that layout inherits it UNLESS the view opts out via `ViewData["LayoutSuppressAssistant"]` — three
       do (Payments/Receipt, Payments/Failed, Shared/Error), each an app-shell surface the census below
       does not cover; see Portal/SYSTEM_DOCUMENTATION.md §7.9 for each one's reason. Default SHOW, which
       is what "everywhere like the mockup" means for the app pages. (Clause added 2026-08-10, independent review
       finding DT-2: the opt-outs shipped in the same package and every other record already named them.)
     * WELCOME TOUR (`Welcome.cshtml`) — a DECORATIVE <img>: aria-hidden, `pointer-events: none`, no panel.
       The reference's own welcome FAB carries no panel either, and the page is pre-auth, so there is
       nothing there for an assistant to act on.

   WHERE IT RENDERS, and the negative half is part of the ruling. Census on the RENDERED reference
   (portal truth order D2), 2026-08-10:
     * SHOWS IT — index.html (dashboard), mailbox.html, manage-subscription.html, payment-history.html
       (the `sr-assistant` family) and welcome.html (`onboarding-assistant`).
     * SHOWS NONE — login, splash, terms, register-account-type, register-verify-id, register-user-info,
       register-services. Verified by driving three of them (register-verify-id, register-user-info,
       terms) and counting: ZERO elements whose class or gif src names an assistant. The
       `verify-`/`user-`/`corp-assistant-fab` rules the bundle carries are a DEAD layer those pages never
       execute — the same class of package leftover W9 recorded for the mailbox shell overrides.
   The boundary is machine-gated by AssistantWidgetGovernanceTests, which sweeps the whole view tree.

   WHAT THE PANEL CAN AND CANNOT DO, and why that is honest rather than half-built. The assistant FEATURE
   (a real conversation) is parked under exclusion D9 — there is no assistant backend, and inventing fake
   bot replies would be a lie told in the product's own voice. So the panel ships as the reference draws
   it, with every control telling the truth about itself:
     * the greeting line is STATIC localized copy, not a "reply";
     * "track my shipment" is a REAL LINK to /Mailbox — the one suggestion we can actually honour today;
     * "book pickup" is disabled + the shipped `Dashboard.Ticket.ComingSoon` tooltip (the pickup journey is
       future work, V0.6 §7.7) — the same posture the mailbox archive control ships, and the same shipped
       key, so there is one source for that word;
     * the message field and send button are disabled + that same tooltip.
   None of them is a silent dead end. Precisely: the DIMMED dress (.55) and the not-allowed cursor are what a
   sighted user actually sees, and the `disabled` attribute is what assistive tech announces; the `title`
   carries the words but must NOT be relied on as the whole explanation, because Chrome suppresses pointer
   events on disabled form controls and so usually never shows their native tooltip. That is the same bargain
   the shipped archive control makes, and a not-built feature lock is the declared-exception class the house
   "NO SILENT BLOCKING" law allows — the block is visible even where the sentence is not.
   NOTHING here calls a backend or simulates a conversation.
   Dated clause 2026-10-26 (owner rulings 15 #765-#779): the paragraph above describes the parked panel and no longer holds.
   The chat works: the text box, Send, the pickup chip and New conversation post to the Portal's assistant and every reply is
   the server's (the rules after `.rp-chat-send .icon`); the track chip stays the real link, to /Shipments since 2026-08-13
   (15 #806); nothing is disabled except while a request is on its way.

   SOURCE + CASCADE. Values read from the SERVED bundle
   (docs/reference/subscribersPortal-KuwaitMail/css/app.bundle.css) and RE-MEASURED on the rendered pages
   at localhost:8097 in both languages at 1440 and 390, with the panel DRIVEN OPEN BY A REAL CLICK on the
   launcher (it works — the parity layers do not dead-end it, so no forced `.open` class was needed):
     * `.sr-assistant` + `.sr-assistant-panel` + `.sr-chat-*` + `.sr-suggestions` (:25812,
       css/static-runtime.css) — the widget's own layer;
     * `button.smart-assistant-launcher` (:25817, css/smart-assistant.css) — loads LATER and WINS, sizing
       the launcher 102/80px and re-dressing it to transparent with no shadow, border, padding or filter.
       That is why the launcher is a BARE GIF and not the white disc the earlier layer authors;
     * `.sr-assistant` again at :25846 (the 20px/25.5px offsets) and its `@media (max-width: 720px)` block
       at :25876 (12px/112px/80px).

   MECHANISM, NOT FIX (identical rendered result; stated so a later parity diff does not read them as drift):
     1. NO LINE-BOX STRUT. The reference's launcher sits in a wrapper whose line box adds a strut BELOW the
        button, so its rendered gif gap is `bottom` + strut — and the strut is font-metric noise that varies
        per page and language (measured 8px on index/ar, 7px on mailbox/ar and manage-subscription/ar, 6px
        on payment-history/en, i.e. rendered gaps of 33.5 / 32.5 / 32.5 / 31.5 at 1440). Our launcher is a
        BLOCK-level <button>, so the wrapper builds no line box and there is no strut at all: the declared
        value IS the rendered gap, identically on every page in both languages. This family therefore specs
        the RENDERED EDGE GAP (33.5px desktop / 119px in the tier — the reference's own 25.5+8 and 112+7).
        The PANEL is anchored to the same wrapper, so its offset absorbs the same 8px: the reference's
        `bottom: 71px` over a 25.5px wrapper puts the panel edge 96.5px up, and ours is `63px` over a 33.5px
        wrapper for the same 96.5px (and `64px` over 119px for the same 183px in the 641–720 band).
     2. ONE LOGICAL INSET WHERE THE REFERENCE WRITES PHYSICAL PAIRS. It declares `right: 20px` plus an
        `html[dir="rtl"]` override flipping to `left: 20px`; `inset-inline-end` resolves to the same edge in
        both directions (proven live in both). House law bans physical left/right, so the override pair is
        not ported — and a governance test asserts neither family ever grows one.
     3. Side offsets are declared against the initial containing block, which EXCLUDES the scrollbar. A
        viewport-relative reading therefore measures offset + scrollbar width on the bar's own side (the
        reference reads 12 in RTL and 18 in LTR at 390 for one 12px rule) — compare ICB-relative gaps, or
        correct numbers will look wrong.

   D1 PALETTE (portal palette clause, 15 #148 — a package hex is never copied). The reference's own
   tokens.css already declares the OFFICIAL palette, so the widget's structural colours render official and
   need only naming, not substitution:
     * `rgb(0, 51, 160)` (kicker ink, chip ink, send fill) -> `var(--color-portal-action)` — already the
       official navy #0033a0, byte-identical.
     * `rgb(226, 232, 240)` (panel border, form rule) -> `var(--kp-slate-200)`; `rgb(15, 23, 42)` (title
       ink) -> `var(--kp-slate-900)`; white -> `var(--kp-white)`. The panel shadow's `rgba(15,23,42,.196)`
       is that same slate ink at its own alpha, written `rgb(15 23 42 / .196)`.
     * `rgba(17, 94, 232, .32)` — the WELCOME shadow's STALE pre-rebrand blue — -> OFFICIAL navy at the
       reference's own alpha, `rgb(0 51 160 / .32)`. Same stale-blue row the splash grid recorded at :7810.
     * KEPT at the reference's own values, in rgb() form (never hex), for this file's standing reason
       (:7605, restated by the welcome family at :8832) — an opaque tint with NO matching primitive, where
       the nearest token is far enough that the eye and the diff would both see a substitution. Each was
       tested against official navy before being kept: the header wash `rgb(244 248 255)`, the greeting
       bubble `rgb(237 244 255)` and the chip border `rgb(215 229 250)` are NOT alphas of #0033a0 — every
       one needs a different alpha per channel and lands 4–10 units out on blue, because each keeps blue at
       or near 255 while official navy pulls it down. The greeting ink `rgb(50 78 120)` and the close
       control's `rgb(89 103 124)` are neutral-to-muted inks with no brand equivalent (`--kp-slate-600`
       #475569 is visibly darker than the latter), and both are ink, where a substitution changes contrast.
   Alphas are spelled literally rather than tokenised for this file's standing reason (:4303): a custom
   property cannot supply only the rgb part of an rgb(... / a).

   MOTION, and its reduced-motion arm. TWO things move, both the reference's own: the launcher's 700ms
   transform transition (hover `scale(1.3)`, active `scale(.95)` — HOVER RE-VERIFIED LIVE with a real mouse
   on the rendered reference, 132.6px measured from a 102px box, because a source-only effect sometimes
   never renders) and the panel's 200ms rise-and-fade on open. Both die under the family's own
   reduced-motion arm at the end of this block. NOTE the posture change: while this element was decoration
   (the ruling's first half, earlier the same day) the hover was a RECORDED DIVERGENCE — pointer feedback
   on a non-control would have been a lie. It is a control now, so the reference's own feedback is ported.

   STACKING: z 700 on the signed-in widget, 140 on the welcome decoration — both the reference's own.
   SweetAlert2 dialogs (~z 1060) stay above; the language pill (z 150) never overlaps spatially; and at
   <=720 the launcher clears the edge-attached `.rp-mobile-nav` by the shared 12px inset token;
   both offsets include the same bottom safe area (15 #191c).

   RECORDED DIVERGENCES from the reference, all deliberate:
     1. THE REFERENCE KEEPS A SECOND COPY OF THE GIF IN THE ANNOUNCEMENTS PANEL, AND WE DELETED OURS.
        Measured on its rendered dashboard: `.dc-assistant` (112x136, absolute inside `.dc-announcements`)
        AND the floating widget are BOTH present — the same gif twice on one page. That is precisely what
        the owner ruled against, so this is a DELIBERATE DIVERGENCE and not a parity miss: a later sweep
        will find the panel copy on the reference and must not "restore" it (Core Rule 13 — a dated owner
        ruling supersedes the mockup). The panel keeps its heading and empty state.
     2. THE LAUNCHER TOGGLES; THE REFERENCE'S ONLY OPENS. Measured: clicking its launcher a second time
        leaves the panel open, so its close button is the only way out. Ours closes on a second launcher
        click as well — a control that visibly opens something is expected to close it, and `aria-expanded`
        would otherwise be a promise the widget does not keep.
     3. NO ESC, NO OUTSIDE-CLICK CLOSE — matching the reference, which was measured for both and does
        neither. The panel is a non-modal disclosure (no focus trap, the page stays fully interactive), so
        dismissal is not the "must" it would be for a modal dialog. Flagged in the package report as the
        one place where a small accessibility addition would deviate from the measured reference.
     4. NO CHAT BEHAVIOUR. `sr-chat-log` grows replies in the reference's demo; ours renders the greeting
        as static copy and disables the input (see the honesty note above). The per-page assistant families
        and the assistant PAGE stay parked under D9.
        Dated clause 2026-10-26 (15 #765-#779): retired for the panel - its log now holds the real conversation; the
        per-page assistant families and the assistant PAGE remain parked.
     5. TWO ICON SUBSTITUTIONS, from shipped sprite marks. The reference draws its close and send glyphs
        with a Bootstrap Icons FONT (`bi-x-lg`, `bi-send`), so there is no artwork to copy path-for-path —
        the same situation W9 recorded when the mailbox reference shipped its icons as a font, and the same
        resolution: substitute a shipped mark and write it down. Close uses `icon-x-circle` (ours is
        circled where the reference's is a bare X) and send uses `icon-arrow-up` (a direction-neutral send
        affordance, so nothing needs mirroring per language). No new sprite mark, no new token.
     6. The suggestion chips are a LINK and a BUTTON where the reference has two buttons — the track chip
        is a real navigation, so it is an <a> and works with scripts blocked (the same "upgrade a working
        link" call the welcome tour's skip/continue controls record). Both share one rule with an explicit
        `line-height`, so the two element types compute the identical box (lesson 8: a <button> ignores the
        ambient line-height, and a pill built on one drifts from its <a> sibling without this).

   THE CHAT'S ROOM AND THE PHONE VIEW (owner ruling 15 #782, 2026-10-26): the keyboard, the room at every width, the touch boxes,
   the log's visible share and the contained scrolling are written at the rules that carry them; the shipped sheet, the floating
   launcher (15 #191, #627) and the bar's safe area are unchanged.
   ============================================================ */

/* ---- the widget shell. No padding, no line box: the launcher is block-level, so this box is exactly the
   launcher's box and the declared inset IS the rendered gif gap (mechanism 1). ---- */
.rp-assistant {
    position: fixed;
    z-index: 700;
    inset-inline-end: 20px;
    inset-block-end: calc(var(--rp-assistant-rest) + var(--rp-assistant-keyboard, 0px));
}

.rp-assistant-fab {
    display: block;
    width: 102px;
    height: 102px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    transition: transform 700ms cubic-bezier(0, 0, .2, 1);
}

.rp-assistant-fab:hover { transform: scale(1.3); }
/* The held press eases over the launcher's own 700ms, as its hover does (dated 2026-10-29): the portal's press layer gives every
   pressed button .14s, and this class rule outranks it. Reduced motion still stops it (the portal's duration-zero cover). */
.rp-assistant-fab:active { transform: scale(.95); transition-duration: 700ms; }
.rp-assistant-fab img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---- CONTENT CLEARANCE beside the fixed launcher (design-review finding, 2026-08-24): page
   content could scroll to rest under the launcher's footprint -- it covered the dashboard's
   Pickup Appointments empty state and rode card corners on several pages. ONE shell-level
   block-end reservation keeps the last line of content clear and follows the launcher's footprint
   when its phone position changes under 15 #191c.
   Values are this family's own declared geometry: desktop = 33.5px inset-block-end + 102px fab;
   the <=720 tier below = bar height + launcher inset + phone size + bottom safe area (15 #191c).
   :has() scopes the reservation to pages that actually carry the launcher, so the three
   LayoutSuppressAssistant opt-outs keep their exact layout -- the same mechanism
   .rp-shell:has(.pd-layout) uses earlier in this file. The hover scale(1.3) growth is transient
   pointer feedback, not part of the resting footprint the reservation targets.
   Dated 2026-11-13 (rulings 15 #1374, #1381): on ordinary signed-in pages the room is now inside the copyright line's own
   box from 721px, where it also clears the hovered launcher, and after the line at phone width, both set in the Portal
   stylesheet; this rule still serves the pickup confirmation page, the signed-out error shell and print. ---- */
.rp-shell { --rp-assistant-clearance: calc(33.5px + 102px); }

.rp-shell:has(.rp-assistant) .rp-wrap { padding-block-end: var(--rp-assistant-clearance); }
/* A FORM'S LAST ACTION COMES TO REST CLEAR OF THE LAUNCHER (owner ruling 15 #1189, 2026-11-10). The launcher floats over
   the page (15 #627) and the end-of-page room above lets the last line be scrolled clear, but a form's submit button
   brought into view by the keyboard or by a reveal stopped at the column's bottom edge, under the launcher: measured on
   Personal Data at 1440 px in English, the launcher's box lay over 63 px of Save's width. The submit button now asks
   for the launcher's own clearance below it when it is scrolled into view, the margin the company pages' controls
   already carry (site.css). Nothing moves at rest, and a page scrolled by hand can still pass under the launcher. */
.rp-shell:has(.rp-assistant) .rp-content form button[type="submit"] {
    scroll-margin-block-end: calc(var(--rp-assistant-clearance) + var(--kp-space-sm));
}

/* ---- THE BOTTOM STRIP (owner ruling 15 #595, 2026-10-18, which settles the mechanism 15 #588 asked for) ----
   "No fixed overlay may cover an interactive control at its resting, unscrolled position" (15 #588). The end-of-page
   reservation above keeps the LAST line of content clear once scrolled, but at rest a page longer than the window put
   whatever control happened to sit at the fold under the phone bar or the launcher (measured: the dashboard tabs under
   the bar at 360x800, profile cards and the email page's Change button under the launcher at 390x844 and 1267x485).
   So on every signed-in page the content column ends above a content-free strip at the bottom of the window, and the
   fixed controls live in that strip; the column scrolls inside itself instead of under them.
   WHERE: the content column .rp-content (the layout's existing wrapper of the topbar, the account bar and main), not
   main alone, so the topbar keeps scrolling away with the page exactly as it did when the window scrolled.
   HOW HIGH: the strip is the existing clearance of whichever overlays the page carries - the launcher's footprint where
   it shows (desktop 33.5px + 102px; phones the bar, one inset and the 64px launcher, the variable above), the bar alone
   on a phone page without the launcher, nothing where neither shows. A visible toast may raise it (site.js measures the
   toast and sets --rp-toast-reserve), so a toast never lies over content either.
   WHAT MOVES WITH IT: the window itself no longer scrolls on these pages; the column does. The column carries the page
   scrollbar's thin look (site.css) and the scroll locks the sheets and dialogs put on <body>. The bar and the launcher
   keep their recorded placement (15 #191); the signed-out layout has no .rp-shell and is untouched. Dated clause 2026-10-19 (owner ruling 15 #627, which supersedes this mechanism for the launcher): the launcher no longer reserves a strip - it floats over the column at its recorded place (15 #191), and the column takes the whole window height on a page with no phone bar; the end-of-page reservation above still lets the last line scroll clear of it. A toast reserves nothing either: it floats beside the launcher (site.css) and site.js sets no reserve. The phone bar is a full-width row and keeps its strip, so the strip is the bar's alone on a phone and nothing elsewhere. */
.rp-shell { --rp-strip: 0px; }
@media (max-width: 720px) {
    .rp-shell:has(> .rp-mobile-nav) { --rp-strip: round(up, calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom) + 1px), 1px); } /* + the hit room below */
}
/* Dated clause 2026-10-19 (owner ruling 15 #627): the launcher's own strip rule stood on this line - its footprint plus 1px, rounded up to a whole pixel, winning over the bar's rule where both showed. It is removed, because the launcher floats, so the bar's rule above alone sets the strip. THE HIT ROOM that rule's note recorded (fix round 3, 2026-10-18) still holds for the bar: the browser answers presses from at least 0.25px above the bar's top (771.75 for 772), so the bar's strip is its footprint plus 1px, rounded up to a whole pixel. */
/* 2026-10-20 (ledger 15 #623): the column is the containing block of its absolutely positioned descendants, so a visually hidden label inside it no longer makes the window taller than the screen. No z-index, so no new stacking context. */
.rp-shell .rp-content {
    position: relative;
    box-sizing: border-box;
    height: calc(100dvh - var(--rp-strip));
    min-height: 0;
    overflow-y: auto;
    /* A control the keyboard brings into view stops with room for its 4px focus ring (2px wide, 2px out) inside the
       column's edges, not flush with the strip; 2px more because a scroll stops on whole pixels (measured: a 4px
       padding left 0.05px of a phone tab's ring under the strip). */
    scroll-padding-block: 6px;
}
/* Phones clipped sideways overflow at the shell (.rp-shell overflow-x: clip, above); a scrolling column must clip it
   itself, or it would scroll sideways where the page never did. */
@media (max-width: 720px) {
    .rp-shell .rp-content { overflow-x: hidden; }
}
/* Printed, the column gives up its window-bound height and its own scrolling: it takes its content's whole height and
   lets it show, so a long signed-in page flows across printed pages instead of being cut at one window's height. */
@media print {
    .rp-shell .rp-content { height: auto; overflow: visible; }
}
/* The locks the plan sheet, the announcements sheet, the details sheet and the dialog library put on <body> held the
   window still; the column is what scrolls now, so it holds still with them, and with the company's cancel dialog, which takes no body lock (fix round 3, 2026-10-18: Page Down with nothing focused scrolled the column behind it). `hidden` keeps the scroll position. */
body.plan-locked .rp-content,
body.an-locked .rp-content,
body.ds-locked .rp-content,
body.swal2-shown:not(.swal2-toast-shown) .rp-content, .rp-content:has(.corp-modal-layer:not(.hidden)) { overflow-y: hidden; }

/* ---- the panel, born closed. `display: none` is the closed state the view ships; `.is-open` is added by
   site.js alongside aria-hidden="false", so the two can never disagree. ---- */
.rp-assistant-panel {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: var(--rp-assistant-rise-now);
    /* Dated 2026-11-01 (15 #932, #934): 460px wide above the phone sheet (was 365px), never wider than the window less 32px. */
    /* Dated 2026-11-02 (15 #955): 640px wide above 1024px (was 460px), still never wider than the window less 32px. */
    width: min(640px, calc(100vw - 32px));
    display: none;
    overflow: hidden;
    border: 1px solid var(--kp-slate-200);
    border-radius: 16px;
    background: var(--kp-white);
    box-shadow: 0 20px 58px rgb(15 23 42 / .196);
    /* THE REFERENCE'S OWN INHERITED RATIO, and it is load-bearing rather than cosmetic (found by
       measurement, 2026-08-10 — the first build shipped a 72px header and 30px chips against its 75/33.88).
       Its panel inherits a UNITLESS 1.625 from the page, so every child re-derives the leading from its own
       font-size (9px -> 14.625, 15px -> 24.375, 11px -> 17.875). Our portal's ambient ratio is 1.5, which
       silently shortened every text row inside the panel. Declaring the ratio once here reproduces the
       reference's inheritance instead of patching each descendant. */
    line-height: 1.625;
}

/* Dated 2026-11-02 (15 #955): from 1024px down to the phone sheet (641px) the panel opens 560px wide, still never wider than the window
   less 32px; the sheet below 641px sets its own width. */
@media (max-width: 1024px) {
    .rp-assistant-panel { width: min(560px, calc(100vw - 32px)); }
}

.rp-assistant-panel.is-open {
    display: flex;
    flex-direction: column;
    animation: rp-assistant-up .2s ease-out;
}

@keyframes rp-assistant-up {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.rp-assistant-panel > header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 16px;
    background: rgb(244 248 255);
}

.rp-assistant-panel > header small {
    display: block;
    color: var(--color-portal-action);
    font-size: 9px;
    font-weight: 800;
    /* base.css already zeroes tracking on an Arabic run without its own dir, so this one declaration
       serves both languages exactly as the reference renders them (measured: .08em on EN, none on AR). */
    letter-spacing: .08em;
}

.rp-assistant-panel > header b {
    display: block;
    margin-top: 4px;
    color: var(--kp-slate-900);
    font-size: 15px;
}

/* The reference's close is a 28px square button (its browser padding around the mark) with the mark at its centre, so the mark's
   centre sits 31px in from the panel's inline-end edge and top: 1px of border, the header's 16px and half the square (dated
   2026-10-29). Ours keeps its own 15px glyph (a recorded divergence) and takes the reference's square, the glyph centred in it,
   which is also the house's 24px pointer floor. */
.rp-assistant-close {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgb(89 103 124);
    line-height: 0;
}

.rp-assistant-close .icon { width: 15px; height: 15px; }

.rp-chat-log {
    display: grid;
    gap: 10px;
    min-height: min(152px, var(--rp-assistant-log-room));
    /* Dated 2026-11-01 (15 #934): up to 420px (was 240px), never taller than the room the window leaves (15 #782). */
    /* Dated 2026-11-02 (15 #955): up to 620px (was 420px), the room the window leaves still the cap. */
    max-height: min(620px, var(--rp-assistant-log-room));
    overflow: auto;
    padding: 14px;
}

/* Dated 2026-11-03 (15 #988(a, b)): the assistant's side sits at the reading END (was start), and its text is 13px (was 12px). */
.rp-chat-bot {
    justify-self: end;
    max-width: 84%;
    margin: 0;
    padding: 10px;
    border-radius: 9px;
    background: rgb(237 244 255);
    color: rgb(50 78 120);
    font-size: 13px;
    line-height: 1.55;
}

.rp-chat-suggestions {
    display: flex;
    gap: 7px;
    overflow: auto;
    padding: 0 14px 12px;
}

/* One rule for the <a> and the <button> (divergence 6). The line-height is spelled out rather than
   inherited because a <button> ignores the ambient one (lesson 8), and it is the panel's own 1.625 so both
   element types compute the identical 33.88px box the reference's two buttons measure. `normal` was tried
   first and measured 30px — the UA ratio is not the reference's. */
.rp-chat-chip {
    flex: 0 0 auto;
    border: 1px solid rgb(215 229 250);
    border-radius: 99px;
    background: var(--kp-white);
    color: var(--color-portal-action);
    padding: 7px 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.625;
    text-decoration: none;
    /* RESTORES the page's own metric adjust, which a <button> silently loses (found by measurement,
       2026-08-10: the same Arabic string rendered 5.67px wider in the button than in the anchor beside it,
       and the reference's chip matches the ANCHOR). The portal's site.css sets `font-size-adjust: .48` on
       the body; the UA stylesheet gives every button a `font` SHORTHAND, and that shorthand resets
       font-size-adjust to `none` — so the button's glyphs render ~8% wider than the identical text
       anywhere else on the page. `inherit` takes whatever the page is using rather than restating .48,
       the same call the account family already makes at :10145. Without this the two chips, which must be
       one component, disagree with each other.
       THE DIAGNOSIS ABOVE WAS RIGHT AND THE SCOPE WAS WRONG (parity round 2, package B, 2026-08-12): it
       is not this chip's problem, it is every button's and every input's, and fixing one component let
       the same defect ship on the sign-out, the plan pill, the four status tabs, the three direction
       chips, the mailbox buttons and the receipt buttons until the owner reported it. The portal's
       site.css now declares the button and input arms beside the body rule, the way the reference does,
       and PortalArabicMetricAdjustGovernanceTests fails the build if they are ever dropped again. This
       line is now redundant — the base arm reaches this button directly with the same 0.48 — and is kept
       only because it is component-local and harmless; nothing new should be written in this shape. */
    font-size-adjust: inherit;
}

/* Dated 2026-11-03 (15 #988(c)): the row's padding is 12px (was 10px) above 720px; the 720 rung keeps its own. */
.rp-chat-form {
    display: flex;
    gap: 7px;
    border-top: 1px solid var(--kp-slate-200);
    padding: 12px;
}

.rp-chat-input {
    min-width: 0;
    flex: 1;
    /* The reference's text box keeps the browser's inner inset, 1px above and below and 2px at each side (dated 2026-10-29); the
       outer box is the row's (Send's 28px here, the 44px finger box on the phone), so the inset sits inside it.
       Dated 2026-11-03 (15 #988(b, c)): the box now sets the row's height itself - at least 40px here (the 44px finger box on the
       phone) - in a 1px frame of the panel's line colour with an 8px radius on a faint field background, with 10px of inner space
       at each side and none above or below; the frame sits inside the box (border-box). Its text is 14px (was 13px). */
    box-sizing: border-box;
    min-block-size: 40px;
    padding: 0 10px;
    border: 1px solid var(--kp-slate-200);
    border-radius: 8px;
    outline: 0;
    background: var(--kp-slate-50);
    color: var(--kp-slate-900);
    font-size: 14px;
}

/* The framed box's keyboard focus (dated 2026-11-03, 15 #988(c)): the portal text field's own focus dress (`.ref-field input:focus`:
   the accent border and its 3px gold ring), so the frame shows where typing goes; a flagged box keeps its alert ring instead. */
.rp-chat-input:focus:not(.is-invalid) {
    border-color: var(--color-portal-accent);
    box-shadow: 0 0 0 3px rgb(203 160 82 / .133);
}

/* The send control drives the row's height, and the input stretches to it (the flex default) — exactly as
   the reference does it, where a 26px inherited leading plus the UA button padding adds up to 28. Ours
   states the 28 outright and centres the mark, because reproducing a UA padding default by accident is how
   a row silently collapses: the first build had `line-height: 0` here and measured a 16px row.
   Dated 2026-11-03 (15 #988(c)): above 720px Send is 40 x 40 (was 34 x 28) and matches the text box, which now sets the row's
   height through its own 40px minimum; Send still states its size outright. The 720 rung keeps the phone's 34 x 28. */
.rp-chat-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: var(--color-portal-action);
    color: var(--kp-white);
}

.rp-chat-send .icon { width: 15px; height: 15px; }

/* ---- the working chat (dated 2026-10-26, owner rulings 15 #765-#779). The parked state's dimmed controls are gone: the chat now
   works, so its controls are live. Values: the reference's signed-in assistant (static-runtime.css, `.sr-chat-log p` and
   `.sr-chat-log .user`) and its company chat's typing dots (`corp-chat-typing`, `@keyframes corp-chat-dot`). ---- */
.rp-assistant-tools { display: flex; align-items: center; gap: 6px; }

/* The same quiet dress as the close control beside it: a designed addition (New conversation, 15 #766(b)) the reference lacks,
   styled to fit (Core Rule 13). */
.rp-assistant-new {
    /* The house's 24px pointer floor (dated 2026-10-29): the box grows around the 15px mark, which stays at its centre. */
    display: grid;
    place-items: center;
    min-inline-size: 24px;
    min-block-size: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgb(89 103 124);
    line-height: 0;
}

.rp-assistant-new .icon { width: 15px; height: 15px; }

/* One exchange - the question, then its answer, refusal, notices or failure - is one group, so the page can show exactly the
   exchanges the Portal keeps, each as a whole group. It lays its bubbles out exactly as the log does (the same grid and gap), so a
   group is invisible. */
.rp-chat-exchange {
    display: grid;
    gap: 10px;
}

/* Text, never markup: assistant.js sets every bubble through text nodes. pre-line keeps the answer's own line breaks; anywhere
   lets a long unbroken word (a tracking number, a pasted address) wrap inside the bubble instead of widening the panel. */
.rp-chat-bot,
.rp-chat-user {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* The message itself, in its own block with its own direction (dir="auto" in the markup): a message in the other language than
   the page reads and aligns in its own direction, while the bubble keeps its place on the page's reading side.
   Dated 2026-11-03 (15 #988(a)): that place is the reading START for the question (the right in Arabic, the left in English) and
   the reading END for the assistant's side - the greeting, every reply, the waiting dots and line, the slow-answer note, the notice
   and the failure line (the left in Arabic, the right in English). */
.rp-chat-text { display: block; }

/* Dated 2026-11-03 (15 #988(a, b)): the question sits at the reading START (was end), and its text is 13px (was 12px). */
.rp-chat-user {
    justify-self: start;
    max-width: 84%;
    margin: 0;
    padding: 10px;
    border-radius: 9px;
    background: var(--color-portal-action);
    color: var(--kp-white);
    font-size: 13px;
    line-height: 1.55;
}

/* The waiting state: the dots with one fixed line beside them (15 #804), and the waiting note under them after 15 seconds
   (15 #779). */
.rp-chat-typing {
    display: grid;
    gap: 6px;
}

.rp-chat-dots { display: inline-flex; gap: 4px; align-items: center; }

/* The one fixed waiting line, the same whatever the server is doing (15 #804): a designed addition beside the reference's dots,
   in the bubble's own type, kept one dot's width further from the first dot than the dots are from each other. */
.rp-chat-waiting { margin-inline-end: 4px; }

.rp-chat-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: rp-chat-dot 1s ease-in-out infinite;
}

.rp-chat-dots i:nth-child(3) { animation-delay: .15s; }
.rp-chat-dots i:nth-child(4) { animation-delay: .3s; }

@keyframes rp-chat-dot {
    0%, 100% { transform: translateY(0); opacity: .55; }
    50% { transform: translateY(-3px); opacity: 1; }
}

/* Dated 2026-11-03 (15 #988(a, b)): at the reading END with the assistant's side (was start), 12px (was 11px). */
.rp-chat-note {
    justify-self: end;
    max-width: 84%;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* A notice (part of an answer could not be read) and a failure both say what happened with its reference and offer Retry, so they
   share one shape; a notice stays quiet, a failure carries the alert dress.
   Dated 2026-11-03 (15 #988(a, b)): both sit at the reading END with the assistant's side (was start); the notice is 12px (was
   11px) and the failure line 13px (was 12px, below). Retry keeps its own place at the start of its line and its 11px. */
.rp-chat-notice,
.rp-chat-error {
    display: grid;
    gap: 6px;
    justify-self: end;
    max-width: 84%;
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.rp-chat-notice { color: var(--color-text-muted); }

.rp-chat-error {
    padding: 10px;
    border-radius: 9px;
    background: var(--status-alert-bg);
    color: var(--kp-portal-danger-500);
    font-size: 13px;
}

.rp-chat-notice p,
.rp-chat-error p { margin: 0; overflow-wrap: anywhere; }

/* Retry takes its colour from the line it sits in: the alert red under a failure, the quiet grey under a notice. */
.rp-chat-retry {
    justify-self: start;
    border: 1px solid currentColor;
    border-radius: 99px;
    background: var(--kp-white);
    color: inherit;
    padding: 4px 10px;
    /* The house's 24px pointer floor (dated 2026-10-29): the Arabic face sets the line 2px shorter than the English one, so the
       box states its minimum and the words stay centred in it. */
    min-block-size: 24px;
    font-size: 11px;
    font-weight: 700;
}

/* THE TEXT BOX UNDER THE HOUSE VALIDATION LAW (dated 2026-10-26). Its label holds only the portal's required asterisk on screen
   (the name is visually hidden); the box keeps the reference's borderless dress, so its invalid state is drawn as a ring from the
   portal's own alert tokens rather than a border, which would change the row's geometry.
   Dated 2026-11-03 (15 #988(c)): the box now wears a 1px frame; the ring still draws the invalid state, over the frame's outer
   edge, and follows its 8px radius (was 6px). */
.rp-chat-label {
    display: flex;
    align-items: center;
}

.rp-chat-label .field-required-marker { margin-inline-start: 0; }

.rp-chat-input.is-invalid {
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--status-portal-alert-fg);
}

.rp-chat-input.is-invalid:focus {
    box-shadow: 0 0 0 1px var(--status-portal-alert-fg), var(--focus-ring-portal-danger);
}

/* The engine adds its message right after the text box, which in this row is BEFORE Send. As a plain flex item it would sit
   between the box and Send and push Send onto a line of its own; `order` moves it after Send and the full basis gives it its own
   line, so the box and Send stay together on the first line and the sentence sits under both (the form-validation trap,
   2026-07-25, met here in a new shape). The portal's alert red, as every portal field message. */
.rp-chat-form { flex-wrap: wrap; }

.rp-chat-form .field-error-msg {
    order: 1;
    flex-basis: 100%;
    margin-block-start: 0;
    color: var(--status-portal-alert-fg);
}

/* THE CHAT'S ROOM (dated 2026-10-26, owner ruling 15 #782: the chat and everything it shows, kept inside the part of the window the
   reader can see). A phone's on-screen keyboard covers the bottom of the window without moving anything fixed there, and a phone on
   its side is shorter than the chat. assistant.js reads the visible part from the browser (visualViewport) and sets two values on
   this widget: how much of the window lies below the visible part (--rp-assistant-keyboard) and how tall the visible part is
   (--rp-assistant-visible). Before the script runs, and with no keyboard, they are 0 and the whole window, so every rule here gives
   the reference's own numbers wherever the window is tall enough.
   The widget's bottom edge rests --rp-assistant-rest above the visible part's bottom (33.5px, the reference's launcher inset), and
   the open panel stands --rp-assistant-rise above that edge (63px, the reference's). When the visible part is too short for the
   panel at that height, the panel first sinks over the launcher, never closer than 8px to the visible bottom, keeping the log at
   least 60px while it can; then the conversation gives way: the log takes the room left after the panel's fixed parts
   (--rp-assistant-chrome: the header 75px, the chips row 46px, the text box row 48px and the message line it gains under the text
   box, 27px at most - measured in plan task 5.6) and scrolls inside itself. The panel keeps 16px clear above it. The panel is
   anchored by its bottom edge, so the text box and Send stay in view however small the rest becomes.
   Dated 2026-11-03 (15 #988(c)): above 720px the text box row is taller - measured at 1440x900 and 800x900 in both languages, its
   padding box is 64px without the message (12 + 40 + 12; 65px with its top rule) and 89-90px with it (91.33px at most with the
   rule), 16px more than the 48px row and its 27px line counted before - so the fixed parts there are 216px (was 200px); the 720
   rung, whose row is unchanged, restates 200px. */
.rp-assistant {
    --rp-assistant-rest: 33.5px;
    --rp-assistant-rise: 63px;
    --rp-assistant-chrome: 216px;
    --rp-assistant-rise-now: clamp(calc(8px - var(--rp-assistant-rest)),
        calc(var(--rp-assistant-visible, 100dvh) - 16px - var(--rp-assistant-chrome) - 60px - var(--rp-assistant-rest)),
        var(--rp-assistant-rise));
    --rp-assistant-room: calc(var(--rp-assistant-visible, 100dvh) - var(--rp-assistant-rest) - var(--rp-assistant-rise-now) - 16px);
    --rp-assistant-log-room: max(0px, calc(var(--rp-assistant-room) - var(--rp-assistant-chrome)));
    /* The reference's phone share of the log, 32% of the window (`.sr-chat-log`, max-height: 32dvh), taken of the VISIBLE part;
       read by the phone rules below. */
    --rp-assistant-log-share: calc(var(--rp-assistant-visible, 100dvh) * .32);
}

/* Reaching either end of the conversation never moves or bounces the page behind the chat. */
.rp-chat-log { overscroll-behavior: contain; }

/* The conversation takes the keyboard (it scrolls), so its keyboard focus wears the portal's own ring - 2px solid in the action
   colour (dated 2026-10-29). The log spans the panel's whole inner width and the panel clips what lies outside it, so the ring is
   drawn inside the log's own edge rather than 2px outside it. */
.rp-chat-log:focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: -2px;
}

@media (max-width: 720px) {
    /* 15 #191c: the launcher rests one phone inset above the bar, sharing the edge-inset token so the two never drift apart;
       owner 15 #782: while the keyboard covers the bar it rests one inset above the keyboard instead. --rp-assistant-rest is
       measured from the visible part's bottom, so the keyboard's height is taken back out of the bar's. */
    .rp-assistant {
        inset-inline-end: var(--kp-portal-assistant-phone-inset);
        --rp-assistant-rest: max(
            calc(var(--kp-portal-mobile-nav-height) + var(--kp-portal-assistant-phone-inset) + env(safe-area-inset-bottom) - var(--rp-assistant-keyboard, 0px)),
            var(--kp-portal-assistant-phone-inset));
        /* 15 #191b: the block FAB and container share a bottom edge, so size - 16px puts the bubble base 16px below the resting FAB top. */
        --rp-assistant-rise: calc(var(--kp-portal-assistant-phone-size) - 16px);
        /* Dated 2026-11-03 (15 #988(c)): the fixed parts stay 200px here - the phone's text box row is unchanged at 48px. */
        --rp-assistant-chrome: 200px;
    }

    .rp-shell { --rp-assistant-clearance: calc(var(--kp-portal-mobile-nav-height) + var(--kp-portal-assistant-phone-inset) + var(--kp-portal-assistant-phone-size) + env(safe-area-inset-bottom)); }

    .rp-assistant-fab { width: var(--kp-portal-assistant-phone-size); height: var(--kp-portal-assistant-phone-size); }

    /* The log keeps the reference's 152px floor and 240px cap wherever the visible part is tall enough (750px and taller), and
       gives way below that, never taking more than the room the panel's fixed parts leave (owner 15 #782). */
    /* Dated 2026-11-01 (15 #934): above the sheet the cap is 420px here too (was 240px); the share and the room still bound it. */
    /* Dated 2026-11-02 (15 #955): the cap here is 620px too (was 420px); the room still bounds it. */
    .rp-chat-log {
        min-height: min(152px, var(--rp-assistant-log-share), var(--rp-assistant-log-room));
        max-height: min(620px, var(--rp-assistant-log-room)); /* Dated 2026-11-02 (15 #934): the room alone caps it above the sheet; the share, which held it at 288px against 558px of room at 700x900, now bounds only min-height (the earlier answer keeping it is withdrawn). */
    }

    /* TOUCH SIZE (owner 15 #782; the house floor is 24px). Each control presents a 44px touch box grown around its
       drawn mark, never by moving the mark: an empty ::after reaches out to 44px around the control and, being part of it, takes
       the press. New conversation stands 19px from close so the two boxes never overlap. Dated 2026-10-29: close is the reference's
       28px square and New a 24px box (the house pointer floor), each box centred on its mark, so the two centres stand 14 + gap +
       12 apart; 18px would put the 44px boxes edge to edge, and one pixel more keeps them 1px apart once the browser rounds them to
       whole pixels - the same 45px between the two marks' centres as before (it is this product's addition beside the reference's
       lone close control, styled to fit). Close's box reaches 9px from the panel's inline-end edge and 9px below its top, inside
       the header. */
    .rp-assistant-tools { gap: 19px; }

    .rp-assistant-new,
    .rp-assistant-close,
    .rp-chat-send,
    .rp-chat-retry,
    .rp-chat-chip { position: relative; }

    .rp-assistant-new::after,
    .rp-assistant-close::after,
    .rp-chat-send::after,
    .rp-chat-retry::after {
        content: '';
        position: absolute;
        inset-block: min(0px, calc((100% - 44px) / 2));
        inset-inline: min(0px, calc((100% - 44px) / 2));
    }

    /* The chips live in a sideways scroller, which clips anything above its top edge, so their touch box hangs from the chip's top
       into the row's own 12px of bottom padding. */
    .rp-chat-chip::after {
        content: '';
        position: absolute;
        inset: 0;
        inset-block-end: min(0px, calc(100% - 44px));
    }

    /* The input keeps its 44px minimum, the form keeps 2px block padding, and Send stays centred. The message-free row is a 48px
       padding box, 49px with its top border: measured 2026-10-29 at 360, 390, 700 and 720px wide in both languages, the 44px input
       plus 2px of padding above and below, and the 1px top border.
       Text stays at the reference's 13px; focus zoom is accepted.
       Dated 2026-11-13 (ruling 15 #1364): through 720px the text is 16px and the focus zoom is no longer accepted (the
       Portal stylesheet's phone typing block).
       Dated 2026-11-03 (15 #988): the text is 14px here too (was 13px, (b)); the box keeps its 44px and takes the base rule's 1px
       frame and 10px inner space, the frame inside the 44px (border-box), so the row still measures 48px; the row keeps its 10px at
       each side (the base rule's 12px is for wider windows) and Send keeps the phone's 34 x 28 (the stated reading of 15 #988: the
       ruling names the 40 x 40 Send only for computer and tablet). */
    .rp-chat-form { padding-block: 2px; padding-inline: 10px; }
    .rp-chat-input { min-block-size: 44px; font-size: 14px; }
    .rp-chat-send { align-self: center; width: 34px; height: 28px; }
    .rp-chat-form .field-error-msg { padding-block-end: 8px; }
}

/* The reference's phone treatment: the panel stops being a bubble beside the launcher and becomes a
   bottom sheet spanning the viewport (app.bundle.css, static-runtime.css @media(max-width:640px)). */
@media (max-width: 640px) {
    /* Owner 15 #782: the sheet's bottom edge sits --rp-assistant-sheet-rest above the visible part's bottom - the bar and its safe
       area (15 #191a), or nothing while the keyboard covers the bar - and its room is the visible part above that edge, less an 8px
       gap at the top. */
    .rp-assistant {
        --rp-assistant-sheet-rest: max(calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom) - var(--rp-assistant-keyboard, 0px)), 0px);
        --rp-assistant-room: calc(var(--rp-assistant-visible, 100dvh) - var(--rp-assistant-sheet-rest) - 8px);
    }

    .rp-assistant-panel {
        position: fixed;
        /* 15 #191a: the phone sheet rests on the fixed bottom bar, including its safe area; owner 15 #782: on the keyboard's top
           edge while the keyboard covers the bar. */
        inset-block-end: calc(var(--rp-assistant-keyboard, 0px) + var(--rp-assistant-sheet-rest));
        inset-inline: 0;
        width: auto;
        border-radius: 16px 16px 0 0;
    }

    /* The reference's 32dvh, taken of the visible part; no 240px cap on the sheet, as in the reference; never more than the room
       the sheet's fixed parts leave (owner 15 #782). */
    .rp-chat-log {
        min-height: min(152px, var(--rp-assistant-log-share), var(--rp-assistant-log-room));
        max-height: min(var(--rp-assistant-log-share), var(--rp-assistant-log-room));
    }
}

/* This family's own reduced-motion arm (the standing rule since W2: every ported family ships with one).
   CORRECTED 2026-08-11 — this arm is the one the owner actually reported ("mousing over the smart
   assistant is not making it bigger"). It used to add `.rp-assistant-fab:hover, :active { transform:
   none }`, which does not slow the growth down, it deletes it: with OS animations off the launcher never
   grew and never pressed. The reference's own arm for the same control shortens the duration and nothing
   else (css/smart-assistant.css:94-98, `button.smart-assistant-launcher { transition-duration:
   .01ms !important }`), so its launcher still reaches scale(1.3) — instantly. Ours now does the same:
   the transition stops, the hover and press end states stay. The panel's entrance is a genuine
   animation, so it still stops; its open/closed state is untouched, because that is information. See the
   portal's reduced-motion contract at the dashboard-polish block for the whole rule. */
@media (prefers-reduced-motion: reduce) {
    .rp-assistant-fab { transition: none; }
    .rp-assistant-panel.is-open { animation: none; }
    /* The dots stay, still: the waiting state is information, the bounce is decoration. */
    .rp-chat-dots i { animation: none; opacity: 1; }
}

/* ============================================================
   PORTAL ERROR PAGE — a DESIGNED ADDITION (parity fix wave P2.6, 2026-08-11)

   The reference package ships no error surface at all, so there is no geometry to match and nothing in
   this block is a parity value. It belongs to the keep-shipped-extras family: a screen the reference
   simply lacks, dressed in the shipped design language so it does not read as an unfinished page.

   Views/Shared/Error.cshtml is a LIVE destination -- HomeController.Index renders it whenever the /me
   or /mail envelope comes back empty, the dashboard's own failure path on an auto-pausing development
   database -- and until this wave it was a bare heading, one sentence and a reference number with no way
   back. That is what this dresses.

   Everything here is reuse: the glass tokens the portal's panels already use, the sprite's existing info
   mark, the alert ink from the validation family, and the shipped .dc-ticket-action-cta for the way
   home. No new token, no new string, no new colour.
   ============================================================ */
.rp-error-card {
    display: flex;
    max-width: 560px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px;
    border: var(--glass-card-border);
    border-radius: var(--kp-radius-xl);
    background: var(--glass-card-bg);
    box-shadow: 0 6px 18px rgb(15 23 42 / .047);
    backdrop-filter: var(--glass-card-blur);
}
.rp-error-card p { margin: 0; color: var(--color-text); font-size: 14px; line-height: var(--leading-body); }
.rp-error-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--kp-radius-lg);
    background: var(--status-portal-alert-bg);
    color: var(--status-portal-alert-fg);
}
.rp-error-mark .icon { width: 24px; height: 24px; }
.rp-error-ref small { color: var(--color-text-muted); font-size: 12px; }

/* ============================================================
   COUNTER HAND-OVER (owner rulings 2026-09-09, ledger 15 #194)
   One parcel at a time: the item card, the people it may be handed to, the step ladder, and the record it
   leaves. It earns its own family because nothing shipped answers its shape -- a choice list whose items are
   PEOPLE with reasons attached, and a vertical ladder whose rungs are decided by the server.

   Everything here is token-bound and reuse-first: the identity, badge, note, form and button families are the
   shipped ones, so the only new geometry is the layout that holds them. No hex, no new colour.
   ============================================================ */
.hand-over-panel {
    margin-block-end: 16px;
    padding: 20px;
}
.hand-over-card { display: flex; flex-direction: column; gap: 16px; }
.hand-over-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hand-over-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--color-border);
}
.hand-over-section-title {
    margin: 0;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
}

/* The people this parcel may be handed to. A CARD PER PERSON rather than a select, because the officer is
   comparing names and Civil IDs against a document in front of him and a collapsed list hides exactly the
   line he has to read. The grid is auto-fit so one choice fills the row and four wrap without a breakpoint. */
.hand-over-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.hand-over-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    /* The card is the LABEL of a real radio, and the radio is positioned inside it (2026-09-13). */
    position: relative;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-lg);
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-size: 13px;
    text-align: start;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.hand-over-choice:hover { border-color: var(--color-action-primary); }
/* THE CARD WEARS THE CONTROL'S FOCUS RING (2026-09-13). The choice is a native radio inside this label, so
   the group's keyboard model -- one tab stop, arrows between the people -- is the browser's; the control
   itself is clipped, because the card's own border and background are what say which choice stands and a
   second dot beside them would say it twice. A clipped control cannot draw a ring, so the card draws it,
   and only for a keyboard visit, exactly as the button this replaced did. */
.hand-over-choice-input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}
.hand-over-choice:has(> .hand-over-choice-input:focus-visible) {
    outline: 2px solid var(--color-action-primary);
    outline-offset: 2px;
}
.hand-over-choice.is-chosen {
    border-color: var(--color-action-primary);
    background: var(--status-scheduled-bg);
}
/* An INELIGIBLE delegate is still listed, greyed, with the reason underneath (the no-silent-blocking law):
   a card that simply disappeared would tell the officer nothing about why. It is not `disabled`, because a
   reader must still be able to move onto it and hear the reason. */
.hand-over-choice.is-blocked {
    border-style: dashed;
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    cursor: not-allowed;
}
.hand-over-choice-name { font-weight: 600; }
.hand-over-choice-meta { color: var(--color-text-muted); font-size: 12px; }
.hand-over-choice-reason { color: var(--status-alert-fg); font-size: 12px; }

.hand-over-manual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.hand-over-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* The ladder. A vertical list, because its rungs are a SEQUENCE the officer walks down and a horizontal
   stepper would put the current step's own message beside the next step's label. The connector is drawn on
   the mark rather than between rows, so a ladder of two rungs and one of three need no separate rule. */
.hand-over-ladder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hand-over-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-lg);
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 13px;
}
.hand-over-step.is-active {
    border-color: var(--color-action-primary);
    background: var(--status-scheduled-bg);
    color: var(--color-text);
}
.hand-over-step.is-done {
    border-color: var(--status-success-fg);
    background: var(--status-success-bg);
    color: var(--status-success-fg);
}
.hand-over-step-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: var(--kp-radius-full);
    background: var(--color-bg-surface);
}
.hand-over-step-mark .icon { width: 16px; height: 16px; }
.hand-over-step-text { flex: 1 1 auto; font-weight: 600; }
/* The wait carries the countdown to the SERVER's persisted deadline, so a page reopened after a refresh
   counts down to the same moment the first one did. */
.hand-over-step-wait {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 12px;
    white-space: nowrap;
}
.hand-over-step-wait .icon { width: 14px; height: 14px; animation: kp-hand-over-spin 1.1s linear infinite; }

/* THE STEP'S BODY AND ITS STRIP (owner rulings 15 #1462, #1464, #1466(a); KPDMP-38). A passed step names the person it
   checked under its title: a light strip of name | Civil ID, plus a company representative's role labels, which wrap
   onto the next line inside the strip. Built from the info badge's tokens (no new colour); the mark aligns with the
   title, not with the middle of a two-line step. */
.hand-over-step-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-inline-size: 0;
}
.hand-over-step.has-strip { align-items: flex-start; }
.hand-over-step.has-strip .hand-over-step-text { line-height: 28px; }
.hand-over-step-strip {
    margin-block-start: 6px;
    padding: var(--kp-space-sm) 12px;
    border: 1px solid var(--badge-info-border);
    border-radius: var(--kp-radius-md);
    background: var(--badge-info-bg);
    color: var(--color-text);
    font-size: 14px;
    /* Dated 2026-11-16 (Jira KPDMP-38, measured on the approved boards): an 18px line, so a strip of name | Civil ID is 36px
       high and one with a role chip 42px, as the approved boards render them; inherited, the house 1.65 made it 41px. */
    line-height: 18px;
}
/* Dated 2026-11-16 (Jira KPDMP-38, measured on the approved boards): the strip's items wrap inside this row, and the "|" goes
   with the Civil ID (`__id`), drawn 12px before it on a zero-wide box. On a shared row the name's 14px end margin and
   the 10px gap put the bar between the two, as before; when the Civil ID starts a row of its own, the bar falls outside
   the row's inline-start edge and the row's clip hides it, so the bar is not left alone at either end of a row (measured
   at 1440, 390 and 360px in both languages). A long name is one item that wraps inside itself (`overflow-wrap:
   anywhere`) and then fills the row, so the Civil ID goes to the next row. Only the inline axis is clipped, so the clip
   cannot cut a glyph's top or bottom. */
.hand-over-step-strip__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    overflow-x: clip;
}
.hand-over-step-strip__name { margin-inline-end: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hand-over-step-strip__id { display: flex; align-items: center; }
.hand-over-step-strip__sep {
    display: flex;
    justify-content: center;
    inline-size: 0;
    margin-inline: -12px 12px;
    color: var(--color-text-muted);
}
.hand-over-step-strip .stamp { white-space: nowrap; }

/* COLLECTED BY ON ONE LINE (15 #1466(b)(c)): the name, then the kind label or the role labels, which wrap under the name
   inside the value and never under the line's title. The kind label is outlined, from the info badge's tokens. */
.hand-over-collector {
    display: flex;
    flex: 1 1 0;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-sm) 12px;
    min-inline-size: 0;
}
.hand-over-kind-label {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    padding: 2px 10px;
    border: 1px solid var(--badge-info-border);
    border-radius: var(--kp-radius-full);
    background: var(--color-bg-surface);
    color: var(--badge-info-text);
    font-size: 12px;
    font-weight: 600;
    /* Dated 2026-11-16 (Jira KPDMP-38, measured on the approved boards): the tight leading token, 15px on the 12px text, so
       the label is 21px high with its padding and outline, as the approved boards render it; inherited, the house 1.65
       made it 25.8px. */
    line-height: var(--leading-tight);
}

@keyframes kp-hand-over-spin { to { transform: rotate(360deg); } }

/* The reduced-motion end state is the STILL mark, never a half-turn frozen mid-spin. */
@media (prefers-reduced-motion: reduce) {
    .hand-over-step-wait .icon { animation: none; }
    .hand-over-choice { transition: none; }
}

@media (max-width: 720px) {
    .hand-over-panel { padding: 14px; }
    .hand-over-choices,
    .hand-over-manual { grid-template-columns: 1fr; }
    .hand-over-actions > * { flex: 1 1 100%; }
}


/* ============================================================
   COMPANY REGISTRATION — the wizard at /Register/Company (ledger 15 #272; rulings 15 #351, #354-#359)
   Reference: docs/reference/subscribersPortal-KuwaitMail/register-corporate-details.html (v2) and the
   filed corporate additions, docs/reference/company-registration-2026-09-23/portal-mockup-corporate-additions/
   css/corporate-details.css, which carry the families below under the same `corp-*` names so each rule can be
   traced to its source line. Surfaces neither file draws (the identity wait, a file's own progress and error,
   the staged-file lock, the submission bar) are composed from the same family's own values.

   SCOPE. Every class here is a `corp-*` name no other screen uses, and the family's colour variables are set
   on `.corp-page`, the class these pages put on <body>, so they resolve nowhere else. The status and tracking
   pages share the family and add their own block further down. (2026-10-10: the two signed-in company pages, the
   company profile and its change request, render the family inside the portal's signed-in shell, whose body is not
   `.corp-page`, so their own content wrapper carries `.corp-scope`. The scope takes the colour variables below and
   a twin of each behaviour rule written on the page class, in the same rule; it never takes the page's own
   geometry - the full height, the end padding, the paper, the stacking context. The Arabic text size goes only to
   the change form's wrapper, `.corp-scope--form`, as the 17px rule below records.)

   PALETTE (portal palette clause, intake D1). The package's hex values are never copied. Each brand role is
   one official token, set once on `.corp-page` below and read through its `--corp-*` name; a tint is that same
   official value at an alpha. The package's non-brand hues are re-expressed: its blue-50 washes become the
   official navy at .05, its amber states the official gold (text on the official gold-text token), its red and
   green states the official crimson and green at an alpha, with the success TEXT on the shipped
   --kp-emerald-700 the portal already uses for that role (contrast on white).

   DIRECTION. Logical properties throughout: the package's two physical four-value `inset`s on the ambient
   blooms become block/inline pairs, so the blooms mirror with the page; the one horizontal gradient (the phone
   progress fill) carries its own right-to-left angle. (Corrected 2026-10-10: the blooms no longer mirror. The
   package's physical insets keep them at the same corners in both languages, so the Arabic page swaps the pairs'
   inline insets back, still logical; see the ambient pair below.)

   ARABIC. The package raises Arabic text by 106.25% with a 1.625 line height and drops every tracked label to
   letter-spacing 0 (Arabic is never tracked); the fonts follow the culture through the --font-* tokens.
   ============================================================ */
.corp-page,
.corp-scope {
    --corp-primary: var(--kp-postal-navy-600);
    --corp-primary-deep: var(--kp-postal-navy-700);
    --corp-gold: var(--kp-stamp-gold-500);
    --corp-gold-soft: var(--kp-stamp-gold-300);
    --corp-gold-text: var(--kp-stamp-gold-text);
    --corp-paper: var(--kp-slate-50);
    --corp-ink: var(--kp-slate-900);
    --corp-muted: var(--kp-slate-600);
    --corp-line: var(--kp-slate-200);
    --corp-success: var(--kp-green-700);
    --corp-success-text: var(--kp-emerald-700);
    --corp-danger: var(--kp-red-700);
    --corp-surface: var(--kp-white);
}
.corp-page {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow-x: clip;
    padding-block-end: 80px;
    color: var(--corp-ink);
    background: var(--corp-paper);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}
/* 17px, not the package's 106.25% (corrected 2026-10-08). The package's corp page is a block under a body pinned at
   16px, so its 106.25% is 17px at every width. Our corp page IS the body, and the portal raises the Arabic root to 17px
   above 800px (site.css), so the same percentage compounded to 18.0625px there: every inherited Arabic size on the
   wizard and the status page read 18.0625px against the package's 17px at 900, 1100 and 1440px. At 800px and below,
   where the root is 16px, the page was already 17px, and English never takes this rule.
   (2026-10-10: in the signed-in shell the change form's wrapper takes the same size, as its reference, the
   corporate registration form, measures 17px with a 27.625px line at 1280, 800 and 390px; the corporate profile's
   wrapper does not, as its references, the signed-in profile pages, measure 16px with a 24px line at all three.) */
html[lang="ar"] .corp-page,
html[lang="ar"] .corp-scope--form { font-size: 17px; line-height: 1.625; }
html[lang="ar"] .corp-page .corp-field-label,
html[lang="ar"] .corp-scope .corp-field-label,
html[lang="ar"] .corp-page .corp-identity-head > span,
html[lang="ar"] .corp-scope .corp-identity-head > span,
html[lang="ar"] .corp-page .corp-identity-grid small,
html[lang="ar"] .corp-scope .corp-identity-grid small,
html[lang="ar"] .corp-page .corp-route-title h1,
html[lang="ar"] .corp-scope .corp-route-title h1,
html[lang="ar"] .corp-page .corp-card-heading h2,
html[lang="ar"] .corp-scope .corp-card-heading h2 { letter-spacing: 0; }
.corp-page button:focus-visible,
.corp-scope button:focus-visible,
.corp-page input:focus-visible,
.corp-scope input:focus-visible,
.corp-page select:focus-visible,
.corp-scope select:focus-visible,
.corp-page a:focus-visible,
.corp-scope a:focus-visible { outline: 2px solid var(--corp-primary); outline-offset: 2px; }

/* ---- The page's ground: the package's line grid, not the sign-in wash (2026-10-10) ---------------- */
/* The package paints these pages on a flat canvas under a faint line grid (package :49-57): fixed to the viewport at
   .4, 48px cells in the official navy at .03 (the `--kp-navy-600-a03` token), under a radial mask. Our pages are drawn
   by the signed-out layout, whose `.ref-grid-bg` element carries the sign-in pages' radial wash, and the wash made each
   company page read bluer at the top-left than the package (measured 2026-10-09, both languages, 1440px). The element
   is re-pointed here, the way the register, account and verify routes re-point it, so the sign-in pages keep the wash.
   The canvas under the grid is `.corp-page`'s own paper above, the official slate-50, which is the package's #f8fafc. */
.corp-page .ref-grid-bg {
    position: fixed;
    opacity: .4;
    background-image:
        linear-gradient(var(--kp-navy-600-a03) 1px, transparent 1px),
        linear-gradient(90deg, var(--kp-navy-600-a03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .55), transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgb(0 0 0 / .55), transparent 80%);
}
/* The package's body draws the portal's two blurred blobs as well, but its page is a wrapper that paints an opaque
   canvas over them (package :2-25: relative, isolated, on its paper), so the rendered page shows neither: on its status
   page, which draws no gold bloom, the bottom inline-end corner reads the bare canvas (248,250,252 at 1430,400 in the
   2026-10-09 capture). Here the page IS the body, and once its grid element stops painting an opaque wash nothing
   covers the shared pair (base.css), so these pages switch it off, as the register and verify routes do for the same
   reason. */
.corp-page::before,
.corp-page::after { content: none; }

/* ---- The ambient pair (package :58-60, decorative, behind everything) ---------------------------- */
.corp-ambient {
    position: fixed;
    z-index: 0;
    width: min(55vw, 720px);
    height: min(55vw, 720px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: .45;
    pointer-events: none;
}
.corp-ambient-blue {
    inset-block-start: -18vw;
    inset-inline-start: -18vw;
    background: radial-gradient(circle at 30% 30%, rgb(26 77 184 / .5), rgb(0 51 160 / .25) 45%, transparent 74%);
}
.corp-ambient-gold {
    inset-block-end: -18vw;
    inset-inline-end: -18vw;
    background: radial-gradient(circle at 70% 70%, rgb(203 160 82 / .32), rgb(223 192 128 / .18) 42%, transparent 74%);
}
/* THE PACKAGE'S CORNERS IN BOTH LANGUAGES (2026-10-10). The package writes the two blooms' insets as physical
   four-value `inset`s (package :59-60), so on its Arabic pages the blue bloom stays at the top-left and the gold one at
   the bottom-right (the blue bloom's box at -259,-259 in both languages at 1440px, measured 2026-10-09). The logical
   pairs above mirror on an Arabic page, so the Arabic page swaps their inline insets back, still in logical
   properties: the inline end is the left there. */
html[dir="rtl"] .corp-ambient-blue { inset-inline-start: auto; inset-inline-end: -18vw; }
html[dir="rtl"] .corp-ambient-gold { inset-inline-end: auto; inset-inline-start: -18vw; }
/* THE STATUS RENDERER'S SINGLE BLOOM (2026-10-10). The package's status renderer, which its status, returned and
   rejected pages share, draws the grid and the blue bloom alone (corporate-status.js :951-:952), while its wizard draws
   both (corporate-details.js :1117-:1119). Our three pages share one header partial that draws both, so the pages built
   on the status container hide the gold one: the status page, and the tracking page, which the package does not draw
   and which shares that container. */
.corp-page:has(main.corp-status-container) .corp-ambient-gold { display: none; }

/* ---- Header and route title (package :63-77) ---------------------------------------------------- */
/* THE SCROLLED GLASS (2026-10-14). The header stays at the top while the page scrolls under it, so it carries the
   corporate reference's glass set (app.bundle.css :19017-:19019) with it: a ::before layer holding the slate-50 wash at
   .96, a 24px blur at a 160% saturation in both backdrop spellings and a 1px hairline at its block end, transparent at
   the top and opaque once site.js marks the header `is-scrolled` past the reference's 8px. The sticky header without
   the layer let the page's text paint through the logo and the language control (measured at 390px in both languages,
   2026-10-14). The layer takes no pointer, and .corp-header-inner (position relative, z-index 1) keeps the header's
   content above it. The reference writes the hairline as border-bottom; this is the logical border-block-end, the same
   edge on a horizontal page. The reduced-motion rule at the end of this family already shortens both transitions. */
.corp-header { position: sticky; inset-block-start: 0; z-index: 50; height: 96px; transition: box-shadow .2s ease; } /* 15 #1208: 96px at every width (was 60px, 64px from 769px) so the 80px logo shows whole with 8px above and below. */
/* The sticky header's clearance (the window's scroll padding) now lives in the Portal's site.css (dated 2026-10-19):
   the window's scroll padding on the pages that render this header, the header's own height plus 6px (96px at every
   width, 15 #1208), with its measured reason beside it there. This sheet is loaded by the Admin too, and the Admin's root
   scroll padding is set once, by its own sheet's measured-bar rule; every page that renders this header loads the
   Portal's sheet after this one, so the cascade and the measured clearance are unchanged. The 769px block below states
   the same 96px beside a one-line pointer of its own; this pointer keeps the lines of the rules after it where they were, so
   the line references other readers hold into this family still name the same rules. */
.corp-header::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    border-block-end: 1px solid rgb(226 232 240 / .8);
    background: rgb(248 250 252 / .96);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    transition: opacity .2s ease;
}
.corp-header.is-scrolled::before { opacity: 1; }
.corp-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 96rem;
    height: 100%;
    margin: 0 auto;
    padding-inline: 16px;
}
.corp-header-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.corp-back {
    display: grid;
    width: 36px;
    height: 36px;
    margin-inline-start: -8px;
    padding: 0;
    place-items: center;
    border: 1px solid rgb(255 255 255 / .8);
    border-radius: var(--kp-radius-md);
    color: var(--corp-ink);
    background: rgb(255 255 255 / .75);
    box-shadow: 0 1px 3px rgb(0 0 0 / .04), 0 4px 12px rgb(0 0 0 / .06);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.corp-back .icon { width: 18px; height: 18px; }
/* The arrow sprite points to the inline END; "back" points to the start in both directions. */
[dir="ltr"] .corp-back .icon,
[dir="ltr"] .corp-icon-back { transform: scaleX(-1); }
.corp-back:hover { transform: translateY(-2px); background: var(--corp-surface); box-shadow: 0 4px 16px rgb(0 51 160 / .12); }
.corp-logo { display: flex; align-items: center; min-width: 0; }
.corp-logo img { display: block; width: auto; height: 80px; max-width: 240px; object-fit: contain; } /* 15 #1208: 80px tall (was 44), the size the owner chose; the width cap rises to 240px (was 170) so the 237px-wide logo is not shrunk. */
/* THE HEADER'S LANGUAGE CONTROL (2026-10-09). The package draws its company pages' language switch in the header's
   inline-end group (corporate-details.js :1129-:1137, corporate-status.js :256-:265), not as the signed-out pages'
   floating pill. Measured on the rendered package that day, the wizard and the status page alike, both languages, at
   1440, 1100, 900, 780, 700, 500, 390 and 360px: 36px high on a 36px floor at every width, 108px wide on the Arabic
   page and 93.48px on the English one, with the values below; the label's line height and the Arabic page's .48 size
   adjustment come from the page, as they do here. Ours is the shipped culture link rather than a button (the switch is
   a navigation), so the button's own defaults are written out. The lift is for a hover that is not a press: on the
   package a held press shows the portal's press scale instead of the lift (measured the same day), and the press
   layer in the Portal's site.css has no specificity a hover rule would not outrank. The code is tracked on the English
   page and untracked on the Arabic one, as the package renders it; ours keeps dir="ltr" on the code, which exempts it
   from base.css's Arabic zero-out, so the Arabic page's untracking is a rule of its own. */
.corp-header-actions { display: flex; align-items: center; gap: 8px; }
.corp-language-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-ink);
    background: rgb(255 255 255 / .85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}
.corp-language-link:hover { border-color: rgb(203 160 82 / .7); }
.corp-language-link:hover:not(:active) { transform: translateY(-1px); }
.corp-language-link svg.icon { width: 14px; height: 14px; color: var(--corp-gold); }
.corp-language-tag { color: rgb(71 85 105 / .6); font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
html[dir="rtl"] .corp-page .corp-language-tag { letter-spacing: 0; }
/* The English page's label is the Arabic word (lang="ar" on it), which the package leaves to the system's Arabic
   fallback; here tokens.css's own-language rule sets Alexandria on it, at the .48 adjustment the account pages' Arabic
   label also takes. */
html[lang="en"] .corp-page .corp-language-label { font-size-adjust: .48; }
.corp-route-title { position: relative; z-index: 1; width: 100%; max-width: 96rem; margin: 0 auto; padding: 14px 16px 0; }
.corp-route-title > div { display: flex; align-items: center; gap: 10px; }
.corp-route-title i {
    display: none;
    width: 3px;
    height: 26px;
    border-radius: var(--kp-radius-full);
    background: linear-gradient(180deg, var(--corp-primary), var(--corp-gold));
}
.corp-route-title h1 {
    overflow: hidden;
    margin: 0;
    color: var(--corp-ink);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- The column and its cards (package :86, :124-139) ------------------------------------------- */
.corp-container { position: relative; z-index: 1; width: 100%; max-width: 58rem; margin: 0 auto; padding: 18px 16px 0; }
.corp-form-wrap { display: grid; gap: 16px; }
.corp-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgb(255 255 255 / .8);
    border-radius: var(--kp-radius-lg);
    background: rgb(255 255 255 / .88);
    box-shadow: 0 16px 40px -12px rgb(15 23 42 / .08), inset 0 1px 0 rgb(255 255 255 / .9);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
}
.corp-card-content { position: relative; z-index: 1; }
.corp-card-bloom { position: absolute; width: 160px; height: 160px; border-radius: 50%; filter: blur(44px); pointer-events: none; }
.corp-company-bloom { inset-block-start: -64px; inset-inline-end: -48px; background: rgb(0 51 160 / .08); }
.corp-owner-bloom { inset-block-end: -64px; inset-inline-start: -48px; background: rgb(203 160 82 / .1); }
.corp-doc-bloom { inset-block-start: -40px; inset-inline-start: -40px; background: rgb(0 154 68 / .06); }
.corp-card-heading { display: flex; align-items: flex-start; gap: 12px; margin-block-end: 18px; }
.corp-heading-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid rgb(0 51 160 / .2);
    border-radius: var(--kp-radius-md);
    background: var(--corp-surface);
    box-shadow: 0 6px 18px -10px rgb(0 51 160 / .35);
}
.corp-heading-icon .icon { width: 18px; height: 18px; }
.corp-heading-icon-blue { color: var(--corp-primary); }
.corp-heading-icon-gold { border-color: rgb(203 160 82 / .3); color: var(--corp-gold); box-shadow: 0 6px 18px -10px rgb(203 160 82 / .4); }
.corp-heading-icon-green { border-color: rgb(0 154 68 / .3); color: var(--corp-success); box-shadow: 0 6px 18px -10px rgb(0 154 68 / .4); }
.corp-card-heading h2 {
    margin: 0;
    color: var(--corp-ink);
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}
/* A step heading takes the keyboard when its step opens; it is not a control, so it shows no ring. */
.corp-card-heading h2:focus { outline: none; }
.corp-card-heading p { margin: 2px 0 0; color: var(--corp-muted); font-size: 12.5px; line-height: 1.45; }

/* ---- Fields (package :149-168) ------------------------------------------------------------------ */
.corp-field-stack { display: grid; gap: 12px; }
.corp-field-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.corp-field { display: grid; gap: 5px; min-width: 0; color: var(--corp-ink); }
.corp-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: var(--corp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.corp-field-label-left { display: flex; align-items: center; gap: 6px; }
/* The required marker is the label row's own item after the label part, so the space-between row puts it at the inline
   end, at 13px (package :152-154, `.corp-field-required`). The portal's shared marker (site.css) is written to sit
   beside inline text, 2px from it at the text's size; standing alone here it takes neither. */
.corp-field-label > .field-required-marker { font-size: 13px; margin-inline-start: 0; }
.corp-field-optional { color: rgb(71 85 105 / .55); font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.corp-label-icon { width: 14px; height: 14px; color: var(--corp-gold); }
.corp-field input:not([type="checkbox"]):not([type="file"]),
.corp-field select,
.corp-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    color: var(--corp-ink);
    background: rgb(255 255 255 / .95);
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
/* THE COMPANY SELECTS STATE THEIR HEIGHT (2026-10-16), for the reason the field family's selects do (ruling 15 #464):
   Safari on a Mac, an iPhone or an iPad replaces a restyled select's min-height with a floor of its own and leaves a
   stated height as written. The stated 46px is the min-height the rule above already gives these selects, and their
   text needs less (about 18px at 15px in Alexandria or Inter, plus 20px of padding and 2px of border), so the box keeps
   its 46px. The `appearance: auto` this rule carried is a select's own default and no rule in the linked sheets sets
   another for these selects, so it restated nothing and is dropped; the native arrow stays. The block padding is zero
   for the reason the shared select rule's note above records (owner report 2026-10-14): with a stated height, WebKit
   keeps the block padding and cuts the select's text inside it; the inline padding is unchanged. */
.corp-field select { block-size: 46px; padding-block: 0; background: var(--corp-surface); }
.corp-field textarea { min-height: 88px; resize: vertical; font-family: inherit; line-height: 1.5; }
.corp-field select:disabled { color: var(--kp-slate-400); background: var(--kp-slate-50); cursor: not-allowed; }
.corp-field input::placeholder { color: rgb(71 85 105 / .45); font-size: 13.5px; }
.corp-field input:focus:not(.is-invalid),
.corp-field select:focus:not(.is-invalid),
.corp-field textarea:focus:not(.is-invalid) { border-color: var(--corp-gold-soft); background: var(--corp-surface); box-shadow: 0 0 0 2px rgb(203 160 82 / .2); }
/* A FLAGGED COMPANY FIELD IS RED, as every portal form flags one (2026-10-12): the validation engine marks the field it
   refuses with .is-invalid beside its message, and the company field kept its neutral border. The values are the sign-in
   fields' (.ref-field input.is-invalid above, the same derived-triplet note), and each selector is the resting rule's own
   with the class added, so it outranks the resting border by one class. The gold focus rule above leaves a flagged field
   out, so a focused flagged field takes the deeper red and the danger ring here. */
.corp-field input:not([type="checkbox"]):not([type="file"]).is-invalid,
.corp-field select.is-invalid,
.corp-field textarea.is-invalid { border-color: rgba(200, 16, 46, .7); }
.corp-field input:not([type="checkbox"]):not([type="file"]).is-invalid:focus,
.corp-field select.is-invalid:focus,
.corp-field textarea.is-invalid:focus { border-color: rgba(200, 16, 46, .8); box-shadow: var(--focus-ring-portal-danger); }
/* ARABIC TEXT IN AN ARABIC FIELD IS ALEXANDRIA ON THE ENGLISH PAGE TOO (2026-10-09; the design system's "Alexandria for
   all Arabic"). An Arabic field takes the Arabic face from its own lang (tokens.css, `[lang="ar"]:not(html)`), but the
   signed-out pages hand every control the page's whole font (`.ref-public input { font: inherit }`, earlier in this
   file), a rule of the same weight later in the cascade, so on the English page the company's Arabic name was drawn in
   the system's Arabic fallback (Segoe UI, measured 2026-10-09). Here an Arabic field takes the stack the language toggle
   uses: Inter first, whose faces carry Latin ranges only, so the Latin of a mixed value keeps the English page's Inter,
   then Alexandria for the Arabic. On the Arabic page the inherited face is already Alexandria, so only the English page
   is named. The stack is written out, equal to tokens.css --font-portal-bilingual, rather than named through that token:
   the design family's check that no rule takes an Arabic element off Alexandria reads a rule's own text, and the
   parity check for these fields requires the two to stay equal. */
html[lang="en"] .corp-page input[lang="ar"],
html[lang="en"] .corp-scope input[lang="ar"],
html[lang="en"] .corp-page textarea[lang="ar"],
html[lang="en"] .corp-scope textarea[lang="ar"],
html[lang="en"] .corp-page select[lang="ar"],
html[lang="en"] .corp-scope select[lang="ar"] { font-family: 'Inter','Plus Jakarta Sans','Alexandria',sans-serif; }
.corp-field-hint { margin: 0; color: var(--corp-muted); font-size: 11.5px; line-height: 1.45; }
.corp-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* The role choices: the package's checkbox-and-label rows (corporate-details.js renders them as plain
   labelled boxes), one per role, wrapping under each other on a phone. */
.corp-roles { display: flex; flex-wrap: wrap; gap: 8px 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.corp-roles > legend { width: 100%; margin-block-end: 6px; padding: 0; }
.corp-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: var(--corp-surface);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.corp-check input { width: 18px; height: 18px; accent-color: var(--corp-primary); cursor: inherit; }
.corp-check:has(input:disabled) { cursor: not-allowed; }
.corp-check:has(input:checked) { border-color: rgb(0 51 160 / .45); background: rgb(0 51 160 / .05); }

/* ---- Notices (package :171-174) ----------------------------------------------------------------- */
.corp-notice {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgb(0 51 160 / .2);
    border-radius: var(--kp-radius-md);
    background: rgb(0 51 160 / .05);
    color: var(--corp-primary-deep);
    font-size: 12.5px;
    line-height: 1.5;
}
.corp-notice > .icon { width: 16px; height: 16px; flex: 0 0 16px; margin-block-start: 2px; color: var(--corp-primary); }
.corp-notice > div { display: grid; gap: 2px; min-width: 0; }
.corp-notice-gold { border-color: rgb(203 160 82 / .3); background: rgb(203 160 82 / .08); color: var(--corp-gold-text); }
.corp-notice-gold > .icon { color: var(--corp-gold); }
.corp-notice-success { border-color: rgb(0 154 68 / .26); background: rgb(0 154 68 / .05); color: var(--corp-success-text); }
.corp-notice-success > .icon { color: var(--corp-success); }
/* The refusal state (2026-10-18): the shell's company banner for a company that may not subscribe, renew or link now.
   The official crimson, at the same border and wash alphas the success state uses for its green. */
.corp-notice-danger { border-color: rgb(200 16 46 / .26); background: rgb(200 16 46 / .05); color: var(--corp-danger); }
.corp-notice-danger > .icon { color: var(--corp-danger); }
.corp-notice-line { display: block; margin-block-start: 4px; }

/* ---- The desktop stepper (package :96-107) ------------------------------------------------------ */
.corp-stepper-wrap { display: none; }
.corp-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 12px 18px;
    list-style: none;
    border: 1px solid rgb(255 255 255 / .8);
    border-radius: var(--kp-radius-xl);
    background: rgb(255 255 255 / .85);
    box-shadow: 0 4px 20px -8px rgb(15 23 42 / .06);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
/* The step item carries the package's 4px of padding itself (package :98), and a connector list item stands between
   two steps (package :106-107): five items and four connectors share the row equally, which sizes an item at 107.77px
   on the 1440px English page. With the padding on the button inside and no connectors, each item took a fifth of the
   row (178px). The item is a flex box so its one button fills it; the list draws no markers (`list-style: none` on
   .corp-stepper), so the display change costs the item no marker. */
.corp-step-item { display: flex; flex: 1; min-width: 0; padding: 4px; }
.corp-step-item > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    color: var(--corp-muted);
    background: transparent;
    text-align: center;
    transition: color .2s ease;
}
/* The focus ring takes the step item's box, as the package draws it (2026-10-09). The package's step item IS its button
   (corporate-details.js :270), so the family ring above (.corp-page button:focus-visible, 2px at a 2px offset) circles
   the item's 4px of padding as well; ours circled the button inside that padding. Measured 2026-10-09 at 1440, 900 and
   780px, both languages: 8.0px lower in every cell and 8.0px narrower in every cell but the fourth step at 900 and
   780px (8.66-8.67px there, the package's fourth item being 0.66-0.67px wider than ours). Standing off by the family's
   2px plus the item's 4px puts the ring on the item's box; it still shows only while the button has keyboard focus. */
.corp-page .corp-step-item > button:focus-visible,
.corp-scope .corp-step-item > button:focus-visible { outline-offset: 6px; }
.corp-step-indicator {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--corp-line);
    border-radius: 50%;
    color: var(--corp-muted);
    background: var(--corp-surface);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.corp-step-indicator .icon { width: 16px; height: 16px; }
.corp-step-label { font-size: 11.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.corp-step-item.is-current > button { color: var(--corp-primary); }
.corp-step-item.is-current .corp-step-indicator { border-color: var(--corp-primary); color: var(--kp-white); background: var(--corp-primary); box-shadow: 0 4px 14px rgb(0 51 160 / .35); }
.corp-step-item.is-complete > button { color: var(--corp-ink); }
.corp-step-item.is-complete .corp-step-indicator { border-color: var(--corp-success); color: var(--kp-white); background: var(--corp-success); }
.corp-step-divider { flex: 1; height: 2px; margin-inline: -6px; margin-block-end: 20px; background: var(--corp-line); transition: background-color .2s ease; }
/* Green once the step before it is done, the same condition as the package's (a step before the current one); the page
   script marks that step complete. */
.corp-step-item.is-complete + .corp-step-divider { background: var(--corp-success); }

/* ---- The phone stepper (package :110-121) ------------------------------------------------------- */
.corp-mobile-stepper {
    display: block;
    padding: 14px 16px;
    border: 1px solid rgb(255 255 255 / .8);
    border-radius: var(--kp-radius-lg);
    background: rgb(255 255 255 / .85);
    box-shadow: 0 2px 12px rgb(15 23 42 / .04);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.corp-mobile-stepper-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 8px; }
.corp-mobile-stepper-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.corp-mobile-step-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--kp-radius-full);
    color: var(--corp-primary);
    background: rgb(0 51 160 / .08);
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}
.corp-mobile-step-title { overflow: hidden; color: var(--corp-ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
/* The step's percentage at the head's inline end (package :115, drawn by corporate-details.js :308): how far the steps before this one go,
   0% on the first step and 100% on the last. The server renders all five; the one shown is the step whose dot carries
   aria-current="step", the mark the page script keeps on the dots. */
.corp-mobile-step-percent { display: none; flex: 0 0 auto; color: var(--corp-muted); font-size: 12px; font-weight: 700; }
.corp-mobile-stepper:has(.corp-mobile-dot[data-step="1"][aria-current="step"]) .corp-mobile-step-percent[data-step-percent="1"],
.corp-mobile-stepper:has(.corp-mobile-dot[data-step="2"][aria-current="step"]) .corp-mobile-step-percent[data-step-percent="2"],
.corp-mobile-stepper:has(.corp-mobile-dot[data-step="3"][aria-current="step"]) .corp-mobile-step-percent[data-step-percent="3"],
.corp-mobile-stepper:has(.corp-mobile-dot[data-step="4"][aria-current="step"]) .corp-mobile-step-percent[data-step-percent="4"],
.corp-mobile-stepper:has(.corp-mobile-dot[data-step="5"][aria-current="step"]) .corp-mobile-step-percent[data-step-percent="5"] { display: block; }
.corp-mobile-progress-track { width: 100%; height: 5px; margin-block-end: 10px; overflow: hidden; border-radius: var(--kp-radius-full); background: rgb(15 23 42 / .08); }
/* The bar stands at the step's percentage and never under 10% (corporate-details.js :311): 10, 25, 50, 75 and 100%. It stood at
   20, 40, 60, 80 and 100% before (corrected 2026-10-08), which the percentage beside it would have contradicted. */
.corp-mobile-progress-fill {
    display: block;
    width: 10%;
    height: 100%;
    border-radius: var(--kp-radius-full);
    background: linear-gradient(90deg, var(--corp-primary), var(--corp-gold));
    transition: width .3s ease;
}
[dir="rtl"] .corp-mobile-progress-fill { background: linear-gradient(270deg, var(--corp-primary), var(--corp-gold)); }
.corp-mobile-progress-fill[data-step="2"] { width: 25%; }
.corp-mobile-progress-fill[data-step="3"] { width: 50%; }
.corp-mobile-progress-fill[data-step="4"] { width: 75%; }
.corp-mobile-progress-fill[data-step="5"] { width: 100%; }
.corp-mobile-dots-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.corp-mobile-dot {
    display: grid;
    flex: 1;
    height: 26px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-muted);
    background: var(--corp-surface);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.corp-mobile-dot.is-current { border-color: var(--corp-primary); color: var(--kp-white); background: var(--corp-primary); box-shadow: 0 2px 6px rgb(0 51 160 / .25); }
.corp-mobile-dot.is-complete { border-color: var(--corp-success); color: var(--kp-white); background: var(--corp-success); }

/* ---- The identity check and the proved identity (v2 app.bundle.css :19098-19108) ------------------ */
.corp-identity-stage { width: 100%; max-width: 40rem; margin-inline: auto; }
.corp-identity-form { margin: 0; }
.corp-identity-panel { padding: 16px; border: 1px solid rgb(0 154 68 / .26); border-radius: var(--kp-radius-sm); background: rgb(0 154 68 / .04); }
.corp-identity-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.corp-identity-head > div { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--corp-success-text); }
.corp-identity-head .icon { width: 16px; height: 16px; color: var(--corp-success); }
.corp-identity-head strong { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.corp-identity-head > span {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: var(--kp-radius-full);
    color: var(--corp-success-text);
    background: rgb(0 154 68 / .12);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.corp-identity-grid { display: grid; grid-template-columns: 1fr; gap: 14px; color: rgb(15 23 42 / .8); font-size: 13px; }
.corp-identity-grid > div { min-width: 0; }
.corp-identity-grid small { display: block; margin-block-end: 2px; color: var(--corp-muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.corp-identity-grid strong { display: block; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
/* THE VERIFIED NAME IS SHOWN WHOLE (owner ruling 15 #589, 2026-10-18): measured at 720 and 721 in English, 198px of
   name in a 194px cell ended in an ellipsis. Only the two verified-name cells wrap; the other identity values keep the
   one-line rule above. */
.corp-identity-grid strong:is(#companyApplicantNameAr, #companyApplicantNameEn) {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

/* ---- The people (package :142-146, :177-199) ---------------------------------------------------- */
.corp-people { display: grid; gap: 0; }
.corp-people:focus { outline: none; }
.corp-subcard { margin-block-start: 14px; padding: 14px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-md); background: rgb(248 250 252 / .75); }
.corp-subcard-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-block-end: 10px; }
.corp-subcard-head h3 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--corp-ink); font-size: 13px; font-weight: 700; }
.corp-subcard-head h3 .icon { width: 15px; height: 15px; color: var(--corp-primary); }
.corp-subcard-head p { margin: 2px 0 0; color: var(--corp-muted); font-size: 11.5px; }
.corp-people-empty { margin: 0; color: var(--corp-muted); font-size: 12px; }
.corp-repeatable-list { display: grid; gap: 8px; }
.corp-repeatable-list:not(:empty) { margin-block-end: 8px; }
.corp-repeatable-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: var(--corp-surface);
    box-shadow: 0 1px 4px rgb(0 0 0 / .02);
}
.corp-repeatable-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 14rem; }
.corp-repeatable-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    color: var(--corp-primary);
    background: rgb(0 51 160 / .08);
}
.corp-repeatable-avatar .icon { width: 16px; height: 16px; }
.corp-repeatable-info { display: grid; gap: 2px; min-width: 0; }
.corp-repeatable-info strong { overflow: hidden; color: var(--corp-ink); font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.corp-repeatable-info small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--corp-muted); font-size: 11px; }
/* The contact line's values (2026-10-13): an e-mail at its 256-character limit has no break opportunity, and its
   single-line width (1138 px at Arabic 1440) became the minimum of this grid track, so the change wizard's card laid
   its content out 1253-1260 px wide inside 1092 at 1440 (1243-1250 inside 348 at 390) and cut the fields beside it.
   `overflow-wrap: anywhere` counts its breaks in that minimum (`break-word` does not), so the e-mail wraps inside the
   card. The name above keeps the reference's ellipsis (corporate-details.css :183); it clips itself and adds nothing
   to the track's minimum. Pinned by CompanyLongValueGovernanceTests. */
.corp-repeatable-info small > bdi { min-width: 0; overflow-wrap: anywhere; }
.corp-repeatable-actions { display: flex; align-items: center; gap: 5px; }
.corp-tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.corp-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: var(--kp-radius-full);
    color: var(--corp-primary);
    background: rgb(0 51 160 / .08);
    font-size: 10.5px;
    font-weight: 700;
}
.corp-tag:empty { display: none; }
.corp-tag-gold { color: var(--corp-gold-text); background: rgb(203 160 82 / .14); }
.corp-focal-box { display: inline-flex; align-items: center; gap: 6px; padding-inline: 6px; color: var(--corp-ink); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.corp-focal-box input { width: 16px; height: 16px; accent-color: var(--corp-gold); cursor: inherit; }
.corp-focal-box:has(input:disabled) { cursor: not-allowed; }
.corp-btn-icon-subtle {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-muted);
    background: rgb(248 250 252 / .9);
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.corp-btn-icon-subtle:hover { border-color: var(--corp-primary); color: var(--corp-primary); background: var(--corp-surface); }
.corp-btn-icon-subtle.is-danger:hover { border-color: var(--corp-danger); color: var(--corp-danger); background: rgb(200 16 46 / .05); }
.corp-btn-icon-subtle .icon { width: 14px; height: 14px; }
.corp-lock { display: inline-flex; align-items: center; gap: 4px; color: var(--corp-muted); font-size: 11px; }
.corp-lock .icon { width: 12px; height: 12px; }
.corp-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px dashed var(--corp-primary);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-primary);
    background: rgb(0 51 160 / .05);
    font-size: 12px;
    font-weight: 700;
    transition: background .15s ease, border-style .15s ease;
}
.corp-btn-add:hover { border-style: solid; background: rgb(0 51 160 / .1); }
.corp-btn-add .icon { width: 13px; height: 13px; }
.corp-entity-editor { margin-block-start: 8px; padding: 12px; border: 1px solid rgb(0 51 160 / .25); border-radius: var(--kp-radius-md); background: var(--corp-surface); box-shadow: 0 4px 16px rgb(0 51 160 / .06); }
.corp-entity-editor-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.corp-entity-editor-head strong { color: var(--corp-primary); font-size: 12px; font-weight: 700; }
.corp-entity-editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-block-start: 10px; }

/* ---- The documents (package :202-237) ----------------------------------------------------------- */
.corp-doc-section { display: grid; gap: 12px; margin-block-start: 14px; }
.corp-doc-item { padding: 12px 14px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-md); background: rgb(255 255 255 / .85); }
.corp-doc-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-block-end: 8px; }
.corp-doc-item-title { display: grid; gap: 4px; }
.corp-doc-item-title strong { color: var(--corp-ink); font-size: 12.5px; font-weight: 700; }
.corp-doc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--kp-radius-full); color: var(--corp-muted); background: var(--kp-slate-100); font-size: 9.5px; font-weight: 700; }
.corp-doc-badge-required { color: var(--corp-danger); background: rgb(200 16 46 / .1); }
.corp-doc-badge-count { color: var(--corp-primary); background: rgb(0 51 160 / .1); }
.corp-doc-groups { display: grid; gap: 10px; }
.corp-doc-group { display: grid; gap: 8px; padding: 10px; border: 1px solid rgb(226 232 240 / .8); border-radius: var(--kp-radius-md); background: rgb(248 250 252 / .6); }
.corp-doc-group:focus { outline: none; }
.corp-doc-group.is-invalid { border-color: var(--corp-danger); }
.corp-doc-group-person { color: var(--corp-ink); font-size: 12px; font-weight: 700; }
.corp-doc-date { max-width: 20rem; }
.corp-upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 84px;
    padding: 12px;
    border: 2px dashed var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: rgb(248 250 252 / .65);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.corp-upload-dropzone:hover,
.corp-upload-dropzone.is-over,
.corp-upload-dropzone:focus-within { border-color: var(--corp-primary); background: rgb(0 51 160 / .05); }
.corp-upload-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* THE AREA WEARS THE KEYBOARD RING (2026-10-18). The field that takes the focus is the invisible file input above, so the
   portal's 2px ring was painted on nothing and a keyboard reader saw only the recoloured dashed border. The area paints
   the house ring (15 #157: 2px of the portal action colour, 2px out) while its field holds KEYBOARD focus; a pointer
   press still shows only the recolour and tint above. */
.corp-upload-dropzone:has(input:focus-visible) { outline: 2px solid var(--color-portal-action); outline-offset: 2px; }
.corp-upload-dropzone input:disabled { cursor: not-allowed; }
.corp-upload-dropzone-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--corp-primary); background: var(--corp-surface); box-shadow: 0 2px 6px rgb(0 0 0 / .05); }
.corp-upload-dropzone-icon .icon { width: 16px; height: 16px; }
.corp-upload-copy { display: grid; gap: 2px; }
.corp-upload-copy strong { color: var(--corp-primary); font-size: 11.5px; font-weight: 700; }
.corp-upload-copy small { color: var(--corp-muted); font-size: 10px; }
.corp-doc-full,
.corp-doc-reattach { margin: 0; color: var(--corp-muted); font-size: 11.5px; }
.corp-doc-reattach { color: var(--corp-gold-text); }
.corp-uploaded-files-list { display: grid; gap: 6px; }
.corp-uploaded-files-list:empty { display: none; }
.corp-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: var(--corp-surface);
    box-shadow: 0 1px 3px rgb(0 0 0 / .02);
}
/* A file being sent, or the whole submission running, locks the card: its remove control is disabled and
   the card reads as busy until the answer lands. */
.corp-file-card.is-locked { opacity: .85; }
.corp-file-info { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 12rem; }
.corp-file-thumb { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: var(--kp-radius-sm); color: var(--corp-primary); background: rgb(0 51 160 / .08); }
.corp-file-thumb .icon { width: 16px; height: 16px; }
.corp-file-meta { display: grid; gap: 2px; min-width: 0; flex: 1; }
.corp-file-meta strong { overflow: hidden; color: var(--corp-ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.corp-file-meta small { color: var(--corp-muted); font-size: 10.5px; }
.corp-file-progress { width: 100%; height: 6px; accent-color: var(--corp-primary); }
.corp-file-state { color: var(--corp-success-text); font-weight: 600; }
.corp-file-meta .corp-file-error { color: var(--corp-danger); font-weight: 600; }
.corp-file-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.corp-btn-file-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 3px 7px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-ink);
    background: rgb(248 250 252 / .9);
    font-size: 10.5px;
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.corp-btn-file-action:hover:not(:disabled) { border-color: var(--corp-primary); color: var(--corp-primary); background: var(--corp-surface); }
.corp-btn-file-action.is-remove:hover:not(:disabled) { border-color: var(--corp-danger); color: var(--corp-danger); background: rgb(200 16 46 / .05); }
.corp-btn-file-action:disabled { opacity: .5; cursor: not-allowed; }
.corp-btn-file-action .icon { width: 11px; height: 11px; }

/* ---- The review (package :253-269) -------------------------------------------------------------- */
.corp-review-section { display: grid; gap: 12px; }
.corp-review-group { padding: 14px 16px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-md); background: var(--corp-surface); box-shadow: 0 1px 4px rgb(0 0 0 / .02); }
.corp-review-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 10px; padding-block-end: 8px; border-block-end: 1px solid var(--corp-line); }
.corp-review-group-head h3 { margin: 0; color: var(--corp-ink); font-size: 13.5px; font-weight: 700; }
.corp-btn-edit-step {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 28px;
    padding: 2px 7px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-primary);
    background: rgb(248 250 252 / .9);
    font-size: 11px;
    font-weight: 700;
}
.corp-btn-edit-step:hover { border-color: var(--corp-primary); background: var(--corp-surface); }
.corp-review-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; font-size: 12.5px; }
.corp-review-grid dt { margin: 0; color: var(--corp-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.corp-review-grid dd { margin: 0 0 4px; color: var(--corp-ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.corp-review-people,
.corp-review-docs { display: grid; gap: 6px; margin-block-start: 10px; }
.corp-review-doc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-sm); font-size: 12px; }
.corp-review-doc strong { color: var(--corp-ink); }
.corp-review-doc span,
.corp-review-doc bdi { color: var(--corp-muted); }
.corp-confirm-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-block-start: 6px;
    padding: 12px 14px;
    border: 1px solid rgb(0 51 160 / .2);
    border-radius: var(--kp-radius-md);
    background: rgb(0 51 160 / .04);
    cursor: pointer;
}
.corp-confirm-checkbox-wrap input { width: 18px; height: 18px; flex: 0 0 18px; margin-block-start: 2px; accent-color: var(--corp-primary); cursor: inherit; }
.corp-confirm-checkbox-wrap:has(input:disabled) { cursor: not-allowed; }
.corp-confirm-checkbox-wrap span { color: var(--corp-ink); font-size: 12px; font-weight: 600; line-height: 1.5; }
.corp-submit-progress { display: grid; gap: 6px; margin-block-start: 14px; color: var(--corp-primary-deep); font-size: 12px; font-weight: 600; }
.corp-submit-progress progress { width: 100%; height: 8px; accent-color: var(--corp-primary); }

/* ---- The actions bar (package :272-286) --------------------------------------------------------- */
.corp-form-actions { display: flex; flex-direction: column-reverse; gap: 10px; padding-block-start: 16px; border-block-start: 1px solid var(--corp-line); }
.corp-btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    color: var(--corp-ink);
    background: var(--corp-surface);
    font-size: 13px;
    font-weight: 700;
    transition: border-color .15s ease, background .15s ease;
}
.corp-btn-back:hover { border-color: var(--corp-muted); background: rgb(248 250 252 / .9); }
.corp-btn-back .icon { width: 14px; height: 14px; }
.corp-btn-next,
.corp-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    overflow: hidden;
    padding: 11px 20px;
    border: 0;
    border-radius: var(--kp-radius-md);
    color: var(--kp-white);
    background: linear-gradient(135deg, var(--corp-primary), var(--corp-primary-deep));
    box-shadow: 0 0 0 3px rgb(0 51 160 / .12), 0 6px 18px -4px rgb(0 51 160 / .4);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    transition: filter .2s ease, transform .14s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
html[lang="ar"] .corp-btn-next,
html[lang="ar"] .corp-submit { letter-spacing: 0; }
.corp-btn-next:hover:not(:disabled),
.corp-submit:hover:not(:disabled) { filter: brightness(1.1); }
.corp-btn-next:active:not(:disabled),
.corp-submit:active:not(:disabled) { transform: scale(.98); }
.corp-btn-next:disabled,
.corp-submit:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.corp-btn-next .icon,
.corp-submit .icon { width: 15px; height: 15px; }
.corp-btn-wide { width: 100%; }
/* The submit's sheen (v2 :19124-19126): a soft band that crosses the button on hover. */
.corp-submit > i {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 52%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .15), transparent);
    transform: translateX(-210%);
    transition: transform .7s ease;
    pointer-events: none;
}
.corp-submit:hover:not(:disabled) > i { transform: translateX(310%); }
[dir="rtl"] .corp-submit > i { transform: translateX(210%); }
[dir="rtl"] .corp-submit:hover:not(:disabled) > i { transform: translateX(-310%); }
.corp-form-tools { display: flex; justify-content: center; }
.corp-link {
    padding: 4px 6px;
    border: 0;
    color: var(--corp-primary);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.corp-link:hover { color: var(--corp-primary-deep); }

/* ---- The result (package :289-310) -------------------------------------------------------------- */
.corp-result-card {
    padding: 28px 16px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-xl);
    background: var(--corp-surface);
    box-shadow: 0 16px 40px -12px rgb(15 23 42 / .1);
    text-align: center;
}
.corp-result-icon-large { display: grid; width: 64px; height: 64px; margin: 0 auto 16px; place-items: center; border-radius: 50%; }
.corp-result-icon-large .icon { width: 28px; height: 28px; }
.corp-result-icon-pending { color: var(--corp-gold-text); background: rgb(203 160 82 / .16); }
.corp-result-icon-success { color: var(--corp-success-text); background: rgb(0 154 68 / .12); }
.corp-result-icon-alert { color: var(--corp-danger); background: rgb(200 16 46 / .1); }
.corp-result-card h2 { margin: 0 0 8px; color: var(--corp-ink); font-size: 19px; font-weight: 700; }
.corp-result-card h2:focus { outline: none; }
.corp-result-card p { max-width: 54ch; margin: 0 auto 18px; color: var(--corp-muted); font-size: 13px; line-height: 1.6; }
.corp-result-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-end: 18px;
    padding: 4px 10px;
    border-radius: var(--kp-radius-full);
    color: var(--corp-primary);
    background: rgb(0 51 160 / .08);
    font-size: 11.5px;
    font-weight: 700;
}
.corp-result-actions-wrap { display: flex; flex-direction: column; gap: 8px; max-width: 24rem; margin: 0 auto; }

/* ---- The responsive ladder (package :1325-1363) ------------------------------------------------- */
@media (min-width: 640px) {
    .corp-identity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 769px) {
    .corp-stepper-wrap { display: block; }
    .corp-mobile-stepper { display: none; }
    .corp-header { height: 96px; }
    /* This width's header clearance lives in the Portal's site.css (dated 2026-10-19); it is the same 96px + 6 as the base since 15 #1208. */
    .corp-header-inner { padding-inline: 24px; }
    .corp-route-title { padding: 20px 24px 0; }
    .corp-route-title h1 { font-size: 26px; }
    .corp-container { padding-inline: 24px; }
    .corp-card { padding: 28px; }
    .corp-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .corp-field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .corp-review-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    /* One row from the inline start, Previous beside the primary button (package :1338). The primary button was pushed
       to the far inline end before (corrected 2026-10-08); the package never pushes it. */
    .corp-form-actions { flex-direction: row; }
    .corp-btn-back,
    .corp-btn-next,
    .corp-submit { width: auto; }
    .corp-btn-wide { width: 100%; }
    .corp-result-actions-wrap { flex-direction: row; max-width: none; justify-content: center; }
}
@media (min-width: 1024px) {
    .corp-header-inner { padding-inline: 32px; }
    .corp-route-title { padding: 24px 32px 0; }
    .corp-route-title i { display: block; }
    .corp-container { max-width: 62rem; padding-inline: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .corp-page *,
    .corp-scope *,
    .corp-page *::before,
    .corp-scope *::before,
    .corp-page *::after,
    .corp-scope *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   COMPANY REGISTRATION — the status page and the tracking page (/Register/Company/Status, /Register/Company/Track)
   Reference: the filed corporate additions' status families in corporate-details.css -- the dialog (:313-319),
   the status card, its callouts and buttons (:320-512), the section cards and the documents list (:514-777),
   the timeline (:778-946), the cancel reasons (:1005-1019) and their ladder (:1340-1363) -- on the wizard's
   palette re-expression above: blue is the official navy at an alpha, amber the official gold (text on the
   gold-text token), red the official crimson, green the official green (text on the emerald token), and the
   package's slate greys the shipped slate tokens. Surfaces the package does not draw -- the loading shapes,
   the Approved state, the stored-file states of a correction, the tracking list and its pager -- are composed
   from the same values.
   ============================================================ */
/* The status and tracking pages' one column has a ZERO minimum (2026-10-08). A grid column's automatic minimum is the
   min-content width of what it holds, and the timeline holds four steps of at least 130px that must never overlap:
   with the track's gaps and padding and its card's padding and border that is 606px, so on a phone the column grew to
   606px and the whole page scrolled sideways (a 622px scroll width at 360, 390 and 500px, in every state and both
   languages). With a zero minimum the cards take the column's width and the timeline track scrolls inside its card.
   The package keeps 80px under its last card (package :322, `.corp-clean-container`), which ours lacked. */
.corp-status-container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block-start: 20px; padding-block-end: 80px; }

/* ---- Loading: the banner's and a card's shapes while the status is read ------------------------- */
.corp-status-loading { display: grid; gap: 20px; }
.corp-status-skeleton-banner { display: block; height: 196px; border-radius: 14px; }
.corp-status-skeleton-card { display: block; height: 148px; border-radius: var(--kp-radius-xl); }

/* ---- The status card (package :320-430) ---------------------------------------------------------- */
.corp-clean-status-card {
    padding: 22px 24px;
    border: 1px solid var(--corp-line);
    border-radius: 14px;
    background: var(--corp-surface);
    box-shadow: 0 2px 10px rgb(15 23 42 / .04);
}
/* Each state's wash is its colour at a low alpha laid over the white card, so the card stays opaque. */
.corp-clean-status-card.is-alert { border-color: rgb(203 160 82 / .4); background-image: linear-gradient(rgb(203 160 82 / .04), rgb(203 160 82 / .04)); }
.corp-clean-status-card.is-danger { border-color: rgb(200 16 46 / .3); background-image: linear-gradient(rgb(200 16 46 / .02), rgb(200 16 46 / .02)); }
.corp-clean-status-card.is-success { border-color: rgb(0 154 68 / .3); background-image: linear-gradient(rgb(0 154 68 / .03), rgb(0 154 68 / .03)); }
.corp-clean-status-card.is-muted { background: var(--kp-slate-50); }
.corp-clean-status-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.corp-clean-badge-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.corp-clean-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-sm);
    font-size: 11.5px;
    font-weight: 700;
}
.corp-clean-badge .icon { width: 13px; height: 13px; }
.corp-badge-blue { border-color: rgb(0 51 160 / .14); color: var(--corp-primary); background: rgb(0 51 160 / .06); }
.corp-badge-amber { border-color: rgb(203 160 82 / .3); color: var(--corp-gold-text); background: rgb(203 160 82 / .1); }
.corp-badge-red { border-color: rgb(200 16 46 / .16); color: var(--corp-danger); background: rgb(200 16 46 / .06); }
.corp-badge-green { border-color: rgb(0 154 68 / .22); color: var(--corp-success-text); background: rgb(0 154 68 / .08); }
.corp-badge-slate { border-color: var(--corp-line); color: var(--kp-slate-600); background: var(--kp-slate-100); }
.corp-pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kp-postal-navy-400); animation: corp-breathe 2s infinite; }
.corp-clean-ref-pill { color: var(--corp-muted); font-size: 12px; }
.corp-clean-ref-pill strong { margin-inline-start: 4px; color: var(--corp-ink); font-weight: 700; }
.corp-clean-title { margin: 0 0 6px; color: var(--corp-ink); font-family: var(--font-display); font-size: 19px; font-weight: 700; }
/* The title's line height and tracking (package :372-378: 1.35, untracked) are written on the page class, because two
   older rules reach this <h2> first: the signed-out pages' heading rule (`.ref-public h2`, line-height 1.2) outranks a
   lone class, and the shared heading rule (h1-h6 in base.css) tracks an English heading by -.01em. Measured before
   (2026-10-08): 26.4px against 29.7px on the desktop title, 22.8px against 25.65px on a phone, and -0.22px of tracking
   in English. */
.corp-page .corp-clean-title,
.corp-scope .corp-clean-title { line-height: 1.35; letter-spacing: normal; }
/* The heading takes the keyboard when a new state is shown; it is not a control, so it shows no ring. */
.corp-clean-title:focus { outline: none; }
.corp-clean-desc { max-width: 68ch; margin: 0 0 16px; color: var(--corp-muted); font-size: 13px; line-height: 1.6; }
.corp-clean-section-card > .corp-clean-desc { margin-block-end: 0; }

/* The review's note on a returned request (gold) and the decision's reason on a rejected one (crimson). */
.corp-clean-feedback-box {
    display: grid;
    gap: 8px;
    margin-block-end: 16px;
    padding: 12px 14px;
    border: 1px solid rgb(203 160 82 / .35);
    border-radius: var(--kp-radius-md);
    background: rgb(203 160 82 / .08);
}
.corp-feedback-item strong { display: flex; align-items: center; gap: 6px; margin-block-end: 2px; color: var(--corp-gold-text); font-size: 12.5px; }
.corp-feedback-item strong .icon { width: 13px; height: 13px; }
/* overflow-wrap (2026-10-13): the returned note is staff free text; a run with no space wraps inside the box
   like the family's other free-text cells. */
.corp-feedback-item p { margin: 0; padding-inline-start: 19px; color: var(--corp-gold-text); font-size: 12px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.corp-clean-rejection-box { margin-block-end: 16px; padding: 12px 14px; border: 1px solid rgb(200 16 46 / .25); border-radius: var(--kp-radius-md); background: rgb(200 16 46 / .05); }
.corp-clean-rejection-box strong { display: flex; align-items: center; gap: 6px; margin-block-end: 4px; color: var(--corp-danger); font-size: 12.5px; }
.corp-clean-rejection-box strong .icon { width: 14px; height: 14px; }
.corp-clean-rejection-box p { margin: 0; color: var(--corp-ink); font-size: 12px; line-height: 1.55; }

.corp-clean-meta-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: var(--kp-slate-50);
}
.corp-meta-item small { display: block; margin-block-end: 2px; color: var(--corp-muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; }
.corp-meta-item strong { display: block; color: var(--corp-ink); font-size: 13px; overflow-wrap: anywhere; }
.corp-clean-status-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-block-start: 16px;
    padding-block-start: 14px;
    border-block-start: 1px solid rgb(226 232 240 / .7);
}

/* ---- The page's buttons (package :429-492) ------------------------------------------------------- */
.corp-btn-solid-primary,
.corp-btn-solid-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--kp-radius-sm);
    color: var(--kp-white);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, filter .15s ease;
}
.corp-btn-solid-primary { background: var(--corp-primary); }
.corp-btn-solid-primary:hover:not(:disabled) { background: var(--corp-primary-deep); }
.corp-btn-solid-danger { background: var(--corp-danger); }
/* The package darkens its red on hover; there is one official crimson, so the hover darkens it. */
.corp-btn-solid-danger:hover:not(:disabled) { filter: brightness(.88); }
.corp-btn-solid-primary .icon,
.corp-btn-solid-danger .icon { width: 14px; height: 14px; }
.corp-btn-quiet,
.corp-btn-quiet-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    background: var(--corp-surface);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.corp-btn-quiet { color: var(--corp-ink); }
.corp-btn-quiet:hover:not(:disabled) { border-color: rgb(71 85 105 / .4); background: var(--kp-slate-50); }
.corp-btn-quiet .icon { width: 13px; height: 13px; color: var(--corp-muted); }
.corp-btn-quiet-danger { border-color: rgb(200 16 46 / .25); color: var(--corp-danger); }
.corp-btn-quiet-danger:hover:not(:disabled) { border-color: var(--corp-danger); background: rgb(200 16 46 / .05); }
.corp-btn-quiet-danger .icon { width: 13px; height: 13px; }
/* THE FAMILY'S TYPE ALSO PAINTS ON THE PUBLIC PAGES (2026-11-15). The tracking and registration status pages use the
   public layout, whose reset `.ref-public button { font: inherit }` (0,1,1) outranks the single-class rule above (0,1,0),
   so these buttons painted at the body's 16px / 400 (17px in Arabic) - on the tracking list the row's View label was the
   largest text in its row. Written at (0,2,0) so it beats that reset, the same shape as the register submit's
   `.ref-register .ref-primary`; only the declared size and weight are restated. The signed-in company profile carries no
   `.ref-public`, so its look is the rule above, unchanged.
   Dated 2026-11-15 (Core Rule 13, the rendered page wins): narrowed to the TRACKING page only. The rendered company
   package paints every button on the registration status page at the inherited type through its own reset
   `.corp-page button { font: inherit }` - the page's Cancel Request and the cancel dialog's Keep and Confirm alike - so
   the status page is left to inherit, as it did before. The tracking page is a surface the package does not draw (kept
   and styled to fit): its quiet buttons are the row's View (cloned into `.corp-track-list`) and the pager's Previous and
   Next (in `.corp-track-pager`), and they keep the family's 12.5px / 600 so a row's label is not its largest text. Each
   selector is (0,2,0), beating the public reset's (0,1,1); the tracking page draws no quiet-danger button. */
.corp-track-list .corp-btn-quiet,
.corp-track-pager .corp-btn-quiet {
    font-size: 12.5px;
    font-weight: 600;
}
/* Dated 2026-11-15 (ruling 15 #198c): a component's can't-press dress excludes the in-flight lock. The shared lock sets
   `disabled` on the pressed button for its own request, and this dress faded the tracking list's pressed View, its label
   and its ring to 55% while it worked. A locked button keeps its full paint, its ring and the lock's not-allowed cursor
   (`.btn-loading.btn-loading.btn-loading`); a genuinely disabled button keeps this dress. Same shape as
   `.dc-direction:disabled:not(.btn-loading)`. */
.corp-btn-solid-primary:disabled:not(.btn-loading),
.corp-btn-solid-danger:disabled:not(.btn-loading),
.corp-btn-quiet:disabled:not(.btn-loading),
.corp-btn-quiet-danger:disabled:not(.btn-loading) { opacity: .55; cursor: not-allowed; }

/* ---- Section cards and the documents list (package :514-777) ------------------------------------- */
.corp-clean-section-card { padding: 18px 20px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-xl); background: var(--corp-surface); }
.corp-clean-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 14px;
    padding-block-end: 10px;
    border-block-end: 1px solid rgb(226 232 240 / .8);
}
.corp-clean-card-header h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--corp-ink); font-size: 15px; font-weight: 700; }
.corp-clean-card-header h3:focus { outline: none; }
.corp-clean-card-header h3 .icon { width: 16px; height: 16px; color: var(--corp-primary); }
.corp-clean-docs-list { display: grid; gap: 8px; }
.corp-clean-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-md);
    background: var(--corp-surface);
}
.corp-doc-lead { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.corp-doc-lead-icon { display: grid; width: 32px; height: 32px; flex-shrink: 0; place-items: center; border-radius: var(--kp-radius-sm); color: var(--corp-primary); background: var(--kp-slate-100); }
.corp-doc-lead-icon .icon { width: 18px; height: 18px; }
.corp-doc-lead > div { flex: 1; min-width: 0; }
.corp-doc-lead strong { display: block; color: var(--corp-ink); font-size: 13.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.corp-doc-subline { display: block; margin-block-start: 1px; color: var(--corp-muted); font-size: 11px; overflow-wrap: anywhere; }
.corp-doc-trail { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-inline-start: 8px; }

/* A correction's stored files: kept as they are until the person replaces or removes one, which only
   changes what the corrections will declare -- so a dropped file stays on screen, struck through, beside
   the control that keeps it after all. */
.corp-file-card.is-dropped { border-style: dashed; background: var(--kp-slate-50); }
.corp-file-card.is-dropped .corp-file-meta strong { color: var(--corp-muted); text-decoration: line-through; }
.corp-file-meta .corp-file-dropped { color: var(--corp-gold-text); font-weight: 600; }
/* The package's box (package :763-777): padding 4px 10px and a 12px icon, 34px high in English and 37.63px in Arabic
   on the rendered package (measured 2026-10-09; ours read 32 and 35.63 at 3px 9px and 11px). The label takes the page's
   inherited size on both sides, so the padding and the icon are the whole box. */
.corp-btn-replace-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgb(203 160 82 / .5);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-gold-text);
    background: rgb(203 160 82 / .1);
    font-size: 10.5px;
    font-weight: 600;
    transition: background-color .15s ease;
}
.corp-btn-replace-pill:hover:not(:disabled) { background: rgb(203 160 82 / .2); }
.corp-btn-replace-pill:disabled { opacity: .5; cursor: not-allowed; }
.corp-btn-replace-pill .icon { width: 12px; height: 12px; }

/* ---- The tracking list: one row per open request, one page at a time ----------------------------- */
/* The status badge and the View button move onto a line of their own, at the inline end, whenever the lead would keep
   less than 256 px beside them - the row's own width at a 360 px window - so the company name and the request's line
   keep a readable column on a phone (2026-10-14). Measured at 390 px before: the lead's basis was 0 (`flex: 1`), so
   the row never wrapped and its text column kept 37-50 px, breaking the name inside its words. On a wide row the lead
   still takes all the width the badge and the button leave, as before. */
.corp-track-list .corp-clean-doc-row { flex-wrap: wrap; justify-content: flex-end; }
.corp-track-list .corp-doc-lead { flex-basis: 256px; }
/* The request reference, the CR ending and the submitted date are bounded left-to-right values: each stays on one
   line, and the line breaks between them (2026-10-14). */
.corp-track-list .corp-doc-subline > bdi { white-space: nowrap; }
.corp-track-list.is-loading { opacity: .55; }
.corp-track-list.skeleton { min-height: 132px; border-radius: var(--kp-radius-md); }
.corp-track-pager { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 14px; }

/* ---- The timeline (package :778-946) ------------------------------------------------------------- */
.corp-clean-timeline-card { padding: 18px 20px; border: 1px solid var(--corp-line); border-radius: var(--kp-radius-xl); background: var(--corp-surface); }
.corp-timeline-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 18px;
    padding-block-end: 10px;
    border-block-end: 1px solid rgb(226 232 240 / .8);
}
.corp-timeline-card-header h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--corp-ink); font-size: 14.5px; font-weight: 700; }
.corp-timeline-card-header h3 .icon { width: 16px; height: 16px; color: var(--corp-primary); }
.corp-timeline-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-full);
    font-size: 11px;
    font-weight: 700;
}
.corp-timeline-status-tag.tag-blue { border-color: rgb(0 51 160 / .14); color: var(--corp-primary); background: rgb(0 51 160 / .06); }
.corp-timeline-status-tag.tag-warn { border-color: rgb(203 160 82 / .3); color: var(--corp-gold-text); background: rgb(203 160 82 / .1); }
.corp-timeline-status-tag.tag-danger { border-color: rgb(200 16 46 / .16); color: var(--corp-danger); background: rgb(200 16 46 / .06); }
.corp-timeline-status-tag.tag-success { border-color: rgb(0 154 68 / .22); color: var(--corp-success-text); background: rgb(0 154 68 / .08); }
.corp-timeline-status-tag.tag-muted { border-color: var(--corp-line); color: var(--kp-slate-600); background: var(--kp-slate-100); }
/* Four steps that never overlap: a narrow screen scrolls the track inside its card, never the page. */
.corp-horizontal-timeline-track {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 8px 4px 6px;
    overflow-x: auto;
    list-style: none;
    -webkit-overflow-scrolling: touch;
}
.corp-ht-step { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; min-width: 130px; text-align: center; }
.corp-ht-indicator { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-block-end: 6px; }
.corp-ht-marker {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    box-sizing: border-box;
    border: 2px solid var(--corp-surface);
    border-radius: 50%;
    color: var(--corp-muted);
    background: var(--kp-slate-100);
    box-shadow: 0 1px 4px rgb(15 23 42 / .1);
    font-size: 12px;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.corp-ht-marker .icon { display: block; flex-shrink: 0; width: 16px; height: 16px; }
.corp-ht-step.is-done .corp-ht-marker { color: var(--corp-success-text); background: rgb(0 154 68 / .14); }
.corp-ht-step.is-active .corp-ht-marker { color: var(--kp-white); background: var(--corp-primary); box-shadow: 0 0 0 4px rgb(0 51 160 / .18); }
/* A returned request's step: the package's amber is the official gold, with its text token on the soft gold
   so the mark keeps its contrast. */
.corp-ht-step.is-active.is-warn .corp-ht-marker { color: var(--corp-gold-text); background: var(--corp-gold-soft); box-shadow: 0 0 0 4px rgb(203 160 82 / .22); }
.corp-ht-step.is-active.is-danger .corp-ht-marker { color: var(--kp-white); background: var(--corp-danger); box-shadow: 0 0 0 4px rgb(200 16 46 / .22); }
.corp-ht-step.is-active.is-muted .corp-ht-marker { color: var(--kp-white); background: var(--kp-slate-600); box-shadow: none; }
.corp-ht-step.is-muted:not(.is-active) .corp-ht-title { color: var(--corp-muted); }
.corp-ht-line {
    position: absolute;
    z-index: 1;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    width: 100%;
    height: 2px;
    background: var(--corp-line);
    transform: translateY(-50%);
}
.corp-ht-step.is-done .corp-ht-line { background: rgb(0 154 68 / .45); }
.corp-ht-info { display: flex; flex-direction: column; align-items: center; width: 100%; padding-inline: 4px; text-align: center; }
.corp-ht-title { display: block; color: var(--corp-ink); font-size: 12px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.corp-ht-sub { display: block; margin-block-start: 2px; color: var(--corp-muted); font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }

/* ---- The cancel dialog (package :313-319, :1005-1019) -------------------------------------------- */
/* A bottom sheet on a phone, a centred dialog from 769px (the ladder below). Its stacking number stays under
   the portal's dialog layer, so a message raised while it is open draws above it. */
.corp-modal-layer { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
/* (2026-10-18) ABOVE THE PORTAL'S FIXED CHROME. At 300 the phone bar (1300) and the assistant launcher (700) drew over
   this dialog: at 390x844 in Arabic its footer buttons (y794-832) sat under the bar starting at y772. 1500 is above
   both and above the plan sheet (1200), and still under the dialog layer (2000), so a message raised while it is open
   draws above it. On the signed-in shell only; the signed-out pages carry neither the bar nor the launcher. */
.rp-shell .corp-modal-layer { z-index: 1500; }
.corp-modal-scrim { position: absolute; inset: 0; background: rgb(15 23 42 / .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.corp-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 34rem;
    max-height: 85vh;
    overflow: hidden;
    border-radius: var(--kp-radius-2xl) var(--kp-radius-2xl) 0 0;
    background: var(--corp-surface);
    box-shadow: 0 -10px 40px rgb(0 0 0 / .2);
}
.corp-modal-dialog-narrow { max-width: 28rem; }
.corp-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-block-end: 1px solid var(--corp-line); }
.corp-modal-header h3 { margin: 0; color: var(--corp-ink); font-size: 14.5px; font-weight: 700; }
.corp-modal-title-danger { display: flex; align-items: center; gap: 8px; min-width: 0; }
.corp-modal-title-danger > .icon { width: 18px; height: 18px; flex: 0 0 18px; color: var(--corp-danger); }
.corp-modal-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; padding: 0; place-items: center; border: 0; border-radius: var(--kp-radius-sm); color: var(--corp-muted); background: transparent; }
.corp-modal-close:hover { color: var(--corp-ink); background: var(--kp-slate-100); }
.corp-modal-close .icon { width: 20px; height: 20px; }
.corp-modal-body { display: grid; flex: 1; gap: 14px; padding: 16px; overflow-y: auto; }
.corp-modal-text { margin: 0; color: var(--corp-muted); font-size: 13px; line-height: 1.6; }
.corp-modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-block-start: 1px solid var(--corp-line); }
.corp-cancel-reasons { min-width: 0; margin: 0; padding: 0; border: 0; }
.corp-cancel-reasons:focus { outline: none; }
.corp-cancel-reasons > legend { margin-block-end: 6px; padding: 0; }
.corp-cancel-radio-group { display: grid; gap: 6px; }
.corp-cancel-radio-group.skeleton { min-height: 96px; }
.corp-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--corp-line);
    border-radius: var(--kp-radius-sm);
    color: var(--corp-ink);
    background: var(--corp-surface);
    font-size: 12.5px;
    cursor: pointer;
}
.corp-radio-option:hover { background: var(--kp-slate-50); }
.corp-radio-option:has(input:checked) { border-color: rgb(0 51 160 / .45); background: rgb(0 51 160 / .04); }
.corp-radio-option input { margin: 0; accent-color: var(--corp-primary); cursor: inherit; }
.corp-radio-option:has(input:disabled) { cursor: not-allowed; }
.corp-cancel-reasons.is-invalid .corp-radio-option { border-color: var(--corp-danger); }

@keyframes corp-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgb(203 160 82 / 0); } 50% { box-shadow: 0 0 0 4px rgb(203 160 82 / .18); } }

/* ---- The status pages' ladder (package :1340-1363) ----------------------------------------------- */
@media (min-width: 769px) {
    .corp-modal-layer { align-items: center; padding: 16px; }
    .corp-modal-dialog { border-radius: var(--kp-radius-xl); }
    .corp-clean-status-card { padding: 26px 28px; }
    .corp-clean-timeline-card { padding: 22px 28px; }
    .corp-clean-title { font-size: 22px; }
    .corp-clean-docs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .corp-clean-docs-list.corp-track-list { grid-template-columns: minmax(0, 1fr); }
    .corp-ht-title { font-size: 13px; }
    .corp-ht-sub { font-size: 11.5px; }
    /* A returned request's correction shows one button in its actions row, and it stays at the inline end where it sat
       before the wizard's row began from the inline start (2026-10-08). */
    .corp-status-container .corp-form-actions { justify-content: flex-end; }
}
@media (min-width: 1024px) {
    .corp-container.corp-status-container { max-width: 58rem; }
}

/* ---- the rail-less portal shell ----
   NO RAIL, NO RAIL OFFSET (2026-10-19). The content column's inline-start margin (.rp-content, the portal shell section)
   is the room the rail takes, so a shell that draws no rail - the signed-out error page, marked on <body> by the layout -
   gives the column the window's full width and the header centres in the window, as on a phone. At (0,2,0) this
   outweighs the (0,1,0) offset and the icon-rail band's 80px restatement in every band, whatever their order; the phone
   band already sets 0. It sits at the end of the file so that the recorded line references to the rules above stay true. */
.rp-shell--no-rail .rp-content { margin-inline-start: 0; }

/* ============================================================
   THE SHIPMENTS HAND-OVER WINDOW AS A SIDE DRAWER (owner ruling 15 #902, 2026-10-31; Core Rule 13)
   The reference renders its confirm-delivery dialog as a side drawer, so the window wears the house drawer
   (.modal-drawer .modal-drawer--lg, the owner's wider size) and these rules add only what that window alone
   needs: its card is split into a part that scrolls and a footer of step buttons that stays at the bottom of
   the drawer; the choices take the reference's receiver cards; the two sides of the shipment stand side by
   side in dashed boxes. Every rule is scoped by a class only the window's card wears, so the Hand-over page's
   own card keeps its look. It sits at the end of the file so that the recorded line references above stay true.
   ============================================================ */

/* The drawer's body holds the card whole, with no padding of its own: the card's first part scrolls under the
   head and its footer stays at the bottom, as the reference's dialog footer does below its scrolling body. */
.hand-over-window .modal-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.hand-over-window__panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-block-size: 0;
    overflow-y: auto;
}

/* While no card is painted (the read's skeleton, or a refused read's sentence) the panel keeps the body's 28px. */
.hand-over-window__panel:not(:has(> .hand-over-card--window)) {
    padding: var(--kp-space-28);
}

/* A RE-READ OF THE CARD ON SCREEN WEARS ITS WAIT OVER THE CARD, NOT IN PLACE OF IT (owner report 2026-11-01). One Start
   reads the card three or four times, and the shared overlay is opaque, so the card vanished behind the skeleton and
   came back each time (measured 165 to 720 ms a read). While a card is painted the overlay keeps the skeleton's lines
   on a half-clear veil, so the card stays readable under the wait instead of vanishing. The window empties its panel on
   every close (closeHandOverWindow), and every read inside one opening is for that opening's parcel, so a painted card
   under the overlay is the parcel the read is for; the first read of an opening finds the panel empty and keeps the
   opaque skeleton. */
.hand-over-window__panel:has(> .hand-over-card--window) > .grid-loading {
    background: color-mix(in srgb, var(--color-bg-surface) 50%, transparent);
}

.hand-over-window__panel:has(> .hand-over-card--window) > .grid-loading .skeleton {
    opacity: .5;
}

.hand-over-card--window {
    flex: 1 1 auto;
    gap: 0;
    min-block-size: 0;
}

/* The part that scrolls takes the drawer body's own 28px (the reference's .modal-body) and the card's 16px rhythm. */
.hand-over-window__scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    min-block-size: 0;
    padding: var(--kp-space-28);
    overflow-y: auto;
}

/* The footer wears the family's one footer recipe (the drawer footer rule above); it keeps its whole box at the end. */
.hand-over-window__footer {
    flex-shrink: 0;
}

/* ---- the receiver cards (the reference's .receiver-option, measured rendered at 1440 and 390, ar and en) ---- */
/* The list sits in the reference's container (#receiverList): a light canvas inside a soft dashed line, 12px in. */
.hand-over-choices:has(> .hand-over-choice--receiver) {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-sm);
    padding: calc(var(--kp-space-sm) + var(--kp-space-xs));
    border: 1px dashed var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--kp-slate-50);
}

.hand-over-choice--receiver {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--kp-radius-lg);
    font-size: 14px;
}

/* The radio is shown at the card's start, as the reference draws it; the card still draws the keyboard ring.
   (Dated 2026-11-15, ruling 15 #781: a radio inside a card family takes the 18 size token and never shrinks, as the
   page's other choice cards do.) */
.hand-over-choice--receiver .hand-over-choice-input {
    position: static;
    flex-shrink: 0;
    inline-size: var(--kp-space-18);
    block-size: var(--kp-space-18);
    opacity: 1;
    pointer-events: auto;
    accent-color: var(--color-action-primary);
}

.hand-over-choice--receiver .hand-over-choice-input:focus-visible {
    outline: none;
}

/* ONE RING ON A KEYBOARD VISIT (2026-11-15). The admin-wide keyboard ring (`body:not(.kp-portal) :focus-visible`)
   carries `!important`, so the plain `outline: none` above never won and the radio drew its own ring inside the
   card's. The opt-out is written at that rule's weight, as the composite search's is; the card keeps the one ring. */
body:not(.kp-portal) .hand-over-choice--receiver .hand-over-choice-input:focus-visible {
    outline: none !important;
}

/* THE CHOSEN CARD WEARS THE REFERENCE'S OWN CHOSEN PAINT (2026-11-15): the brand navy at 4% and a soft 1px lift
   (shipments.html, .receiver-option:has(input:checked)), in place of the shared choice card's 12% tint. Its navy
   border is the shared rule's. */
.hand-over-choice--receiver.is-chosen {
    background: var(--kp-navy-600-a04);
    box-shadow: var(--shadow-choice-chosen);
}

/* A GREYED CARD SAYS IT CANNOT BE CHOSEN (2026-11-15; the 2026-08-27 disabled-cursor ruling): it stays reachable and
   answers a press with its reason, so it keeps no pointer and takes no hover accent. The admin-wide wrapping-label rule
   reads `pointer` on any label holding an enabled radio, and this card's radio is deliberately enabled, so the shared
   `not-allowed` above lost to it; this is written heavier than that rule. The radio takes the label's cursor through
   the wrapping-label control rule. */
body:not(.kp-portal) label.hand-over-choice--receiver.is-blocked:has(> input.hand-over-choice-input[type="radio"]) {
    cursor: not-allowed;
}

.hand-over-choice--receiver.is-blocked:hover {
    border-color: var(--color-border);
}

.receiver-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    inline-size: 38px;
    block-size: 38px;
    border-radius: var(--kp-radius-lg);
    background: var(--color-action-primary);
    color: var(--kp-white);
}

.receiver-avatar .icon {
    inline-size: 20px;
    block-size: 20px;
}

.receiver-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-inline-size: 0;
}

.hand-over-choice--receiver .hand-over-choice-name {
    font-size: 15.2px;
    overflow-wrap: anywhere;
}

.hand-over-choice--receiver .hand-over-choice-meta {
    font-size: 12.8px;
}

.hand-over-choice--receiver.is-blocked .receiver-avatar {
    background: var(--color-text-muted);
}

.receiver-chip {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--kp-space-xs);
    padding: 2px 8px;
    border-radius: var(--kp-radius-full);
    font-size: 11.2px;
    font-weight: 600;
}

/* The chip's glyph at the size the reference paints it (its 12px rule misses Lucide's svg, so 20px renders). */
.receiver-chip .icon {
    flex-shrink: 0;
    inline-size: 20px;
    block-size: 20px;
}

.receiver-chip.is-owner {
    background: var(--status-success-bg);
    color: var(--status-success-fg);
}

.receiver-chip.is-delegate {
    background: var(--kp-gold-500-a12);
    color: var(--kp-stamp-gold-text);
}

/* THE ROW WRAPS BEFORE ITS PERSON COLUMN STARVES (2026-11-15). Beside chips that never shrank, the column's zero
   minimum and the name's anywhere-break let a phone-width row squeeze it to nothing: a name one letter a line, and a
   Civil ID painted past its column. So the row may wrap, and the column carries a real basis that is also its floor,
   wide enough for a twelve-digit Civil ID at the name's size (about 112px of ink at 15.2px; the reference keeps its
   column at 106px, where its name line is shorter); the chips move onto the next line rather than squeeze it, and one
   chip may shrink and wrap its words, as the reference's does. A Civil ID is one bounded value: never broken. */
.hand-over-choice--receiver {
    flex-wrap: wrap;
}

.hand-over-choice--receiver .receiver-info {
    flex: 1 1 128px;
    min-inline-size: 128px;
}

.hand-over-choice--receiver .receiver-chip {
    flex-shrink: 1;
}

.hand-over-choice--receiver .receiver-info bdi {
    white-space: nowrap;
}

/* ---- the two sides of the shipment (the approved window design, screens A2 and C1) ---- */
.hand-over-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* The dashed outline separates the two boxes (owner words 2026-10-31); its colour stays the box's own border token. */
.hand-over-window .hand-over-party {
    gap: var(--kp-space-sm);
    border-width: 2px;
    border-style: dashed;
    border-radius: var(--kp-radius-xl);
}

.hand-over-party__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-sm);
}

.hand-over-party__head .shipment-route__pill {
    margin-block-end: 0;
}

/* Each fact is its label over its value; the shared detail list's 130px label column and row hairline are let go. */
.hand-over-party .hand-over-party__facts li {
    flex-direction: column;
    gap: 2px;
    padding-block: 0;
    border-block-end: 0;
}

.hand-over-party .hand-over-party__facts li + li {
    margin-block-start: var(--kp-space-sm);
}

.hand-over-party .hand-over-party__facts .detail-label {
    min-inline-size: 0;
    font-size: 12px;
    font-weight: 400;
}

/* Its own width at the start, so a left-to-right value keeps its ink on its label's side in Arabic too. */
.hand-over-party .hand-over-party__facts .detail-value {
    align-self: flex-start;
    max-inline-size: 100%;
    font-size: 13px;
}

/* The governorate, the area and the block in one row of three. */
.hand-over-party .hand-over-party__facts .hand-over-party__place {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--kp-space-sm);
}

.hand-over-party__fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-inline-size: 0;
}

/* Below the drawer's narrow width the two boxes stack, the sender first. */
@media (max-width: 575.98px) {
    .hand-over-parties {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ============================================================
   PORTAL COPYRIGHT LINE (dated 2026-11-01, client request, ruling 15 #907)
   The shared partial _PortalCopyright.cshtml, rendered by BOTH portal layouts: in the signed-in layout it closes
   the scrolling content column after <main>; in the signed-out layout it follows the page body. A post-mockup
   element styled to fit (Core Rule 13): tokens only, centred, logical padding.
   ============================================================ */
.portal-copyright {
    /* Above the signed-out pages' decorative washes: .ref-grid-bg is z-index 0 (fixed and z-index 1 on the
       verify route), so the line paints over them and stays readable. */
    position: relative;
    z-index: 2;
    padding-block: var(--kp-space-md);
    padding-inline: var(--kp-space-md);
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}
.portal-copyright p { margin: 0; }

/* HOME'S COPIED SHIPMENT ROW KEEPS ITS TRACKING CODE WHOLE (dated 2026-11-01, finding PUIVR-1; AGENTS.md "RTL
   numbers": a code stays whole and LTR). Home's row is the Shipments page row copied into the dashboard panel (15 #921,
   #923; the panel block is .dc-ship-panel, near the start of the dashboard section). Measured that day at 390 in Arabic:
   the panel leaves the row about 28px less room than the board, so on a row carrying the box chip the code had 124px
   (PO Box) or 112px (VBX) and broke at a hyphen onto a second line, where the board, at 152px and 140px, held it on one.
   On Home only: the code never breaks inside itself; the copy column never narrows below the code (its route lines are
   size-contained so a long party name, which shortens itself with an ellipsis, does not set that minimum); and when one
   line cannot hold the code and the chip, the chip moves to a line of its own at the row's end and the row grows by that
   line. Written at the end of this file so the rules this file's readers pin by line number do not move. The Shipments
   page's row is not touched (15 #923). */
.dc-ship-panel .shipment-row-top { flex-wrap: wrap; }
.dc-ship-panel .shipment-copy { min-width: auto; }
.dc-ship-panel .shipment-copy .route { contain: inline-size; }
.dc-ship-panel .shipment-row .tracking bdi { white-space: nowrap; }
.dc-ship-panel .shipment-service { margin-inline-start: auto; }

/* THE ACCOUNT-TYPE HEADING'S WRAPPED LINES KEEP APART (dated 2026-11-01, the owner's report on the test site: the two
   Arabic lines of the heading touched). The heading's leading in the account-type block above (48px/1.04, and 22px/1.1
   in the phone tier) was the reference's setting for its one-line heading; the client's sentence (15 #907) wraps to two
   lines, and a line's content area - the font's own height - then overran the line. Measured that day with the fonts
   loaded, content area against line: Inter 59px against 49.92px at 1440 (9.09px of overlap), Alexandria 53px against
   49.92px at 1440 (3.09px), Inter 26px against 24.2px at 390 (1.81px), Alexandria 24px against 24.2px at 390 (apart).
   Each value below is the smallest two-decimal leading that holds the measured height: 1.23 gives 59.04px, 1.11 gives
   53.28px, 1.19 gives 26.18px; the Arabic phone heading keeps 1.1, restated because the Arabic rule here outranks the
   phone rule. Written at the end of this file so the rules this file's readers pin by line number do not move. */
.ref-account-page .ref-account-heading h1 { line-height: 1.23; }
.ref-account-page[dir="rtl"] .ref-account-heading h1 { line-height: 1.11; }
@media (max-width: 800px) {
    .ref-account-page .ref-account-heading h1 { line-height: 1.19; }
    .ref-account-page[dir="rtl"] .ref-account-heading h1 { line-height: 1.1; }
}

/* THE ACCOUNT-TYPE HEADING ON ONE LINE ABOVE THE PHONE TIER (dated 2026-11-01, owner ruling 15 #941). On desktop and
   tablet the heading reads as one line in both languages; where the sentence does not fit at 48px it takes the
   container's full width and the largest size that fits; the wording is unchanged and the phone tier (max-width 800px)
   keeps its wrapped lines and the leading of the block above. Measured that day with the fonts loaded, the sentence's
   natural one-line width against the container's content width: at 48px Arabic 817.64px and English 1051.89px, against
   771px (Arabic) and 756px (English) at 1440 and 1024 and 733px and 737px at 801, the tier's narrowest window; the
   heading block was 36rem (612px Arabic, 576px English). The largest half-pixel size that keeps one line at 801 with at
   least 1% of the width spare against font rendering differences: Arabic 42.5px (about 724px of 733px; 43px would leave
   half a pixel), English 33px (about 723px of 737px; 33.5px would leave 3px). English needs the smaller size because
   its sentence is longer at any size. white-space stays normal, so a longer sentence wraps instead of overflowing.
   Written at the end of this file so the rules this file's readers pin by line number do not move. This corrects the
   block above (the wrapped heading's leading): from 801px up it no longer meets a wrapped heading, so its leading now
   serves the phone tier and any longer future sentence (the sizes here accepted by 15 #942). */
@media (min-width: 801px) {
    .ref-account-page .ref-account-heading { width: 100%; }
    .ref-account-page .ref-account-heading h1 { font-size: 33px; }
    .ref-account-page[dir="rtl"] .ref-account-heading h1 { font-size: 42.5px; }
}

/* ============================================================
   THE NOTIFICATION BELL'S LIST (15 #315(f), (p)) -- the panel and the view-all drawer share every rule below; the
   panel's frame, header and anchoring are the v3 notification-bell rules earlier in this file (search
   `.notif-dropdown {`); these sit at the end of the file so that adding them moved no existing rule. Row geometry is the mockup's own
   (`postOfficeAdmin-2/css/style.css:753-801`: 12px 16px rows, a 36px icon box with an 8px corner, a 13px/500 title
   and an 11px muted time) in tokens. The mockup's blue, green and orange boxes are kept (Core Rule 13), keyed to the
   event family the type filter uses, on the house stat-icon tiles; the colour tells the family, never a status.
   The unread state is the mockup's 4% navy wash plus a dot, so it never rests on colour alone.
   ============================================================ */
.notif-dropdown-heading {
    display: flex;
    align-items: center;
    gap: var(--kp-space-sm);
    min-inline-size: 0;
}

/* The header count chip: the Unread count from the same answer the tabs repaint from. */
.notif-dropdown-heading h6 {
    line-height: 1.2;
}

/* The panel's row slot: the server's list lands here, and it stacks like any block. */
.notif-rows {
    display: block;
}

/* The mockup sets these lines at 1.5 in English; Arabic keeps the 1.65 of the rules around them. */
html[lang="en"] .bell-item-time,
html[lang="en"] .bell-item-icon,
html[lang="en"] .notif-dropdown-footer {
    line-height: 1.5;
}

.notif-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 22px;
    block-size: 22px;
    padding-inline: 6px;
    border-radius: var(--kp-radius-full);
    background: var(--status-alert-fg);
    color: var(--kp-white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.notif-dropdown-actions {
    display: flex;
    align-items: center;
    gap: var(--kp-space-xs);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notif-header-btn {
    padding: 2px 6px;
    border: 0;
    border-radius: var(--kp-radius-sm);
    background: none;
    color: var(--color-action-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
    min-block-size: 24px;
    cursor: pointer;
}

/* A PRESSED BULK CONTROL KEEPS ITS REST BOX (15 #198c). The shared ring sits beside a caption and widens it by 24px,
   which wrapped Clear all to a second line and moved every row 28px under the reader. These controls have 6px of
   padding and nothing to trade, so the ring takes the caption's place, as on an icon button; the caption keeps its box
   and, at no opacity, its accessible name. */
.notif-header-btn.btn-loading > span {
    opacity: 0;
}

.notif-header-btn.btn-loading::before {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    margin-block-start: -8px;
    margin-inline-start: -8px;
}

/* A shut control keeps its rest paint under the pointer, as the row actions and the pager do. */
.notif-header-btn:hover:not(:disabled),
.notif-header-btn:focus-visible {
    background: var(--color-shell-soft);
}

.notif-header-btn--danger {
    color: var(--status-alert-fg);
}

.notif-header-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.notif-tabs {
    display: flex;
    gap: var(--kp-space-xs);
    padding: var(--kp-space-sm) var(--kp-space-md);
    border-block-end: 1px solid var(--color-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.notif-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-full);
    background: none;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
    white-space: nowrap;
    cursor: pointer;
}

.notif-tab:hover {
    background: var(--color-shell-soft);
    color: var(--color-text);
}

.notif-tab.active {
    border-color: var(--color-action-primary);
    background: var(--color-shell-soft);
    color: var(--color-action-primary);
}

.notif-tab-count {
    font-variant-numeric: tabular-nums;
}

/* Before a first answer a count has no digits, so its shimmer needs a box of its own to be seen in (15 #218). */
.notif-tab-count.skeleton:empty {
    display: inline-block;
    inline-size: 2ch;
    block-size: 1em;
}

/* The arrivals pill (realtime rule six) and the stopped-live-updates notice: one line each, above the list. */
.notif-pill {
    display: block;
    inline-size: calc(100% - 2 * var(--kp-space-md));
    margin: var(--kp-space-sm) var(--kp-space-md) 0;
    padding: 4px 12px;
    border: 0;
    border-radius: var(--kp-radius-full);
    background: var(--color-action-primary);
    color: var(--kp-white);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
    text-align: center;
    cursor: pointer;
}

.notif-pill:hover:not(:disabled) {
    background: var(--kp-navy-700);
}

.notif-offline {
    margin: var(--kp-space-sm) var(--kp-space-md) 0;
    padding: 6px 10px;
    border-radius: var(--kp-radius-md);
    background: var(--status-pending-bg);
    color: var(--status-pending-fg);
    font-size: 12px;
    line-height: 1.65;
}

/* These boxes sit on a clipping edge, where the shared ring's outward offset would be cut: the ring draws inside. */
body:not(.kp-portal) .notif-dropdown-body:focus-visible,
body:not(.kp-portal) .bell-drawer-list:focus-visible,
body:not(.kp-portal) .bell-item-link:focus-visible,
body:not(.kp-portal) .notif-dropdown-footer:focus-visible {
    outline-offset: -2px !important;
}

/* The rows (the server's _BellItems.cshtml partial): one list, and per row the link -- or a plain block for an item
   with no page -- plus a SIBLING control group, never buttons inside the link. The link holds the icon box, the
   title, one element per body line and the time with no wrapper of its own, so it lays them out as a two-column grid:
   the icon in the first column, everything else stacked in the second. */
.bell-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bell-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    border-block-end: 1px solid var(--color-border);
}

/* The mockup's panel rules its rows with its lighter border. */
.notif-dropdown .bell-item {
    border-block-end-color: var(--kp-slate-100);
}

.bell-item[data-read="false"] {
    background: var(--kp-navy-600-a05);
}

.bell-item-link {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    /* The shared lock's display rule also sets `gap` and centres its items at no weight, so a locked row took 8px
       between each of the twelve tracks its icon spans (88px) and dropped the icon: this rule declares both axes. */
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    flex: 1;
    min-inline-size: 0;
    padding: 12px var(--kp-space-md);
    color: var(--color-text);
    text-decoration: none;
}

a.bell-item-link[href]:hover,
a.bell-item-link[href]:focus-visible {
    background: var(--color-shell-soft);
    color: var(--color-text);
}

/* A locked row's ring must not take a grid cell from the row it sits on. */
.bell-item-link.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;
}

.bell-item-icon {
    grid-row: 1 / span 12;
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 36px;
    block-size: 36px;
    border-radius: var(--kp-radius-md);
    background: var(--color-shell-soft);
    color: var(--color-action-primary);
    font-size: 14px;
}

/* The mockup's three boxes: blue for the box and parcel families, green for what is booked or paid, orange for a
   request waiting on a decision. */
.bell-item-icon[data-bell-family="Shipments"],
.bell-item-icon[data-bell-family="PhysicalBoxes"],
.bell-item-icon[data-bell-family="VirtualBoxes"] {
    background: var(--color-stat-icon-blue-bg);
    color: var(--color-stat-icon-blue-fg);
}

.bell-item-icon[data-bell-family="Appointments"],
.bell-item-icon[data-bell-family="Payments"] {
    background: var(--color-stat-icon-green-bg);
    color: var(--color-stat-icon-green-fg);
}

.bell-item-icon[data-bell-family="PoBoxRequests"],
.bell-item-icon[data-bell-family="CompanyRequests"] {
    background: var(--color-stat-icon-orange-bg);
    color: var(--color-stat-icon-orange-fg);
}

.bell-item-title,
.bell-item-line,
.bell-item-time {
    grid-column: 2;
    display: block;
    overflow-wrap: anywhere;
}

.bell-item-title {
    margin-block-end: 2px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* The unread mark beside the title: a dot as well as the wash, so unread never rests on colour alone. */
.bell-item[data-read="false"] .bell-item-title::before {
    content: "";
    display: inline-block;
    inline-size: 8px;
    block-size: 8px;
    margin-inline-end: 6px;
    border-radius: var(--kp-radius-full);
    background: var(--color-action-primary);
    vertical-align: middle;
}

.bell-item-line {
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.bell-item-time {
    margin-block-start: 2px;
    color: var(--color-text-muted);
    font-size: 11px;
}

.bell-item-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-block: 8px;
    padding-inline-end: var(--kp-space-sm);
}

.bell-item-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 28px;
    block-size: 28px;
    border: 0;
    border-radius: var(--kp-radius-sm);
    background: none;
    color: var(--color-text-muted);
    font-size: 12px;
    cursor: pointer;
}

.bell-item-actions button:hover:not(:disabled),
.bell-item-actions button:focus-visible {
    background: var(--color-shell-soft);
    color: var(--color-action-primary);
}

.bell-item-actions [data-action="bell-delete"]:hover:not(:disabled),
.bell-item-actions [data-action="bell-delete"]:focus-visible {
    background: var(--status-alert-bg);
    color: var(--status-alert-fg);
}

.bell-item-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* An item the reader may no longer open, greyed IN PLACE with its text already cleared (15 #315(r)); it leaves at the
   next List read, never from under the reader's cursor. The script holds the height the text gave it, so the rows below
   stay where the reader left them. */
.bell-item--stale {
    min-block-size: var(--bell-row-held, auto);
    opacity: 0.55;
    filter: grayscale(1);
}

/* The panel footer is a button now (it opens the drawer and navigates nowhere); the mockup's anchor look is kept. */
.notif-dropdown-footer {
    display: block;
    inline-size: 100%;
    padding: 12px;
    border: 0;
    border-block-start: 1px solid var(--color-border);
    background: none;
    color: var(--color-action-primary);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.notif-dropdown-footer:hover,
.notif-dropdown-footer:focus-visible {
    background: var(--color-shell-soft);
    color: var(--kp-navy-700);
}

/* The view-all drawer's own layout: the filters, then the tab strip and the bulk actions on one row, then the list. */
.bell-drawer-body {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-sm);
}

.bell-drawer-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--kp-space-sm);
    align-items: start;
}

.bell-drawer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-sm);
    flex-wrap: wrap;
}

/* The ring needs room on the strip's sideways edges; the negative margin keeps the tabs on the page's own line. */
.bell-drawer-toolbar .notif-tabs {
    padding-inline: var(--kp-space-xs);
    margin-inline: calc(-1 * var(--kp-space-xs));
    border-block-end: 0;
}

/* The list is the drawer's one scroller, so the head, the tabs and the pager stay in place. It takes the height left
   over and no more, which keeps the pager right under a short list; the floor keeps a low window from closing it, and
   the drawer body then scrolls instead. */
.bell-drawer-list {
    flex: 0 1 auto;
    min-block-size: 144px;
    /* A keyboard landing parks a row control flush with the edge, which cut its ring (the drawer family's clearance). */
    scroll-padding-block: var(--kp-space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--kp-slate-500) transparent;
}

/* The skeleton in a scroller: pinned by the script to the window the reader is looking through. */
[data-bell-list] > .grid-loading {
    inset-block: var(--bell-list-top, 0) auto;
    block-size: var(--bell-list-height, 100%);
}

/* The page sentence stays on one line, as the house pager does; on a phone the drawer's own padding is the gutter. */
.bell-drawer-body .pager-info {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .bell-drawer-body .pager {
        padding-inline: 0;
    }

    .bell-drawer-body .pager-info {
        padding-inline: var(--kp-space-xs);
    }
}

.bell-drawer-body .notif-pill,
.bell-drawer-body .notif-offline {
    margin-inline: 0;
    inline-size: 100%;
}

/* The header chip shimmers with the counts while a list read is in flight: its own fill would otherwise outrank the
   one-class shimmer and state the old number over a reloading list (the house count shimmer). */
.notif-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;
}

/* The drawer's first read has no rows to measure, so the list takes the height the drawer holds for it, and a pager with
   one page keeps its unseen place under the list, then and after: a full page lands where the skeleton stood, with a
   pager or without one. A shorter answer gives the height back, and the pager comes up to the list. */
.bell-drawer-list[aria-busy="true"]:not(:has([data-bell-id])) {
    flex: 1 1 auto;
}

.bell-drawer-list ~ .pager.hidden {
    display: flex !important;
    visibility: hidden;
}

/* A backward keyboard walk parked a row control flush with the panel list's edge and cut its ring by 4.5px, measured
   2026-11-05: the same clearance the drawer's list carries. */
.notif-dropdown-body {
    scroll-padding-block: var(--kp-space-sm);
}

/* A refused switch reads as refused on or off, at rest and under focus, in the official red, never the vendor's. These
   sit here so the sheet's earlier rules keep their lines. The vendored focus thumb is a blue image with no variable in
   it, so a refused switch that reads off draws its thumb from the token, at the vendored thumb's size. */
body:not(.kp-portal) .form-switch .form-check-input.is-invalid,
body:not(.kp-portal) .form-switch .form-check-input.is-invalid:focus {
    border-color: var(--status-alert-fg);
}

body:not(.kp-portal) .form-switch .form-check-input.is-invalid:checked {
    background-color: var(--status-alert-fg);
}

body:not(.kp-portal) .form-switch .form-check-input.is-invalid:focus:not(:checked) {
    --bs-form-switch-bg: radial-gradient(circle closest-side, var(--status-alert-fg) 75%, transparent 76%);
    background-size: 1em 1em;
}
