/* App-specific styles only. All colors come from the DesignSystem tokens - no hex here (07 s6.1). */

/* Fix-wave 2 (2026-07-18 re-judgment, ledger row 133/L7 painted-scale class): the mockup
   (postOffice_PublicUser_html) sets no px root font-size anywhere -- this file's old 14px root
   with a 768px bump to 16px painted every rem-based measurement ~14% smaller below 768px than the
   mockup's flat browser-default 16px. Removed outright, same bug-class the admin fixed in
   80de16d. Grepped every portal-scoped CSS section (components.css PORTAL SHELL/AUTH-LOGIN/
   REGISTER HEADER/MAILBOX/DASHBOARD LANDING + this file) for rem-based sizing to check for
   painted-scale fallout: the whole portal surface is authored in px (matching the mockup's own
   convention) except the one rule below (.form-validation-msg, .85rem) -- it is NOT breakpoint-
   conditional (same rule at every width), so this fix only makes its painted size uniform
   (13.6px) everywhere instead of shrinking under 768px; nothing else in scope is affected. */

a {
  color: var(--color-action-primary);
}

/* Moved from DesignSystem base.css 2026-07-18 (admin mockup v2 requires a flat 16px root; the
   portal keeps its shipped Arabic optical-balance behavior unchanged pending a portal-side ruling).
   Byte-identical to the removed base.css lines. */
html[dir="rtl"]{ font-size:106.25%; }              /* 16->17px Arabic optical balance */
/* THE BUTTON/INPUT ARMS ARE NOT DECORATION -- they are what makes the body's value reach the whole page
   (owner report 2026-08-12, "the arabic menu font size is bigger than the mockup, even the logout font
   size is bigger"; parity round 2, package B). font-size-adjust INHERITS, but the UA stylesheet gives
   every <button> and every <input> a `font` SHORTHAND, and a shorthand resets the property to its initial
   `none`. A body-only declaration therefore stops dead at the edge of every button and input, and the
   Arabic inside them paints about 10.7% wider and 20% taller than the identical string beside them.
   Measured on our own running portal 2026-08-12, rules injected through CSSOM because the enforcing CSP
   blocks inline styles: a <span> reads 0.48 / ink 50.81px, a bare <button> reads none / ink 50.84px at a
   UA 13.33px, a bare <input> reads none. (`font: inherit` DOES carry the value through -- a CSS-wide
   keyword sets the shorthand's reset-only sub-properties too -- which is why the signed-out pages were
   already correct: `.ref-public button { font: inherit }`. The four longhands family/size/weight/
   line-height do NOT, measured the same run.)
   This is the reference's OWN shape, not an invention: app.bundle.css:21521-21526 (source css/app-pages.css)
   declares `html[dir="rtl"] body[data-app-page]`, `... button` and `... input` in one rule. Ours drops the
   attribute because every portal body is a portal body; the element arms are copied exactly.
   The house had already diagnosed this trap once, at `.rp-chat-chip` (components.css, 2026-08-10) and
   fixed it for that ONE component -- which is why it came back on the sign-out, the plan pill, the status
   tabs, the direction chips and the mailbox buttons. Pinned by PortalArabicMetricAdjustGovernanceTests so
   the next author gets the mechanism instead of another component patch. */
html[dir="rtl"] body,
html[dir="rtl"] body button,
html[dir="rtl"] body input{ font-size-adjust:.48; }

/* Portal mockup v2 verification (restyle package P1, 2026-08-08; intake ruling D11, 15 #148): the
   pair above and the reset below are BYTE-EQUAL to what v2 bundles -- html[dir="rtl"]{font-size:106.25%}
   plus font-size-adjust:.48, reversed to 100% at <=800px (app.bundle.css:24514 and :25305). Verified,
   not changed. The one thing v2 carries that we lacked is the no-support fallback below. */

/* Fix-wave 3 (2026-07-18 live-parity ledger top-10 #1, L2093-2102): the mockup's Arabic root drops
   to 16px at <=800px actual width; ours previously painted 17px at every width because nothing
   reversed the 106.25% inflation below the breakpoint. Re-homed here from base.css at the B1 merge
   (2026-07-19) per that block's own MERGE NOTE — it pairs with the inflation rule directly above. */
@media (max-width: 800px) {
    html[dir="rtl"]{ font-size:100%; }
}

/* THE ARABIC SIGN-UP FIELDS KEEP THEIR DESKTOP SIZE DOWN TO 768PX (dated 2026-10-29, the closing design round; Core
   Rule 13). The rendered reference's sign-up route sets its own text at 106.25% and drops its inputs and selects to 16px
   only below 768px (app.bundle.css, `[data-static-route="user-info"]` and its `max-width: 767px` arm), so between 768
   and 800px its fields stay 17px in 53.6px boxes. Ours take 1rem, and the root above returns to 16px at 800px and
   below, so in that band every Arabic field printed 16px in 52px boxes (measured at 768 and 800: email, number,
   language, governorate, area, block and address alike). The band takes the root's desktop 17px back, for the text and
   for the selects' stated box, which is the same sum the register field rule states with 1rem in its place. This band
   restatement is the one form PortalSelectStatedHeightGovernanceTests accepts beside the recorded box, exactly as
   written here; its attribute value is unquoted because that reader masks quoted values and must tell rtl from ltr. */
@media (min-width: 768px) and (max-width: 800px) {
    html[dir=rtl] .ref-register .ref-field input,
    html[dir=rtl] .ref-register .ref-field select { font-size: 1.0625rem; }
    html[dir=rtl] .ref-register .ref-field select { block-size: calc(1.0625rem * var(--leading-body) + 12px + 12px + 1px + 1px); }
}

/* font-size-adjust normalises Alexandria's x-height so Arabic and Latin read at the same optical
   weight -- but an engine that does not implement the property simply ignores the line above and
   paints Arabic visibly smaller. v2 pairs every .48 declaration with this @supports twin, sized to
   land at roughly the same painted height; ported at OUR scope (the body rule above) rather than
   v2's per-page one. Dormant in Chrome, which supports the property. */
@supports not (font-size-adjust: .48) {
    /* :not(.rp-shell) added 2026-08-11 (parity fix wave P1.3a); :not(.ref-public) joined it 2026-08-12
       (parity round 2, package B) when the SIGNED-OUT half gained the same 16px body pin the shell has.
       Both exclusions exist for one reason: this fallback is written at `html[dir=rtl] body` — higher
       specificity than either body-class pin — so on an engine without font-size-adjust it would silently
       outrank the pin and paint 1.05em instead. The reference has no such conflict because it scopes its
       OWN no-support twins per page (`body[data-static-page="dashboard2"]`,
       `[data-static-route="user-info"]`) and gives its `body[data-app-page]` pages none at all.
       STATE OF THIS ARM TODAY, said plainly: the portal ships exactly two layouts, `_Layout.cshtml`
       (`body.rp-shell`) and `_AuthLayout.cshtml` (`body.ref-public`), so with both excluded this rule
       currently matches NO page. It is kept, not deleted, as the guard for a future portal surface that
       pins no body size of its own — and it is dormant regardless, since every engine we test on
       implements the property. */
    html[dir="rtl"] body:not(.rp-shell):not(.ref-public){ font-size:1.05em; }
}

/* Arabic body-leading, SIGNED-OUT PAGES ONLY since 2026-08-11. The note that used to sit here said this
   1.625 was "preserved pending the portal's own mockup ruling" — that ruling arrived with portal mockup
   v2 (15 #148) and it does not key leading to the language at all. Measured on the rendered reference:
   1.5 on every signed-in page and 1.625 on the dashboard, IDENTICAL in Arabic and English. The signed-in
   half is therefore settled in components.css, on body.rp-shell / body.rp-shell--dashboard, which
   declare a literal ratio and so no longer read this token.
   WHAT IS LEFT HERE REACHES ALMOST NOTHING, and the sentence that used to stand here claimed otherwise
   — it said this token "governs the pages that carry no .rp-shell — login, register, the onboarding tour,
   terms". It does not, and did not when it was written; corrected 2026-08-12 (parity round 2, package B)
   on a measurement rather than a re-read. `.ref-public` pins a flat `line-height: 1.5` (components.css)
   at (0,1,0), which outranks base.css's own `body { line-height: var(--leading-body) }` at (0,0,1) — so
   on every signed-out page that does not re-declare it, the token is overridden and never resolves.
   Measured on our rendered Arabic login and terms pages at 1440 and 900, before this round's body pin
   17px / 25.5px and after it 16px / 24px — the same RATIO both times, 1.5, never the token's 1.625.
   The two places that DO read the token today are `body[data-public-route="verify"]`, which opts
   back into it deliberately with its own comment, and `.rp-error-card p`. The admin is unaffected either
   way (it took the mockup's 1.6 in the shared tokens.css culture switch, which is why this pin lives in
   the portal's own file). Whether Verify's Arabic 1.625 is right is a separate open question raised by
   the 2026-08-12 pre-login census (its S1b: ours 26px, the reference 24px) — untouched by this round. */
html[lang="ar"] { --leading-body: 1.625; }
/* ============================================================
   CURSOR BASE LAYER — the portal's pointer discipline (parity fix wave P2.10, 2026-08-11)

   OWNER REPORT: "the mouse is not changing to pointer ... in too many places -- clickable inputs,
   clickable sections, clickable icons".

   THE FACT, measured in one browser session on both sides: a BARE <button> appended to the rendered
   reference page computes `cursor: pointer`; the same bare button appended to our portal computes
   `default`. A bare `[role=button]` reads `pointer` there and `auto` here. Anchors already read
   `pointer` on both, because that one comes from the browser's own stylesheet -- which is exactly why
   the gap went unnoticed: our links were fine and only our BUTTONS were dead under the pointer.

   WHERE THE REFERENCE'S POINTER COMES FROM (verified in its served bundle, not assumed): Bootstrap 5's
   reboot layer, which the package bundles --
       [role=button]{cursor:pointer}
       [type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),
       button:not(:disabled){cursor:pointer}
   plus a plain `button { cursor: pointer }` in one of its own later layers. We do not load Bootstrap on
   the portal, so nothing granted it here. This is the MECHANISM ported, not a per-control
   patch: one base rule-set, so a control added next month is correct without anyone remembering.

   SPECIFICITY IS DELIBERATELY MINIMAL. `:where()` contributes nothing, so these weigh (0,1,1) -- the
   same near-zero weight the reference's reboot carries. A component that wants a different cursor wins
   with any selector of two classes or more.

   ONE SHIPPED RULE IS DISTURBED, and this block used to claim none was (corrected 2026-08-12).
   `.ref-form-note button { cursor: not-allowed }` (components.css) also weighs (0,1,1) -- one class plus
   one type -- so it TIES with the base layer above, and this file loads after components.css
   (_Layout.cshtml:49 then :51), which means the base layer wins and that control now reads `pointer`.
   The OUTCOME is right and the sentence was not: the control is the login card's create-account button,
   live since onboarding wave W1, and a live control reading `not-allowed` was the stale half. A tie
   decided by file order is worth naming rather than discovering, because a future component wanting its
   own cursor at (0,1,1) will lose here too and look, from its own file, as though it should not.

   DISABLED: the reference has NO global not-allowed rule; it repeats `cursor: not-allowed` per component
   (FIFTEEN such rules in its bundle, counted 2026-08-12 by walking every rule in app.bundle.css that
   declares it -- this said "fourteen", twice, and was measured wrong) and its plan-sheet footer is the
   one this wave measured. Ours states it once instead. That is a deliberate generalisation of the
   reference's own habit: every place ours declares it today already agrees, and a rule that cannot be
   forgotten is worth more here than mirroring fifteen copies.

   WHY THIS FILE: the portal serves it and the admin never loads it, so the admin's own cursor state is
   left exactly as it was and is measured separately (wave package P3.2). The body-class scope is the
   same belt-and-braces this file's SweetAlert2 section already uses.

   It also covers the dialog buttons, which nothing else does: site.js sets SweetAlert2's
   `buttonsStyling: false`, so the vendored `button:where(.swal2-styled):not([disabled])` rule never
   matches our confirm and cancel controls and they had no pointer at all.
   Pinned by PortalCursorBaseGovernanceTests.
   ============================================================ */
:where(body.kp-portal) button:not(:disabled),
:where(body.kp-portal) input[type="button"]:not(:disabled),
:where(body.kp-portal) input[type="reset"]:not(:disabled),
:where(body.kp-portal) input[type="submit"]:not(:disabled),
:where(body.kp-portal) [role="button"]:not([aria-disabled="true"]),
:where(body.kp-portal) [role="link"]:not([aria-disabled="true"]),
:where(body.kp-portal) summary {
    cursor: pointer;
}
:where(body.kp-portal) button:disabled,
:where(body.kp-portal) input:disabled,
:where(body.kp-portal) select:disabled,
:where(body.kp-portal) textarea:disabled,
:where(body.kp-portal) [aria-disabled="true"] {
    cursor: not-allowed;
}

/* ============================================================
   PRESS BASE LAYER — the portal's press discipline (parity round 2, fix package E, 2026-08-12)

   THE FACT, measured by DRIVING real pointer events on both sides (a rule in a stylesheet is not a
   state): the reference's ENTIRE press behaviour rests on ONE rule --
       body[data-app-page] button:active { transform: scale(.98); transition-duration: .14s }
   -- with four narrower overrides on top of it (.dc-ticket-action/.dc-ticket-manage .95,
   .rp-h-actions > button + .notification-bell .96, .dc-box-sheet button .98, the assistant
   launcher .95). Every reference page carries `data-app-page`, signed-in AND pre-login, so that one
   rule is the whole story there.

   WE SHIPPED THE ENUMERATION INSTEAD, and only for half the product: a base layer existed for the
   pre-login surface (`.ref-public button:active`, retired into this rule) plus eight component rules
   for the signed-in half. Everything the enumeration missed was DEAD to the touch -- proven by
   holding a real mouse button down and reading the element in that state, 2026-08-12 at 1440:
   nine controls on /Mailbox (Create New Mailbox, Renew x2, Copy Address, More, three year chips,
   the create CTA), the dashboard plan pill and the per-row tracking-copy button all held
   `transform: none`. One missing rule, eleven dead controls.

   SO THE MECHANISM IS THE DELIVERABLE (a ported rule is verified by its computed effect, not by its presence), and the enumeration it subsumes is
   RETIRED rather than stacked on: a reader ends up with ONE rule to understand plus the genuine
   per-component exceptions, not nine rules plus a tenth. The retired ones, all in components.css:
   `.ref-public button:active` (its four ANCHOR members moved here), `.rp-logout:active`,
   `.dc-status-tab/.dc-direction/.dc-view-all:active` (which also carried the wrong .985 -- the
   reference measures .98 on all three) and `.payment-history-actions > button:active`. RETIRING THEM IS
   A CORRECTION AS WELL AS A CONSOLIDATION, and this line used to say the opposite -- "every one declared
   exactly what this rule declares" -- with its own parenthetical two clauses earlier refuting it (A3,
   corrected 2026-08-12). Three of them declared .985 rather than .98, and their press duration differed
   from the reference's .14s as well. What is true of all of them is that they declared a press transform
   for one component where this rule declares it for every button.

   THE SECOND ARM IS THE TAG-SWAP LIST, not a second mechanism. The reference
   draws each of these as a <button>, so its ONE tag-based rule reaches them; ours are <a> elements
   for real reasons -- server-rendered routes that must work with scripts blocked -- which loses the
   UA-driven match. Each was verified as a <button> on the rendered reference before being listed
   (mailbox.html at 1440: "Create New Mailbox", "Renew", "More" and the create CTA are all BUTTON).
   `.mb-plan` joined the list in the portal group 1 round 2 (2026-09-09): the rendered reference draws the plan
   card as a <button> that presses .98 under the same base rule; ours is the <a> to the subscription page.
   (Corrected 2026-11-08, owner ruling 15 #1223(c)(d): that card and both create controls left the Mailbox, and this list with them.)
   A blanket `a:active` is deliberately NOT written: the reference's rail links do NOT press, and
   ours must not start.

   `.dc-plan` is in the list although its main form IS a <button>: the view renders an <a> fallback
   when the subscriber has no plan yet, and one control must not press in one state and not the other.

   `a.rp-chat-chip` joined the list 2026-10-29: the assistant's "Track my shipment" chip is a link to the
   Shipments page (owner ruling 15 #806) where the reference draws both of its chips as buttons that press
   .98; the "Book pickup" chip beside it is a button and already pressed, so without this the two chips of
   one row answered a press differently. The tag is named because only the link form needs the swap.

   SPECIFICITY IS DELIBERATELY MINIMAL, and it is what makes retirement safe. The button arm weighs
   (0,1,1) and the tag-swap arm (0,1,0) because both scopes sit inside `:where()`. So every component
   override still wins with an ordinary class -- .dc-ticket-action/.dc-ticket-manage keep .95,
   .rp-h-actions keeps .96, the RTL sign-out keeps its scaleX(-1) mirror, and .rp-header-back:hover
   (0,2,0) keeps its lift while pressed, which is exactly what the reference does (measured: its
   hovered back button holds translateY(-2.125px), not scale). Without the `:where()` this file would
   load AFTER components.css and silently overwrite all of them.

   DISABLED CONTROLS ARE EXCLUDED, and that exclusion is here because the measurement contradicted the
   assumption. The first draft wrote `button:active` bare, exactly as the reference writes it, on the
   reasoning that a UA does not activate a disabled form control so `:active` could never match one.
   THAT IS FALSE IN CHROMIUM: holding the pointer on the disabled ticket icon button and on /Mailbox's
   disabled archive CTA read `matrix(0.98,...)` on both -- a control that cannot be used answering the
   press exactly like one that can, which is the opposite of the coming-soon posture the ledger records
   (15 dimmed/inert controls, verified-intentional-per-ledger P2.2/P2.10). The reference cannot settle
   this: it dims almost nothing, because all of its destinations exist.
   The guard is wrapped in `:where()` so it costs NO specificity -- written plainly, `:not(:disabled)`
   would take this rule to (0,2,1) and start beating `.rp-header-back:hover` (0,2,0), swapping the
   reference's press-while-hovered LIFT for a scale. `[aria-disabled="true"]` joins it for the same
   reason the cursor layer above names it: some inert controls express it that way.
   TWO CHAINED `:where()`s RATHER THAN ONE `:where(:not(a, b))`, deliberately: a comma inside the
   selector would split this rule into fragments for any reader -- and for the governance gate, whose
   selector splitter is a plain comma split. Same effect, nothing to parse.

   THE PLAN SHEET'S FULL-BLEED SCRIM IS DELIBERATELY NOT EXCLUDED, recorded here because it reads like a
   defect and has now been filed as one twice (B7 follow-up F1, 2026-08-12). `.plan-scrim` is a real
   <button> covering the whole viewport, so a press anywhere on the dimmed backdrop shrinks the backdrop
   itself by 2% while held. That is the REFERENCE's own behaviour rather than a side effect of this rule:
   it draws the same element as `<button class="plan-scrim" type="button">` (its own renderer,
   js/static-app.js:109 `planModalMarkup`) and presses it from a bare tag rule carrying no exclusions --
   `body[data-app-page] button:active { transform: scale(.98); transition-duration: .14s }`
   (app.bundle.css:21643) -- with `data-app-page` stamped on the dashboard at runtime by `prepareAppBase()`
   (js/static-app.js:25, called unconditionally from `startApp()` at :726). Nothing there overrides it: the
   package's only `.plan-scrim` rule (app.bundle.css:12193) declares no transform, and on BOTH sides the
   scrim sits `inset: 0` inside a `position: fixed; inset: 0` host, so both cover the viewport and both
   shrink identically. Excluding it here would be a DEPARTURE from the ruled target -- the owner's call,
   not a fix (Core Rule 13 portal clause: a gap that MATCHES the ruled target is a decision, only one
   that departs is a defect). Read off the served bundle and the package's own renderer,
   not a browser; the lead re-verifies live. `.plan-scrim` is the ONLY scrim element in the portal's views
   as of this date, so no wider "full-bleed dismiss surface" rule is written for a second case that does
   not exist yet (Core Rule 1, simple beats clever).

   REDUCED MOTION: no end state is deleted, and the TIMING is stopped by the block immediately below.
   The sentence that used to close this paragraph was true of the controls it looked at and false of
   the rest, which is how B7 shipped (corrected 2026-08-12). It read: "the portal's arm (components.css)
   sets `transition: none` on the families it NAMES, which zeroes transition-PROPERTY -- so those
   controls still jump straight to the pressed size." Both halves hold for a named family. But this rule
   reaches every non-disabled <button> plus twelve more selectors, and `transition-duration: .14s` here
   with no transition-PROPERTY anywhere leaves the initial `all` on any control no arm names -- so
   twenty of them ANIMATED their press for a viewer who had asked for no motion. The cover is now a
   single universal duration-zero, the reference's own shape; see the block below for the measurement,
   the citations and why it is not another list of names.

   WHY THIS FILE: the portal serves it, the admin never loads it -- the same reason the cursor layer
   above lives here. Pinned by PortalPressBaseGovernanceTests.
   ============================================================ */
:where(body.kp-portal) button:active:where(:not(:disabled)):where(:not([aria-disabled="true"])),
:where(body.kp-portal) :where(
    .dc-plan, .dc-view-all, .dc-ticket-manage,
    .mb-hero-renew, .mb-payments header a,
    .subscription-secondary, .svc-back-link,
    .ref-lang, .ref-header-logo,
    a.pf-setting-card, a.pf-service-card, a.setting-item, .email-back, .settings-back,
    .verify-entry-logo, .user-logo, .ref-reg-pobox-choice, .corp-language-link, a.rp-chat-chip
):active:where(:not(:disabled)):where(:not([aria-disabled="true"])) {
    transform: scale(.98);
    transition-duration: .14s;
}

/* ============================================================
   REDUCED MOTION — the portal's one duration-zero (branch-end fix round item B7, 2026-08-12)

   THE DEFECT, read off the CASCADE rather than off a rule list: the press base layer above declares
   `transition-duration: .14s` on `:active` and declares no transition-PROPERTY. A control it reaches
   that declares no transition of its own therefore keeps the initial `transition-property: all`, and
   `all` includes `transform` — so its press ANIMATES over .14s. Inside
   `@media (prefers-reduced-motion: reduce)` it went on animating, because the portal's whole cover was
   an ENUMERATION: one 21-selector arm (components.css, "THE PORTAL'S REDUCED-MOTION CONTRACT") plus
   eleven smaller per-family arms. Measured against the press layer's OWN scope rather than against the
   list of controls it named — every non-disabled <button> under body.kp-portal plus the twelve
   selectors of its tag-swap arm, walked control by control through the portal views on 2026-08-12 —
   TWENTY controls were pressed and named by no arm anywhere, counted as the distinct selectors an
   enumeration would have had to add. A viewer who had asked for no motion got a .14s squeeze on each.
   Examples rather than the whole list: `.dc-ticket-manage` (which the REFERENCE's own family arm does
   name, app.bundle.css:9073-9076 — ours dropped a member the target carries), `.mb-copy`,
   `.dc-track-copy`, `.plan-scrim`, `.ref-header-logo`.

   WHY ONE UNIVERSAL RULE AND NOT TWENTY MORE NAMES. The reference does not enumerate: it ships an
   unscoped `*, *::before, *::after` duration-zero three times over (app.bundle.css:18959-18961 from
   css/register-services.css, :25325-25332 from css/theme.css, :25812 from css/static-runtime.css) plus
   a `body[data-app-page] *` twin at :22987-22995 — read from the SERVED bundle, not from one source
   file. So the universal shape is the ruled target's own mechanism (Core Rule 13), and it is also the
   only shape that cannot go stale: a control added to the press list next month is covered without
   anyone remembering. A longer list would simply have left control twenty-one uncovered, silently.

   It is additionally the only EXPRESSIBLE shape. `transition-duration` is a positional list matched
   against `transition-property`, so no rule can zero a transform's duration generically without knowing
   each element's own property list — "zero the press timing only" is not something CSS can say.

   `!important` IS LOAD-BEARING, not decoration. This selector weighs (0,1,1) — one class plus the `body`
   type, `*` contributing nothing — and three shipped rest rules would otherwise beat it and keep their
   own timings: `.ref-register .ref-primary` (0,2,0) and, at (0,2,1), `body.kp-portal .swal2-confirm`
   (in this file) and `body[data-public-route="register"] .ref-lang`. Those three are the SPECIFICITY
   half of the same defect and they PREDATE the press layer — the register CTA and its language pill sit
   inside an arm that names them and have animated their transforms under reduced motion regardless,
   because the arm loses. One rule closes both halves; the reference marks its own arms `!important` for
   the same reason.

   `.001ms` RATHER THAN `0s`, which is the reference's own value: a zero duration fires no
   `transitionend`, and the vendored SweetAlert2 this file themes below drives its show/hide off
   transition events. A near-zero duration is imperceptible and keeps those events arriving. The verify
   page's arm in components.css already uses this exact value, ported from the reference's own.
   (corrected 2026-10-14: `.001ms` is the reference's own value in two of its three universal arms -
   app.bundle.css :18960 and :25326; the third, :25812, uses `.01ms`. And a near-zero duration does NOT
   keep the vendored SweetAlert2's close events arriving: a `transitionend` fires only when a property
   actually transitions, and at close the library WAITS for one whenever the popup's own duration is above
   zero, so this rule on the popup left reduced-motion dialogs and toasts on the page. The popup takes its
   own zero in the dialog section below.)

   WHAT THIS DELIBERATELY LEAVES ALONE: `animation-*`. The reference's universal arms zero animation
   duration too, and ours must not — `.svc-spinner` is deliberately SLOWED to 2s rather than stopped
   under reduced motion (components.css), and a universal `!important` animation-zero would freeze that
   loading indicator on its first frame. B7 is a transition defect and this rule fixes that.
   `transition-delay` is left alone as well, and it costs nothing today: no portal-served authored sheet
   declares one — checked 2026-08-12 across tokens.css, base.css, components.css and this file, for the
   longhand AND for a second time value in any `transition` shorthand (312 shorthand segments, zero hits)
   — and the reference zeroes no delay in any arm of its own. Should a rule gain one later it would still
   wait out that delay before arriving instantly, so the gap is recorded here rather than met as a
   surprise.

   CONSEQUENCE, NAMED HERE RATHER THAN DISCOVERED LATER: every portal transition becomes instant under
   reduced motion, not only the press ones — colour fades and shadow swaps included. That is the media
   query's own meaning and it is what the reference does, but it is wider than the controls that
   prompted it. The per-family `transition: none` arms in components.css are left exactly as they are:
   they set transition-PROPERTY, which this rule does not touch, so nothing there changes, and each
   carries its own dated record. Pinned by ReducedMotionEndStateGovernanceTests.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    body.kp-portal *,
    body.kp-portal *::before,
    body.kp-portal *::after {
        transition-duration: .001ms !important;
    }
}

/* Utility - config divs + inline validation-message divs are born hidden (AGENTS.md JS Patterns). */
.hidden {
  display: none !important;
}

/* ---- Skip link (WCAG 2.2 SC 2.4.1 Bypass Blocks) -- added 2026-10-17, owner ruling 15 #548 ----------------
   The signed-in shell's first element (_Layout.cshtml): the Admin shell's bypass, copied from the Admin's own
   `.skip-link` with the portal's action colour. A keyboard reader on a fresh portal page otherwise walks the rail
   - since 2026-10-17 its three coming-soon rows take tab stops too - and the topbar before the page's own first
   control.
   Dated 2026-10-19 (owner rulings 15 #554-#567): for an individual account the Delegation rail row is a link to its
   Delegation page, so an individual's rail has two coming-soon rows; a company account, or one whose account kind is
   not known, keeps all three.
   OFF-CANVAS, NEVER HIDDEN: `display: none` and `visibility: hidden` both take an element out of the tab order,
   which would remove the very stop this provides; the pill waits above the window and slides in when it takes
   keyboard focus. LOGICAL INSETS: the left in English and the right in Arabic, each language's first-stop side.
   ABOVE THE SHELL: 1050 clears the closed rail (20); the open rail (1110) and every sheet make the rest of the
   page inert while they are up, so the link cannot take the keyboard behind one of them.
   NO TRANSITION: the pill appears at once, so it owes no reduced-motion arm. Its ring is the portal's shared
   focus ring (components.css). */
.skip-link {
  position: fixed;
  inset-inline-start: var(--kp-space-md);
  inset-block-start: 0;
  z-index: 1050;
  transform: translateY(-150%);
  display: inline-block;
  padding: var(--kp-space-sm) var(--kp-space-md);
  border-radius: var(--kp-radius-md);
  background: var(--color-portal-action);
  color: var(--kp-white);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus-visible {
  transform: translateY(var(--kp-space-sm));
}

/* THE TWO FOCUS TARGETS TAKE THE PORTAL'S RING (2026-10-17, owner rulings 15 #548 and #550). The bypass link's landing
   pad (main#main-content) and the Manage Subscription card a dashboard Manage link opened (.subscription-current) take
   the keyboard from a script, never from Tab (tabindex="-1"), and neither is in the shared ring's control list
   (components.css), so both painted the browser's own 1px ring instead (measured 2026-10-17 in both languages at 1440
   and 390: "auto 1px rgb(16, 16, 16)" beside "solid 2px" on the next control). The same ring, as the dashboard ticket
   card took when it became focusable. */
#main-content:focus-visible,
.subscription-current:focus-visible {
  outline: 2px solid var(--color-portal-action);
  outline-offset: 2px;
}

/* THE ARRIVED-ON CARD LANDS CLEAR (2026-10-17, owner ruling 15 #550). The reveal moves the card only as far as it must
   ('nearest', subscriptions.js), which leaves its bottom edge at the window's own edge: on a phone that is behind the
   fixed bottom bar (measured 2026-10-17 at 360x800: card bottom 762 and 800 against the bar's top 728, so the card's
   footer sat under the bar), and wherever the reveal puts the card's edge on the window's edge the ring's outer 4px fall
   off screen (measured at 1267x485: card bottom 485). The scroll margins keep the ring's room at both edges and, where
   the phone bar shows (the same 720px tier as .rp-mobile-nav), the bar's height too. */
.subscription-current {
  scroll-margin-block: var(--kp-space-sm);
}

@media (max-width: 720px) {
  .subscription-current {
    scroll-margin-block-end: calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom) + var(--kp-space-sm));
  }

  /* 2026-10-17: where the shell carries the assistant launcher, the bar's height is not enough - the launcher rests one
     inset above the bar, and after the reveal the footer's View mailbox sat partly under it (measured at Arabic 360x800).
     The end margin then takes the shell's own launcher clearance (components.css .rp-shell, its phone arm: the bar's
     height, the launcher's inset and size, and the bottom safe area), which already holds the bar, plus the ring's room.
     A page without the launcher keeps the rule above. */
  .rp-shell:has(.rp-assistant) .subscription-current {
    scroll-margin-block-end: calc(var(--rp-assistant-clearance) + var(--kp-space-sm));
  }
}

/* Inline validation message box (AGENTS.md "JS Patterns" -- "Validation messages -- inline, never
   dialog popups"). Mechanics (show/hide, scrollIntoView) are untouched -- fix-wave 2 (ruling B2.5)
   restyles ONLY color/typography to the mockup's danger vocabulary: react-parity.css :root
   --danger (rp-chip.danger fg/bg, confirmed final by the spec doc's cascade trace, §4.2) instead
   of the admin-shared --status-alert-*; font-weight 700 + the mockup's .ref-auth-state bold
   treatment (reference-exact.css:15, the only literal "alert banner" component the mockup
   defines). Radius stays the existing --kp-radius-md (8px) -- 1px from the mockup's .ref-auth-
   state 7px, a visual-equivalence carve-out (Core Rule 13) rather than a new one-off radius token
   for a 1px difference. The mockup itself has NO field-level validation style at all (spec §4.4
   confirms this is a genuine gap, not something to copy) -- the border-inline-start accent-bar
   shape is house convention, kept as-is. */
.form-validation-msg {
  margin-block-start: var(--kp-space-md);
  padding: 10px 14px;
  border-radius: var(--kp-radius-md);
  background: var(--status-portal-alert-bg);
  color: var(--status-portal-alert-fg);
  border-inline-start: 4px solid var(--status-portal-alert-fg);
  font-size: .85rem;
  font-weight: 700;
}
/* The ended-session notice as the sign-in card's first item (2026-10-21): the box's top margin separates it from an item
   before it, and first in #loginFormState it separated from nothing -- the notice started 16px below the card's own inset
   (39 vs 23px at 390, 53 vs 37px at 1440, measured). At 0 it starts at the inset and keeps the grid's 20px row gap to the
   field. Only this first item changes: every message box outside this selector keeps its existing margin. */
#loginFormState > .form-validation-msg:first-child { margin-block-start: 0; }

/* Required-field asterisk marker (2026-07-19 validation wave, item 3 — owner-ordered NET-NEW addition,
   deliberately OVERRIDING Core Rule 13 mockup supremacy: postOffice_PublicUser_html has NO required-marker
   convention anywhere in its source — register-user-info.html/schedule-new.html render every field label as
   plain text, no asterisk, no "required" affordance at all (grepped both pages' CSS/HTML, confirmed absent).
   OVERRIDE RE-CONFIRMED AND CARRIED 2026-08-08 (portal mockup v2 intake, ruling D8, 15 #148): the new
   subscribersPortal-KuwaitMail package ALSO ships zero required-marker affordances, so the target changing
   underneath this rule does not retire it — the owner addition stands on the v2 target exactly as it stood
   on v1.
   This is a deliberate owner addition on top of the mockup, not a fidelity gap to close later. Applied to
   every required field's label across portal forms (Auth/Register.cshtml's preferredLanguage; Home/Index.cshtml's
   link-my-box dialog boxNumber/branchId) — reuses --status-portal-alert-fg (the same danger token
   .form-validation-msg already uses) rather than inventing a new color. */
.field-required-marker {
  margin-inline-start: 2px;
  color: var(--status-portal-alert-fg);
  font-weight: 700;
}

/* ============================================================
   PORTAL DIALOGS / TOASTS -- SweetAlert2 theming (fix wave 2, 2026-07-18 re-judgment ledger row
   127, ruling B2, the 2026-07-18 re-judgment). Source values verbatim-cited from
   the mockup dialog spec (extracted from postOffice_PublicUser_html).

   WHY THIS FILE (not components.css): SweetAlert2's own CSS (sweetalert2.min.css) loads AFTER
   components.css but BEFORE this file in both _Layout.cshtml and _AuthLayout.cshtml. A few vendor
   rules (popup grid placement, the toast bottom-anchor) use real classes at specificity (0,2,1)+,
   not vendor's usual :where()-zeroed selectors -- putting overrides here, loaded LAST, means an
   exact-specificity tie still breaks to ours by source order; components.css would not have that
   guarantee. Every selector below is ALSO scoped under body.kp-portal (added to both layouts'
   <body> alongside their existing rp-shell/ref-public class) so this file's rules can never
   theoretically match Admin markup even though Admin never loads this file at all (grepped --
   "kp-portal"/"rp-shell"/"ref-public" appear nowhere under src/KwtPost.Admin).

   Canonical family (ruling B2.1/B2.6): the react-parity signed-in family's most-specific member --
   theme-parity.css .ap-card/.ap-scrim (winning layer, confirmed by the spec doc's cascade trace,
   spec §0) -- for shell/backdrop/animation, since it is the only dialog family in the mockup that
   both (a) ships a real entrance animation and (b) is used on the built/authenticated dashboard
   shell. rp-modal-card's dimensions (480px/14px radius) are near-identical to ap-card's (478px/
   12px) -- non-contradictory, both cited. Icon glyph SIZE is left at Swal's default (5em/88px)
   rather than shrunk to the mockup's 44px badge -- its x-mark-lines/success-lines are positioned
   via independently-set em math tied to the default size, not derived from width/height, so
   resizing without a live render risks misaligned sub-elements; recolored only, unchanged by the
   wave-4 re-layout below. Only the 'error' icon type is themed -- it is the only one with a live
   caller today (showError/session-expired); success/warning/question deferred until a real modal
   (not toast) call site needs them (YAGNI, Core Rule 1).

   HEADER RE-LAYOUT (wave 4, owner ruling 2026-07-18 night -- SUPERSEDES the former "DOM-structure
   limitation, cannot reproduce icon-beside-title" note): a 3-column CSS grid on `.swal2-popup`
   itself (icon | title | close, all row 1) reproduces ap-header's own mechanism
   (mockup-dialog-spec.md §1.4 -- `grid-template-columns:44px minmax(0,1fr) 36px` + inherited
   `direction`) without rebuilding Swal's DOM: icon/title/close are placed into row 1's three
   columns, html-container/actions span all columns in the rows below. Column order flips
   physically via the popup's OWN inherited `direction` (from `html[dir]`) -- landing the icon at
   the title's END (right in Arabic, left in English), same as ap-header, no `[dir=rtl]` override
   needed (live-verified both languages, wave4-portal-dialog-*.png). Column 1 is `auto`-sized to
   the icon's own intrinsic width (kept at its existing 88px per the paragraph above -- skin
   unchanged, only placement moves) rather than hardcoded to ap-package's 44px, so this survives
   whichever icon size a future caller uses. Gracefully degrades when no title is set (today's only
   live caller, showError/session-expired/409-conflict all route through it): Swal renders an empty
   `.swal2-title` as `display:none`, which drops out of the grid entirely, so column 2 just stays
   empty and the icon sits at the header's start corner instead of dead-centered -- NOT a mockup-
   identical "icon beside real title text" render for that caller (there is no title to sit beside
   yet), reported rather than solved by inventing new copy (Core Rule 1: minimal change, no
   unrequested content).
   ============================================================ */

/* ---- stacking: the dialog layer sits ABOVE every app overlay (parity fix wave P2.0, 2026-08-11) ----
   OWNER-CAUGHT LIVE on the deployed dev portal: he opened the plan sheet, pressed Renew, saw nothing
   happen, closed the sheet -- and found the renewal confirm sitting BEHIND it. The vendored SweetAlert2
   stylesheet gives its container `z-index: 1060`
   (src/KwtPost.DesignSystem/wwwroot/lib/sweetalert2/sweetalert2.min.css, the
   `div:where(.swal2-container)` rule), while the plan sheet's host `.plan-modal` ships `z-index: 1200`
   (components.css) -- so ANY dialog fired from inside the sheet drew underneath it: invisible, its
   backdrop under the sheet too, and the page frozen behind a modal nobody could see.

   2000 is chosen for HEADROOM, not to beat one number: BELOW THIS RULE, the highest z-index any
   portal-served stylesheet declares is the phone bottom nav's 1300, with the plan sheet's 1200 behind it
   (re-measured across tokens/base/components/site on 2026-08-12 -- this line said the scale "tops out at
   1200 today" and was already stale when written, because the same branch had raised the bottom nav to 1300
   so it would float above the plan sheet; the "below this rule" clause was added by the 2026-08-16 correction
   because without it the sentence was refuted by the 2000 two lines under it). The invariant is unaffected: a dialog stays on top even if a future overlay
   claims the 1200-1500 band, which is what the headroom is for. PortalDialogStackingGovernanceTests is
   what enforces it rather than this sentence. A dialog is the last thing drawn by definition -- it asks
   a question the page cannot answer around.

   Scoped to body.kp-portal like every rule in this section, so the ADMIN -- which loads the same vendored
   1060 container and never loads this file -- is not silently changed here. Whether the admin carries the
   same latent defect for its own overlays is measured separately (wave package P3.1).

   Specificity note (L8 -- carry the mechanism): the vendored rule is `div:where(.swal2-container)`, which
   weighs (0,0,1) because `:where()` contributes nothing. `body.kp-portal div:where(.swal2-container)`
   weighs (0,1,2) -- one class plus TWO type selectors, `body` and `div` -- and wins outright, so this does
   not rely on source order, though this file does load last as well. (The figure read (0,1,1) until A6,
   arithmetic corrected 2026-08-12: it counted `body` and forgot `div`. The conclusion is unchanged -- it
   outweighs the vendored rule either way.) Pinned by PortalDialogStackingGovernanceTests. */
body.kp-portal div:where(.swal2-container) {
    z-index: 2000;
}

/* ---- backdrop (ap-scrim, theme-parity.css:186) ---- MODAL only, never the toast: the mockup's
   .rp-toast has no backdrop/dimming at all (`document.body.append(t)`, no scrim element), and
   `backdrop-filter` on this ancestor was creating a new CSS containing block for the toast's
   `position:fixed` popup (wave 4, T1 debug finding) -- pushing its right/bottom offsets 20px+20px
   off the true viewport edge instead of the mockup's flat right:20px;bottom:20px. Scoped out via
   Swal's own `body.swal2-toast-shown` state class (added to <body> whenever a toast is live,
   confirmed live) rather than excluding `.swal2-container.swal2-bottom-end` by class, since that
   would also catch a future MODAL fired at the same named position. */
body.kp-portal:not(.swal2-toast-shown) div:where(.swal2-container) {
    background: var(--portal-dialog-backdrop);
    backdrop-filter: blur(5px);
    padding: 20px;
}

/* ---- popup shell (ap-card, theme-parity.css:187; dimensions cross-checked against rp-modal-card,
   react-parity.css:68 -- 478px/12px vs 480px/14px, non-contradictory) ----
   Fix-wave 3 (2026-07-18 live-parity ledger item 5, L2031): background -> the dedicated
   --kp-portal-modal-surface token (#fefeff, tokens.css) -- mockup-measured exactly, distinct from
   --kp-portal-surface-soft (#fdfefe, correct as-is elsewhere, e.g. .mb-empty). */
body.kp-portal .swal2-popup {
    width: min(478px, 100%);
    padding: 0 0 25px;
    overflow: hidden;
    border: var(--glass-card-border);
    border-radius: var(--kp-radius-xl);
    background: var(--kp-portal-modal-surface);
    box-shadow: var(--shadow-portal-modal);
    color: var(--color-text);
}

/* ---- header re-layout (wave 4, T2 -- see the file-header comment "HEADER RE-LAYOUT" for the full
   mechanism note). A 3-column grid on the popup itself puts icon/title/close in row 1 (ap-header,
   mockup-dialog-spec.md §1.4); html-container/actions span all 3 columns in the rows below. Scoped
   :not(.swal2-toast) so this never touches the toast's own vendor 3-column grid (that rule has
   higher specificity anyway via .swal2-popup.swal2-toast, but excluding it here keeps the two
   layouts visibly independent rather than relying on a specificity race). Column 1 is `auto` (the
   icon's own intrinsic width, currently Swal's unresized 5em/88px default per the note above) so
   this survives any icon size; column 3 (36px) matches the close button's fixed size below. */
body.kp-portal .swal2-popup:not(.swal2-toast) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 36px;
    align-items: center;
    column-gap: 12px;
}

/* ---- icon (error only -- see header note; colors from rp-chip.danger, react-parity.css:7/§4.2).
   Position (wave 4): row 1 / column 1 -- the grid's own inherited `direction` (from html[dir],
   nothing set here) lands this at the header's INLINE-START, i.e. physically left in English,
   physically right in Arabic, matching ap-package under ap-header's `direction:rtl` rule -- same
   mechanism, live-verified both languages (wave4-portal-dialog-*.png). margin reset to 0 (was the
   vendor's PHYSICAL `margin-right:.5em`, which doesn't flip in RTL -- the grid's own column-gap
   now supplies the icon-to-title gap direction-safely instead). */
body.kp-portal .swal2-icon {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    margin-inline-start: 21px;
    margin-block-start: 21px;
}
/* THE ICON IS THE REFERENCE'S 44px HEADER BOX (owner ruling 15 #552, folded in by 15 #600, 2026-10-18), superseding the
   "left at Swal's default" paragraph above. The library sizes the whole icon in em of the icon's own font size - the
   5em ring plus its .25em border on each side (the vendored sweetalert2.min.css `div:where(.swal2-icon)` rule), and
   every mark inside it (the error's crossed lines, the success ring, the warning and question glyphs) in the same em -
   so one font size scales all of it together and nothing is distorted: 5.5em x 8px = the 44px box the reference header
   draws (app.bundle.css `.ap-package`, 44 x 44). Measured before: 88px at every width. Toasts carry no icon. */
body.kp-portal .swal2-popup:not(.swal2-toast) .swal2-icon { font-size: 8px; }
body.kp-portal .swal2-icon.swal2-error {
    border-color: var(--kp-portal-danger-500);
    color: var(--kp-portal-danger-500);
    background: var(--status-portal-alert-bg);
}
body.kp-portal .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
    background-color: var(--kp-portal-danger-500);
}

/* ---- title (ap-heading h2 -- theme-parity.css:189/222; font-family/weight already inherited from
   base.css's global h1-h6 rule, only size/color/spacing need setting here) ----
   Fix-wave 3 (2026-07-18 live-parity ledger item 5, L2036): mockup-measured 18px/800, not 20px/700.
   Position (wave 4): row 1 / column 2, start-aligned (was center-aligned under the popup, which
   only worked when the title sat alone above the icon-less body). Swal renders an empty title as
   `display:none` (verified live) so it drops out of the grid entirely when no live caller passes
   one -- column 2 just stays empty, no layout break. */
body.kp-portal .swal2-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    margin-block-start: 21px;
    padding: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
    text-align: start;
}

/* ---- body copy (rp-modal-card p, react-parity.css:68 -- 13px/#697385; #697385 has no exact
   token, --kp-slate-500 (#64748b) is a visual-equivalence match within 6 units per channel) ----
   Fix-wave 3 (2026-07-18 live-parity ledger item 5, L2037): mockup-measured near-black
   (--color-text, #0f172a) not slate-muted, and a root-relative 1rem (so it tracks the Arabic
   16/17px optical-balance root the same way the mockup's own rem-based type does) not a fixed 13px.
   Position (wave 4): row 2, spanning all 3 header columns (unaffected by the header re-layout --
   still full-width, centered text, exactly as before the grid was introduced). */
body.kp-portal .swal2-html-container {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 8px 24px 0;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
}

/* ---- actions row (ap-actions, theme-parity.css:197-202; the shared 180ms cubic-bezier(.16,1,.3,1)
   press-scale convention, spec doc "shared hover/press conventions", is the de-facto house press
   feedback repeated across every mockup dialog family) ----
   buttonsStyling:false (set in site.js) means Swal never adds .swal2-styled, so its :where()-free,
   higher-specificity :hover/:active background-image overlay rules (which would otherwise need
   fighting) simply never match -- same mechanism KwtPost.Admin's site.js showConfirm() already
   uses (customClass + buttonsStyling:false), not a new pattern.
   Position (wave 4): row 3, spanning all 3 header columns (unaffected by the header re-layout --
   still full-width, end-justified, exactly as before). */
body.kp-portal .swal2-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin: 20px 0 0;
    padding-inline: 24px;
    padding-block-end: 0;
    gap: 8px;
    justify-content: flex-end;
}
body.kp-portal .swal2-confirm,
body.kp-portal .swal2-cancel,
body.kp-portal .swal2-deny {
    margin: 0;
    padding-inline: 16px;
    min-height: 45px;
    border-radius: var(--kp-radius-md);
    font-size: 14px;
    font-weight: 800;
    transition: transform 180ms cubic-bezier(.16, 1, .3, 1), background-color 180ms ease, border-color 180ms ease;
}
/* The three dialog buttons' `:active { transform: scale(.98) }` USED TO SIT HERE and is retired into
   the PRESS BASE LAYER above, which declares exactly that value (lead-review sweep of fix package E,
   2026-08-12). All three are `<button>` elements inside `body.kp-portal`, so the base rule reaches
   them by tag, and nothing sits between: the vendored SweetAlert2 sheet's only `:active` rule for
   these controls is a background tint
   (`div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active
   { background-image: linear-gradient(rgba(0,0,0,.2), rgba(0,0,0,.2)) }`) and declares no transform.
   Measured with a real held pointer BEFORE and AFTER the retirement: `matrix(0.98,...)` both times.
   The 180ms press timing is NOT the base layer's .14s and that is correct -- it comes from the rest
   `transition` right above, which at (0,3,1) outranks the base's (0,1,1). These are our own dialog
   controls (site.js sets SweetAlert2's `buttonsStyling: false`); the design reference has no
   SweetAlert2 counterpart to parity against, so the shipped 180ms stands as an authored value. */
/* primary (ap-primary, theme-parity.css:201-202 -- var(--blue)/var(--blue-2), exact match to the
   existing --color-portal-action/-hover tokens already used across the portal)
   Fix-wave 3 (2026-07-18 live-parity ledger item 5, L2038): confirm-button text is the same
   mockup-measured near-white paper token as the popup background (--kp-portal-modal-surface,
   #fefeff), not pure --kp-white. */
body.kp-portal .swal2-confirm {
    border: 1px solid var(--color-portal-action);
    background: var(--color-portal-action);
    color: var(--kp-portal-modal-surface);
}
body.kp-portal .swal2-confirm:hover {
    border-color: var(--color-portal-action-hover);
    background: var(--color-portal-action-hover);
}
/* secondary (ap-secondary, theme-parity.css:200 -- border/bg exact match to --color-border/
   --kp-portal-surface-soft; ink #586579 approximated to --kp-slate-600, no live caller today to
   demand exactness -- visual-equivalence carve-out, built now per the recorded button-
   vocabulary ask even though unused) */
body.kp-portal .swal2-cancel {
    border: 1px solid var(--color-border);
    background: var(--kp-portal-surface-soft);
    color: var(--kp-slate-600);
}
body.kp-portal .swal2-cancel:hover {
    background: var(--kp-slate-50);
}
/* danger (.plan-cancel-confirm button.danger, react-parity.css:295 -- the mockup's one real
   destructive BUTTON red, distinct from the badge/banner red used on the icon above; no live
   caller today, built for the future-confirm case the design decision calls out) */
body.kp-portal .swal2-deny {
    border: 1px solid var(--kp-portal-danger-btn-500);
    background: var(--kp-portal-danger-btn-500);
    color: var(--kp-white);
}
body.kp-portal .swal2-deny:hover {
    filter: brightness(.92);
}

/* ---- close affordance (showCloseButton:true, set in site.js -- none of our dialogs had one
   before). Sizing/color from ap-close, theme-parity.css:192-193.
   Position (wave 4, SUPERSEDES fix-wave-3's L2039 "-1.2em pull-up"/vendor grid-row:1/99 note --
   that mechanism no longer applies now the popup carries its own explicit 3-column/multi-row grid,
   see the file-header "HEADER RE-LAYOUT" comment): explicit column 3 / row 1, the header's INLINE-
   END slot -- physically right in English, physically left in Arabic via the popup's inherited
   `direction`, same corner-flip as before and as ap-close (live-verified both languages,
   wave4-portal-dialog-*.png) but now driven by an explicit grid cell instead of Swal's own
   full-height `grid-row:1/99` span + a center/start alignment fight. align-self:start (row 1 is
   tall -- sized to the 88px icon -- so this keeps the close button at the row's top edge, matching
   ap-close's top-corner position, rather than vertically centered against the much taller icon);
   margin-block-start matches the icon's own 21px top inset so both sit at the same header
   baseline. margin-inline-end (was margin-right in the vendor rule, a physical property that does
   not flip in RTL) supplies the 21px inset from the popup's end edge directionally. */
body.kp-portal .swal2-close {
    grid-column: 3;
    grid-row: 1;
    width: 36px;
    height: 36px;
    align-self: start;
    margin-block-start: 21px;
    margin-inline-end: 21px;
    border-radius: var(--kp-radius-md);
    color: var(--kp-slate-400);
    font-family: inherit;
    font-size: 20px;
}
body.kp-portal .swal2-close:hover {
    background: var(--kp-slate-50);
    color: var(--kp-slate-600);
}
body.kp-portal .swal2-close:focus-visible {
    outline: 2px solid var(--color-portal-focus-ring);
    outline-offset: 2px;
    box-shadow: none;
}
/* THE CLOSE CONTROL PRESSES LIKE EVERY OTHER BUTTON (dated 2026-11-10). The press base layer above scales a held
   button to .98, but the vendored sheet's `button:where(.swal2-close):hover{transform:none}` outweighs that layer
   while the control is hovered, so a held close did not move where the reference's does. This rule carries the
   house press at a weight above the vendored one; reduced motion keeps the scale and loses only the clock, by the
   universal cover above. */
body.kp-portal .swal2-close:active {
    transform: scale(.98);
    transition-duration: .14s;
}

/* ---- entrance/exit animation (ap-scrim/ap-card, theme-parity.css:186-187,203-204 -- ap-fade
   180ms ease-out / ap-enter 220ms cubic-bezier(.16,1,.3,1)). showClass/hideClass (site.js) name
   these classes directly, replacing Swal's stock swal2-show/-hide scale-pop entirely rather than
   layering under it. The mockup's ap-/an- family documents no explicit CLOSE animation (dialogs
   are just torn down); the *-out keyframes below are our own reasoned reverse (fade + a smaller
   vertical settle, faster per Swal's own show/hide asymmetry) -- no side-slide invented, per the
   rule to preserve the reference motion. */
@keyframes kp-dialog-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes kp-dialog-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes kp-dialog-scale-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kp-dialog-scale-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(8px) scale(.98); }
}
body.kp-portal .kp-dialog-backdrop-in { animation: kp-dialog-fade-in 180ms ease-out; }
body.kp-portal .kp-dialog-backdrop-out { animation: kp-dialog-fade-out 150ms ease-in forwards; }
body.kp-portal .kp-dialog-in { animation: kp-dialog-scale-in 220ms cubic-bezier(.16, 1, .3, 1); }
body.kp-portal .kp-dialog-out { animation: kp-dialog-scale-out 150ms ease-in forwards; }

@media (prefers-reduced-motion: reduce) {
    body.kp-portal .kp-dialog-backdrop-in,
    body.kp-portal .kp-dialog-backdrop-out,
    body.kp-portal .kp-dialog-in,
    body.kp-portal .kp-dialog-out {
        animation: none;
    }
}

/* ---- reduced motion: a dialog or toast must still be able to LEAVE (2026-10-13).
   At close the vendored SweetAlert2 (sweetalert2.min.js, 11.14.5) reads the popup's computed durations -
   `parseFloat(..."animation-duration"...)`, `parseFloat(..."transition-duration"...)`, `return n>0||o>0` - and
   when either is above zero an ordinary close removes the dialog only on an `animationend` or `transitionend`
   whose target is the popup, with no timer behind the wait. (A dialog the next `Swal.fire` replaces while it
   waits is finished by that call's destroy step, which runs the stored close callback with no end event -
   `o.swalCloseEventFinishedCallback()` in sweetalert2.min.js - so it is a close nothing replaces that waits.)
   Under reduced motion the arm above and the toast arm further down remove the popup's animations and its
   hide classes change no property, while the universal `.001ms` cover above and, on the company
   registration pages, the `.corp-page *` cover in components.css (a class on <body> there) gave the popup a
   non-zero duration: the close waited for an event nothing produced,
   measured in a headed browser on 2026-10-13 as a dialog still on the page 5 s after Escape, Enter or its
   button, and a toast still on screen 12 s on. Both durations at zero on the popup itself let the library
   close at once, and its show path, which reads the same predicate, lets the container scroll from the
   start. The selector weighs (0,2,1), above both covers that reach the popup ((0,1,1) and (0,1,0));
   `!important` because they are. The toast is a `.swal2-popup` too. Pinned by
   ReducedMotionEndStateGovernanceTests. */
@media (prefers-reduced-motion: reduce) {
    body.kp-portal .swal2-popup {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* ---- mobile breakpoint (ap-modal @media(max-width:540px), theme-parity.css:206-212 -- becomes a
   bottom sheet: full-width, flat bottom corners, tighter padding, smaller button text). Corner
   radii use the logical per-corner properties (never the physical 4-value shorthand) though the
   visual result is direction-symmetric here (both top corners round, both bottom flat -- RTL only
   mirrors the inline axis, not top/bottom -- logical form kept anyway for house-law compliance). */
/* Dated 2026-11-10 (the sheet did not reach the screen's bottom or its sides): the padding rule below is written at
   the backdrop rule's own weight, because that rule's `:not(.swal2-toast-shown)` outweighed the plain selector that
   stood here and kept its 20px; and the popup takes the container's LAST row, because the vendored container is a
   three-row grid with the popup in the middle row, where `align-self: end` ended it above the screen's bottom. A
   toast is positioned by its own rules and is left out of both. */
@media (max-width: 540px) {
    body.kp-portal:not(.swal2-toast-shown) div:where(.swal2-container) {
        padding: 0;
    }
    body.kp-portal .swal2-popup:not(.swal2-toast) {
        grid-row: 3;
    }
    body.kp-portal .swal2-popup {
        align-self: end;
        width: 100%;
        max-width: 100%;
        border-start-start-radius: var(--kp-radius-xl);
        border-start-end-radius: var(--kp-radius-xl);
        border-end-start-radius: 0;
        border-end-end-radius: 0;
    }
    body.kp-portal .swal2-actions {
        padding-inline: 18px;
        padding-block-end: max(18px, env(safe-area-inset-bottom));
    }
    body.kp-portal .swal2-confirm,
    body.kp-portal .swal2-cancel,
    body.kp-portal .swal2-deny {
        font-size: 12px;
    }
}

/* ---- toast (wave 4, T1 -- owner ruling 2026-07-18 night REVERSES the former bottom-center
   correction below the mockup's .rp-toast/react-parity.css:7/41: dark pill, no icon (the mockup's
   toast never carries one -- showOk drops icon:'success' in site.js to match), position = .rp-
   toast's OWN literal `right:20px;bottom:20px` -- NOT RTL-aware by design (spec §2.1 confirms no
   `[dir=rtl]` override exists anywhere in react-parity.css for this class), and the owner wants
   that exact non-flipping render reproduced, not the RTL-safe .sr-toast alternative this file used
   to cite.
   MECHANISM (live-debugged, not guessed -- L7/L8): Swal's own grid-based toast placement is
   direction-AWARE by construction -- `place-self:end end` on the popup (sweetalert2.min.css,
   shared by both the `bottom-end` AND `bottom-right` position names -- there is no physical-only
   variant) resolves the logical `end` keyword against the popup's OWN inherited `direction`, so it
   silently flips to the PHYSICAL LEFT under `dir=rtl` (confirmed live: with position:'bottom-end'
   and no override, the AR toast rendered flush-LEFT while EN rendered flush-right -- exactly the
   flip the owner just asked us to REMOVE). Fighting that would mean forcing `direction:ltr` on the
   container/popup (collateral risk to nested text direction) -- instead this bypasses Swal's grid
   placement for the toast entirely: `position:fixed` on the popup itself bypasses `place-self`/
   grid-column altogether (an out-of-flow positioned box ignores grid alignment), so `right`/
   `inset-block-end` below apply directly against the VIEWPORT, byte-identical to `.rp-toast`'s own
   mechanism (`position:fixed;right:20px;bottom:20px`, not a grid-item at all in the mockup either).
   This also sidesteps the shared backdrop rule's `padding:20px` (this file, the `.swal2-container`
   block above, written for the MODAL case) leaking into the toast's offset -- a fixed-position
   popup no longer sits inside that padded grid area at all.
   `right` stays physical (never `inset-inline-end`, which would flip again) -- the one deliberate
   exception to the house logical-properties rule, justified by Core Rule 13 mockup supremacy.
   `inset-block-end` for the bottom offset is direction-safe either way (block axis, unaffected by
   horizontal-writing-mode `dir`) so it stays logical. Both offsets live-verified identical in ar/en
   (wave4-portal-toast-*.png) -- right:20px/bottom:20px matches .rp-toast's live-measured mockup
   render exactly (wave4-mockup-toast-*.png). Timer 2400ms in site.js = rp-toast's exact setTimeout
   value (spec §2.1). Fix-wave 3 (2026-07-18 live-parity ledger item 5, L2052)'s width fix (Swal
   sets an inline style="width:100%" via JS, so `!important` is needed to win) is preserved as-is. */
body.kp-portal .swal2-popup.swal2-toast {
    position: fixed;
    inset-block-end: max(20px, env(safe-area-inset-bottom));
    right: 20px;
    left: auto;
    top: auto;
    width: auto !important;
    max-width: min(320px, calc(100vw - 40px));
    padding: 12px 16px;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-portal-toast-bg);
    box-shadow: var(--shadow-portal-toast);
    color: var(--kp-white);
}
body.kp-portal .swal2-popup.swal2-toast .swal2-html-container {
    margin: 0;
    padding: 0;
    color: var(--kp-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

/* ---- the coming-soon toast clears the phone's bottom bar (2026-10-17, owner ruling 15 #548) ----
   Up to 720px the bottom navigation is fixed to the window's foot (components.css: 72px plus the bottom safe area, at
   z 1300) and the toast, 20px above the foot at z 2000, would lie on top of it - over the very buttons that raise
   this toast. This toast alone (site.js gives its popup kp-soon-toast) rests one phone inset above the bar, the
   place the assistant launcher already takes; every other toast keeps the corner it always had. The selector
   weighs one class more than the toast rule above, so it wins on weight and not on order. */
@media (max-width: 720px) {
    body.kp-portal .swal2-popup.swal2-toast.kp-soon-toast {
        inset-block-end: calc(var(--kp-portal-mobile-nav-height) + var(--kp-portal-assistant-phone-inset) + env(safe-area-inset-bottom));
    }
}

/* ---- THE TOAST IN THE BOTTOM STRIP (owner rulings 15 #588 and 15 #595, 2026-10-18) ----
   Measured before this block: the corner toast lay over the assistant launcher in English (2209 px2 at 360x800, its centre
   included), over the rail's sign-out in Arabic (the rail sits on the physical right there) and over the phone bar. On
   the signed-in shell the toast now rests inside the content-free strip (components.css, THE BOTTOM STRIP) beside the
   launcher and never over the rail. It keeps the recorded exception: it is placed from the PHYSICAL right in both
   languages and does not flip (the block above); only its distances change:
     - from the right: in English past the launcher (its 20px inset + 102px + a 12px gap); in Arabic past the rail
       (272px labelled, 80px compact) plus the same 20px - the launcher sits on the left there;
     - phones: one launcher inset above the bar, beside the 64px launcher (English: right of the toast; Arabic: left),
       and at most the width that leaves the launcher its column;
     - with no launcher on the page, the right edge needs only the rail's distance, and a phone toast may take the
       window's width less one inset on each side.
   A toast taller than the strip's band raises the strip while it shows (site.js, --rp-toast-reserve), so it never lies
   over content either. The scoped styling, the 2400 ms timer and the bottom-end position name are unchanged.
   Dated clause 2026-10-19 (owner ruling 15 #627): a page with the launcher has no strip any more - the launcher floats
   over the column - so the toast floats as the launcher does, at the distances above, beside the launcher; it reserves
   nothing and site.js no longer sets --rp-toast-reserve. On a phone the bar keeps its strip and the toast still rests
   one inset above the bar. */
body.rp-shell { --rp-toast-right: 20px; }
body.rp-shell:has(> .rp-assistant) { --rp-toast-right: calc(20px + 102px + 12px); }
html[dir="rtl"] body.rp-shell { --rp-toast-right: calc(var(--kp-portal-rail-w) + 20px); }
@media (min-width: 720.02px) and (max-width: 1023px) {
    html[dir="rtl"] body.rp-shell { --rp-toast-right: calc(var(--kp-portal-rail-w-compact) + 20px); }
}
body.kp-portal.rp-shell .swal2-popup.swal2-toast { right: var(--rp-toast-right); }
@media (max-width: 720px) {
    body.rp-shell,
    html[dir="rtl"] body.rp-shell { --rp-toast-right: var(--kp-portal-assistant-phone-inset); }
    html[dir="ltr"] body.rp-shell:has(> .rp-assistant) {
        --rp-toast-right: calc(2 * var(--kp-portal-assistant-phone-inset) + var(--kp-portal-assistant-phone-size));
    }
    body.kp-portal.rp-shell .swal2-popup.swal2-toast {
        inset-block-end: calc(var(--kp-portal-mobile-nav-height) + var(--kp-portal-assistant-phone-inset) + env(safe-area-inset-bottom));
        max-width: calc(100vw - 2 * var(--kp-portal-assistant-phone-inset));
    }
    /* The launcher's column is kept free only on a page that renders the launcher (the error page does not). */
    body.kp-portal.rp-shell:has(> .rp-assistant) .swal2-popup.swal2-toast {
        max-width: calc(100vw - 3 * var(--kp-portal-assistant-phone-inset) - var(--kp-portal-assistant-phone-size));
    }
}

/* The content column scrolls on the signed-in shell now (THE BOTTOM STRIP), so it takes the page scrollbar's thin look
   from the family below. */
body.rp-shell .rp-content::-webkit-scrollbar { width: 6px; }
body.rp-shell .rp-content::-webkit-scrollbar-track { background: transparent; }
body.rp-shell .rp-content::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--kp-slate-300); }

@keyframes kp-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kp-toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } }
body.kp-portal .kp-toast-in { animation: kp-toast-in 200ms ease-out; }
body.kp-portal .kp-toast-out { animation: kp-toast-out 200ms ease-in forwards; }

@media (prefers-reduced-motion: reduce) {
    body.kp-portal .kp-toast-in,
    body.kp-portal .kp-toast-out {
        animation: none;
    }
}

/* ---- Browser scrollbar chrome (portal onboarding wave W5, 2026-08-09 — mockup-supremacy adoption) ----
   The reference package styles the scrollbar for the WHOLE site, unscoped, in its own bundle:

       html::-webkit-scrollbar       { width: 6px; }
       html::-webkit-scrollbar-track { background: transparent; }
       html::-webkit-scrollbar-thumb { border-radius: 3px; background: #cbd5e1; }

   (app.bundle.css:17595-17597, from css/notifications-exact.css — written without a page selector, so it
   paints on every screen of the package.) We shipped none, so Chrome painted its 15px classic bar and our
   content area measured 9px narrower than the reference's on every page tall enough to scroll: 1425 vs
   1434 at EN-1440 and 375 vs 384 at 390. That was the ONLY fidelity delta left on the account-type page
   (W4 report §6, concern C2) and it is a whole-page-width difference, not a component one.

   WHY IT LIVES HERE AND NOT IN components.css: that stylesheet is SHARED with the Admin portal, whose
   chrome is not in this wave's scope and whose own mockup says nothing about scrollbars. This file is
   loaded by the portal's two layouts and by nothing else, so writing the html-level rule here adopts the
   reference's own selector while keeping the blast radius to the portal.

   D1: the thumb's #cbd5e1 is already the shipped --kp-slate-300 (tokens.css:112, whose own comment
   records it AS the mockup's scrollbar thumb) — a name change, not a colour change.

   CONSEQUENCE, STATED SO IT IS NOT A SURPRISE: every scrolling portal page gains 9px of content width
   and a thinner bar. That is the point — it is what closes the last W4 delta — but it is cross-page
   chrome, so it is flagged for the owner rather than folded in silently.

   FIREFOX IS NOT COVERED, and the sentence that used to close this comment could be read as saying it
   was (corrected 2026-08-09, W6): the reference declares only the WebKit pair, and so do we. Firefox
   ignores ::-webkit-scrollbar entirely and keeps its default bar; matching it there would need its own
   `scrollbar-width` / `scrollbar-color` properties, which neither the reference nor this file declares.
   Chromium and WebKit browsers get the thin bar; Firefox looks as it always has. */
html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--kp-slate-300); }

/* The plan sheet scrolls inside its own .plan-scroll container, not the page (plan P5,
   docs/plans/2026-08-25-post-wave-followups-plan.md, 2026-08-25): the html-scoped family above never
   reached it, so that container alone painted the native 15px bar. Same values as the family above,
   scoped to the container; scrollbar placement follows the direction automatically — no RTL rule. */
.plan-scroll::-webkit-scrollbar { width: 6px; }
.plan-scroll::-webkit-scrollbar-track { background: transparent; }
.plan-scroll::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--kp-slate-300); }

/* ============================================================
   PROFILE + SETTINGS PAGE FAMILIES (portal profile + settings package, 2026-08-13)
   ============================================================
   The five account screens: /Profile, /Profile/PersonalData, /Profile/EmailAddress,
   /Profile/PrivacySecurity and /Settings. Every value below was read off the RENDERED design
   reference at 1440 and inside each declared breakpoint, never grepped from a source file -- the
   reference serves one compiled bundle in which a later layer routinely overrides an earlier one,
   so only the painted element shows the winner.

   COLOURS ARE RE-EXPRESSED, NEVER COPIED. The reference package still paints a pre-rebrand palette
   in these families -- a blue family around #115ee8 / #1d4ab7 / #1b42b1 and a gold #d4a017 -- while
   the official brand palette is navy #0033A0 / #002680 / #1A4DB8 with gold #CBA052. Every adopted
   value resolves to the official token carrying the same ROLE. Where the reference already paints
   an official value (the profile hero, the about card ramp, the settings icon tint, the danger
   red), the token below is that same colour under its own name.

   WHERE THIS FAMILY LIVES: the portal's own stylesheet rather than the shared component sheet,
   because these five screens exist only here and that sheet is loaded by the admin as well.

   WHAT IS DELIBERATELY NOT PORTED: the reference re-declares the compact-rail band (721-1279px)
   INSIDE each of these page families -- the same eight rules, once per page. This portal's shell
   already declares that band once, for every page, so restating it here would be a duplicate free
   to drift from the shell's own copy.
   Dated clause 2026-10-16 (15 #429(b)): the shell's own compact band is now 721-1023px, a dated
   departure from the reference's 721-1279; it is still declared once for every page, so these
   families still restate nothing.
   ============================================================ */

/* ---- the back link above a detail page's title: FOUR reference shapes, one per page (portal group 3,
   2026-09-09). The first pass drew one 12px pill on every page; the reference draws personal data and
   privacy as a 12px/700 pill on an 18px line (privacy's 24px below), email as a bare 14px/700 text
   button on a 21px line with no padding, and settings as a 14.875px/600 pill 38.25px tall. The email
   and settings twins are buttons and press (the press base's list below); the personal-data and
   privacy twins are anchors and do not. ---- */
.pd-back,
.ps-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 26px;
    padding: 8px 11px;
    border-radius: 9px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-decoration: none;
    transition: color .18s, background-color .18s;
}
.ps-back { margin-bottom: 24px; }

.pd-back:hover,
.ps-back:hover {
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    text-decoration: none;
}

/* The reference glyph is a 12px font glyph, so its box is the font size; the sprite arrow takes the same box. */
.pd-back .icon,
.ps-back .icon {
    width: 12px;
    height: 12px;
}

/* A block-level flex box placed by its margins, NOT the reference's inline-flex button: an inline box rides the
   wrap's 16px/24px line box and is placed by its baseline, and a replaced first child (the sprite arrow) synthesises
   a different baseline from the reference's font glyph, so the control and everything under it sat 1.5px (English)
   / 2.5px (Arabic) too high with every declared metric equal. A block's top margin collapses with the title's
   bottom margin, so the value declared here is the WHOLE gap the reference renders between the title and the
   control -- 27.5px, 20px on phones -- and the control, the orbs and the hero heading land on the reference's
   pixels in both languages (measured 2026-09-09; portal group 3). */
.email-back {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 7px;
    margin: 27.5px 0 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--kp-navy-500);
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
    text-decoration: none;
}
.email-back:hover { color: var(--kp-navy-500); background: transparent; text-decoration: underline; }
.email-back .icon { width: 14px; height: 14px; }
/* The Back's TOP gap follows the title's tier (the shell switches the title's margins at 720px), while its bottom
   margin follows the email family's own tier (600px, below): between the two the reference still renders 20px above
   the control and 28px under it (portal group 3, 2026-09-09). */
@media (max-width: 720px) {
    .email-back { margin-block-start: 20px; }
}

.settings-back {
    display: inline-flex;
    align-items: center;
    gap: 8.5px;
    margin: 0;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--kp-gray-500);
    font-size: 14.875px;
    font-weight: 600;
    line-height: 21.25px;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}
.settings-back:hover {
    color: var(--kp-navy-600);
    background: rgb(0 51 160 / .05);
    text-decoration: none;
}
.settings-back .icon { width: 17px; height: 17px; opacity: .48; }

/* The reference mirrors its own arrow ASSET per direction. The settings arrow is the sprite's inline-end
   arrow, so the LTR page is the one that needs the flip -- the same pairing the topbar back controls use;
   the three Bootstrap arrows point left as drawn, so the RTL page is the one that flips them (portal
   group 3, 2026-09-09).
   Dated 2026-10-14 (Core Rule 13, the pickup page's third browser round): the pickup back links of /Pickup/Ready
   and /Pickup/Schedule carry the shared .ps-back class but draw the sprite's inline-end arrow, so the Arabic-only
   turn below pointed their arrow to the inline end in both languages, where the reference's back control points to
   the inline start. They take the settings pairing instead -- turned on the LTR page, left as drawn on the RTL
   page -- and the shared Arabic turn names the privacy page's .ps-back without the pickup class. */
html[dir="ltr"] .settings-back .icon,
html[dir="ltr"] .pk-back .icon,
html[dir="rtl"] .pd-back .icon,
html[dir="rtl"] .ps-back:not(.pk-back) .icon,
html[dir="rtl"] .email-back .icon {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .pd-back,
    .ps-back,
    .settings-back { transition: none; }
}

/* ============================================================
   PROFILE HUB (/Profile)
   ============================================================ */
/* THE SERVICES COLUMN NEVER FALLS UNDER A BOX NUMBER'S WIDTH (dated 2026-11-10). From 1024 to about 1028 px the column
   beside the hero was 320 to 324 px, under the 325 px a card needs to hold KW- and ten digits on one line (the service
   grid's own floor, below), so a number of wide digits broke after KW- on the English page. The hero column gives up
   the missing pixels there (down to 320 px at most) and is 340 px again from 1029 px, where the column already has room;
   two columns exist only from 1024 px, so the floor never meets a narrower window. */
.pf-layout {
    display: grid;
    grid-template-columns: minmax(320px, 340px) minmax(325px, 1fr);
    align-items: start;
    gap: 24px;
}

.pf-side { position: sticky; top: 12px; }

/* The grid's second column. min-width:0 is the load-bearing part: a grid item defaults to
   min-width:auto, so one unbreakable string (a long email address, a box number) would push the
   column past its track and skew the whole two-column layout. */
.pf-main { min-width: 0; }

.pf-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 18px 18px;
    border-radius: 14px;
    background: var(--gradient-brand);
    box-shadow: 0 8px 20px rgb(0 38 128 / .22);
    color: var(--kp-white);
}

.pf-identity { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

.pf-avatar {
    position: relative;
    display: grid;
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / .35);
    border-radius: 50%;
    background: rgb(255 255 255 / .14);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.pf-avatar i {
    position: absolute;
    inset-inline-end: 3px;
    bottom: 3px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--kp-navy-600);
    border-radius: 50%;
    background: var(--kp-emerald-500);
}

.pf-identity-copy { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 4px; }

.pf-identity h2 {
    margin: 0;
    color: var(--kp-white);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.pf-email {
    overflow: hidden;
    margin: 2px 0 0;
    color: rgb(255 255 255 / .88);
    font-size: 13px;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-id-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.pf-id-box {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgb(255 255 255 / .16);
    border-radius: 10px;
    background: rgb(255 255 255 / .1);
    color: var(--kp-white);
}

.pf-id-box--wide { grid-column: 1 / -1; }

.pf-id-box small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgb(255 255 255 / .82);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
}

.pf-id-box small .icon { width: 12px; height: 12px; flex: 0 0 12px; opacity: .7; }

/* A long email address wraps inside its tile instead of being cut. */
.pf-id-box b {
    display: block;
    margin-top: 3px;
    color: var(--kp-white);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pf-services-none { margin: 0 4px 22px; color: var(--color-text-muted); font-size: 11px; line-height: 1.25; }

/* Two columns only where each card can hold a box number on one line: KW- and ten digits at 24px/700 need 325px with the card's padding and picture, as measured. A single card keeps half the width, and a wide window never takes a third column (15 #1241). */
.pf-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(325px, calc(50% - 6px))), 1fr)); gap: 12px; margin-bottom: 22px; }

/* Text sizes are the removed mailbox card's own (.pf-mailbox-top p and .pf-mailbox-number), kept by the owner's ruling 15 #1241. */
.pf-service-card {
    display: flex;
    min-width: 0;
    min-height: 108px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid rgb(0 51 160 / .13);
    border-radius: 12px;
    background: var(--color-bg-surface);
    box-shadow: 0 1px 3px rgb(0 38 128 / .05);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.pf-service-card:hover {
    border-color: rgb(0 51 160 / .25);
    box-shadow: 0 4px 14px rgb(15 23 42 / .06);
    color: var(--color-text);
    text-decoration: none;
}

.pf-service-card img { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; }

.pf-service-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }

.pf-service-name { color: var(--color-text-muted); font-size: 11px; font-weight: 400; line-height: 1.5; text-transform: uppercase; }

.pf-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgb(0 154 68 / .1);
    color: var(--kp-emerald-500);
    font-size: 10px;
    font-weight: 600;
}

/* A box that is not Active prints its real status (15 #1241): the Active mark's box and text, muted, with no dot. */
.pf-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 600;
}

.pf-active i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pf-mailbox-number { display: block; color: var(--color-text); font-size: 24px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }

/* Written under the shell root so the 1.5 line box outranks the shell's heading rule (1.2) that the h2
   otherwise takes, and untracked: the reference's label is a plain 11px/16.5px line (portal group 3, 2026-09-09). */
.rp-shell .pf-section-label {
    margin: 0 4px 10px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: uppercase;
}

/* Two columns only where each card can hold its longest word before the arrow: 112px of card chrome plus 86.68px at most, as measured (15 #380 clause 5). */
.pf-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(200px, calc(50% - 5px))), 1fr)); gap: 10px; }

.pf-setting-card {
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    gap: 14px;
    padding: 8px 18px;
    border: 1px solid rgb(0 51 160 / .13);
    border-radius: 12px;
    background: var(--color-bg-surface);
    box-shadow: 0 1px 3px rgb(0 38 128 / .05);
    color: var(--color-text);
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.pf-setting-card:hover {
    border-color: rgb(0 51 160 / .25);
    box-shadow: 0 4px 14px rgb(15 23 42 / .06);
    color: var(--color-text);
    text-decoration: none;
}

.pf-setting-card--wide { grid-column: 1 / -1; }

.pf-setting-card img { display: block; width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; }

.pf-setting-card .pf-setting-arrow { display: block; width: 16px; height: 16px; flex: 0 0 16px; opacity: .7; }

/* The reference caret points inline-start; our sprite arrow points inline-end, so LTR is the side
   that flips -- the same pairing as the back links above. */
html[dir="ltr"] .pf-setting-arrow { transform: rotate(180deg); }

.pf-setting-card strong { min-width: 0; flex: 1 1 auto; color: var(--color-text); font-size: 13px; font-weight: 600; line-height: 1.5; }

@media (min-width: 1024px) {
    .pf-layout { margin-top: -8.5px; }
}

@media (max-width: 1023px) {
    .pf-layout { display: block; }
    .pf-side { position: static; }
    .pf-hero { margin-bottom: 22px; }
    .pf-avatar { font-size: 20px; }
    .pf-identity h2 { font-size: 17px; }
    .pf-setting-card strong { font-size: 14px; }
}

@media (max-width: 720px) {
    .pf-service-grid,
    .pf-settings-grid { grid-template-columns: minmax(0, 1fr); }
    .pf-id-box { padding: 9px 10px; }
    .pf-id-box b { font-size: 11px; }
}

/* ============================================================
   PERSONAL DATA (/Profile/PersonalData)
   ============================================================
   The reference narrows the content column on this route ALONE -- measured live: .rp-wrap computes
   1180px here and the shell default everywhere else in this family. Ours narrows the same way,
   through the same shape (a :has() test on the page's own layout element) so no per-page wiring is
   needed in the layout.
   Dated 2026-11-08 (owner ruling 15 #1222): Personal Data and Corporate Profile take the full content width, so this cap is gone.
   ============================================================ */

.pd-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
}

.pd-summary { display: grid; gap: 24px; }

.pd-profile-card,
.pd-form-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-surface);
    box-shadow: 0 2px 8px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .035);
}

/* The reference paints this band in three shades of its pre-rebrand blue; the official navy ramp
   carries the same three-stop role. */
.pd-band {
    height: 96px;
    background: linear-gradient(135deg, var(--kp-navy-500) 0%, var(--kp-navy-600) 58%, var(--kp-navy-700) 100%);
}

.pd-profile-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -49px;
    padding: 0 24px 24px;
    text-align: center;
}

/* The avatar ring: the reference runs it from its stale gold through the page canvas to its stale
   blue. Official gold and official navy, same stops, same angle. */
.pd-avatar {
    position: relative;
    display: grid;
    width: 96px;
    height: 96px;
    padding: 3px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kp-gold-500), var(--color-bg-canvas) 46%, var(--kp-navy-500));
}

.pd-avatar > span {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kp-navy-500), var(--kp-navy-700));
    color: var(--kp-white);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .03em;
}

.pd-avatar > i {
    position: absolute;
    inset-inline-end: -1px;
    bottom: 3px;
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 3px solid var(--color-bg-surface);
    border-radius: 50%;
    background: var(--kp-emerald-500);
    color: var(--kp-white);
}

.pd-avatar > i .icon { width: 13px; height: 13px; }

/* overflow-wrap (2026-10-13): a name with no spaces wraps inside the card instead of setting its width - see
   the value cells below. */
.pd-profile-body h2 { margin: 17px 0 0; color: var(--color-text); font-size: 20px; font-weight: 800; letter-spacing: normal; overflow-wrap: anywhere; }

.pd-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 11px;
    border: 1px solid rgb(0 154 68 / .25);
    border-radius: 99px;
    background: rgb(0 154 68 / .07);
    color: var(--kp-emerald-900);
    font-size: 11px;
    font-weight: 700;
}

.pd-verified .icon { width: 11px; height: 11px; }

.pd-quick { display: grid; width: 100%; gap: 12px; margin-top: 20px; }

.pd-quick p {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 12px 15px;
    border-radius: 9px;
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: start;
}

.pd-quick .icon { width: 13px; height: 13px; flex: 0 0 13px; color: var(--kp-slate-400); }

/* A quick fact's text, the item beside the icon (2026-10-13): a company e-mail at its 256-character limit has no
   break opportunity, and its single-line width became the floor of this flex item and of the `.pd-quick` grid
   track - measured on /Profile/Company, the e-mail 1335-1342 px and the track 1391-1398 px wide inside a 318-348 px
   card. `overflow-wrap: anywhere` is the value whose breaks count towards that floor (`break-word` wraps at layout
   but leaves the floor at the whole run), so the fact wraps inside its row; a value that fits is unchanged. Pinned
   by CompanyLongValueGovernanceTests. */
.pd-quick p > span { min-width: 0; overflow-wrap: anywhere; }

/* THE QUICK FACTS' LATIN VALUES TAKE THE LATIN FACE ON AN ARABIC PAGE (2026-10-20, Core Rule 13 typography). The
   reference gives every element written left to right the Latin face - `[dir="ltr"] { font-family: Inter, ... }` in
   its served bundle (the portal package's css/app.bundle.css and the company additions' copy of it) - and draws the
   CR and PACI numbers as `<b dir="ltr">` and the phone, e-mail and civil ID as `<span dir="ltr">`, so on its Arabic
   corporate-data and personal-data pages they paint Inter (700 bold, 400 plain, 13px). Ours inherited the Arabic face
   the Arabic document switches the body to. One rule for both profile pages: every left-to-right value in the family
   (the `bdi` inside the bold CR and PACI values, the phone, e-mail and civil-ID spans) and the bold wrapper that holds
   a number. The Arabic labels beside them and the "no phone" sentence carry no dir attribute and keep Alexandria, and
   the bilingual stack still reaches Alexandria for an Arabic character inside a value. Scoped to the Arabic document,
   so an English page keeps the body face it already had. The same mechanism as the e-mail page's stored address. */
html[lang="ar"] .pd-quick [dir="ltr"],
html[lang="ar"] .pd-quick b { font-family: var(--font-portal-bilingual); }

.pd-protection {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 19px;
    border: 1px solid rgb(0 51 160 / .18);
    border-radius: 10px;
    background: rgb(0 51 160 / .055);
}

.pd-protection > span,
.pd-form-title > span {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 9px;
    background: rgb(0 51 160 / .1);
    color: var(--kp-navy-600);
}

.pd-protection > span .icon,
.pd-form-title > span .icon { width: 18px; height: 18px; }

.pd-protection h3 { margin: 2px 0 5px; color: var(--kp-navy-600); font-size: 13px; font-weight: 800; letter-spacing: normal; }

.pd-protection p { margin: 0; color: var(--color-text-muted); font-size: 11px; line-height: 1.65; }

.pd-form-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 24px 18px;
    border-bottom: 1px solid var(--color-border);
}

.pd-form-title { display: flex; align-items: center; gap: 12px; }

.pd-form-title h2 { margin: 0; color: var(--color-text); font-size: 18px; font-weight: 800; letter-spacing: normal; }

.pd-form-title p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 11px; }

/* line-height explicit: a button ignores the ambient one, and this control must hit 38px. */
.pd-edit {
    display: inline-flex;
    min-width: 83px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 0;
    border-radius: 9px;
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    cursor: pointer;
}

.pd-edit:hover { background: var(--kp-navy-100); }

.pd-edit .icon { width: 12px; height: 12px; }

/* THE COMPANY CARD'S CHANGE LINK LANDS CLEAR OF THE LAUNCHER (2026-10-23). A keyboard focus scrolls only a control not
   already in view, so Tab could leave the company profile's change link resting under the floating assistant launcher
   (measured in Arabic: at 390x844 the link at 701-739 under the launcher at 702-766; at 740x360 the link at 316-354
   under the launcher at 225-327). The end margin is the shell's own launcher clearance (components.css .rp-shell, at
   each tier) plus the ring's room - the same rule as .subscription-current above - so the focus scroll lifts the link
   above the launcher. The launcher keeps its place (15 #627); a page without the launcher keeps its scroll as before.
   Dated 2026-10-23: the change link was one instance of the class, not all of it. Measured at every walked size in
   both languages, Tab left 922 landings under the launcher and under no other fixed box: on the profile the document
   downloads (in Arabic at 844x390 the download at 279-313 under the launcher at 255-357), in the change form the
   fields, the step and person buttons and the upload areas. So the same end margin now sits on every control the
   keyboard can land on inside either company page's own content (Profile/Company and Profile/CompanyChange, both
   .corp-scope), the change link among them. Left out: the cancel dialog, a fixed layer of its own whose controls
   scroll inside it, and the company status banner, which the layout draws on every page. Nothing moves at rest. */
.rp-shell:has(.rp-assistant) .corp-scope:not(.kp-company-banner)
  :is(a[href], button, input, select, textarea, summary, [tabindex]):not(.corp-modal-layer *) {
  scroll-margin-block-end: calc(var(--rp-assistant-clearance) + var(--kp-space-sm));
}

.pd-form { padding: 23px 24px; }

.pd-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 21px; }

.pd-field { display: block; min-width: 0; }

.pd-field.pd-wide { grid-column: 1 / -1; }

.pd-field > span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 650;
}

.pd-field > span .icon { width: 12px; height: 12px; flex: 0 0 12px; color: var(--kp-slate-400); }

.pd-value {
    position: relative;
    display: flex;
    /* The refusal message the shared engine inserts is a SIBLING of the input (`afterend`), so inside a
       nowrap flex row it became a second item ON the input's line and took the width from it -- measured
       2026-09-10, the box held 698px while the input fell from 633px to 539.7px and the sentence sat
       beside the value it was about. Wrapping lets the message have the line the rest of the portal gives
       it; the input keeps the whole of its own. */
    flex-wrap: wrap;
    align-items: center;
    min-height: 50px;
    padding-block: 0;
    padding-inline: 47px 14px;
    border: 2px solid transparent;
    border-radius: 9px;
    background: var(--color-bg-canvas);
}

/* A full line of its own, the same shape `.filter-date-group .field-error-msg` uses in the shared family.
   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 row's intrinsic width, so with flex-basis alone the message TEXT would
   decide how wide the field box wants to be. A percentage min-size is ignored while the browser measures
   intrinsic width and honoured at layout, so the message widens nothing and still spans its line. */
.pd-value > .field-error-msg {
    flex-basis: 100%;
    inline-size: 0;
    min-inline-size: 100%;
    padding-block-end: 8px;
}

.pd-value > .icon {
    position: absolute;
    inset-inline-start: 15px;
    width: 14px;
    height: 14px;
    color: var(--kp-slate-400);
}

/* The value cell (2026-10-13). A value at its accepted maximum with no break opportunity - the company and
   member e-mails, 256 characters - drew as one line 1438-1448 px wide on /Profile/Company and set the minimum
   width of this flex item and of the boxes around it, so the details card laid its content out 1868-1878 px
   wide inside 740 at 1440 (1501-1510 inside 348 at 390) and cut it. `overflow-wrap: anywhere` lets the value
   break where it does not fit and counts those breaks in its minimum width (`break-word` does not);
   `min-width: 0` releases the flex item's automatic minimum outright. `padding-block: 12px` keeps a wrapped
   value off the box's edges and leaves a one-line value where it was. `.pd-value` (above) is a border-box flex
   row with `min-height: 50px`, 2px borders and no block padding, so its content box is 46px and it centres the
   paragraph. The four views that print a `.pd-value` - Profile/Company.cshtml with its field partial, and
   Profile/PersonalData.cshtml with its company partial - render under the Profile controller, so <body> carries
   `rp-shell` without the dashboard modifier (_Layout.cshtml adds `rp-shell--dashboard` on Home/Index only) and
   the paragraph inherits `line-height: 1.5` from body.rp-shell in components.css in both languages; the 1.625
   Arabic body leading this file declares is overridden there. One line of 14px text is therefore 21px, and
   21 + 2 x 12 = 45px fits inside 46: the box keeps its 50px and the text its centred position. Pinned by
   CompanyLongValueGovernanceTests. */
.pd-value p {
    min-width: 0;
    padding-block: 12px;
    margin: 0;
    color: var(--color-text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.pd-value input {
    display: none;
    width: 100%;
    height: 46px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
}

.pd-field small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: var(--color-text-muted);
    font-size: 10px;
}

.pd-field small .icon { width: 10px; height: 10px; flex: 0 0 10px; }

/* The OTHER-language spelling of the name -- a recorded fact shown beside the primary one, not a
   lock note, so it carries no icon and reads at the same muted weight. */
.pd-name-other { display: block; margin-top: 7px; color: var(--color-text-muted); font-size: 10px; }

/* The personal-data screen's two three-field rows (ruling 15 #855(i)(j), dated 2026-10-29): the civil record
   (nationality, gender, date of birth) and the address (governorate, area, block). A row spans the form's two columns
   and holds three fields of its own.
   Dated 2026-10-29 (the closing design round): THREE ACROSS ONLY WHERE A THIRD HAS ROOM. The one-column arm used to start
   at 900px, which left the rows three across where the form card is narrow: measured at 1024 every value printed one or
   two characters to a line in a 15px column and the field grid overflowed its box (scrollWidth 298 against 282), and at
   1200 the block, the area and the date broke over two to four lines in 74px. A third needs a 150px text column for a
   block at its 20-character bound (measured 148px in English, 137.7px in Arabic), and the value box takes 47px + 14px of
   padding and 4px of border around it, so three across needs 3 x (150 + 65) + 2 x 21 = 687px of field grid. Measured in
   both languages, the grid is 282px at 1024, 458px at 1200, 538px at 1280, 624px at 1366, 698px at 1440 and 710px at
   1920 (the page's content is capped at 1180px from there), so the rows go one field to a row below 1440px. */
.pd-trio { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px 21px; }
@media (max-width: 1439.98px) {
    .pd-trio { grid-template-columns: minmax(0, 1fr); }
}

/* The address group's heading: a full row of the form grid, in the form title's navy. */
.pd-section-title { grid-column: 1 / -1; margin: 6px 0 -4px; color: var(--kp-navy-600); font-size: 13px; font-weight: 750; }

/* The address selects swap with their printed value exactly as the inputs do, at the input's own STATED height - never a
   min-height, for the WebKit reason PortalSelectStatedHeightGovernanceTests records.
   Dated 2026-10-29 (the closing design round): THE ARROW KEEPS ITS OWN ROOM. With no inline padding the engine painted
   its native arrow over the end of a long area name (measured at 1440 and 1920: 165px of Arabic and 174.6px of English
   text in 154-158px); the arrow's ink lies 4-19px inside the control's inline-end edge in both engines and both
   directions, so 24px at the inline end keeps the text clear of it, and a name longer than the room ends in an
   ellipsis instead of under the arrow.
   Dated 2026-10-30 (ruling 15 #855(i)): THE ELLIPSIS ALONE KEEPS THE ARROW CLEAR, so the 24px is gone. Measured
   in Chromium only (WebKit was not measured in this round) on these two selects at 1024, 1200, 1440, 1920 and 390 in
   both languages: the engine already stops the text before its own arrow room, and with no padding the widest area
   name ends in its ellipsis 19-23px inside the inline-end edge at 1440 and 1920 (further in at the other widths) while
   the arrow's ink lies 2-13px inside it, so at least 6px clear. At 768 the probe found other ink 0-29px from the edge
   that it could not tell apart from the arrow, so no arrow bound is stated for 768.
   The 24px only cut names that fit: "Mubarak Al-Kabeer" needs 149.2px with no padding and the governorate select is
   153.7px at 1440 and 157.7px at 1920 in English, so it ended "Mubarak Al-K..." there. */
.pd-value select {
    display: none;
    width: 100%;
    height: 46px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    text-overflow: ellipsis;
}

/* THE AREA LIST'S READ SHOWS ITSELF (ruling 15 #198c; the closing design round of 2026-10-29). The control carries the
   shared lock while its list is read, but the lock's ring is a ::before, which a select never paints, so the held
   control looked exactly like the idle one waiting for a governorate. The ring is painted by the value box the select
   sits in, in the place of the box's own icon - the shared lock's treatment of a control whose icon is its only mark
   (.btn-loading--icon) - with the lock's own ring: 16px, a 2px stroke, the house spin. The box is found by the lock on
   its control rather than by the control's element: the only control here that takes the lock is the area select, and
   an input that took it would want the same ring. */
.pd-value:has(> .btn-loading) > .icon { visibility: hidden; }
.pd-value:has(> .btn-loading)::before {
    content: '';
    position: absolute;
    inset-inline-start: 14px;
    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);
    color: var(--kp-slate-400);
    animation: kp-btn-spin .8s linear infinite;
}

/* The sign-up's area control, the same ring for the same reason. Its field has no icon inside the box, so the ring sits
   inside the control at the inline end, clear of the native arrow (whose ink lies 4-19px inside that edge); while the
   list is read the control holds only its short placeholder, so the ring covers no text. It shares the select's grid
   cell - the field is a grid whose first row is the label - and both are placed there by name, since auto-placement
   would move the select to the next row. It sits on the shared lock's own layer, after the select, so it paints above
   the locked select (the lock lifts it to layer 6). */
.ref-field:has(> .btn-loading) > .btn-loading,
.ref-field:has(> .btn-loading)::after { grid-area: 2 / 1; }
.ref-field:has(> .btn-loading)::after {
    content: '';
    position: relative;
    z-index: 6;
    align-self: center;
    justify-self: end;
    width: 16px;
    height: 16px;
    margin-inline-end: 26px;
    border: 2px solid color-mix(in srgb, currentColor 40%, transparent);
    border-inline-start-color: currentColor;
    border-radius: var(--kp-radius-full);
    color: var(--kp-slate-400);
    pointer-events: none;
    animation: kp-btn-spin .8s linear infinite;
}

/* The company form's area control (2026-11-10), the same ring for the same reason. Its field is the same shape as the
   sign-up's - a grid whose first row is the label, the select the second, no icon inside the box - so the ring takes
   the same place: the select's own grid cell, at the inline end, clear of the native arrow, on the shared lock's layer.
   Read 2026-11-10: the area select is the one control inside a field of this family that the page scripts lock. */
.corp-field:has(> .btn-loading) > .btn-loading,
.corp-field:has(> .btn-loading)::after { grid-area: 2 / 1; }
.corp-field:has(> .btn-loading)::after {
    content: '';
    position: relative;
    z-index: 6;
    align-self: center;
    justify-self: end;
    width: 16px;
    height: 16px;
    margin-inline-end: 26px;
    border: 2px solid color-mix(in srgb, currentColor 40%, transparent);
    border-inline-start-color: currentColor;
    border-radius: var(--kp-radius-full);
    color: var(--kp-slate-400);
    pointer-events: none;
    animation: kp-btn-spin .8s linear infinite;
}

/* Reduced motion keeps both rings and stops their spin, as the shared lock's own arm does.
   Dated 2026-11-10: the company form's ring is the third. */
@media (prefers-reduced-motion: reduce) {
    .pd-value:has(> .btn-loading)::before,
    .ref-field:has(> .btn-loading)::after,
    .corp-field:has(> .btn-loading)::after { animation: none; }
}

.pd-form-actions {
    display: none;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 27px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.pd-form-actions button {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 18px;
}

/* The enabled guard, for the reason the profile copy control's rule states: the shared button lock
   disables BOTH controls of this row for the whole flight of a save (2026-09-13). */
.pd-form-actions button:not(:disabled) { cursor: pointer; }

/* One em of the button's 12px text, the reference's own icon box (a font glyph there). Measured 2026-10-29 at 1440: the
   14px box made Save and Cancel 2.3-2.5px wider than the reference's. The icon gave 2.47px of that in Arabic (the
   reference glyph box is 11.53px there) and 2.0px in English (12.0px); the English labels add a small text difference
   of their own (Save 84.31 against 83.83px, Cancel 41.08 against 40.78px), while the Arabic labels, the padding, the
   gap and the border are equal. */
.pd-form-actions button .icon { width: 12px; height: 12px; }

.pd-form-actions button[type="submit"] {
    border-color: var(--kp-navy-600);
    background: var(--kp-navy-600);
    color: var(--kp-white);
}

/* The edit swap: the printed value gives way to its input, the actions row appears, and the two
   locked fields stay visibly locked. */
.pd-form-card.is-editing .pd-edit { display: none; }
.pd-form-card.is-editing .pd-value { border-color: var(--color-border); background: var(--color-bg-surface); }
.pd-form-card.is-editing .pd-value:focus-within { border-color: var(--kp-navy-600); box-shadow: 0 0 0 4px var(--color-focus-ring); }
.pd-form-card.is-editing .pd-value p { display: none; }
.pd-form-card.is-editing .pd-value input { display: block; }
.pd-form-card.is-editing .pd-value input:disabled { color: var(--kp-slate-400); cursor: not-allowed; }
.pd-form-card.is-editing .pd-value select { display: block; }
.pd-form-card.is-editing .pd-value select:disabled { color: var(--kp-slate-400); cursor: not-allowed; }
.pd-form-card.is-editing .pd-field:has(input:disabled) .pd-value { background: var(--color-bg-canvas); }
/* A disabled select's box is locked too (dated 2026-10-29): the area waiting for a governorate, and the area while its
   list is read, which the ring above tells apart. Before, the rule above reached inputs only and the disabled area kept
   a white, editable-looking box beside the grey locked boxes of the same form. */
.pd-form-card.is-editing .pd-value:has(> select:disabled) { background: var(--color-bg-canvas); }
.pd-form-card.is-editing .pd-form-actions { display: flex; }

/* A flagged field must stay flagged on hover and while focused -- the focus rule above would
   otherwise repaint the border navy over the red the engine just set. */
.pd-form-card.is-editing .pd-value:has(.is-invalid),
.pd-form-card.is-editing .pd-value:has(.is-invalid):focus-within {
    border-color: var(--kp-red-600);
    box-shadow: var(--focus-ring-danger);
}

@media (max-width: 900px) {
    .pd-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
    .pd-fields { grid-template-columns: 1fr; }
    .pd-field.pd-wide { grid-column: auto; }
}

@media (max-width: 720px) {
    .pd-back { margin-bottom: 14px; }
    .pd-layout { grid-template-columns: 1fr; gap: 16px; }
    .pd-summary { gap: 16px; }
    .pd-form-card > header { padding: 19px 17px 15px; }
    .pd-form { padding: 18px 17px; }
    .pd-fields { gap: 17px; }
    /* The reference collapses this button to a 40px icon square by zeroing its font-size (app.bundle.css `.pd-edit`, the
       720 rung). In Arabic that does not hide the label: the font-size-adjust the portal declares for Arabic (the top of
       this file) paints it anyway, measured 2026-11-08 at computed 0px and painted 44.86 x 18px, 12.44px past the
       button's start edge. Same shape as `.subscription-heading > a span` below: clipped, so the button keeps its name. */
    .pd-edit { width: 40px; min-width: 40px; padding: 0; }
    .pd-edit span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .pd-profile-body { padding-inline: 20px; }
    .pd-protection { padding: 17px; }
    .pd-form-actions {
        position: sticky;
        bottom: 82px;
        z-index: 2;
        margin: 22px -17px -18px;
        padding: 14px 17px;
        background: var(--color-bg-surface);
        box-shadow: 0 -8px 20px rgb(15 23 42 / .05);
    }
    .pd-form-actions button { flex: 1; }
    /* THE STICKY BAR MUST NEVER COVER THE FIELD ABOVE IT (measured 2026-09-10 at 390 in both locales:
       both buttons sat at y 453 while the phone box ran 450-496, so the box's lower edge, its refusal
       message and the counter line were all underneath the bar).
       A sticky element keeps its place in flow and is then PULLED toward its offset, so `bottom: 82px`
       lifts this bar off the form's end and over whatever precedes it -- the further the form's end is
       from the viewport's, the further it lifts. The cure is room at the end of the form for the bar's
       pinned footprint, so the last field can always be scrolled clear of it: the 82px clearance the rule
       above holds it at, plus the bar's own box (14px + a 39px button + 14px, from the two rules above).
       Both numbers are read off those rules rather than chosen, so a change to either is a change here. */
    .pd-form { padding-block-end: calc(82px + 14px + 39px + 14px); }
}

/* THE COMPANY PROFILE TAKES THE REFERENCE'S NARROW RUNG WHERE ITS TWO COLUMNS WOULD CUT THE VALUES (Core Rule 13, dated
   2026-11-08). The reference holds two field columns down to 901px, its narrowest pair measuring 165px, because its rail
   measures 80px at 1024 and 1100; ours measures 272px there, so the pair measures 130.5px at 1024 and leaves a value
   65.5px, which cuts a commercial registration number inside the word and stacks the change link on three lines. So this
   page takes the reference's own 900 rung (above) where the pair is too narrow, in the labelled-rail band that starts at
   1024px (1023px and below have the compact rail): 1160px is the first window of that band measured with no value cut
   in either language. The 270 and 20 are that rung's, and they give the change link the room
   to hold one line inside its card (measured at 1024 in English: 317.6px wanted, 282px without them). The personal
   screen's form keeps its two columns. */
@media (min-width: 1024px) and (max-width: 1159px) {
    .corp-scope .pd-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
    .corp-scope .pd-form--readonly .pd-fields { grid-template-columns: 1fr; }
    .corp-scope .pd-edit { flex: none; }
}

@media (max-width: 390px) {
    .pd-form-title h2 { font-size: 16px; }
    .pd-form-title > span { width: 36px; height: 36px; flex-basis: 36px; }
    .pd-value { padding-inline-start: 43px; }
    .pd-profile-body h2 { font-size: 18px; }
}

/* ============================================================
   CORPORATE PROFILE (/Profile/Company, 2026-10-10)
   ============================================================
   The corporate additions draw the company's profile on the personal-data screen above, adding section dividers and
   a list of document cards (corporate-details.css :1039-1210, the "Corporate Profile Page" block); those rules are
   ported here under the same names, each package colour re-expressed in tokens (portal palette clause): its neutral
   greys the slate ramp, the document icon's red the official crimson at an alpha, and the status badge's green and
   amber the company family's own success and gold badge values. The page sits inside the company family's scope
   class, so `--corp-primary` resolves here as on the company pages.

   READ-ONLY, so two of the package's controls change job: the card's Replace button, shown only while editing, is a
   Download button shown always (the same box), and the status badge says the document's expiry state, which the API
   decides, instead of "verified". The package's editing states are not ported. */
.pd-section-divider {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    margin: 16px 0 6px;
    padding-block-end: 8px;
    border-block-end: 1px solid var(--kp-slate-100);
    color: var(--corp-primary);
    font-size: 13.5px;
    font-weight: 800;
}

.pd-section-divider:first-of-type { margin-block-start: 0; }

.pd-section-divider .icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--corp-primary); }

/* A list, so a screen reader announces how many documents there are; the package's grid, without the list marks. */
.pd-docs-container {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pd-doc-card {
    display: grid;
    box-sizing: border-box;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
        "icon name   badge"
        ".    filed  download"
        "file file   file";
    align-items: center;
    gap: 6px 10px;
    padding: 12px;
    border: 1px solid rgb(0 51 160 / .13);
    border-radius: 10px;
    background: var(--kp-navy-050);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.pd-doc-card:hover {
    border-color: var(--kp-slate-300);
    background: var(--kp-white);
    box-shadow: 0 2px 6px rgb(0 0 0 / .03);
}

.pd-doc-main,
.pd-doc-meta,
.pd-doc-actions { display: contents; }

.pd-doc-icon {
    display: grid;
    grid-area: icon;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    border-radius: 8px;
    background: rgb(200 16 46 / .1);
    color: var(--corp-danger);
}

.pd-doc-icon .icon { width: 17px; height: 17px; }

.pd-doc-meta strong {
    display: block;
    grid-area: name;
    min-width: 0;
    color: var(--color-text);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pd-doc-meta small {
    display: block;
    margin-block-start: 0;
    color: var(--kp-slate-500);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.pd-doc-meta small[dir="auto"] { grid-area: filed; min-width: 0; }

/* One line: a long file name takes the ellipsis and its full name is on the title, the size and the date stay whole (15 #1241). */
.pd-doc-meta .pd-doc-file-meta { grid-area: file; display: flex; min-width: 0; align-items: center; }

.pd-doc-file-name { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pd-doc-file-meta > span { flex: none; white-space: nowrap; }

/* Bounded values stay whole (2026-10-14, 15 #474): the size's number and the expiry date of a profile document's
   file line (`.pd-doc-file-meta`, a `.pd-doc-meta small`), and a document's expiry date on the registration status
   page (its `data-doc-expiry` isolate in `.corp-doc-subline`; the tracking page's three values are kept whole by the
   tracking list's own rule in components.css, since later the same day). Each is a
   left-to-right isolate printed inside a line whose `overflow-wrap: anywhere` is there for the file name beside it;
   measured on /Profile/Company in Arabic at 390 px, two expiry dates split inside their isolate, the last two digits
   alone on the next line. `white-space: nowrap` takes the wrap opportunities inside the isolate away, so the line
   breaks before it, and the file name still wraps. Pinned by CompanyLongValueGovernanceTests.
   Dated 2026-11-09 (15 #1241): the file line is now one line and the file name takes the ellipsis (`.pd-doc-file-name`),
   so on this line nothing wraps; the rule stays for the two isolates. */
.pd-doc-file-meta .corp-mono,
bdi[data-doc-expiry] { white-space: nowrap; }

/* The package writes "name - size" as one run of text; here each part is its own element (the size's number and the
   expiry date in their own left-to-right isolates), so the separator between them is drawn, not written. */
.pd-doc-file-meta > * + *::before,
.pd-person-contact > * + *::before {
    content: "\00B7";
    margin-inline: 4px;
}

.pd-doc-status-badge {
    display: inline-flex;
    grid-area: badge;
    justify-self: end;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* The three expiry states the API sends, each in the company family's badge colour for that meaning. */
.pd-doc-status-badge.is-valid { background: rgb(0 154 68 / .08); color: var(--corp-success-text); }
.pd-doc-status-badge.is-expiring { background: rgb(203 160 82 / .15); color: var(--corp-gold-text); }
.pd-doc-status-badge.is-expired { background: rgb(200 16 46 / .08); color: var(--corp-danger); }

/* The package's Replace button box, shown always. */
.pd-doc-download-btn {
    display: inline-flex;
    grid-area: download;
    justify-self: end;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--kp-slate-300);
    border-radius: 7px;
    background: var(--kp-white);
    color: var(--corp-primary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
}

.pd-doc-download-btn:hover:not(:disabled) { border-color: var(--corp-primary); background: rgb(0 51 160 / .05); }

.pd-doc-download-btn .icon { width: 14px; height: 14px; }

/* THE HELD DOWNLOAD KEEPS ITS WIDTH (2026-10-24). While its request is out the shared lock paints a 16px ring in
   flow beside the label, and this button's own 6px gap stands between them: the button grew by 22px, enough to
   re-wrap the document's title beside it on a wide screen (measured at 1440 in English: 104.8px at rest, 126.8px
   held, the title one line, then two). The pressed button pays for its ring out of its own inline padding, the
   shape the admin filter pair's pressed rule uses: 12px - (16px + 6px) / 2 = 1px each side, so the held width is
   the rest width and nothing at rest changes. On a phone the button spans its row, so there only the ring's place
   inside it changes. Dated 2026-11-09 (15 #1241): on a phone the button no longer spans its row; it keeps its own
   width there too, so the padding rule holds at every width. */
.pd-doc-download-btn.btn-loading { padding-inline: 1px; }

/* The package's ring for this button stands 1px off; the company family's ring rule reaches every button in the scope
   at 2px, so the button's own offset is written where it outranks that rule. */
.corp-scope .pd-doc-download-btn:focus-visible { outline-offset: 1px; }

.pd-doc-download-btn:disabled { opacity: .55; cursor: not-allowed; }

/* A member's civil ID, phone and email under the member's name, on as many lines as they need. */
.pd-person-contact { flex-wrap: wrap; }

/* Each of them a flex item that may break (2026-10-13): the e-mail at its 256-character limit has no break
   opportunity and was measured 1039-1044 px wide on one line; with `overflow-wrap: anywhere` it wraps on its
   own line instead of widening the card, while a civil ID or a phone, which fits its line, stays whole. */
.pd-person-contact > bdi { min-width: 0; overflow-wrap: anywhere; }

/* The open request's banner stands above the two cards at the cards' own gap. */
.pd-company-banner { margin-block-end: 32px; }

/* A company account's read-only tiles (personal data, email): the sentence saying why the email cannot be edited
   here, the email tile's "Request a change" (a link drawn as that tile's own Change Email button), and the open
   request both tiles name instead while one is open. No reference draws these; they take the tiles' own values. */
.email-company-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.email-company-note .icon { width: 12px; height: 12px; flex: 0 0 12px; }

a.email-change { display: flex; align-items: center; justify-content: center; text-decoration: none; }

.pf-company-open {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-block-start: 16px;
    padding: 10px 14px;
    border: 1px solid rgb(0 51 160 / .14);
    border-radius: 9px;
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pf-company-open:hover { background: var(--kp-navy-100); }

.pf-company-open .icon { width: 14px; height: 14px; flex: 0 0 14px; }

.pf-company-open bdi { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

@media (min-width: 640px) {
    .pd-docs-container { grid-template-columns: repeat(auto-fit, minmax(max(280px, calc(50% - 6px)), 1fr)); }
}

@media (max-width: 900px) {
    .pd-company-banner { margin-block-end: 20px; }
}

/* The read-only body keeps the form body's padding but needs none of the room under it that the personal-data
   screen keeps for its sticky Save bar (above), as nothing here is saved. */
@media (max-width: 720px) {
    .pd-form--readonly { padding-block-end: 18px; }
    .pd-company-banner { margin-block-end: 16px; }
}

@media (max-width: 480px) {
    .pd-doc-card {
        grid-template-columns: 34px minmax(0, 1fr) auto auto;
        grid-template-areas:
            "icon name name name"
            "file file file file"
            ".    .    badge download";
        gap: 8px 10px;
    }
    .pd-doc-card:has(small[dir="auto"]) {
        grid-template-areas:
            "icon name name name"
            ".    filed filed filed"
            "file file file file"
            ".    .    badge download";
    }
    .pd-doc-download-btn { min-height: 40px; }
}

/* ============================================================
   EMAIL ADDRESS (/Profile/EmailAddress)
   ============================================================ */
.email-layout {
    display: grid;
    grid-template-columns: minmax(320px, 2fr) minmax(480px, 3fr);
    align-items: stretch;
    gap: 24px;
}

/* The reference runs this hero through three stops of its pre-rebrand blue; the official navy ramp
   carries the same role at the same angle. */
.email-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 656px;
    overflow: hidden;
    padding: 32px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--kp-navy-500) 0%, var(--kp-navy-700) 55%, var(--kp-navy-600) 100%);
    color: var(--kp-white);
    box-shadow: 0 12px 28px rgb(0 51 160 / .18);
}

.email-orb { position: absolute; border-radius: 50%; background: rgb(255 255 255 / .055); }

/* The orbs are placed with LOGICAL insets and MIRROR under RTL: the reference places them with the same
   logical insets, so its Arabic page paints the top orb at the inline end (the left) -- the re-pinning
   that held them on the English side was measured against the Arabic reference and removed (portal
   group 3, 2026-09-09). */
.email-orb-top { width: 190px; height: 190px; inset-block-start: -52px; inset-inline-end: -38px; }
.email-orb-bottom { width: 220px; height: 220px; inset-block-end: -74px; inset-inline-start: -55px; }

.email-hero-copy,
.email-hero-bottom { position: relative; z-index: 1; }

.email-icon {
    display: grid;
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / .12);
    border-radius: 10px;
    background: rgb(255 255 255 / .1);
}

.email-icon .icon { width: 37px; height: 37px; }

/* The email headings are the reference's rebooted 500 weight, untracked (portal group 3, 2026-09-09). */
.email-hero h2 { margin: 0 0 8px; color: var(--kp-white); font-size: 21px; font-weight: 500; letter-spacing: normal; }

.email-hero p { margin: 0; color: rgb(255 255 255 / .64); font-size: 14px; }

.email-hero-address {
    overflow: hidden;
    padding: 15px 17px;
    border: 1px solid rgb(255 255 255 / .12);
    border-radius: 8px;
    background: rgb(255 255 255 / .1);
    font-size: 18px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-main { display: flex; flex-direction: column; gap: 24px; }

.email-card {
    padding: 26px 25px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-surface);
    box-shadow: 0 5px 15px rgb(15 23 42 / .065);
}

.email-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }

.email-card-heading > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 9px;
    background: rgb(0 51 160 / .08);
    color: var(--kp-navy-600);
}

.email-card-heading > span .icon { width: 19px; height: 19px; }

.email-card h3 { margin: 0; color: var(--color-text); font-size: 19px; font-weight: 500; letter-spacing: normal; }

.email-card-heading p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 12px; }

.email-label { display: block; margin-bottom: 9px; color: var(--color-text); font-size: 14px; font-weight: 600; }

/* THE STATE SWAP. Both children are laid out by this one parent, so the reading panel and the edit
   form occupy the same box and swapping them cannot collapse the card's spacing. */
.email-states { display: block; }

.email-current {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 51px;
    padding-block: 0;
    padding-inline: 49px 15px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-canvas);
}

.email-current > .icon,
.email-edit-wrap > .icon {
    position: absolute;
    inset-inline-start: 16px;
    width: 16px;
    height: 16px;
    color: var(--kp-slate-400);
}

.email-current > span { flex: 1; color: var(--color-text); font-size: 16px; }

/* line-height explicit on all three: they are buttons, which ignore the ambient one. */
.email-change,
.email-save,
.email-cancel {
    min-height: 49px;
    border: 0;
    border-radius: 8px;
    /* The reference's rebooted buttons inherit the page's 16px/24px and keep the UA's 1px 6px padding
       (portal group 3, 2026-09-09). */
    padding: 1px 6px;
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
    cursor: pointer;
}

.email-change {
    width: 100%;
    margin-top: 20px;
    background: var(--kp-navy-600);
    color: var(--kp-white);
    box-shadow: 0 6px 15px rgb(0 51 160 / .18);
}

.email-change:hover,
.email-save:hover { background: var(--kp-navy-700); }

.email-edit-wrap { position: relative; }

.email-edit-wrap > input {
    width: 100%;
    height: 51px;
    padding-block: 0;
    padding-inline: 49px 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    outline: none;
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-size: 16px;
}

.email-edit-wrap > input:focus { border-color: var(--kp-navy-600); box-shadow: 0 0 0 3px var(--color-focus-ring); }

/* A flagged field must stay flagged on hover and while focused -- the focus rule above would otherwise
   repaint the border navy over the red the engine just set. The personal-data screen next door carries
   this pair in the same words; this screen shipped later with the focus rule and without its counterpart,
   so a refused email showed the ordinary "you are typing here" colour while its message underneath said
   the value was refused (measured 2026-09-10, both locales). The focused form is a class heavier than the
   focus rule, so it cannot be undone by source order. */
.email-edit-wrap > input.is-invalid,
.email-edit-wrap > input.is-invalid:focus {
    border-color: var(--status-portal-alert-fg);
    box-shadow: var(--focus-ring-portal-danger);
}

.email-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }

.email-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; }

.email-actions .icon { width: 15px; height: 15px; }

.email-cancel { background: var(--color-bg-canvas); color: var(--color-text-muted); }

.email-save { background: var(--kp-navy-600); color: var(--kp-white); }

.email-note {
    display: block;
    padding: 17px;
    border: 1px solid rgb(0 51 160 / .2);
    border-radius: 8px;
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    font-size: 13px;
    line-height: 1.5;
}

/* The one-column shape below is the reference's own <=950px tier. Dated clause 2026-10-16: it also holds
   from just above 1023px to just below 1170px, where the labelled rail (shown from 1024px, 15 #429(b)) leaves the two columns too
   little room. Derivation, from values the shell declares: the two columns need 320px + 480px + the 24px
   gap = 824px; the wrap's content box is the viewport - the 6px page scrollbar (html::-webkit-scrollbar
   above) - the 272px labelled rail - 2 x 34px wrap padding = viewport - 346px, so they fit from
   824 + 346 = 1170px. At 1024 that box was 678px, and the grid, starting at 272 + 34 = 306px, ended at
   1130px against the 1018px the window shows: the measured 112px sideways scroll. At 1170px the grid ends
   at 1130px, exactly where the content box ends. Below 1024px the 80px compact rail returns and the box is
   viewport - 154px, at least 824px from 978px; 951-977px is the reference's own state and is unchanged.
   Both edges are written to the hundredth because browser zoom gives fractional layout widths (1169.5px
   is a real one): the upper edge is 1169.98px, the house spelling for "below 1170", and the lower edge is
   1023.02px because the compact rail's own query ends at max-width 1023px, so the labelled rail already
   shows at 1023.5px. */
@media (max-width: 950px), (min-width: 1023.02px) and (max-width: 1169.98px) {
    .email-layout { grid-template-columns: 1fr; }
    .email-hero { min-height: 300px; }
    .email-main { gap: 18px; }
}

@media (max-width: 600px) {
    .email-back { margin-bottom: 18px; }
    .email-hero { min-height: 270px; padding: 24px; }
    .email-icon { width: 64px; height: 64px; }
    .email-icon .icon { width: 29px; height: 29px; }
    .email-card { padding: 21px 18px; }
    .email-layout { gap: 18px; }
}
/* (2026-10-18) This tier used to set `.email-current { padding-inline-start: 43px }`. The reference declares the same
   43px in its own phone tier and then overrides it LATER in its bundle with the 49px of the base rule
   (app.bundle.css, `.email-current { padding-inline: 49px 15px }`), so its rendered phone page paints 49px; the base
   rule's 49px now holds here too, measured at 390x844 in both languages. */

/* THE ADDRESS DISPLAYS (2026-10-18, measured against the rendered reference at 390x844 and 1440x900).
   A STORED ADDRESS is drawn left to right (dir="ltr") and keeps the reference's one-line treatment above. In Arabic
   it takes the Inter-first value stack, as the reference renders it (our page gave it the Arabic face), and sits at
   the Arabic reading side: the reference measured an 18px right gap in the desktop hero where ours left 118.95px.
   THE "NO ADDRESS" SENTENCE is ordinary text (no dir attribute) and wraps whole: at 390 the hero gave it 300px
   against its 344px Arabic / 304px English, and the one-line rule cut it. */
html[lang="ar"] .email-hero-address[dir="ltr"],
html[lang="ar"] .email-current > span[dir="ltr"] { font-family: var(--font-portal-bilingual); }
html[dir="rtl"] .email-hero-address[dir="ltr"],
html[dir="rtl"] .email-current > span[dir="ltr"] { text-align: end; }
.email-hero-address:not([dir="ltr"]) { overflow: visible; text-overflow: clip; white-space: normal; }
/* The Change control's label sits at the Arabic reading side, as the reference draws every Arabic button
   (app.bundle.css: `html[dir="rtl"] body[data-app-page] button { text-align: right }`). */
html[dir="rtl"] .email-change { text-align: start; }
html[dir="rtl"] a.email-change { justify-content: flex-start; }

/* ============================================================
   PRIVACY AND SECURITY (/Profile/PrivacySecurity)
   ============================================================ */
.ps-dashboard,
.ps-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-surface);
    box-shadow: 0 2px 8px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .035);
}

.ps-dashboard { display: flex; align-items: center; gap: 36px; margin-bottom: 24px; padding: 28px 34px; }

/* The reference's band carries a score RING beside this copy. There is no score to compute here, so
   the copy takes the whole band rather than leaving the ring's 36px gap beside nothing. */
.ps-dashboard--thin { gap: 0; }

.ps-dashboard-copy { flex: 1; }

.ps-dashboard-copy h2 { margin: 0; color: var(--color-text); font-size: 20px; font-weight: 800; letter-spacing: normal; }

.ps-dashboard-copy > p { margin: 7px 0 16px; color: var(--color-text-muted); font-size: 12px; }

.ps-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.ps-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 99px;
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
}

.ps-badges span i { width: 6px; height: 6px; border-radius: 50%; background: var(--kp-slate-300); }

.ps-badges span.active {
    border-color: rgb(0 154 68 / .25);
    background: rgb(0 154 68 / .07);
    color: var(--kp-emerald-900);
}

.ps-badges span.active i { background: var(--kp-emerald-500); }

.ps-card { overflow: hidden; }

.ps-section-body { padding: 0 24px 24px; }

/* The thin page has no collapsible section heading above this body, so the padding the heading used
   to supply is restored here. */
.ps-section-body--lead { padding-top: 24px; }

.ps-passwordless {
    padding: 18px;
    border: 1px solid rgb(0 51 160 / .18);
    border-radius: 10px;
    background: rgb(0 51 160 / .045);
}

.ps-passwordless header { display: flex; align-items: center; gap: 11px; }

.ps-passwordless header span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-surface);
    color: var(--kp-navy-600);
    box-shadow: 0 2px 5px rgb(15 23 42 / .05);
}

.ps-passwordless header span .icon { width: 16px; height: 16px; }

.ps-passwordless h3 { margin: 0; color: var(--color-text); font-size: 13px; font-weight: 750; letter-spacing: normal; }

.ps-passwordless > p { margin: 13px 0; color: var(--color-text-muted); font-size: 11px; line-height: 1.65; }

.ps-passwordless footer { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--color-border); }

.ps-passwordless footer span { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: 10px; }

.ps-passwordless footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--kp-emerald-500); }

@media (max-width: 720px) {
    .ps-back { margin-bottom: 14px; }
    .ps-dashboard { flex-direction: column; align-items: center; gap: 18px; padding: 22px 18px; }
    .ps-dashboard-copy { text-align: center; }
    .ps-badges { justify-content: center; }
}

@media (max-width: 440px) {
    .ps-dashboard { padding: 18px 14px; }
    .ps-dashboard-copy h2 { font-size: 18px; }
}

/* ============================================================
   GENERAL SETTINGS (/Settings)
   ============================================================ */
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 14px 12px; }

.settings-head .rp-title { margin-block: 0; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.settings-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgb(0 51 160 / .13);
    border-radius: 10px;
    background: var(--color-bg-surface);
    box-shadow: 0 1px 3px rgb(0 38 128 / .05);
}

.settings-preferences { grid-column: 1 / -1; gap: 12px; }

.settings-halves { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 16px; }

.settings-half { display: flex; min-width: 0; flex-direction: column; gap: 10px; }

.settings-divider { display: block; background: rgb(0 51 160 / .13); }

.settings-foot { display: flex; justify-content: flex-end; padding-block-start: 12px; border-block-start: 1px solid rgb(0 51 160 / .13); }

/* The section name keeps the reference's large label, 19.125px/700 on a 29.75px line, no case transform (15 #1241). */
.settings-card .rp-section-label {
    margin: 0;
    color: var(--kp-gray-800);
    font-size: 19.125px;
    font-weight: 700;
    line-height: 29.75px;
    letter-spacing: normal;
}

.settings-items { display: flex; flex-direction: column; }

.setting-item {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    color: var(--color-text);
    font: inherit;
    text-align: start;
    text-decoration: none;
}

.setting-item + .setting-item { margin-block-start: 6px; padding-block-start: 6px; border-block-start: 1px solid rgb(0 51 160 / .13); }

a.setting-item { cursor: pointer; }

a.setting-item:hover { color: var(--kp-navy-600); text-decoration: none; }

.setting-main { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 10px; }

.setting-icon {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgb(0 51 160 / .08);
    color: var(--kp-navy-600);
}

.setting-icon .icon { width: 18px; height: 18px; }

.setting-text { min-width: 0; text-align: start; }

.setting-text b { display: block; color: var(--color-text); font-size: 14.875px; font-weight: 600; line-height: 21.25px; }

.setting-text > span { display: block; margin-top: 2.125px; color: var(--color-text-muted); font-size: 12.75px; font-weight: 400; line-height: 17px; }

.setting-arrow { display: flex; flex: 0 0 auto; align-items: center; color: var(--color-text-muted); }

.setting-arrow .icon { width: 18px; height: 18px; }

html[dir="ltr"] .setting-arrow .icon { transform: rotate(180deg); }

.version-badge {
    padding: 3px 9px;
    border-radius: 6px;
    background: rgb(0 51 160 / .08);
    color: var(--kp-navy-600);
    font-family: var(--font-mono);
    font-size: 12.75px;
    font-weight: 500;
    line-height: 17px;
}

.setting-language-choices { display: flex; flex-wrap: nowrap; gap: 8px; }

.setting-language-choice {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid rgb(0 51 160 / .13);
    border-radius: 8px;
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

.setting-language-choice:hover { border-color: var(--kp-navy-600-a30); }

/* The choice itself is the clickable surface, so the radio inside it takes the label's cursor. */
.setting-language-choice:has(input:disabled) { cursor: not-allowed; }
.setting-language-choice input { cursor: inherit; }

.setting-language-choice:has(input:checked) {
    border-color: var(--kp-navy-600);
    background: rgb(0 51 160 / .06);
    color: var(--kp-navy-600);
}

.setting-language-choice:focus-within { box-shadow: 0 0 0 3px var(--color-focus-ring); }

/* A refused language paints its sentence inside the first choice, so that row may wrap. */
.setting-language-choices:has(.field-error-msg) { flex-wrap: wrap; }
.setting-language-choice:has(.field-error-msg) { white-space: normal; }

.setting-language-save {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--kp-navy-600);
    color: var(--kp-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
}

.setting-language-save:hover { background: var(--kp-navy-700); }

.setting-language-save .icon { width: 15px; height: 15px; }

@media (max-width: 1023px) {
    .settings-back { display: none; }
}

@media (max-width: 720px) {
    .settings-head { margin-block: 16px 14px; }
    .settings-grid,
    .settings-halves { grid-template-columns: minmax(0, 1fr); }
    .settings-halves { gap: 14px; }
    .settings-divider { height: 1px; }
    .setting-language-choices { gap: 5px; }
    .setting-language-choice { min-height: 44px; padding: 0 8px; }
    .setting-language-save { width: 100%; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .setting-language-choice { transition-duration: .01ms; }
}

/* ============================================================
   SHIPMENTS BOARD + TRACKING SHEET (portal shipments package, 2026-08-13)
   ============================================================
   The /Shipments board and the tracking sheet it opens. Every value below was read off the RENDERED
   design reference (shipments.html, its detail sheet opened) at 1440, 1100, 800 and 390, never grepped
   from a source file -- the reference serves ONE compiled bundle in which a later layer routinely
   overrides an earlier one, and this family is a textbook case: the base layer paints a grey results
   panel with a coloured top border, and a later layer nulls all of it for this page. Only the painted
   element shows the winner.

   THE BREAKPOINTS THIS FAMILY DECLARES, measured as the full set rather than assumed from the two ends
   (the middle-band lesson, 2026-08-12): the board answers `max-width: 720px` (the tab strip wraps 2-up and
   the row tightens) and, since 2026-10-12, `min-width: 721px` (the scrolling row's room for the focus
   ring); the sheet answers `min-width: 721px` (its desktop shape, declared LAST in the
   reference and therefore authoritative), `max-width: 720px` (a bottom sheet) and `max-width: 390px` (its
   narrow inset). Every one is reproduced below and each was opened during the build. Dated 2026-10-12
   (15 #426): the board's own `max-width: 900px` tier, where it stopped being two thirds of the column, went
   with the two-thirds column itself.

   COLOURS ARE RE-EXPRESSED, NEVER COPIED (palette clause, 15 #148 D1). The reference paints a
   pre-rebrand blue around #115ee8 in this family's focus ring, its link hover and its stage fill, and a
   violet #8341e9 on the stage track; those resolve to the official navy token carrying the same role.
   The reference's neutral slate ramp IS the shipped token ramp -- --color-text / --color-text-muted /
   --color-border resolve to its own #0f172a / #64748b / #e2e8f0 -- so those adopt as tokens.

   THE TAB TONES ARE NOT REDECLARED HERE. The four --kp-ship-tone values and the `data-status` hook that
   selects them are already shipped on .dc-status-tab in the shared component sheet; this page reuses
   both and overrides only the tab's SHAPE (a filled pill instead of the dashboard's outlined chip), so
   the two strips can never disagree about which colour "pickup" is.

   LETTER-SPACING IS ZEROED IN ARABIC on every rule that declares it (the block near the end of this
   family). Arabic letters join, and spacing them apart breaks the joins -- a house law that outranks
   the reference, which letter-spaces its Arabic labels unconditionally. The shipped welcome-page
   tracking preview already carries this exact RTL-zeroing shape; this family follows it.

   WHERE THIS FAMILY LIVES: the portal's own stylesheet rather than the shared component sheet, because
   this page exists only here and that sheet is loaded by the admin as well -- the same placement
   decision the profile + settings families above record.
   ============================================================ */

/* ---- the board column ---- */
/* Full content width, like every other signed-in page (15 #426 and its dated addition, 2026-10-12; supersedes the
   mockup's two-thirds column under Core Rule 13). Measured cure: every tab fits from a 932 (ar) / 989 (en) px window
   (re-measured 2026-10-16 with the row's extra inline-end pixel below; 931 / 988 before it). The
   board therefore declares no width of its own, and the rule that centred the two-thirds column went with it.
   (Corrected 2026-10-18: "every tab fits from" claims more than was measured. Those two figures are the windows at
   which the row fitted among the widths sampled on 2026-10-16, with the compact rail; at 1024px, where the labelled
   272px rail returns, the row was measured overflowing on 2026-10-18. No single width from which every tab fits is
   established; where the row does not fit it scrolls sideways inside its strip.) */

/* ---- the search bar ---- */
.shipment-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 58px;
    margin: 0 0 21px;
}

.shipment-search input {
    width: 100%;
    height: 58px;
    padding-block: 12px;
    padding-inline-start: 52px;
    /* The inline-end inset clears the Archives affordance parked inside the field.
       Dated 2026-11-07 (owner ruling 15 #1082): that label is gone, so the end inset takes the search icon's own
       start inset at each width: 21px here, 17px from 720px down. */
    padding-inline-end: 21px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--kp-white) 78%, transparent);
    color: var(--color-text);
    /* The reference's own leading, 22.5px (14px/21px on the phone tier), measured 2026-10-15 on both pages
       this family draws, both languages. */
    font: 600 15px/22.5px var(--font-body);
    outline: 0;
}

/* The reference's focus ring is its pre-rebrand blue; this is the same treatment in official navy. */
.shipment-search input:focus {
    border-color: var(--kp-navy-500);
    box-shadow: 0 0 0 3px var(--kp-navy-600-a08);
}
/* The base rule's `outline: 0` outweighed the zero-specificity family ring, so a keyboard reader saw only the
   border and the shadow; the reference draws its 2px outline at 2px offset beside both (portal group 1
   round 1, 2026-09-09). */
.shipment-search input:focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: 2px;
}

.shipment-search-icon {
    position: absolute;
    inset-inline-start: 21px;
    top: 50%;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---- the tab strip: the shipped tone family in this page's own pill shape ---- */
.shipment-filters {
    min-height: 32px;
    margin-bottom: 16px;
    gap: 8.5px;
}

/* THE FOCUS RING IS NEVER CUT BY THE SCROLLING ROW (2026-10-12). A scrolling row clips whatever passes its edge, and a
   focused tab's ring reaches 4px beyond the tab on every side (the shared tab ring: a 2px outline at a 2px offset),
   so the row keeps 4px of room inside its edge, inline and block, and gives the same 4px back outside: the tabs stay
   where the reference draws them, on a 32px line with 16px below it. The reveal helper in site.js scrolls a tab by
   the same reach. On the phone tier the tabs wrap and nothing scrolls, so the row keeps its own box there.
   Dated 2026-10-16: the inline end keeps one pixel more, inside the same box. Measured at 800px in Arabic, the
   browser's right-to-left scroll range ended 0.94px short of the row's fractional width, which cut the last tab's
   ring at the end of the scroll; the extra pixel moves no tab, it only lengthens what scrolls. */
@media (min-width: 721px) {
    .shipment-filters {
        min-height: 40px;
        padding: 4px;
        padding-inline-end: 5px;
        margin: -4px -4px 12px;
    }
}

.shipment-board .dc-status-tab {
    /* Dated 2026-11-07 (15 #1075): the height was 31.75px, which the two-line clamp below outgrew; one line still measures it. */
    height: auto;
    min-height: 31.75px;
    gap: 6.375px;
    padding: 6.375px 12.75px;
    border: 1px solid color-mix(in srgb, var(--kp-ship-tone) 25%, transparent);
    border-radius: 9999px;
    background: var(--kp-white);
    color: var(--kp-ship-tone);
    font-size: 12.75px;
    font-weight: 600;
    /* A <button> ignores the ambient leading (its UA default is `normal`), so a pill that must hit a
       measured height states its own -- portal parity lesson 8. */
    line-height: 17px;
    letter-spacing: normal;
    box-shadow: none;
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.shipment-board .dc-status-tab > span {
    display: block;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 2.125px 6.375px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--kp-slate-900) 6%, transparent);
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 10px;
}

.shipment-board .dc-status-tab.active {
    border-color: transparent;
    background: var(--kp-ship-tone);
    color: var(--kp-white);
    box-shadow: none;
}

.shipment-board .dc-status-tab.active > span {
    background: color-mix(in srgb, var(--kp-white) 25%, transparent);
    color: var(--kp-white);
}

/* The DASHBOARD strip's hover darkens the label and lifts the tab (its own reference does); this board's
   reference keeps the tab's tone ink and its place, and tints the fill and the border with the tone at the
   reference's own 5% and 45% (measured on the rendered reference; portal group 1 round 1, 2026-09-09).
   The shared rule leaked the dashboard's ink and lift onto this board. ONE block for this state: the round-1
   fix was first written as a second block above this one, and the later block silently re-declared half of it
   (portal group 1 follow-up, 2026-09-09). */
.shipment-board .dc-status-tab:not(.active):hover {
    border-color: color-mix(in srgb, var(--kp-ship-tone) 45%, transparent);
    background: color-mix(in srgb, var(--kp-ship-tone) 5%, var(--kp-white));
    color: var(--kp-ship-tone);
    transform: none;
}

/* THE PRESS IS THE REFERENCE'S OWN (2026-10-12): every pressed button there scales to .98 over .14s
   (app.bundle.css:21643-21647). The hover rule above keeps a resting tab still, and at its weight it also cancelled
   the portal's shared press, which weighs less - so a pressed tab, always hovered too under a mouse, did not move.
   This rule comes after the hover rule at the same weight, so a held press scales while a hover alone stays still. */
.shipment-board .dc-status-tab:not(.active):active {
    transform: scale(.98);
    transition-duration: .14s;
}

/* SCOPED PAST `.dc-status-tab img`, and this was measured rather than assumed. The shared component
   sheet sizes the dashboard strip's mark at 23px (16px below 1280px), and that rule is (0,1,1) against a
   bare class's (0,1,0) -- so a plain `.shipment-filter-icon` rule loses and every pill on this board came
   out ~7px wider than the reference's. Naming the element the same way the losing rule does makes it
   obvious to the next reader WHICH rule is being narrowed and why. */
.shipment-board .dc-status-tab .shipment-filter-icon {
    width: 14.875px;
    height: 14.875px;
    flex: 0 0 14.875px;
    object-fit: contain;
}

/* ---- the row's pointer arrows (15 #430, 2026-10-12) ---- */
/* The admin Branch Users strip's shape (owner ruling D23): a 28px round button at each end of the row, shown only
   while the row overflows and disabled at the end the row has reached. On the board the strip's wrapper is a flex
   row, so the scrolling row shrinks beside the arrows; the row's own margins stay its own, so each arrow is placed
   2px down from the row's top, centred on the 32px tab line. The child combinator (the wrapper is the board's
   own child) keeps this rule's text apart from the phone tier's `.shipment-board .dc-strip` rule, which a design
   pin finds by its text. */
.shipment-board > .dc-strip {
    display: flex;
    align-items: flex-start;
    gap: var(--kp-space-xs);
}

.shipment-board .dc-strip > .dc-status-tabs {
    flex: 1 1 auto;
    min-inline-size: 0;
}

.strip-scroll {
    display: none;
    place-items: center;
    flex: 0 0 auto;
    inline-size: 28px;
    block-size: 28px;
    margin-block-start: 2px;
    padding: 0;
    border: 1px solid var(--kp-slate-200);
    border-radius: var(--kp-radius-full);
    background: var(--kp-white);
    color: var(--color-portal-action);
    cursor: pointer;
}

.strip-scroll .icon { width: 14px; height: 14px; }

.shipment-board .dc-strip.is-overflowing .strip-scroll { display: grid; }

.strip-scroll:not(:disabled):hover { background: var(--kp-navy-050); }

.strip-scroll:disabled {
    opacity: .4;
    cursor: default;
}

/* ---- the row's edge cue ---- */
/* The board sits on the tinted page, where the shared white fade read as a smear (15 #190e evidence S2,
   2026-10-12). Here the row's OWN content fades at the clipped edge instead - a mask on the scroller, on
   the side that holds more tabs only. The dashboard strips sit on white panels and keep their painted fade.
   `to left` and `to right` are physical by necessity (a gradient direction has no logical keyword), so each
   has its right-to-left twin; the single-edge rules exclude each other's class, so the both-edges rule,
   written once for both directions, never loses to a right-to-left single-edge rule on weight.
   Dated 2026-11-14 (15 #190(e), #1378): the direction buttons' row takes the same cue as the status row, through the
   same rules; the board's script measures both strips. */
.shipment-board .dc-strip::before,
.shipment-board .dc-strip::after { display: none; }

.shipment-board .dc-strip.is-overflow-end:not(.is-overflow-start) .dc-status-tabs,
.shipment-board .dc-strip.is-overflow-end:not(.is-overflow-start) .dc-direction-tabs {
    mask-image: linear-gradient(to left, transparent, rgb(0 0 0) var(--kp-dc-strip-fade-width));
}

.shipment-board .dc-strip.is-overflow-start:not(.is-overflow-end) .dc-status-tabs,
.shipment-board .dc-strip.is-overflow-start:not(.is-overflow-end) .dc-direction-tabs {
    mask-image: linear-gradient(to right, transparent, rgb(0 0 0) var(--kp-dc-strip-fade-width));
}

.shipment-board .dc-strip.is-overflow-start.is-overflow-end .dc-status-tabs,
.shipment-board .dc-strip.is-overflow-start.is-overflow-end .dc-direction-tabs {
    mask-image: linear-gradient(to right, transparent, rgb(0 0 0) var(--kp-dc-strip-fade-width),
        rgb(0 0 0) calc(100% - var(--kp-dc-strip-fade-width)), transparent);
}

html[dir="rtl"] .shipment-board .dc-strip.is-overflow-end:not(.is-overflow-start) .dc-status-tabs,
html[dir="rtl"] .shipment-board .dc-strip.is-overflow-end:not(.is-overflow-start) .dc-direction-tabs {
    mask-image: linear-gradient(to right, transparent, rgb(0 0 0) var(--kp-dc-strip-fade-width));
}

html[dir="rtl"] .shipment-board .dc-strip.is-overflow-start:not(.is-overflow-end) .dc-status-tabs,
html[dir="rtl"] .shipment-board .dc-strip.is-overflow-start:not(.is-overflow-end) .dc-direction-tabs {
    mask-image: linear-gradient(to left, transparent, rgb(0 0 0) var(--kp-dc-strip-fade-width));
}

/* ---- the row region ---- */
.shipment-results { position: relative; min-height: 60px; }

/* THE ROWS' LOADING SKELETON (15 #198c, #218, 2026-10-12; it replaced the board's semi-transparent veil). The
   shared kpPortal.showGridLoading hook only MARKS the host; while a tab or a search reads, the board's script lays
   this layer over the rows it is about to replace, built from the shared skeleton classes, and takes it away when
   the answer lands. It covers the rows in place - absolute over the host, the rows' own padding and corner - so
   nothing below the board moves, and the shared skeleton's reduced-motion rule stops its shimmer. Presses pass
   through it, as they passed through the veil. */
#shipmentRows { position: relative; }

/* ONE ROW OF THE SAME SKELETON stands before Show more while a press reads (15 #1070, #1098): it adds below the rows
   rather than covering them, so it takes the layer's own inset and sits in the flow. */
.shipment-append-skeleton { padding: 14px 16px 10px; }

.shipment-rows-skeleton {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    align-content: start;
    gap: 22px;
    overflow: hidden;
    padding: 14px 16px 10px;
    border-radius: 16px;
    background: var(--color-bg-surface);
    pointer-events: none;
}

.shipment-skeleton-row {
    display: grid;
    gap: var(--kp-space-sm);
}

.shipment-skeleton-row .skeleton-text { margin-block-end: 0; }

.shipment-skeleton-row .skeleton-text + .skeleton-text { width: 55%; }

/* THE COUNTS SHIMMER WHILE THEIR TAB READS (15 #198c, #218). The shared skeleton class paints the shimmer, but the
   badge's own resting background and text colour outweigh a lone class, so this rule restates the shared gradient
   and its size at a weight above both badge rules (active and resting) and hides the digits. The badge keeps its
   box, and the motion stays the shared class's own, so its reduced-motion rule stops it.
   Dated 2026-11-14 (15 #1378): the three direction counters shimmer the same way; their chip rules (resting
   and lit) outweigh the shared class as the badge's do. */
.shipment-board .dc-status-tab > [data-role="shipment-tab-count"].skeleton,
.shipment-board .dc-direction > [data-role="shipment-direction-count"].skeleton {
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-canvas) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    color: transparent;
}

/* The veil's pulse, kept for the five veil rules that still use it (the pickup page's rows, and further down the
   notification list, the pickup slots and the delegates section's two) after the board's own veil went
   (2026-10-12). Dated 2026-10-20: the notification list's veil went the same way (it shows the board's skeleton
   now), so four veil rules use it: the pickup page's rows, the pickup slots and the delegates section's two. */
@keyframes shipment-veil {
    from { opacity: .35; }
    to { opacity: .8; }
}

.shipment-empty {
    margin: 0;
    padding: 16px 4px;
    color: var(--color-text-muted);
    font-size: 12px;
    text-align: center;
}

/* The empty line takes the reference's 16/24 type (measured 2026-10-15 on shipments.html with a search that
   matches nothing, both languages, 1440 and 390).
   Dated 2026-10-16 (Core Rule 13): the box is the reference's own paragraph too - its 1.5rem padding and 1rem
   margin below, in rem as the reference writes them, so 24px and 16px on the 16px root and 25.5px and 17px on the
   Arabic page's 17px root (measured at 1440, 1100, 800 and 390 in both languages). */
.shipment-empty {
    margin: 0 0 1rem;
    padding: 1.5rem;
    font-size: 16px;
    line-height: 24px;
}

.shipment-row {
    min-height: 144px;
    margin-bottom: 13px;
    padding: 14px 16px 10px;
    border: 1px solid color-mix(in srgb, var(--kp-white) 55%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--kp-white) 62%, transparent);
    box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--kp-slate-900) 18%, transparent), inset 0 1px color-mix(in srgb, var(--kp-white) 70%, transparent);
    transition: transform .2s ease, box-shadow .2s ease;
}

.shipment-row:hover {
    box-shadow: 0 18px 42px -12px color-mix(in srgb, var(--kp-slate-900) 23%, transparent), inset 0 1px color-mix(in srgb, var(--kp-white) 80%, transparent);
    transform: translateY(-2px);
}

.shipment-row-top {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.shipment-icon {
    width: 39px;
    height: 39px;
    object-fit: contain;
}

.shipment-copy {
    min-width: 0;
    flex: 1;
}

/* Scoped rather than declared as a bare global: `.tracking` is the reference's own class name inside this
   row and nothing else in the portal owns it.
   THE FACE AND THE SPACING ARE THIS PAGE'S REFERENCE ROW'S, measured on the rendered reference in both
   directions: Inter, 12px/800, letter-spaced .45px in English and untracked in Arabic. Until 2026-09-09 this
   rule inherited the page face (Alexandria in Arabic) and kept the dashboard ticket's `normal` spacing for
   cross-page consistency; that consistency was never an owner ruling, and the dashboard row is a different
   partial measured against a different reference row (portal group 1 round 1). The bilingual stack
   puts Inter first without a per-language rule; the Arabic side's spacing comes from the design system's
   never-track-Arabic reset, which leaves the code's own LTR span at the parent's zero.
   THE LINE AND THE COPY CONTROL ARE THE REFERENCE'S (2026-10-15, measured at 1440, 800 and 390 in both
   languages on both pages this family draws): the line's leading is 18px, and the 20px the row reads is the copy
   control's own height (the reference's 18px line plus a 1px padding above and below). This comment said 20 for
   the line until then; the line was 17px and the control 25 x 22. The reference's control is 23.5 x 20 in Arabic
   and 24 x 20 in English, the width of its icon font's glyph; ours draws an SVG mark, so the box is set to the
   Arabic width in both languages. */
.shipment-row .tracking {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    font-family: var(--font-portal-bilingual);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    letter-spacing: .45px;
}

.shipment-copy-btn {
    display: grid;
    place-items: center;
    width: 23.5px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--kp-slate-400);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.shipment-copy-btn:hover { background: var(--kp-navy-050); color: var(--kp-navy-600); }
.shipment-copy-btn .icon { width: 13px; height: 13px; }

/* No gap between the route's parts and a 900 weight on its bold words: the reference's own (gap `normal`, its
   flex default of 0, and weight 900; measured 2026-10-15 on both pages this family draws, both languages).
   Corrected 2026-10-16: the reference's route is not a flex row but running text, so its `normal` gap separates
   nothing - a word space does (2.53px in English and 2.46px in Arabic at its 10px). With no gap this row joined the
   label and its value ("Type:Local Mail"); a quarter em stands in for that space. The 900 weight stands. */
.shipment-copy .route {
    display: flex;
    align-items: center;
    gap: .25em;
    min-width: 0;
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 600;
}

.shipment-copy .route b { color: var(--color-text-muted); font-weight: 900; }

/* Each party is clamped on its own so a long name shortens ITSELF rather than pushing the arrow or the
   other party out of the row. */
.shipment-copy .route > span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sized in the row's own terms (the reference's route text is 10px) and flipped for Arabic by the shared
   directional helper, which is what lets ONE mark stand for the reference's two per-language glyphs. */
.route-arrow {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    opacity: .55;
}

/* The service chip. Its two tones are the shipped ship-tone tints -- the same vocabulary the tab strip
   and the sheet's own status pill speak, so one service never appears in two colours across the page. */
.shipment-service {
    display: inline-flex;
    align-items: center;
    gap: 4.25px;
    flex: 0 0 auto;
    padding: 2.125px 6.375px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16.25px;
    letter-spacing: normal;
}

.shipment-service.warn {
    background: var(--portal-ship-gold-tint);
    color: var(--kp-gold-500);
    box-shadow: 0 0 0 1px var(--kp-gold-500-a12);
}

.shipment-service.blue {
    background: var(--kp-navy-600-a06);
    color: var(--kp-navy-600);
    box-shadow: 0 0 0 1px var(--kp-navy-600-a08);
}

.shipment-service-icon { width: 12.75px; height: 12.75px; flex: 0 0 12.75px; }

/* ---- the six-step chain ---- */
.shipment-steps {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    margin: 11px 0 8px;
    /* The chain's inline padding and one step's column, which the rail and the fill below are measured in (dated
       2026-11-15, owner ruling 15 #1419). */
    --shipment-steps-pad: 2px;
    --shipment-steps-column: calc((100% - 2 * var(--shipment-steps-pad)) / 6);
    padding: 0 var(--shipment-steps-pad);
    gap: 0;
    border: 0;
    background: transparent;
    color: inherit;
    /* A <button> takes the UA's OWN font and leading, not the page's -- measured at 13.333px against the
       reference's inherited 16px. Every child here states its own size, so nothing visible moved; the
       declaration is here so the next reader is not measuring a UA default and wondering (lesson 8). The
       chain's leading is the reference's 1.5 (24px at its inherited 16px, measured 2026-10-15); each step
       below keeps its own 1.25, which equals the reference's. */
    font: inherit;
    line-height: 1.5;
    cursor: pointer;
}

.shipment-steps::before,
.shipment-steps::after {
    content: "";
    position: absolute;
    top: 8px;
    z-index: 0;
    height: 2px;
    border-radius: 999px;
    pointer-events: none;
}

/* The rail is inset by half a step on each side so it runs dot-to-dot rather than edge-to-edge; the
   fill starts at the same inline-start inset, which is what makes it mirror correctly in Arabic.
   Dated 2026-11-15 (owner ruling 15 #1419(a) and (b)): the half step and each rung of the fill are measured in the dots'
   own row - the chain's width less its inline padding - rather than in the whole chain, whose percentages put the rail's
   ends and the fill's end up to 1.7px off the dots' centres (measured in the browser at 390 and 1440). */
.shipment-steps::before {
    inset-inline: calc(var(--shipment-steps-pad) + var(--shipment-steps-column) / 2);
    background: color-mix(in srgb, var(--kp-slate-200) 70%, transparent);
}

.shipment-steps::after {
    inset-inline-start: calc(var(--shipment-steps-pad) + var(--shipment-steps-column) / 2);
    width: 0;
    background: color-mix(in srgb, var(--kp-slate-900) 70%, transparent);
    transition: width .5s cubic-bezier(.16, 1, .3, 1);
}

.shipment-steps[data-current="2"]::after { width: var(--shipment-steps-column); }
.shipment-steps[data-current="3"]::after { width: calc(2 * var(--shipment-steps-column)); }
.shipment-steps[data-current="4"]::after { width: calc(3 * var(--shipment-steps-column)); }
.shipment-steps[data-current="5"]::after { width: calc(4 * var(--shipment-steps-column)); }
.shipment-steps[data-current="6"]::after { width: calc(5 * var(--shipment-steps-column)); }

/* THE FIVE-STEP CHAIN local mail draws (owner ruling 15 #874(b)): no customs rung, so each step is a fifth of the row. The
   six-step rules' own formula at five: the rail is inset by half a step (10%) and the fill grows a fifth per step, so it
   still runs dot to dot and mirrors in Arabic.
   Dated 2026-11-15 (15 #1419): the column is a fifth of the dots' row, and the rules above draw the rail and the fill. */
.shipment-steps[data-steps="5"] { --shipment-steps-column: calc((100% - 2 * var(--shipment-steps-pad)) / 5); }

/* The family's solid navy ring: 15 #190b keeps the soft tone rings on the status tabs ALONE and says every
   other control wears the solid ring, and a .22-alpha navy over the card read at about 1.5:1 (portal group 1
   round 1, 2026-09-09). The reference's own offset and radius stay. */
.shipment-steps:focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: 4px;
    border-radius: 5px;
}

/* THE SHARED SPINNER RING AND THIS CHAIN'S CONNECTOR RAIL ARE THE SAME PSEUDO-ELEMENT, and this pair of
   rules settles it (measured in a browser 2026-08-14, branch-end review finding FE-3).
   The whole progress chain IS the button on a board row, and the script raises the house loading state on
   whichever trigger was pressed -- so on this one, the shared `.btn-loading::before` (a 16px spinner ring)
   and `.shipment-steps::before` (the rail above) both target ::before on ONE element. Both weigh (0,1,1),
   so the cascade resolves them property by property in source order, and this file is linked after the
   shared one. What that produced was neither rule but a MERGE of the two, measured rather than reasoned
   about: the rail kept its height, its background and its position, and took the ring's `width: 16px`, its
   2px border and its spin -- collapsing a 1067px connector line into a 16x4px rotating nub while the
   coloured fill beside it stayed 427px wide. A chain that looks broken is a worse answer to a press than
   no answer at all.
   This rule weighs (0,2,1) and wins outright, so the rail stays a rail; only the three properties the ring
   actually contributed need naming (the rest it declares either lost to this file already or is inert on an
   absolutely positioned box). `width: auto` hands the sizing back to the two insets.
   NO ANIMATION IS RE-INTRODUCED HERE, deliberately: the portal's reduced-motion cover zeroes transition
   durations only, so a keyframe animation declared at this weight would out-rank the shared stylesheet's
   own `animation: none` arm and keep moving for a viewer who asked for stillness. */
.shipment-steps.btn-loading::before {
    width: auto;
    border: 0;
    animation: none;
}

/* THE IN-FLIGHT SIGNAL, moved onto the button itself where nothing is competing for it: the whole chain
   dims while the tracking sheet is fetched. The shared lock already sets the button's `disabled` attribute,
   which is what refuses a second press, so this is the visible half of a lock that already exists rather than
   a new mechanism -- and it is a static
   end state, not motion, which is what keeps it honest under reduced motion. The row's OTHER trigger for
   the same action (.shipment-track) is an ordinary text button whose ::before is free, so it keeps the
   house ring. */
.shipment-steps.btn-loading {
    opacity: .55;
}

/* AND THE SPINNER BESIDE THAT LOCK (2026-10-12; ruling 15 #198c asks for the pressed control's lock WITH its
   spinner). The rules above keep the house ring off the chain because both of the chain's own pseudo-elements
   are taken -- ::before is the rail, ::after the fill -- so the ring is drawn by the CURRENT step's dot, the
   step data-current names (ShipmentTimeline.Step maps a chain's status to one of its six steps, and the row
   partials mark that one step current). It is the house ring's treatment (a 40% track of the current colour
   with a solid head, the shared kp-btn-spin turn) laid on the 2px band the current dot's halo paints: inset
   -4px from the dot's padding box passes its 2px border and that 2px band, so the ring's own 2px edge lies on
   the band. It is absolutely positioned inside the dot, so the steps, the rail and the fill keep their
   geometry, and it dims with the rest of the chain. Its own reduced-motion arm is in the family's block further
   down: the shared stylesheet's arm stops only the house ring on `.btn-loading::before`, which this ring is not.
   Dated 2026-11-13 (ruling 15 #1363): a Delivered chain has no current step (every step is done), so the ring is drawn on
   its last done step, by the second selector, which matches only a chain with no current step. */
.shipment-steps.btn-loading .shipment-step.current b::after,
.shipment-steps.btn-loading:not(:has(.shipment-step.current)) .shipment-step.done:last-child b::after {
    content: "";
    position: absolute;
    inset: -4px;
    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;
    pointer-events: none;
}

.shipment-step {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: center;
    color: color-mix(in srgb, var(--kp-slate-500) 70%, transparent);
    font-size: 8px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
}

/* TOKEN NAMES ARE THE DESIGN SYSTEM'S, NEVER THE DESIGN REFERENCE'S (corrected 2026-08-14, branch-end
   review finding FE-1). Eight declarations in this shipments family were written against
   `--color-surface` and `--color-primary` — names the reference package declares and our own token
   layer does not. An undefined custom property with no fallback makes the WHOLE declaration invalid at
   computed-value time, so those backgrounds fell to transparent and that hover colour did nothing; the
   tracking dialog's own panel was one of them. Our equivalents are `--color-bg-surface` (= --kp-white)
   and `--color-action-primary` (= --kp-navy-600 = the reference's own #0033a0, so the paint is
   unchanged) — mapped by name under the palette clause, never by copying the package's raw hex. A
   governance sweep now fails any `var()` in a shipped stylesheet that has neither a definition nor a
   fallback. */
.shipment-step b {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg-surface);
    transition: background-color .3s, border-color .3s, box-shadow .3s;
}

.shipment-step b .icon { width: 11px; height: 11px; color: var(--kp-white); }

/* Dated 2026-11-01 (owner ruling 15 #916): the step words are the Admin's status names now and are longer, and at 390
   "At Arrival Branch" measured 71 px in a 64 px step (cut by the old one-line ellipsis), so the word wraps to at most two
   lines instead; the row grows by that line only where a word wraps, and font, dot and spacing are unchanged. */
.shipment-step em {
    display: -webkit-box;
    width: 100%;
    margin-top: 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    padding-inline: 2px;
    font-style: normal;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Dated 2026-11-07 (15 #1075): a tab's word is the Admin's status name, so a long one reached past the window at 360 px. It
   takes the step word's two-line clamp, capped so the tab's own max-content width stops growing with it; a name that fits
   the cap keeps its one line and its pill height. A <em>, because every <span> in a tab is its count chip. */
.dc-status-tab em {
    display: -webkit-box;
    max-width: 24ch;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-style: normal;
    white-space: normal;
    overflow-wrap: anywhere;
}

.shipment-step.done { color: color-mix(in srgb, var(--kp-slate-900) 80%, transparent); font-weight: 600; }
.shipment-step.current { color: var(--color-text); font-weight: 700; }

/* Dated 2026-11-07 (owner ruling 15 #1074, which supersedes the reference's app-pages.css:409, where these fills are
   see-through): the rail ran on inside the dots and their halo, so both mix with white instead of with nothing. The
   tone stays within three levels a channel of what the see-through fill painted on this surface, which takes the halo
   from 15% to 17%; only the rail stops showing. */
.shipment-step.done b,
.shipment-step.current b { border-color: transparent; background: color-mix(in srgb, var(--kp-slate-900) 70%, var(--kp-white)); }

.shipment-step.current b { box-shadow: 0 0 0 2px color-mix(in srgb, var(--kp-slate-900) 17%, var(--kp-white)); }

/* The pip rides INSIDE the filled dark dot, so it is ink on a dark disc rather than a page surface: it
   takes the same `--kp-white` its two siblings in this file take for the identical shape — the dot's own
   glyph at `.shipment-step b .icon` and the sheet's `.ds-stage-step.current > i b`. */
.shipment-step.current b i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--kp-white);
    animation: shipment-current-pulse 1.35s ease-in-out infinite;
}

@keyframes shipment-current-pulse {
    50% { opacity: .42; }
}

/* Returned and Cancelled have no rung on the chain, so their status stands in its place. It takes the
   chain's own vertical space so a row of either kind keeps the board's rhythm. */
.shipment-exception {
    margin: 11px 0 8px;
    padding: 6px 0;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* ---- the row's footer ---- */
.shipment-bottom {
    display: flex;
    justify-content: flex-end;
    padding-top: 7px;
    border-top: 1px solid var(--color-border);
}

.shipment-track {
    display: inline-flex;
    align-items: center;
    gap: 4.25px;
    padding: 1px 6px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    /* Stated in px, not as a multiplier: the reference's footer measures 25px and its button 17 (a 15px
       content box inside 1px of padding), which a 1.7 multiplier overshoots by 2px on every row. */
    line-height: 15px;
}

.shipment-track:hover { color: var(--color-action-primary); }
.shipment-track .icon { width: 13px; height: 13px; }

/* ============================================================
   TRACKING SHEET (the ds-modal family)
   ============================================================ */
body.ds-locked { overflow: hidden; }

.ds-modal {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: transparent;
}

.ds-modal.show { display: flex; }

.ds-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--kp-slate-900) 40%, transparent);
    backdrop-filter: blur(4px);
}

/* THE SCRIM'S KEYBOARD RING IS DRAWN INSIDE ITS EDGE (browser check 2026-11-14, finding N1). The scrim is a real
   close button and a stop of the dialog's trapped keyboard cycle, and it fills the window, so the portal's ring
   (components.css, 2px at offset 2px OUTSIDE the box) was drawn wholly off-screen: on that stop no focus showed
   anywhere, while Enter there closes the dialog. Focus is a state every control is checked in (15 #198c/#218). Only
   the offset changes: the colour, width and style stay the portal ring's, and the offset of -4px lays the 2px ring
   from 2px to 4px inside the edge, keeping the house 2px gap on the inward side. One rule for every .ds-scrim host
   (the tracking sheet on the board and on Home, and the pickup details modal). */
.ds-scrim:focus-visible {
    outline-offset: -4px;
}

.ds-sheet {
    position: relative;
    display: flex;
    width: min(720px, calc(100vw - 64px));
    max-height: 82vh;
    flex-direction: column;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-bg-surface);
    box-shadow: 0 24px 70px color-mix(in srgb, var(--kp-slate-900) 26%, transparent);
    color: var(--color-text);
    animation: ds-fade .2s ease-out;
}

@keyframes ds-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.ds-sheet > header {
    position: sticky;
    z-index: 3;
    top: 0;
    display: grid;
    min-height: 80px;
    grid-template-columns: minmax(0, 1fr) auto 30px;
    gap: 16px;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 13px 13px 0 0;
    background: var(--color-bg-surface);
}

.ds-handle { display: none; }

.ds-title { display: grid; gap: 3px; min-width: 0; }

.ds-title > p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ds-title > div { display: flex; align-items: center; gap: 9px; }

.ds-title > div > b {
    overflow: hidden;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .07em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The reference forces the tracking pair to read left-to-right inside its Arabic sheet, because the
   code and its copy control are one LTR unit. */
html[dir="rtl"] .ds-title > div { direction: ltr; justify-content: flex-end; }

.ds-title > div > button,
.ds-close {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
}

.ds-title > div > button { width: 25px; height: 25px; border-radius: 7px; }
.ds-title > div > button .icon { width: 12px; height: 12px; }

.ds-title > div > button:hover,
.ds-close:hover { background: var(--kp-navy-050); color: var(--kp-navy-600); }

.ds-close { width: 30px; height: 30px; border-radius: 8px; }
.ds-close .icon { width: 15px; height: 15px; }

/* The pill takes the SAME four tones the tab strip does, so the sheet and the tab a reader opened it
   from can never name one status in two colours. */
.ds-status {
    --kp-ship-tone: var(--portal-ship-navy);
    --kp-ship-tone-tint: var(--portal-ship-navy-tint);
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 11px;
    border-radius: 99px;
    background: var(--kp-ship-tone-tint);
    color: var(--kp-ship-tone);
    font-size: 10px;
    font-weight: 800;
}

.ds-status-pickup { --kp-ship-tone: var(--portal-ship-gold); --kp-ship-tone-tint: var(--portal-ship-gold-tint); }
.ds-status-transit { --kp-ship-tone: var(--portal-ship-violet); --kp-ship-tone-tint: var(--portal-ship-violet-tint); }
.ds-status-delivered { --kp-ship-tone: var(--portal-ship-green); --kp-ship-tone-tint: var(--portal-ship-green-tint); }

.ds-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.ds-body { display: flex; flex-direction: column; padding: 22px; }

.ds-tags { display: flex; align-items: center; gap: 7px; }

.ds-service-tag,
.ds-direction-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ds-service-tag .icon,
.ds-direction-tag .icon { width: 11px; height: 11px; }

.ds-service-tag.vbx { background: var(--portal-ship-gold-tint); color: var(--kp-gold-500); }
.ds-service-tag.pobox { background: var(--kp-navy-600-a08); color: var(--kp-navy-600); }
.ds-direction-tag { background: var(--kp-navy-050); color: var(--kp-navy-600); }

/* ---- the stage track ---- */
.ds-stage { margin-top: 20px; }

.ds-stage h3 {
    margin: 0 0 12px;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ds-stage-scroll { overflow-x: auto; padding: 0 2px 8px; }

/* THE CURRENT RING IS DRAWN WHOLE (dated 2026-11-15, owner ruling 15 #1419(c)): a box that scrolls sideways clips at its
   own edges, and the current dot's 2px ring (and a done dot's 3px halo) reached above this box, so its top was cut. The
   box keeps room above the dots, and takes the same room back from the space above it, so the strip stays where it was
   under its heading (the two margins meet: the heading's end margin less 4px, then the 4px room). */
.ds-stage-scroll {
    margin-block-start: calc(-1 * var(--kp-space-xs));
    padding-block-start: var(--kp-space-xs);
}

/* A scrolling region is a REAL TAB STOP even with no tabindex on it: browsers make an overflowing box
   keyboard-reachable so the keyboard can scroll it, and this one is a stop on every open item sheet. With
   no rule of its own it painted the browser's own thin dark ring while every sibling control on the sheet
   wore the family's solid navy one (15 #190b: the soft tone rings are the status tabs' alone, every other
   control takes the solid ring). The offset is INSET because the region spans the sheet's full width, so
   an outward ring would sit under the neighbouring chrome instead of around the thing that has focus. */
.ds-stage-scroll:focus-visible {
    outline: 2px solid var(--color-portal-action);
    outline-offset: -2px;
    border-radius: 5px;
}

.ds-stage-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(70px, 1fr));
}

.ds-stage-track::before,
.ds-stage-track::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 10px;
    inset-inline-start: 0;
    height: 2px;
    border-radius: 2px;
}

/* THE RAIL RUNS DOT TO DOT (dated 2026-11-15, owner ruling 15 #1419(a), superseding the reference's edge-to-edge rail):
   each dot sits in the middle of an equal column, so the rail is inset by half a column on each side (a twelfth of the
   strip at six steps, a tenth at five, below). */
.ds-stage-track::before { inset-inline: 8.333333%; background: var(--color-border); }

/* The fill's width is the reference's own ((step - 1) / 5) formula, expressed as one rule per rung so
   no inline style is ever written: the server states the rung on a data attribute and the stylesheet
   does the arithmetic.
   Dated 2026-11-15 (owner ruling 15 #1419(b), superseding that formula): the fill starts on the first dot's centre and
   grows one column per rung, (rung / steps) of the strip, so it ends on the current dot's centre at every rung - the
   board chain's own arithmetic (.shipment-steps). */
.ds-stage-track::after { inset-inline-start: 8.333333%; width: 0; background: var(--kp-navy-600); }
.ds-stage-track[data-progress="1"]::after { width: 16.666667%; }
.ds-stage-track[data-progress="2"]::after { width: 33.333333%; }
.ds-stage-track[data-progress="3"]::after { width: 50%; }
.ds-stage-track[data-progress="4"]::after { width: 66.666667%; }
.ds-stage-track[data-progress="5"]::after { width: 83.333333%; }

/* The sheet's strip for local mail (owner ruling 15 #874(b)): five columns, and the reference's ((step - 1) / (steps - 1))
   fill at five steps.
   Dated 2026-11-15 (15 #1419): half a column is a tenth of the strip and the fill grows a fifth per rung. */
.ds-stage-track[data-steps="5"] { grid-template-columns: repeat(5, minmax(70px, 1fr)); }
.ds-stage-track[data-steps="5"]::before { inset-inline: 10%; }
.ds-stage-track[data-steps="5"]::after { inset-inline-start: 10%; }
.ds-stage-track[data-steps="5"][data-progress="1"]::after { width: 20%; }
.ds-stage-track[data-steps="5"][data-progress="2"]::after { width: 40%; }
.ds-stage-track[data-steps="5"][data-progress="3"]::after { width: 60%; }
.ds-stage-track[data-steps="5"][data-progress="4"]::after { width: 80%; }

.ds-stage-step {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--color-text-muted);
}

.ds-stage-step > i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg-surface);
    color: var(--kp-white);
    font-style: normal;
}

.ds-stage-step > i .icon { width: 12px; height: 12px; }
.ds-stage-step > strong { font-size: 9px; font-weight: 600; }
.ds-stage-step.done,
.ds-stage-step.current { color: var(--color-text); }

/* THE DONE DOT'S HALO IS OPAQUE (dated 2026-11-07, owner ruling 15 #1074: the line must not show inside the circles
   wherever the bar is drawn). The halo was navy at 8% (var(--kp-navy-600-a08)), so the rail showed through its ring on
   every done dot of the sheet; it is now the same tone mixed onto the sheet's own surface, which looks the same on white
   and hides the rail, the shape the board's dots took for the same ruling. */
.ds-stage-step.done > i {
    border-color: var(--kp-navy-600);
    background: var(--kp-navy-600);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kp-navy-600) 8%, var(--color-bg-surface));
}

.ds-stage-step.current > i {
    border: 5px solid var(--kp-navy-050);
    background: var(--kp-navy-600);
    box-shadow: 0 0 0 2px var(--kp-navy-600);
}

.ds-stage-step.current > i b { width: 5px; height: 5px; border-radius: 50%; background: var(--kp-white); }
.ds-stage-step.done > strong,
.ds-stage-step.current > strong { font-weight: 800; }

/* ---- the field cards ---- */
.ds-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.ds-field {
    display: grid;
    gap: 6px;
    min-height: 65px;
    padding: 11px 13px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-bg-surface);
}

.ds-field small {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--color-text-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ds-field small .icon { width: 12px; height: 12px; }
.ds-field > b { color: var(--color-text); font-size: 13px; font-weight: 800; }

/* THE COLLECTOR CARD (owner ruling 15 #873, the approved design): the name with its role tag as a pill beside it, and the
   release time and branch beneath in the muted meta size. The pill's wash is the navy-050 token; the design file's own
   wash is not a palette colour (Core Rule 13). Dated 2026-10-31: the row and the name may shrink and the name breaks anywhere,
   so a long unbroken name (up to 200 characters) wraps inside the sheet instead of widening the field grid past it. */
.ds-collector-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0; }
.ds-collector-who > b { min-inline-size: 0; color: var(--color-text); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.ds-collector-tag {
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--kp-navy-050);
    color: var(--kp-navy-600);
    font-size: 10px;
    font-weight: 800;
}
.ds-collector-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; color: var(--color-text-muted); font-size: 11px; }
/* THE COLLECTOR'S CIVIL ID (dated 2026-11-13, owner rulings 15 #1371, #1375(c); board PortalCollectedBy, cases b and c): its own
   line under the name, the ID-card icon at its inline start, 11px at weight 600 in the gray-700 ink the board draws. */
.ds-collector-civil-id { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--kp-gray-700); font-size: 11px; font-weight: 600; }
.ds-collector-civil-id .icon { width: 12px; height: 12px; flex: 0 0 auto; }

/* ---- the recorded history list (drawn only when rows exist) ---- */
.ds-timeline { margin-top: 20px; }

.ds-timeline h3 {
    margin: 0 0 12px;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ds-step {
    position: relative;
    display: flex;
    gap: 10px;
    min-height: 46px;
}

.ds-step > i {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin-top: 3px;
    border: 3px solid var(--kp-navy-600);
    border-radius: 50%;
    background: var(--color-bg-surface);
}

.ds-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: -1px;
    inset-inline-start: 6px;
    width: 1px;
    background: var(--color-border);
}

.ds-step > div b { display: block; font-size: 13px; }

.ds-step > div p {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 2px 0 0;
    color: var(--color-text-muted);
    font-size: 10px;
}

.ds-step-time { font-family: var(--font-mono); }

/* ---- Arabic never takes letter-spacing (house law; the reference spaces its Arabic labels) ---- */
html[dir="rtl"] .shipment-track,
html[dir="rtl"] .shipment-row .tracking,
html[dir="rtl"] .ds-title > p,
html[dir="rtl"] .ds-service-tag,
html[dir="rtl"] .ds-direction-tag,
html[dir="rtl"] .ds-stage h3,
html[dir="rtl"] .ds-timeline h3,
html[dir="rtl"] .ds-field small { letter-spacing: normal; }

/* The tracking CODE itself stays spaced in both languages: it is Latin text inside its own LTR run, so
   the joining rule the exception above exists for does not apply to it. */
html[dir="rtl"] .ds-title > div > b { letter-spacing: .07em; }

/* ---- 720px: the tab strip wraps 2-up, the row tightens, the sheet becomes a bottom sheet ---- */
@media (max-width: 720px) {
    .shipment-search { height: 56px; margin: 3px 0 22px; }
    .shipment-search input { height: 56px; padding-inline-end: 17px; font-size: 14px; line-height: 21px; }
    .shipment-search-icon { inset-inline-start: 17px; width: 17px; height: 17px; }

    /* The strip wraps here and the reference gives it no gutter of its own: the 17px came from the dashboard
       strip rule it shares, and its wrapper's edge bleed belongs to the dashboard too (portal group 1 round 1,
       2026-09-09). The chips widen by the gutter they lose. */
    .shipment-board .dc-strip { margin-inline: 0; }
    /* Dated 2026-11-14 (15 #1385, the approved design board): with that bleed cancelled, the phone gutter the shared
       direction row carries below 576px (written for Home, whose strip bleeds out by it) would set the first direction
       button one gutter in from the status tabs above it. On the board the row keeps only the house ring room, the 4px
       given back by an equal negative margin, as it does above the phone tier. */
    .shipment-board .dc-strip--direction > .dc-direction-tabs { padding-inline: 4px; margin-inline: -4px; }
    /* The wrapped tabs never overflow, so the arrows stay hidden here whatever the measurement last said. */
    .shipment-board .dc-strip.is-overflowing .strip-scroll { display: none; }
    .shipment-filters {
        flex-wrap: wrap;
        justify-content: center;
        padding-inline: 0;
        overflow: visible;
        gap: 5px 7px;
        margin-bottom: 17px;
    }

    .shipment-board .dc-status-tab {
        flex: 0 0 calc(50% - 4px);
        justify-content: center;
        /* Dated 2026-11-07 (15 #1075): the height was 34px, which the two-line clamp outgrew; one line still measures it. */
        height: auto;
        min-height: 34px;
    }

    /* The dashboard strip's English phone rule (`html[dir="ltr"] .dc-status-tab`, padding-inline 11px, in the shared
       component sheet) outweighs this pill's own padding; the reference keeps 12.75px in both languages here
       (measured 2026-10-16 at 640 and 390). */
    html[dir="ltr"] .shipment-board .dc-status-tab { padding-inline: 12.75px; }

    .shipment-row { min-height: 142px; padding: 13px 14px 9px; }

    /* The reference clamps this line to two lines on a phone so a long value cannot push the chain down.
       OURS NEEDS ONLY THE LEADING, and the reason is structural: the reference's route is one text node,
       while this one is a flex row whose two party spans each ellipsize themselves, so nothing can
       overflow at any width and there is no second line to clamp. Re-declaring the reference's
       `-webkit-box` here would also have replaced that flex row's display and broken the arrow's
       alignment -- the clamp was carried over verbatim while the line was still plain text, and removing
       it is part of the same change that gave the line its two parties. */
    .shipment-copy .route { line-height: 1.55; }

    .shipment-steps { margin: 9px 0 6px; }

    /* 15 #191a: the fixed bottom bar sits at the screen edge above every overlay, so a bottom sheet that ends at the
       viewport edge loses its last bar-height behind it (the assistant sheet had the same defect, dashboard round 4;
       the tracking sheet was swept in the portal group 1 round 2, 2026-09-09). The modal pads its block end by
       the bar's own height token plus the safe area and the sheet subtracts the same, so its bottom edge rests on the
       bar's top and its top stays at the reference's 70px. */
    .ds-modal { align-items: flex-end; padding: 0; padding-block-end: calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom)); }

    .ds-sheet {
        width: 100%;
        height: calc(100dvh - 70px - var(--kp-portal-mobile-nav-height) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 70px - var(--kp-portal-mobile-nav-height) - env(safe-area-inset-bottom));
        border-width: 1px 0 0;
        border-radius: 16px 16px 0 0;
    }

    .ds-sheet > header {
        min-height: 112px;
        grid-template-columns: minmax(0, 1fr) auto 34px;
        gap: 10px;
        padding: 12px 18px 18px;
        border-radius: 16px 16px 0 0;
    }

    .ds-handle {
        display: block;
        grid-column: 1 / -1;
        justify-self: center;
        width: 40px;
        height: 4px;
        margin-bottom: 3px;
        border-radius: 99px;
        background: var(--color-border);
    }

    .ds-title { gap: 5px; }
    .ds-title > div { gap: 7px; }
    .ds-title > div > b { font-size: 17px; }
    .ds-title > div > button { width: 26px; height: 26px; }
    .ds-title > div > button .icon { width: 13px; height: 13px; }
    .ds-status { padding: 7px 10px; }
    .ds-close { width: 32px; height: 32px; }
    .ds-close .icon { width: 16px; height: 16px; }
    .ds-body { padding: 20px 16px 24px; }
    /* The two gaps restated below are the reference's own BASE values, which re-apply under 721px
       because the desktop layer that narrows them (to 5px here and 7px on the field label) stops at that
       edge. Measured at 390 rather than inherited from the desktop block -- exactly the middle/edge-band
       hole the 2026-08-12 lesson is about. */
    .ds-service-tag,
    .ds-direction-tag { gap: 7px; padding: 5px 9px; font-size: 10px; }
    .ds-stage { margin-top: 25px; }
    .ds-stage h3,
    .ds-timeline h3 { margin-bottom: 14px; font-size: 11px; }
    .ds-stage-scroll { margin-inline: -16px; padding-inline: 16px; }
    .ds-stage-track { min-width: 570px; }
    /* Five steps keep the six-step strip's per-step width (570 / 6). */
    .ds-stage-track[data-steps="5"] { min-width: 475px; }
    .ds-stage-track::before,
    .ds-stage-track::after { top: 13px; }
    .ds-stage-step { gap: 9px; }
    /* THE DOTS KEEP THE REFERENCE'S PHONE BORDERS (dated 2026-11-15, owner ruling 15 #1419: everything of the strip
       outside its three points stays as the reference draws it). The reference's 720px-and-below block sets only the
       28px size, so its base borders draw here - 3px on a todo and a done dot, 7px on the current dot with a 7px mark -
       while 2px, 5px and 5px live only in its 721px-and-up block (docs/reference/subscribersPortal-KuwaitMail,
       css/app.bundle.css, the .ds-stage-step rules). Our base rules above carry those desktop values, so this tier
       restates the reference's base ones. The dot boxes keep their size, so the rail, the fill and the ring stay put. */
    .ds-stage-step > i { width: 28px; height: 28px; border-width: 3px; }
    .ds-stage-step.current > i { border-width: 7px; }
    .ds-stage-step.current > i b { width: 7px; height: 7px; }
    .ds-stage-step > i .icon { width: 14px; height: 14px; }
    .ds-stage-step > strong { font-size: 10px; }
    .ds-fields { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
    .ds-field { gap: 10px; min-height: 86px; padding: 15px; border-radius: 13px; }
    .ds-field small { gap: 10px; font-size: 10px; }
    .ds-field > b { font-size: 16px; }
    /* The collector's name reads at the size of the other field values in this band. */
    .ds-collector-who > b { font-size: 16px; }
}

/* ---- 390px: the sheet's narrow inset ---- */
@media (max-width: 390px) {
    .ds-sheet > header { grid-template-columns: minmax(0, 1fr) auto 30px; padding-inline: 14px; }
    .ds-title > div > b { font-size: 15px; }
    .ds-status { padding-inline: 8px; }
    .ds-body { padding-inline: 14px; }
    .ds-stage-scroll { margin-inline: -14px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .shipment-row,
    .shipment-steps::after,
    .shipment-step b,
    .shipment-board .dc-status-tab { transition: none; }

    .shipment-step.current b i,
    .shipment-steps.btn-loading .shipment-step.current b::after,
    .shipment-steps.btn-loading:not(:has(.shipment-step.current)) .shipment-step.done:last-child b::after { animation: none; }

    .ds-sheet { animation: none; }
}

/* ============================================================
   SCHEDULE PICKUP (/Pickup/Ready, owner ruling 15 #421, 2026-10-11)
   ============================================================
   The page is a copy of the shipments board, so the whole family above paints it; what follows is only
   what the copy changes, scoped to this page so the board itself is unchanged.

   THE SEARCH FIELD LOSES THE ARCHIVES RESERVATION: the board's inline-end padding clears the Archives
   affordance parked inside its field, and this page does not carry that affordance. The end inset takes the
   search icon's own start inset at each width (21px, and 17px from 720px down), so the field's end padding
   equals the icon's start inset. The two text insets are NOT equal: the start inset stays the board's 52px,
   which clears the icon, so the text sits 52px from the start edge and 21px (17px) from the end edge.
   Dated 2026-11-07 (owner ruling 15 #1082): the board lost that affordance too and took these same insets, so
   this page's two overrides are gone and it inherits the board's rule.

   THE LOADING VEIL is the board's former one, keyed to this page's row host: the shared loading hook only
   marks the host, and each page's rule names its own host id. Dated 2026-10-12 (15 #198c, #218): the board
   itself now lays a skeleton over its rows while a tab reads; this page has no tabs (15 #421) and keeps the
   veil over its rows, with the shared veil keyframes.

   THE BOOKED MARK sits at the start of the row's footer, opposite the row's button: the bookings page's own
   chip, then the booking's date and period in the row's meta type (the route line's size, weight and tone).
   It wraps under itself on a narrow row rather than pushing the button out. */
/* Dated 2026-11-16 (15 #198c, 15 #1436): My bookings' rows host takes this same veil, so the read-back after a
   cancel shows its loading state like every other fetching region; the shared hook only marks the host, so the
   host id is named here beside this page's. */
#pickupReadyRows, #pickupMineRows { position: relative; }

#pickupReadyRows.grid-loading-host::after,
#pickupMineRows.grid-loading-host::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 16px;
    background: color-mix(in srgb, var(--kp-white) 55%, transparent);
    animation: shipment-veil .9s ease-in-out infinite alternate;
    pointer-events: none;
}

.shipment-booked {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-xs) var(--kp-space-sm);
    min-inline-size: 0;
    margin: 0;
    margin-inline-end: auto;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 600;
}

.shipment-booked b { font-weight: 700; }

/* THE BOOKED ROW'S BUTTON KEEPS THE FAMILY'S OWN BOX (2026-10-12). The row's button reads Reschedule on a booked
   row and Book a pickup time on a free one (Pickup.Modal.Reschedule and Pickup.Sheet.Book, 2026-10-14). The footer
   is a flex row whose default alignment stretches each item to the tallest one, so beside a booked mark that
   wraps to two lines on a narrow row the button took the mark's height and its label sat between the mark's two
   lines (measured in a browser at 390 and 360px on 2026-10-12). This page's footers align their items on their
   first baseline instead: the button is not stretched, and it is placed by the mark's first line, the chip's. A
   footer holding the button alone places it as before.
   THE PRESS DOES NOT MOVE A BOOKED ROW. The house ring enters a button's flow beside its label, which widens
   the button by the ring and its gap; on a booked row the mark lost that room and wrapped again for the length of
   the request, and the footer grew with it. There the ring is taken out of the flow and stands in the arrow's
   place -- the house's own treatment for a button with no caption to sit beside (.btn-loading--icon in the shared
   stylesheet) -- and the hidden arrow keeps its box, so what the button holds in its flow is the same pressed as
   idle, and so is the room the mark wraps in. The ring's turn and its reduced-motion arm stay the shared ones:
   no animation is declared here.
   THE BUTTON'S LABEL STAYS ON ONE LINE (2026-10-14, the pickup page's third browser round). The Arabic booked
   label is two words, and with the family's shrink it broke between them at 390 and 360px. The label keeps one
   line on every row of this page; the booked mark keeps its own shrink (min-inline-size: 0 above) and its own
   wrapping, so its items move onto a further line instead and none of its text is cut or clipped.
   Every rule names this page's row host, so the board's footer and its button are unchanged. */
#pickupReadyRows .shipment-bottom { align-items: baseline; }

#pickupReadyRows .shipment-track { white-space: nowrap; }

/* THE DESTINATION KEEPS ITS WORDS BESIDE A LONG SENDER (dated 2026-11-07, the first browser round's finding 1, the
   long-values rule): with both parties shrinking alike, a 104-character sender squeezed the destination to two letters
   and an ellipsis at 360 to 768px, so the row no longer said where the shipment goes. The destination does not shrink
   below its own words, up to half the line, and the sender takes the rest, cut at its end (each party isolates its own
   direction in the row's markup). A row whose parties fit is drawn as before. */
#pickupReadyRows .shipment-copy .route > span:last-child {
    flex-shrink: 0;
    max-inline-size: 50%;
}

/* The same rule on the board's rows and the Home list's rows (dated 2026-11-07, the same finding's follow-up, measured on
   both before this rule: a 105-character sender left the destination 16 to 67px wide below 1440, and on Home even at 1440
   in Arabic). Each host is named, so no other route line changes. */
#shipmentRows .shipment-copy .route > span:last-child,
#dashboardShipments .shipment-copy .route > span:last-child {
    flex-shrink: 0;
    max-inline-size: 50%;
}

#pickupReadyRows .shipment-booked + .shipment-track.btn-loading::before {
    position: absolute;
    inset-block-start: 50%;
    /* The family's 6px end padding less half of the 3px by which the 16px ring is wider than the 13px arrow,
       which centres the ring on the arrow it stands in for. */
    inset-inline-end: 4.5px;
    margin-block-start: -8px;
}

#pickupReadyRows .shipment-booked + .shipment-track.btn-loading .icon { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
    #pickupReadyRows.grid-loading-host::after,
    #pickupMineRows.grid-loading-host::after { animation: none; }
}

/* ============================================================
   MANAGE SUBSCRIPTION (/Subscriptions/Manage — portal pages wave, 2026-08-14)
   ============================================================
   Every value below was read off the RENDERED design reference (manage-subscription.html) at 1440 and
   inside each breakpoint it declares, never grepped from a source file — the reference serves ONE
   compiled bundle in which a later layer routinely overrides an earlier one, so only the painted element
   shows the winner.

   THE BREAKPOINTS THIS FAMILY DECLARES, enumerated from the served bundle rather than assumed from the
   two ends (the middle-band lesson, 2026-08-12): the reference's `subscription-*` rules answer
   `max-width: 900px` (the two-column layout collapses and the details grid halves), `max-width: 720px`
   (the page padding, the heading, the icon, the details cells and the footer all tighten, and the
   services strip goes single-column) and `max-width: 390px` (the card head stacks and the details grid
   becomes one column). All three are reproduced below and each was opened during the build.

   WHY THERE IS NO SECOND COLUMN. The reference's `.subscription-layout` is `minmax(0,1fr) 330px`: a main
   column beside an aside holding the payment-method card, the support card and the cancel button. All
   three are absent here by recorded scope (the view's own header comment names each and why), so there
   is no aside to make room for. Rather than reserve an empty 330px track — or invent a width the
   reference never paints — the layout takes the reference's OWN no-aside state: its `max-width: 900px`
   rule, where `.subscription-layout` becomes a single `1fr` and the card spans the column. That state is
   measured reference behaviour, promoted to every width because the condition that produced it (no side
   column) is now permanent.

   COLOURS ARE RE-EXPRESSED, NEVER COPIED (palette clause, 15 #148 D1). The reference paints its
   pre-rebrand blue #115ee8 on the eyebrow, the service-row glyph and the primary button (with #0d4ab8 on
   that button's hover), and those resolve to the official navy tokens carrying the same role —
   --kp-navy-600 and its --kp-navy-700 hover. Its neutral ramp and its success pill map onto the shipped
   tokens the same way the sibling families above do, so nothing here re-declares a colour that already
   has a name.

   LETTER-SPACING IS ZEROED IN ARABIC on the two rules that declare it (the block at the end of this
   family). Arabic letters join, and spacing them apart breaks the joins — a house law that outranks the
   reference, which letter-spaces its Arabic labels unconditionally. The reference's own bundle happens
   to carry the same zeroing for these two selectors, so this is parity and house law agreeing.

   WHERE THIS FAMILY LIVES: the portal's own stylesheet rather than the shared component sheet, because
   this page exists only here and that sheet is loaded by the admin as well — the same placement decision
   the profile, settings and shipments families above record.
   ============================================================ */

.subscription-page {
    margin: 0 auto;
    padding: 18px 0 48px;
    color: var(--color-text);
}

/* ---- the page heading ---- */
.subscription-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.subscription-heading > div > span {
    color: var(--kp-navy-600);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.subscription-heading h1 {
    margin: 5px 0 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.035em;
}

.subscription-heading p {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* The payment-history door. An <a>, not a button, because it navigates — so it needs no line-height pin
   of its own the way the footer's <button> does. */
.subscription-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

/* The reference gives this link no hover treatment of its own (its only feedback is the press); a navy tint was
   an addition here (portal group 2 round 1, 2026-09-09). */
.subscription-heading > a:hover { text-decoration: none; }

/* The reference draws its receipt outline as an icon-font glyph at the link's own 11px, 15px at the phone tier
   (portal group 2 round 1, 2026-09-09); the sprite outline read from that font paints the same box. */
.subscription-heading > a .icon {
    width: 11px;
    height: 11px;
}

/* ---- the card column (see the no-aside note in this family's header) ---- */
.subscription-layout {
    display: grid;
    gap: 16px;
    align-items: start;
}

/* ---- one live subscription's card ---- */
.subscription-current {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-bg-surface);
    /* The reference's own single-stop ambient shadow, expressed through the token whose value IS its
       colour (--kp-slate-900 is #0f172a = rgb(15 23 42)) rather than as a raw literal — the shipments
       family's shape. NOT the navy alpha tokens: this shadow is neutral in the reference and a navy one
       would tint the card's edge. */
    box-shadow: 0 2px 8px color-mix(in srgb, var(--kp-slate-900) 4%, transparent);
}

.subscription-current > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px;
    border-bottom: 1px solid var(--color-border);
    background: var(--kp-navy-050);
}

.subscription-current > header > div {
    display: flex;
    align-items: center;
    gap: 13px;
}

.subscription-icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: var(--kp-navy-100);
}

.subscription-icon img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.subscription-current header small {
    display: block;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

/* Untracked on the reference; the design system's heading tracking would squeeze the English title -.17px
   (-.14px at the phone size) (portal group 2 round 1, 2026-09-09). */
.subscription-current h2 {
    margin: 4px 0 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: normal;
}

/* The status pill. The reference only ever renders its Active state; the muted arm below is ours, for
   the lapsed subscriptions the reference's demo data never has — it takes the shipped neutral pair
   rather than wearing the success green for a subscription that is not live. */
.subscription-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 99px;
    background: var(--portal-ship-green-tint);
    color: var(--kp-emerald-900);
    font-size: 10px;
    font-weight: 800;
}

.subscription-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kp-emerald-500);
}

.subscription-status.is-inactive {
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
}

.subscription-status.is-inactive i {
    background: var(--color-text-muted);
}

/* ---- the facts grid ---- */
.subscription-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--color-border);
}

.subscription-details > div {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border-inline-end: 1px solid var(--color-border);
}

.subscription-details > div:last-child {
    border-inline-end: 0;
}

.subscription-details small {
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 700;
}

/* The min-height keeps a cell whose value is legitimately absent — a box number before activation mints
   it, an expiry a lapsed row no longer has — the same height as its filled neighbours, so the row of
   labels stays on one line instead of the grid collapsing around the gap. */
.subscription-details b {
    min-height: 18px;
    font-size: 12px;
    font-weight: 800;
}

/* ---- the service row ---- */
/* ONE COLUMN, where the reference declares two — and this is a consequence of the per-subscription card,
   not a departure from the reference's look. Its two tracks exist to seat the TWO service rows of its
   single combined card; ours holds exactly one row by construction (one card per subscription, one
   service per subscription), so a second track could never be filled and left a visibly empty half of
   the card at every desktop width — seen in the first render, 2026-08-14. The reference's own treatment
   of a single row spanning the card is what it does at its `max-width: 720px` tier, so this is its own
   one-row shape applied at every width. */
.subscription-services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 20px;
}

.subscription-services > span {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-canvas);
}

/* The reference sets a 36px tinted square and drops a 16px icon-font glyph inside it (a phone outline for the
   virtual box, a mailbox outline for the physical one); the same outlines, read from that font into the sprite,
   sit in the square at the same 16px (portal group 2 round 1, 2026-09-09; the glyphs replaced the earlier
   in-house marks). */
.subscription-services .icon {
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    padding: 10px;
    border-radius: 9px;
    background: var(--kp-navy-100);
    color: var(--kp-navy-600);
}

.subscription-services b {
    font-size: 11px;
}

.subscription-services small {
    color: var(--color-text-muted);
    font-size: 10px;
}

/* ---- the actions ---- */
.subscription-current > footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 0 20px 20px;
}

.subscription-primary,
.subscription-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-size: 11px;
    font-weight: 800;
    /* line-height is EXPLICIT because a button ignores the ambient one — the UA default is `normal`,
       which beats inheritance — and both controls must sit at the same 40px as the heading's link. */
    line-height: 1.5;
    text-decoration: none;
}

.subscription-primary {
    border-color: var(--kp-navy-600);
    background: var(--kp-navy-600);
    color: var(--kp-white);
}

.subscription-primary:hover {
    border-color: var(--kp-navy-700);
    background: var(--kp-navy-700);
}

/* The reference's View mailbox is a <button> beside Renew with no hover treatment of its own; its only feedback is
   the press, which the press base layer's tag-swap list gives this link (portal group 2 round 1, 2026-09-09). */
.subscription-secondary:hover { text-decoration: none; }

/* The reference's footer glyphs (a repeat arrow on Renew, a sealed box on View mailbox) inherit the buttons' 11px
   (portal group 2 round 1, 2026-09-09). */
.subscription-primary .icon,
.subscription-secondary .icon {
    width: 11px;
    height: 11px;
}

/* The server's own reason, standing where the Renew button would be. It takes the footer's own row so a
   long sentence wraps against the card's padding rather than squeezing the mailbox link. */
.subscription-blocked {
    flex: 1 1 100%;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.6;
}

/* ---- nothing to manage ---- */
.subscription-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 48px 20px 56px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-bg-surface);
    text-align: center;
}

.subscription-empty img {
    width: 92px;
    height: 92px;
    margin-bottom: 6px;
    object-fit: contain;
}

.subscription-empty b {
    font-size: 15px;
    font-weight: 800;
}

.subscription-empty p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.subscription-empty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 12px;
    padding: 0 18px;
    border-radius: 9px;
    background: var(--kp-navy-600);
    color: var(--kp-white);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
}

.subscription-empty-cta:hover {
    background: var(--kp-navy-700);
    color: var(--kp-white);
    text-decoration: none;
}

/* ---- 900px: the details grid halves (the reference's layout rule is already this family's base) ---- */
@media (max-width: 900px) {
    .subscription-details { grid-template-columns: 1fr 1fr; }
    .subscription-details > div:nth-child(2) { border-inline-end: 0; }
    .subscription-details > div:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
}

/* ---- 720px: the page tightens and the actions stack ---- */
@media (max-width: 720px) {
    .subscription-page { padding: 7px 0 24px; }
    .subscription-heading { align-items: flex-start; margin-bottom: 18px; }
    .subscription-heading h1 { font-size: 25px; }
    .subscription-heading p { max-width: 250px; font-size: 11px; }

    /* The reference collapses this link to a 40px icon square by zeroing its font-size, which takes the
       label out of the page AND out of the accessibility tree. Ours hides the label the way the rest of
       this portal hides text — clipped, not zeroed — so the control still announces itself. */
    .subscription-heading > a { width: 40px; padding: 0; justify-content: center; }
    .subscription-heading > a .icon { width: 15px; height: 15px; }

    .subscription-heading > a span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .subscription-layout { gap: 13px; }
    .subscription-current > header { padding: 16px; }
    .subscription-current h2 { font-size: 14px; }
    .subscription-icon { flex-basis: 40px; width: 40px; height: 40px; }
    .subscription-details > div { padding: 14px; }
    /* The value's one-line floor follows the tier's 11px line box (16.5px); the 18px floor above is the desktop
       line box and left every phone cell 1.5px taller than the reference's (portal group 2 round 1, 2026-09-09). */
    .subscription-details b { font-size: 11px; min-height: 16.5px; }
    /* The reference drops the strip to one column here; ours already is one (see the base rule), so only
       the padding tightens. */
    .subscription-services { padding: 14px; }
    .subscription-current > footer { display: grid; padding: 0 14px 15px; }
    .subscription-primary,
    .subscription-secondary { width: 100%; }
    .subscription-empty { padding: 36px 16px 40px; }
}

/* ---- 390px: the card head stacks and the facts become one column ---- */
@media (max-width: 390px) {
    .subscription-current > header { align-items: flex-start; }
    .subscription-status { padding-inline: 8px; }
    .subscription-details { grid-template-columns: 1fr; }
    .subscription-details > div { border-inline-end: 0; border-bottom: 1px solid var(--color-border); }
    .subscription-details > div:last-child { border-bottom: 0; }
}

/* Arabic joins its letters, so the two spaced labels drop their tracking (house law; the reference's own
   bundle carries the same pair of exceptions). */
html[dir="rtl"] .subscription-heading > div > span,
html[dir="rtl"] .subscription-current header small {
    letter-spacing: 0;
}

/* ============================================================
   NOTIFICATIONS — the inbox page and the topbar bell's dropdown
   (portal pages wave, page 4, 2026-08-14)
   ============================================================
   /Notifications and the panel the shell's bell opens. Every value below was read off the RENDERED
   design reference (notifications.html for the page, index.html with its bell opened for the panel) at
   1440, 1100 and 390, in both languages, never grepped from a source file — the reference serves ONE
   compiled bundle in which a later layer routinely overrides an earlier one, and this family is a
   textbook case: its base layer tints the unread row in the dropdown and its LATER header layer nulls
   that background completely, so only the painted element shows the winner.

   THE BREAKPOINTS THIS FAMILY DECLARES, measured as the full set rather than assumed from the two ends
   (the middle-band lesson, 2026-08-12): the PAGE answers `max-width: 720px` (a shorter heading, the
   accent rail dropped, the short mark-all caption, a message that wraps instead of truncating) and
   nothing else — the reference's own 721–1279 block for this page changes only the RAIL's width and the
   content offset, which our shell already does on every page, so there is no page-specific compact tier
   to port. The DROPDOWN answers `max-width: 720px` too, where it is switched off entirely: below 721
   the bell navigates to the full page instead of opening a panel, which is the reference's own
   behaviour and the reason its own stylesheet hides the panel there.
   Dated clause 2026-10-16 (15 #429(b)): the shell's compact band is now 721-1023px; between 1024 and
   1279 the labelled rail shows and the page gets the narrower content column every page gets there. That
   is still a shell change, so this family still ports no compact tier of its own.

   COLOURS ARE RE-EXPRESSED, NEVER COPIED (palette clause, 15 #148 D1). The reference paints the unread
   badge and the panel's count chip in two pre-rebrand corals (#ff6b4a and #e5573f); both resolve to the
   OFFICIAL danger token, which is what a count demanding attention should be. Its panel link and item
   icons carry the pre-rebrand blue #115ee8; those resolve to the official navy. Its neutral slate ramp
   IS the shipped token ramp — --color-text / --color-text-muted / --color-border resolve to its own
   #0f172a / #475569 / #e2e8f0 — so those adopt as tokens, and its near-white panel fill (#fdfefe) and
   near-slate inks (#17243a, #111827, #5f6d80) resolve to the tokens carrying the same role.

   ONE COLOUR IS DELIBERATELY NOT PORTED: the panel's timestamp ink #94a3b8 is the exact lightened muted
   value a recorded ruling REJECTED for failing WCAG AA. It takes the same muted-at-70% the page's own
   timestamps use — which is the reference's value there — rather than the lighter one.

   THE ICON TILE IS SHARED between the page card and the panel row, so a notification looks like itself
   in both places; only its SIZE and radius differ, and only those are restated for the panel.

   WHERE THIS FAMILY LIVES: the portal's own stylesheet rather than the shared component sheet, because
   both surfaces exist only here and that sheet is loaded by the admin as well — the same placement
   decision the profile, settings and shipments families above record. It also means these rules load
   AFTER components.css, which is what lets the bell's box be restated here (see the bell block).
   ============================================================ */

/* ---- the page ---- */
.notification-page {
    width: 100%;
    max-width: none;
    margin: 0;
    /* THE REFERENCE'S OWN OPENING: 25.5px inside a wrap that has none. Until 2026-09-09 the shell's .rp-wrap
       padded every page 25.5px itself and this family declared nothing so the two would not stack; that wrap
       padding is the dashboard's alone now (portal group 1 round 1), so the section opens with its own value
       and the heading sits 93.5px under the header on both sides, as before. */
    padding: 25.5px 0 0;
    /* The reference sets this ambient pair on the BODY of this page; declared on the family root instead,
       so one screen's leading cannot reach the shell chrome around it. Nothing inside depends on it by
       accident — every text rule below is explicit — so the two placements compute the same. */
    font-size: 17px;
    line-height: 1.625;
}

.notification-page-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10.625px;
    width: 100%;
    height: 36px;
    margin: 0;
}

/* Decoration: the navy-to-gold bar beside the title. */
.notification-title-rail {
    display: block;
    width: 3px;
    height: 29.75px;
    flex: 0 0 3px;
    border-radius: var(--kp-radius-full);
    background: linear-gradient(to bottom, var(--kp-navy-600), var(--kp-gold-500));
}

/* The reference names Alexandria here in BOTH languages -- this page's own scoped title rule, the most-specific
   usage under Core Rule 13 -- while its other page titles draw the Latin display family. Until 2026-09-09 this
   rule declared no family on a consistency note (never a ruling), and the English title rendered 9px narrower
   than the reference at 1440 with its tracking; the face is declared now (portal group 1 follow-up,
   2026-09-09). Arabic already resolved to Alexandria and is unchanged. */
.notification-page-heading h1 {
    overflow: hidden;
    margin: 0;
    color: var(--color-text);
    font-family: 'Alexandria', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 34px;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* The reference tracks this title -.035em in English (its own base rule); ours inherited the design
       system's -.01em heading tracking (portal group 1 round 1, 2026-09-09). Arabic is never tracked. */
    letter-spacing: -0.035em;
}

/* `margin-inline-start: auto` is what pushes it to the far edge — the heading row has no
   justify-content: space-between, so the control floats itself. */
.notification-mark-all {
    display: inline-flex;
    align-items: center;
    gap: 6.375px;
    min-height: 36px;
    margin-inline-start: auto;
    padding: 8.5px 12.75px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    background: var(--kp-white);
    color: var(--color-text);
    font-size: 12.75px;
    font-weight: 600;
    /* Explicit because a <button> ignores the ambient leading — its UA default is `normal`, which beats
       inheritance — and this control has to sit at the heading row's measured height. */
    line-height: 17px;
    cursor: pointer;
    transition: border-color 150ms var(--ease-standard);
}

.notification-mark-all:hover { border-color: color-mix(in srgb, var(--color-text) 20%, transparent); }

/* The reference's mark-all glyph is a filled bold check; ours is the shipped stroke check already in the
   shared sprite. A recorded departure with the same reason the shipments board's four status marks
   carry: adopting the reference's artwork means adding to the design system, which is wider than this
   page. Same size, same position, same meaning. */
.notification-mark-icon { width: 14.875px; height: 14.875px; flex: 0 0 14.875px; }

/* Two captions, one control: the wide one until the page narrows, then the short one. */
.notification-mark-short { display: none; }

.notification-page-content { padding: 25.5px 0; }

/* ---- the two filter chips ---- */
/* The negative inline margin against the equal padding is the reference's own trick for a scrollable
   strip: a chip's focus ring is not clipped by the overflow, and at rest the strip still lines up with
   the rows beneath it. */
.notification-filters {
    display: flex;
    align-items: center;
    gap: 8.5px;
    height: 36px;
    margin: 0 -4.25px 21.25px;
    padding: 0 4.25px;
    overflow-x: auto;
    scrollbar-width: none;
}

.notification-filters button {
    display: inline-flex;
    align-items: center;
    gap: 6.375px;
    min-height: 36px;
    padding: 6.375px 12.75px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    background: var(--kp-white);
    color: var(--color-text-muted);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    white-space: nowrap;
    transition:
        color 150ms var(--ease-standard),
        border-color 150ms var(--ease-standard),
        background-color 150ms var(--ease-standard);
}

/* The enabled guard, for the reason the profile copy control's rule states: a chip that starts a read is
   a control the shared button lock will disable (2026-09-13). */
.notification-filters button:not(:disabled) { cursor: pointer; }

/* Dated clause 2026-10-21: the strip's inline padding gives the ring room only at the two inline ends.
   The strip is exactly as tall as a chip and its overflow clips, so the shared ring drawn 2px outside the
   chip lost its top and bottom edges. The ring is drawn inside the chip instead; its width and colour
   stay the shared portal ring's, and the strip's geometry is unchanged. */
.notification-filters button:focus-visible { outline-offset: -2px; }

.notification-filters button:hover {
    border-color: color-mix(in srgb, var(--color-text) 20%, transparent);
    color: var(--color-text);
}

/* The selected chip loses its border and gains the ink as a fill — which is why its min-height drops by
   the 2px that border used to add, keeping both chips the same painted height. */
.notification-filters button.active {
    min-height: 34px;
    border: 0;
    background: var(--color-text);
    color: var(--kp-white);
}

.notification-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 21.25px;
    padding: 2.125px 6.375px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-slate-50);
    color: var(--color-text-muted);
    font-size: 10px;
    /* Tabular figures so a count going from 9 to 10 does not widen the chip under the pointer. */
    font-variant-numeric: tabular-nums;
    line-height: 17px;
}

.notification-filters button.active .notification-filter-count {
    background: color-mix(in srgb, var(--kp-white) 15%, transparent);
    color: var(--kp-white);
}

/* ---- the day groups ---- */
.notification-groups { display: grid; gap: 25.5px; }

.notification-group > header {
    display: flex;
    align-items: center;
    gap: 12.75px;
    height: 17.875px;
    margin: 0 0 10.625px;
}

.notification-group > header h2,
.notification-group > header b {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 17.875px;
}

/* The reference letter-spaces the day label .12em in English (measured +1.32px at 11px); ours inherited
   the heading tracking of -.01em (portal group 1 round 1, 2026-09-09). Arabic is never tracked. */
.notification-group > header h2 { text-transform: uppercase; letter-spacing: .12em; }

/* The rule between the label and the count. */
.notification-group > header span { height: 1px; flex: 1; background: var(--color-border); }

.notification-group > header b { font-variant-numeric: tabular-nums; font-weight: 400; }

.notification-group-items { display: grid; gap: 10.625px; }

/* ---- one notification card ---- */
/* BLOCK, not the reference's own `inline-block`: it is a grid item here, and a grid item is blockified,
   so the two compute identically — measured `display: block` on the rendered reference. Declaring the
   computed value keeps this card off the inline-level line box whose font strut has silently inflated a
   ported height on this project before. */
.notification-page-item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-white);
    color: var(--color-text);
    font-size: 17px;
    line-height: 27.625px;
    text-align: start;
    box-shadow: none;
    cursor: pointer;
    transition:
        border-color 200ms var(--ease-standard),
        transform 200ms var(--ease-standard),
        box-shadow 200ms var(--ease-standard);
}

/* UNREAD IS THE STATE THAT ADDS, so "read" is the absence of an ornament rather than a second style to
   keep in step: an unread card lifts, gains an accent bar and a dot, and loses all three when it is read.
   The shadow token is byte-identical to the reference's own pair. */
.notification-page-item.unread { box-shadow: var(--shadow-card); }

.notification-page-item:hover { border-color: color-mix(in srgb, var(--color-text) 15%, transparent); }
.notification-page-item.unread:hover { border-color: color-mix(in srgb, var(--kp-navy-600) 30%, transparent); }

/* Logical inset so the bar sits on the reading edge in both languages — the reference's own choice here. */
.notification-accent {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--kp-navy-600);
}

.notification-accent.transit { background: var(--kp-amber-500); }
.notification-accent.delivered { background: var(--kp-green-700); }
.notification-accent.neutral { background: var(--color-text-muted); }

.notification-card-content {
    display: flex;
    align-items: flex-start;
    gap: 14.875px;
    min-height: 106.59375px;
    padding: 17px;
}

/* SHARED WITH THE PANEL ROW below, which restates only the size and the radius. */
.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42.5px;
    height: 42.5px;
    flex: 0 0 42.5px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-navy-600-a05);
    color: var(--kp-navy-600);
}

.notification-icon.transit {
    background: color-mix(in srgb, var(--kp-amber-500) 10%, transparent);
    color: var(--kp-amber-500);
}

.notification-icon.delivered {
    background: color-mix(in srgb, var(--kp-green-700) 10%, transparent);
    color: var(--kp-green-700);
}

.notification-icon.neutral {
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
    color: var(--color-text-muted);
}

/* Explicit, like every other icon in this portal: an <svg> with no size falls back to the UA's 300x150. */
.notification-item-icon { width: 18px; height: 18px; }

.notification-copy {
    display: block;
    min-width: 0;
    flex: 1;
    color: var(--color-text);
    font-size: 17px;
    line-height: 27.625px;
}

.notification-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12.75px;
    /* The reference fixes this row at 21.25px, which fits its short seeded titles; a real localized title wraps to
       two lines at phone widths, and a fixed row let the second line paint over the message (portal group 1
       round 2, 2026-09-09). The value stays as the one-line minimum so the message gap below is unchanged. */
    min-height: 21.25px;
    color: var(--color-text);
}

.notification-title-row h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 14.875px;
    font-weight: 700;
    line-height: 21.25px;
    /* The reference's row title is untracked in English; the design system's heading tracking would
       squeeze it -.149px (portal group 1 round 1, 2026-09-09). */
    letter-spacing: normal;
}
/* The reference squares THIS page's back control to 8px through its own page-scoped rule -- notifications
   only; the mailbox, payment-history and manage-subscription pages keep the shell's 12.75px (matched rules
   read on the rendered reference, 2026-09-09). Scoped the same way here. */
.rp-shell:has(.notification-page) .rp-header-back { border-radius: 8px; }
/* The same page-scoped reference rule draws the control's arrow at 18px at every width and pulls the control 8.5px
   toward the header's edge (read on the rendered reference at 1440, 768 and 390 in the portal group 1 round 2,
   2026-09-09, where the live control sat 8.5px further in on both sides). The pull stops at the phone tier: the
   reference's phone header floats a second back control at the screen edge and starts its brand 46px in, so its
   8.5px pull lands the control 37.5px from the edge; this shell renders one in-flow back control at the header's
   17px inset (parity fix wave P2.4), where the same pull would hug the edge at 8.5px, a place the reference never
   shows it. */
.rp-shell:has(.notification-page) .rp-header-back .icon { width: 18px; height: 18px; }
@media (min-width: 721px) {
    .rp-shell:has(.notification-page) .rp-header-back { margin-inline-start: -8.5px; }
}

/* The unread dot. Its accessible half is a visually-hidden WORD beside it in the markup — a title or an
   aria-label on a role-less element reaches neither a touch device nor a screen reader. */
.notification-title-row > i {
    display: block;
    width: 6.375px;
    height: 6.375px;
    flex: 0 0 6.375px;
    margin-top: 6.375px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-navy-600);
}

/* ONE LINE, clipped: the card's height is fixed by the reference and a two-line body would break the
   rhythm of the list. It wraps instead of truncating at phone widths, where there is no fixed height. */
.notification-message {
    display: flow-root;
    height: 20.71875px;
    margin-top: 4.25px;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: 12.75px;
    line-height: 20.71875px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* OPENED, THE WHOLE NOTICE (owner ruling 15 #655, 2026-10-20; a post-mockup behaviour, Core Rule 13): a pressed row
   drops the one-line clip above and the two-line cap of the phone tier below and shows its message in full, wrapped,
   in place - the card grows with it. Keyed on the row's own aria-expanded, which the page script writes and a
   screen reader announces, so the two cannot drift apart. Its selector outranks the phone tier's rule, so it needs
   no second copy inside that block. A long unbroken run (a reference, an address) breaks rather than overflowing. */
.notification-page-item[aria-expanded="true"] .notification-message {
    height: auto;
    max-height: none;
    overflow: visible;
    white-space: normal;
    overflow-wrap: break-word;
}

.notification-page-item .notification-copy time {
    display: block;
    height: 17.875px;
    margin-top: 8.5px;
    color: color-mix(in srgb, var(--color-text-muted) 70%, transparent);
    font-size: 11px;
    line-height: 17.875px;
}

/* ---- load-more, and the bound this page can honestly state ---- */
/* NEITHER EXISTS IN THE REFERENCE, whose list is a fixed array of six. Both wear the filter chip's own
   vocabulary so they read as part of this page rather than as a borrowed control. */
.notification-more { display: flex; justify-content: center; margin-top: 21.25px; }

.notification-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8.5px 17px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    background: var(--kp-white);
    color: var(--color-text);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    cursor: pointer;
    transition: border-color 150ms var(--ease-standard);
}

.notification-more-btn:hover { border-color: color-mix(in srgb, var(--color-text) 20%, transparent); }

.notification-showing {
    margin: 21.25px 0 0;
    color: var(--color-text-muted);
    font-size: 11px;
    text-align: center;
}

/* ---- nothing to show ---- */
.notification-empty {
    padding: 51px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-white);
    text-align: center;
}

.notification-empty > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    height: 51px;
    margin: 0 auto 12.75px;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-navy-600-a05);
    color: var(--kp-navy-600);
}

.notification-empty-icon { width: 21.25px; height: 21.25px; }
.notification-empty h2 { margin: 0; color: var(--color-text); font-size: 14.875px; font-weight: 600; }
.notification-empty p { margin: 4.25px 0 0; color: var(--color-text-muted); font-size: 12.75px; }

/* THE ROWS' LOADING SKELETON (15 #198c, #218, 2026-10-20; the shipments board's shape). This region used to show a
   55% white veil over the old rows - the board's own former veil, kept here when the board moved to its skeleton on
   2026-10-12 - so the old rows stayed readable while a chip's read was out. Now, while any read of this region runs,
   the page's script lays this layer over the rows it is about to replace and takes it away when the answer lands.
   It covers the rows in place - absolute over the host, on the page's own background, its placeholder cards in the
   rows' own border, corner and gap - so nothing below the list moves, and the shared skeleton's reduced-motion rule
   stops its shimmer. Presses pass through it, as they passed through the veil. */
#notificationList { position: relative; }

.notification-rows-skeleton {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    align-content: start;
    gap: 10.625px;
    overflow: hidden;
    background: var(--color-bg-canvas);
    pointer-events: none;
}

.notification-skeleton-row {
    display: grid;
    gap: var(--kp-space-sm);
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-white);
}

.notification-skeleton-row .skeleton-text { margin-block-end: 0; }

.notification-skeleton-row .skeleton-text + .skeleton-text { width: 55%; }

/* THE COUNTS SHIMMER WHILE THE LIST READS (15 #198c, #218), the board's count rule on this page's chips. The shared
   skeleton class paints the shimmer, but the count's own resting and selected backgrounds and text colours outweigh a
   lone class, so this rule restates the shared gradient and its size at a weight that ties the selected-chip rule
   above and wins it by order, and hides the digits. The count keeps its box, and the motion stays the shared class's
   own, so its reduced-motion rule stops it. */
.notification-filters button > .notification-filter-count.skeleton {
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-canvas) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    color: transparent;
}

/* ---- the topbar bell ---- */
/* THE BOX IS RESTATED HERE, and that is load-bearing rather than tidy. The shared sheet dresses the
   topbar's controls through `.rp-h-actions > a, .rp-h-actions > button, ...` — a CHILD combinator — and
   the bell is no longer a direct child of that cluster: it sits inside `.notification-menu`, the
   positioning context its dropdown is anchored to. Without this block the bell would lose its height,
   its padding, its radius and its hover the moment that wrapper appeared. Same specificity as the shared
   sheet's own `.rp-h-actions .notification-bell` (0,2,0), and this file loads after it, so it wins the
   tie by source order.
   IT ALSO DECIDES THE PHONE SHAPE, by the same mechanism: the shared sheet's `<=720` and `<=360` rules
   are child-combinator too, so they no longer reach the bell — which is exactly right, because the
   rendered reference measures its bell at 41.5x38.25 at 390, identical to its desktop box. */
.notification-menu { position: relative; display: flex; }

.rp-h-actions .notification-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 41.5px;
    min-height: 38.25px;
    height: 38.25px;
    padding: 0 12.75px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
    transition:
        background-color .2s var(--ease-standard),
        color .2s var(--ease-standard),
        transform .14s var(--ease-smooth-out);
}

/* An OPEN panel keeps its trigger lit, which is the reference's own pairing of these two states. */
.rp-h-actions .notification-bell:hover,
.rp-h-actions .notification-bell[aria-expanded="true"] { background: var(--kp-portal-topbar-hover-bg); }

.rp-h-actions .notification-bell:active { transform: scale(.96); }

/* The badge's anchor. */
.rp-notification-icon { position: relative; display: block; width: 16px; height: 16px; }

/* PHYSICAL top-right IN BOTH DIRECTIONS, which is the reference's own choice — its own stylesheet says
   so in its own comment — and it is a deliberate exception to this project's logical-properties law
   rather than an oversight. Same carve-out shape, and the same reason, as the shipped `.rp-online::after`
   presence dot a couple of controls along: a count pinned to the corner of a square glyph is decoration
   on that glyph, not reading-order content, so mirroring it would move an ornament for no reader's
   benefit. Recorded here so a future parity sweep does not re-file it as a violation.
   THE COLOUR IS OURS, NOT THE PACKAGE'S: the reference paints a pre-rebrand coral here; a count that
   demands attention is the official danger token's job. */
.rp-h-actions .notification-bell b {
    position: absolute;
    top: -6.375px;
    right: -8.5px;
    left: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    /* A 15px circle up to two digits and a pill past them: the box was pinned at 15px on every side and a
       four-digit count ran out of it (portal group 1 round 1, 2026-09-09, an inbox of 2,755). The reference
       shows no count past one digit, so the pill keeps the circle's height and radius and grows only inline. */
    width: auto;
    min-width: 15px;
    height: 15px;
    padding: 0 2px;
    border: 0;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-danger-500);
    color: var(--kp-white);
    box-shadow: var(--shadow-portal-online-ring);
    font-size: 9px;
    font-weight: 800;
    line-height: 14.625px;
    text-align: center;
}

/* ---- the bell's dropdown ---- */
/* `hidden` IS the state, exactly as the reference declares it: the panel carries the attribute and this
   rule is what makes the attribute mean something against the display below it. */
.notification-dropdown[hidden] { display: none; }

.notification-dropdown {
    position: absolute;
    z-index: 90;
    top: 45px;
    inset-inline-end: 0;
    display: block;
    width: 390px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--kp-white);
    box-shadow:
        0 20px 52px -18px rgb(15 23 42 / .28),
        0 6px 18px rgb(15 23 42 / .08);
    overflow: hidden;
    animation: notification-in .18s var(--ease-smooth-out);
}

@keyframes notification-in {
    from { opacity: 0; transform: translateY(-5px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-dropdown > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 17px;
    border-bottom: 1px solid var(--color-border);
}

.notification-dropdown > header > div { display: flex; align-items: center; gap: 8px; }

.notification-dropdown > header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 18px;
}

/* The panel's own unread count — the badge's twin, same token for the same reason. */
.notification-dropdown > header > div > span {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-danger-500);
    color: var(--kp-white);
    font-size: 10px;
    font-weight: 800;
    line-height: 16.25px;
}

.notification-dropdown > header button {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--color-text);
}

/* The enabled guard, for the reason the profile copy control's rule states (2026-09-13). */
.notification-dropdown > header button:not(:disabled) { cursor: pointer; }

.notification-dropdown > header button .icon { width: 16px; height: 16px; }

.notification-dropdown-list { display: block; max-height: 405px; overflow-y: auto; padding: 0; }

/* The in-flight affordance while the panel's rows are being read — the standing loading-state rule, in
   the shape a 390px panel can carry. */
.notification-dropdown-list.is-loading { opacity: .45; }

/* THE HOLDER'S LOADING SKELETON (dated 2026-10-23; the inbox page's rows skeleton, notification-skeleton-row above,
   in the panel's own row padding). The dimming above cannot show anything in a holder that has no rows yet, so the
   shell script puts this layer in that holder while its read runs; the holder is never dimmed while it shows the
   layer. The shared skeleton class paints the shimmer and its reduced-motion rule stops it. */
.notification-dropdown-skeleton { display: grid; }

.notification-dropdown-skeleton-row {
    display: grid;
    gap: var(--kp-space-sm);
    padding: 14px 17px;
}

.notification-dropdown-skeleton-row .skeleton-text { margin-block-end: 0; }

.notification-dropdown-skeleton-row .skeleton-text + .skeleton-text { width: 55%; }

.notification-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 17px;
    border: 0;
    background: transparent;
    color: var(--color-text);
    text-align: start;
    cursor: pointer;
    transition: background-color 150ms var(--ease-standard);
}

.notification-dropdown-item:hover { background: var(--kp-slate-50); }
/* THE RING STAYS INSIDE THE ROW (dated 2026-11-10, owner ruling 15 #1190): the row is as wide as its scroller, so the
   portal-wide ring 2px outside it was cut on both sides by the list's own clip. Drawn inside, the whole ring shows;
   the same shape as the filter chips above and the Home schedule row. */
.notification-dropdown-item:focus-visible { outline-offset: -2px; }

.notification-dropdown-item .notification-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: var(--kp-radius-lg);
}

.notification-dropdown-item .notification-copy { display: grid; flex: 1; min-width: 0; }

/* The panel's rows have no fixed height — their bodies wrap to two lines — so the page card's own
   21.25px is dropped here rather than inherited into a different anatomy. The card's value became a
   MINIMUM in the portal group 1 round 2 (2026-09-09), and a `height: auto` override cannot cancel a
   minimum: without the reset every one-line row here grew from its 18px title line to 21.25px. */
.notification-dropdown-item .notification-title-row { height: auto; min-height: 0; }

.notification-dropdown-item .notification-title-row strong {
    color: var(--color-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
}

.notification-dropdown-item .notification-title-row > i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 5px;
}

.notification-dropdown-item .notification-copy > span:not(.notification-title-row) {
    display: flow-root;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 16.5px;
}

.notification-dropdown-item time {
    display: block;
    color: color-mix(in srgb, var(--color-text-muted) 70%, transparent);
    font-size: 10px;
    line-height: 15px;
}

.notification-dropdown-empty {
    margin: 0;
    padding: 21.25px 17px;
    color: var(--color-text-muted);
    font-size: 12px;
    text-align: center;
}

.notification-dropdown > footer {
    display: block;
    padding: 11px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--kp-slate-50);
}

.notification-dropdown > footer a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--kp-navy-600);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.notification-dropdown > footer .icon { width: 14px; height: 14px; }

/* The reference's own caret points inline-start; our sprite arrow points the other way, so LTR is the
   side that flips — the identical pairing the profile tiles' arrows already carry. */
html[dir="ltr"] .rp-notification-more { transform: rotate(180deg); }

/* ---- 720px: the page tightens, and the panel is switched off entirely ---- */
@media (max-width: 720px) {
    /* BELOW 721 THE BELL NAVIGATES instead of opening this panel — the reference's own behaviour, and its
       own stylesheet hides the panel at exactly this width. The rule is the belt to the script's braces:
       a 390px panel anchored to a 41px button on a 390px screen is not a list anyone can read. */
    .notification-dropdown { display: none; }

    /* The reference opens this section with 21.25px on phones; the wrap pads nothing here since 2026-09-09. */
    .notification-page { padding-block-start: 21.25px; }
    /* The reference drops the accent bar from this heading on phones, exactly as it drops the shared page
       title's own bar. */
    .notification-title-rail { display: none; }
    .notification-page-heading h1 { font-size: 25.5px; line-height: 34px; }
    .notification-mark-wide { display: none; }
    .notification-mark-short { display: inline; }
    .notification-page-content { padding: 21.25px 0; }
    .notification-filters { margin-bottom: 21.25px; }
    /* The one-line clip becomes a two-line wrap: a phone-width card has room for the sentence, and
       truncating at that width would cut most bodies at their first few words. */
    .notification-message {
        height: auto;
        max-height: 41.4375px;
        white-space: normal;
    }
}

/* ---- reduced motion ---- */
/* The shared portal rule at the top of this file collapses every TRANSITION under this preference; an
   ANIMATION is a separate property it does not reach, so the panel's entrance is stood down here. */
@media (prefers-reduced-motion: reduce) {
    .notification-dropdown { animation: none; }
}

/* ============================================================
   MAILBOX HERO STATUS DOT — the not-live tone (spec A4, client ruling, ledger 15 #178, 2026-08-24)

   The mailbox hero's status line now prints the box's REAL status, and an expired-but-renewable box
   reaches that hero by server verdict. The shipped dot is a fixed green -- an "active" mark -- so
   printing the Expired word beside it would contradict it. No portal status-modifier DOT family exists
   to reuse (the .mb-status-* pills are a different shape), so this is ONE modifier class in tokens only:
   the alert foreground for the dot, the alert background for its ring.
   ============================================================ */
.mb-hero-dates b i.mb-hero-dot-expired {
    background: var(--status-alert-fg);
    box-shadow: 0 0 0 4px var(--status-alert-bg);
}

/* ============================================================
   PICKUP APPOINTMENTS (pickup journey, portal package, 2026-09-05)
   The booking page (/Pickup/Schedule), the bookings page (/Pickup/Mine), the dashboard's appointments rows
   and the tracking sheet's pickup block. Geometry is the design reference's -- the static schedule page
   (schedule-new.html: 20px card padding, 8px radii, the 7-column strip on an 8px gap, 2-column chips, a
   sticky summary 96px under the top, 4px completion bars, the 80px confirmation disc) and the published
   route's list, modal and dashboard rows (dashboard.css 884-1021: the 73.25px row, 42.5px icon tile,
   14.875px name, 11px meta, 17px arrow). Every colour is a token: the reference paints these surfaces
   with its stale pre-rebrand literals and the palette clause (15 #148 D1) re-expresses each in the
   official family -- navy for the primary, the stamp gold for the dashboard hover, the shared status
   tones for the chips. Alexandria/Inter come down the cascade; nothing here names a font.
   ============================================================ */

/* ---- shared: reference, status chip, buttons ---- */
.pk-ref { font-weight: 600; color: var(--color-text); }

.pk-status {
    display: inline-flex;
    align-items: center;
    gap: 6.375px;
    padding: 4.25px 10.625px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-md);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    white-space: nowrap;
}
.pk-status i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.pk-status-confirmed { border-color: color-mix(in srgb, var(--kp-green-700) 15%, transparent); background: color-mix(in srgb, var(--kp-green-700) 6%, transparent); color: var(--kp-green-700); }
.pk-status-pending { border-color: color-mix(in srgb, var(--status-transit-fg) 15%, transparent); background: var(--status-transit-bg); color: var(--status-transit-fg); }
.pk-status-completed { border-color: var(--kp-gray-200); background: var(--kp-gray-100); color: var(--kp-gray-500); }
.pk-status-closed { border-color: color-mix(in srgb, var(--kp-red-600) 15%, transparent); background: var(--status-alert-bg); color: var(--status-alert-fg); }

.pk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8.5px;
    min-height: 44.5px;
    flex: 1 1 0;
    padding: 10.625px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    color: var(--kp-slate-600);
    font-family: inherit;
    font-size: 14.875px;
    font-weight: 600;
    line-height: 21.25px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pk-btn .icon { width: 17px; height: 17px; flex: 0 0 17px; }
.pk-btn-secondary:hover { background: var(--color-bg-canvas); color: var(--color-text); }
.pk-btn-primary { border-color: var(--kp-postal-navy-600); background: var(--kp-postal-navy-600); color: var(--kp-white); }
.pk-btn-primary:hover { background: var(--kp-postal-navy-700); border-color: var(--kp-postal-navy-700); color: var(--kp-white); }
.pk-btn:focus-visible { outline: 2px solid var(--kp-postal-navy-600); outline-offset: 2px; }

/* The header action of the bookings page and the sheet's booking offer: the shipped primary pill. */
/* The border is EXPLICIT because this family is worn by an anchor AND by a button, and a button carries
   the user agent's own `2px outset ButtonBorder` while an anchor carries none -- the portal's base layers
   give a button its font and its cursor, never its border, so nothing else would remove it. Zero rather
   than the 1px the bordered pill family declares: this pill is a flat fill at a 38px min-height, and a
   border of any width would move the two anchors already measured against the design reference. */
.pk-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8.5px;
    min-height: 38px;
    padding: 8.5px 17px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-size: 14.875px;
    font-weight: 600;
    line-height: 21.25px;
    text-decoration: none;
    transition: background-color .15s ease;
}
.pk-cta:hover { background: var(--kp-postal-navy-700); color: var(--kp-white); }
.pk-cta .icon { width: 17px; height: 17px; }

/* ---- the booking page ---- */
/* 2026-09-06: The reference authors these boxes in rem over a 16px English / 17px Arabic root; fixed px per direction preserve them because our Arabic root changes at 800px. */
.pk-back { padding: 0; margin-bottom: 16px; font-size: 14px; font-weight: 600; line-height: 20px; gap: 6px; }
[dir="rtl"] .pk-back { font-size: 14.875px; line-height: 21.25px; margin-bottom: 17px; gap: 6.375px; }
/* 2026-10-12 (Core Rule 13): the reference's back control (schedule-new.html) is the brand primary at rest, the same
   primary at 80 percent on hover with no background, and fades its colours over .15s on the standard curve. This link
   also carries the shared back class, whose muted text and tinted hover would otherwise paint it; these two rules
   weigh the same as the shared ones and come after them, so they win. The keyboard ring is unchanged: the portal's
   shared focus-visible rule in components.css draws it. The reduced-motion rule at the top of this file still cuts the
   fade to .001ms. */
.pk-back {
    color: var(--kp-postal-navy-600);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: var(--ease-standard);
    transition-duration: .15s;
}
.pk-back:hover { background: none; color: color-mix(in srgb, var(--kp-postal-navy-600) 80%, transparent); }

.pk-back .icon { width: 16px; height: 16px; flex: 0 0 16px; }
[dir="rtl"] .pk-back .icon { width: 17px; height: 17px; flex: 0 0 17px; }
/* THE TITLE ABOVE THE BACK LINK (2026-10-15, Core Rule 13). The reference's booking page (schedule-new.html) holds
   this link 16px under the title, 24px from its 1024px tier - the top padding of the page body that holds the link
   (py-4 lg:py-6) over its 16px English and 17px Arabic root - so 17px and 25.5px on the Arabic page. Every other
   title of the family measures 25.5px and 18px there (shipments.html, personal-data.html, privacy-security.html),
   which the shared title rule keeps. The selector weighs nothing on the title itself, so the booking page's own
   title rules further down, which state the same gaps, keep winning there; on /Pickup/Ready, whose title is the
   shared one, these rules set the gap. */
:where(.rp-title):has(+ .pk-back) { margin-block-end: 16px; }
[dir="rtl"] :where(.rp-title):has(+ .pk-back) { margin-block-end: 17px; }
@media (min-width: 1024px) {
    :where(.rp-title):has(+ .pk-back) { margin-block-end: 24px; }
    [dir="rtl"] :where(.rp-title):has(+ .pk-back) { margin-block-end: 25.5px; }
}
.pk-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 24px auto;
    padding: 32px 24px;
    border: 1px dashed var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-surface);
    text-align: center;
}
.pk-state p { margin: 0; color: var(--color-text-muted); font-size: 14px; line-height: 22px; }
.pk-state-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--kp-navy-050); color: var(--kp-postal-navy-600); }
.pk-state-icon .icon { width: 24px; height: 24px; }
.pk-link { color: var(--kp-postal-navy-600); font-size: 13px; font-weight: 700; text-decoration: none; }
.pk-link:hover { text-decoration: underline; }

/* Element-qualified on purpose: the shared shell rule for headings (a class plus an element) outranks a lone
   page class and would set its unitless line-height here in the left-to-right cascade, while the direction-
   prefixed rule below already outranks it (measured 2026-09-06: Arabic 34px, English 28.8px). A page rule
   that must beat a shared family rule matches or beats it on specificity in BOTH directions. */
h1.pk-schedule-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -.025em;
    /* The title opens the page: the shell's wrap padding is the dashboard's alone since 2026-09-09, and this
       page's reference draws its title 25.5px (13px on phones) under the header through the title's own margin
       (portal group 1 follow-up, 2026-09-09). */
    margin: 25.5px 0 0;
    gap: 10px;
    min-height: 0;
}
[dir="rtl"] h1.pk-schedule-title { font-size: 25.5px; line-height: 34px; gap: 10.625px; }
@media (max-width: 720px) {
    h1.pk-schedule-title { margin-block-start: 13px; }
}
/* 2026-10-14 (Core Rule 13): the reference's booking page holds its back link 1rem under the title, 1.5rem from its
   1024px tier -- the top padding of the page body that holds the link (schedule-new.html: py-4 lg:py-6) over its
   16px English and 17px Arabic root -- where this title declared no bottom margin and the link sat right under it.
   The title's bottom margin now carries that gap, in fixed px per direction like the rest of this page. The
   shorthand above keeps its 0 bottom because a governance pin reads that declaration as written; these later rules
   of the same weight win over it. */
h1.pk-schedule-title { margin-block-end: 16px; }
[dir="rtl"] h1.pk-schedule-title { margin-block-end: 17px; }
@media (min-width: 1024px) {
    h1.pk-schedule-title { margin-block-end: 24px; }
    [dir="rtl"] h1.pk-schedule-title { margin-block-end: 25.5px; }
}
/* 2026-09-06: The standalone title has its own navy-to-gold mark, shown only from the reference's 1024px tier. */
h1.pk-schedule-title::before { width: 3px; height: 28px; border-radius: var(--kp-radius-full); background: var(--portal-schedule-title-mark); display: none; }
[dir="rtl"] h1.pk-schedule-title::before { height: 29.75px; }
@media (min-width: 1024px) {
    h1.pk-schedule-title::before { display: block; }
}
@media (min-width: 640px) {
    h1.pk-schedule-title,
    [dir="rtl"] h1.pk-schedule-title { font-size: 28px; }
}

/* 2026-09-06: The reference's whole form grid enters with a fade and 10px rise; reduced motion removes the entrance. */
.pk-schedule { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; animation: pk-fade-in .8s ease-out both; }
[dir="rtl"] .pk-schedule { gap: 25.5px; }
.pk-main { display: grid; gap: 20px; min-width: 0; }
[dir="rtl"] .pk-main { gap: 21.25px; }
/* The summary column exists from the 1024 tier up, as in the reference; below it the phone confirms from the
   in-flow button under the cards and the column is not rendered at all. */
.pk-side { display: none; gap: 16px; min-width: 0; }
[dir="rtl"] .pk-side { gap: 17px; }

.pk-card {
    padding: 20px;
    border: 1px solid var(--kp-gray-100);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
[dir="rtl"] .pk-card { padding: 21.25px; }
.pk-card:focus { outline: none; }
.pk-card:focus-visible { outline: 2px solid var(--kp-postal-navy-600); outline-offset: 2px; }
/* A confirm pressed with this choice missing paints the card in the validation family's danger. */
.pk-card.is-missing { border-color: var(--status-portal-alert-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-portal-alert-fg) 15%, transparent); }

.pk-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
[dir="rtl"] .pk-card-head { gap: 10.625px; margin-bottom: 17px; }
/* Fixed px per direction preserve the reference's root-scaled metrics on our compact Arabic root (measured 2026-09-06). */
.pk-card-head h3 { flex: 1 1 auto; margin: 0; font-size: 16px; font-weight: 700; line-height: 19.2px; color: var(--color-text); }
[dir="rtl"] .pk-card-head h3 { font-size: 17px; line-height: 20.4px; }
/* 2026-09-06: Notes has the reference's two-line copy column and its own mb-3 spacing, rather than the other heads' mb-4. */
.pk-card-head--notes { margin-bottom: 12px; }
[dir="rtl"] .pk-card-head--notes { margin-bottom: 12.75px; }
.pk-card-copy { min-width: 0; }
.pk-card-copy h3 { flex: none; }
.pk-card-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--kp-radius-md); background: var(--kp-navy-050); color: var(--kp-postal-navy-600); }
[dir="rtl"] .pk-card-icon { width: 38.25px; height: 38.25px; flex: 0 0 38.25px; }
.pk-card-icon .icon { width: 16px; height: 16px; }
[dir="rtl"] .pk-card-icon .icon { width: 17px; height: 17px; }
/* Dated 2026-11-10: the notes card's tile is neutral, as the reference draws it (its grey 100 fill and grey 500 icon,
   read from the rendered booking page); the date, time and branch tiles keep the navy tint above. */
.pk-card-head--notes .pk-card-icon { background: var(--kp-gray-100); color: var(--kp-gray-500); }

.pk-week-nav { display: flex; gap: 4px; }
[dir="rtl"] .pk-week-nav { gap: 4.25px; }
.pk-week-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
[dir="rtl"] .pk-week-btn { width: 34px; height: 34px; }
.pk-week-btn .icon { width: 16px; height: 16px; }
[dir="rtl"] .pk-week-btn .icon { width: 17px; height: 17px; }
.pk-week-btn[data-action="pickup-week-today"] .icon { width: 14px; height: 14px; }
[dir="rtl"] .pk-week-btn[data-action="pickup-week-today"] .icon { width: 14.875px; height: 14.875px; }
.pk-week-btn:hover:not(:disabled) { background: var(--color-bg-canvas); color: var(--color-text); }
.pk-week-btn:disabled { opacity: .4; cursor: default; }
/* The sprite's arrow points inline-end; the back arrow is the same glyph turned about, in either direction.
   Dated 2026-11-10: the glyph is the sprite's inline-end chevron, which points the same way, so these rules stand. */
.pk-week-btn .pk-arrow-back { transform: scaleX(-1); }
html[dir="rtl"] .pk-week-btn .icon { transform: scaleX(-1); }
html[dir="rtl"] .pk-week-btn .pk-arrow-back { transform: none; }

.pk-month { margin: 0; margin-bottom: 12px; color: var(--color-text-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
[dir="rtl"] .pk-month { font-size: 12.75px; line-height: 17px; margin-bottom: 12.75px; }

/* Dated 2026-11-10: the strip's reserved height is the reference strip's 73px in English (a week with no state word
   stood 1px taller than the reference's, the date card 196px against 195px); Arabic keeps the 74px it had. */
.pk-week { position: relative; min-height: 73px; }
[dir="rtl"] .pk-week { min-height: 74px; }
.pk-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
[dir="rtl"] .pk-week-days { gap: 8.5px; }
/* 2026-09-06: Days size to their content and the grid row equalises their height; the state marker carries its own separation. */
.pk-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 12px 4px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--color-text);
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
[dir="rtl"] .pk-day { padding: 12.75px 4.25px; }
.pk-day small { font-size: 10px; font-weight: 500; line-height: 15px; color: var(--color-text-muted); margin-bottom: 4px; }
[dir="rtl"] .pk-day small { margin-bottom: 4.25px; }
.pk-day b { font-size: 18px; font-weight: 700; line-height: 1; color: var(--kp-postal-navy-600); }
[dir="rtl"] .pk-day b { font-size: 19.125px; }
.pk-day-note { margin-top: 2px; font-size: 10px; font-weight: 600; color: var(--color-text-muted); }
[dir="rtl"] .pk-day-note { margin-top: 2.125px; }
.pk-day-dot { width: 4px; height: 4px; margin-top: 6px; border-radius: 50%; background: var(--kp-postal-navy-600); }
[dir="rtl"] .pk-day-dot { width: 4.25px; height: 4.25px; margin-top: 6.375px; }
.pk-day:hover:not(:disabled):not(.is-selected) { border-color: var(--kp-postal-navy-600); background: var(--kp-navy-050); }
.pk-day.is-selected { border-color: var(--kp-postal-navy-600); background: var(--kp-postal-navy-600); color: var(--kp-white); }
.pk-day.is-selected small,
.pk-day.is-selected .pk-day-note { color: color-mix(in srgb, var(--kp-white) 80%, transparent); }
.pk-day.is-selected .pk-day-dot { background: var(--kp-stamp-gold-300); }
.pk-day:disabled { cursor: default; background: var(--color-bg-canvas); color: var(--color-text-muted); }
/* The day number is navy only while the chip is its plain self: a chosen chip prints it in the chip's own white,
   a disabled one in the muted grey the chip already carries. */
.pk-day.is-selected b, .pk-day:disabled b { color: inherit; }
.pk-day[data-state="past"],
.pk-day[data-state="beyond"] { opacity: .45; }
.pk-day[data-state="full"] .pk-day-note,
.pk-day[data-state="passed"] .pk-day-note { color: var(--status-alert-fg); }
.pk-day.is-today:not(.is-selected) { border-color: var(--kp-postal-navy-600); }

/* 2026-09-06, owner ruling 15 #188h supersedes the round-4b marker:
   the state word stays visible at a smaller phone size in its state colour. */
@media (max-width: 456px) {
    .pk-day-note { font-size: 8px; line-height: 12px; }
    [dir="rtl"] .pk-day-note { font-size: 8.5px; line-height: 12.75px; }
    /* 2026-09-06, owner ruling 15 #188g: Arabic weekdays have no short form; the reference paints
       the full word at 10px and lets it spill. The owner chose a smaller phone size over new short wording. */
    [dir="rtl"] .pk-day small { font-size: 8.5px; line-height: 13px; }
}

/* 2026-09-11: at the narrowest phone the strip runs out of room for the spill the ruling above allows.
   Measured against the served stylesheets and the real Alexandria face: at a 320px viewport the strip's
   own box is 242px, seven equal columns of 27.28px with six 8.5px gaps, and the widest Arabic weekday word
   -- Thursday's, at 29.48px -- is 2.2px wider than the day it sits in. On an interior day that spill falls into
   the gap beside it and costs nothing, which is why the strip reads clean in six weeks out of seven; on the
   column at the strip's inline END it crosses the strip's own edge by 1.09px, and the page then reports a
   scroll width of 243 against a client width of 242. A week beginning on Friday puts that word in exactly
   that column, so the overflow arrives one week in seven rather than never or always.
   The fix is room, not a smaller word: the seven days take the family's own tighter 4.25px gap (the one
   .pk-week-nav already uses in Arabic) and grow to 30.94px, so the widest word FITS its day with 1.46px to
   spare and nothing spills past the strip at all. Sizing the word down instead would have cleared the edge
   by 0.2px at best -- a rounding, not a margin. English is untouched: its labels are three letters.
   THE BOUND IS THE MECHANISM'S, NOT A NEW FAMILY TIER (widened 2026-09-11). The rule first shipped at the
   320 tier because that is where it was measured, but the overflow does not begin at 320: the strip's box
   is the viewport less 78px of page gutter, six gaps take 51px of it, and the seven columns share what is
   left, so a column reaches the widest word's own 29.48px only when (V - 78 - 51) / 7 >= 29.48 -- that is
   V >= 335.4, so 336px is the first width that fits and every width up to 335px overflows. The tier is
   therefore written at 335px: one bound, derived from the arithmetic above rather than borrowed from the
   family's breakpoints, which is why it is not one of them. */
@media (max-width: 335px) {
    [dir="rtl"] .pk-week-days { gap: 4.25px; }
}

.pk-slots { position: relative; display: grid; gap: 16px; min-height: 48px; }
[dir="rtl"] .pk-slots { gap: 17px; }
/* The fetched day wrapper names the day it paints and draws no box of its own: display: contents lets the host's
   grid gap fall between the period groups, which a wrapper inside a grid parent would otherwise swallow. */
.pk-slot-day { display: contents; }
.pk-hint { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 20px; }
.pk-slot-group { display: grid; gap: 8px; }
[dir="rtl"] .pk-slot-group { gap: 8.5px; }
/* 2026-09-06: The reference pairs each period label with its own glyph, sized per direction. */
.pk-slot-group-head { display: flex; align-items: center; gap: 8px; }
[dir="rtl"] .pk-slot-group-head { gap: 8.5px; }
.pk-slot-group-icon { width: 14px; height: 14px; flex: none; color: var(--status-transit-fg); }
[dir="rtl"] .pk-slot-group-icon { width: 14.875px; height: 14.875px; }
.pk-slot-group[data-period="evening"] .pk-slot-group-icon { color: var(--kp-postal-navy-600); }
.pk-slot-group-label { font-size: 12px; font-weight: 600; line-height: 16px; color: var(--color-text-muted); }
[dir="rtl"] .pk-slot-group-label { font-size: 12.75px; line-height: 17px; }
.pk-slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
[dir="rtl"] .pk-slot-grid { gap: 8.5px; }
.pk-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8.5px;
    flex-wrap: wrap;
    row-gap: 0;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--kp-radius-md);
    background: var(--kp-navy-050);
    color: var(--kp-postal-navy-600);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
[dir="rtl"] .pk-slot { font-size: 14.875px; line-height: 21.25px; padding: 10.625px 17px; }
.pk-slot bdi { white-space: nowrap; }
.pk-slot small { font-size: 11px; font-weight: 600; color: var(--status-alert-fg); }
.pk-slot:hover:not(:disabled):not(.is-selected) { border-color: var(--kp-postal-navy-600); background: var(--kp-navy-050); }
.pk-slot.is-selected { border-color: var(--kp-postal-navy-600); background: var(--kp-postal-navy-600); color: var(--kp-white); }
.pk-slot:disabled { cursor: default; background: var(--color-bg-canvas); color: var(--color-text-muted); }
.pk-no-slots { display: grid; justify-items: start; gap: 10px; }
.pk-no-slots p { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 20px; }
.pk-retry {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--kp-postal-navy-600);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    color: var(--kp-postal-navy-600);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.pk-retry:hover { background: var(--kp-navy-050); }

/* The loading veil the shared kpPortal.showGridLoading hook turns on -- an overlay, so a strip whose week
   is being replaced does not move (the shipments board's own indicator, on this page's two hosts). */
#pickupWeek.grid-loading-host::after,
#pickupSlots.grid-loading-host::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--kp-radius-md);
    background: color-mix(in srgb, var(--kp-white) 55%, transparent);
    animation: shipment-veil .9s ease-in-out infinite alternate;
    pointer-events: none;
}

.pk-select-wrap { position: relative; }
.pk-select-wrap select {
    width: 100%;
    padding-block: 12px;
    padding-inline-start: 14px;
    padding-inline-end: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    appearance: none;
    /* Dated 2026-11-10 (owner ruling 15 #1132): a chosen name that does not fit ends in an ellipsis instead of being cut
       mid-letter under the caret. Read in the browser on the tracking sheet's picker; the booking page's picker carries the
       same selector, and an item that can be booked has its branch fixed, so that picker was not drawn to be read. */
    text-overflow: ellipsis;
}
[dir="rtl"] .pk-select-wrap select { font-size: 14.875px; line-height: 21.25px; padding-block: 12.75px; padding-inline-start: 14.875px; padding-inline-end: 42.5px; }
@media (max-width: 768px) {
    .pk-select-wrap select, [dir="rtl"] .pk-select-wrap select { font-size: 16px; }
}
.pk-select-wrap select:focus { outline: 2px solid var(--kp-postal-navy-600); outline-offset: 1px; }
.pk-select-wrap select.is-invalid { border-color: var(--status-portal-alert-fg); }
.pk-select-caret { position: absolute; top: 50%; inset-inline-end: 14px; width: 16px; height: 16px; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.pk-schedule .pk-select-caret { width: 16px; height: 16px; inset-inline-end: 14px; }
[dir="rtl"] .pk-schedule .pk-select-caret { width: 17px; height: 17px; inset-inline-end: 14.875px; }
.pk-branch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.pk-branch-save {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.pk-branch-save:hover:not(:disabled) { background: var(--kp-postal-navy-700); }
.pk-required-mark { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--kp-radius-full); background: var(--status-scheduled-bg); color: var(--status-scheduled-fg); font-size: 11px; font-weight: 700; }
.pk-required-mark .icon { width: 13px; height: 13px; }
.pk-branch-saved { margin: 10px 0 0; color: var(--kp-green-700); font-size: 13px; font-weight: 600; }
.pk-branch-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--kp-radius-md); background: var(--color-bg-canvas); }
.pk-branch-locked .icon { width: 18px; height: 18px; color: var(--kp-postal-navy-600); }
.pk-branch-locked b { font-size: 14px; color: var(--color-text); }
.pk-branch-note { margin: 10px 0 0; color: var(--color-text-muted); font-size: 12.75px; line-height: 19px; }

/* The counter explains the disabled confirm in each responsive container. */
.pk-confirm-remaining { margin: 10px 0 0; color: var(--color-text-muted); font-size: 12.75px; line-height: 19px; text-align: center; }
.pk-confirm:disabled { background: var(--kp-gray-100); color: var(--color-text-muted); cursor: not-allowed; }
.pk-notes-optional { display: block; margin: 0; color: var(--color-text-muted); font-size: 12px; line-height: 16px; }
[dir="rtl"] .pk-notes-optional { font-size: 12.75px; line-height: 17px; }
/* The reference leaves its textarea inline, so a baseline gap stands under it: 6px in English, 6.5px in Arabic (measured
   on the rendered reference 2026-11-08, Core Rule 13). This box is a block, so the gap is written out. */
.pk-notes {
    display: block;
    margin-block-end: 6px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--kp-gray-200);
    border-radius: var(--kp-radius-md);
    background: color-mix(in srgb, var(--kp-gray-050) 50%, transparent);
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    resize: none;
}
[dir="rtl"] .pk-notes { font-size: 14.875px; line-height: 21.25px; padding: 10.625px 14.875px; margin-block-end: 6.5px; }
@media (max-width: 768px) {
    .pk-notes, [dir="rtl"] .pk-notes { font-size: 16px; }
}
.pk-notes:focus { outline: 2px solid var(--kp-postal-navy-600); outline-offset: 1px; }
.pk-notes.is-invalid { border-color: var(--status-portal-alert-fg); }
.pk-branch-address {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-gray-050);
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 16px;
}
[dir="rtl"] .pk-branch-address { font-size: 12.75px; line-height: 17px; padding: 8.5px 12.75px; margin-top: 12.75px; gap: 6.375px; }
.pk-branch-address .icon { width: 12px; height: 12px; flex: 0 0 12px; opacity: .5; }
[dir="rtl"] .pk-branch-address .icon { width: 12.75px; height: 12.75px; flex: 0 0 12.75px; }
.pk-summary-address { margin: 0; color: var(--color-text-muted); font-size: 12px; line-height: 16px; }
[dir="rtl"] .pk-summary-address { font-size: 12.75px; line-height: 17px; }

.pk-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 0;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
    transition: background-color .15s ease;
}
[dir="rtl"] .pk-confirm { font-size: 14.875px; line-height: 21.25px; padding: 14.875px 0; gap: 8.5px; }
.pk-confirm .icon { width: 16px; height: 16px; }
[dir="rtl"] .pk-confirm .icon { width: 17px; height: 17px; }
.pk-confirm:hover:not(:disabled) { background: var(--kp-postal-navy-700); }
.pk-confirm-desktop { display: none; }

.pk-summary {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
}
.pk-summary-head { padding: 20px; background: var(--gradient-portal-ticket-spine); color: var(--kp-white); }
[dir="rtl"] .pk-summary-head { padding: 21.25px; }
.pk-summary-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
[dir="rtl"] .pk-summary-title { gap: 12.75px; margin-bottom: 12.75px; }
.pk-summary-title h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 19.2px; letter-spacing: -0.16px; }
[dir="rtl"] .pk-summary-title h3 { font-size: 17px; line-height: 20.4px; letter-spacing: normal; }
.pk-summary-title p { margin: 0; font-size: 12px; line-height: 16px; opacity: .6; }
[dir="rtl"] .pk-summary-title p { font-size: 12.75px; line-height: 17px; }
.pk-summary-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--kp-radius-md); background: color-mix(in srgb, var(--kp-white) 15%, transparent); }
[dir="rtl"] .pk-summary-icon { width: 42.5px; height: 42.5px; flex: 0 0 42.5px; }
/* 2026-09-06: The reference parcel floats continuously over 3.6s; its hover pause is scoped to a
   group the summary head does not have. The -3px rise is px-authored in both directions. */
.pk-summary-icon img { width: 28px; height: 28px; object-fit: contain; animation: pk-float 3.6s ease-in-out infinite; }
[dir="rtl"] .pk-summary-icon img { width: 29.75px; height: 29.75px; }
.pk-completion { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 0; }
[dir="rtl"] .pk-completion { margin-top: 0; gap: 6.375px; }
.pk-completion i { display: block; height: 4px; border-radius: var(--kp-radius-full); background: color-mix(in srgb, var(--kp-white) 20%, transparent); transition: background-color .2s ease; }
[dir="rtl"] .pk-completion i { height: 4.25px; }
.pk-completion i.is-done { background: var(--kp-stamp-gold-300); }
.pk-summary-rows { display: grid; gap: 16px; padding: 20px; }
[dir="rtl"] .pk-summary-rows { padding: 21.25px; gap: 17px; }
.pk-summary-row { display: flex; align-items: flex-start; gap: 12.75px; }
.pk-summary-row:not([data-role="pickup-summary-notes"]) { gap: 12px; }
[dir="rtl"] .pk-summary-row:not([data-role="pickup-summary-notes"]) { gap: 12.75px; }
.pk-summary-row small { display: block; font-size: 10px; font-weight: 500; line-height: 15px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
[dir="rtl"] .pk-summary-row small { letter-spacing: normal; }
.pk-summary-row b { display: block; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--color-text-muted); }
[dir="rtl"] .pk-summary-row b { font-size: 14.875px; line-height: 21.25px; }
.pk-summary-row[data-role="pickup-summary-notes"][hidden] { display: none; }
.pk-summary-row[data-role="pickup-summary-notes"] > div { min-width: 0; }
.pk-summary-row[data-role="pickup-summary-notes"] b { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--color-text-muted); overflow-wrap: anywhere; }
[dir="rtl"] .pk-summary-row[data-role="pickup-summary-notes"] b { font-size: 12.75px; line-height: 17px; }
.pk-summary-row.is-set b { color: var(--color-text); font-weight: 600; }
.pk-summary-row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: var(--kp-radius-md); background: var(--color-bg-canvas); color: var(--color-text-muted); }
.pk-summary-row:not([data-role="pickup-summary-notes"]) .pk-summary-row-icon { width: 32px; height: 32px; flex: 0 0 32px; }
[dir="rtl"] .pk-summary-row:not([data-role="pickup-summary-notes"]) .pk-summary-row-icon { width: 34px; height: 34px; flex: 0 0 34px; }
.pk-summary-row.is-set .pk-summary-row-icon { background: var(--kp-navy-050); color: var(--kp-postal-navy-600); }
.pk-summary-row-icon .icon { width: 17px; height: 17px; }
.pk-summary-row:not([data-role="pickup-summary-notes"]) .pk-summary-row-icon .icon { width: 16px; height: 16px; }
[dir="rtl"] .pk-summary-row:not([data-role="pickup-summary-notes"]) .pk-summary-row-icon .icon { width: 17px; height: 17px; }
.pk-summary .form-validation-msg { margin: 0 21.25px 21.25px; }

.pk-tip { display: flex; gap: 10px; padding: 16px; border: 1px solid color-mix(in srgb, var(--kp-stamp-gold-500) 35%, transparent); border-radius: var(--kp-radius-md); background: color-mix(in srgb, var(--kp-stamp-gold-300) 18%, var(--kp-white)); }
[dir="rtl"] .pk-tip { padding: 17px; gap: 10.625px; }
.pk-tip .icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--kp-stamp-gold-500); margin-top: 2px; }
[dir="rtl"] .pk-tip .icon { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2.125px; }
.pk-tip p { margin: 0; color: var(--color-text-muted); font-size: 11px; line-height: 17.875px; }
.pk-tip .pk-tip-title { margin-bottom: 2px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--color-text); }
[dir="rtl"] .pk-tip .pk-tip-title { font-size: 12.75px; line-height: 17px; margin-bottom: 2.125px; }

/* THE CONFIRMATION STATE: the page and the shell's chrome go, the disc stands alone. */
body.pk-confirmed .rp-aside,
body.pk-confirmed .rp-header,
body.pk-confirmed .rp-mobile-nav,
body.pk-confirmed .rp-title,
body.pk-confirmed .pk-back { display: none !important; }
body.pk-confirmed .rp-content { margin: 0 !important; padding: 0 !important; }
body.pk-confirmed .rp-wrap { padding: 0 !important; }
/* 2026-09-06: The reference fades the success composition in over .8s; the page ports the motion as well as the metrics. */
.pk-done { display: grid; justify-items: center; min-height: 100vh; align-content: center; padding: 24px; text-align: center; animation: pk-fade-in .8s ease-out both; }
[dir="rtl"] .pk-done { padding: 25.5px; }
.pk-done:focus { outline: none; }
.rp-shell .pk-done h2 { margin: 0 0 6px; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.2px; color: var(--color-text); }
[dir="rtl"] .rp-shell .pk-done h2 { margin-block-end: 6.375px; font-size: 21.25px; line-height: 29.75px; letter-spacing: normal; }
.pk-done p { margin: 0; color: var(--color-text-muted); font-size: 14px; line-height: 20px; }
[dir="rtl"] .pk-done p { font-size: 14.875px; line-height: 21.25px; }
.pk-done-mark { position: relative; display: grid; place-items: center; width: 80px; height: 80px; margin-block-end: 24px; }
[dir="rtl"] .pk-done-mark { margin-block-end: 25.5px; }
.pk-done-circle { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: var(--kp-green-700); color: var(--kp-white); }
[dir="rtl"] .pk-done-mark,
[dir="rtl"] .pk-done-circle { width: 85px; height: 85px; }
.pk-done-circle .icon { width: 40px; height: 40px; }
[dir="rtl"] .pk-done-circle .icon { width: 42.5px; height: 42.5px; }
.pk-done-ring { position: absolute; inset: 0; border-radius: 50%; background: transparent; border: 4px solid color-mix(in srgb, var(--kp-green-700) 30%, transparent); animation: pk-ping 1.5s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes pk-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@keyframes pk-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (min-width: 1024px) {
    /* Three equal tracks with the cards spanning two: the reference's grid, so the summary column measures one
       third of the content minus one gap (343px at 1440) rather than a 2fr/1fr split. */
    .pk-schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pk-main { grid-column: span 2; }
    .pk-side { display: grid; position: sticky; top: 96px; }
    [dir="rtl"] .pk-side { top: 102px; }
    .pk-confirm-mobile { display: none; }
    .pk-confirm-desktop { display: block; padding: 0 20px 20px; }
    [dir="rtl"] .pk-confirm-desktop { padding: 0 21.25px 21.25px; }
    .pk-confirm-desktop .pk-confirm { padding: 12px 0; }
    [dir="rtl"] .pk-confirm-desktop .pk-confirm { padding: 12.75px 0; }
}

/* Dated 2026-11-10 (Core Rule 13; risk row 526, the booking page's half): the English booking page's content container
   takes its reference's geometry. The reference (schedule-new.html) sizes its container in root units - at most 96rem
   wide, a 2rem gutter, a 1rem gutter on a phone - so under its 16px English root it reads 1536px, 32px and 16px, where
   the shell's shared container gave this page 1632px, 34px and 17px (measured at 1920, 1440 and 390). Under the 17px
   Arabic root the same units read the shell's own 1632px, 34px and 17px, so the Arabic page keeps the shell's values
   untouched: these rules name the English direction only (the Arabic phone root is 16px, so a root-unit rule there
   would move it). Scoped to this page through its own grid; the shared container rule and its width token are not
   changed. On a phone the shell's 17px column gutter is the content column's own, so the container reaches 1px past
   it on each side to stand 16px in. */
[dir="ltr"] .rp-shell:has(.pk-schedule) .rp-wrap { max-width: 96rem; padding-inline: 2rem; }
@media (max-width: 720px) {
    [dir="ltr"] .rp-shell:has(.pk-schedule) .rp-wrap { width: auto; padding-inline: 0; margin-inline: calc(1rem - var(--kp-portal-phone-gutter)); }
}

/* Dated 2026-11-10 (owner ruling 15 #1288): the booking side stops short of the floating assistant launcher, which keeps
   its recorded place and size (15 #627: 102px, 20px from the inline end, 33.5px from the bottom). On a window under
   1080px tall the side reached the launcher's corner where it rests (measured on the booking and move pages, both
   languages: 2948-3075 px2 of Confirm at 1024 x 768, part of the panel at 1280 x 800, part of the tip at 1440 x 900),
   and no rule on the height alone can clear it, because at the top of the page the side starts below the title, about
   325px down. So the side keeps a strip at the inline end as wide as the launcher's column: the launcher's 20px inset,
   its 102px and a 12px gap, less the gutter the content already leaves at that edge (34px in Arabic, 32px in English
   since the English container takes its reference's gutter, the block above), which is 100px in Arabic, 102px in
   English. The summary column keeps its reference width (one third of the content without the strip, minus the gaps);
   the cards beside it give up the strip. Measured after, with a 100px strip in both languages: no overlap with the
   panel, Confirm or the tip at the top, the middle and the end of the scroll, at 1024 x 768, 1280 x 800 and 1440 x 900,
   both languages; with the English strip at 102px the browser proof re-reads 1024 x 768 and 1440 x 900. A taller window
   keeps the reference grid above: the side's resting bottom (at most 875px measured) clears the launcher there. */
@media (min-width: 1024px) and (max-height: 1079.98px) {
    .pk-schedule { padding-inline-end: 102px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) calc((100% + 102px - 48px) / 3); }
    [dir="rtl"] .pk-schedule { padding-inline-end: 100px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) calc((100% + 100px - 51px) / 3); }
}

/* No compact tier on purpose: the reference paints this page with the same paddings, gaps and two slot columns
   at 390px as at 1440px. Corrected 2026-09-06: those values are per direction, from its 16px English / 17px Arabic roots. */

/* Measured at 360px in English, 2026-09-05: the range wrapped inside the chip.
   Narrower inline padding leaves room for the complete time range.
   Measured again 2026-09-06 with the "Passed" badge: range 100.4px + gap + badge 38.8px overran the 136.5px chip
   by 5.6px each side, so a badge the row cannot hold drops under the range (no row gap) instead of spilling past
   the border; a chip whose badge fits keeps its single row. The reference paints no badge; this is the shipped
   extra styled to fit.
   2026-09-06: the badge drops under the time wherever the two do not fit on one line, at every width; the phone
   tier only tightens the padding. */
@media (max-width: 374px) {
    .pk-slot, [dir="rtl"] .pk-slot { padding-inline: 12.75px; }
}

/* ---- the bookings page ---- */
/* 2026-09-06: The reference wrap has no start padding; removing the measured extra 25.5px desktop / 17px compact offset follows the Payments page precedent. */
.rp-shell:has(.pk-title-row) .rp-wrap { padding-block-start: 0; }
/* 2026-09-06: The action follows the title's 25.5px desktop and 13px compact top margins so their top edges meet, as measured in the reference. */
.pk-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 17px; }
/* The reference gives this page's title its own bottom margin: 29.75px on the desktop tiers, 20px on phones. */
.pk-title-row .rp-title { flex: 1 1 auto; min-width: 0; margin-bottom: 29.75px; }
.pk-title-row .pk-cta { flex: 0 0 auto; margin-top: 25.5px; }
@media (max-width: 720px) {
    .pk-title-row .rp-title { margin-bottom: 20px; }
    .pk-title-row .pk-cta { margin-top: 13px; min-width: 145px; padding: 8.5px 18px; font-size: 12px; }
}
.pk-list {
    overflow: hidden;
    border: 1px solid var(--kp-gray-100);
    border-radius: var(--kp-radius-md);
    background: var(--color-bg-surface);
}
.pk-list-head { display: flex; align-items: center; justify-content: space-between; gap: 17px; padding: 17px 21.25px; border-bottom: 1px solid var(--kp-gray-100); }
.pk-list-title { display: flex; align-items: center; gap: 10.625px; min-width: 0; }
.pk-list-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--kp-radius-sm); background: color-mix(in srgb, var(--kp-postal-navy-600) 10%, transparent); color: var(--kp-postal-navy-600); }
.pk-list-icon .icon { width: 17px; height: 17px; }
.pk-list-copy { min-width: 0; }
.pk-list-copy h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 21.25px; letter-spacing: normal; color: var(--color-text); }
.pk-list-copy p { margin: 0; font-size: 12.75px; line-height: 17px; color: var(--color-text-muted); }
.pk-count { display: inline-flex; align-items: center; padding: 4.25px 10.625px; border-radius: var(--kp-radius-md); background: color-mix(in srgb, var(--kp-postal-navy-600) 10%, transparent); color: var(--kp-postal-navy-600); font-size: 11px; font-weight: 600; line-height: 17.875px; white-space: nowrap; }
.pk-empty { margin: 0; padding: 40px 20px; color: var(--color-text-muted); font-size: 14px; text-align: center; }

.pk-table-wrap { display: block; overflow-x: auto; }
.pk-table { width: 100%; border-collapse: collapse; }
.pk-table th { padding: 12.75px 21.25px; color: var(--color-text-muted); font-size: 11px; font-weight: 600; line-height: 21.25px; text-align: start; white-space: nowrap; }
.pk-table td { padding: 17px 21.25px; color: var(--color-text); font-size: 14.875px; line-height: 21.25px; vertical-align: middle; }
.pk-table tbody tr { border-top: 1px solid var(--kp-gray-050); transition: background-color .15s ease; }
.pk-table tbody tr:hover { background: color-mix(in srgb, var(--kp-gray-050) 70%, transparent); }
.pk-table .pk-ref { font-weight: 600; }
.pk-time { color: var(--color-text-muted); }
.pk-location { display: inline-flex; align-items: center; gap: 6.375px; color: var(--kp-slate-600); }
.pk-location .icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--color-text-muted); }
.pk-td-details { text-align: end; }
.pk-details {
    display: inline-flex;
    align-items: center;
    gap: 4.25px;
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-postal-navy-600);
    font-family: inherit;
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    cursor: pointer;
    opacity: .7;
    transition: color .15s ease, opacity .15s ease;
}
.pk-details .icon { width: 15px; height: 15px; }
.pk-table tbody tr:hover .pk-details,
.pk-details:hover { opacity: 1; color: color-mix(in srgb, var(--kp-postal-navy-600) 80%, transparent); }
.pk-cards { display: none; }

.pk-card-row {
    display: block;
    width: 100%;
    padding: 17px;
    border: 0;
    border-top: 1px solid var(--kp-gray-050);
    background: transparent;
    color: var(--kp-gray-500);
    font-family: inherit;
    line-height: 1.5;
    text-align: start;
    cursor: pointer;
}
.pk-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10.625px; }
.pk-card-top .pk-ref { font-size: 14.875px; font-weight: 600; }
.pk-card-meta { display: grid; gap: 6.375px; font-size: 12.75px; }
.pk-card-meta > span { display: flex; align-items: center; gap: 8.5px; }
.pk-card-meta .icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--kp-gray-300); }
.pk-card-meta b { color: var(--kp-gray-700); font-weight: 500; }

@media (max-width: 767px) {
    .pk-table-wrap { display: none; }
    .pk-cards { display: block; }
}
/* 2026-11-16 (15 #1436): this page's Show more slot stands inside the bookings card, where the pill's bottom edge sat on
   the card's bottom border. The card keeps the slot's own space under it as well: the house slot's 21.25px above it
   (.notification-more), the same below. The pill is untouched; the other pages' slots stand in no such card. */
.pk-list .notification-more { margin-block-end: 21.25px; }

/* ---- the details modal (the sheet family's card with this feature's own body) ---- */
.pk-modal-title { display: flex; align-items: center; gap: 12.75px; min-width: 0; }
.pk-modal-truck { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--kp-radius-md); background: var(--kp-navy-050); }
.pk-modal-truck img { display: block; width: 25.5px; height: 25.5px; object-fit: contain; }
.pk-modal-title p { margin: 0; font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; }
.pk-modal-title b { display: block; font-size: 18px; font-weight: 800; color: var(--color-text); }
.pk-modal-body { padding: 17px 21.25px; }
.pk-modal-rows { display: grid; gap: 4.25px; }
.pk-modal-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--kp-radius-md); }
.pk-modal-row:hover { background: var(--color-bg-canvas); }
.pk-modal-row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: var(--kp-radius-md); background: var(--kp-navy-050); color: var(--kp-postal-navy-600); }
.pk-modal-row-icon .icon { width: 17px; height: 17px; }
.pk-modal-row small { display: block; font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; }
.pk-modal-row b { display: block; font-size: 14px; font-weight: 700; color: var(--color-text); }
.pk-modal-actions { display: flex; gap: 10.625px; margin-top: 17px; }
@media (max-width: 720px) {
    .pk-modal-actions { flex-direction: column-reverse; }
}

/* ---- the dashboard's appointments rows (dashboard.css 884-1021) ---- */
.dc-count { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: var(--kp-radius-full); background: color-mix(in srgb, var(--kp-stamp-gold-300) 25%, var(--kp-white)); color: var(--kp-stamp-gold-500); font-size: 12px; font-weight: 800; }
.dc-appointment {
    display: flex;
    align-items: center;
    gap: 14.875px;
    width: 100%;
    min-height: 73.25px;
    padding: 14.875px 17px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    /* .2s is the rendered reference's own fade (measured 2026-11-07 at 390, 768 and 1440 in both languages); it read
       .15s here until 2026-11-10. */
    transition: background-color .2s ease;
}
.dc-appointment:last-of-type { border-bottom: 0; }
/* The reference's hover tone (dated 2026-11-07, Core Rule 13): the rendered reference paints the brand gold at 5%
   (app.bundle.css:16915); this rule painted gold-300 at 22% until then. */
.dc-appointment:hover { background: color-mix(in srgb, var(--kp-stamp-gold-500) 5%, transparent); }
/* THE RING STAYS INSIDE THE ROW (dated 2026-11-07, measured): the reference draws it 2px outside, but the schedule card
   clips its overflow, and a ring 2px outside the row was cut by the card at 390, 768 and 1440 in both languages, so the
   inside ring is kept. */
.dc-appointment:focus-visible { outline: 2px solid var(--kp-postal-navy-600); outline-offset: -2px; }
.dc-appointment-img { width: 42.5px; height: 42.5px; flex: 0 0 42.5px; border-radius: var(--kp-radius-md); object-fit: contain; }
.dc-appointment-copy { display: grid; flex: 1 1 auto; min-width: 0; gap: 4px; }
.dc-appointment-copy > b { font-size: 14.875px; font-weight: 700; line-height: 18.59375px; }
.dc-appointment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8.5px; color: var(--color-text-muted); font-size: 11px; font-weight: 600; line-height: 16px; }
.dc-appointment-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.dc-appointment-meta .icon { width: 13px; height: 13px; }
.dc-appointment-meta > i { width: 1px; height: 12.75px; background: var(--color-border); }
.dc-appointment-arrow { width: 17px; height: 17px; flex: 0 0 17px; color: var(--kp-slate-400); }

/* ---- the tracking sheet's pickup block ---- */
.ds-field-pickup { gap: 8px; }
/* The collector card (owner ruling 15 #873) takes the gap of the pickup card it sits beside; the mockup draws no collector card. */
.ds-field-collector { gap: 8px; }
.ds-field-note { margin: 4px 0 0; color: var(--color-text-muted); font-size: 12px; line-height: 18px; }
.pk-sheet-picker .pk-select-wrap select { min-height: 40px; font-size: 13px; padding-block: 0; padding-inline-start: 14px; padding-inline-end: 40px; }
[dir="rtl"] .pk-sheet-picker .pk-select-wrap select { padding-block: 0; padding-inline-start: 14px; padding-inline-end: 40px; }
.ds-pickup { margin-top: 20px; }
.ds-pickup-booking { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--kp-radius-xl); background: var(--color-bg-canvas); }
.ds-pickup-booking > small { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.ds-pickup-booking > small .icon { width: 14px; height: 14px; }
.ds-pickup-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ds-pickup-facts .pk-ref { font-size: 16px; }
.ds-pickup-when { display: flex; flex-wrap: wrap; gap: 14px; color: var(--color-text); font-size: 13px; }
.ds-pickup-when > span { display: inline-flex; align-items: center; gap: 6px; }
.ds-pickup-when .icon { width: 14px; height: 14px; color: var(--color-text-muted); }
.ds-pickup-actions { margin-top: 6px; }
.ds-pickup-cta { width: 100%; min-height: 46px; }

@media (prefers-reduced-motion: reduce) {
    .pk-done-ring { animation: none; }
    .pk-done { animation: none; }
    .pk-schedule { animation: none; }
    .pk-summary-icon img { animation: none; transform: none; }
    #pickupWeek.grid-loading-host::after,
    #pickupSlots.grid-loading-host::after { animation: none; }
}

/* ---- collection delegates: the tracking sheet's block and the company account's page ----
   Hand-over wave, ledger 15 #194, 2026-09-10. ONE family for one section, drawn on two surfaces from one
   partial, so a rule written here reaches both.

   WHY A FAMILY AT ALL, since the reuse-before-create rule comes first: the section is a LIST OF PEOPLE with a
   form under it, and neither shipped portal family is that. The sheet's `.ds-field` cards hold one labelled
   value each; the pickup block's `.ds-pickup-booking` holds one booking. What IS reused rather than re-drawn
   is everything the section shares with its neighbours -- the pickup family's status chip (`.pk-status`),
   its buttons (`.pk-btn`, `.pk-cta`), the portal form field (`.ref-field`) with the shared engine's own
   invalid ring, the panel box (`.form-validation-msg`) and the login card's whole waiting composition. Only
   the list rows and the two containers are new, and they take the sheet's own card geometry (1px border,
   --kp-radius-xl, the canvas fill) so the block reads as part of the sheet rather than as a visitor.

   LOGICAL PROPERTIES ONLY, so the Arabic page needs no mirrored rule of its own. */
.dg-section { margin-top: 20px; }

/* THE SHEET'S SECTION WHILE IT LOADS (2026-10-12; AGENTS.md "every AJAX call shows a loading indicator", ruling
   15 #198c: the region's skeleton). In the tracking sheet the section is fetched after the sheet opens, into a
   host that is born empty, and the shared loading hook only MARKS the host -- an empty host is 0px tall and has
   no rows for a veil to cover, so the mark painted nothing.
   While the host is marked AND empty it draws one placeholder in the section's place: the section's own 20px
   top margin, the box of the section's empty sentence (16px of padding either side of its 20px line, inside a
   1px border: 54px), the delegate rows' card border, radius and fill, and the board's veil pulse. A section
   that arrives replaces it; a 204 leaves the host empty, the hook unmarks it, and the host is 0px tall again.
   While the host is marked over a section already drawn (a page change), the board's own veil covers that
   section; a 204 then leaves the section and lifts the veil.
   Dated 2026-11-10: that veil is retired. Since 2026-10-31 a section already drawn is covered row by row by the
   shared region skeleton while it is read again, so the translucent pulse above those covers doubled the loading
   look; the host now draws nothing over a drawn section, and the empty host's block below is unchanged.
   Dated 2026-10-16: "the board's veil" here names that veil's shape and the shared shipment-veil keyframes; the
   board itself now shows a skeleton (15 #198c), and this host's own rules are unchanged.
   Scoped to the tracking sheet's panel (.ds-sheet): the company account's delegates page reuses the host's id,
   with its section rendered by the server, and is not reached. */
.ds-sheet #delegatesHost.grid-loading-host:empty::before {
    content: "";
    display: block;
    block-size: 54px;
    margin-block-start: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-canvas);
    animation: shipment-veil .9s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    .ds-sheet #delegatesHost.grid-loading-host:empty::before { animation: none; }
}
.dg-head { display: grid; gap: 4px; margin-bottom: 12px; }
.dg-head > small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.dg-head > small .icon { width: 14px; height: 14px; }
.dg-head > p { margin: 0; color: var(--color-text-muted); font-size: 12px; line-height: 18px; }
.dg-panel { display: grid; gap: 12px; }
.dg-empty {
    margin: 0;
    padding: 16px;
    border: 1px dashed var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-canvas);
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}
.dg-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dg-row {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-canvas);
}
.dg-row-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
/* The masked number is a Latin string inside an Arabic row: `unicode-bidi: isolate` is what <bdi> already
   gives it, and the mono face is the same one the sheet's own timeline stamps use. */
.dg-civil-id { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 12px; }
.dg-row-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dg-row-added {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 12px;
}
.dg-row-added .icon { width: 14px; height: 14px; }
/* Pinned to its own start edge rather than stretched: a row action that spans the card reads as the row's
   primary act, and cancelling a delegation is not that. */
.dg-row-cancel { justify-self: start; }
.dg-add { width: 100%; min-height: 46px; }
/* THE FOOTER MAY NOT MOVE WHEN A FIELD PAINTS ITS MESSAGE (2026-09-13). The validation engine appends a
   field's message INSIDE that field's own cell, so on a form whose footer sits below live-validating fields
   the FIRST press of Cancel or Send was swallowed: pressing blurs the focused field, the blur paints its
   message, the cell grows, and the footer moves out from under the pointer between the press and its
   release -- so the browser produces no click at all, and the page correctly does nothing because nothing
   was pressed. Measured on both controls at 1440 and at 390: the control's top moved 752 -> 781 while the
   mouse was down, it received ZERO clicks, and the second press at the same point worked. The 29px is this
   cell's own arithmetic -- its 7px row gap, the message's 6px start margin, and its 16.8px line box.
   THE CURE IS THE LAYOUT, which is what the house form standard already prescribes for this family one axis
   over: a side-by-side field row must top-align, because the engine's message moves every sibling down the
   moment one field flags (owner report 2026-07-25, measured 24-33px). Here every field cell declares THREE
   rows and the third is a FIXED reserve for the message. A track given a length never grows, so the cell's
   block size -- and with it the footer's box -- is the same whether the slot is empty, holds one line, or
   holds more: the bound is unconditional over message length rather than true for the messages we happen to
   ship today. The reserve and the type it holds are built from the SAME three values below so neither can
   drift from the other, and align-self keeps a message longer than the reserve growing DOWNWARD into the
   row gap instead of being stretched across the slot. */
.dg-form {
    display: grid;
    gap: 14px;
    --dg-message-offset: 6px;
    --dg-message-size: 12px;
    --dg-message-leading: 1.4;
    --dg-message-slot: calc(var(--dg-message-offset) + var(--dg-message-size) * var(--dg-message-leading));
}
/* One column on a phone, two from the sheet's own comfortable width up: the four fields are short, and a
   single column at 1440 would leave the form a narrow ribbon down the middle of the block.
   Dated 2026-11-13 (owner rulings 15 #1369, #1375): the form asks the Civil ID alone, so the two-column step from 600px is
   gone and the one field takes the form's whole width at every size. */
.dg-fields { display: grid; grid-template-columns: 1fr; gap: 12px; }
/* The auth pages' field is 52px tall because it is the only thing on the screen; inside a sheet the same
   field has to sit beside a list and a timeline, so the box comes down to the pickup picker's own height. */
.dg-field input { min-height: 44px; font-size: 14px; }
.dg-field { grid-template-rows: auto auto var(--dg-message-slot); }
/* The message is a span, and the field caption is a span too, so the caption rule reaches it by descendant
   count unless its own type is stated here. It is stated from the reserve's own values for that reason. */
.dg-field .field-error-msg {
    display: block;
    align-self: start;
    margin-block-start: var(--dg-message-offset);
    font-size: var(--dg-message-size);
    line-height: var(--dg-message-leading);
}
.dg-form-actions { justify-content: flex-end; }
.dg-waiting { display: grid; justify-items: center; gap: 16px; padding: 20px 16px; text-align: center; }
.dg-waiting .ref-login-verification-copy h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 800;
}
.dg-waiting-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* The company page's own frame: the section is the whole page here, so it takes the surface card the other
   profile screens sit on rather than the sheet's transparent block. */
.dg-page {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-surface);
}
.dg-page .dg-section { margin-top: 0; }
/* THE COMPANY PAGE'S ADD BUTTON TAKES THE DELEGATION PAGE'S SIZE AND SPACING (dated 2026-11-15, owner ruling 15 #1433):
   it stands first in the panel, before the list, at the Delegation page's opener height ([data-surface="standing"]
   .poa-add, 55px) with that opener's 21.25px below it - the panel's own 12px gap plus the rest. */
/* THE COMPANY PAGE'S ADD BUTTON TAKES THE DELEGATION PAGE'S DASHED-OUTLINE LOOK (dated 2026-11-16, owner ruling 15 #1476):
   the values of [data-surface="standing"] .poa-add further down, on this page's opener only - the tracking sheet draws
   the same opener without the .dg-page frame and keeps its solid button. That opener's padding and 2px border add up to
   the 55px height (21.25px line + 2 x 14.875px + 2 x 2px), so the box keeps its size and place. The icon takes the fill
   the individual page's duotone icon class gives it. Its hover, pressed and reduced-motion states are the individual
   opener's own rules, which name this opener beside it. */
.dg-page .dg-add {
    min-height: 55px;
    margin-block-end: calc(21.25px - 12px);
    padding: 14.875px 17px;
    border: 2px dashed var(--kp-navy-600-a30);
    background: transparent;
    color: var(--kp-postal-navy-600);
    transition: color .2s, background-color .2s, border-color .2s, transform .14s;
}
.dg-page .dg-add .icon { fill: currentColor; stroke: none; }
/* The delegation history's pager. A NEW class rather than a reused one: the portal has no pager family to
   bind to -- the only sibling with a paging job is the notifications list's .notification-more, a centred
   wrapper around ONE "load more" button with no gap of its own, so borrowing it would push this pager's two
   buttons and the page counter against each other. The geometry is copied from .dg-waiting-actions, the
   family's own centred row of controls, with the counter given the muted colour every secondary reading on
   these rows already uses. The digits inside it are wrapped in a bdi in the markup so they stay left to
   right in Arabic (AGENTS.md "RTL numbers"). */
.dg-history-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--color-text-muted);
    font-size: 12px;
}
/* A DISABLED END OF THIS PAGER RECEDES (dated 2026-11-15; the 2026-08-27 disabled ruling: a disabled item recedes and
   takes no hover accent). Previous on the first page and Next on the last painted and hovered exactly like the enabled
   end. The rendered reference draws no pager and no disabled button of this family, so the house value for a disabled
   item is used: half opacity, the not-allowed cursor kept, and the resting background and ink under the pointer. A
   pressed end whose read is on its way (the shared loading lock) keeps its lock's own look. The rule is this pager's
   alone, by its own class, on the delegates page and in the tracking window; the shared secondary button keeps its look
   on every other page. */
.dg-history-pages > .pk-btn-secondary:disabled:not(.btn-loading) { opacity: .5; cursor: not-allowed; }
.dg-history-pages > .pk-btn-secondary:disabled:not(.btn-loading):hover { background: var(--color-bg-surface); color: var(--kp-slate-600); }

/* ============================================================
   THE OPEN ACCOUNT, AND THE QUESTION OF WHICH ONE TO OPEN
   (rulings 15 #233 and #238, 2026-09-13)

   TWO SURFACES THE MOCKUP DRAWS NEITHER OF, so Core Rule 13's keep-shipped-extras clause governs: they are
   built from the design system rather than matched to a reference. The one thing that IS borrowed is the
   selectable tile itself -- the register form's `.ref-reg-pobox-choice`, reused as-is so a reader who has
   met one selectable tile in this portal has met them all, and so the clipped radio, the checked dress and
   the label-borne focus ring keep their single home in components.css.

   WHY THE FAMILIES ARE PORTAL-SCOPED. Nothing in the admin has an account to switch, and nothing outside
   these two screens asks this question, so the families live in the portal's own sheet rather than in the
   shared component layer. The one shared thing they lean on is the tile.
   ============================================================ */

/* ---- the shell's indicator: which account is open, on every page ---- */
.kp-account-bar {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 24px 0;
}
/* The chip is a BUTTON when there is somewhere to go and a SPAN when there is not, so the shape is
   declared once for both and the plain variant only gives back what a control needs.
   Dated 2026-11-01 (owner ruling 15 #931, "bigger"): the chip's type grows from 12px to 14px, its padding from 6px 12px
   to 8px 16px and its gap from 8px to 10px, and the company mark below from 11px to 12.5px with 2px 10px of padding;
   the phone one-line rule (15 #256) is unchanged.
   Dated 2026-11-01 (owner ruling 15 #944): at the phone tier the chip and the mark keep their earlier size; the one-line
   rule below sets it. */
.kp-account-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-full);
    color: var(--color-text);
    background: var(--color-bg-surface);
    font-size: 14px;
    line-height: 1.4;
    text-align: start;
    cursor: pointer;
}
.kp-account-chip:hover { border-color: var(--kp-navy-600-a30); }
.kp-account-chip--plain { cursor: default; }
.kp-account-chip--plain:hover { border-color: var(--color-border); }
.kp-account-kind { color: var(--color-text-muted); }
.kp-account-name { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
/* The company mark and the switch invitation are the two secondary readings on the chip: one says what
   KIND of account this is, the other what pressing it does. */
.kp-account-mark {
    padding: 2px 10px;
    border-radius: var(--kp-radius-full);
    color: var(--color-portal-action);
    background: rgb(0 51 160 / .08);
    font-size: 12.5px;
    font-weight: 700;
}
.kp-account-action { color: var(--color-portal-action); font-weight: 700; }

/* The switcher's panel. Born hidden and empty; the shared script fills it on the press and empties it on
   the close, so a page that never opens it carries no list of anybody's accounts. */
.kp-account-panel {
    width: min(420px, 100%);
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-surface);
}
.kp-account-panel:focus-visible { outline: 2px solid var(--color-portal-action); outline-offset: 2px; }
/* ONE LINE ON PHONES (ruling 15 #256, 2026-09-18). A chip that wrapped took a second line off the top of
   EVERY signed-in page -- about 25px of the first screen, the same budget the phone rulings protect from
   the other side -- so below this tier the chip stops wrapping and the ACCOUNT NAME is the part that gives
   way. The name is the only part whose length is data rather than a fixed label, and it already declares a
   zero minimum, which is what lets a flex item shrink under its own text and reach an ellipsis at all; the
   layout gives it a title so the clipped half is still readable and still in the tree. The labels keep
   their whole width on purpose: a label allowed to shrink would wrap its own text and hand the second line
   straight back, and they are short fixed strings, so the name keeps the rest of the room. Nothing above
   this tier is touched -- no rule there fixes a line count and the chip fits on one line by content.
   Dated 2026-11-01 (owner ruling 15 #944): the phone tier keeps the box's earlier size -- 12px type, 6px 12px of
   padding, an 8px gap, and the company mark at 11px with 1px 8px of padding -- so a company account fits on one line
   with its name giving way; at the bigger size of 15 #931 the fixed labels of a company account in English needed more
   room than the box has at 390px, so the name shrank to nothing and the labels ran past the box's border. Above this
   tier the bigger
   box stays. The sizes are a rule of their own after the one-line rules, so the wrapping rules stay free of lengths. */
@media (max-width: 640px) {
    .kp-account-bar { padding-inline: 16px; }
    .kp-account-chip { flex-wrap: nowrap; }
    .kp-account-chip > * { flex-shrink: 0; }
    .kp-account-chip > .kp-account-name { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .kp-account-chip { gap: 8px; padding: 6px 12px; font-size: 12px; }
    .kp-account-mark { padding: 1px 8px; font-size: 11px; }
}

/* ---- the company's eligibility, under the account it belongs to (2026-10-18) ----
   A grace period or a suspension, drawn on every signed-in page of a company account. The notice itself is the shipped
   corporate notice family (components.css, gold for grace, crimson for a refusal); this block only places it in the
   shell, on the account indicator's own gutters, and lays out its two recovery links. Neither mockup draws it. */
.kp-company-banner { padding: 10px 24px 0; }
.kp-company-banner-text { margin: 0; }
.kp-company-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 6px 0 0;
}
.kp-company-banner-links a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
@media (max-width: 640px) {
    .kp-company-banner { padding-inline: 16px; }
}

/* ---- the account question, drawn by the shared renderer on three screens ---- */
.kp-choice { display: block; }
.kp-choice-title {
    margin: 0 0 6px;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}
/* The required marker rides the title because the FIELD here is the group, and the group's label is its
   title -- the per-field standard's own shape, applied to a question answered by a set of radios. */
.kp-choice-title .field-required-marker { margin-inline-start: 4px; }
.kp-choice-intro {
    margin: 0 0 14px;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}
.kp-choice-group { display: flex; flex-direction: column; gap: 8px; }
/* The group is the field, so the group is what turns red. A border cannot be used -- the tiles inside
   carry their own -- so the invalid state is an outline, which does not move a single tile by a pixel. */
.kp-choice-group.is-invalid {
    outline: 1px solid var(--status-alert-fg);
    outline-offset: 6px;
}
.kp-choice-group:focus-visible { outline: 2px solid var(--color-portal-action); outline-offset: 4px; }
.kp-choice-heading {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.kp-choice-heading:first-child { margin-top: 0; }
/* The tile itself is the register form's; only the two things this list adds are declared here. The
   `flex: 1` the borrowed family sets for its two-across row is neutralised so a column of tiles keeps its
   natural height instead of sharing one out. */
.kp-choice-tile { flex: 0 0 auto; }
.kp-choice-name { min-width: 0; overflow-wrap: anywhere; }
.kp-choice-mark {
    margin-inline-start: auto;
    padding: 1px 8px;
    border-radius: var(--kp-radius-full);
    color: var(--color-portal-action);
    background: rgb(0 51 160 / .08);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}
.kp-choice-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
}
/* "Show more companies" is a secondary reading beside a primary action, so it is drawn as a quiet link
   rather than a second button competing with Continue. */
.kp-choice-more {
    color: var(--color-portal-action);
    background: none;
    border: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.kp-choice-confirm { margin-inline-start: auto; }
/* A PHONE NUMBER SITS ON THE ARABIC PAGE'S OWN SIDE (dated 2026-11-10). The phone inputs carry dir="ltr" so the
   digits read left to right, and on the Arabic page the value then sat on the left, away from every other field's
   text. The rendered reference keeps the number's direction and puts it on the right (its phone input computes
   direction ltr with text-align right in Arabic, start in English), so a left-to-right phone input on a right-to-left
   page aligns to its own end, which is that page's start. English is untouched. The rule names the two inputs the
   recorded item names, the sign-up form's phone and the Personal Data phone; the company and delegate phone inputs
   were not measured against the reference and keep their alignment. */
html[dir="rtl"] body.kp-portal :is(input#phone, input#personalDataPhone)[type="tel"][dir="ltr"] { text-align: end; }

/* A LOCKED CHOICE LOOKS LOCKED (dated 2026-11-10). While the confirm is on its way every radio is disabled and a
   press changes nothing, but a tile kept its pointer cursor and took the hover accent, and the disabled "More" kept
   its link colour. A locked tile now shows the default cursor and keeps its resting border under the pointer, and a
   disabled "More" reads in the muted ink with no underline. The picked tile keeps its selected look (its own rule
   outweighs the hover one below), and the loading control keeps its spinner. */
.kp-choice-tile:has(input:disabled) { cursor: default; }
.kp-choice-tile:has(input:disabled):not(:has(input:checked)):hover { border-color: var(--color-border); }
.kp-choice-more:disabled { color: var(--color-text-muted); text-decoration: none; cursor: default; }

/* ---- where the question sits inside each of its two sign-in screens ---- */
/* The login card's fourth panel: the same inner padding its three siblings live in. */
.ref-login-choose { padding: 4px 0 0; }
/* The journey's third full-page state: the entry column's own frame, so the step reads as one of the
   journey's screens rather than as something that arrived over it. */
.verify-choose-state {
    width: min(520px, 100%);
    margin: 24px auto;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-xl);
    background: var(--color-bg-surface);
}

/* ============================================================
   THE DELEGATION PAGE -- an individual account's standing collection delegates
   (owner rulings 15 #554-#567; portal mockup v2 power-of-attorney.html, its page block in
   css/app.bundle.css from :23336, the generic .poa-* rules :6172-:6269 and its @media arms)

   Every length below is the reference's RENDERED value, measured in both languages at 1440, 1170, 900, 680, 390
   and 360 (the reference measurement table of 2026-10-18); the reference states them in px and paints the same
   px in Arabic and English. Colours are the official palette and the shared grey ramp, never a raw package value:
   the reference's danger red family (three tints of a red outside the official palette) and its pre-rebrand success green are painted
   in the official red and green (Core Rule 13's palette clause), and its near-black heading ink, which has no token,
   takes the page's own text colour.

   Scoped to [data-surface="standing"], the section's standing arm, so the tracking sheet's block and the company page draw
   exactly as before. Logical properties only. Departures, each recorded in the page's documentation:
   - THE NAME WRAPS WHOLE (owner rulings 15 #589 / #596): the reference cuts a long name with an ellipsis and,
     at phone widths, lets the card run wider than its column; here the name breaks onto as many lines as it
     needs and the card, its Remove button and the count always stay inside the column.
   - every field keeps the house message reserve under it (the delegates form's footer rule above), so the
     submit button never moves under the pointer when a field paints its message.
   Dated 2026-11-15 (owner ruling 15 #1424): the company page draws its current delegates in this card too, so every rule
   below that styles the list, the card and what the card draws, and the card's Delete, also names
   [data-surface="company"] beside the standing selector at the same weight: one attribute in place of the other and the
   same classes, while the containing-block rule further down names the company page's own frame class (.dg-page) in
   place of the standing page's. The details rules for the Civil ID and phone lines, which the card no longer draws, are
   removed with this change. The rest of this block (the introduction, the form, the list heading, the empty box) stays
   the standing arm's alone, and the tracking sheet's block keeps its own rows.
   ============================================================ */
.dg-section[data-surface="standing"] { margin-top: 0; }
[data-surface="standing"] .poa-panel { display: block; }

[data-surface="standing"] .poa-intro,
[data-surface="standing"] .poa-form,
[data-surface="standing"] .poa-card,
[data-surface="company"] .poa-card,
[data-surface="standing"] .dg-waiting {
    border: 1px solid var(--kp-gray-100);
    border-radius: var(--kp-radius-md);
    background: var(--kp-white);
}

[data-surface="standing"] .poa-intro { min-height: 95.5px; margin: 0 0 21.25px; padding: 21.25px; }
[data-surface="standing"] .poa-intro-row { display: flex; align-items: flex-start; gap: 12.75px; }
[data-surface="standing"] .poa-intro-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    height: 51px;
    flex: 0 0 51px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-portal-icon-tint-blue);
}
[data-surface="standing"] .poa-intro-icon img { width: 34px; height: 34px; object-fit: contain; }
[data-surface="standing"] .poa-intro-copy { min-width: 0; }
/* The introduction's heading (owner ruling 15 #605, dated 2026-10-18), at the reference's measured values in both
   languages and at every width it was read (1440 and 390): 17px bold on a 25.5px line, 4.25px above the sentence. */
[data-surface="standing"] .poa-intro h2 {
    margin: 0 0 4.25px;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 25.5px;
    letter-spacing: normal;
}
[data-surface="standing"] .poa-intro p { margin: 0; color: var(--kp-gray-500); font-size: 12.75px; line-height: 20.71875px; }

[data-surface="standing"] .poa-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 55px;
    margin: 0 0 21.25px;
    padding: 14.875px 17px;
    gap: 8.5px;
    border: 2px dashed var(--kp-navy-600-a30);
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-postal-navy-600);
    font-size: 14.875px;
    font-weight: 600;
    line-height: 21.25px;
    cursor: pointer;
    transition: color .2s, background-color .2s, border-color .2s, transform .14s;
}
[data-surface="standing"] .poa-add .icon { width: 17px; height: 17px; }
[data-surface="standing"] .poa-add:hover,
.dg-page .dg-add:hover { border-color: var(--kp-postal-navy-600); background: var(--kp-navy-600-a05); }

[data-surface="standing"] .poa-form { margin: 0 0 21.25px; padding: 21.25px; gap: 0; }
[data-surface="standing"] .poa-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38.25px;
    margin-bottom: 17px;
}
[data-surface="standing"] .poa-form-heading > div { display: flex; align-items: center; gap: 10.625px; }
[data-surface="standing"] .poa-form-heading > div > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38.25px;
    height: 38.25px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-navy-600-a10);
    color: var(--kp-postal-navy-600);
}
[data-surface="standing"] .poa-form-heading .icon { width: 17px; height: 17px; }
[data-surface="standing"] .poa-form-heading h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 27.625px;
    letter-spacing: normal;
}
[data-surface="standing"] .poa-form-heading > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-gray-500);
    transition: background-color .2s;
}
[data-surface="standing"] .poa-form-heading > button:hover { background: var(--kp-gray-100); }

/* ONE COLUMN AT EVERY WIDTH, as the reference draws it -- the older surfaces' two-column step does not apply.
   (Dated 2026-10-20, owner ruling 15 #671: two columns from 600 px, superseding the reference's single column for this
   form -- the column step now comes from the shared .dg-fields rule, one column below 600 px; only the gap is set here.) */
[data-surface="standing"] .poa-fields { gap: 12.75px; }
[data-surface="standing"] .poa-fields .ref-field { gap: 0; }
/* The label row only, never the inline message the validation engine inserts as a direct span of the same label
   (dated 2026-10-20): at this weight the caption ink outranked the portal's red message rule, so every message read
   grey. :where() keeps this rule's weight. */
[data-surface="standing"] .poa-fields .ref-field > span:where(:not(.field-error-msg)) {
    justify-content: flex-start;
    gap: 6.375px;
    margin: 0 0 6.375px;
    color: var(--kp-gray-700);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
}
[data-surface="standing"] .poa-fields .ref-field > span > span { display: inline-flex; align-items: center; gap: 6.375px; }
[data-surface="standing"] .poa-fields .ref-field span svg.icon { width: 14.875px; height: 14.875px; opacity: .65; }
[data-surface="standing"] .poa-fields .ref-field input {
    min-height: 44.5px;
    height: 44.5px;
    padding: 10.625px 14.875px;
    font-size: 14.875px;
    line-height: 21.25px;
}
/* The resting border only on an UNFLAGGED field (dated 2026-10-18): written on the field rule itself it outranked the
   portal's invalid red (.ref-field input.is-invalid), so every flagged field but the focused one read as clean. */
[data-surface="standing"] .poa-fields .ref-field input:not(.is-invalid) { border-color: var(--kp-gray-200); }
[data-surface="standing"] .poa-fields .ref-field input::placeholder { color: var(--kp-gray-300); }
[data-surface="standing"] .poa-fields .ref-field input:focus:not(.is-invalid) {
    border-color: var(--kp-postal-navy-600);
    box-shadow: 0 0 0 2px var(--kp-navy-600-a10);
}
[data-surface="standing"] .poa-form .form-validation-msg { margin-top: 12.75px; }

[data-surface="standing"] .poa-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46.75px;
    margin-top: 17px;
    padding: 12.75px 0;
    gap: 8.5px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-size: 14.875px;
    font-weight: 700;
    line-height: 21.25px;
    cursor: pointer;
    transition: background-color .2s, transform .14s;
}
[data-surface="standing"] .poa-submit .icon { width: 17px; height: 17px; }
[data-surface="standing"] .poa-submit:hover { background: var(--kp-navy-600-a90); }

[data-surface="standing"] .poa-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 21.25px;
    gap: 4.25px 12.75px;
    margin: 0 0 12.75px;
    padding: 0 4.25px;
}
[data-surface="standing"] .poa-list-head h3 {
    margin: 0;
    color: var(--kp-gray-700);
    font-size: 15.125px;
    font-weight: 700;
    line-height: 21.25px;
    letter-spacing: normal;
}
[data-surface="standing"] .poa-list-head > span { color: var(--kp-gray-400); font-size: 12.75px; line-height: 17px; }

[data-surface="standing"] .poa-list, [data-surface="company"] .poa-list { display: grid; gap: 12.75px; margin: 0; padding: 0; list-style: none; }
[data-surface="standing"] .poa-card, [data-surface="company"] .poa-card { min-height: 121px; min-width: 0; padding: 17px; transition: border-color .2s, background-color .2s; }
[data-surface="standing"] .poa-card-row, [data-surface="company"] .poa-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 85px;
    gap: 12.75px;
}
[data-surface="standing"] .poa-card-main, [data-surface="company"] .poa-card-main { display: flex; align-items: flex-start; flex: 1; min-width: 0; gap: 12.75px; }
[data-surface="standing"] .poa-person-icon, [data-surface="company"] .poa-person-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42.5px;
    height: 42.5px;
    flex: 0 0 42.5px;
    border-radius: var(--kp-radius-full);
    background: var(--kp-portal-icon-tint-blue);
    color: var(--kp-postal-navy-600);
}
[data-surface="standing"] .poa-person-icon .icon, [data-surface="company"] .poa-person-icon .icon { width: 21.25px; height: 21.25px; }
[data-surface="standing"] .poa-card-copy, [data-surface="company"] .poa-card-copy { flex: 1; min-width: 0; }
[data-surface="standing"] .poa-card-name, [data-surface="company"] .poa-card-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4.25px 8.5px;
    margin: 0 0 4.25px;
}
/* THE NAME WRAPS WHOLE (15 #589 / #596): no ellipsis, no clip, as many lines as it takes -- a long name breaks
   between words, and a single unbroken word breaks inside itself rather than pushing the card wider. */
[data-surface="standing"] .poa-card-name > p, [data-surface="company"] .poa-card-name > p {
    min-width: 0;
    max-width: 100%;
    margin: 0;
    color: var(--color-text);
    font-size: 15.125px;
    font-weight: 700;
    line-height: 21.25px;
    white-space: normal;
    overflow-wrap: anywhere;
}
@keyframes dg-poa-breathe {
    0%, 100% { box-shadow: 0 0 0 0 var(--kp-green-700-a00); }
    50% { box-shadow: 0 0 0 5px var(--kp-green-700-a09); }
}
[data-surface="standing"] .poa-card-details, [data-surface="company"] .poa-card-details { color: var(--kp-gray-500); font-size: 12.75px; line-height: 17px; }
[data-surface="standing"] .poa-card-details > p, [data-surface="company"] .poa-card-details > p { margin: 4.25px 0 0; color: var(--kp-gray-400); font-size: 11px; line-height: 17px; }
[data-surface="standing"] .poa-revoke, [data-surface="company"] .poa-revoke {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6.375px;
    min-height: 31.75px;
    padding: 6.375px 12.75px;
    border: 1px solid var(--kp-red-700-a25);
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-red-600);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 17px;
    cursor: pointer;
    transition: background-color .2s, transform .14s;
}
[data-surface="standing"] .poa-revoke .icon, [data-surface="company"] .poa-revoke .icon { width: 14.875px; height: 14.875px; }
[data-surface="standing"] .poa-revoke:hover, [data-surface="company"] .poa-revoke:hover { background: var(--kp-red-700-a05); }

/* THE CURRENT DELEGATE'S CARD (dated 2026-11-13, owner rulings 15 #1375(a), #1384; boards Main and PortalDelegationAr, rows at
   :85 and :115): the full Civil ID is the title in the name's own style (the .poa-card-name > p rule above), so the
   section's muted mono number face is lifted from it here; the switch and the Delete stand together at the card's end, 12.75px
   apart, and below 600px they take their own line at the card's end so a phone never scrolls sideways. */
[data-surface="standing"] .poa-card-name .dg-civil-id, [data-surface="company"] .poa-card-name .dg-civil-id { color: inherit; font-family: var(--font-portal-bilingual); font-size: inherit; }
[data-surface="standing"] .poa-card-actions, [data-surface="company"] .poa-card-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 12.75px; }
@media (max-width: 599.98px) {
    [data-surface="standing"] .poa-card-row, [data-surface="company"] .poa-card-row { flex-wrap: wrap; }
    [data-surface="standing"] .poa-card-main, [data-surface="company"] .poa-card-main { flex: 1 1 100%; }
    [data-surface="standing"] .poa-card-actions, [data-surface="company"] .poa-card-actions { margin-inline-start: auto; }
}

/* The company page's own row (owner ruling 15 #1384: the same content in its own layout): the number is its title in the
   row's name style, and the switch and the Delete share one line at the row's start, wrapping on a narrow phone. The Delete
   takes the standing card's outlined red family.
   Dated 2026-11-15 (owner ruling 15 #1424): the company page no longer has a row of its own; its current delegates are
   drawn in the card above, whose rules name the company surface, so the row's rules that stood here (its title, its
   actions line and its Delete with the hover and locked states) were removed with the markup that alone read them. */

/* THE DELEGATE'S SWITCH (dated 2026-11-13, owner ruling 15 #1375(a)). The DesignSystem's open/closed toggle (.sched-switch)
   lends its markup, its 8px gap, its weight, its 2px knob offsets and its checked slide, which follows the page's direction;
   the approved boards draw a smaller, navy control, so its size and colours are set here for this section only: a 31.75px
   control with 4px inline padding, a 36x20 track (gray-300 Off, postal navy On), a 16x16 knob on white with no shadow, a
   12.75px word in gray-700 On and gray-500 Off. The family's input is invisible (opacity 0), so the keyboard focus is drawn
   on the track, in the shape of the Portal's own focus rule. */
body.kp-portal .dg-section .sched-switch { min-block-size: 31.75px; padding-inline: 4px; }
body.kp-portal .dg-section .sched-switch .track { width: 36px; height: 20px; background: var(--kp-gray-300); }
body.kp-portal .dg-section .sched-switch .track::after { width: 16px; height: 16px; background: var(--kp-white); box-shadow: none; }
body.kp-portal .dg-section .sched-switch input:checked + .track { background: var(--kp-postal-navy-600); }
body.kp-portal .dg-section .sched-switch .state-lbl { font-size: 12.75px; }
body.kp-portal .dg-section .sched-switch input:checked ~ .state-lbl { color: var(--kp-gray-700); }
body.kp-portal .dg-section .sched-switch input:not(:checked) ~ .state-lbl { color: var(--kp-gray-500); }
body.kp-portal .dg-section .sched-switch input:focus-visible + .track { outline: 2px solid var(--color-portal-focus-ring); outline-offset: 2px; }
/* The family's label declares the pointer; the switch's own checkbox takes the label's cursor, and while the press lock
   disables it the label says not-allowed, so the hand never promises a press the lock refuses (the Portal's rule for a
   label that dresses a checkbox, 2026-09-11). */
.sched-switch:has(input:disabled) { cursor: not-allowed; }
.sched-switch input { cursor: inherit; }
/* THE SWITCH SHOWS ITS WRITE IS ON ITS WAY (dated 2026-11-14, rulings 15 #198c and #1375(a)). The press lock gives the
   invisible checkbox the shared loading class, whose ring cannot paint on a zero-sized input, so the same ring - the
   lock's 2px stroke at 40% beside a solid head, its spin, standing still under reduced motion - is drawn on the visible
   track, over the knob in the knob's own place: a 12px ring centred on the 16px knob (2px knob offset + 2px), at the
   start edge while Off and 16px further while On (the checked slide), set with logical offsets so it follows the page's
   direction. It sits above the knob (the track's ::after) and moves nothing: the track keeps its size and the label its
   width. */
body.kp-portal .dg-section .sched-switch input.btn-loading + .track::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset-block-start: 4px;
    inset-inline-start: 4px;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 2px solid color-mix(in srgb, var(--kp-postal-navy-600) 40%, transparent);
    border-inline-start-color: var(--kp-postal-navy-600);
    border-radius: var(--kp-radius-full);
    animation: kp-btn-spin .8s linear infinite;
}
body.kp-portal .dg-section .sched-switch input.btn-loading:checked + .track::before { inset-inline-start: 20px; }
@media (prefers-reduced-motion: reduce) {
    body.kp-portal .dg-section .sched-switch input.btn-loading + .track::before { animation: none; }
}

[data-surface="standing"] .poa-add:active,
.dg-page .dg-add:active,
[data-surface="standing"] .poa-submit:active,
[data-surface="standing"] .poa-revoke:active,
[data-surface="company"] .poa-revoke:active { transform: scale(.98); transition-duration: .14s; }

/* A LOCKED DELETE SAYS SO (dated 2026-11-15; the 2026-08-27 ruling that a control the pointer can reach but cannot use
   says so: the not-allowed cursor and no hover accent). While a switch write on the same row is on its way the row's
   Delete is disabled, yet the standing card's Delete kept the pointer cursor, the hover tint and the press scale, and
   the company row's Delete kept the hover tint. A disabled Delete now computes the not-allowed cursor and keeps its
   resting background and size under the pointer. Its opacity is NOT changed: the lock passes with the answer, and a
   passing lock keeps the resting look, so nothing dims on every switch press.
   Dated 2026-11-15 (owner ruling 15 #1424): the company page's Delete is now the card's, so these rules name the card's
   Delete on both surfaces; the company row's Delete they named is gone. */
[data-surface="standing"] .poa-revoke:disabled,
[data-surface="company"] .poa-revoke:disabled { cursor: not-allowed; }
[data-surface="standing"] .poa-revoke:disabled:hover,
[data-surface="company"] .poa-revoke:disabled:hover { background: transparent; }
[data-surface="standing"] .poa-revoke:disabled:active, [data-surface="company"] .poa-revoke:disabled:active { transform: none; }

[data-surface="standing"] .poa-empty { margin: 0; border-color: var(--kp-gray-200); background: var(--kp-white); }
[data-surface="standing"] .dg-waiting { padding: 21.25px; }

/* THE LIST REGION'S LOADING SKELETON (rulings 15 #198c and #218; dated 2026-10-19). While the section refetches (a
   page change, an add, a removal) the page's script lays the template's layer over every card, or over the empty box,
   and the count takes the shared skeleton shimmer; the pressed control carries the shared lock. Until this date the
   list, the empty box and the count only pulsed their opacity (the shared veil keyframes), which a branch-close audit
   found short of the rulings: the rows being replaced stayed readable underneath, so nothing said they were about to
   change. The layer covers its region in place - absolute over the card's or the box's padding box, with the region's
   own padding and corner and its opaque white - so nothing on the page moves, presses pass through it, and the
   shared skeleton's reduced-motion rule stops its shimmer. */
.dg-standing-page #delegatesHost { position: relative; }
.dg-standing-page [data-surface="standing"] .poa-card,
.dg-page [data-surface="company"] .poa-card,
.dg-standing-page [data-surface="standing"] .poa-empty { position: relative; }

/* Dated 2026-10-31 (rulings 15 #198c and #218): the tracking sheet and the company delegates page lay the same layer
   over their rows and their empty box (the template sits in their section), so those regions are the layer's
   containing block there too. On the sheet the host's own veil above still pulses over the section, and the rows
   beneath it are now covered rather than only dimmed.
   Dated 2026-11-15 (owner ruling 15 #1424): the company page's current delegates are cards now, made the layer's
   containing block by the rule above (inside the page's .dg-page frame, as the standing page's cards are inside theirs). */
.dg-row,
.dg-empty { position: relative; }

.dg-region-skeleton {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    align-content: center;
    gap: var(--kp-space-sm);
    overflow: hidden;
    padding: inherit;
    border-radius: inherit;
    background: var(--kp-white);
    pointer-events: none;
}

.dg-region-skeleton .skeleton-text { display: block; margin-block-end: 0; }

.dg-region-skeleton .skeleton-text + .skeleton-text { width: 55%; }

/* The count's resting colour outweighs a lone class, so the digits are hidden here at a weight above it; the shimmer
   itself is the shared skeleton class's own background and motion. */
.dg-standing-page [data-surface="standing"] .poa-list-head > [data-role="delegates-count"].skeleton { color: transparent; }

/* The reference's 639px arm. Dated 2026-10-18 (the rendered comparison): the reference's 720px arm is NOT ported -
   its intro and card values lose to the page block that follows it in the reference's own sheet, so the rendered
   page at 680 keeps the wide values (intro 95.5px tall with 21.25px padding, card 121px with 17px padding), and the
   card keeps its 121px floor in the 639px arm too (measured at 600, 390 and 360). */
@media (max-width: 639px) {
    [data-surface="standing"] .poa-intro { min-height: 0; padding: 17px; }
    [data-surface="standing"] .poa-intro-icon { width: 46px; height: 46px; flex-basis: 46px; }
    [data-surface="standing"] .poa-intro-icon img { width: 30px; height: 30px; }
    [data-surface="standing"] .poa-card, [data-surface="company"] .poa-card { padding: 14px; }
    [data-surface="standing"] .poa-card-row, [data-surface="company"] .poa-card-row { min-height: 0; }
    [data-surface="standing"] .poa-card-main, [data-surface="company"] .poa-card-main { gap: 9px; }
    [data-surface="standing"] .poa-person-icon, [data-surface="company"] .poa-person-icon { width: 38px; height: 38px; flex-basis: 38px; }
    [data-surface="standing"] .poa-revoke, [data-surface="company"] .poa-revoke { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    [data-surface="standing"] .poa-add,
    .dg-page .dg-add,
    [data-surface="standing"] .poa-submit,
    [data-surface="standing"] .poa-revoke,
    [data-surface="company"] .poa-revoke { transition: none; }
}

/* THE STICKY HEADER'S CLEARANCE (2026-10-18). On these pages the window scrolls and the header stays at its top, so a
   control the keyboard reaches near the top could rest under the header: measured on the tracking page at 740x360, Tab
   from the list's title to the first request's open button left it at 47px (Arabic) and 54px (English) under a 60px
   header, because a focus scroll moves nothing for a control already inside the window. The window's scroll padding is
   the header's own height plus 6px for the 4px focus ring and a whole-pixel stop (the same allowance as the signed-in
   column's scroll padding), so a focus or an arrival scroll stops below the header. The header's geometry is unchanged.
   (Dated 2026-10-19: moved here from the shared components.css, which the Admin loads too - the Admin's root scroll
   padding is set once, by its own sheet's measured-bar rule. Every page that renders this header loads this sheet after
   components.css, so the cascade and the measured clearance are unchanged.) */
html:has(.corp-header) { scroll-padding-block-start: calc(96px + 6px); } /* 15 #1208: the header grew to 96px (was 60px, 64px from 769px) */
@media (min-width: 769px) {
    html:has(.corp-header) { scroll-padding-block-start: calc(96px + 6px); }
}
/* The other sticky headers the 80px logo grew (15 #1208; dated 2026-11-08), the same allowance, each at its own heights and
   breakpoints in components.css: Register 88px, 96px from 640; account type and terms 96px, 88px at 800 and under; the
   verify step 88px, 96px from 1024, only while that state shows, because the verify entry state's header does not stick. */
html:has(.user-header) { scroll-padding-block-start: calc(88px + 6px); }
@media (min-width: 640px) {
    html:has(.user-header) { scroll-padding-block-start: calc(96px + 6px); }
}
html:has(.ref-account-page .ref-header) { scroll-padding-block-start: calc(96px + 6px); }
@media (max-width: 800px) {
    html:has(.ref-account-page .ref-header) { scroll-padding-block-start: calc(88px + 6px); }
}
html:has(.verify-step-state:not(.hidden) .verify-mobile-header) { scroll-padding-block-start: calc(88px + 6px); }
@media (min-width: 1024px) {
    html:has(.verify-step-state:not(.hidden) .verify-mobile-header) { scroll-padding-block-start: calc(96px + 6px); }
}

/* ==== THE BRANCHES PAGE (/Branches, owner ruling 15 #680) ============================================================
   The portal design's branch finder (branches.html, rendered by its static-app.js), copied from the RENDERED page's
   winning cascade at 1440, 768 and 390 in both languages (measured 2026-10-21). The design's last layer is scoped to its
   own page hook; here the page's own root class `.branches-layout` (and `:has()` on the shell for the two shell values
   the design changes on this page) does the same job.
   HOUSE-LAW CONVERSIONS, each recorded in the page's documentation: every colour is an official palette token (the
   design's #115ee8 family maps to the navy, its #d4a017 to the stamp gold, its greens to the official green); every
   physical side is a logical one, and where the design used a physical side the two languages are written apart
   (html[dir="ltr"]) so each language keeps the side the design gives it; the sample distance chips are not drawn.
   Two bands, as the design has them for this page: the side-by-side finder from 721px up, the stacked list/map switch
   at 720px and below. */

/* The design removes the wrap's side padding on this page and gives the title its own; at the icon-only rail band the
   wrap keeps 24px and the title none. */
@media (min-width: 721px) {
    .rp-shell:has(.branches-layout) .rp-wrap { padding-inline: 0; }
    .rp-shell:has(.branches-layout) .rp-title { width: auto; margin: 25.5px 34px 0; }
}
/* Dated 2026-11-07 (15 #1117, "the map takes the rest of a big screen", with the approved proposal 15 #1120): from 1024px up
   the page drops the shared portal content cap, so the map takes the rest of the window and no empty band stays beside the
   page at 2560 or 1920; every other portal page keeps the cap. The layout is the content column less the proposal's 17px on
   each side, in both languages, so the list and the map take the proposal's widths (rows 4 to 6). */
@media (min-width: 1024px) {
    .rp-shell:has(.branches-layout) { --branches-outer: 17px; }
    .rp-shell:has(.branches-layout) .rp-wrap { max-width: none; padding-inline: var(--branches-outer); }
    /* Dated 2026-11-07 (15 #1120, the approved proposal's .ptitle margin 34px, proposal :61; the approved proposal is the
       truth for this measure, 2026-11-07): the title stays 34px from the menu as on the proposal, so inside the wrap's
       outer gap its own inline margin is the rest. */
    .rp-shell:has(.branches-layout) .rp-title { margin-inline: calc(34px - var(--branches-outer)); }
}
@media (min-width: 721px) and (max-width: 1023px) {
    .rp-shell:has(.branches-layout) .rp-wrap { padding-inline: 24px; }
    .rp-shell:has(.branches-layout) .rp-title { margin: 25.5px 0 0; }
}

/* Dated 2026-11-07 (owner ruling 15 #1120): one scroller. The page column (.rp-content) is the only thing that scrolls;
   the layout takes its content's height and the map stays in view beside the list. The layout stood here as a panel
   80px less than the window (height: calc(100vh - 80px)), which assumed 80px of top chrome while the pinned header and
   account row take 201px, so the page and the list each scrolled. */
.branches-layout { display: flex; gap: 0; align-items: flex-start; }

/* ---- the map ---- */
/* Dated 2026-11-07 (15 #1120, #1117): the map holds the top of the column while the list moves, and takes the width the
   list leaves; the list stops at 520px, its padding included. The map's height is the window less the pinned band, and
   its former 606px floor is gone with the panel. */
/* Dated 2026-11-12 (owner ruling 15 #1358): the box's height is the window less the pinned band at every window height,
   and the former 380px floor is gone. On a short window (500px tall: a 299px column) the floor made the box taller than
   the column, so the map's credit corner stayed below the window for most of the list and, at its end, the switch row
   went under the band; the box now follows the column there (299px), so both stay on screen. On a window tall enough
   for a column of 380px or more the floor never bound, so nothing changes there. */
.branch-map-wrap {
    position: sticky;
    inset-block-start: 0;
    width: max(58%, calc(100% - 520px));
    height: calc(100dvh - var(--rp-strip));
    padding: 17px;
}
.branch-map {
    width: 100%;
    height: 100%;
    background: var(--kp-slate-edge-soft);
    box-shadow: 0 14px 36px -14px rgb(15 23 42 / .2);
    /* The map library's panes and controls carry their own z-index values (400 to 1000); isolating the map keeps them
       inside it, so the shell's bars, dialogs and the legend below stay above the map.
       Dated 2026-11-06, 15 #1058: the legend is gone, because the data has no branch type. */
    isolation: isolate;
}
/* The map pins: a white-ringed disc in the branch type's colour, its mark turned as the design turns it.
   Dated 2026-11-06, 15 #1058: one colour and one mark, because the data has no branch type. */
.leaflet-branch-pin span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid var(--kp-white);
    border-radius: 50%;
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    box-shadow: 0 3px 10px rgb(15 23 42 / .38);
    transform: rotate(-45deg);
}
.leaflet-branch-pin .branch-ph-icon { width: 16px; height: 16px; }
/* Where the person is: decorative, so it carries no popup and no label (15 #1058). */
.branch-user-pin span {
    display: block;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border: 3px solid var(--kp-white);
    border-radius: 50%;
    background: var(--kp-postal-navy-600);
    box-shadow: 0 3px 10px rgb(15 23 42 / .38);
}
/* ---- the map's top band: the view switch and the unavailable line (owner rulings 15 #1300, #1297; 2026-11-12) ---- */
/* The band sits over the map at its top, beside the map's box and never inside the map library's container, at the
   corner opposite the zoom control: the library draws that control top left in both languages, so the band's physical
   right is its inline start in Arabic and its inline end in English, and the per-direction rules name each side. Its
   insets are the map's own place in the wrap (the wrap's 17px padding) plus the library's 10px control margin, and on
   the zoom side the control's 34px width and an 8px gap, so the band starts past the control's column. The band itself
   takes no pointer; only the switch does. The line follows the switch in the band's row and wraps under it when the row
   is too narrow for its sentence. */
.branch-map-top {
    position: absolute;
    inset-block-start: 27px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}
html[dir="rtl"] .branch-map-top { inset-inline: 27px 69px; flex-direction: row; }
html[dir="ltr"] .branch-map-top { inset-inline: 69px 27px; flex-direction: row-reverse; }
/* The switch: the sizes, radius and colours of the page's phone list/map switch (.branch-mobile-toggle), which exists
   only at 720px and below; its pressed button wears that switch's chosen look, read from aria-pressed as the page's
   own pressed control (#openOnly) is. The lock is the house ring beside the word (.btn-loading). */
.branch-map-views {
    display: flex;
    flex: none;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--kp-white);
    box-shadow: 0 1px 2px rgb(23 37 84 / .04);
    pointer-events: auto;
}
.branch-map-views button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 32.5px;
    padding: 1px 12px;
    border: 0;
    border-radius: var(--kp-radius-md);
    background: transparent;
    color: var(--kp-slate-500);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.branch-map-views button:hover:not([aria-pressed="true"]):not(:disabled) { background: var(--kp-slate-100); }
.branch-map-views button[aria-pressed="true"] {
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    box-shadow: 0 3px 8px rgb(0 51 160 / .18);
}
/* The locked button keeps its rest box (ruling 15 #198c; 2026-11-12, the switch's first design round). The house lock
   draws its 16px ring in flow beside the word, with this button's 7px gap, so the pressed button grew by 23px and, the
   group being anchored at the map's right, the other button moved 23px while the round was held. The button pays for
   the ring out of its own room instead: 2 + 16 + 4 + 2 = 24 = 12 + 12, so its width, the group's width and the other
   button's place hold under the lock, the word still drawn inside the button. Nothing at rest changes.
   Dated 2026-11-13 (ruling 15 #1376(b)): the sum is now 3 + 16 + 2 + 3 = 24 = 12 + 12, 3px of inline padding each side
   and a 2px gap between the ring and the word, so the word keeps room inside the button's content box. */
.branch-map-views button.btn-loading {
    gap: 2px;
    padding-inline: 3px;
}
/* The line, built from the page's nearest-branch strip (.nearest: its 12px words on an 18px line, the navy of the
   card it sits on, white text). Styled only while shown: hidden, it keeps the design system's clip, so it paints
   nothing, and a plain rule here would outrank the clip's size and padding and leave an empty strip on the map. */
.branch-map-unavailable:not(.visually-hidden) {
    flex: 0 1 auto;
    max-width: 100%;
    margin: 0;
    padding: 12px;
    border-radius: var(--kp-radius-md);
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: start;
    box-shadow: 0 1px 2px rgb(23 37 84 / .04);
    pointer-events: none;
}
.branch-popup { display: grid; gap: 5px; min-width: 172px; font-family: var(--font-body); }
.branch-popup span { color: var(--kp-slate-500); font-size: 11px; }
.branch-popup button {
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: var(--kp-postal-navy-600);
    color: var(--kp-white);
    font-size: 11px;
    font-weight: 700;
    /* Dated 2026-11-07 (13-RISKS PBL-POPUP-BUTTON-AR): the mockup's 14.3px line, so the button is 26.3px tall in both
       languages; the browser's own line made it 24px in Arabic. */
    line-height: 1.3;
}
/* Dated 2026-11-07 (15 #1143): the popup carries the chip only for a branch not in service. .branch-open's inline-flex beats
   the browser's own [hidden] rule and no global [hidden] rule is loaded, so the hidden chip needs its own re-rule; the popup
   is a grid, so the chip keeps its own width instead of stretching to the popup's. */
.branch-popup .branch-open[hidden] { display: none; }
.branch-popup .branch-open { justify-self: start; }

/* ---- the side column ---- */
/* Dated 2026-11-07 (15 #1120, #1117): the list runs its full length with no scrollbar of its own (it stood here at the
   panel's full height, scrolling inside it) and stops at 520px, its 23px padding included. */
.branch-sidebar {
    width: min(42%, 520px);
    min-width: 0;
    padding-block: 17px;
    padding-inline: 0 23px;
}
html[dir="ltr"] .branch-sidebar { padding-inline: 23px 0; }
/* Above the phone tier the list's own foot carries the robot's room, so the map stays in view to the very end (15 #1120).
   On a phone the sidebar is display: contents, so the wrap keeps its room there.
   Dated 2026-11-13 (rulings 15 #1374, #1381): on a signed-in phone page the wrap no longer keeps the room: the one end
   space after the copyright line clears the launcher and the bar, and the finder's 80px goes (the block at the end of
   this file). Above the phone tier this page keeps its own foot.
   Dated 2026-11-14 (rulings 15 #1374, #1381): with the launcher the foot's room is the room the other signed-in pages
   keep (the launcher's clearance, --kp-space-md and --kp-space-sm, 159.5px), so at the end of the scroll the line ends
   above the HOVERED launcher (150.8px) as well as the resting one; the placement itself is unchanged. */
/* Dated 2026-11-07 (15 #1120, "one scroller with the map kept in view"; 15 #907, the copyright line on every page): a
   sticky box stops at the end of its own layout, so anything after the layout in the page column pushed the map up under
   the pinned band at the end of the scroll (measured: 92.25px, the column's 42px end padding and the 50px copyright line).
   Above the phone tier nothing follows the layout any more: the column's end padding goes, the list's foot takes the
   copyright line's room as well as the robot's, and the line is drawn in that foot, over the cards' column, above the
   robot's room. */
@media (min-width: 721px) {
    .rp-shell:has(.branches-layout) { --branches-copyright: 50px; --branches-foot-room: 17px; }
    .rp-shell:has(.rp-assistant):has(.branches-layout) {
        --branches-foot-room: calc(var(--rp-assistant-clearance) + var(--kp-space-md) + var(--kp-space-sm));
    }
    .rp-shell:has(.branches-layout) .branch-sidebar { padding-block-end: calc(var(--branches-foot-room) + var(--branches-copyright)); }
    /* Dated 2026-11-07 (15 #1120 with #907): whenever the map box set the page's height (no branch, no match, a failed read,
       a short Open now list on a tall window) the layout ended at the map's foot, so the line drawn in the list's foot stood
       under the robot at rest. The list column is at least the map's
       height plus that foot, so the line always comes after the map's foot and reaches the window above the robot at the
       end of the scroll, as it does after a full list. */
    .rp-shell:has(.branches-layout) .branch-sidebar {
        min-height: calc(max(380px, 100dvh - var(--rp-strip)) + var(--branches-foot-room) + var(--branches-copyright));
    }
    .rp-shell:has(.rp-assistant):has(.branches-layout) .rp-wrap { padding-block-end: 0; }
    .rp-shell:has(.branches-layout) .rp-content { padding-block-end: 0; }
    /* The line keeps the shared line's 50px (one 18px line and 16px above and below) and centres its text in it, so a
       narrow column's two lines fit the same room.
       The cards' column: the list's width less its 23px padding, at the layout's inline end (the wrap is centred at its
       1632px cap from 1024px up, and keeps 24px each side below 1024px). The padding is on the physical left in both
       languages, so in Arabic it sits at the inline end and in English at the inline start. */
    /* Dated 2026-11-07 (15 #1117, #1120): from 1024px up the wrap has no cap and keeps 17px each side, so the line's end
       margin is that gap and its width the list's share of what the wrap leaves (the rule further below); the formula
       here, which assumes the cap, then holds only from 721px to 1023px, where the rule below that one sets it again. */
    /* Dated 2026-11-07, corrected the same day: the clause just above and the cap sentence before it no longer hold. The
       two declarations here that assume the cap, --branches-wrap-end and inline-size, are set again by the two rules below,
       721px to 1023px by the first and 1024px up by the second, so the capped formula is used only at a fractional window
       width between 1023px and 1024px, which neither of them matches. The rule's other declarations still apply from 721px
       up, its margin-inline taking the end gap each band sets. From 1024px up the wrap has no cap and is not centred at
       1632px: it keeps 17px each side (the 1024px rule that sets --branches-outer). */
    .rp-shell:has(.branches-layout) .portal-copyright {
        --branches-wrap-end: max(0px, (100% - var(--kp-portal-content-max-w)) / 2);
        display: flex;
        align-items: center;
        justify-content: center;
        block-size: var(--branches-copyright);
        inline-size: calc(min(42%, 520px) - 23px);
        margin-block-start: calc(-1 * (var(--branches-foot-room) + var(--branches-copyright)));
        margin-inline: auto calc(var(--branches-wrap-end) + 23px);
        padding: 0;
    }
    html[dir="ltr"] .rp-shell:has(.branches-layout) .portal-copyright { margin-inline-end: var(--branches-wrap-end); }
}
@media (min-width: 721px) and (max-width: 1023px) {
    .rp-shell:has(.branches-layout) .portal-copyright {
        --branches-wrap-end: 24px;
        inline-size: calc(min((100% - 48px) * 0.42, 520px) - 23px);
    }
}
@media (min-width: 1024px) {
    .rp-shell:has(.branches-layout) .portal-copyright {
        --branches-wrap-end: var(--branches-outer);
        inline-size: calc(min((100% - 2 * var(--branches-outer)) * 0.42, 520px) - 23px);
    }
}

.branch-ph-icon { display: block; flex: 0 0 17px; width: 17px; height: 17px; }

.branch-stats {
    width: 100%;
    min-height: 150.25px; /* 2026-10-21, 15 #686: was 150.25px, the height the design gives the card with its nearest-branch strip; the strip is gone, so the card wraps its three counts. 2026-11-06, 15 #1058: the strip is back, so the height is back */
    padding: 17px;
    border-radius: var(--kp-radius-md);
    background: var(--gradient-portal-ticket-spine);
    color: var(--kp-white);
    box-shadow: 0 1px 3px rgb(0 0 0 / .04), 0 4px 12px rgb(0 0 0 / .06);
}
.branch-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-block-end: 13px; } /* 2026-10-21, 15 #686: was 13px, the space above the nearest-branch strip, which is gone. 2026-11-06, 15 #1058: the strip is back, so the space is back; two counts, the Express figure is gone */
.branch-metrics > div + div { padding-inline: 13px; border-inline-start: 1px solid rgb(255 255 255 / .14); }
.branch-metrics > div > span {
    display: block;
    color: var(--kp-navy-100);
    font-size: 9px;
    font-weight: 800;
    line-height: 13.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.branch-metrics b { display: block; margin-block-start: 3px; font-size: 26px; line-height: 1; }
/* The two values shimmer while the list is read (15 #198b). They are empty then, so the shimmer needs a box of its own. */
.branch-metrics .skeleton { display: inline-block; min-width: 1.5em; min-height: 1em; }
.branch-metrics .open { color: color-mix(in srgb, var(--kp-green-700) 45%, var(--kp-white)); }
.branch-metrics .open small { color: rgb(255 255 255 / .75); font-size: 14px; font-weight: 700; }

/* The nearest-branch strip (restored 2026-11-06, 15 #1058, as it stood before 15 #686 took it out). */
.nearest {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    padding-block-start: 12px;
    border-block-start: 1px solid rgb(255 255 255 / .145);
    text-align: start;
}
html[dir="ltr"] .nearest { text-align: end; }
.nearest > .branch-ph-icon {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
    padding: 7px;
    border-radius: var(--kp-radius-md);
    background: rgb(255 255 255 / .1);
    color: var(--kp-stamp-gold-500);
}
.nearest > div { flex: 1; min-width: 0; }
.nearest small {
    display: block;
    color: var(--kp-navy-100);
    font-size: 10px;
    font-weight: 800;
    line-height: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.nearest b { display: block; font-size: 12px; line-height: 18px; }
.nearest button {
    margin: 0;
    padding: 5px 12px;
    border: 0;
    border-radius: 7px;
    background: var(--kp-stamp-gold-300);
    color: var(--kp-postal-navy-600);
    font-size: 11px;
    font-weight: 800;
    line-height: 16.5px;
}
/* Below this width the longer location button squeezed the hint into a column of single words, so it takes its own line
   under the words. The strip's short View button stays beside them. */
@media (min-width: 721px) and (max-width: 1199px) {
    .nearest { flex-wrap: wrap; }
    .nearest button[data-action="branch-locate"] { flex: 1 0 100%; }
}
/* Each of these rules sets display, so the hidden attribute needs its own rule to win (15 #1058). */
.nearest[hidden],
.nearest button[hidden],
.branch-distance[hidden],
.branch-loc > span[hidden],
.branch-actions button[hidden] { display: none; }

/* ---- the phone's list/map switch (shown at 720px and below) ---- */
.branch-mobile-toggle { display: none; }

/* ---- search ---- */
.branch-search { position: relative; margin: 14.875px 0 12.75px; }
.branch-search input {
    width: 100%;
    height: 46.75px;
    padding-block: 12px;
    padding-inline: 39px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    outline: 0;
    background: var(--kp-white);
    color: var(--color-text);
    font-size: 14.875px;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgb(23 37 84 / .03);
}
html[dir="ltr"] .branch-search input { padding-inline: 42px 40px; }
.branch-search input:focus {
    border-color: color-mix(in srgb, var(--kp-postal-navy-400) 45%, var(--kp-white));
    box-shadow: 0 0 0 3px var(--kp-navy-600-a08);
}
.branch-search > .branch-search-icon {
    position: absolute;
    z-index: 1;
    inset-block-start: 50%;
    inset-inline-end: 16px;
    color: var(--kp-slate-400);
    transform: translateY(-50%);
}
html[dir="ltr"] .branch-search > .branch-search-icon { inset-inline: 16px auto; }
.clear-branch-search {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 10px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 1px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--kp-slate-400);
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
}
html[dir="ltr"] .clear-branch-search { inset-inline: auto 10px; }
.clear-branch-search:hover { background: var(--kp-slate-100); color: var(--color-text-muted); }
.clear-branch-search .branch-ph-icon { flex-basis: 15px; width: 15px; height: 15px; }

/* ---- the result line ----
   Dated 2026-11-07 (15 #1119): Open now sits on the result line; its own line is gone. The type filters' row stood above
   it (the .branch-types rules, open now alone in it since 15 #1058); the chip keeps that row's look, at its inline-start
   end, and the count and Clear all sit together at the inline-end, count first in reading order. */
.branch-results {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    min-height: 29.75px;
    margin: 0 0 10.625px;
    padding-inline: 4.25px;
}
.result-count {
    margin: 0;
    color: var(--kp-slate-500);
    font-size: 11px;
    font-weight: 800;
    line-height: 17.875px;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.branch-count-line { display: inline-flex; align-items: center; gap: 12px; }
.branch-count-line button { padding: 0; border: 0; background: transparent; color: var(--kp-postal-navy-600); font-size: 11px; font-weight: 800; }
.branch-results .open-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6.375px;
    min-height: 29.75px;
    padding: 6.375px 12.75px;
    border: 0;
    border-radius: 20px;
    background: var(--kp-white);
    color: var(--kp-slate-550);
    font-size: 12.75px;
    font-weight: 800;
    line-height: 17px;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px var(--color-border);
}
.branch-results .open-only i { display: block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--kp-green-700); }
.branch-results .open-only.active { background: var(--kp-green-700-a10); color: var(--kp-green-700); }

/* ---- the cards ---- */
.branch-list { display: grid; gap: 12.75px; }
#branchList.grid-loading-host { position: relative; min-height: 200px; }
#branchList.grid-loading-host::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--kp-radius-md);
    background: var(--kp-slate-100);
    animation: shipment-veil .9s ease-in-out infinite alternate;
    pointer-events: none;
}
.branch-item {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* 2026-11-06, 15 #1058: height was also 200px, the mockup's for its short sample addresses; a real address reaches 500 characters, so the height is a floor and the card grows (min-height: 200px stood here). Dated 2026-11-07 (15 #1104, #1120): the floor is gone; a card is as tall as what it holds, and the box (padding, radius, border, gaps) stays the mockup's. */
    padding: 17px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--kp-white);
    box-shadow: 0 1px 2px rgb(15 23 42 / .04);
    cursor: pointer;
    transition: transform .3s var(--ease-smooth-out), box-shadow .3s, border-color .3s;
}
html[dir="rtl"] .branch-item { padding-block: 17px 16px; padding-inline: 20.25px 16px; }
.branch-item:hover {
    border-color: rgb(0 51 160 / .24);
    box-shadow: 0 15px 34px -14px rgb(15 23 42 / .24);
    transform: translateY(-2px);
}
/* Dated 2026-11-07 (15 #1108): the gold border on the pressed card at every width, kept while the pointer is over it; it
   stood in the 720px block, so it showed on phones only. */
.branch-item.selected,
.branch-item.selected:hover {
    border-color: var(--kp-stamp-gold-500);
    box-shadow: 0 0 0 1px rgb(203 160 82 / .16), 0 8px 22px rgb(15 23 42 / .06);
}
/* Dated 2026-11-07 (15 #1104): the head's 47.375px floor is gone with the card's. */
.branch-head {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 12.75px;
    margin-block-end: 12.75px;
}
.branch-kind {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: var(--kp-navy-050);
    color: var(--kp-postal-navy-600);
}
.branch-kind .branch-ph-icon { flex-basis: 20px; width: 20px; height: 20px; }
.branch-title { flex: 1; min-width: 0; line-height: 1; }
.branch-title b {
    display: block;
    overflow: hidden;
    color: var(--color-text);
    font-size: 16px; /* Dated 2026-11-07 (15 #1106): was 15px on a 20.625px line */
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.branch-distance {
    display: inline-block;
    margin-block-start: 5px; /* 2026-11-06, 15 #1058: the rendered mockup's chip; a start margin of 6px stood here for the type chip beside it, which is gone */
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--kp-navy-050);
    color: var(--kp-slate-500);
    font-size: 12px; /* Dated 2026-11-07 (15 #1106, #1146): was 10px; the number and its unit never split */
    font-weight: 600;
    line-height: 13px;
    white-space: nowrap;
}
.branch-open {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--kp-white);
    color: var(--kp-slate-400);
    font-size: 12px; /* Dated 2026-11-07 (15 #1106): was 9px on a 13.5px line */
    font-weight: 800;
    line-height: 16px;
    box-shadow: 0 1px 4px rgb(15 23 42 / .08);
    animation: dg-poa-breathe 2.8s ease-in-out infinite;
}
/* The dot is the design's 7px disc with the head's chip padding (2px 6px) also landing on it, so it renders a 12x7
   ellipse 5px below its line: measured on the rendered design at 1440 and 390, both languages.
   Dated 2026-11-07 (owner ruling 15 #1118): every chip draws a round 8px dot centred on its words in place of that oval. */
.branch-open > span { flex: 0 0 8px; width: 8px; height: 8px; margin-block-start: 0; border-radius: 50%; background: var(--kp-slate-400); }
.branch-open.is-open { color: var(--kp-green-700); }
.branch-open.is-open > span { background: var(--kp-green-700); }
/* Dated 2026-11-07 (15 #1104, #1107): a branch under maintenance or temporarily closed is a normal card; only its chip
   differs, red for temporarily closed, the gold pair for under maintenance. */
.branch-open.is-temporarily-closed { border-color: var(--kp-red-700); background: rgb(200 16 46 / .08); color: var(--kp-red-700); }
.branch-open.is-temporarily-closed > span { background: var(--kp-red-700); }
.branch-open.is-maintenance { border-color: var(--kp-stamp-gold-500); background: var(--kp-stamp-gold-300); color: var(--kp-slate-900); }
.branch-open.is-maintenance > span { background: var(--kp-postal-navy-700); }
.branch-loc {
    display: grid;
    gap: 6px;
    margin: 0 0 12.75px;
    color: var(--kp-slate-500);
    font-size: 13px; /* Dated 2026-11-07 (15 #1106): was 11px on a 17px line */
    line-height: 19px;
}
.branch-loc > span { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 7px; }
.branch-loc > span > [data-role="address"] { min-width: 0; overflow-wrap: anywhere; }
.branch-loc .branch-ph-icon { flex-basis: 14px; width: 14px; height: 14px; color: var(--kp-slate-400); }
/* Dated 2026-11-07 (15 #1116, #1144): Call and Directions share the row equally; a card with no saved location has Call
   alone across the row, and a word that cannot fit half the row keeps its own width, uncut. Directions is drawn first in
   the row's own order, so Arabic keeps Call at the left as the mockup does. The row stood here as a reversed flex row,
   Call at its own width and Directions taking the rest. */
.branch-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-block-start: auto; }
.branch-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38.25px;
    padding: 8.5px 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--kp-radius-md);
    background: var(--kp-white);
    color: var(--kp-gray-700);
    font-size: 14.875px;
    font-weight: 800;
    line-height: 1.5;
}
.branch-actions [data-action="branch-call"] { order: 1; padding-inline: 14px; }
.branch-actions [data-action="branch-directions"] { border-color: var(--kp-postal-navy-600); background: var(--kp-postal-navy-600); color: var(--kp-white); }
.branch-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 35px 15px;
    border: 1px dashed var(--kp-slate-300);
    border-radius: var(--kp-radius-lg);
    color: var(--kp-slate-500);
    font-size: 12px;
    text-align: center;
}
.branch-empty[hidden] { display: none; }
.branch-empty .branch-ph-icon { flex-basis: 26px; width: 26px; height: 26px; color: var(--kp-slate-400); }

/* Dated 2026-11-07 (15 #1146): on the narrow cards of this band the two long chips, Temporarily closed and Under
   maintenance, take their own line under the name and distance, at their own size, their start edge level with the name's;
   Open and Closed stay beside the name. The title's zero basis would always keep the chip on the first line, so the
   title takes the line beside the 40px kind box and its 12.75px gap. The head runs reversed, so a wrapped chip starts its
   line on the kind box's side, which is the card's inline end in both languages (measured 2026-11-07 at 1024); its free end
   margin carries it to the inline start, where the name starts. */
@media (min-width: 721px) and (max-width: 1199px) {
    .branch-head:has(.branch-open.is-temporarily-closed, .branch-open.is-maintenance) { flex-wrap: wrap; }
    .branch-head:has(.branch-open.is-temporarily-closed, .branch-open.is-maintenance) .branch-title { flex-basis: calc(100% - 52.75px); }
    .branch-head:has(.branch-open.is-temporarily-closed, .branch-open.is-maintenance) .branch-open { margin-inline-end: auto; }
}

/* ---- 720px and below: one column, the list/map switch, the map behind its own tab ---- */
@media (max-width: 720px) {
    .rp-shell:has(.branches-layout) .rp-title { margin-block-end: 17px; }
    .branches-layout { flex-direction: column; gap: 12.75px; height: auto; }
    .branch-sidebar { display: contents; padding: 0; }
    .branch-stats,
    .branch-mobile-toggle,
    .branch-finder,
    .branch-map-wrap { width: calc(100% - 6px); align-self: flex-end; }
    .branch-stats {
        order: 1;
        height: auto; /* 2026-10-21, 15 #686: was 146px, the height the design gives the card with its nearest-branch strip; the strip is gone, so the card wraps its three counts. 2026-11-06, 15 #1058: stays auto, because the strip now also holds a hint and a longer button */
        min-height: 146px; /* 2026-10-21, 15 #686: was 146px, as height above. 2026-11-06, 15 #1058: the strip is back, so the reference height is back, as a floor */
        padding: 16px 14px 14px;
        border-radius: var(--kp-radius-lg);
        background: var(--kp-postal-navy-600);
        box-shadow: 0 13px 29px -12px rgb(0 51 160 / .42);
    }
    .branch-metrics b { font-size: 23px; }
    .nearest b { font-size: 11px; line-height: 16.5px; }
    .branch-mobile-toggle {
        order: 2;
        display: flex;
        height: 42.5px;
        padding: 4px;
        border: 1px solid var(--color-border);
        border-radius: 11px;
        background: var(--kp-white);
        box-shadow: 0 1px 2px rgb(23 37 84 / .04);
    }
    .branch-mobile-toggle button {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        gap: 7px;
        height: 38px;
        padding: 1px 6px;
        border: 0;
        border-radius: var(--kp-radius-md);
        background: transparent;
        color: var(--kp-slate-500);
        font-size: 12px;
        font-weight: 800;
        line-height: 18px;
        transition: background-color .2s, color .2s;
    }
    .branch-mobile-toggle button.active { background: var(--kp-postal-navy-600); color: var(--kp-white); box-shadow: 0 3px 8px rgb(0 51 160 / .18); }
    .branch-mobile-toggle .branch-ph-icon { flex-basis: 15px; width: 15px; height: 15px; }
    .branch-map-wrap {
        order: 3;
        height: auto;
        padding: 0;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: var(--kp-radius-xl);
        box-shadow: 0 1px 3px rgb(23 37 84 / .043), 0 8px 20px rgb(23 37 84 / .04);
        /* Dated 2026-11-07 (15 #1120): the desk tier's sticky place and floor do not apply under the map tab. */
        position: relative;
        inset-block-start: auto;
        min-height: 0;
    }
    /* The band's insets follow the map's place here: no wrap padding, the map's own 1px border. */
    .branch-map-top { inset-block-start: 11px; }
    html[dir="rtl"] .branch-map-top { inset-inline: 11px 53px; }
    html[dir="ltr"] .branch-map-top { inset-inline: 53px 11px; }
    .branch-map {
        height: 42vh;
        min-height: 290px;
        border: 1px solid rgb(255 255 255 / .55);
        border-radius: var(--kp-radius-lg);
    }
    /* Dated 2026-11-08: the robot stands at the window's inline end and the map's credit line at the map's physical right, so
       in English the robot covered the credit's end (390 x 844: credit to x 371, robot from x 320). The credit moves with
       the page and the robot stays at the window's foot, so they meet at some window heights and not others (390 wide: 844
       and 880, not 780); the credit therefore keeps the robot's inline room free, the room the phone toast keeps for it
       (twice the inset plus the robot's size), which holds at every height. In Arabic the robot is at the left and this
       margin falls on the credit's free side. */
    .rp-shell:has(.rp-assistant) .branch-map .leaflet-control-attribution {
        margin-inline-end: calc(2 * var(--kp-portal-assistant-phone-inset) + var(--kp-portal-assistant-phone-size));
    }
    /* Dated 2026-11-12: the credit corner runs left to right in both languages (its text is Latin; the page script sets
       its direction), so in Arabic its inline end is its right, the robot-free side the room must not take; the room
       stays on its left there, the place it had before. */
    html[dir="rtl"] .rp-shell:has(.rp-assistant) .branch-map .leaflet-control-attribution {
        margin-inline: calc(2 * var(--kp-portal-assistant-phone-inset) + var(--kp-portal-assistant-phone-size)) 0;
    }
    .branch-finder { order: 4; padding-block-end: 80px; }
    .branch-view-list .branch-map-wrap,
    .branch-view-map .branch-finder { display: none; }
    .branch-view-map .branch-map-wrap { display: block; }
    .branch-search { margin: 0 0 12.75px; }
    .branch-search input { height: 42px; border-radius: var(--kp-radius-lg); background: rgb(255 255 255 / .82); font-size: 16px; }
    /* Dated 2026-11-07 (15 #1119): the open-now chip keeps the phone size of the type row it left. */
    .branch-results .open-only { padding: 7px 13px; font-size: 11px; line-height: 16.5px; height: 29.75px; }
    .branch-results { width: 100%; }
    .branch-list { gap: 11px; padding-block-end: 8px; }
    /* 2026-11-06, 15 #1058: height was also 198px, as the base rule's 200px. Dated 2026-11-07 (15 #1104, #1120): the 198px
       floor is gone with the base rule's, and the larger card text holds at every width (15 #1106). Dated 2026-11-07
       (15 #1145): the mockup's glass edge and soft shadow on a card not pressed; the base hover and selected rules outrank
       this one, so the navy hover and the gold border still win. */
    .branch-item { padding: 15px 14px; border-color: rgb(255 255 255 / .6); box-shadow: 0 9px 26px -14px rgb(15 23 42 / .2); }
    .branch-head { gap: 10px; min-height: 0; margin-block-end: 0; }
    .branch-loc { gap: 7px; margin: 12px 0; }
    .branch-actions button { padding-block: 9px; font-size: 14px; line-height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .branch-open { animation: none; }
    .branch-item,
    .branch-mobile-toggle button,
    .branch-map-views button { transition: none; }
    #branchList.grid-loading-host::after { animation: none; }
}

/* ============================================================
   DASHBOARD - the direction tabs above the phone bar (owner ruling 15 #745, 2026-10-24)
   ============================================================ */
/* On a 360 x 800 phone the dashboard's three direction tabs sat under the fixed bottom bar when the page opened (their
   bottoms at 771.17 Arabic / 782.67 English against the bar's top at 728, measured 2026-10-24 for a subscriber with no
   box yet). The reference shows them above its bar at that window (dashboard.html: the tabs end at 597.38, its bar
   starts at 694) with the same block geometry as ours; what pushes ours down is content the reference does not draw -
   the account line under the top bar, a long name, and the "no box yet" ticket, which grows with its copy. Those
   tickets' paragraphs reuse the dashboard's empty-state paragraph (.dc-empty), whose 24px block padding is breathing
   room for a full-width panel; inside the card the content column's own 10px gap already separates them. So at phone
   width the padding goes. Nothing is hidden or moved: every line and the card's action stay, in their order.
   Measured after, same subscriber and window: the ticket at its 232px floor in Arabic and 247.25px in English (96px
   shorter), the tabs ending at 705.42 / 686.67, under the bar's top at 728 in neither language. */
@media (max-width: 720px) {
    .dc-ticket-empty .dc-empty { padding-block: 0; }
}
/* The P.O. Box card and the VBX card are always one height (owner ruling 15 #1066): the shared rule fixed the filled card
   at --dc-ticket-height, so only the empty card could grow and a filled card clipped what did not fit. Each tier's height
   is now a floor on every card. The row stretches its items, the grid above 720px and the phone's sideways strip alike, so
   the taller card sets both, and the footer's margin keeps the actions at the foot of the shorter one. */
.dc-ticket { display: flex; height: auto; min-height: var(--dc-ticket-height); }
.dc-ticket-layout { flex: 1; min-width: 0; height: auto; }

/* ---- the portal fast change (owner rulings 15 #1019, #1020, #1021, 2026-11-05) ----
   One block, last in this sheet: it overrides the shared rules by order, so the shared family stays as the rest of the
   app reads it. The logo sizes are the ones the owner chose (15 #1006, #1007), "for now". */
.rp-logo { display: block; }
@media (min-width: 721px) {
    .rp-header { height: var(--kp-portal-topbar-h-desktop); }
    .rp-logo { width: 225.4px; height: 76px; }
}
@media (max-width: 720px) {
    .rp-logo { width: 195.7px; height: 66px; flex-shrink: 1; min-width: 0; object-fit: contain; object-position: center; }
    .rp-header-brand { min-width: 0; flex: 0 1 auto; }
    .rp-header-brand > a { min-width: 0; }

    /* The profile icon on the phone header, without the name; the language control keeps its globe and its label for
       a screen reader, and gives up the word to make the room. */
    .rp-h-actions > a.rp-user { display: inline-flex; flex: 0 0 auto; padding: 0; border: 0; background: none; box-shadow: none; }
    .rp-h-actions > a.rp-user .rp-user-name { display: none; }
    .rp-header { gap: 10px; }
    .rp-h-actions .lang-label { display: none; }
}

/* More in the phone bottom bar and its sheet. The bar stays above the sheet, as on the mock. */
.rp-mobile-more { display: none; }
@media (max-width: 720px) {
    .rp-mobile-more { display: grid; place-items: center; gap: 3px; min-width: 54px; padding: 0; border: 0; background: none; color: var(--kp-portal-mobile-ink); font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
    .rp-mobile-more.active,
    .rp-mobile-more.is-open { color: var(--kp-portal-mobile-active); }

    .rp-more-scrim { position: fixed; z-index: 1290; inset: 0; background: var(--portal-dialog-backdrop); }
    .rp-more-sheet { position: fixed; z-index: 1295; inset-inline: 0; inset-block-end: calc(var(--kp-portal-mobile-nav-height) + env(safe-area-inset-bottom) - 24px); max-block-size: calc(100dvh - var(--kp-portal-mobile-nav-height)); overflow-y: auto; padding: 10px 16px 40px; border-radius: 24px 24px 0 0; background: var(--kp-white); box-shadow: var(--shadow-portal-mobile-nav); }
    .rp-more-handle { display: block; width: 40px; height: 4px; margin-block-end: 12px; margin-inline: auto; border-radius: 4px; background: var(--color-border); }
    .rp-more-who { display: flex; align-items: center; gap: 12px; padding-block-end: 12px; margin-block-end: 6px; border-block-end: 1px solid var(--color-border); }
    .rp-more-who .rp-user-icon { flex: 0 0 auto; }
    .rp-more-who div { min-width: 0; }
    .rp-more-who b { display: block; overflow: hidden; color: var(--color-text); font-size: 15px; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
    .rp-more-who .rp-more-kind { display: block; color: var(--color-text-muted); font-size: 12px; line-height: 18px; }
    .rp-more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; background: none; color: var(--color-text); font: inherit; font-size: 14px; font-weight: 700; line-height: 20px; text-align: start; text-decoration: none; cursor: pointer; }
    .rp-more-row img { width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; }
    .rp-more-row > .icon:last-child { width: 15px; height: 15px; margin-inline-start: auto; color: var(--color-text-muted); }
    .rp-more-out { min-height: 44px; margin-block-start: 8px; padding: 9px 12px; 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; }
    .rp-more-out .icon { width: 18px; height: 18px; flex: 0 0 18px; }
    /* The bar is inert while the sheet is open, so this is the sheet's own way out for a screen reader on a touch phone.
       Pointer readers have the press outside; it shows only when the keyboard reaches it. */
    .rp-more-close { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; background: var(--kp-white); color: var(--color-text); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
    .rp-more-close:focus-visible { width: auto; height: auto; padding: 6px 10px; overflow: visible; clip-path: none; }
}

/* Quick Actions on Home, sizes measured from the rendered mockup; the shadow in the official navy at the mockup's alpha. */
.dc-quick-actions { margin-block-start: 34px; }
.dc-quick-actions .dc-title-icon { width: 24px; height: 24px; object-fit: contain; }
.dc-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12.75px; }
.dc-action-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; height: 150px; min-height: 150px; padding: 17px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--kp-white); box-shadow: 0 4px 12px rgb(0 51 160 / .03); color: var(--color-text); text-align: start; text-decoration: none; }
.dc-action-card img { width: 59.5px; height: 59.5px; margin-block-end: 10.625px; object-fit: contain; }
.dc-action-card b { font-size: 13px; font-weight: 700; line-height: 16.25px; }
.dc-action-card small { display: flex; align-items: center; gap: 4.25px; margin-block-start: 6.375px; color: var(--color-text-muted); font-size: 10px; font-weight: 600; line-height: 16.25px; }
.dc-action-card small .icon { width: 13px; height: 13px; }
/* THE QUICK ACTION LIFTS ON HOVER (dated 2026-11-07, Core Rule 13 interaction states): the rendered reference raises the
   card 2px with a tinted border and a deeper shadow over .2s (app.bundle.css:4926-4930). Its stale blue is re-expressed in
   the official palette: the border is the official navy-500 at 30% on white, the shadow the official navy at 10%. */
.dc-action-card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.dc-action-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--kp-navy-500) 30%, var(--kp-white)); box-shadow: 0 10px 22px var(--kp-navy-600-a10); }
/* Reduced motion stops the movement's timing only; the hover's end state stays (the house reduced-motion rule). */
@media (prefers-reduced-motion: reduce) {
    .dc-action-card { transition: none; }
}
@media (max-width: 1100px) {
    .dc-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .dc-quick-actions { margin-block-start: 28px; }
    .dc-action-grid { gap: 10px; }
    .dc-action-card { height: auto; min-height: 128px; padding: 14px; }
    .dc-action-card img { width: 42px; height: 42px; margin-block-end: 6px; }
    .dc-action-card b { font-size: 12px; }
}

/* The account box and the plan box on one row, the space above and below removed (15 #1021; sizes 15 #1006, #1008).
   A long company name takes the whole row on phones, tablets and up to about 1100px, and the plan box then drops to a
   second line. */
.kp-account-bar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; width: 100%; max-width: var(--kp-portal-content-max-w); margin-inline: auto; }
.kp-account-panel { margin-inline-end: calc(100% - min(420px, 100%)); }
.dc-greeting { margin: 0; }
.kp-account-bar > .dc-plan { flex: 0 0 auto; margin-block-start: 0; margin-inline-start: auto; }

@media (min-width: 641px) {
    .kp-account-chip { flex: 1 1 520px; min-width: 0; max-width: max-content; flex-wrap: nowrap; }
    .kp-account-chip > * { flex-shrink: 0; }
    .kp-account-chip > .kp-account-name { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (min-width: 721px) {
    .kp-account-bar { padding: 6px 34px 0; }
    .kp-account-chip { min-height: 44px; gap: 12px; padding: 10px 20px; font-size: 15px; }
    .kp-account-mark { font-size: 13px; }
    .dc-plan { min-height: 44px; gap: 12px; padding-block: 8px; padding-inline: 14px 16px; font-size: 12px; }
    html[dir="ltr"] .dc-plan { padding-inline: 16px 14px; }
    .dc-plan > .icon { width: 18px; height: 18px; flex-basis: 18px; }
    .dc-plan b { font-size: 15px; }
    .dc-plan-divider { height: 16px; }
    .dc-plan-arrow { width: 26px; height: 26px; flex-basis: 26px; }
    .dc-plan-arrow .icon { width: 15px; height: 15px; flex-basis: 15px; }
    .rp-shell--dashboard .rp-wrap { padding-block-start: 16px; }
}

@media (max-width: 720px) {
    .kp-account-bar { padding: 6px 0 0; }
    .rp-shell--dashboard .rp-wrap { padding-block-start: 12px; }
}

@media (max-width: 640px) {
    .kp-account-bar { gap: 8px; }
    .kp-account-chip { gap: 6px; padding: 5px 10px; font-size: 11px; }
    .kp-account-mark { padding: 1px 6px; font-size: 10px; }
    .kp-account-bar > .dc-plan { gap: 6px; min-height: 32px; padding-block: 4px; padding-inline: 8px; }
    html[dir="ltr"] .kp-account-bar > .dc-plan { padding-inline: 8px; }
    .kp-account-bar > .dc-plan b { font-size: 12px; }
    .kp-account-bar > .dc-plan > .icon { width: 13px; height: 13px; flex-basis: 13px; }
    .kp-account-bar > .dc-plan .dc-plan-arrow { width: 18px; height: 18px; flex-basis: 18px; }
    .kp-account-bar > .dc-plan .dc-plan-arrow .icon { width: 11px; height: 11px; flex-basis: 11px; }
}
/* ---- the portal header (owner rulings 15 #1031 to #1049, 2026-11-05) ----
   One block, last in this sheet: it overrides the shared rules by order, so the shared family stays as the rest of the
   app reads it. The mailbox boxes and every other Home font are not touched here. */

/* The shell above the phone tier. The rail stays a body child and .rp-content stays the scroller. The header and the
   account row leave the column as fixed boxes across the window, the menu starts at their foot, and the column starts
   there too with the height left. --rp-band is that height, by what the page draws: the header alone, the header and
   the row, or the two with the row on two lines. Screen only, so print keeps the flow. The body is its own formatting
   root so the column's top margin stays inside the body's minimum height. Below 500px of window height the band would
   leave the page too little room, so the header and the row stay in the column, as print keeps them. */
@media screen and (min-width: 720.02px) and (min-height: 500px) {
    .rp-shell {
        --rp-band: var(--kp-portal-header-h);
        --rp-strip: var(--rp-band);
        display: flow-root;
    }
    .rp-shell:has(.kp-account-bar) { --rp-band: calc(var(--kp-portal-header-h) - var(--kp-portal-header-overlap) + 70px); }
    .rp-shell .rp-content { margin-block-start: var(--rp-band); }
    .rp-shell .rp-header { position: fixed; z-index: 21; inset-block-start: 0; inset-inline: 0; }
    .rp-shell .kp-account-bar {
        position: fixed;
        z-index: 22;
        inset-block-start: calc(var(--kp-portal-header-h) - var(--kp-portal-header-overlap));
        inset-inline: 0;
        margin-block: 0;
        /* Its own layer, so the bell's list opening never redraws the sheet's gradient a shade off. */
        will-change: transform;
    }
    .rp-aside:not(.is-open) { inset-block-start: var(--rp-band); }
    /* A fixed box is one layer, so raising the header for the bell's list alone would lay its foot over the row's curve
       and the tops of the boxes. While the list is open the header's paint moves under the row, and the header itself
       is clear and leaves the press to what lies under it. */
    .rp-shell .rp-header:has(.notification-dropdown:not([hidden])) { z-index: 31; background: none; pointer-events: none; }
    .rp-shell .rp-header:has(.notification-dropdown:not([hidden])) > * { pointer-events: auto; }
    .rp-shell .rp-content:has(.notification-dropdown:not([hidden]))::before {
        content: "";
        position: fixed;
        z-index: 20;
        inset-block-start: 0;
        inset-inline: 0;
        height: var(--kp-portal-header-h);
        border-start-start-radius: 28px;
        border-start-end-radius: 28px;
        background: var(--kp-portal-header-paint);
    }
    body.pk-confirmed { --rp-band: 0px !important; }
}
/* The bell's list is held to the window, so it takes only the room left and its rows scroll. */
@media screen and (min-width: 720.02px) {
    .rp-shell .notification-dropdown:not([hidden]) { display: flex; flex-direction: column; max-height: calc(100dvh - 106px); }
    .rp-shell .notification-dropdown > header,
    .rp-shell .notification-dropdown > footer { flex: none; }
    .rp-shell .notification-dropdown-list { flex: 0 1 auto; min-height: 0; }
}
/* The confirmation stands alone at every width. */
body.pk-confirmed .kp-account-bar { display: none !important; }
/* The row wraps its two boxes onto two lines here (the rule at the switcher below). */
@media screen and (min-width: 720.02px) and (max-width: 886px) and (min-height: 500px) {
    .rp-shell:has(.kp-account-bar > .dc-plan) { --rp-band: calc(var(--kp-portal-header-h) - var(--kp-portal-header-overlap) + 122px); }
}

/* The page wash and the sheet's panel tint. */
body.rp-shell {
    background: linear-gradient(180deg, var(--kp-portal-page-wash-1) 0, var(--kp-portal-page-wash-2) 260px, var(--kp-portal-page-wash-3) 100%);
}
body.rp-shell::before { display: none; }
body.rp-shell::after { display: none; }
.dc-ship-panel { background: var(--kp-portal-ship-panel-bg); }

/* The menu's text. */
.rp-nav a { font-size: 14.5px; font-weight: 700; }

/* The navy header: rounded top corners, the logo pair, and the towers and hills under the controls. The art keeps its place
   as a share of the header's width, up to its full size. */
.rp-header {
    position: relative;
    overflow: hidden;
    align-items: flex-start;
    height: var(--kp-portal-header-h);
    max-width: none;
    padding-block: 12px 0;
    padding-inline: 40px;
    border: 0;
    border-start-start-radius: 28px;
    border-start-end-radius: 28px;
    box-shadow: none;
    backdrop-filter: none;
    background: var(--kp-portal-header-paint);
    /* The controls' text is white here, so their hover fill is a dark navy, not the light veil the other shells use. */
    --kp-portal-topbar-hover-bg: var(--kp-navy-700);
}
.rp-header::before { display: none; }
.rp-header::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset-block-end: var(--kp-portal-header-overlap);
    inset-inline-end: 11.05%;
    width: min(42.54%, 612.5px);
    aspect-ratio: 612.5 / 127.75;
    pointer-events: none;
    background: url("../img/headerArtEn.png") center bottom / 100% 100% no-repeat;
}
html[dir="rtl"] .rp-header::after {
    inset-inline-end: 12.53%;
    width: min(38.33%, 552px);
    aspect-ratio: 552 / 127.75;
    background-image: url("../img/headerArtAr.png");
}
.rp-header-brand { position: relative; z-index: 1; }
.rp-brand { display: inline-flex; align-items: center; gap: 18px; }
.rp-header .rp-logo { flex: 0 0 auto; width: 100px; height: 109px; }
.rp-logo-words { flex: 0 0 auto; width: auto; height: 88px; }

/* The pair steps down where it would reach the controls. */
@media (min-width: 720.02px) and (max-width: 900px) {
    .rp-brand { gap: 12px; }
    .rp-header .rp-logo { width: 70px; height: 76px; }
    .rp-logo-words { height: 61px; }
}
/* Up to 960px the logo keeps its size (15 #1040), so the language word gives way to the globe and a long name is cut. */
@media (min-width: 720.02px) and (max-width: 960px) {
    .rp-h-actions .lang-label { display: none; }
    .rp-h-actions .rp-user-name { max-width: 120px; }
}

/* The controls keep their markup, order and sizes. They only turn white, with a light focus ring. */
.rp-h-actions { position: relative; z-index: 1; margin-block-start: 30px; }
.rp-h-actions > a,
.rp-h-actions > a .lang-label,
.rp-h-actions .notification-bell,
.rp-h-actions .rp-user-name { color: var(--kp-white); }
.rp-h-actions > a .icon,
.rp-h-actions .notification-bell .icon { color: var(--kp-white); }
.rp-header :focus-visible:not(.notification-dropdown *) { outline-color: var(--kp-white); }

/* The header clips its art, so the clip opens only while the bell's list is open. */
.rp-header:has(.notification-dropdown:not([hidden])) { overflow: visible; }
.rp-h-actions:has(.notification-dropdown:not([hidden])) { z-index: 3; }

/* The curved sheet: it rides up over the header's foot. The row runs the window's full width, and the company box
   stretches to fill it, up to a small gap before the plan box at the row's end. */
.kp-account-bar {
    position: relative;
    z-index: 2;
    max-width: none;
    margin-block: calc(var(--kp-portal-header-overlap) * -1) 0;
    border-start-start-radius: 28px;
    border-start-end-radius: 28px;
    background: linear-gradient(180deg, var(--kp-portal-sheet-1), var(--kp-portal-sheet-2) 70%, var(--kp-portal-sheet-3));
}
@media (min-width: 720.02px) {
    .kp-account-bar {
        padding-block: 14px 12px;
        padding-inline: 40px;
        column-gap: 12px;
    }
    .kp-account-bar > .kp-account-chip { max-width: none; gap: 12px; padding-inline: 20px; font-size: 15px; }
}

/* The two boxes share one text size per role and one height at every width. The company box's tag keeps its own size. */
.kp-account-bar > .kp-account-chip,
.kp-account-bar > .dc-plan { height: 44px; min-height: 44px; padding-block: 0; }
.kp-account-bar > .dc-plan { font-size: 15px; font-weight: 400; }
.kp-account-bar > .dc-plan b { font-size: 15px; font-weight: 700; }
@media (max-width: 720px) {
    .kp-account-bar > .kp-account-chip,
    .kp-account-bar > .dc-plan { height: 40px; min-height: 40px; }
    .kp-account-bar > .kp-account-chip { font-size: 14px; }
    .kp-account-bar > .dc-plan,
    .kp-account-bar > .dc-plan b { font-size: 14px; }
}
@media (max-width: 640px) {
    .kp-account-bar > .kp-account-chip,
    .kp-account-bar > .dc-plan { height: 32px; min-height: 32px; }
    .kp-account-bar > .kp-account-chip { font-size: 12px; }
    .kp-account-bar > .dc-plan,
    .kp-account-bar > .dc-plan b { font-size: 12px; }
}

/* Above the phone tier the two boxes are matching white pills, and the plan box is its crown, its label, its name and a plain
   chevron. */
.dc-plan-arrow > .dc-plan-chevron { display: block; stroke-width: 2.6; }
html[dir="rtl"] .dc-plan-chevron { transform: scaleX(-1); }
@media (min-width: 720.02px) {
    .kp-account-bar > .kp-account-chip,
    .kp-account-bar > .dc-plan {
        margin: 0;
        border: 1px solid var(--kp-navy-600);
        border-radius: var(--kp-radius-full);
        background: var(--color-bg-surface);
        box-shadow: 0 4px 12px var(--kp-navy-600-a10);
    }
    html[dir] .kp-account-bar > .dc-plan { gap: 12px; padding-inline: 20px 18px; }
    .kp-account-bar > .dc-plan > .dc-plan-divider { display: none; }
    .kp-account-bar > .dc-plan > .icon { width: 22px; height: 22px; flex-basis: 22px; }
    .kp-account-bar > .dc-plan .dc-plan-arrow,
    .kp-account-bar > .dc-plan:hover .dc-plan-arrow { width: 18px; height: 18px; flex-basis: 18px; background: none; color: var(--color-text); }
    .dc-plan-arrow > .dc-plan-chevron { width: 18px; height: 18px; flex-basis: 18px; }
    .kp-account-chip > .kp-account-action { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
    .kp-account-action-icon { display: block; flex: 0 0 16px; width: 16px; height: 16px; }
}

/* The switcher hangs from the "Switch account" link. The row is a grid, because an absolutely placed child takes its grid area as
   its box: the panel sits in the company box's cell, so its end edge is the box's end edge whatever the plan box measures, with
   no script and no measuring. It lies over the page and pushes nothing, and the row rises above the menu and the launcher only while it is open.
   A list taller than the room left scrolls inside itself. */
.kp-account-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.kp-account-bar:not(:has(> .dc-plan)) { grid-template-columns: minmax(0, 1fr); }
.kp-account-bar:has(.kp-account-panel:not([hidden])) { z-index: 701; }
.kp-account-bar > .kp-account-panel {
    position: absolute;
    grid-area: 1 / 1 / 2 / 2;
    inset-block-start: calc(100% + 6px);
    inset-inline-end: 0;
    box-sizing: border-box;
    max-height: calc(100dvh - var(--kp-portal-header-h) - 58px);
    margin: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-portal-modal);
}
@media (max-width: 886px) {
    .kp-account-bar { grid-template-columns: minmax(0, 1fr); }
    .kp-account-bar > .dc-plan { justify-self: end; }
}
@media (max-width: 720px) {
    .kp-account-bar > .dc-plan { justify-self: stretch; }
    .kp-account-bar > .kp-account-panel {
        inset-block-start: calc(100% + 4px);
        width: 100%;
        max-height: calc(100dvh - var(--rp-strip) - var(--kp-portal-header-h) - 34px);
    }
}

/* The phone's pair: the company box over the plan box, each the row's full width, with one radius, border and height. The name
   gets the room the tighter gaps free. */
@media (max-width: 720px) {
    .kp-account-bar { gap: 6px; }
    .kp-account-bar > .kp-account-chip,
    .kp-account-bar > .dc-plan {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        border: 1px solid var(--kp-navy-600);
        border-radius: var(--kp-radius-md);
    }
    .kp-account-bar > .kp-account-chip { gap: 5px; padding-inline: 9px; }
    .kp-account-chip > .kp-account-mark { padding-block: 1px; padding-inline: 6px; }
    .kp-account-chip > .kp-account-name { min-width: 0; }
    .kp-account-chip > .kp-account-action { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: auto; }
    .kp-account-action-icon { display: block; flex: 0 0 13px; width: 13px; height: 13px; }
    html[dir] .kp-account-bar > .dc-plan { justify-content: flex-start; gap: 10px; padding-inline: 12px; }
    .kp-account-bar > .dc-plan > .icon { width: 20px; height: 20px; flex-basis: 20px; }
    .kp-account-bar > .dc-plan .dc-plan-arrow,
    .kp-account-bar > .dc-plan:hover .dc-plan-arrow { width: 16px; height: 16px; flex-basis: 16px; margin-inline-start: auto; background: none; color: var(--color-text); }
    .dc-plan-arrow > .dc-plan-chevron { width: 16px; height: 16px; flex-basis: 16px; }
}

/* The block's borders above outrank the shipped hover of the two boxes, so it is stated again here, at every width. */
.kp-account-bar > .kp-account-chip:not(.kp-account-chip--plain):hover { border-color: var(--kp-navy-600-a30); }
.kp-account-bar > .dc-plan:hover { border-color: rgb(15 23 42 / .2); }

/* The phone: the gutter stays on the column, and the header and the sheet reach the screen's edge past it. */
@media (max-width: 720px) {
    .rp-header {
        width: auto;
        gap: 6px;
        margin-inline: calc(var(--kp-portal-phone-gutter) * -1);
        padding-block: 13px 0;
        padding-inline: 12px;
        border-start-start-radius: 22px;
        border-start-end-radius: 22px;
    }
    html[dir="ltr"] .rp-header { padding-block-start: 16px; }
    .rp-brand { gap: 7px; }
    .rp-header .rp-logo { width: 46px; height: 50px; }
    html[dir="rtl"] .rp-header .rp-logo { width: 50px; height: 54px; }
    .rp-logo-words { height: 43px; }
    html[dir="rtl"] .rp-logo-words { height: 38px; }
    .rp-h-actions { margin-block-start: 11px; }
    .rp-h-actions .lang-label { display: inline; }
    .rp-h-actions { gap: 2px; }
    .rp-h-actions > a:not(.rp-user) { gap: 4px; padding-inline: 2px; }
    .rp-h-actions .notification-menu { margin-inline: 0; }
    .rp-h-actions .notification-bell { width: 28px; min-width: 28px; padding-inline: 0; }
    .rp-h-actions > a.rp-user { margin-inline: 0; }
    .rp-logo-words { max-width: none; }
    .rp-h-actions .rp-user-icon {
        box-sizing: border-box;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        min-height: 34px;
        max-height: 34px;
        border: 1px solid var(--glass-border);
        border-radius: 10px;
        background: none;
    }
    .rp-header::after { width: 99px; aspect-ratio: 99 / 48; inset-inline-end: 29.87%; background-image: url("../img/headerArtPhoneEn.png"); }
    html[dir="rtl"] .rp-header::after { width: 128px; aspect-ratio: 128 / 48; inset-inline-end: 27.45%; background-image: url("../img/headerArtPhoneAr.png"); }
    .kp-account-bar {
        width: auto;
        margin-inline: calc(var(--kp-portal-phone-gutter) * -1);
        padding-block: 6px 8px;
        padding-inline: 10px;
        border-start-start-radius: 22px;
        border-start-end-radius: 22px;
    }
}

/* The logo stays full size on a phone (15 #1040), so the language word gives way and the globe stays: on a header with a
   back button, and on the narrowest screens, where the word would reach the logo (15 #1049). A back button at 375px and
   under also takes the header's gaps in. */
@media (max-width: 720px) {
    .rp-header:has(.rp-mobile-header-back, .rp-header-back) .lang-label { display: none; }
}
@media (max-width: 375px) {
    .rp-header:has(.rp-mobile-header-back, .rp-header-back) { gap: 3px; }
    .rp-header:has(.rp-mobile-header-back, .rp-header-back) .rp-brand { gap: 4px; }
    .rp-header:has(.rp-mobile-header-back, .rp-header-back) .rp-header-brand { gap: 4px; }
}
@media (max-width: 359px) {
    .rp-header:has(.rp-mobile-header-back, .rp-header-back) { padding-inline: 10px; }
    /* Below the 360px the back button fits at, it goes and the logo keeps its size (15 #1066, #1040). Gone from the keyboard
       too, because display none leaves no tab stop. */
    .rp-header .rp-mobile-header-back,
    .rp-header .rp-header-back { display: none; }
}
@media (max-width: 355px) {
    .rp-h-actions .lang-label { display: none; }
}
/* Signed out, Sign in stays on one line. On the narrower phones the logo keeps its size (15 #1040), so the language word
   and Sign in's icon give way, and the header's edges come in. Dated 2026-11-08 (owner ruling 15 #1208): only the language
   word gives way here now; Sign in's icon is what shows up to 449.98px, in the block below. */
.rp-h-actions > [data-role="shell-sign-in"] { flex: none; white-space: nowrap; }
@media (max-width: 395px) {
    .rp-h-actions:has(> [data-role="shell-sign-in"]) .lang-label { display: none; }
    .rp-header:has([data-role="shell-sign-in"]) { padding-inline: 8px; }
}
/* Dated 2026-11-07 (13-RISKS PBL-SIGNEDOUT-UNDER-360, 15 #1067(2); the logo keeps its size, 15 #1040): below the 360px
   minimum the word Sign in still reached the logo words, so Sign in shows its icon and keeps its word for assistive
   technology. */
/* Dated 2026-11-08 (owner ruling 15 #1147): measured on the merged header before this block, the 395px block above already
   kept a gap at every width below 360 (4.86px at 320 in Arabic, the narrowest), so this block is the ruled look - the icon in
   place of the word - rather than a fix for an overlap still present. */
/* Dated 2026-11-08 (owner rulings 15 #1147 and 15 #1208): on a phone the signed-out logo is now 80px tall and 237px wide, so
   the icon in place of the word reaches up to 449.98px. Arabic sets that width: the word form left -5.92px beside the logo at
   430 and 10.03px at 450. The word stays for assistive technology. The icon alone is 20px wide, so the control keeps a 24px
   minimum target (WCAG 2.2 success criterion 2.5.8). */
@media (max-width: 449.98px) {
    .rp-h-actions > [data-role="shell-sign-in"] { min-inline-size: 24px; justify-content: center; }
    .rp-h-actions > [data-role="shell-sign-in"] .icon { display: block; }
    .rp-h-actions > [data-role="shell-sign-in"] > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}
/* THE SIGNED-OUT TOP BAR ON A PHONE TAKES THE 80PX LOGO (owner ruling 15 #1208, dated clause 2026-11-08T10:24Z). Before sign-in
   this bar shows on the Error page and the payment Receipt and Failed pages. At 720px and under its logo takes the size of
   the Register and company headers; from 721px up it stays as the signed-in bar is, so no rule here reaches past 720px.
   The key is the identity chip the server renders hidden when the request names no viewer, so a viewer it can name never
   gets these rules. A signed-in person returning from the payment provider has no session on that first request: on a
   phone the page paints these sizes until payments.js reveals the chip, then takes the signed-in sizes. If the probe fails
   or the session has no name, the chip stays hidden and the page keeps these sizes. The height is the shared token, so the
   content column follows it. */
@media (max-width: 720px) {
    .rp-shell:has(.rp-header [data-role="shell-identity"].hidden) { --kp-portal-header-h: 88px; }
    .rp-header:has([data-role="shell-identity"].hidden) { padding-block: 4px; align-items: center; }
    .rp-header:has([data-role="shell-identity"].hidden) .rp-brand { gap: 12px; }
    .rp-header:has([data-role="shell-identity"].hidden) .rp-logo { width: 78px; height: 80px; }
    .rp-header:has([data-role="shell-identity"].hidden) .rp-logo-words { height: 41px; }
    .rp-header:has([data-role="shell-identity"].hidden) .rp-h-actions { margin-block-start: 0; }
}
/* THE LANGUAGE CONTROL BESIDE THE 80PX LOGO ON A PHONE (owner ruling 15 #1219, 2026-11-08, which keeps the 80px logo of
   15 #1208 on phones). On a phone (720px and under) the 237px-wide logo left the language control no room, so on the pages
   whose header grew with the logo (Register, account type, terms, verify, the company pages) the control moves, small, to
   the header's top corner on its end side, showing the globe and the other language's short name; the control's accessible
   name stays as shipped (15 #1219). The sign-in page's centred logo and its pill are not these pages and keep theirs. */
.ref-lang-short,
.corp-language-short { display: none; }
@media (max-width: 720px) {
    body[data-public-route="register"] .ref-lang,
    body[data-public-route="account-type"] .ref-lang,
    body[data-public-route="terms"] .ref-lang,
    body[data-public-route="verify"] .ref-lang {
        position: fixed;
        z-index: 150;
        inset-block-start: 10px;
        inset-inline-end: 8px;
        min-height: 0;
        height: 26px;
        gap: 4px;
        padding-block: 0;
        padding-inline: 5px;
    }
    body[data-public-route="register"] .ref-lang > span,
    body[data-public-route="account-type"] .ref-lang > span,
    body[data-public-route="terms"] .ref-lang > span,
    body[data-public-route="verify"] .ref-lang > span,
    body[data-public-route="register"] .ref-lang > small,
    body[data-public-route="account-type"] .ref-lang > small,
    body[data-public-route="terms"] .ref-lang > small,
    body[data-public-route="verify"] .ref-lang > small { display: none; }
    body[data-public-route="register"] .ref-lang > .ref-lang-short,
    body[data-public-route="account-type"] .ref-lang > .ref-lang-short,
    body[data-public-route="terms"] .ref-lang > .ref-lang-short,
    body[data-public-route="verify"] .ref-lang > .ref-lang-short { display: inline; color: var(--color-text-muted); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0; }
    .corp-header .corp-language {
        position: absolute;
        z-index: 2;
        inset-block-start: 10px;
        inset-inline-end: 8px;
    }
    .corp-header .corp-language-link { min-height: 0; height: 26px; gap: 4px; padding-block: 0; padding-inline: 5px; }
    .corp-header .corp-language-label,
    .corp-header .corp-language-tag { display: none; }
    .corp-header .corp-language-link > .corp-language-short { display: inline; color: var(--color-text-muted); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0; }
}

/* The More icon: the sprite symbol, in the bar's size. */
.rp-mobile-more .icon { width: 20px; height: 20px; color: var(--kp-portal-mobile-active); }

/* Home's status tabs on a phone: one sideways line to the screen's edge, with the last tab whole and its gap after it. */
@media (max-width: 720px) {
    .rp-shell--dashboard .dc-strip--status { margin-inline: calc(var(--kp-portal-phone-gutter) * -1); }
    .rp-shell--dashboard .dc-strip--status > .dc-status-tabs {
        margin-inline: 0;
        padding-inline: var(--kp-portal-phone-gutter);
        scroll-padding-inline: var(--kp-portal-phone-gutter);
        gap: 6px;
    }
    html[dir] .rp-shell--dashboard .dc-status-tab { gap: 6px; padding-inline: 10px; }
}
/* THE COPYRIGHT LINE ON A SIGNED-IN PAGE (dated 2026-11-13, owner rulings 15 #1374 and #1381). Scoped to the body the layout
   marks signed in (rp-shell--signed-in, the server's own isSignedIn) and not on the pickup confirmation (pk-confirmed).
   From 721px the column is a flex column whose last box is the line: its auto start margin takes a short page's spare
   height, so the line rests on the column's bottom edge, which is the window's, and nothing is drawn under it. Where the
   assistant launcher shows, the line's own box carries the launcher's room (15 #1381(a)): a minimum height of the room
   plus 16 + 8px, so a long page's last content stops above the hovered launcher with room for a focus ring, and an equal
   inline padding of the room plus 16px, so its words clear the hovered launcher in both languages and stay centred. At
   phone width the line follows the content and ONE end space after it (--rp-footer-clearance, the launcher's footprint
   less the strip the column already ends above) clears the launcher and the bar (15 #1374(c)).
   What this replaces on these pages: the launcher's room before the line (.rp-wrap, components.css), the column's 42px
   and phone 112px end padding, Payment History's phone 98px and the phone Branches finder's 80px (15 #1374(b)). What it
   leaves alone: the Branches page above 720px (its own placement, 15 #1120, #1358), the pickup confirmation, every page
   drawn without a session (the signed-out error shell, the payment return pages), and print (screen only).
   Dated clause 2026-11-16 (owner ruling 15 #1453, superseding the phone half of 15 #1374(a)): at phone width a short page
   no longer leaves the line right after the content. The line is sticky with its start inset at the column's full
   height, held inside the column's content box: on a page shorter than the window it is pushed down until its bottom
   edge meets that box's bottom, so it rests just above the bottom bar with the one end space (--rp-footer-clearance)
   still under it; on a page longer than the window its own place is already the content box's end, so it still follows
   the content. The column stays a block column on purpose: a flex column would stop the page's first and last margins
   collapsing through <main> and move <main>'s box by 13px on Shipments and Branches (measured), and only the line may
   move. The Branches page follows the same rule at this width. */
@media screen {
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed) { --rp-footer-clearance: 0px; }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):has(.rp-assistant) { --rp-footer-clearance: var(--rp-assistant-clearance); }
}

@media screen and (min-width: 721px) {
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):not(:has(.branches-layout)) > .rp-content {
        display: flex;
        flex-direction: column;
        padding-block-end: 0;
    }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):not(:has(.branches-layout)) > .rp-content > * { flex-shrink: 0; }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):not(:has(.branches-layout)) > .rp-content > .rp-wrap { padding-block-end: 0; }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):not(:has(.branches-layout)) > .rp-content > .portal-copyright {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        margin-block-start: auto;
    }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):not(:has(.branches-layout)):has(.rp-assistant) > .rp-content > .portal-copyright {
        min-block-size: calc(var(--rp-assistant-clearance) + var(--kp-space-md) + var(--kp-space-sm));
        padding-inline: calc(var(--rp-assistant-clearance) + var(--kp-space-md));
    }
}

@media screen and (max-width: 720px) {
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed):has(.rp-assistant) {
        --rp-footer-clearance: max(0px, calc(var(--rp-assistant-clearance) - var(--rp-strip)));
    }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed) > .rp-content { padding-block-end: var(--rp-footer-clearance); }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed) > .rp-content > .rp-wrap { padding-block-end: 0; }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed) > .rp-content > .portal-copyright { position: sticky; inset-block-start: 100%; }
    .rp-shell.rp-shell--signed-in:not(.pk-confirmed) .branch-finder { padding-block-end: 0; }
}

/* THE 16PX FLOOR ON PHONE TYPING FIELDS (dated 2026-11-13, owner ruling 15 #1364, superseding 15 #790 for the assistant's
   box): through 720px every typing field is at least 16px, the size under which a phone browser zooms the page on focus;
   wider screens keep their sizes. The persona runs prove this floor and the boxes in a desktop browser at phone widths;
   they cannot prove a phone's own browser (iPhone Safari) on focus. Only the letter size changes; a control whose box takes its height from its
   line height keeps that line height (pinned below where the census showed it growing), so every box keeps its base
   height except the company Delegates add form: in Arabic its fields draw 46px where the base drew 44px through 720px
   (the Arabic face's 18px glyph box at 16px), and in English its Arabic-name field draws 45px where the base drew 46px
   through 720px and its civil ID field 45px where the base drew 46px from 640px to 720px. The viewport
   tags are unchanged (pinch zoom stays).
   Dated clause 2026-11-15 (15 #1369): the delegates add forms now hold the Civil ID field only, so the Arabic-name
   field named above is no longer drawn; the readings above were taken on the form before that change. */
@media screen and (max-width: 720px) {
    .rp-shell .rp-chat-input,
    .rp-shell .pd-value input,
    .rp-shell .pd-value select,
    .rp-shell .shipment-search input,
    .rp-shell .dg-field input,
    .rp-shell .ref-field input,
    .rp-shell .ref-field select,
    .rp-shell [data-surface="standing"] .poa-fields .ref-field input,
    .rp-shell .pk-sheet-picker .pk-select-wrap select,
    :is(.rp-shell, .ref-public) .corp-field input:not([type="checkbox"]):not([type="file"]),
    :is(.rp-shell, .ref-public) .corp-field select,
    :is(.rp-shell, .ref-public) .corp-field textarea {
        font-size: 16px;
    }
    :is(.rp-shell, .ref-public) .corp-field input::placeholder { font-size: 16px; }
    /* The pinned leadings: each is the base tree's own value, measured by the phone census (2026-11-14), for the controls
       whose leading would otherwise grow with the letter size. Personal Data's inputs keep 21px; the signed-out company
       inputs keep 22.5px (24.375px in Arabic, the page's inherited 1.625 at 15px); the company cancellation note keeps
       22.5px; the company Delegates page's add form (.dg-page; the person's own Delegation page states its leading)
       keeps the browser's own English leading at 14px, 17px. Its Arabic fields take no pin: at 16px the Arabic face's own
       glyph box sets an 18px line whatever the leading, so those fields draw 2px taller than the base (46px, measured). */
    .rp-shell .pd-value input { line-height: 21px; }
    .ref-public .corp-field input:not([type="checkbox"]):not([type="file"]) { line-height: 22.5px; }
    html[lang="ar"] .ref-public .corp-field input:not([type="checkbox"]):not([type="file"]) { line-height: 24.375px; }
    :is(.rp-shell, .ref-public) .corp-field textarea { line-height: 22.5px; }
    html[lang="en"] .rp-shell .dg-page .dg-field input { line-height: 17px; }
}
